{"version":3,"file":"NumberIcon.mjs","sources":["../../../src/components/NumberIcon/NumberIcon.tsx"],"sourcesContent":["import clsx from 'clsx';\nimport React from 'react';\n\nimport type { Size } from '../../util/variant-types';\n\nimport Text from '../Text';\n\nimport styles from './NumberIcon.module.css';\n\nexport type NumberIconProps = {\n  // Component API\n  /**\n   * (Required) Screen-reader text for the number icon.\n   */\n  'aria-label': string;\n  /**\n   * CSS class names that can be appended to the component.\n   */\n  className?: string;\n  /**\n   * CSS properties defined for the HTML element. Includes the component's CSS Custom Properties:\n   *\n   * - `--number-icon__bg`\n   * - `--number-icon__border`\n   * - `--number-icon__fg`\n   */\n  style?: NumberIconCSSProperties;\n  // Design API\n  /**\n   * Whether `NumberIcon` can be focused on, clicked, etc.\n   */\n  isInteractive?: boolean;\n  /**\n   * Number to be shown as the icon. Maximum of two digits.\n   */\n  number?: number;\n  /**\n   * The size of the icon.\n   *\n   * **Default is `\"lg\"`**.\n   */\n  size?: Extract<Size, 'md' | 'lg'>;\n  /**\n   * Indication of the status of the referenced item\n   */\n  status?: 'completed' | 'incomplete' | 'default';\n};\n\nexport interface NumberIconCSSProperties extends React.CSSProperties {\n  /**\n   * Custom property to customize the background color of this component (e.g., background color)\n   */\n  '--number-icon__bg'?: string;\n\n  /**\n   * Custom property to customize the border color of this component\n   */\n  '--number-icon__border'?: string;\n\n  /**\n   * Custom property to customize the foreground color of this component (e.g., text, icon, etc.)\n   */\n  '--number-icon__fg'?: string;\n}\n\n/**\n * ## Usage\n *\n * | Type/Use | Description | Example |\n * |----------|-------------|---------|\n * | Progress indicator | Shows where you are in a process that contains multiple distinct steps. | Filter selectors; user profile actions; navigation inside buttons. |\n * | Steps | Emphasizes steps in a procedure that is outlined on screen. | Process steps. |\n *\n * ### Best Practices\n *\n * * Be sure the number icon size is consistent throughout your application.\n * * When used next to text, the number icon should be center-aligned.\n * * Adding adequate space around the icon allows for legibility and touch. A minimum touch target area of 48px is recommended.\n */\nexport const NumberIcon = ({\n  className,\n  isInteractive = false,\n  number,\n  status = 'default',\n  size = 'lg',\n  ...other\n}: NumberIconProps) => {\n  const componentClassName = clsx(\n    className,\n    styles['number-icon'],\n    isInteractive && styles['number-icon--is-interactive'],\n    size && styles[`number-icon--size-${size}`],\n    status && styles[`number-icon--status-${status}`],\n  );\n\n  return (\n    <Text\n      as=\"span\"\n      className={componentClassName}\n      preset={size === 'md' ? 'label-md' : 'label-lg'}\n      role=\"img\"\n      tabIndex={isInteractive ? 0 : -1}\n      {...other}\n    >\n      {number}\n    </Text>\n  );\n};\n\nNumberIcon.displayName = 'NumberIcon';\n"],"names":["React"],"mappings":";;;;;AAiEA;;;;;;;;;;;;;AAaG;AACI,MAAM,UAAU,GAAG,CAAC,EACzB,SAAS,EACT,aAAa,GAAG,KAAK,EACrB,MAAM,EACN,MAAM,GAAG,SAAS,EAClB,IAAI,GAAG,IAAI,EACX,GAAG,KAAK,EACQ,KAAI;AACpB,IAAA,MAAM,kBAAkB,GAAG,IAAI,CAC7B,SAAS,EACT,MAAM,CAAC,aAAa,CAAC,EACrB,aAAa,IAAI,MAAM,CAAC,6BAA6B,CAAC,EACtD,IAAI,IAAI,MAAM,CAAC,CAAA,kBAAA,EAAqB,IAAI,CAAA,CAAE,CAAC,EAC3C,MAAM,IAAI,MAAM,CAAC,CAAA,oBAAA,EAAuB,MAAM,CAAA,CAAE,CAAC,CAClD;IAED,QACEA,6BAAC,IAAI,EAAA,EACH,EAAE,EAAC,MAAM,EACT,SAAS,EAAE,kBAAkB,EAC7B,MAAM,EAAE,IAAI,KAAK,IAAI,GAAG,UAAU,GAAG,UAAU,EAC/C,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,aAAa,GAAG,CAAC,GAAG,EAAE,EAAA,GAC5B,KAAK,EAAA,EAER,MAAM,CACF;AAEX;AAEA,UAAU,CAAC,WAAW,GAAG,YAAY;;"}