@fanvue/ui 3.50.0 → 3.51.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/charts.d.ts +7 -0
- package/dist/cjs/components/Button/Button.cjs +12 -8
- package/dist/cjs/components/Button/Button.cjs.map +1 -1
- package/dist/cjs/components/Chart/ChartCard.cjs +4 -3
- package/dist/cjs/components/Chart/ChartCard.cjs.map +1 -1
- package/dist/cjs/components/Dialog/Dialog.cjs +29 -2
- package/dist/cjs/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/cjs/components/Drawer/Drawer.cjs +61 -14
- package/dist/cjs/components/Drawer/Drawer.cjs.map +1 -1
- package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs +26 -7
- package/dist/cjs/components/DropdownMenu/DropdownMenuItem.cjs.map +1 -1
- package/dist/cjs/components/IconButton/IconButton.cjs +11 -2
- package/dist/cjs/components/IconButton/IconButton.cjs.map +1 -1
- package/dist/cjs/components/Icons/DocumentIcon.cjs +74 -0
- package/dist/cjs/components/Icons/DocumentIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/EpisodesIcon.cjs +65 -0
- package/dist/cjs/components/Icons/EpisodesIcon.cjs.map +1 -0
- package/dist/cjs/components/Icons/ShortsIcon.cjs +74 -0
- package/dist/cjs/components/Icons/ShortsIcon.cjs.map +1 -0
- package/dist/cjs/components/InfoBox/InfoBox.cjs +1 -1
- package/dist/cjs/components/InfoBox/InfoBox.cjs.map +1 -1
- package/dist/cjs/components/Pill/Pill.cjs +1 -1
- package/dist/cjs/components/Pill/Pill.cjs.map +1 -1
- package/dist/cjs/index.cjs +6 -0
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/Button/Button.mjs +12 -8
- package/dist/components/Button/Button.mjs.map +1 -1
- package/dist/components/Chart/ChartCard.mjs +4 -3
- package/dist/components/Chart/ChartCard.mjs.map +1 -1
- package/dist/components/Dialog/Dialog.mjs +29 -2
- package/dist/components/Dialog/Dialog.mjs.map +1 -1
- package/dist/components/Drawer/Drawer.mjs +61 -14
- package/dist/components/Drawer/Drawer.mjs.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenuItem.mjs +26 -7
- package/dist/components/DropdownMenu/DropdownMenuItem.mjs.map +1 -1
- package/dist/components/IconButton/IconButton.mjs +11 -2
- package/dist/components/IconButton/IconButton.mjs.map +1 -1
- package/dist/components/Icons/DocumentIcon.mjs +57 -0
- package/dist/components/Icons/DocumentIcon.mjs.map +1 -0
- package/dist/components/Icons/EpisodesIcon.mjs +48 -0
- package/dist/components/Icons/EpisodesIcon.mjs.map +1 -0
- package/dist/components/Icons/ShortsIcon.mjs +57 -0
- package/dist/components/Icons/ShortsIcon.mjs.map +1 -0
- package/dist/components/InfoBox/InfoBox.mjs +1 -1
- package/dist/components/InfoBox/InfoBox.mjs.map +1 -1
- package/dist/components/Pill/Pill.mjs +1 -1
- package/dist/components/Pill/Pill.mjs.map +1 -1
- package/dist/index.d.ts +85 -10
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +1 -1
- package/dist/styles/base.css +157 -4
- package/dist/styles/theme.css +20 -12
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.mjs","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Count, type CountSize } from \"../Count/Count\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\n\n/**\n * Visual style variant of the icon button.\n *\n * `primary`, `secondary`, `tertiary`, `outline`, `error`, `white` and `black`\n * use the shared button colour tokens and a size-driven shape (squared at the\n * `24` size, circular otherwise). Of these, `primary`, `secondary`, `tertiary`\n * and `outline` also honour the {@link IconButtonProps.negative} prop.\n *\n * `overlay` is a translucent dark fill with a backdrop blur, for buttons that sit\n * on photos or video. Its fill and icon look the same in light and dark themes, while\n * the keyboard focus ring still follows the theme. It takes the same size-driven\n * shape as the standard variants.\n *\n * `brand`, `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop` and\n * `microphone` are bespoke variants that stay circular at every size.\n */\nexport type IconButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"outline\"\n | \"error\"\n | \"white\"\n | \"black\"\n | \"brand\"\n | \"contrast\"\n | \"messaging\"\n | \"navTray\"\n | \"tertiaryDestructive\"\n | \"stop\"\n | \"microphone\"\n | \"overlay\"\n | \"field\";\n\n/** Icon button size in pixels. */\nexport type IconButtonSize = \"24\" | \"32\" | \"40\" | \"48\" | \"52\" | \"72\";\n\nconst iconSizeVariants: Record<IconButtonSize, string> = {\n 24: \"[&>svg]:size-4\",\n 32: \"[&>svg]:size-4\",\n 40: \"[&>svg]:size-4\",\n 48: \"[&>svg]:size-6\",\n 52: \"[&>svg]:size-7\",\n 72: \"[&>svg]:size-8\",\n};\n\nconst sizeVariants: Record<IconButtonSize, string> = {\n 24: \"size-6 p-1\",\n 32: \"size-8 p-1.5\",\n 40: \"size-10 p-[10px]\",\n 48: \"size-12 p-3\",\n 52: \"size-[52px] p-2\",\n 72: \"size-[72px] p-4\",\n};\n\nconst countSizeMap: Record<IconButtonSize, CountSize> = {\n 24: \"16\",\n 32: \"24\",\n 40: \"32\",\n 48: \"32\",\n 52: \"32\",\n 72: \"32\",\n};\n\n/**\n * Variants whose corner radius is size-driven (see {@link IconButton}): the `24`\n * size is squared (`rounded-xs`), every larger size stays circular. All other\n * variants are circular at every size.\n */\nconst SIZE_DRIVEN_SHAPE_VARIANTS = new Set<IconButtonVariant>([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"outline\",\n \"error\",\n \"white\",\n \"black\",\n \"overlay\",\n]);\n\n/** Variants that honour the `negative` (dark-surface) treatment. */\nconst NEGATIVE_AWARE_VARIANTS = new Set<IconButtonVariant>([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"outline\",\n]);\n\nconst DISABLED_FILL = \"disabled:bg-buttons-disabled-default disabled:text-content-disabled\";\nconst DISABLED_FILL_NEGATIVE =\n \"disabled:bg-buttons-disabled-negative disabled:text-content-disabled\";\nconst DISABLED_TRANSPARENT = \"disabled:text-content-disabled\";\nconst DISABLED_OPACITY = \"disabled:opacity-50\";\n\ntype VariantClasses = {\n default: string;\n disabled: string;\n negative?: string;\n negativeDisabled?: string;\n};\n\n/**\n * Icon button styling for every variant. The disabled treatment is expressed\n * with the CSS `disabled:` variant (not the `disabled` prop) so an ancestor\n * `<fieldset disabled>` is styled too; hover is guarded with `not-disabled:` so\n * it never fights the disabled state.\n */\nconst VARIANT_CLASSES: Record<IconButtonVariant, VariantClasses> = {\n primary: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted not-disabled:hover:bg-buttons-primary-hover not-disabled:active:bg-buttons-primary-hover\",\n disabled: DISABLED_FILL,\n negative:\n \"bg-buttons-primary-negative-default text-content-primary not-disabled:hover:bg-buttons-primary-negative-hover not-disabled:active:bg-buttons-primary-negative-hover\",\n negativeDisabled: DISABLED_FILL_NEGATIVE,\n },\n secondary: {\n default:\n \"bg-buttons-secondary-default text-content-primary not-disabled:hover:bg-buttons-secondary-hover not-disabled:active:bg-buttons-secondary-hover\",\n disabled: DISABLED_FILL,\n negative:\n \"bg-buttons-secondary-negative-default text-content-primary-inverted not-disabled:hover:bg-buttons-secondary-negative-hover not-disabled:active:bg-buttons-secondary-negative-hover\",\n negativeDisabled: DISABLED_FILL_NEGATIVE,\n },\n tertiary: {\n default:\n \"bg-transparent text-content-primary not-disabled:hover:bg-buttons-tertiary-hover not-disabled:active:bg-buttons-tertiary-hover\",\n disabled: DISABLED_TRANSPARENT,\n negative:\n \"bg-transparent text-content-primary-inverted not-disabled:hover:bg-buttons-tertiary-negative-hover not-disabled:active:bg-buttons-tertiary-negative-hover\",\n negativeDisabled: DISABLED_TRANSPARENT,\n },\n outline: {\n default:\n \"border border-buttons-outline-default bg-transparent text-content-primary not-disabled:hover:bg-buttons-outline-hover not-disabled:active:bg-buttons-outline-hover\",\n disabled: \"disabled:border-buttons-disabled-default disabled:text-content-disabled\",\n negative:\n \"border border-buttons-outline-negative-default bg-transparent text-content-primary-inverted not-disabled:hover:bg-buttons-outline-negative-hover not-disabled:active:bg-buttons-outline-negative-hover\",\n negativeDisabled: \"disabled:border-buttons-disabled-negative disabled:text-content-disabled\",\n },\n error: {\n default:\n \"bg-buttons-error-default text-content-always-white not-disabled:hover:bg-buttons-error-hover not-disabled:active:bg-buttons-error-hover\",\n disabled: DISABLED_FILL,\n },\n white: {\n default:\n \"bg-buttons-always-white-default text-content-always-black not-disabled:hover:bg-buttons-always-white-hover not-disabled:active:bg-buttons-always-white-hover\",\n disabled: DISABLED_FILL,\n },\n black: {\n default:\n \"bg-buttons-always-black-default text-content-always-white not-disabled:hover:bg-buttons-always-black-hover not-disabled:active:bg-buttons-always-black-hover\",\n disabled: DISABLED_FILL,\n },\n brand: {\n default:\n \"bg-content-always-black text-brand-primary-default hover:bg-brand-primary-default hover:text-content-always-black not-disabled:active:bg-brand-primary-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n contrast: {\n default:\n \"bg-transparent text-content-always-white hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n messaging: {\n default:\n \"bg-content-always-black text-brand-primary-default hover:bg-brand-primary-default hover:text-content-always-black not-disabled:active:bg-brand-primary-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n navTray: {\n default:\n \"bg-transparent text-content-primary hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n tertiaryDestructive: {\n default:\n \"bg-transparent text-error-content hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n stop: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted hover:bg-buttons-brand-default hover:text-content-always-black not-disabled:active:bg-buttons-brand-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n microphone: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted hover:bg-buttons-brand-default hover:text-content-always-black not-disabled:active:bg-buttons-brand-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n overlay: {\n default:\n \"bg-buttons-overlay-default text-content-always-white backdrop-blur-sm not-disabled:hover:bg-buttons-overlay-hover not-disabled:active:bg-buttons-overlay-hover\",\n disabled: DISABLED_OPACITY,\n },\n // Carries the input surface rather than a button one, so an icon-only action can\n // sit flush in a row of fields (Figma draws these as a `V2 Input Fields` instance\n // with only an icon inside). Border and hover match the Select trigger it lines up\n // with, so the row reads as one control group.\n field: {\n default:\n \"border border-border-primary bg-inputs-inputs-primary text-content-primary not-disabled:hover:border-neutral-alphas-400\",\n disabled: DISABLED_TRANSPARENT,\n },\n};\n\nfunction getVariantClasses(variant: IconButtonVariant, negative: boolean): string {\n const classes = VARIANT_CLASSES[variant];\n const isNegative = NEGATIVE_AWARE_VARIANTS.has(variant) && negative;\n const base = (isNegative && classes.negative) || classes.default;\n const disabledClasses = (isNegative && classes.negativeDisabled) || classes.disabled;\n return cn(base, disabledClasses);\n}\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style variant of the icon button. @default \"primary\" */\n variant?: IconButtonVariant;\n /** Size of the button in pixels. @default \"40\" */\n size?: IconButtonSize;\n /** Icon element to render inside the button. */\n icon: React.ReactNode;\n /**\n * Forces the dark-surface treatment regardless of theme. Only honoured on the\n * `primary`, `secondary`, `tertiary`, and `outline` variants. @default false\n */\n negative?: boolean;\n /** When provided, displays a {@link Count} badge at the top-right corner. */\n counterValue?: number;\n}\n\n/**\n * A button containing only an icon. Use when an action can be represented by an\n * icon alone (e.g. close, send). Always pair with an `aria-label` for\n * accessibility.\n *\n * Shape is size-driven for the standard variants and `overlay`: the `24` size is\n * squared (`rounded-xs`), every larger size is circular. Bespoke variants (`brand`,\n * `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop`,\n * `microphone`) stay circular at all sizes. `field` is the exception that is\n * never circular — it takes the inputs' `rounded-sm` so it matches the fields it\n * sits beside. Use it at `32`, `40` or `48`: those are the sizes `Select` offers,\n * and the variant only earns its surface when it lines up with one.\n *\n * @example\n * ```tsx\n * <IconButton icon={<CloseIcon />} aria-label=\"Close\" variant=\"tertiary\" />\n * ```\n */\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"40\",\n icon,\n counterValue,\n negative = false,\n disabled = false,\n ...props\n },\n ref,\n ) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!props[\"aria-label\"] && !props[\"aria-labelledby\"] && !props.title) {\n console.warn(\n \"IconButton: No accessible name provided. Add an `aria-label`, `aria-labelledby`, or `title` prop so screen readers can announce this button.\",\n );\n }\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-testid=\"icon-button\"\n disabled={disabled}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center focus-visible:outline-none\",\n \"cursor-pointer transition-all duration-150 ease-in-out disabled:cursor-default\",\n \"focus-visible:shadow-focus-ring\",\n // `field` takes the inputs' radius at every size so it lines up with the\n // fields around it; everything else keeps the existing size-driven shape.\n variant === \"field\"\n ? \"rounded-sm\"\n : SIZE_DRIVEN_SHAPE_VARIANTS.has(variant) && size === \"24\"\n ? \"rounded-xs\"\n : \"rounded-full\",\n sizeVariants[size],\n getVariantClasses(variant, negative),\n className,\n )}\n {...props}\n >\n <span\n className={cn(\"flex shrink-0 items-center justify-center\", iconSizeVariants[size])}\n aria-hidden=\"true\"\n >\n {/* A button sizes its own icon, so a menu row's icon defaults stop here. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {icon}\n </IconDefaultsContext.Provider>\n </span>\n\n {counterValue !== undefined && (\n <Count\n value={counterValue}\n variant=\"alert\"\n size={countSizeMap[size]}\n className=\"absolute -top-0.5 -right-0.5\"\n />\n )}\n </button>\n );\n },\n);\n\nIconButton.displayName = \"IconButton\";\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"IconButton.mjs","sources":["../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { Count, type CountSize } from \"../Count/Count\";\nimport { IconDefaultsContext, NO_ICON_DEFAULTS } from \"../Icons/IconDefaults\";\n\n/**\n * Visual style variant of the icon button.\n *\n * `primary`, `secondary`, `tertiary`, `outline`, `error`, `white` and `black`\n * use the shared button colour tokens and a size-driven shape (squared at the\n * `24` size, circular otherwise). Of these, `primary`, `secondary`, `tertiary`\n * and `outline` also honour the {@link IconButtonProps.negative} prop, as does\n * `upsell`, which takes the other theme's glow.\n *\n * `upsell` is the Figma \"Upsell\" icon button and matches `Button`'s `brand`\n * variant: a green radial fill, a green glow and a highlight that circles the\n * rim once, held still when the user prefers reduced motion. It takes the same\n * size-driven shape as the standard variants.\n *\n * `overlay` is a translucent dark fill with a backdrop blur, for buttons that sit\n * on photos or video. Its fill and icon look the same in light and dark themes, while\n * the keyboard focus ring still follows the theme. It takes the same size-driven\n * shape as the standard variants.\n *\n * `brand`, `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop` and\n * `microphone` are bespoke variants that stay circular at every size.\n */\nexport type IconButtonVariant =\n | \"primary\"\n | \"secondary\"\n | \"tertiary\"\n | \"outline\"\n | \"error\"\n | \"white\"\n | \"black\"\n | \"brand\"\n | \"upsell\"\n | \"contrast\"\n | \"messaging\"\n | \"navTray\"\n | \"tertiaryDestructive\"\n | \"stop\"\n | \"microphone\"\n | \"overlay\"\n | \"field\";\n\n/** Icon button size in pixels. */\nexport type IconButtonSize = \"24\" | \"32\" | \"40\" | \"48\" | \"52\" | \"72\";\n\nconst iconSizeVariants: Record<IconButtonSize, string> = {\n 24: \"[&>svg]:size-4\",\n 32: \"[&>svg]:size-4\",\n 40: \"[&>svg]:size-4\",\n 48: \"[&>svg]:size-6\",\n 52: \"[&>svg]:size-7\",\n 72: \"[&>svg]:size-8\",\n};\n\nconst sizeVariants: Record<IconButtonSize, string> = {\n 24: \"size-6 p-1\",\n 32: \"size-8 p-1.5\",\n 40: \"size-10 p-[10px]\",\n 48: \"size-12 p-3\",\n 52: \"size-[52px] p-2\",\n 72: \"size-[72px] p-4\",\n};\n\nconst countSizeMap: Record<IconButtonSize, CountSize> = {\n 24: \"16\",\n 32: \"24\",\n 40: \"32\",\n 48: \"32\",\n 52: \"32\",\n 72: \"32\",\n};\n\n/**\n * Variants whose corner radius is size-driven (see {@link IconButton}): the `24`\n * size is squared (`rounded-xs`), every larger size stays circular. All other\n * variants are circular at every size.\n */\nconst SIZE_DRIVEN_SHAPE_VARIANTS = new Set<IconButtonVariant>([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"outline\",\n \"error\",\n \"white\",\n \"black\",\n \"upsell\",\n \"overlay\",\n]);\n\n/** Variants that honour the `negative` (dark-surface) treatment. */\nconst NEGATIVE_AWARE_VARIANTS = new Set<IconButtonVariant>([\n \"primary\",\n \"secondary\",\n \"tertiary\",\n \"outline\",\n \"upsell\",\n]);\n\nconst DISABLED_FILL = \"disabled:bg-buttons-disabled-default disabled:text-content-disabled\";\nconst DISABLED_FILL_NEGATIVE =\n \"disabled:bg-buttons-disabled-negative disabled:text-content-disabled\";\nconst UPSELL =\n \"fv-upsell fv-upsell-shine bg-buttons-brand-default text-content-always-black not-disabled:hover:[--fv-upsell-end:var(--color-buttons-brand-hover)] not-disabled:active:[--fv-upsell-end:var(--color-buttons-brand-hover)]\";\nconst DISABLED_TRANSPARENT = \"disabled:text-content-disabled\";\nconst DISABLED_OPACITY = \"disabled:opacity-50\";\n\ntype VariantClasses = {\n default: string;\n disabled: string;\n negative?: string;\n negativeDisabled?: string;\n};\n\n/**\n * Icon button styling for every variant. The disabled treatment is expressed\n * with the CSS `disabled:` variant (not the `disabled` prop) so an ancestor\n * `<fieldset disabled>` is styled too; hover is guarded with `not-disabled:` so\n * it never fights the disabled state.\n */\nconst VARIANT_CLASSES: Record<IconButtonVariant, VariantClasses> = {\n primary: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted not-disabled:hover:bg-buttons-primary-hover not-disabled:active:bg-buttons-primary-hover\",\n disabled: DISABLED_FILL,\n negative:\n \"bg-buttons-primary-negative-default text-content-primary not-disabled:hover:bg-buttons-primary-negative-hover not-disabled:active:bg-buttons-primary-negative-hover\",\n negativeDisabled: DISABLED_FILL_NEGATIVE,\n },\n secondary: {\n default:\n \"bg-buttons-secondary-default text-content-primary not-disabled:hover:bg-buttons-secondary-hover not-disabled:active:bg-buttons-secondary-hover\",\n disabled: DISABLED_FILL,\n negative:\n \"bg-buttons-secondary-negative-default text-content-primary-inverted not-disabled:hover:bg-buttons-secondary-negative-hover not-disabled:active:bg-buttons-secondary-negative-hover\",\n negativeDisabled: DISABLED_FILL_NEGATIVE,\n },\n tertiary: {\n default:\n \"bg-transparent text-content-primary not-disabled:hover:bg-buttons-tertiary-hover not-disabled:active:bg-buttons-tertiary-hover\",\n disabled: DISABLED_TRANSPARENT,\n negative:\n \"bg-transparent text-content-primary-inverted not-disabled:hover:bg-buttons-tertiary-negative-hover not-disabled:active:bg-buttons-tertiary-negative-hover\",\n negativeDisabled: DISABLED_TRANSPARENT,\n },\n outline: {\n default:\n \"border border-buttons-outline-default bg-transparent text-content-primary not-disabled:hover:bg-buttons-outline-hover not-disabled:active:bg-buttons-outline-hover\",\n disabled: \"disabled:border-buttons-disabled-default disabled:text-content-disabled\",\n negative:\n \"border border-buttons-outline-negative-default bg-transparent text-content-primary-inverted not-disabled:hover:bg-buttons-outline-negative-hover not-disabled:active:bg-buttons-outline-negative-hover\",\n negativeDisabled: \"disabled:border-buttons-disabled-negative disabled:text-content-disabled\",\n },\n error: {\n default:\n \"bg-buttons-error-default text-content-always-white not-disabled:hover:bg-buttons-error-hover not-disabled:active:bg-buttons-error-hover\",\n disabled: DISABLED_FILL,\n },\n white: {\n default:\n \"bg-buttons-always-white-default text-content-always-black not-disabled:hover:bg-buttons-always-white-hover not-disabled:active:bg-buttons-always-white-hover\",\n disabled: DISABLED_FILL,\n },\n black: {\n default:\n \"bg-buttons-always-black-default text-content-always-white not-disabled:hover:bg-buttons-always-black-hover not-disabled:active:bg-buttons-always-black-hover\",\n disabled: DISABLED_FILL,\n },\n brand: {\n default:\n \"bg-content-always-black text-brand-primary-default hover:bg-brand-primary-default hover:text-content-always-black not-disabled:active:bg-brand-primary-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n upsell: {\n default: UPSELL,\n negative: `${UPSELL} fv-upsell-negative`,\n disabled: DISABLED_FILL,\n negativeDisabled: DISABLED_FILL_NEGATIVE,\n },\n contrast: {\n default:\n \"bg-transparent text-content-always-white hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n messaging: {\n default:\n \"bg-content-always-black text-brand-primary-default hover:bg-brand-primary-default hover:text-content-always-black not-disabled:active:bg-brand-primary-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n navTray: {\n default:\n \"bg-transparent text-content-primary hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n tertiaryDestructive: {\n default:\n \"bg-transparent text-error-content hover:bg-brand-primary-muted not-disabled:active:bg-brand-primary-muted\",\n disabled: DISABLED_OPACITY,\n },\n stop: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted hover:bg-buttons-brand-default hover:text-content-always-black not-disabled:active:bg-buttons-brand-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n microphone: {\n default:\n \"bg-buttons-primary-default text-content-primary-inverted hover:bg-buttons-brand-default hover:text-content-always-black not-disabled:active:bg-buttons-brand-default not-disabled:active:text-content-always-black\",\n disabled: DISABLED_OPACITY,\n },\n overlay: {\n default:\n \"bg-buttons-overlay-default text-content-always-white backdrop-blur-sm not-disabled:hover:bg-buttons-overlay-hover not-disabled:active:bg-buttons-overlay-hover\",\n disabled: DISABLED_OPACITY,\n },\n // Carries the input surface rather than a button one, so an icon-only action can\n // sit flush in a row of fields (Figma draws these as a `V2 Input Fields` instance\n // with only an icon inside). Border and hover match the Select trigger it lines up\n // with, so the row reads as one control group.\n field: {\n default:\n \"border border-border-primary bg-inputs-inputs-primary text-content-primary not-disabled:hover:border-neutral-alphas-400\",\n disabled: DISABLED_TRANSPARENT,\n },\n};\n\nfunction getVariantClasses(variant: IconButtonVariant, negative: boolean): string {\n const classes = VARIANT_CLASSES[variant];\n const isNegative = NEGATIVE_AWARE_VARIANTS.has(variant) && negative;\n const base = (isNegative && classes.negative) || classes.default;\n const disabledClasses = (isNegative && classes.negativeDisabled) || classes.disabled;\n return cn(base, disabledClasses);\n}\n\nexport interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n /** Visual style variant of the icon button. @default \"primary\" */\n variant?: IconButtonVariant;\n /** Size of the button in pixels. @default \"40\" */\n size?: IconButtonSize;\n /** Icon element to render inside the button. */\n icon: React.ReactNode;\n /**\n * Forces the dark-surface treatment regardless of theme. Only honoured on the\n * `primary`, `secondary`, `tertiary`, and `outline` variants. @default false\n */\n negative?: boolean;\n /** When provided, displays a {@link Count} badge at the top-right corner. */\n counterValue?: number;\n}\n\n/**\n * A button containing only an icon. Use when an action can be represented by an\n * icon alone (e.g. close, send). Always pair with an `aria-label` for\n * accessibility.\n *\n * Shape is size-driven for the standard variants, `upsell` and `overlay`: the `24` size is\n * squared (`rounded-xs`), every larger size is circular. Bespoke variants (`brand`,\n * `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop`,\n * `microphone`) stay circular at all sizes. `field` is the exception that is\n * never circular — it takes the inputs' `rounded-sm` so it matches the fields it\n * sits beside. Use it at `32`, `40` or `48`: those are the sizes `Select` offers,\n * and the variant only earns its surface when it lines up with one.\n *\n * @example\n * ```tsx\n * <IconButton icon={<CloseIcon />} aria-label=\"Close\" variant=\"tertiary\" />\n * ```\n */\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (\n {\n className,\n variant = \"primary\",\n size = \"40\",\n icon,\n counterValue,\n negative = false,\n disabled = false,\n ...props\n },\n ref,\n ) => {\n if (process.env.NODE_ENV !== \"production\") {\n if (!props[\"aria-label\"] && !props[\"aria-labelledby\"] && !props.title) {\n console.warn(\n \"IconButton: No accessible name provided. Add an `aria-label`, `aria-labelledby`, or `title` prop so screen readers can announce this button.\",\n );\n }\n }\n\n return (\n <button\n ref={ref}\n type=\"button\"\n data-testid=\"icon-button\"\n disabled={disabled}\n className={cn(\n \"relative inline-flex shrink-0 items-center justify-center focus-visible:outline-none\",\n \"cursor-pointer transition-all duration-150 ease-in-out disabled:cursor-default\",\n \"focus-visible:shadow-focus-ring\",\n // `field` takes the inputs' radius at every size so it lines up with the\n // fields around it; everything else keeps the existing size-driven shape.\n variant === \"field\"\n ? \"rounded-sm\"\n : SIZE_DRIVEN_SHAPE_VARIANTS.has(variant) && size === \"24\"\n ? \"rounded-xs\"\n : \"rounded-full\",\n sizeVariants[size],\n getVariantClasses(variant, negative),\n className,\n )}\n {...props}\n >\n <span\n className={cn(\"flex shrink-0 items-center justify-center\", iconSizeVariants[size])}\n aria-hidden=\"true\"\n >\n {/* A button sizes its own icon, so a menu row's icon defaults stop here. */}\n <IconDefaultsContext.Provider value={NO_ICON_DEFAULTS}>\n {icon}\n </IconDefaultsContext.Provider>\n </span>\n\n {counterValue !== undefined && (\n <Count\n value={counterValue}\n variant=\"alert\"\n size={countSizeMap[size]}\n className=\"absolute -top-0.5 -right-0.5 z-10\"\n />\n )}\n </button>\n );\n },\n);\n\nIconButton.displayName = \"IconButton\";\n"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { BaseIcon } from "./BaseIcon.mjs";
|
|
5
|
+
const VARIANTS = {
|
|
6
|
+
16: {
|
|
7
|
+
outlined: [
|
|
8
|
+
{
|
|
9
|
+
d: "M10 15.167H6C2.38 15.167.833 13.62.833 10V6C.833 2.38 2.38.833 6 .833h3.333c.274 0 .5.227.5.5 0 .274-.226.5-.5.5H6C2.927 1.833 1.833 2.927 1.833 6v4c0 3.073 1.094 4.167 4.167 4.167h4c3.073 0 4.167-1.094 4.167-4.167V6.667c0-.274.226-.5.5-.5.273 0 .5.226.5.5V10c0 3.62-1.547 5.167-5.167 5.167"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
d: "M14.667 7.167H12C9.72 7.167 8.833 6.28 8.833 4V1.333c0-.2.12-.386.307-.46.187-.08.4-.033.547.107l5.333 5.333a.502.502 0 0 1-.353.854M9.833 2.54V4c0 1.72.447 2.167 2.167 2.167h1.46zM8.667 9.167h-4a.504.504 0 0 1-.5-.5c0-.274.226-.5.5-.5h4c.273 0 .5.226.5.5 0 .273-.227.5-.5.5m-1.334 2.666H4.667a.504.504 0 0 1-.5-.5c0-.273.226-.5.5-.5h2.666c.274 0 .5.227.5.5 0 .274-.226.5-.5.5"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
filled: [
|
|
16
|
+
{
|
|
17
|
+
d: "M10.667 1.333H5.333C3 1.333 2 2.667 2 4.667v6.666c0 2 1 3.334 3.333 3.334h5.334C13 14.667 14 13.333 14 11.333V4.667c0-2-1-3.334-3.333-3.334M5.333 8.167H8c.273 0 .5.226.5.5 0 .273-.227.5-.5.5H5.333a.504.504 0 0 1-.5-.5c0-.274.227-.5.5-.5m5.334 3.666H5.333a.504.504 0 0 1-.5-.5c0-.273.227-.5.5-.5h5.334c.273 0 .5.227.5.5 0 .274-.227.5-.5.5m1.666-5.666H11a1.83 1.83 0 0 1-1.833-1.834V3c0-.273.226-.5.5-.5.273 0 .5.227.5.5v1.333c0 .46.373.834.833.834h1.333c.274 0 .5.226.5.5 0 .273-.226.5-.5.5"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
24: {
|
|
22
|
+
outlined: [
|
|
23
|
+
{
|
|
24
|
+
d: "M15 22.75H9c-5.43 0-7.75-2.32-7.75-7.75V9c0-5.43 2.32-7.75 7.75-7.75h5c.41 0 .75.34.75.75s-.34.75-.75.75H9C4.39 2.75 2.75 4.39 2.75 9v6c0 4.61 1.64 6.25 6.25 6.25h6c4.61 0 6.25-1.64 6.25-6.25v-5c0-.41.34-.75.75-.75s.75.34.75.75v5c0 5.43-2.32 7.75-7.75 7.75"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
d: "M22 10.75h-4c-3.42 0-4.75-1.33-4.75-4.75V2c0-.3.18-.58.46-.69.28-.12.6-.05.82.16l8 8a.751.751 0 0 1-.53 1.28m-7.25-6.94V6c0 2.58.67 3.25 3.25 3.25h2.19zM13 13.75H7c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h6c.41 0 .75.34.75.75s-.34.75-.75.75m-2 4H7c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
filled: [
|
|
31
|
+
{
|
|
32
|
+
d: "M16 2H8C4.5 2 3 4 3 7v10c0 3 1.5 5 5 5h8c3.5 0 5-2 5-5V7c0-3-1.5-5-5-5M8 12.25h4c.41 0 .75.34.75.75s-.34.75-.75.75H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75m8 5.5H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75m2.5-8.5h-2c-1.52 0-2.75-1.23-2.75-2.75v-2c0-.41.34-.75.75-.75s.75.34.75.75v2c0 .69.56 1.25 1.25 1.25h2c.41 0 .75.34.75.75s-.34.75-.75.75"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
32: {
|
|
37
|
+
outlined: [
|
|
38
|
+
{
|
|
39
|
+
d: "M20 30.333h-8C4.76 30.333 1.667 27.24 1.667 20v-8C1.666 4.76 4.76 1.667 12 1.667h6.666c.547 0 1 .453 1 1s-.453 1-1 1H12c-6.147 0-8.333 2.186-8.333 8.333v8c0 6.147 2.186 8.333 8.333 8.333h8c6.147 0 8.333-2.186 8.333-8.333v-6.667c0-.546.454-1 1-1 .547 0 1 .454 1 1V20c0 7.24-3.093 10.333-10.333 10.333"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
d: "M29.333 14.334H24c-4.56 0-6.334-1.773-6.334-6.333V2.667c0-.4.24-.773.614-.92.373-.16.8-.066 1.093.214L30.04 12.627a1.002 1.002 0 0 1-.707 1.707M19.667 5.08V8c0 3.44.893 4.333 4.333 4.333h2.92zm-2.333 13.253h-8c-.547 0-1-.453-1-1s.453-1 1-1h8c.546 0 1 .454 1 1 0 .547-.454 1-1 1m-2.667 5.334H9.334c-.547 0-1-.454-1-1 0-.547.453-1 1-1h5.333c.547 0 1 .453 1 1s-.453 1-1 1"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
filled: [
|
|
46
|
+
{
|
|
47
|
+
d: "M21.333 2.667H10.667C6 2.667 4 5.333 4 9.333v13.333c0 4 2 6.667 6.667 6.667h10.666C26 29.333 28 26.667 28 22.667V9.333c0-4-2-6.666-6.667-6.666M10.667 16.333H16c.547 0 1 .454 1 1 0 .547-.453 1-1 1h-5.333c-.547 0-1-.453-1-1s.453-1 1-1m10.666 7.334H10.667c-.547 0-1-.454-1-1 0-.547.453-1 1-1h10.666c.547 0 1 .453 1 1s-.453 1-1 1m3.334-11.334H22a3.665 3.665 0 0 1-3.667-3.667V6c0-.547.454-1 1-1 .547 0 1 .453 1 1v2.666c0 .92.747 1.667 1.667 1.667h2.667c.546 0 1 .454 1 1 0 .547-.454 1-1 1"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const DocumentIcon = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseIcon, { ref, variants: VARIANTS, ...props }));
|
|
53
|
+
DocumentIcon.displayName = "DocumentIcon";
|
|
54
|
+
export {
|
|
55
|
+
DocumentIcon
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=DocumentIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DocumentIcon.mjs","sources":["../../../src/components/Icons/DocumentIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [\n {\n d: \"M10 15.167H6C2.38 15.167.833 13.62.833 10V6C.833 2.38 2.38.833 6 .833h3.333c.274 0 .5.227.5.5 0 .274-.226.5-.5.5H6C2.927 1.833 1.833 2.927 1.833 6v4c0 3.073 1.094 4.167 4.167 4.167h4c3.073 0 4.167-1.094 4.167-4.167V6.667c0-.274.226-.5.5-.5.273 0 .5.226.5.5V10c0 3.62-1.547 5.167-5.167 5.167\",\n },\n {\n d: \"M14.667 7.167H12C9.72 7.167 8.833 6.28 8.833 4V1.333c0-.2.12-.386.307-.46.187-.08.4-.033.547.107l5.333 5.333a.502.502 0 0 1-.353.854M9.833 2.54V4c0 1.72.447 2.167 2.167 2.167h1.46zM8.667 9.167h-4a.504.504 0 0 1-.5-.5c0-.274.226-.5.5-.5h4c.273 0 .5.226.5.5 0 .273-.227.5-.5.5m-1.334 2.666H4.667a.504.504 0 0 1-.5-.5c0-.273.226-.5.5-.5h2.666c.274 0 .5.227.5.5 0 .274-.226.5-.5.5\",\n },\n ],\n filled: [\n {\n d: \"M10.667 1.333H5.333C3 1.333 2 2.667 2 4.667v6.666c0 2 1 3.334 3.333 3.334h5.334C13 14.667 14 13.333 14 11.333V4.667c0-2-1-3.334-3.333-3.334M5.333 8.167H8c.273 0 .5.226.5.5 0 .273-.227.5-.5.5H5.333a.504.504 0 0 1-.5-.5c0-.274.227-.5.5-.5m5.334 3.666H5.333a.504.504 0 0 1-.5-.5c0-.273.227-.5.5-.5h5.334c.273 0 .5.227.5.5 0 .274-.227.5-.5.5m1.666-5.666H11a1.83 1.83 0 0 1-1.833-1.834V3c0-.273.226-.5.5-.5.273 0 .5.227.5.5v1.333c0 .46.373.834.833.834h1.333c.274 0 .5.226.5.5 0 .273-.226.5-.5.5\",\n },\n ],\n },\n 24: {\n outlined: [\n {\n d: \"M15 22.75H9c-5.43 0-7.75-2.32-7.75-7.75V9c0-5.43 2.32-7.75 7.75-7.75h5c.41 0 .75.34.75.75s-.34.75-.75.75H9C4.39 2.75 2.75 4.39 2.75 9v6c0 4.61 1.64 6.25 6.25 6.25h6c4.61 0 6.25-1.64 6.25-6.25v-5c0-.41.34-.75.75-.75s.75.34.75.75v5c0 5.43-2.32 7.75-7.75 7.75\",\n },\n {\n d: \"M22 10.75h-4c-3.42 0-4.75-1.33-4.75-4.75V2c0-.3.18-.58.46-.69.28-.12.6-.05.82.16l8 8a.751.751 0 0 1-.53 1.28m-7.25-6.94V6c0 2.58.67 3.25 3.25 3.25h2.19zM13 13.75H7c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h6c.41 0 .75.34.75.75s-.34.75-.75.75m-2 4H7c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h4c.41 0 .75.34.75.75s-.34.75-.75.75\",\n },\n ],\n filled: [\n {\n d: \"M16 2H8C4.5 2 3 4 3 7v10c0 3 1.5 5 5 5h8c3.5 0 5-2 5-5V7c0-3-1.5-5-5-5M8 12.25h4c.41 0 .75.34.75.75s-.34.75-.75.75H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75m8 5.5H8c-.41 0-.75-.34-.75-.75s.34-.75.75-.75h8c.41 0 .75.34.75.75s-.34.75-.75.75m2.5-8.5h-2c-1.52 0-2.75-1.23-2.75-2.75v-2c0-.41.34-.75.75-.75s.75.34.75.75v2c0 .69.56 1.25 1.25 1.25h2c.41 0 .75.34.75.75s-.34.75-.75.75\",\n },\n ],\n },\n 32: {\n outlined: [\n {\n d: \"M20 30.333h-8C4.76 30.333 1.667 27.24 1.667 20v-8C1.666 4.76 4.76 1.667 12 1.667h6.666c.547 0 1 .453 1 1s-.453 1-1 1H12c-6.147 0-8.333 2.186-8.333 8.333v8c0 6.147 2.186 8.333 8.333 8.333h8c6.147 0 8.333-2.186 8.333-8.333v-6.667c0-.546.454-1 1-1 .547 0 1 .454 1 1V20c0 7.24-3.093 10.333-10.333 10.333\",\n },\n {\n d: \"M29.333 14.334H24c-4.56 0-6.334-1.773-6.334-6.333V2.667c0-.4.24-.773.614-.92.373-.16.8-.066 1.093.214L30.04 12.627a1.002 1.002 0 0 1-.707 1.707M19.667 5.08V8c0 3.44.893 4.333 4.333 4.333h2.92zm-2.333 13.253h-8c-.547 0-1-.453-1-1s.453-1 1-1h8c.546 0 1 .454 1 1 0 .547-.454 1-1 1m-2.667 5.334H9.334c-.547 0-1-.454-1-1 0-.547.453-1 1-1h5.333c.547 0 1 .453 1 1s-.453 1-1 1\",\n },\n ],\n filled: [\n {\n d: \"M21.333 2.667H10.667C6 2.667 4 5.333 4 9.333v13.333c0 4 2 6.667 6.667 6.667h10.666C26 29.333 28 26.667 28 22.667V9.333c0-4-2-6.666-6.667-6.666M10.667 16.333H16c.547 0 1 .454 1 1 0 .547-.453 1-1 1h-5.333c-.547 0-1-.453-1-1s.453-1 1-1m10.666 7.334H10.667c-.547 0-1-.454-1-1 0-.547.453-1 1-1h10.666c.547 0 1 .453 1 1s-.453 1-1 1m3.334-11.334H22a3.665 3.665 0 0 1-3.667-3.667V6c0-.547.454-1 1-1 .547 0 1 .453 1 1v2.666c0 .92.747 1.667 1.667 1.667h2.667c.546 0 1 .454 1 1 0 .547-.454 1-1 1\",\n },\n ],\n },\n};\n\n/** Props for {@link DocumentIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type DocumentIconProps = BaseIconProps;\n\n/**\n * Document icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.\n *\n * @example\n * ```tsx\n * <DocumentIcon size={24} filled />\n * ```\n */\nexport const DocumentIcon = React.forwardRef<SVGSVGElement, DocumentIconProps>((props, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} {...props} />\n));\n\nDocumentIcon.displayName = \"DocumentIcon\";\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAEJ;AAaO,MAAM,eAAe,MAAM,WAA6C,CAAC,OAAO,QACrF,oBAAC,UAAA,EAAS,KAAU,UAAU,UAAW,GAAG,OAAO,CACpD;AAED,aAAa,cAAc;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { BaseIcon } from "./BaseIcon.mjs";
|
|
5
|
+
const VARIANTS = {
|
|
6
|
+
16: {
|
|
7
|
+
outlined: [
|
|
8
|
+
{
|
|
9
|
+
d: "M14.167 2.833a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm0 3.334a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm-7 3.333a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm2.505-.612c.57-.328 1.269-.23 1.91.139h.001l1.706.986c.643.37 1.076.928 1.076 1.587s-.432 1.217-1.075 1.587h-.001l-.852.493-.854.492v.001c-.643.37-1.342.464-1.912.136-.57-.33-.838-.981-.838-1.722v-1.974c0-.743.267-1.397.839-1.725m.161 3.699c0 .525.183.766.338.856.135.078.383.117.749-.051l.164-.085 1.706-.987c.457-.264.575-.543.575-.72 0-.178-.118-.457-.575-.72l-1.706-.987c-.458-.264-.76-.227-.914-.138-.154.088-.337.328-.337.858z"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
filled: [
|
|
13
|
+
{
|
|
14
|
+
d: "M14.167 2.833a.5.5 0 1 1 0 1H1.834a.5.5 0 1 1 0-1zm0 3.334a.5.5 0 1 1 0 1H1.834a.5.5 0 1 1 0-1zm-7 3.333a.5.5 0 0 1 0 1H1.834a.5.5 0 0 1 0-1zm2.505-.612c.57-.328 1.27-.23 1.91.139h.002l1.705.986c.643.37 1.076.928 1.076 1.587s-.432 1.217-1.075 1.587l-.853.493-.853.492-.001.001c-.643.37-1.342.464-1.912.136-.57-.33-.837-.981-.837-1.722v-1.974c0-.743.266-1.397.838-1.725"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
24: {
|
|
19
|
+
outlined: [
|
|
20
|
+
{
|
|
21
|
+
d: "M21.25 4.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm0 5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm-10.5 5a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5zm3.758-.918c.856-.492 1.904-.346 2.866.208l.001.001 2.559 1.479c.964.555 1.614 1.392 1.614 2.38 0 .987-.649 1.825-1.613 2.38h-.001l-1.279.74-1.28.739h-.001c-.964.556-2.012.697-2.867.204-.855-.494-1.257-1.472-1.257-2.583v-2.96c0-1.115.4-2.095 1.258-2.588m.242 5.548c0 .788.274 1.15.506 1.284.203.117.575.176 1.124-.076l.246-.128 2.559-1.48c.686-.395.863-.814.863-1.08 0-.268-.177-.685-.862-1.08h-.001l-2.559-1.481c-.688-.396-1.14-.34-1.371-.206-.23.132-.505.492-.505 1.287z"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
filled: [
|
|
25
|
+
{
|
|
26
|
+
d: "M21.25 4.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm0 5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm-10.5 5a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5zm3.758-.918c.856-.492 1.904-.346 2.866.208l.001.001 2.559 1.479c.964.555 1.614 1.392 1.614 2.38 0 .987-.649 1.825-1.613 2.38h-.001l-1.279.74-1.28.739h-.001c-.964.556-2.012.697-2.867.204-.855-.494-1.257-1.472-1.257-2.583v-2.96c0-1.115.4-2.095 1.258-2.588"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
32: {
|
|
31
|
+
outlined: [
|
|
32
|
+
{
|
|
33
|
+
d: "M28.333 5.667a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm0 6.666a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm-14 6.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm5.011-1.224c1.14-.656 2.538-.462 3.821.277l.002.002 3.411 1.971c1.286.74 2.152 1.856 2.152 3.173s-.865 2.434-2.15 3.175l-.002-.002-1.704.987-1.707.986-.002.001c-1.286.74-2.683.929-3.823.271s-1.675-1.962-1.675-3.444v-3.946c0-1.487.534-2.794 1.677-3.451m.322 7.397c0 1.051.366 1.534.675 1.712.271.157.767.235 1.499-.101l.328-.17 3.411-1.973.002-.002c.913-.526 1.15-1.084 1.15-1.44-.001-.356-.237-.913-1.15-1.439h-.002l-3.411-1.975c-.917-.528-1.52-.452-1.828-.275-.307.177-.674.657-.674 1.717z"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
filled: [
|
|
37
|
+
{
|
|
38
|
+
d: "M28.333 5.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm0 6.666a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm-14 6.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm5.011-1.224c1.141-.656 2.538-.462 3.821.277l.002.002 3.411 1.971c1.286.74 2.152 1.856 2.153 3.173s-.865 2.434-2.152 3.175v-.002l-1.705.987-1.707.986-.002.001c-1.285.74-2.682.929-3.822.271s-1.676-1.962-1.676-3.444v-3.946c0-1.487.534-2.794 1.677-3.451"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const EpisodesIcon = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseIcon, { ref, variants: VARIANTS, ...props }));
|
|
44
|
+
EpisodesIcon.displayName = "EpisodesIcon";
|
|
45
|
+
export {
|
|
46
|
+
EpisodesIcon
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=EpisodesIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EpisodesIcon.mjs","sources":["../../../src/components/Icons/EpisodesIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [\n {\n d: \"M14.167 2.833a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm0 3.334a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm-7 3.333a.5.5 0 0 1 0 1H1.833a.5.5 0 0 1 0-1zm2.505-.612c.57-.328 1.269-.23 1.91.139h.001l1.706.986c.643.37 1.076.928 1.076 1.587s-.432 1.217-1.075 1.587h-.001l-.852.493-.854.492v.001c-.643.37-1.342.464-1.912.136-.57-.33-.838-.981-.838-1.722v-1.974c0-.743.267-1.397.839-1.725m.161 3.699c0 .525.183.766.338.856.135.078.383.117.749-.051l.164-.085 1.706-.987c.457-.264.575-.543.575-.72 0-.178-.118-.457-.575-.72l-1.706-.987c-.458-.264-.76-.227-.914-.138-.154.088-.337.328-.337.858z\",\n },\n ],\n filled: [\n {\n d: \"M14.167 2.833a.5.5 0 1 1 0 1H1.834a.5.5 0 1 1 0-1zm0 3.334a.5.5 0 1 1 0 1H1.834a.5.5 0 1 1 0-1zm-7 3.333a.5.5 0 0 1 0 1H1.834a.5.5 0 0 1 0-1zm2.505-.612c.57-.328 1.27-.23 1.91.139h.002l1.705.986c.643.37 1.076.928 1.076 1.587s-.432 1.217-1.075 1.587l-.853.493-.853.492-.001.001c-.643.37-1.342.464-1.912.136-.57-.33-.837-.981-.837-1.722v-1.974c0-.743.266-1.397.838-1.725\",\n },\n ],\n },\n 24: {\n outlined: [\n {\n d: \"M21.25 4.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm0 5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm-10.5 5a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5zm3.758-.918c.856-.492 1.904-.346 2.866.208l.001.001 2.559 1.479c.964.555 1.614 1.392 1.614 2.38 0 .987-.649 1.825-1.613 2.38h-.001l-1.279.74-1.28.739h-.001c-.964.556-2.012.697-2.867.204-.855-.494-1.257-1.472-1.257-2.583v-2.96c0-1.115.4-2.095 1.258-2.588m.242 5.548c0 .788.274 1.15.506 1.284.203.117.575.176 1.124-.076l.246-.128 2.559-1.48c.686-.395.863-.814.863-1.08 0-.268-.177-.685-.862-1.08h-.001l-2.559-1.481c-.688-.396-1.14-.34-1.371-.206-.23.132-.505.492-.505 1.287z\",\n },\n ],\n filled: [\n {\n d: \"M21.25 4.25a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm0 5a.75.75 0 0 1 0 1.5H2.75a.75.75 0 0 1 0-1.5zm-10.5 5a.75.75 0 0 1 0 1.5h-8a.75.75 0 0 1 0-1.5zm3.758-.918c.856-.492 1.904-.346 2.866.208l.001.001 2.559 1.479c.964.555 1.614 1.392 1.614 2.38 0 .987-.649 1.825-1.613 2.38h-.001l-1.279.74-1.28.739h-.001c-.964.556-2.012.697-2.867.204-.855-.494-1.257-1.472-1.257-2.583v-2.96c0-1.115.4-2.095 1.258-2.588\",\n },\n ],\n },\n 32: {\n outlined: [\n {\n d: \"M28.333 5.667a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm0 6.666a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm-14 6.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm5.011-1.224c1.14-.656 2.538-.462 3.821.277l.002.002 3.411 1.971c1.286.74 2.152 1.856 2.152 3.173s-.865 2.434-2.15 3.175l-.002-.002-1.704.987-1.707.986-.002.001c-1.286.74-2.683.929-3.823.271s-1.675-1.962-1.675-3.444v-3.946c0-1.487.534-2.794 1.677-3.451m.322 7.397c0 1.051.366 1.534.675 1.712.271.157.767.235 1.499-.101l.328-.17 3.411-1.973.002-.002c.913-.526 1.15-1.084 1.15-1.44-.001-.356-.237-.913-1.15-1.439h-.002l-3.411-1.975c-.917-.528-1.52-.452-1.828-.275-.307.177-.674.657-.674 1.717z\",\n },\n ],\n filled: [\n {\n d: \"M28.333 5.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm0 6.666a1 1 0 1 1 0 2H3.667a1 1 0 0 1 0-2zm-14 6.667a1 1 0 1 1 0 2H3.667a1 1 0 1 1 0-2zm5.011-1.224c1.141-.656 2.538-.462 3.821.277l.002.002 3.411 1.971c1.286.74 2.152 1.856 2.153 3.173s-.865 2.434-2.152 3.175v-.002l-1.705.987-1.707.986-.002.001c-1.285.74-2.682.929-3.822.271s-1.676-1.962-1.676-3.444v-3.946c0-1.487.534-2.794 1.677-3.451\",\n },\n ],\n },\n};\n\n/** Props for {@link EpisodesIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type EpisodesIconProps = BaseIconProps;\n\n/**\n * Episodes icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.\n *\n * @example\n * ```tsx\n * <EpisodesIcon size={24} filled />\n * ```\n */\nexport const EpisodesIcon = React.forwardRef<SVGSVGElement, EpisodesIconProps>((props, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} {...props} />\n));\n\nEpisodesIcon.displayName = \"EpisodesIcon\";\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAEJ;AAaO,MAAM,eAAe,MAAM,WAA6C,CAAC,OAAO,QACrF,oBAAC,UAAA,EAAS,KAAU,UAAU,UAAW,GAAG,OAAO,CACpD;AAED,aAAa,cAAc;"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { BaseIcon } from "./BaseIcon.mjs";
|
|
5
|
+
const VARIANTS = {
|
|
6
|
+
16: {
|
|
7
|
+
outlined: [
|
|
8
|
+
{
|
|
9
|
+
d: "M13.833 4.667v6.666c0 2.294-1.54 3.834-3.833 3.834H6c-2.293 0-3.833-1.54-3.833-3.834V4.667C2.167 2.373 3.707.833 6 .833h4c2.293 0 3.833 1.54 3.833 3.834M3.167 11.333c0 1.72 1.113 2.834 2.833 2.834h4c1.72 0 2.833-1.114 2.833-2.834V4.667c0-1.72-1.113-2.834-2.833-2.834H6c-1.72 0-2.833 1.114-2.833 2.834z"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
d: "M7.06 10.353c-.193 0-.38-.047-.546-.14-.387-.22-.614-.667-.614-1.22V7.019c0-.553.22-1 .614-1.22.386-.22.886-.18 1.36.107l1.646.987c.454.273.713.68.713 1.113s-.26.84-.713 1.113l-1.647.987c-.273.16-.553.247-.813.247m0-3.707A.13.13 0 0 0 7 6.66c-.047.027-.1.147-.1.354v1.973c0 .2.053.32.1.353.053.027.18.014.354-.093L9 8.26c.167-.1.227-.2.227-.26s-.06-.153-.227-.26l-1.646-.986a.63.63 0 0 0-.294-.107"
|
|
13
|
+
}
|
|
14
|
+
],
|
|
15
|
+
filled: [
|
|
16
|
+
{
|
|
17
|
+
d: "M2.667 4.667v6.666c0 2 1.333 3.334 3.333 3.334h4c2 0 3.333-1.334 3.333-3.334V4.667c0-2-1.333-3.334-3.333-3.334H6c-2 0-3.333 1.334-3.333 3.334m6.522 3.955-1.646.987c-.667.4-1.214.093-1.214-.687v-1.98c0-.78.547-1.086 1.214-.686l1.646.986c.634.387.634 1 0 1.38"
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
24: {
|
|
22
|
+
outlined: [
|
|
23
|
+
{
|
|
24
|
+
d: "M20.75 7v10c0 3.44-2.31 5.75-5.75 5.75H9c-3.44 0-5.75-2.31-5.75-5.75V7c0-3.44 2.31-5.75 5.75-5.75h6c3.44 0 5.75 2.31 5.75 5.75m-16 10c0 2.58 1.67 4.25 4.25 4.25h6c2.58 0 4.25-1.67 4.25-4.25V7c0-2.58-1.67-4.25-4.25-4.25H9C6.42 2.75 4.75 4.42 4.75 7z"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
d: "M10.59 15.53c-.29 0-.57-.07-.82-.21-.58-.33-.92-1-.92-1.83v-2.96c0-.83.33-1.5.92-1.83.58-.33 1.33-.27 2.04.16l2.47 1.48c.68.41 1.07 1.02 1.07 1.67s-.39 1.26-1.07 1.67l-2.47 1.48c-.41.24-.83.37-1.22.37m0-5.56a.2.2 0 0 0-.09.02c-.07.04-.15.22-.15.53v2.96c0 .3.08.48.15.53.08.04.27.02.53-.14l2.47-1.48c.25-.15.34-.3.34-.39s-.09-.23-.34-.39l-2.47-1.48c-.18-.11-.34-.16-.44-.16"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
filled: [
|
|
31
|
+
{
|
|
32
|
+
d: "M4 7v10c0 3 2 5 5 5h6c3 0 5-2 5-5V7c0-3-2-5-5-5H9C6 2 4 4 4 7m9.784 5.934-2.47 1.48c-1 .6-1.82.14-1.82-1.03v-2.97c0-1.17.82-1.63 1.82-1.03l2.47 1.48c.95.58.95 1.5 0 2.07"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
32: {
|
|
37
|
+
outlined: [
|
|
38
|
+
{
|
|
39
|
+
d: "M27.667 9.333v13.334c0 4.586-3.08 7.666-7.667 7.666h-8c-4.587 0-7.667-3.08-7.667-7.666V9.333c0-4.586 3.08-7.666 7.667-7.666h8c4.587 0 7.667 3.08 7.667 7.666M6.333 22.667c0 3.44 2.227 5.666 5.667 5.666h8c3.44 0 5.667-2.226 5.667-5.666V9.333c0-3.44-2.227-5.666-5.667-5.666h-8c-3.44 0-5.667 2.226-5.667 5.666z"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
d: "M14.12 20.706c-.387 0-.76-.094-1.093-.28-.774-.44-1.227-1.334-1.227-2.44v-3.947c0-1.107.44-2 1.227-2.44.773-.44 1.773-.36 2.72.213l3.293 1.974c.907.546 1.427 1.36 1.427 2.226 0 .867-.52 1.68-1.427 2.227l-3.293 1.973c-.547.32-1.107.494-1.627.494m0-7.414a.3.3 0 0 0-.12.027c-.093.053-.2.293-.2.707v3.946c0 .4.107.64.2.707.107.053.36.027.707-.187L18 16.52c.333-.2.453-.4.453-.52s-.12-.307-.453-.52l-3.293-1.973c-.24-.147-.454-.214-.587-.214"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
filled: [
|
|
46
|
+
{
|
|
47
|
+
d: "M5.334 9.333v13.334c0 4 2.666 6.666 6.666 6.666h8c4 0 6.667-2.666 6.667-6.666V9.333c0-4-2.667-6.666-6.667-6.666h-8c-4 0-6.666 2.666-6.666 6.666m13.045 7.912-3.294 1.973c-1.333.8-2.427.187-2.427-1.373v-3.96c0-1.56 1.094-2.173 2.427-1.373l3.293 1.973c1.267.773 1.267 2 0 2.76"
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const ShortsIcon = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(BaseIcon, { ref, variants: VARIANTS, ...props }));
|
|
53
|
+
ShortsIcon.displayName = "ShortsIcon";
|
|
54
|
+
export {
|
|
55
|
+
ShortsIcon
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=ShortsIcon.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShortsIcon.mjs","sources":["../../../src/components/Icons/ShortsIcon.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { BaseIcon } from \"./BaseIcon\";\nimport type { BaseIconProps, IconVariants } from \"./types\";\n\nconst VARIANTS: IconVariants = {\n 16: {\n outlined: [\n {\n d: \"M13.833 4.667v6.666c0 2.294-1.54 3.834-3.833 3.834H6c-2.293 0-3.833-1.54-3.833-3.834V4.667C2.167 2.373 3.707.833 6 .833h4c2.293 0 3.833 1.54 3.833 3.834M3.167 11.333c0 1.72 1.113 2.834 2.833 2.834h4c1.72 0 2.833-1.114 2.833-2.834V4.667c0-1.72-1.113-2.834-2.833-2.834H6c-1.72 0-2.833 1.114-2.833 2.834z\",\n },\n {\n d: \"M7.06 10.353c-.193 0-.38-.047-.546-.14-.387-.22-.614-.667-.614-1.22V7.019c0-.553.22-1 .614-1.22.386-.22.886-.18 1.36.107l1.646.987c.454.273.713.68.713 1.113s-.26.84-.713 1.113l-1.647.987c-.273.16-.553.247-.813.247m0-3.707A.13.13 0 0 0 7 6.66c-.047.027-.1.147-.1.354v1.973c0 .2.053.32.1.353.053.027.18.014.354-.093L9 8.26c.167-.1.227-.2.227-.26s-.06-.153-.227-.26l-1.646-.986a.63.63 0 0 0-.294-.107\",\n },\n ],\n filled: [\n {\n d: \"M2.667 4.667v6.666c0 2 1.333 3.334 3.333 3.334h4c2 0 3.333-1.334 3.333-3.334V4.667c0-2-1.333-3.334-3.333-3.334H6c-2 0-3.333 1.334-3.333 3.334m6.522 3.955-1.646.987c-.667.4-1.214.093-1.214-.687v-1.98c0-.78.547-1.086 1.214-.686l1.646.986c.634.387.634 1 0 1.38\",\n },\n ],\n },\n 24: {\n outlined: [\n {\n d: \"M20.75 7v10c0 3.44-2.31 5.75-5.75 5.75H9c-3.44 0-5.75-2.31-5.75-5.75V7c0-3.44 2.31-5.75 5.75-5.75h6c3.44 0 5.75 2.31 5.75 5.75m-16 10c0 2.58 1.67 4.25 4.25 4.25h6c2.58 0 4.25-1.67 4.25-4.25V7c0-2.58-1.67-4.25-4.25-4.25H9C6.42 2.75 4.75 4.42 4.75 7z\",\n },\n {\n d: \"M10.59 15.53c-.29 0-.57-.07-.82-.21-.58-.33-.92-1-.92-1.83v-2.96c0-.83.33-1.5.92-1.83.58-.33 1.33-.27 2.04.16l2.47 1.48c.68.41 1.07 1.02 1.07 1.67s-.39 1.26-1.07 1.67l-2.47 1.48c-.41.24-.83.37-1.22.37m0-5.56a.2.2 0 0 0-.09.02c-.07.04-.15.22-.15.53v2.96c0 .3.08.48.15.53.08.04.27.02.53-.14l2.47-1.48c.25-.15.34-.3.34-.39s-.09-.23-.34-.39l-2.47-1.48c-.18-.11-.34-.16-.44-.16\",\n },\n ],\n filled: [\n {\n d: \"M4 7v10c0 3 2 5 5 5h6c3 0 5-2 5-5V7c0-3-2-5-5-5H9C6 2 4 4 4 7m9.784 5.934-2.47 1.48c-1 .6-1.82.14-1.82-1.03v-2.97c0-1.17.82-1.63 1.82-1.03l2.47 1.48c.95.58.95 1.5 0 2.07\",\n },\n ],\n },\n 32: {\n outlined: [\n {\n d: \"M27.667 9.333v13.334c0 4.586-3.08 7.666-7.667 7.666h-8c-4.587 0-7.667-3.08-7.667-7.666V9.333c0-4.586 3.08-7.666 7.667-7.666h8c4.587 0 7.667 3.08 7.667 7.666M6.333 22.667c0 3.44 2.227 5.666 5.667 5.666h8c3.44 0 5.667-2.226 5.667-5.666V9.333c0-3.44-2.227-5.666-5.667-5.666h-8c-3.44 0-5.667 2.226-5.667 5.666z\",\n },\n {\n d: \"M14.12 20.706c-.387 0-.76-.094-1.093-.28-.774-.44-1.227-1.334-1.227-2.44v-3.947c0-1.107.44-2 1.227-2.44.773-.44 1.773-.36 2.72.213l3.293 1.974c.907.546 1.427 1.36 1.427 2.226 0 .867-.52 1.68-1.427 2.227l-3.293 1.973c-.547.32-1.107.494-1.627.494m0-7.414a.3.3 0 0 0-.12.027c-.093.053-.2.293-.2.707v3.946c0 .4.107.64.2.707.107.053.36.027.707-.187L18 16.52c.333-.2.453-.4.453-.52s-.12-.307-.453-.52l-3.293-1.973c-.24-.147-.454-.214-.587-.214\",\n },\n ],\n filled: [\n {\n d: \"M5.334 9.333v13.334c0 4 2.666 6.666 6.666 6.666h8c4 0 6.667-2.666 6.667-6.666V9.333c0-4-2.667-6.666-6.667-6.666h-8c-4 0-6.666 2.666-6.666 6.666m13.045 7.912-3.294 1.973c-1.333.8-2.427.187-2.427-1.373v-3.96c0-1.56 1.094-2.173 2.427-1.373l3.293 1.973c1.267.773 1.267 2 0 2.76\",\n },\n ],\n },\n};\n\n/** Props for {@link ShortsIcon}. See {@link BaseIconProps} for the shared shape. */\nexport type ShortsIconProps = BaseIconProps;\n\n/**\n * Shorts icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.\n *\n * @example\n * ```tsx\n * <ShortsIcon size={24} filled />\n * ```\n */\nexport const ShortsIcon = React.forwardRef<SVGSVGElement, ShortsIconProps>((props, ref) => (\n <BaseIcon ref={ref} variants={VARIANTS} {...props} />\n));\n\nShortsIcon.displayName = \"ShortsIcon\";\n"],"names":[],"mappings":";;;;AAIA,MAAM,WAAyB;AAAA,EAC7B,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAAA,EAEF,IAAI;AAAA,IACF,UAAU;AAAA,MACR;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,MAEL;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,IAEF,QAAQ;AAAA,MACN;AAAA,QACE,GAAG;AAAA,MAAA;AAAA,IACL;AAAA,EACF;AAEJ;AAaO,MAAM,aAAa,MAAM,WAA2C,CAAC,OAAO,QACjF,oBAAC,UAAA,EAAS,KAAU,UAAU,UAAW,GAAG,OAAO,CACpD;AAED,WAAW,cAAc;"}
|
|
@@ -10,7 +10,7 @@ const InfoBox = PopoverPrimitive.Root;
|
|
|
10
10
|
const InfoBoxTrigger = React.forwardRef((props, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Trigger, { ref, ...useSuppressClickAfterDrag(props) }));
|
|
11
11
|
InfoBoxTrigger.displayName = "InfoBoxTrigger";
|
|
12
12
|
const ACTION_CLASSES = {
|
|
13
|
-
brand: "
|
|
13
|
+
brand: "",
|
|
14
14
|
tertiary: "text-content-primary-inverted hover:text-content-primary-inverted hover:bg-content-primary-inverted/10"
|
|
15
15
|
};
|
|
16
16
|
const ActionButton = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfoBox.mjs","sources":["../../../src/components/InfoBox/InfoBox.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"../../utils/floatingContentCollisionPadding\";\nimport { useSuppressClickAfterDrag } from \"../../utils/useSuppressClickAfterDrag\";\nimport { Button } from \"../Button/Button\";\n\n/** Props for the {@link InfoBox} root component. */\nexport interface InfoBoxProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\n/** Root component that manages open/close state for an info box. */\nexport const InfoBox = PopoverPrimitive.Root;\n\n/** Props for the {@link InfoBoxTrigger} component. */\nexport type InfoBoxTriggerProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;\n\n/**\n * The element that triggers the info box on click.\n *\n * On touch / pen, a press-and-release that crosses a small movement threshold\n * is treated as a drag and the resulting synthetic click is suppressed —\n * defends against Android Chrome opening the popover on a scroll-drag-end.\n */\nexport const InfoBoxTrigger = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Trigger>,\n InfoBoxTriggerProps\n>((props, ref) => <PopoverPrimitive.Trigger ref={ref} {...useSuppressClickAfterDrag(props)} />);\nInfoBoxTrigger.displayName = \"InfoBoxTrigger\";\n\n/** Action button with a label and click handler. */\ninterface InfoBoxButtonAction {\n label: string;\n onClick?: () => void;\n}\n\n/** Custom element rendered in place of the default action button. */\ninterface InfoBoxElementAction {\n element: React.ReactNode;\n}\n\n/** Action configuration for {@link InfoBoxContent}. */\nexport type InfoBoxAction = InfoBoxButtonAction | InfoBoxElementAction;\n\nexport interface InfoBoxContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {\n /** Whether to show the directional arrow pointer. @default true */\n showArrow?: boolean;\n /** Heading text rendered at the top of the info box. */\n heading?: React.ReactNode;\n /** Icon element displayed to the left of the heading. */\n icon?: React.ReactNode;\n /** Pill or badge element displayed to the right of the heading. */\n pill?: React.ReactNode;\n /** Primary action button (brand green). */\n primaryAction?: InfoBoxAction;\n /** Secondary action button (ghost). */\n secondaryAction?: InfoBoxAction;\n}\n\nconst ACTION_CLASSES: Record<\"brand\" | \"tertiary\", string> = {\n brand: \"
|
|
1
|
+
{"version":3,"file":"InfoBox.mjs","sources":["../../../src/components/InfoBox/InfoBox.tsx"],"sourcesContent":["import * as PopoverPrimitive from \"@radix-ui/react-popover\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\nimport { FLOATING_CONTENT_COLLISION_PADDING } from \"../../utils/floatingContentCollisionPadding\";\nimport { useSuppressClickAfterDrag } from \"../../utils/useSuppressClickAfterDrag\";\nimport { Button } from \"../Button/Button\";\n\n/** Props for the {@link InfoBox} root component. */\nexport interface InfoBoxProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Root> {\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n defaultOpen?: boolean;\n}\n\n/** Root component that manages open/close state for an info box. */\nexport const InfoBox = PopoverPrimitive.Root;\n\n/** Props for the {@link InfoBoxTrigger} component. */\nexport type InfoBoxTriggerProps = React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Trigger>;\n\n/**\n * The element that triggers the info box on click.\n *\n * On touch / pen, a press-and-release that crosses a small movement threshold\n * is treated as a drag and the resulting synthetic click is suppressed —\n * defends against Android Chrome opening the popover on a scroll-drag-end.\n */\nexport const InfoBoxTrigger = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Trigger>,\n InfoBoxTriggerProps\n>((props, ref) => <PopoverPrimitive.Trigger ref={ref} {...useSuppressClickAfterDrag(props)} />);\nInfoBoxTrigger.displayName = \"InfoBoxTrigger\";\n\n/** Action button with a label and click handler. */\ninterface InfoBoxButtonAction {\n label: string;\n onClick?: () => void;\n}\n\n/** Custom element rendered in place of the default action button. */\ninterface InfoBoxElementAction {\n element: React.ReactNode;\n}\n\n/** Action configuration for {@link InfoBoxContent}. */\nexport type InfoBoxAction = InfoBoxButtonAction | InfoBoxElementAction;\n\nexport interface InfoBoxContentProps\n extends React.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {\n /** Whether to show the directional arrow pointer. @default true */\n showArrow?: boolean;\n /** Heading text rendered at the top of the info box. */\n heading?: React.ReactNode;\n /** Icon element displayed to the left of the heading. */\n icon?: React.ReactNode;\n /** Pill or badge element displayed to the right of the heading. */\n pill?: React.ReactNode;\n /** Primary action button (brand green). */\n primaryAction?: InfoBoxAction;\n /** Secondary action button (ghost). */\n secondaryAction?: InfoBoxAction;\n}\n\nconst ACTION_CLASSES: Record<\"brand\" | \"tertiary\", string> = {\n brand: \"\",\n tertiary:\n \"text-content-primary-inverted hover:text-content-primary-inverted hover:bg-content-primary-inverted/10\",\n};\n\nconst ActionButton = ({\n action,\n variant,\n}: {\n action: InfoBoxAction;\n variant: \"brand\" | \"tertiary\";\n}) =>\n \"element\" in action ? (\n action.element\n ) : (\n <Button variant={variant} onClick={action.onClick} className={ACTION_CLASSES[variant]}>\n {action.label}\n </Button>\n );\n\nexport const InfoBoxContent = React.forwardRef<\n React.ComponentRef<typeof PopoverPrimitive.Content>,\n InfoBoxContentProps\n>(\n (\n {\n className,\n showArrow = true,\n sideOffset = 8,\n heading,\n icon,\n pill,\n primaryAction,\n secondaryAction,\n children,\n style,\n onOpenAutoFocus,\n collisionPadding = FLOATING_CONTENT_COLLISION_PADDING,\n ...props\n },\n ref,\n ) => {\n const hasHeader = icon !== undefined || heading !== undefined || pill !== undefined;\n const hasActions = primaryAction !== undefined || secondaryAction !== undefined;\n const headingId = React.useId();\n\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n style={{ zIndex: \"var(--fanvue-ui-portal-z-index, 50)\", ...style }}\n className={cn(\n \"typography-body-small-14px-regular max-w-[280px] overflow-hidden rounded-md border border-white/20 bg-surface-primary-inverted p-4 text-content-primary-inverted shadow-[0px_2px_4px_0px_rgba(17,24,39,0.08)]\",\n className,\n )}\n align=\"center\"\n aria-labelledby={heading ? headingId : undefined}\n arrowPadding={12}\n onOpenAutoFocus={(e) => {\n // Prevent auto-focus stealing when opening — content is supplementary, not a dialog.\n e.preventDefault();\n onOpenAutoFocus?.(e);\n }}\n {...props}\n >\n <div className=\"flex flex-col gap-3\">\n {hasHeader && (\n <div className=\"flex items-center gap-3\">\n {icon && <div className=\"size-5 shrink-0\">{icon}</div>}\n {heading && (\n <p\n id={headingId}\n className=\"typography-body-default-16px-semibold min-w-0 flex-1 text-content-primary-inverted\"\n >\n {heading}\n </p>\n )}\n {pill && <div className=\"shrink-0\">{pill}</div>}\n </div>\n )}\n {children && (\n <div className=\"typography-body-small-14px-regular text-content-primary-inverted\">\n {children}\n </div>\n )}\n {hasActions && (\n <div className=\"flex items-center gap-1\">\n {primaryAction && <ActionButton action={primaryAction} variant=\"brand\" />}\n {secondaryAction && <ActionButton action={secondaryAction} variant=\"tertiary\" />}\n </div>\n )}\n </div>\n {showArrow && (\n <PopoverPrimitive.Arrow\n className={\n \"-translate-y-px! fill-surface-primary-inverted stroke-2 stroke-surface-primary-inverted\"\n }\n width={12}\n height={6}\n />\n )}\n </PopoverPrimitive.Content>\n </PopoverPrimitive.Portal>\n );\n },\n);\nInfoBoxContent.displayName = \"InfoBoxContent\";\n"],"names":[],"mappings":";;;;;;;;AAeO,MAAM,UAAU,iBAAiB;AAYjC,MAAM,iBAAiB,MAAM,WAGlC,CAAC,OAAO,QAAQ,oBAAC,iBAAiB,SAAjB,EAAyB,KAAW,GAAG,0BAA0B,KAAK,GAAG,CAAE;AAC9F,eAAe,cAAc;AAgC7B,MAAM,iBAAuD;AAAA,EAC3D,OAAO;AAAA,EACP,UACE;AACJ;AAEA,MAAM,eAAe,CAAC;AAAA,EACpB;AAAA,EACA;AACF,MAIE,aAAa,SACX,OAAO,8BAEN,QAAA,EAAO,SAAkB,SAAS,OAAO,SAAS,WAAW,eAAe,OAAO,GACjF,iBAAO,OACV;AAGG,MAAM,iBAAiB,MAAM;AAAA,EAIlC,CACE;AAAA,IACE;AAAA,IACA,YAAY;AAAA,IACZ,aAAa;AAAA,IACb;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,mBAAmB;AAAA,IACnB,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,YAAY,SAAS,UAAa,YAAY,UAAa,SAAS;AAC1E,UAAM,aAAa,kBAAkB,UAAa,oBAAoB;AACtE,UAAM,YAAY,MAAM,MAAA;AAExB,WACE,oBAAC,iBAAiB,QAAjB,EACC,UAAA;AAAA,MAAC,iBAAiB;AAAA,MAAjB;AAAA,QACC;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO,EAAE,QAAQ,uCAAuC,GAAG,MAAA;AAAA,QAC3D,WAAW;AAAA,UACT;AAAA,UACA;AAAA,QAAA;AAAA,QAEF,OAAM;AAAA,QACN,mBAAiB,UAAU,YAAY;AAAA,QACvC,cAAc;AAAA,QACd,iBAAiB,CAAC,MAAM;AAEtB,YAAE,eAAA;AACF,4BAAkB,CAAC;AAAA,QACrB;AAAA,QACC,GAAG;AAAA,QAEJ,UAAA;AAAA,UAAA,qBAAC,OAAA,EAAI,WAAU,uBACZ,UAAA;AAAA,YAAA,aACC,qBAAC,OAAA,EAAI,WAAU,2BACZ,UAAA;AAAA,cAAA,QAAQ,oBAAC,OAAA,EAAI,WAAU,mBAAmB,UAAA,MAAK;AAAA,cAC/C,WACC;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,IAAI;AAAA,kBACJ,WAAU;AAAA,kBAET,UAAA;AAAA,gBAAA;AAAA,cAAA;AAAA,cAGJ,QAAQ,oBAAC,OAAA,EAAI,WAAU,YAAY,UAAA,KAAA,CAAK;AAAA,YAAA,GAC3C;AAAA,YAED,YACC,oBAAC,OAAA,EAAI,WAAU,oEACZ,UACH;AAAA,YAED,cACC,qBAAC,OAAA,EAAI,WAAU,2BACZ,UAAA;AAAA,cAAA,iBAAiB,oBAAC,cAAA,EAAa,QAAQ,eAAe,SAAQ,SAAQ;AAAA,cACtE,mBAAmB,oBAAC,cAAA,EAAa,QAAQ,iBAAiB,SAAQ,WAAA,CAAW;AAAA,YAAA,EAAA,CAChF;AAAA,UAAA,GAEJ;AAAA,UACC,aACC;AAAA,YAAC,iBAAiB;AAAA,YAAjB;AAAA,cACC,WACE;AAAA,cAEF,OAAO;AAAA,cACP,QAAQ;AAAA,YAAA;AAAA,UAAA;AAAA,QACV;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,EAEJ;AACF;AACA,eAAe,cAAc;"}
|
|
@@ -13,7 +13,7 @@ const pillVariants = {
|
|
|
13
13
|
base: "bg-surface-primary-inverted text-content-primary-inverted",
|
|
14
14
|
contrast: "bg-buttons-primary-default text-content-primary-inverted",
|
|
15
15
|
negative: "bg-buttons-secondary-negative-default text-content-primary-inverted",
|
|
16
|
-
brand: "bg-brand-primary-default text-content-always-black",
|
|
16
|
+
brand: "fv-upsell bg-brand-primary-default text-content-always-black",
|
|
17
17
|
brandLight: "bg-brand-primary-muted text-content-primary",
|
|
18
18
|
beta: "bg-brand-secondary-default text-content-always-black",
|
|
19
19
|
error: "bg-error-content text-error-surface",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pill.mjs","sources":["../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n contrast: \"bg-buttons-primary-default text-content-primary-inverted\",\n negative: \"bg-buttons-secondary-negative-default text-content-primary-inverted\",\n brand: \"bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n red: \"bg-error-surface text-error-content\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"contrast\"\n | \"negative\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\"\n | \"red\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-2 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EAAA;AAET;AAqCO,MAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAW;AAAA;AAAA,UAET;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA,aAAa,QAAQ,OAAO;AAAA;AAAA,UAE5B,WAAW;AAAA;AAAA,UAEX;AAAA,QAAA;AAAA,QAEF;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gCACE,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UACH;AAAA,UAED,8BACE,WAAA,EAAW,SAAA,CAAS,IAErB,oBAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,UAE9C,aACC,oBAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,KAAK,cAAc;"}
|
|
1
|
+
{"version":3,"file":"Pill.mjs","sources":["../../../src/components/Pill/Pill.tsx"],"sourcesContent":["import { Slot, Slottable } from \"@radix-ui/react-slot\";\nimport * as React from \"react\";\nimport { cn } from \"../../utils/cn\";\n\nconst pillVariants = {\n variant: {\n green: \"bg-success-surface text-success-content\",\n grey: \"bg-neutral-alphas-50 text-content-secondary\",\n blue: \"bg-info-surface text-info-content\",\n gold: \"bg-warning-surface text-warning-content\",\n pinkLight: \"bg-brand-secondary-muted text-content-primary\",\n base: \"bg-surface-primary-inverted text-content-primary-inverted\",\n contrast: \"bg-buttons-primary-default text-content-primary-inverted\",\n negative: \"bg-buttons-secondary-negative-default text-content-primary-inverted\",\n brand: \"fv-upsell bg-brand-primary-default text-content-always-black\",\n brandLight: \"bg-brand-primary-muted text-content-primary\",\n beta: \"bg-brand-secondary-default text-content-always-black\",\n error: \"bg-error-content text-error-surface\",\n red: \"bg-error-surface text-error-content\",\n },\n} as const;\n\n/** Colour variant of the pill. */\nexport type PillVariant =\n | \"green\"\n | \"grey\"\n | \"blue\"\n | \"gold\"\n | \"pinkLight\"\n | \"base\"\n | \"contrast\"\n | \"negative\"\n | \"brand\"\n | \"brandLight\"\n | \"beta\"\n | \"error\"\n | \"red\";\n\nexport interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {\n /** Colour variant of the pill. @default \"green\" */\n variant?: PillVariant;\n /** Icon element displayed before the label. */\n leftIcon?: React.ReactNode;\n /** Icon element displayed after the label. */\n rightIcon?: React.ReactNode;\n /** Merge props onto a child element instead of rendering a `<span>`. @default false */\n asChild?: boolean;\n}\n\n/**\n * A small rounded label for categorisation, status, or tagging.\n *\n * @example\n * ```tsx\n * <Pill variant=\"brand\">New</Pill>\n * ```\n */\nexport const Pill = React.forwardRef<HTMLSpanElement, PillProps>(\n (\n {\n className,\n variant = \"green\",\n leftIcon,\n rightIcon,\n asChild = false,\n onClick,\n children,\n ...props\n },\n ref,\n ) => {\n const Comp = asChild ? Slot : \"span\";\n\n return (\n <Comp\n ref={ref}\n data-testid=\"pill\"\n className={cn(\n // Base styles\n \"inline-flex min-w-0 items-center justify-center gap-2 rounded-full px-2 py-1\",\n // Typography\n \"typography-description-12px-semibold\",\n // Variant styles\n pillVariants.variant[variant],\n // Interactive\n onClick && \"cursor-pointer\",\n // Manual CSS overrides\n className,\n )}\n onClick={onClick}\n {...props}\n >\n {leftIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {leftIcon}\n </span>\n )}\n {asChild ? (\n <Slottable>{children}</Slottable>\n ) : (\n <span className=\"min-w-0 truncate\">{children}</span>\n )}\n {rightIcon && (\n <span className=\"flex [&>svg]:size-3\" aria-hidden=\"true\">\n {rightIcon}\n </span>\n )}\n </Comp>\n );\n },\n);\n\nPill.displayName = \"Pill\";\n"],"names":[],"mappings":";;;;;AAIA,MAAM,eAAe;AAAA,EACnB,SAAS;AAAA,IACP,OAAO;AAAA,IACP,MAAM;AAAA,IACN,MAAM;AAAA,IACN,MAAM;AAAA,IACN,WAAW;AAAA,IACX,MAAM;AAAA,IACN,UAAU;AAAA,IACV,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY;AAAA,IACZ,MAAM;AAAA,IACN,OAAO;AAAA,IACP,KAAK;AAAA,EAAA;AAET;AAqCO,MAAM,OAAO,MAAM;AAAA,EACxB,CACE;AAAA,IACE;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,GAEL,QACG;AACH,UAAM,OAAO,UAAU,OAAO;AAE9B,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,eAAY;AAAA,QACZ,WAAW;AAAA;AAAA,UAET;AAAA;AAAA,UAEA;AAAA;AAAA,UAEA,aAAa,QAAQ,OAAO;AAAA;AAAA,UAE5B,WAAW;AAAA;AAAA,UAEX;AAAA,QAAA;AAAA,QAEF;AAAA,QACC,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,gCACE,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UACH;AAAA,UAED,8BACE,WAAA,EAAW,SAAA,CAAS,IAErB,oBAAC,QAAA,EAAK,WAAU,oBAAoB,SAAA,CAAS;AAAA,UAE9C,aACC,oBAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAA,UAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAIR;AACF;AAEA,KAAK,cAAc;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1202,8 +1202,16 @@ export declare type BulbIconProps = BaseIconProps;
|
|
|
1202
1202
|
* A versatile button component with multiple visual variants, sizes, icon
|
|
1203
1203
|
* slots, loading state, and optional pricing display.
|
|
1204
1204
|
*
|
|
1205
|
-
* Pass `negative` when rendering on
|
|
1206
|
-
* treatment for `primary`, `secondary`, `tertiary`,
|
|
1205
|
+
* Pass `negative` when rendering on an inverted surface to opt into the
|
|
1206
|
+
* inverted treatment for `primary`, `secondary`, `tertiary`, `outline` and
|
|
1207
|
+
* `brand` variants.
|
|
1208
|
+
*
|
|
1209
|
+
* The `brand` variant is the Figma "Upsell" button: a green radial fill with a
|
|
1210
|
+
* green glow and a highlight that circles the rim once. With `negative` it takes
|
|
1211
|
+
* the other theme's glow, made for the inverted surface. The highlight holds
|
|
1212
|
+
* still when the user prefers reduced motion. Keep it for upgrade and purchase
|
|
1213
|
+
* prompts. The fill is a gradient, so a `bg-*` class sits under it: recolour it
|
|
1214
|
+
* through `--fv-upsell-end`, or pair the class with `bg-none`.
|
|
1207
1215
|
*
|
|
1208
1216
|
* The `ai` variant ships with the AI sparkle icon baked in (locked at 16px
|
|
1209
1217
|
* regardless of button size); pass `leftIcon` to override the default sparkle.
|
|
@@ -2580,6 +2588,7 @@ export declare const Dialog: React_2.FC<DialogPrimitive.DialogProps>;
|
|
|
2580
2588
|
/**
|
|
2581
2589
|
* Scrollable content area (slot) between the header and footer.
|
|
2582
2590
|
* Grows to fill available space and scrolls when content overflows.
|
|
2591
|
+
* Unless `className` sets horizontal padding, its clip edge sits 4px outside the content so rings on edge controls show.
|
|
2583
2592
|
*/
|
|
2584
2593
|
export declare const DialogBody: React_2.ForwardRefExoticComponent<DialogBodyProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2585
2594
|
|
|
@@ -2603,6 +2612,7 @@ export declare type DialogCloseProps = React_2.ComponentPropsWithoutRef<typeof D
|
|
|
2603
2612
|
* render a centered floating card instead (used for small confirmation dialogs).
|
|
2604
2613
|
* On larger viewports it renders centered with full border radius.
|
|
2605
2614
|
* `size="full"` skips both and fills the viewport with no chrome.
|
|
2615
|
+
* The panel carries its size as `data-size`, for styling its children.
|
|
2606
2616
|
*
|
|
2607
2617
|
* It animates in and out. While the closing animation plays the panel stays
|
|
2608
2618
|
* mounted but ignores pointer input, so a second click can't act on it.
|
|
@@ -2812,6 +2822,19 @@ export declare interface DividerProps extends React_2.ComponentPropsWithoutRef<t
|
|
|
2812
2822
|
label?: string;
|
|
2813
2823
|
}
|
|
2814
2824
|
|
|
2825
|
+
/**
|
|
2826
|
+
* Document icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
2827
|
+
*
|
|
2828
|
+
* @example
|
|
2829
|
+
* ```tsx
|
|
2830
|
+
* <DocumentIcon size={24} filled />
|
|
2831
|
+
* ```
|
|
2832
|
+
*/
|
|
2833
|
+
export declare const DocumentIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
2834
|
+
|
|
2835
|
+
/** Props for {@link DocumentIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
2836
|
+
export declare type DocumentIconProps = BaseIconProps;
|
|
2837
|
+
|
|
2815
2838
|
/**
|
|
2816
2839
|
* Donate icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
2817
2840
|
*
|
|
@@ -2907,13 +2930,15 @@ export declare interface DrawerContentProps extends React_2.ComponentPropsWithou
|
|
|
2907
2930
|
/**
|
|
2908
2931
|
* Controls the maximum extent of the drawer panel.
|
|
2909
2932
|
* For left/right drawers this sets `max-width`; for top/bottom it sets `max-height`.
|
|
2933
|
+
* Ignored by a left/right `variant="modal"`, which is always the 440px modal.
|
|
2910
2934
|
* @default "sm"
|
|
2911
2935
|
*/
|
|
2912
2936
|
size?: DrawerSize;
|
|
2913
2937
|
/**
|
|
2914
2938
|
* Visual treatment of the panel. Use `"sheet"` (with `position="bottom"`) for
|
|
2915
|
-
* a bottom sheet with the modal surface treatment,
|
|
2916
|
-
* inset menu carrying the dropdown surface
|
|
2939
|
+
* a bottom sheet with the modal surface treatment, `"menu"` for a floating
|
|
2940
|
+
* inset menu carrying the dropdown surface, or `"modal"` for the V2 Modal: beside
|
|
2941
|
+
* the page on desktop, from the bottom on mobile. @default "panel"
|
|
2917
2942
|
*/
|
|
2918
2943
|
variant?: DrawerVariant;
|
|
2919
2944
|
/**
|
|
@@ -2937,7 +2962,11 @@ export declare const DrawerDescription: React_2.ForwardRefExoticComponent<Drawer
|
|
|
2937
2962
|
export declare interface DrawerDescriptionProps extends React_2.ComponentPropsWithoutRef<typeof DialogPrimitive.Description> {
|
|
2938
2963
|
}
|
|
2939
2964
|
|
|
2940
|
-
/**
|
|
2965
|
+
/**
|
|
2966
|
+
* A semantic footer area for the drawer, typically containing action buttons.
|
|
2967
|
+
* Inside a `"modal"` drawer it carries no padding of its own, since the panel pads
|
|
2968
|
+
* its content.
|
|
2969
|
+
*/
|
|
2941
2970
|
export declare const DrawerFooter: React_2.ForwardRefExoticComponent<DrawerFooterProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2942
2971
|
|
|
2943
2972
|
/** Props for the {@link DrawerFooter} component. */
|
|
@@ -2946,7 +2975,8 @@ export declare interface DrawerFooterProps extends React_2.HTMLAttributes<HTMLDi
|
|
|
2946
2975
|
|
|
2947
2976
|
/**
|
|
2948
2977
|
* A semantic header area for the drawer, typically containing a title and description.
|
|
2949
|
-
* Renders a built-in close button by default.
|
|
2978
|
+
* Renders a built-in close button by default. Inside a `"modal"` drawer it carries
|
|
2979
|
+
* no padding of its own, since the panel pads its content.
|
|
2950
2980
|
*/
|
|
2951
2981
|
export declare const DrawerHeader: React_2.ForwardRefExoticComponent<DrawerHeaderProps & React_2.RefAttributes<HTMLDivElement>>;
|
|
2952
2982
|
|
|
@@ -3029,8 +3059,12 @@ export declare type DrawerTriggerProps = React_2.ComponentPropsWithoutRef<typeof
|
|
|
3029
3059
|
* it: inset from all three sides and rounded on every corner. Shares the modal
|
|
3030
3060
|
* surface with `"sheet"`; only the shape differs. Intended for
|
|
3031
3061
|
* `position="bottom"`.
|
|
3062
|
+
* - `"modal"` — the V2 Modal: a card floating 8px clear of the viewport edges,
|
|
3063
|
+
* with the modal surface and stroke and a 32px radius, over the heavy overlay.
|
|
3064
|
+
* Beside the page (`position="left"` or `"right"`) it is 440px wide with 24px
|
|
3065
|
+
* padding; from the top or bottom it is the mobile modal, with 16px padding.
|
|
3032
3066
|
*/
|
|
3033
|
-
export declare type DrawerVariant = "panel" | "sheet" | "menu";
|
|
3067
|
+
export declare type DrawerVariant = "panel" | "sheet" | "menu" | "modal";
|
|
3034
3068
|
|
|
3035
3069
|
/** Root component that manages open/close state for a dropdown menu. */
|
|
3036
3070
|
export declare function DropdownMenu({ open: openProp, defaultOpen, onOpenChange, variant, children, ...props }: DropdownMenuProps): JSX.Element;
|
|
@@ -3223,6 +3257,15 @@ export declare interface DropdownMenuItemProps extends React_2.ComponentPropsWit
|
|
|
3223
3257
|
trailingIcon?: React_2.ReactNode;
|
|
3224
3258
|
/** Trailing count or number (e.g. an unread total) rendered before {@link DropdownMenuItemProps.trailingIcon}. */
|
|
3225
3259
|
count?: React_2.ReactNode;
|
|
3260
|
+
/**
|
|
3261
|
+
* A small action drawn at the row's end, after everything else — typically a 24px
|
|
3262
|
+
* `Button` rendered `asChild` as a span. The whole row performs the action through
|
|
3263
|
+
* `onSelect`, so pass a visual, never a second interactive control. Its text joins the
|
|
3264
|
+
* row's accessible name, so the label people see is also the one they can speak.
|
|
3265
|
+
* The row does not restyle it: when the row is `disabled`, disable the visual too
|
|
3266
|
+
* (or show its `loading` state) so it does not look live.
|
|
3267
|
+
*/
|
|
3268
|
+
trailingAction?: React_2.ReactNode;
|
|
3226
3269
|
/**
|
|
3227
3270
|
* Optional secondary text rendered on a second line below the label. When
|
|
3228
3271
|
* provided, the row switches to a two-line layout and the leading/trailing
|
|
@@ -3513,6 +3556,19 @@ declare type EmptyStateTitleSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
|
3513
3556
|
|
|
3514
3557
|
export declare type EmptyStateVariant = "default" | "centered";
|
|
3515
3558
|
|
|
3559
|
+
/**
|
|
3560
|
+
* Episodes icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
3561
|
+
*
|
|
3562
|
+
* @example
|
|
3563
|
+
* ```tsx
|
|
3564
|
+
* <EpisodesIcon size={24} filled />
|
|
3565
|
+
* ```
|
|
3566
|
+
*/
|
|
3567
|
+
export declare const EpisodesIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
3568
|
+
|
|
3569
|
+
/** Props for {@link EpisodesIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
3570
|
+
export declare type EpisodesIconProps = BaseIconProps;
|
|
3571
|
+
|
|
3516
3572
|
/** An "×" inside a filled circle icon for error states (20 × 20). */
|
|
3517
3573
|
export declare const ErrorCircleIcon: React_2.ForwardRefExoticComponent<React_2.SVGAttributes<SVGSVGElement> & {
|
|
3518
3574
|
className?: string;
|
|
@@ -3883,7 +3939,7 @@ export declare type HourglassIconProps = BaseIconProps;
|
|
|
3883
3939
|
* icon alone (e.g. close, send). Always pair with an `aria-label` for
|
|
3884
3940
|
* accessibility.
|
|
3885
3941
|
*
|
|
3886
|
-
* Shape is size-driven for the standard variants and `overlay`: the `24` size is
|
|
3942
|
+
* Shape is size-driven for the standard variants, `upsell` and `overlay`: the `24` size is
|
|
3887
3943
|
* squared (`rounded-xs`), every larger size is circular. Bespoke variants (`brand`,
|
|
3888
3944
|
* `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop`,
|
|
3889
3945
|
* `microphone`) stay circular at all sizes. `field` is the exception that is
|
|
@@ -3923,7 +3979,13 @@ export declare type IconButtonSize = "24" | "32" | "40" | "48" | "52" | "72";
|
|
|
3923
3979
|
* `primary`, `secondary`, `tertiary`, `outline`, `error`, `white` and `black`
|
|
3924
3980
|
* use the shared button colour tokens and a size-driven shape (squared at the
|
|
3925
3981
|
* `24` size, circular otherwise). Of these, `primary`, `secondary`, `tertiary`
|
|
3926
|
-
* and `outline` also honour the {@link IconButtonProps.negative} prop
|
|
3982
|
+
* and `outline` also honour the {@link IconButtonProps.negative} prop, as does
|
|
3983
|
+
* `upsell`, which takes the other theme's glow.
|
|
3984
|
+
*
|
|
3985
|
+
* `upsell` is the Figma "Upsell" icon button and matches `Button`'s `brand`
|
|
3986
|
+
* variant: a green radial fill, a green glow and a highlight that circles the
|
|
3987
|
+
* rim once, held still when the user prefers reduced motion. It takes the same
|
|
3988
|
+
* size-driven shape as the standard variants.
|
|
3927
3989
|
*
|
|
3928
3990
|
* `overlay` is a translucent dark fill with a backdrop blur, for buttons that sit
|
|
3929
3991
|
* on photos or video. Its fill and icon look the same in light and dark themes, while
|
|
@@ -3933,7 +3995,7 @@ export declare type IconButtonSize = "24" | "32" | "40" | "48" | "52" | "72";
|
|
|
3933
3995
|
* `brand`, `contrast`, `messaging`, `navTray`, `tertiaryDestructive`, `stop` and
|
|
3934
3996
|
* `microphone` are bespoke variants that stay circular at every size.
|
|
3935
3997
|
*/
|
|
3936
|
-
export declare type IconButtonVariant = "primary" | "secondary" | "tertiary" | "outline" | "error" | "white" | "black" | "brand" | "contrast" | "messaging" | "navTray" | "tertiaryDestructive" | "stop" | "microphone" | "overlay" | "field";
|
|
3998
|
+
export declare type IconButtonVariant = "primary" | "secondary" | "tertiary" | "outline" | "error" | "white" | "black" | "brand" | "upsell" | "contrast" | "messaging" | "navTray" | "tertiaryDestructive" | "stop" | "microphone" | "overlay" | "field";
|
|
3937
3999
|
|
|
3938
4000
|
/** A single drawable path within an icon variant. */
|
|
3939
4001
|
export declare type IconPath = {
|
|
@@ -5772,6 +5834,19 @@ export declare const ShareIcon: React_2.ForwardRefExoticComponent<BaseIconProps
|
|
|
5772
5834
|
/** Props for {@link ShareIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
5773
5835
|
export declare type ShareIconProps = BaseIconProps;
|
|
5774
5836
|
|
|
5837
|
+
/**
|
|
5838
|
+
* Shorts icon. Renders at sizes 16, 24, or 32 px with outlined and filled variants.
|
|
5839
|
+
*
|
|
5840
|
+
* @example
|
|
5841
|
+
* ```tsx
|
|
5842
|
+
* <ShortsIcon size={24} filled />
|
|
5843
|
+
* ```
|
|
5844
|
+
*/
|
|
5845
|
+
export declare const ShortsIcon: React_2.ForwardRefExoticComponent<BaseIconProps & React_2.RefAttributes<SVGSVGElement>>;
|
|
5846
|
+
|
|
5847
|
+
/** Props for {@link ShortsIcon}. See {@link BaseIconProps} for the shared shape. */
|
|
5848
|
+
export declare type ShortsIconProps = BaseIconProps;
|
|
5849
|
+
|
|
5775
5850
|
/**
|
|
5776
5851
|
* A placeholder preview of content before data is loaded, reducing perceived
|
|
5777
5852
|
* load time. Mirrors common MUI Skeleton props for easy migration.
|