@sproutsocial/seeds-react-icon 2.4.3 → 2.4.4
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/esm/index.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Icon.tsx","../../src/IconHybrid.tsx","../../src/styles.ts","../../src/IconTailwind.tsx","../../src/iconShared.tsx","../../src/IconTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nimport type { TypeIconProps, TypeToggleProps } from \"./IconTypes\";\nimport IconHybrid from \"./IconHybrid\";\n\n/**\n * Icon. Automatically routes between the Tailwind implementation (preferred, for\n * bare icons) and the styled-components implementation (for consumers using\n * `color` tokens, system props, or a styled() extension). The routing logic and\n * shared name/variant/aria/svg handling live in IconHybrid / iconShared.\n */\nconst Icon = (props: TypeIconProps) => <IconHybrid {...props} />;\n\nconst ToggleableIcon = styled(Icon)<{ active: boolean }>`\n transition: all ${(p) => p.theme.duration.fast} linear;\n\n ${(p) =>\n p.active &&\n css`\n opacity: 1;\n transform: scale(1);\n `}\n\n ${(p) =>\n !p.active &&\n css`\n position: absolute;\n opacity: 0;\n transform: scale(0);\n `}\n`;\n\nconst IconToggle = ({\n activeName,\n inactiveName,\n isActive,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n ...rest\n}: TypeToggleProps) => {\n return (\n <Box as=\"span\" position=\"relative\" display=\"inline-flex\" {...rest}>\n <ToggleableIcon\n active={isActive}\n name={activeName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={!isActive}\n aria-label={!isActive ? undefined : ariaLabel}\n />\n <ToggleableIcon\n active={!isActive}\n name={inactiveName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={isActive}\n aria-label={isActive ? ariaLabel : undefined}\n />\n </Box>\n );\n};\n\nIconToggle.displayName = \"Icon.Toggle\";\n/**\n * **Accessibility note:** It is best practice to wrap `<Icon.Toggle />` in a button. The button must include `aria-label` and `aria-pressed` in order for a screen reader to properly communicate the icon's state. See example below.\n *\n * @link https://www.w3.org/TR/wai-aria-practices-1.1/#button\n * @example\n * const [toggleState, setToggleState] = useState(false);\n * <Button // Wrap Icon.Toggle with Button\n * appearance='pill'\n * aria-label='like' // required for accessibility\n * aria-pressed={toggleState} // required for accessibility\n * onClick={() => setToggleState(!toggleState)}\n * >\n * <Icon.Toggle\n * activeName=\"heart-solid\"\n * inactiveName=\"heart-outline\"\n * isActive={toggleState}\n * />\n * </Button>\n */\nIcon.Toggle = IconToggle;\n\nexport default Icon;\n","/**\n * Hybrid Icon component.\n * Automatically chooses between the Tailwind (pure CSS-class) render path and the\n * styled-components path based on props, preserving 100% backward compatibility:\n *\n * - `color` tokens (e.g. \"icon.base\"), styled-system props (margins, layout),\n * a styled() extension (theme/forwardedComponent), or an injected `sc-*`\n * className all route to the styled-components Container.\n * - bare icons (name + size + fixedWidth, no system props) render via the\n * lighter Tailwind <span>.\n *\n * Name/variant resolution, viewBox lookup, aria handling, and the <svg> markup\n * are shared with the styled-components path via iconShared.tsx.\n */\nimport * as React from \"react\";\nimport PartnerLogo from \"@sproutsocial/seeds-react-partner-logo\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport { LogoNamesWithoutVariants as PartnerLogoNames } from \"@sproutsocial/seeds-partner-logos\";\nimport { needsStyledComponents } from \"@sproutsocial/seeds-react-system-props\";\n\nimport type { TypeIconProps } from \"./IconTypes\";\nimport Container from \"./styles\";\nimport { IconTailwind } from \"./IconTailwind\";\nimport {\n AllViewboxes,\n resolveIconName,\n getAriaProps,\n IconSvg,\n} from \"./iconShared\";\n\n// Matches the generated styled-components class (e.g. \"sc-bdVaJa\"). A styled(Icon)\n// extension injects such a class; routing it to the styled path keeps its\n// generated styles (and avoids leaking `theme`/custom props onto the DOM span).\nconst SC_CLASS_PATTERN = /\\bsc-[a-zA-Z0-9]+\\b/;\n\nconst IconHybrid = ({\n name,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n color,\n svgProps,\n ...rest\n}: TypeIconProps) => {\n if (includes(PartnerLogoNames, name)) {\n // Icon's \"default\" size is equivalent to PartnerLogo's \"small\" size\n const logoSize = size === \"default\" ? \"small\" : size;\n const logoProps = {\n partnerName: name,\n size: logoSize,\n logoType: \"symbol\" as const,\n svgProps,\n };\n return (\n <PartnerLogo\n // ariaLabel needs to be overridable by aria-label prop in ...rest\n aria-label={ariaLabel}\n {...rest}\n {...logoProps}\n />\n );\n }\n\n const iconName = resolveIconName(name, size);\n const iconViewBox = AllViewboxes[iconName];\n\n const { \"aria-label\": ariaLabelFromRest, ...restWithoutAriaLabel } =\n rest as Record<string, any>;\n const { containerAriaProps, svgAriaProps } = getAriaProps(\n ariaLabel,\n ariaLabelFromRest\n );\n\n const svg = (\n <IconSvg\n iconName={iconName}\n iconViewBox={iconViewBox}\n svgProps={svgProps}\n svgAriaProps={svgAriaProps}\n />\n );\n\n // Route to styled-components whenever backward compatibility requires it.\n // `color` is destructured out of `rest`, so it must be checked explicitly —\n // the Tailwind path only does `fill: currentColor` and cannot resolve a token\n // like \"icon.base\".\n // `cursor` is a public Icon prop applied by the legacy Container via the\n // COMMON mixin, but is not in STYLED_SYSTEM_PROPS, so `needsStyledComponents`\n // does not catch it. Gate it explicitly (like `color`) so it keeps routing to\n // SC instead of leaking onto the Tailwind span as an invalid DOM attribute.\n // It is read (not destructured) off `restWithoutAriaLabel` so it still spreads\n // onto Container below.\n const className = restWithoutAriaLabel.className;\n const needsSC =\n color !== undefined ||\n restWithoutAriaLabel.cursor !== undefined ||\n needsStyledComponents(restWithoutAriaLabel) ||\n (typeof className === \"string\" && SC_CLASS_PATTERN.test(className));\n\n if (needsSC) {\n return (\n <Container\n iconSize={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n color={color as React.ComponentProps<typeof Container>[\"color\"]}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </Container>\n );\n }\n\n return (\n <IconTailwind\n size={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </IconTailwind>\n );\n};\n\nIconHybrid.displayName = \"Icon\";\nexport default IconHybrid;\n","import styled, { css } from \"styled-components\";\nimport { verticalAlign } from \"styled-system\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\nconst sizes: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\nconst stylesForSize = (iconActualSize: string, fixedWidth: boolean) => css`\n line-height: ${iconActualSize};\n\n &,\n .Icon-svg {\n height: ${iconActualSize};\n fill: currentColor;\n }\n\n ${fixedWidth &&\n `\n &,\n & .Icon-svg {\n width: ${iconActualSize}\n }\n `}\n`;\n\nconst Container = styled.span.attrs({\n className: \"Icon\",\n})<{\n iconSize: TypeIconSize;\n fixedWidth: boolean;\n}>`\n display: inline-block;\n color: inherit;\n vertical-align: middle;\n\n ${(props) => stylesForSize(sizes[props.iconSize], props.fixedWidth)}\n\n ${COMMON}\n ${verticalAlign}\n`;\nexport default Container;\n","/**\n * Tailwind/CSS-class implementation of the Icon container.\n * Uses the Seeds icon CSS classes from icon.css. Presentational only: it applies\n * the `.Icon`/`.seeds-icon` classes and the `--icon-size` custom property, then\n * renders the precomputed <svg> (passed as children). All name/variant/aria\n * logic lives in iconShared.tsx and IconHybrid.tsx.\n */\nimport React from \"react\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\n// Utility for merging class names properly.\n// Mirror of the local helper in ButtonTailwind.tsx — `cn` is NOT exported from\n// @sproutsocial/seeds-react-utilities, so it is duplicated here intentionally.\nfunction cn(\n ...inputs: (string | undefined | null | false | Record<string, boolean>)[]\n): string {\n const classes: string[] = [];\n\n for (const input of inputs) {\n if (!input) continue;\n\n if (typeof input === \"string\") {\n classes.push(input);\n } else if (typeof input === \"object\") {\n for (const [key, value] of Object.entries(input)) {\n if (value) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(\" \");\n}\n\n// Pixel lookup driving --icon-size. Mirrors `sizes` in styles.ts (kept local so\n// styles.ts stays untouched for the legacy styled-components path).\nconst sizeMap: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\ntype TypeIconTailwindProps = {\n size: TypeIconSize;\n fixedWidth: boolean;\n className?: string;\n children: React.ReactNode;\n} & Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">;\n\nexport const IconTailwind = ({\n size,\n fixedWidth,\n className,\n children,\n ...rest\n}: TypeIconTailwindProps) => {\n // \"Icon\" preserves downstream descendant selectors (e.g. `.Icon` in\n // seeds-react-switch / seeds-react-data-viz) that the styled-components\n // Container added via .attrs({ className: \"Icon\" }).\n const classes = cn(\n \"Icon\",\n \"seeds-icon\",\n { \"seeds-icon-fixed-width\": fixedWidth },\n className\n );\n\n return (\n <span\n {...rest}\n className={classes}\n style={\n {\n ...rest.style,\n \"--icon-size\": sizeMap[size],\n } as React.CSSProperties\n }\n >\n {children}\n </span>\n );\n};\n\nIconTailwind.displayName = \"IconTailwind\";\n","/**\n * Shared, non-styling Icon logic used by BOTH render paths (the styled-components\n * Container path and the Tailwind <span> path). Factoring this out keeps the two\n * paths from diverging: name/variant resolution, viewBox lookup, aria handling,\n * and the <svg> markup live here once.\n *\n * Not part of the public export surface (not re-exported from index.ts).\n */\nimport * as React from \"react\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport {\n AiViewBoxes,\n ExternalViewBoxes,\n GeneralViewBoxes,\n SproutViewBoxes,\n ExternalIconNames,\n type EnumIconSvgNames,\n type EnumIconNamesWithoutVariants,\n} from \"@sproutsocial/seeds-icons\";\nimport type { TypeIconName, TypeIconSize } from \"./IconTypes\";\n\nexport const AllViewboxes = {\n ...AiViewBoxes,\n ...ExternalViewBoxes,\n ...GeneralViewBoxes,\n ...SproutViewBoxes,\n};\n\n/**\n * Resolve a bare icon name to its concrete svg-sprite name by applying the\n * default variant (`solid` for `mini`, `outline` otherwise) unless the name is\n * already variant-suffixed or is an external icon. Matches the original\n * Icon.tsx resolution exactly.\n */\nexport function resolveIconName(\n name: TypeIconName,\n size: TypeIconSize\n): EnumIconSvgNames {\n const defaultVariant = size === \"mini\" ? \"solid\" : \"outline\";\n return !name?.endsWith(\"-outline\") &&\n !name?.endsWith(\"-solid\") &&\n !includes(ExternalIconNames, name)\n ? // then add default variant\n (`${name as EnumIconNamesWithoutVariants}-${defaultVariant}` as EnumIconSvgNames)\n : // else use name as is\n (name as EnumIconSvgNames);\n}\n\n/**\n * Compute the aria attributes for the container and the svg. When an aria-label\n * is present (via the `ariaLabel` prop or a spread `aria-label`), the svg gets\n * role=\"img\" + aria-label and the container is left visible; otherwise the\n * container is marked aria-hidden. Matches the original Icon.tsx behavior.\n */\nexport function getAriaProps(ariaLabel?: string, ariaLabelFromRest?: string) {\n const hasAriaLabel = !!ariaLabel || !!ariaLabelFromRest;\n const containerAriaProps = hasAriaLabel\n ? {}\n : { \"aria-hidden\": \"true\" as const };\n const svgAriaProps = hasAriaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel ?? ariaLabelFromRest }\n : {};\n return { containerAriaProps, svgAriaProps };\n}\n\n/**\n * The icon <svg> markup, identical for both render paths. `svgAriaProps` is\n * spread last so aria attributes win over any `svgProps` (matching the original\n * Icon.tsx spread order).\n */\nexport const IconSvg = ({\n iconName,\n iconViewBox,\n svgProps,\n svgAriaProps,\n}: {\n iconName: string;\n iconViewBox?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n svgAriaProps: React.ComponentPropsWithoutRef<\"svg\">;\n}) => (\n <svg\n className=\"Icon-svg\"\n viewBox={iconViewBox}\n focusable={false}\n data-qa-icon-svg={`${iconName}-svg`}\n {...svgProps}\n {...svgAriaProps}\n >\n <use\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n xlinkHref={`#seeds-svgs_${iconName}`}\n />\n </svg>\n);\n","import * as React from \"react\";\nimport type { EnumIconNames } from \"@sproutsocial/seeds-icons\";\nimport type { EnumLogoNamesWithoutVariants } from \"@sproutsocial/seeds-partner-logos\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport type TypeIconName = EnumIconNames | EnumLogoNamesWithoutVariants;\n\nexport type TypeIconSize =\n | \"mini\" // 12x12\n // TODO: deprecate default in favor of small in future release\n | \"default\" // 16x16\n | \"small\" // 16x16\n | \"medium\" // 24x24\n | \"large\" // 32x32\n | \"jumbo\"; // 64x64\n\nexport interface TypeIconProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Name of the icon in the svg sprite */\n name: TypeIconName;\n size?: TypeIconSize;\n /** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */\n fixedWidth?: boolean;\n /** Label used to describe the icon if not used with an accompanying visual label */\n ariaLabel?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n}\n\nexport interface TypeToggleProps extends TypeBoxProps {\n /** Name of the icon to be shown in the active state */\n activeName: TypeIconName;\n /** Name of the icon to be shown in the inactive state */\n inactiveName: TypeIconName;\n /** Whether the active icon should be shown or not */\n isActive: boolean;\n /** The size of the icon. `small` is the default */\n size?: TypeIconSize;\n fixedWidth?: boolean;\n ariaLabel?: string;\n}\n","import Icon from \"./Icon\";\n\nexport default Icon;\nexport { Icon };\nexport { default as IconContainer } from \"./styles\";\nexport * from \"./IconTypes\";\n\n// Icon v2 exports (structural SVG wrapper; distinct API from v1)\nexport { default as IconV2 } from \"./v2\";\nexport type { TypeIconV2Props, TypeIconV2Size } from \"./v2\";\n"],"mappings":";;;;;AAAA,OAAuB;AACvB,OAAOA,WAAU,OAAAC,YAAW;AAC5B,OAAO,SAAS;;;ACYhB,OAAuB;AACvB,OAAO,iBAAiB;AACxB,SAAS,YAAAC,iBAAgB;AACzB,SAAS,4BAA4B,wBAAwB;AAC7D,SAAS,6BAA6B;;;AClBtC,OAAO,UAAU,WAAW;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,cAAc;AAGvB,IAAM,QAA2C;AAAA,EAC/C,MAAM;AAAA;AAAA,EAGN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEA,IAAM,gBAAgB,CAAC,gBAAwB,eAAwB;AAAA,iBACtD,cAAc;AAAA;AAAA;AAAA;AAAA,cAIjB,cAAc;AAAA;AAAA;AAAA;AAAA,IAIxB,cACF;AAAA;AAAA;AAAA,eAGa,cAAc;AAAA;AAAA,GAE1B;AAAA;AAGH,IAAM,YAAY,OAAO,KAAK,MAAM;AAAA,EAClC,WAAW;AACb,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAQG,CAAC,UAAU,cAAc,MAAM,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC;AAAA;AAAA,IAEjE,MAAM;AAAA,IACN,aAAa;AAAA;AAEjB,IAAO,iBAAQ;;;AC1Cf,OAAkB;AAkEd;AA5DJ,SAAS,MACJ,QACK;AACR,QAAM,UAAoB,CAAC;AAE3B,aAAW,SAAS,QAAQ;AAC1B,QAAI,CAAC,MAAO;AAEZ,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,KAAK,KAAK;AAAA,IACpB,WAAW,OAAO,UAAU,UAAU;AACpC,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QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,eAAa,CAAC;AAAA,QACd,cAAY,CAAC,WAAW,SAAY;AAAA;AAAA,IACtC;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC;AAAA,QACT,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QACb,cAAY,WAAW,YAAY;AAAA;AAAA,IACrC;AAAA,KACF;AAEJ;AAEA,WAAW,cAAc;AAoBzB,KAAK,SAAS;AAEd,IAAOG,gBAAQ;;;AKvFf,OAAuB;;;ACEvB,IAAO,cAAQC;","names":["styled","css","includes","jsx","jsx","includes","jsx","styled","css","Icon_default","Icon_default"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Icon.tsx","../../src/IconHybrid.tsx","../../src/styles.ts","../../src/IconTailwind.tsx","../../src/iconShared.tsx","../../src/IconTypes.ts","../../src/index.ts"],"sourcesContent":["import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nimport type { TypeIconProps, TypeToggleProps } from \"./IconTypes\";\nimport IconHybrid from \"./IconHybrid\";\n\n/**\n * Icon. Automatically routes between the Tailwind implementation (preferred, for\n * bare icons) and the styled-components implementation (for consumers using\n * `color` tokens, system props, or a styled() extension). The routing logic and\n * shared name/variant/aria/svg handling live in IconHybrid / iconShared.\n */\nconst Icon = (props: TypeIconProps) => <IconHybrid {...props} />;\n\nconst ToggleableIcon = styled(Icon)<{ active: boolean }>`\n transition: all ${(p) => p.theme.duration.fast} linear;\n\n ${(p) =>\n p.active &&\n css`\n opacity: 1;\n transform: scale(1);\n `}\n\n ${(p) =>\n !p.active &&\n css`\n position: absolute;\n opacity: 0;\n transform: scale(0);\n `}\n`;\n\nconst IconToggle = ({\n activeName,\n inactiveName,\n isActive,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n ...rest\n}: TypeToggleProps) => {\n return (\n <Box as=\"span\" position=\"relative\" display=\"inline-flex\" {...rest}>\n <ToggleableIcon\n active={isActive}\n name={activeName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={!isActive}\n aria-label={!isActive ? undefined : ariaLabel}\n />\n <ToggleableIcon\n active={!isActive}\n name={inactiveName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={isActive}\n aria-label={isActive ? ariaLabel : undefined}\n />\n </Box>\n );\n};\n\nIconToggle.displayName = \"Icon.Toggle\";\n/**\n * **Accessibility note:** It is best practice to wrap `<Icon.Toggle />` in a button. The button must include `aria-label` and `aria-pressed` in order for a screen reader to properly communicate the icon's state. See example below.\n *\n * @link https://www.w3.org/TR/wai-aria-practices-1.1/#button\n * @example\n * const [toggleState, setToggleState] = useState(false);\n * <Button // Wrap Icon.Toggle with Button\n * appearance='pill'\n * aria-label='like' // required for accessibility\n * aria-pressed={toggleState} // required for accessibility\n * onClick={() => setToggleState(!toggleState)}\n * >\n * <Icon.Toggle\n * activeName=\"heart-solid\"\n * inactiveName=\"heart-outline\"\n * isActive={toggleState}\n * />\n * </Button>\n */\nIcon.Toggle = IconToggle;\n\nexport default Icon;\n","/**\n * Hybrid Icon component.\n * Automatically chooses between the Tailwind (pure CSS-class) render path and the\n * styled-components path based on props, preserving 100% backward compatibility:\n *\n * - `color` tokens (e.g. \"icon.base\"), styled-system props (margins, layout),\n * a styled() extension (theme/forwardedComponent), or an injected `sc-*`\n * className all route to the styled-components Container.\n * - bare icons (name + size + fixedWidth, no system props) render via the\n * lighter Tailwind <span>.\n *\n * Name/variant resolution, viewBox lookup, aria handling, and the <svg> markup\n * are shared with the styled-components path via iconShared.tsx.\n */\nimport * as React from \"react\";\nimport PartnerLogo from \"@sproutsocial/seeds-react-partner-logo\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport { LogoNamesWithoutVariants as PartnerLogoNames } from \"@sproutsocial/seeds-partner-logos\";\nimport { needsStyledComponents } from \"@sproutsocial/seeds-react-system-props\";\n\nimport type { TypeIconProps } from \"./IconTypes\";\nimport Container from \"./styles\";\nimport { IconTailwind } from \"./IconTailwind\";\nimport {\n AllViewboxes,\n resolveIconName,\n getAriaProps,\n IconSvg,\n} from \"./iconShared\";\n\n// Matches the generated styled-components class (e.g. \"sc-bdVaJa\"). A styled(Icon)\n// extension injects such a class; routing it to the styled path keeps its\n// generated styles (and avoids leaking `theme`/custom props onto the DOM span).\nconst SC_CLASS_PATTERN = /\\bsc-[a-zA-Z0-9]+\\b/;\n\nconst IconHybrid = ({\n name,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n color,\n svgProps,\n ...rest\n}: TypeIconProps) => {\n if (includes(PartnerLogoNames, name)) {\n // Icon's \"default\" size is equivalent to PartnerLogo's \"small\" size\n const logoSize = size === \"default\" ? \"small\" : size;\n const logoProps = {\n partnerName: name,\n size: logoSize,\n logoType: \"symbol\" as const,\n svgProps,\n };\n return (\n <PartnerLogo\n // ariaLabel needs to be overridable by aria-label prop in ...rest\n aria-label={ariaLabel}\n {...rest}\n {...logoProps}\n />\n );\n }\n\n const iconName = resolveIconName(name, size);\n const iconViewBox = AllViewboxes[iconName];\n\n const { \"aria-label\": ariaLabelFromRest, ...restWithoutAriaLabel } =\n rest as Record<string, any>;\n const { containerAriaProps, svgAriaProps } = getAriaProps(\n ariaLabel,\n ariaLabelFromRest\n );\n\n const svg = (\n <IconSvg\n iconName={iconName}\n iconViewBox={iconViewBox}\n svgProps={svgProps}\n svgAriaProps={svgAriaProps}\n />\n );\n\n // Route to styled-components whenever backward compatibility requires it.\n // `color` is destructured out of `rest`, so it must be checked explicitly —\n // the Tailwind path only does `fill: currentColor` and cannot resolve a token\n // like \"icon.base\".\n // `cursor` is a public Icon prop applied by the legacy Container via the\n // COMMON mixin, but is not in STYLED_SYSTEM_PROPS, so `needsStyledComponents`\n // does not catch it. Gate it explicitly (like `color`) so it keeps routing to\n // SC instead of leaking onto the Tailwind span as an invalid DOM attribute.\n // It is read (not destructured) off `restWithoutAriaLabel` so it still spreads\n // onto Container below.\n const className = restWithoutAriaLabel.className;\n const needsSC =\n color !== undefined ||\n restWithoutAriaLabel.cursor !== undefined ||\n needsStyledComponents(restWithoutAriaLabel) ||\n (typeof className === \"string\" && SC_CLASS_PATTERN.test(className));\n\n if (needsSC) {\n return (\n <Container\n iconSize={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n color={color as React.ComponentProps<typeof Container>[\"color\"]}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </Container>\n );\n }\n\n return (\n <IconTailwind\n size={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </IconTailwind>\n );\n};\n\nIconHybrid.displayName = \"Icon\";\nexport default IconHybrid;\n","import styled, { css } from \"styled-components\";\nimport { verticalAlign } from \"styled-system\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\nconst sizes: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\nconst stylesForSize = (iconActualSize: string, fixedWidth: boolean) => css`\n line-height: ${iconActualSize};\n\n &,\n .Icon-svg {\n height: ${iconActualSize};\n fill: currentColor;\n }\n\n ${fixedWidth &&\n `\n &,\n & .Icon-svg {\n width: ${iconActualSize}\n }\n `}\n`;\n\nconst Container = styled.span.attrs({\n className: \"Icon\",\n})<{\n iconSize: TypeIconSize;\n fixedWidth: boolean;\n}>`\n display: inline-block;\n color: inherit;\n vertical-align: middle;\n\n ${(props) => stylesForSize(sizes[props.iconSize], props.fixedWidth)}\n\n ${COMMON}\n ${verticalAlign}\n`;\nexport default Container;\n","/**\n * Tailwind/CSS-class implementation of the Icon container.\n * Uses the Seeds icon CSS classes from icon.css. Presentational only: it applies\n * the `.Icon`/`.seeds-icon` classes and the `--icon-size` custom property, then\n * renders the precomputed <svg> (passed as children). All name/variant/aria\n * logic lives in iconShared.tsx and IconHybrid.tsx.\n */\nimport React from \"react\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\n// Utility for merging class names properly.\n// Mirror of the local helper in ButtonTailwind.tsx — `cn` is NOT exported from\n// @sproutsocial/seeds-react-utilities, so it is duplicated here intentionally.\nfunction cn(\n ...inputs: (string | undefined | null | false | Record<string, boolean>)[]\n): string {\n const classes: string[] = [];\n\n for (const input of inputs) {\n if (!input) continue;\n\n if (typeof input === \"string\") {\n classes.push(input);\n } else if (typeof input === \"object\") {\n for (const [key, value] of Object.entries(input)) {\n if (value) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(\" \");\n}\n\n// Pixel lookup driving --icon-size. Mirrors `sizes` in styles.ts (kept local so\n// styles.ts stays untouched for the legacy styled-components path).\nconst sizeMap: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\ntype TypeIconTailwindProps = {\n size: TypeIconSize;\n fixedWidth: boolean;\n className?: string;\n children: React.ReactNode;\n} & Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">;\n\nexport const IconTailwind = ({\n size,\n fixedWidth,\n className,\n children,\n ...rest\n}: TypeIconTailwindProps) => {\n // \"Icon\" preserves downstream descendant selectors (e.g. `.Icon` in\n // seeds-react-switch / seeds-react-data-viz) that the styled-components\n // Container added via .attrs({ className: \"Icon\" }).\n const classes = cn(\n \"Icon\",\n \"seeds-icon\",\n { \"seeds-icon-fixed-width\": fixedWidth },\n className\n );\n\n return (\n <span\n {...rest}\n className={classes}\n style={\n {\n ...rest.style,\n \"--icon-size\": sizeMap[size],\n } as React.CSSProperties\n }\n >\n {children}\n </span>\n );\n};\n\nIconTailwind.displayName = \"IconTailwind\";\n","/**\n * Shared, non-styling Icon logic used by BOTH render paths (the styled-components\n * Container path and the Tailwind <span> path). Factoring this out keeps the two\n * paths from diverging: name/variant resolution, viewBox lookup, aria handling,\n * and the <svg> markup live here once.\n *\n * Not part of the public export surface (not re-exported from index.ts).\n */\nimport * as React from \"react\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport {\n AiViewBoxes,\n ExternalViewBoxes,\n GeneralViewBoxes,\n SproutViewBoxes,\n ExternalIconNames,\n type EnumIconSvgNames,\n type EnumIconNamesWithoutVariants,\n} from \"@sproutsocial/seeds-icons\";\nimport type { TypeIconName, TypeIconSize } from \"./IconTypes\";\n\nexport const AllViewboxes = {\n ...AiViewBoxes,\n ...ExternalViewBoxes,\n ...GeneralViewBoxes,\n ...SproutViewBoxes,\n};\n\n/**\n * Resolve a bare icon name to its concrete svg-sprite name by applying the\n * default variant (`solid` for `mini`, `outline` otherwise) unless the name is\n * already variant-suffixed or is an external icon. Matches the original\n * Icon.tsx resolution exactly.\n */\nexport function resolveIconName(\n name: TypeIconName,\n size: TypeIconSize\n): EnumIconSvgNames {\n const defaultVariant = size === \"mini\" ? \"solid\" : \"outline\";\n return !name?.endsWith(\"-outline\") &&\n !name?.endsWith(\"-solid\") &&\n !includes(ExternalIconNames, name)\n ? // then add default variant\n (`${\n name as EnumIconNamesWithoutVariants\n }-${defaultVariant}` as EnumIconSvgNames)\n : // else use name as is\n (name as EnumIconSvgNames);\n}\n\n/**\n * Compute the aria attributes for the container and the svg. When an aria-label\n * is present (via the `ariaLabel` prop or a spread `aria-label`), the svg gets\n * role=\"img\" + aria-label and the container is left visible; otherwise the\n * container is marked aria-hidden. Matches the original Icon.tsx behavior.\n */\nexport function getAriaProps(ariaLabel?: string, ariaLabelFromRest?: string) {\n const hasAriaLabel = !!ariaLabel || !!ariaLabelFromRest;\n const containerAriaProps = hasAriaLabel\n ? {}\n : { \"aria-hidden\": \"true\" as const };\n const svgAriaProps = hasAriaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel ?? ariaLabelFromRest }\n : {};\n return { containerAriaProps, svgAriaProps };\n}\n\n/**\n * The icon <svg> markup, identical for both render paths. `svgAriaProps` is\n * spread last so aria attributes win over any `svgProps` (matching the original\n * Icon.tsx spread order).\n */\nexport const IconSvg = ({\n iconName,\n iconViewBox,\n svgProps,\n svgAriaProps,\n}: {\n iconName: string;\n iconViewBox?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n svgAriaProps: React.ComponentPropsWithoutRef<\"svg\">;\n}) => (\n <svg\n className=\"Icon-svg\"\n viewBox={iconViewBox}\n focusable={false}\n data-qa-icon-svg={`${iconName}-svg`}\n {...svgProps}\n {...svgAriaProps}\n >\n <use\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n xlinkHref={`#seeds-svgs_${iconName}`}\n />\n </svg>\n);\n","import * as React from \"react\";\nimport type { EnumIconNames } from \"@sproutsocial/seeds-icons\";\nimport type { EnumLogoNamesWithoutVariants } from \"@sproutsocial/seeds-partner-logos\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport type TypeIconName = EnumIconNames | EnumLogoNamesWithoutVariants;\n\nexport type TypeIconSize =\n | \"mini\" // 12x12\n // TODO: deprecate default in favor of small in future release\n | \"default\" // 16x16\n | \"small\" // 16x16\n | \"medium\" // 24x24\n | \"large\" // 32x32\n | \"jumbo\"; // 64x64\n\nexport interface TypeIconProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Name of the icon in the svg sprite */\n name: TypeIconName;\n size?: TypeIconSize;\n /** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */\n fixedWidth?: boolean;\n /** Label used to describe the icon if not used with an accompanying visual label */\n ariaLabel?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n}\n\nexport interface TypeToggleProps extends TypeBoxProps {\n /** Name of the icon to be shown in the active state */\n activeName: TypeIconName;\n /** Name of the icon to be shown in the inactive state */\n inactiveName: TypeIconName;\n /** Whether the active icon should be shown or not */\n isActive: boolean;\n /** The size of the icon. `small` is the default */\n size?: TypeIconSize;\n fixedWidth?: boolean;\n ariaLabel?: string;\n}\n","import Icon from \"./Icon\";\n\nexport default Icon;\nexport { Icon };\nexport { default as IconContainer } from \"./styles\";\nexport * from \"./IconTypes\";\n\n// Icon v2 exports (structural SVG wrapper; distinct API from v1)\nexport { default as IconV2 } from \"./v2\";\nexport type { TypeIconV2Props, TypeIconV2Size } from \"./v2\";\n"],"mappings":";;;;;AAAA,OAAuB;AACvB,OAAOA,WAAU,OAAAC,YAAW;AAC5B,OAAO,SAAS;;;ACYhB,OAAuB;AACvB,OAAO,iBAAiB;AACxB,SAAS,YAAAC,iBAAgB;AACzB,SAAS,4BAA4B,wBAAwB;AAC7D,SAAS,6BAA6B;;;AClBtC,OAAO,UAAU,WAAW;AAC5B,SAAS,qBAAqB;AAC9B,SAAS,cAAc;AAGvB,IAAM,QAA2C;AAAA,EAC/C,MAAM;AAAA;AAAA,EAGN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEA,IAAM,gBAAgB,CAAC,gBAAwB,eAAwB;AAAA,iBACtD,cAAc;AAAA;AAAA;AAAA;AAAA,cAIjB,cAAc;AAAA;AAAA;AAAA;AAAA,IAIxB,cACF;AAAA;AAAA;AAAA,eAGa,cAAc;AAAA;AAAA,GAE1B;AAAA;AAGH,IAAM,YAAY,OAAO,KAAK,MAAM;AAAA,EAClC,WAAW;AACb,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAQG,CAAC,UAAU,cAAc,MAAM,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC;AAAA;AAAA,IAEjE,MAAM;AAAA,IACN,aAAa;AAAA;AAEjB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M,aAAa,CAAC;AAAA,EAClB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,aAAa;AAAA,EACb;AAAA,EACA,GAAG;AACL,MAAuB;AACrB,SACE,qBAAC,OAAI,IAAG,QAAO,UAAS,YAAW,SAAQ,eAAe,GAAG,MAC3D;AAAA,oBAAAF;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,eAAa,CAAC;AAAA,QACd,cAAY,CAAC,WAAW,SAAY;AAAA;AAAA,IACtC;AAAA,IACA,gBAAAA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ,CAAC;AAAA,QACT,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,eAAa;AAAA,QACb,cAAY,WAAW,YAAY;AAAA;AAAA,IACrC;AAAA,KACF;AAEJ;AAEA,WAAW,cAAc;AAoBzB,KAAK,SAAS;AAEd,IAAOG,gBAAQ;;;AKvFf,OAAuB;;;ACEvB,IAAO,cAAQC;","names":["styled","css","includes","jsx","jsx","includes","jsx","styled","css","Icon_default","Icon_default"]}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/Icon.tsx","../src/IconHybrid.tsx","../src/styles.ts","../src/IconTailwind.tsx","../src/iconShared.tsx","../src/IconTypes.ts","../src/v2/Icon.tsx","../src/v2/styles.ts","../src/v2/IconTypes.ts"],"sourcesContent":["import Icon from \"./Icon\";\n\nexport default Icon;\nexport { Icon };\nexport { default as IconContainer } from \"./styles\";\nexport * from \"./IconTypes\";\n\n// Icon v2 exports (structural SVG wrapper; distinct API from v1)\nexport { default as IconV2 } from \"./v2\";\nexport type { TypeIconV2Props, TypeIconV2Size } from \"./v2\";\n","import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nimport type { TypeIconProps, TypeToggleProps } from \"./IconTypes\";\nimport IconHybrid from \"./IconHybrid\";\n\n/**\n * Icon. Automatically routes between the Tailwind implementation (preferred, for\n * bare icons) and the styled-components implementation (for consumers using\n * `color` tokens, system props, or a styled() extension). The routing logic and\n * shared name/variant/aria/svg handling live in IconHybrid / iconShared.\n */\nconst Icon = (props: TypeIconProps) => <IconHybrid {...props} />;\n\nconst ToggleableIcon = styled(Icon)<{ active: boolean }>`\n transition: all ${(p) => p.theme.duration.fast} linear;\n\n ${(p) =>\n p.active &&\n css`\n opacity: 1;\n transform: scale(1);\n `}\n\n ${(p) =>\n !p.active &&\n css`\n position: absolute;\n opacity: 0;\n transform: scale(0);\n `}\n`;\n\nconst IconToggle = ({\n activeName,\n inactiveName,\n isActive,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n ...rest\n}: TypeToggleProps) => {\n return (\n <Box as=\"span\" position=\"relative\" display=\"inline-flex\" {...rest}>\n <ToggleableIcon\n active={isActive}\n name={activeName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={!isActive}\n aria-label={!isActive ? undefined : ariaLabel}\n />\n <ToggleableIcon\n active={!isActive}\n name={inactiveName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={isActive}\n aria-label={isActive ? ariaLabel : undefined}\n />\n </Box>\n );\n};\n\nIconToggle.displayName = \"Icon.Toggle\";\n/**\n * **Accessibility note:** It is best practice to wrap `<Icon.Toggle />` in a button. The button must include `aria-label` and `aria-pressed` in order for a screen reader to properly communicate the icon's state. See example below.\n *\n * @link https://www.w3.org/TR/wai-aria-practices-1.1/#button\n * @example\n * const [toggleState, setToggleState] = useState(false);\n * <Button // Wrap Icon.Toggle with Button\n * appearance='pill'\n * aria-label='like' // required for accessibility\n * aria-pressed={toggleState} // required for accessibility\n * onClick={() => setToggleState(!toggleState)}\n * >\n * <Icon.Toggle\n * activeName=\"heart-solid\"\n * inactiveName=\"heart-outline\"\n * isActive={toggleState}\n * />\n * </Button>\n */\nIcon.Toggle = IconToggle;\n\nexport default Icon;\n","/**\n * Hybrid Icon component.\n * Automatically chooses between the Tailwind (pure CSS-class) render path and the\n * styled-components path based on props, preserving 100% backward compatibility:\n *\n * - `color` tokens (e.g. \"icon.base\"), styled-system props (margins, layout),\n * a styled() extension (theme/forwardedComponent), or an injected `sc-*`\n * className all route to the styled-components Container.\n * - bare icons (name + size + fixedWidth, no system props) render via the\n * lighter Tailwind <span>.\n *\n * Name/variant resolution, viewBox lookup, aria handling, and the <svg> markup\n * are shared with the styled-components path via iconShared.tsx.\n */\nimport * as React from \"react\";\nimport PartnerLogo from \"@sproutsocial/seeds-react-partner-logo\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport { LogoNamesWithoutVariants as PartnerLogoNames } from \"@sproutsocial/seeds-partner-logos\";\nimport { needsStyledComponents } from \"@sproutsocial/seeds-react-system-props\";\n\nimport type { TypeIconProps } from \"./IconTypes\";\nimport Container from \"./styles\";\nimport { IconTailwind } from \"./IconTailwind\";\nimport {\n AllViewboxes,\n resolveIconName,\n getAriaProps,\n IconSvg,\n} from \"./iconShared\";\n\n// Matches the generated styled-components class (e.g. \"sc-bdVaJa\"). A styled(Icon)\n// extension injects such a class; routing it to the styled path keeps its\n// generated styles (and avoids leaking `theme`/custom props onto the DOM span).\nconst SC_CLASS_PATTERN = /\\bsc-[a-zA-Z0-9]+\\b/;\n\nconst IconHybrid = ({\n name,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n color,\n svgProps,\n ...rest\n}: TypeIconProps) => {\n if (includes(PartnerLogoNames, name)) {\n // Icon's \"default\" size is equivalent to PartnerLogo's \"small\" size\n const logoSize = size === \"default\" ? \"small\" : size;\n const logoProps = {\n partnerName: name,\n size: logoSize,\n logoType: \"symbol\" as const,\n svgProps,\n };\n return (\n <PartnerLogo\n // ariaLabel needs to be overridable by aria-label prop in ...rest\n aria-label={ariaLabel}\n {...rest}\n {...logoProps}\n />\n );\n }\n\n const iconName = resolveIconName(name, size);\n const iconViewBox = AllViewboxes[iconName];\n\n const { \"aria-label\": ariaLabelFromRest, ...restWithoutAriaLabel } =\n rest as Record<string, any>;\n const { containerAriaProps, svgAriaProps } = getAriaProps(\n ariaLabel,\n ariaLabelFromRest\n );\n\n const svg = (\n <IconSvg\n iconName={iconName}\n iconViewBox={iconViewBox}\n svgProps={svgProps}\n svgAriaProps={svgAriaProps}\n />\n );\n\n // Route to styled-components whenever backward compatibility requires it.\n // `color` is destructured out of `rest`, so it must be checked explicitly —\n // the Tailwind path only does `fill: currentColor` and cannot resolve a token\n // like \"icon.base\".\n // `cursor` is a public Icon prop applied by the legacy Container via the\n // COMMON mixin, but is not in STYLED_SYSTEM_PROPS, so `needsStyledComponents`\n // does not catch it. Gate it explicitly (like `color`) so it keeps routing to\n // SC instead of leaking onto the Tailwind span as an invalid DOM attribute.\n // It is read (not destructured) off `restWithoutAriaLabel` so it still spreads\n // onto Container below.\n const className = restWithoutAriaLabel.className;\n const needsSC =\n color !== undefined ||\n restWithoutAriaLabel.cursor !== undefined ||\n needsStyledComponents(restWithoutAriaLabel) ||\n (typeof className === \"string\" && SC_CLASS_PATTERN.test(className));\n\n if (needsSC) {\n return (\n <Container\n iconSize={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n color={color as React.ComponentProps<typeof Container>[\"color\"]}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </Container>\n );\n }\n\n return (\n <IconTailwind\n size={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </IconTailwind>\n );\n};\n\nIconHybrid.displayName = \"Icon\";\nexport default IconHybrid;\n","import styled, { css } from \"styled-components\";\nimport { verticalAlign } from \"styled-system\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\nconst sizes: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\nconst stylesForSize = (iconActualSize: string, fixedWidth: boolean) => css`\n line-height: ${iconActualSize};\n\n &,\n .Icon-svg {\n height: ${iconActualSize};\n fill: currentColor;\n }\n\n ${fixedWidth &&\n `\n &,\n & .Icon-svg {\n width: ${iconActualSize}\n }\n `}\n`;\n\nconst Container = styled.span.attrs({\n className: \"Icon\",\n})<{\n iconSize: TypeIconSize;\n fixedWidth: boolean;\n}>`\n display: inline-block;\n color: inherit;\n vertical-align: middle;\n\n ${(props) => stylesForSize(sizes[props.iconSize], props.fixedWidth)}\n\n ${COMMON}\n ${verticalAlign}\n`;\nexport default Container;\n","/**\n * Tailwind/CSS-class implementation of the Icon container.\n * Uses the Seeds icon CSS classes from icon.css. Presentational only: it applies\n * the `.Icon`/`.seeds-icon` classes and the `--icon-size` custom property, then\n * renders the precomputed <svg> (passed as children). All name/variant/aria\n * logic lives in iconShared.tsx and IconHybrid.tsx.\n */\nimport React from \"react\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\n// Utility for merging class names properly.\n// Mirror of the local helper in ButtonTailwind.tsx — `cn` is NOT exported from\n// @sproutsocial/seeds-react-utilities, so it is duplicated here intentionally.\nfunction cn(\n ...inputs: (string | undefined | null | false | Record<string, boolean>)[]\n): string {\n const classes: string[] = [];\n\n for (const input of inputs) {\n if (!input) continue;\n\n if (typeof input === \"string\") {\n classes.push(input);\n } else if (typeof input === \"object\") {\n for (const [key, value] of Object.entries(input)) {\n if (value) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(\" \");\n}\n\n// Pixel lookup driving --icon-size. Mirrors `sizes` in styles.ts (kept local so\n// styles.ts stays untouched for the legacy styled-components path).\nconst sizeMap: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\ntype TypeIconTailwindProps = {\n size: TypeIconSize;\n fixedWidth: boolean;\n className?: string;\n children: React.ReactNode;\n} & Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">;\n\nexport const IconTailwind = ({\n size,\n fixedWidth,\n className,\n children,\n ...rest\n}: TypeIconTailwindProps) => {\n // \"Icon\" preserves downstream descendant selectors (e.g. `.Icon` in\n // seeds-react-switch / seeds-react-data-viz) that the styled-components\n // Container added via .attrs({ className: \"Icon\" }).\n const classes = cn(\n \"Icon\",\n \"seeds-icon\",\n { \"seeds-icon-fixed-width\": fixedWidth },\n className\n );\n\n return (\n <span\n {...rest}\n className={classes}\n style={\n {\n ...rest.style,\n \"--icon-size\": sizeMap[size],\n } as React.CSSProperties\n }\n >\n {children}\n </span>\n );\n};\n\nIconTailwind.displayName = \"IconTailwind\";\n","/**\n * Shared, non-styling Icon logic used by BOTH render paths (the styled-components\n * Container path and the Tailwind <span> path). Factoring this out keeps the two\n * paths from diverging: name/variant resolution, viewBox lookup, aria handling,\n * and the <svg> markup live here once.\n *\n * Not part of the public export surface (not re-exported from index.ts).\n */\nimport * as React from \"react\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport {\n AiViewBoxes,\n ExternalViewBoxes,\n GeneralViewBoxes,\n SproutViewBoxes,\n ExternalIconNames,\n type EnumIconSvgNames,\n type EnumIconNamesWithoutVariants,\n} from \"@sproutsocial/seeds-icons\";\nimport type { TypeIconName, TypeIconSize } from \"./IconTypes\";\n\nexport const AllViewboxes = {\n ...AiViewBoxes,\n ...ExternalViewBoxes,\n ...GeneralViewBoxes,\n ...SproutViewBoxes,\n};\n\n/**\n * Resolve a bare icon name to its concrete svg-sprite name by applying the\n * default variant (`solid` for `mini`, `outline` otherwise) unless the name is\n * already variant-suffixed or is an external icon. Matches the original\n * Icon.tsx resolution exactly.\n */\nexport function resolveIconName(\n name: TypeIconName,\n size: TypeIconSize\n): EnumIconSvgNames {\n const defaultVariant = size === \"mini\" ? \"solid\" : \"outline\";\n return !name?.endsWith(\"-outline\") &&\n !name?.endsWith(\"-solid\") &&\n !includes(ExternalIconNames, name)\n ? // then add default variant\n (`${name as EnumIconNamesWithoutVariants}-${defaultVariant}` as EnumIconSvgNames)\n : // else use name as is\n (name as EnumIconSvgNames);\n}\n\n/**\n * Compute the aria attributes for the container and the svg. When an aria-label\n * is present (via the `ariaLabel` prop or a spread `aria-label`), the svg gets\n * role=\"img\" + aria-label and the container is left visible; otherwise the\n * container is marked aria-hidden. Matches the original Icon.tsx behavior.\n */\nexport function getAriaProps(ariaLabel?: string, ariaLabelFromRest?: string) {\n const hasAriaLabel = !!ariaLabel || !!ariaLabelFromRest;\n const containerAriaProps = hasAriaLabel\n ? {}\n : { \"aria-hidden\": \"true\" as const };\n const svgAriaProps = hasAriaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel ?? ariaLabelFromRest }\n : {};\n return { containerAriaProps, svgAriaProps };\n}\n\n/**\n * The icon <svg> markup, identical for both render paths. `svgAriaProps` is\n * spread last so aria attributes win over any `svgProps` (matching the original\n * Icon.tsx spread order).\n */\nexport const IconSvg = ({\n iconName,\n iconViewBox,\n svgProps,\n svgAriaProps,\n}: {\n iconName: string;\n iconViewBox?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n svgAriaProps: React.ComponentPropsWithoutRef<\"svg\">;\n}) => (\n <svg\n className=\"Icon-svg\"\n viewBox={iconViewBox}\n focusable={false}\n data-qa-icon-svg={`${iconName}-svg`}\n {...svgProps}\n {...svgAriaProps}\n >\n <use\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n xlinkHref={`#seeds-svgs_${iconName}`}\n />\n </svg>\n);\n","import * as React from \"react\";\nimport type { EnumIconNames } from \"@sproutsocial/seeds-icons\";\nimport type { EnumLogoNamesWithoutVariants } from \"@sproutsocial/seeds-partner-logos\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport type TypeIconName = EnumIconNames | EnumLogoNamesWithoutVariants;\n\nexport type TypeIconSize =\n | \"mini\" // 12x12\n // TODO: deprecate default in favor of small in future release\n | \"default\" // 16x16\n | \"small\" // 16x16\n | \"medium\" // 24x24\n | \"large\" // 32x32\n | \"jumbo\"; // 64x64\n\nexport interface TypeIconProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Name of the icon in the svg sprite */\n name: TypeIconName;\n size?: TypeIconSize;\n /** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */\n fixedWidth?: boolean;\n /** Label used to describe the icon if not used with an accompanying visual label */\n ariaLabel?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n}\n\nexport interface TypeToggleProps extends TypeBoxProps {\n /** Name of the icon to be shown in the active state */\n activeName: TypeIconName;\n /** Name of the icon to be shown in the inactive state */\n inactiveName: TypeIconName;\n /** Whether the active icon should be shown or not */\n isActive: boolean;\n /** The size of the icon. `small` is the default */\n size?: TypeIconSize;\n fixedWidth?: boolean;\n ariaLabel?: string;\n}\n","import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeIconV2Props } from \"./IconTypes\";\n\n/**\n * **Icon (v2)** — a structural wrapper that centers a caller-supplied SVG inside a\n * fixed-size container, slightly larger than the icon to give it breathing room\n * (a buffer against focus rings, hover backgrounds, and button padding).\n *\n * The caller passes the SVG directly via `children` (or the `icon` alias). The SVG\n * should use `viewBox=\"0 0 24 24\"` and `currentColor` fills — the component controls\n * only the rendered width/height and centering, never the viewBox or path-level fills.\n *\n * Sizes:\n * - `default` — 24×24px container, icon renders at 18×18px\n * - `small` — 20×20px container, icon renders at 15×15px\n *\n * Accessibility: decorative by default (`aria-hidden`). Pass `aria-label` to expose a\n * standalone icon — the container then gets `role=\"img\"` and the label.\n *\n * @example\n * <Icon aria-label=\"Settings\"><MySvg /></Icon>\n */\nconst Icon = React.forwardRef<HTMLSpanElement, TypeIconV2Props>(\n (\n { size = \"default\", children, icon, \"aria-label\": ariaLabel, ...rest },\n ref\n ) => {\n const content = children ?? icon;\n const ariaProps = ariaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel }\n : { \"aria-hidden\": true };\n\n return (\n <Container\n ref={ref}\n iconSize={size}\n data-qa-icon-v2={size}\n {...ariaProps}\n {...rest}\n >\n {content}\n </Container>\n );\n }\n);\n\nIcon.displayName = \"IconV2\";\n\nexport default Icon;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n FLEXBOX,\n LAYOUT,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconV2Size } from \"./IconTypes\";\n\nconst dimensions: {\n [key in TypeIconV2Size]: { container: string; icon: string };\n} = {\n default: { container: \"24px\", icon: \"18px\" },\n small: { container: \"20px\", icon: \"15px\" },\n};\n\n/**\n * Structural, non-semantic container that centers a caller-supplied SVG inside a\n * fixed-size box (slightly larger than the icon, for breathing room). The child\n * `svg` is sized via CSS to the icon dimensions and inherits color through\n * `currentColor` — no background or border.\n */\nconst Container = styled.span<{\n iconSize: TypeIconV2Size;\n}>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: inherit;\n width: ${(props) => dimensions[props.iconSize].container};\n height: ${(props) => dimensions[props.iconSize].container};\n\n & > svg {\n width: ${(props) => dimensions[props.iconSize].icon};\n height: ${(props) => dimensions[props.iconSize].icon};\n flex-shrink: 0;\n fill: currentColor;\n }\n\n ${COMMON}\n ${FLEXBOX}\n ${LAYOUT}\n`;\n\nexport default Container;\n","import * as React from \"react\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\n\nexport type TypeIconV2Size =\n | \"default\" // 24x24 container, 18x18 icon\n | \"small\"; // 20x20 container, 15x15 icon\n\nexport interface TypeIconV2Props\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Container/icon size variant. Defaults to `\"default\"` (24px container, 18px icon). */\n size?: TypeIconV2Size;\n /** The SVG element to render inside the container. Should use `viewBox=\"0 0 24 24\"` and `currentColor` fills. */\n children?: React.ReactNode;\n /** Alias for `children`. When both are provided, `children` wins. */\n icon?: React.ReactNode;\n /** When provided, the container gets `role=\"img\"` and this label, making a standalone icon accessible. Omit for decorative icons (the container is `aria-hidden` automatically). */\n \"aria-label\"?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,SAAuB;AACvB,IAAAC,4BAA4B;AAC5B,6BAAgB;;;ACYhB,IAAAC,SAAuB;AACvB,sCAAwB;AACxB,IAAAC,gCAAyB;AACzB,iCAA6D;AAC7D,IAAAC,mCAAsC;;;AClBtC,+BAA4B;AAC5B,2BAA8B;AAC9B,sCAAuB;AAGvB,IAAM,QAA2C;AAAA,EAC/C,MAAM;AAAA;AAAA,EAGN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEA,IAAM,gBAAgB,CAAC,gBAAwB,eAAwB;AAAA,iBACtD,cAAc;AAAA;AAAA;AAAA;AAAA,cAIjB,cAAc;AAAA;AAAA;AAAA;AAAA,IAIxB,cACF;AAAA;AAAA;AAAA,eAGa,cAAc;AAAA;AAAA,GAE1B;AAAA;AAGH,IAAM,YAAY,yBAAAC,QAAO,KAAK,MAAM;AAAA,EAClC,WAAW;AACb,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAQG,CAAC,UAAU,cAAc,MAAM,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC;AAAA;AAAA,IAEjE,sCAAM;AAAA,IACN,kCAAa;AAAA;AAEjB,IAAO,iBAAQ;;;AC1Cf,mBA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M,UAAU,YAAY;AAC5B,UAAM,YAAY,YACd,EAAE,MAAM,OAAgB,cAAc,UAAU,IAChD,EAAE,eAAe,KAAK;AAE1B,WACE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC;AAAA,QACA,UAAU;AAAA,QACV,mBAAiB;AAAA,QAChB,GAAG;AAAA,QACH,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEAD,MAAK,cAAc;AAEnB,IAAOE,gBAAQF;;;AEjDf,IAAAG,SAAuB;;;ATEvB,IAAO,cAAQ;","names":["Icon_default","React","import_styled_components","React","import_seeds_react_utilities","import_seeds_react_system_props","styled","React","import_jsx_runtime","import_jsx_runtime","PartnerLogoNames","PartnerLogo","import_jsx_runtime","styled","Box","React","React","import_styled_components","import_seeds_react_system_props","Container","styled","styles_default","import_jsx_runtime","Icon","styles_default","Icon_default","React"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/Icon.tsx","../src/IconHybrid.tsx","../src/styles.ts","../src/IconTailwind.tsx","../src/iconShared.tsx","../src/IconTypes.ts","../src/v2/Icon.tsx","../src/v2/styles.ts","../src/v2/IconTypes.ts"],"sourcesContent":["import Icon from \"./Icon\";\n\nexport default Icon;\nexport { Icon };\nexport { default as IconContainer } from \"./styles\";\nexport * from \"./IconTypes\";\n\n// Icon v2 exports (structural SVG wrapper; distinct API from v1)\nexport { default as IconV2 } from \"./v2\";\nexport type { TypeIconV2Props, TypeIconV2Size } from \"./v2\";\n","import * as React from \"react\";\nimport styled, { css } from \"styled-components\";\nimport Box from \"@sproutsocial/seeds-react-box\";\n\nimport type { TypeIconProps, TypeToggleProps } from \"./IconTypes\";\nimport IconHybrid from \"./IconHybrid\";\n\n/**\n * Icon. Automatically routes between the Tailwind implementation (preferred, for\n * bare icons) and the styled-components implementation (for consumers using\n * `color` tokens, system props, or a styled() extension). The routing logic and\n * shared name/variant/aria/svg handling live in IconHybrid / iconShared.\n */\nconst Icon = (props: TypeIconProps) => <IconHybrid {...props} />;\n\nconst ToggleableIcon = styled(Icon)<{ active: boolean }>`\n transition: all ${(p) => p.theme.duration.fast} linear;\n\n ${(p) =>\n p.active &&\n css`\n opacity: 1;\n transform: scale(1);\n `}\n\n ${(p) =>\n !p.active &&\n css`\n position: absolute;\n opacity: 0;\n transform: scale(0);\n `}\n`;\n\nconst IconToggle = ({\n activeName,\n inactiveName,\n isActive,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n ...rest\n}: TypeToggleProps) => {\n return (\n <Box as=\"span\" position=\"relative\" display=\"inline-flex\" {...rest}>\n <ToggleableIcon\n active={isActive}\n name={activeName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={!isActive}\n aria-label={!isActive ? undefined : ariaLabel}\n />\n <ToggleableIcon\n active={!isActive}\n name={inactiveName}\n size={size}\n fixedWidth={fixedWidth}\n aria-hidden={isActive}\n aria-label={isActive ? ariaLabel : undefined}\n />\n </Box>\n );\n};\n\nIconToggle.displayName = \"Icon.Toggle\";\n/**\n * **Accessibility note:** It is best practice to wrap `<Icon.Toggle />` in a button. The button must include `aria-label` and `aria-pressed` in order for a screen reader to properly communicate the icon's state. See example below.\n *\n * @link https://www.w3.org/TR/wai-aria-practices-1.1/#button\n * @example\n * const [toggleState, setToggleState] = useState(false);\n * <Button // Wrap Icon.Toggle with Button\n * appearance='pill'\n * aria-label='like' // required for accessibility\n * aria-pressed={toggleState} // required for accessibility\n * onClick={() => setToggleState(!toggleState)}\n * >\n * <Icon.Toggle\n * activeName=\"heart-solid\"\n * inactiveName=\"heart-outline\"\n * isActive={toggleState}\n * />\n * </Button>\n */\nIcon.Toggle = IconToggle;\n\nexport default Icon;\n","/**\n * Hybrid Icon component.\n * Automatically chooses between the Tailwind (pure CSS-class) render path and the\n * styled-components path based on props, preserving 100% backward compatibility:\n *\n * - `color` tokens (e.g. \"icon.base\"), styled-system props (margins, layout),\n * a styled() extension (theme/forwardedComponent), or an injected `sc-*`\n * className all route to the styled-components Container.\n * - bare icons (name + size + fixedWidth, no system props) render via the\n * lighter Tailwind <span>.\n *\n * Name/variant resolution, viewBox lookup, aria handling, and the <svg> markup\n * are shared with the styled-components path via iconShared.tsx.\n */\nimport * as React from \"react\";\nimport PartnerLogo from \"@sproutsocial/seeds-react-partner-logo\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport { LogoNamesWithoutVariants as PartnerLogoNames } from \"@sproutsocial/seeds-partner-logos\";\nimport { needsStyledComponents } from \"@sproutsocial/seeds-react-system-props\";\n\nimport type { TypeIconProps } from \"./IconTypes\";\nimport Container from \"./styles\";\nimport { IconTailwind } from \"./IconTailwind\";\nimport {\n AllViewboxes,\n resolveIconName,\n getAriaProps,\n IconSvg,\n} from \"./iconShared\";\n\n// Matches the generated styled-components class (e.g. \"sc-bdVaJa\"). A styled(Icon)\n// extension injects such a class; routing it to the styled path keeps its\n// generated styles (and avoids leaking `theme`/custom props onto the DOM span).\nconst SC_CLASS_PATTERN = /\\bsc-[a-zA-Z0-9]+\\b/;\n\nconst IconHybrid = ({\n name,\n size = \"small\",\n fixedWidth = false,\n ariaLabel,\n color,\n svgProps,\n ...rest\n}: TypeIconProps) => {\n if (includes(PartnerLogoNames, name)) {\n // Icon's \"default\" size is equivalent to PartnerLogo's \"small\" size\n const logoSize = size === \"default\" ? \"small\" : size;\n const logoProps = {\n partnerName: name,\n size: logoSize,\n logoType: \"symbol\" as const,\n svgProps,\n };\n return (\n <PartnerLogo\n // ariaLabel needs to be overridable by aria-label prop in ...rest\n aria-label={ariaLabel}\n {...rest}\n {...logoProps}\n />\n );\n }\n\n const iconName = resolveIconName(name, size);\n const iconViewBox = AllViewboxes[iconName];\n\n const { \"aria-label\": ariaLabelFromRest, ...restWithoutAriaLabel } =\n rest as Record<string, any>;\n const { containerAriaProps, svgAriaProps } = getAriaProps(\n ariaLabel,\n ariaLabelFromRest\n );\n\n const svg = (\n <IconSvg\n iconName={iconName}\n iconViewBox={iconViewBox}\n svgProps={svgProps}\n svgAriaProps={svgAriaProps}\n />\n );\n\n // Route to styled-components whenever backward compatibility requires it.\n // `color` is destructured out of `rest`, so it must be checked explicitly —\n // the Tailwind path only does `fill: currentColor` and cannot resolve a token\n // like \"icon.base\".\n // `cursor` is a public Icon prop applied by the legacy Container via the\n // COMMON mixin, but is not in STYLED_SYSTEM_PROPS, so `needsStyledComponents`\n // does not catch it. Gate it explicitly (like `color`) so it keeps routing to\n // SC instead of leaking onto the Tailwind span as an invalid DOM attribute.\n // It is read (not destructured) off `restWithoutAriaLabel` so it still spreads\n // onto Container below.\n const className = restWithoutAriaLabel.className;\n const needsSC =\n color !== undefined ||\n restWithoutAriaLabel.cursor !== undefined ||\n needsStyledComponents(restWithoutAriaLabel) ||\n (typeof className === \"string\" && SC_CLASS_PATTERN.test(className));\n\n if (needsSC) {\n return (\n <Container\n iconSize={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n color={color as React.ComponentProps<typeof Container>[\"color\"]}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </Container>\n );\n }\n\n return (\n <IconTailwind\n size={size}\n fixedWidth={!!fixedWidth}\n key={iconName}\n data-qa-icon={iconName}\n {...restWithoutAriaLabel}\n {...containerAriaProps}\n >\n {svg}\n </IconTailwind>\n );\n};\n\nIconHybrid.displayName = \"Icon\";\nexport default IconHybrid;\n","import styled, { css } from \"styled-components\";\nimport { verticalAlign } from \"styled-system\";\nimport { COMMON } from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\nconst sizes: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\nconst stylesForSize = (iconActualSize: string, fixedWidth: boolean) => css`\n line-height: ${iconActualSize};\n\n &,\n .Icon-svg {\n height: ${iconActualSize};\n fill: currentColor;\n }\n\n ${fixedWidth &&\n `\n &,\n & .Icon-svg {\n width: ${iconActualSize}\n }\n `}\n`;\n\nconst Container = styled.span.attrs({\n className: \"Icon\",\n})<{\n iconSize: TypeIconSize;\n fixedWidth: boolean;\n}>`\n display: inline-block;\n color: inherit;\n vertical-align: middle;\n\n ${(props) => stylesForSize(sizes[props.iconSize], props.fixedWidth)}\n\n ${COMMON}\n ${verticalAlign}\n`;\nexport default Container;\n","/**\n * Tailwind/CSS-class implementation of the Icon container.\n * Uses the Seeds icon CSS classes from icon.css. Presentational only: it applies\n * the `.Icon`/`.seeds-icon` classes and the `--icon-size` custom property, then\n * renders the precomputed <svg> (passed as children). All name/variant/aria\n * logic lives in iconShared.tsx and IconHybrid.tsx.\n */\nimport React from \"react\";\nimport type { TypeIconSize } from \"./IconTypes\";\n\n// Utility for merging class names properly.\n// Mirror of the local helper in ButtonTailwind.tsx — `cn` is NOT exported from\n// @sproutsocial/seeds-react-utilities, so it is duplicated here intentionally.\nfunction cn(\n ...inputs: (string | undefined | null | false | Record<string, boolean>)[]\n): string {\n const classes: string[] = [];\n\n for (const input of inputs) {\n if (!input) continue;\n\n if (typeof input === \"string\") {\n classes.push(input);\n } else if (typeof input === \"object\") {\n for (const [key, value] of Object.entries(input)) {\n if (value) {\n classes.push(key);\n }\n }\n }\n }\n\n return classes.join(\" \");\n}\n\n// Pixel lookup driving --icon-size. Mirrors `sizes` in styles.ts (kept local so\n// styles.ts stays untouched for the legacy styled-components path).\nconst sizeMap: { [key in TypeIconSize]: string } = {\n mini: \"12px\",\n\n /** TODO: deprecate default in favor of small in future release */\n default: \"16px\",\n small: \"16px\",\n medium: \"24px\",\n large: \"32px\",\n jumbo: \"64px\",\n};\n\ntype TypeIconTailwindProps = {\n size: TypeIconSize;\n fixedWidth: boolean;\n className?: string;\n children: React.ReactNode;\n} & Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\">;\n\nexport const IconTailwind = ({\n size,\n fixedWidth,\n className,\n children,\n ...rest\n}: TypeIconTailwindProps) => {\n // \"Icon\" preserves downstream descendant selectors (e.g. `.Icon` in\n // seeds-react-switch / seeds-react-data-viz) that the styled-components\n // Container added via .attrs({ className: \"Icon\" }).\n const classes = cn(\n \"Icon\",\n \"seeds-icon\",\n { \"seeds-icon-fixed-width\": fixedWidth },\n className\n );\n\n return (\n <span\n {...rest}\n className={classes}\n style={\n {\n ...rest.style,\n \"--icon-size\": sizeMap[size],\n } as React.CSSProperties\n }\n >\n {children}\n </span>\n );\n};\n\nIconTailwind.displayName = \"IconTailwind\";\n","/**\n * Shared, non-styling Icon logic used by BOTH render paths (the styled-components\n * Container path and the Tailwind <span> path). Factoring this out keeps the two\n * paths from diverging: name/variant resolution, viewBox lookup, aria handling,\n * and the <svg> markup live here once.\n *\n * Not part of the public export surface (not re-exported from index.ts).\n */\nimport * as React from \"react\";\nimport { includes } from \"@sproutsocial/seeds-react-utilities\";\nimport {\n AiViewBoxes,\n ExternalViewBoxes,\n GeneralViewBoxes,\n SproutViewBoxes,\n ExternalIconNames,\n type EnumIconSvgNames,\n type EnumIconNamesWithoutVariants,\n} from \"@sproutsocial/seeds-icons\";\nimport type { TypeIconName, TypeIconSize } from \"./IconTypes\";\n\nexport const AllViewboxes = {\n ...AiViewBoxes,\n ...ExternalViewBoxes,\n ...GeneralViewBoxes,\n ...SproutViewBoxes,\n};\n\n/**\n * Resolve a bare icon name to its concrete svg-sprite name by applying the\n * default variant (`solid` for `mini`, `outline` otherwise) unless the name is\n * already variant-suffixed or is an external icon. Matches the original\n * Icon.tsx resolution exactly.\n */\nexport function resolveIconName(\n name: TypeIconName,\n size: TypeIconSize\n): EnumIconSvgNames {\n const defaultVariant = size === \"mini\" ? \"solid\" : \"outline\";\n return !name?.endsWith(\"-outline\") &&\n !name?.endsWith(\"-solid\") &&\n !includes(ExternalIconNames, name)\n ? // then add default variant\n (`${\n name as EnumIconNamesWithoutVariants\n }-${defaultVariant}` as EnumIconSvgNames)\n : // else use name as is\n (name as EnumIconSvgNames);\n}\n\n/**\n * Compute the aria attributes for the container and the svg. When an aria-label\n * is present (via the `ariaLabel` prop or a spread `aria-label`), the svg gets\n * role=\"img\" + aria-label and the container is left visible; otherwise the\n * container is marked aria-hidden. Matches the original Icon.tsx behavior.\n */\nexport function getAriaProps(ariaLabel?: string, ariaLabelFromRest?: string) {\n const hasAriaLabel = !!ariaLabel || !!ariaLabelFromRest;\n const containerAriaProps = hasAriaLabel\n ? {}\n : { \"aria-hidden\": \"true\" as const };\n const svgAriaProps = hasAriaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel ?? ariaLabelFromRest }\n : {};\n return { containerAriaProps, svgAriaProps };\n}\n\n/**\n * The icon <svg> markup, identical for both render paths. `svgAriaProps` is\n * spread last so aria attributes win over any `svgProps` (matching the original\n * Icon.tsx spread order).\n */\nexport const IconSvg = ({\n iconName,\n iconViewBox,\n svgProps,\n svgAriaProps,\n}: {\n iconName: string;\n iconViewBox?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n svgAriaProps: React.ComponentPropsWithoutRef<\"svg\">;\n}) => (\n <svg\n className=\"Icon-svg\"\n viewBox={iconViewBox}\n focusable={false}\n data-qa-icon-svg={`${iconName}-svg`}\n {...svgProps}\n {...svgAriaProps}\n >\n <use\n xmlnsXlink=\"http://www.w3.org/1999/xlink\"\n xlinkHref={`#seeds-svgs_${iconName}`}\n />\n </svg>\n);\n","import * as React from \"react\";\nimport type { EnumIconNames } from \"@sproutsocial/seeds-icons\";\nimport type { EnumLogoNamesWithoutVariants } from \"@sproutsocial/seeds-partner-logos\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeBoxProps } from \"@sproutsocial/seeds-react-box\";\n\nexport type TypeIconName = EnumIconNames | EnumLogoNamesWithoutVariants;\n\nexport type TypeIconSize =\n | \"mini\" // 12x12\n // TODO: deprecate default in favor of small in future release\n | \"default\" // 16x16\n | \"small\" // 16x16\n | \"medium\" // 24x24\n | \"large\" // 32x32\n | \"jumbo\"; // 64x64\n\nexport interface TypeIconProps\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Name of the icon in the svg sprite */\n name: TypeIconName;\n size?: TypeIconSize;\n /** Whether the icon should have a fixed width or not. Use this when you need to align icons/text vertically in a list. */\n fixedWidth?: boolean;\n /** Label used to describe the icon if not used with an accompanying visual label */\n ariaLabel?: string;\n svgProps?: React.ComponentPropsWithoutRef<\"svg\">;\n}\n\nexport interface TypeToggleProps extends TypeBoxProps {\n /** Name of the icon to be shown in the active state */\n activeName: TypeIconName;\n /** Name of the icon to be shown in the inactive state */\n inactiveName: TypeIconName;\n /** Whether the active icon should be shown or not */\n isActive: boolean;\n /** The size of the icon. `small` is the default */\n size?: TypeIconSize;\n fixedWidth?: boolean;\n ariaLabel?: string;\n}\n","import * as React from \"react\";\nimport Container from \"./styles\";\nimport type { TypeIconV2Props } from \"./IconTypes\";\n\n/**\n * **Icon (v2)** — a structural wrapper that centers a caller-supplied SVG inside a\n * fixed-size container, slightly larger than the icon to give it breathing room\n * (a buffer against focus rings, hover backgrounds, and button padding).\n *\n * The caller passes the SVG directly via `children` (or the `icon` alias). The SVG\n * should use `viewBox=\"0 0 24 24\"` and `currentColor` fills — the component controls\n * only the rendered width/height and centering, never the viewBox or path-level fills.\n *\n * Sizes:\n * - `default` — 24×24px container, icon renders at 18×18px\n * - `small` — 20×20px container, icon renders at 15×15px\n *\n * Accessibility: decorative by default (`aria-hidden`). Pass `aria-label` to expose a\n * standalone icon — the container then gets `role=\"img\"` and the label.\n *\n * @example\n * <Icon aria-label=\"Settings\"><MySvg /></Icon>\n */\nconst Icon = React.forwardRef<HTMLSpanElement, TypeIconV2Props>(\n (\n { size = \"default\", children, icon, \"aria-label\": ariaLabel, ...rest },\n ref\n ) => {\n const content = children ?? icon;\n const ariaProps = ariaLabel\n ? { role: \"img\" as const, \"aria-label\": ariaLabel }\n : { \"aria-hidden\": true };\n\n return (\n <Container\n ref={ref}\n iconSize={size}\n data-qa-icon-v2={size}\n {...ariaProps}\n {...rest}\n >\n {content}\n </Container>\n );\n }\n);\n\nIcon.displayName = \"IconV2\";\n\nexport default Icon;\n","import styled from \"styled-components\";\nimport {\n COMMON,\n FLEXBOX,\n LAYOUT,\n} from \"@sproutsocial/seeds-react-system-props\";\nimport type { TypeIconV2Size } from \"./IconTypes\";\n\nconst dimensions: {\n [key in TypeIconV2Size]: { container: string; icon: string };\n} = {\n default: { container: \"24px\", icon: \"18px\" },\n small: { container: \"20px\", icon: \"15px\" },\n};\n\n/**\n * Structural, non-semantic container that centers a caller-supplied SVG inside a\n * fixed-size box (slightly larger than the icon, for breathing room). The child\n * `svg` is sized via CSS to the icon dimensions and inherits color through\n * `currentColor` — no background or border.\n */\nconst Container = styled.span<{\n iconSize: TypeIconV2Size;\n}>`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: inherit;\n width: ${(props) => dimensions[props.iconSize].container};\n height: ${(props) => dimensions[props.iconSize].container};\n\n & > svg {\n width: ${(props) => dimensions[props.iconSize].icon};\n height: ${(props) => dimensions[props.iconSize].icon};\n flex-shrink: 0;\n fill: currentColor;\n }\n\n ${COMMON}\n ${FLEXBOX}\n ${LAYOUT}\n`;\n\nexport default Container;\n","import * as React from \"react\";\nimport type {\n TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n} from \"@sproutsocial/seeds-react-system-props\";\n\nexport type TypeIconV2Size =\n | \"default\" // 24x24 container, 18x18 icon\n | \"small\"; // 20x20 container, 15x15 icon\n\nexport interface TypeIconV2Props\n extends TypeStyledComponentsCommonProps,\n TypeSystemCommonProps,\n Omit<React.ComponentPropsWithoutRef<\"span\">, \"color\"> {\n /** Container/icon size variant. Defaults to `\"default\"` (24px container, 18px icon). */\n size?: TypeIconV2Size;\n /** The SVG element to render inside the container. Should use `viewBox=\"0 0 24 24\"` and `currentColor` fills. */\n children?: React.ReactNode;\n /** Alias for `children`. When both are provided, `children` wins. */\n icon?: React.ReactNode;\n /** When provided, the container gets `role=\"img\"` and this label, making a standalone icon accessible. Omit for decorative icons (the container is `aria-hidden` automatically). */\n \"aria-label\"?: string;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA,gBAAAA;AAAA,EAAA;AAAA;AAAA;;;ACAA,IAAAC,SAAuB;AACvB,IAAAC,4BAA4B;AAC5B,6BAAgB;;;ACYhB,IAAAC,SAAuB;AACvB,sCAAwB;AACxB,IAAAC,gCAAyB;AACzB,iCAA6D;AAC7D,IAAAC,mCAAsC;;;AClBtC,+BAA4B;AAC5B,2BAA8B;AAC9B,sCAAuB;AAGvB,IAAM,QAA2C;AAAA,EAC/C,MAAM;AAAA;AAAA,EAGN,SAAS;AAAA,EACT,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,OAAO;AACT;AAEA,IAAM,gBAAgB,CAAC,gBAAwB,eAAwB;AAAA,iBACtD,cAAc;AAAA;AAAA;AAAA;AAAA,cAIjB,cAAc;AAAA;AAAA;AAAA;AAAA,IAIxB,cACF;AAAA;AAAA;AAAA,eAGa,cAAc;AAAA;AAAA,GAE1B;AAAA;AAGH,IAAM,YAAY,yBAAAC,QAAO,KAAK,MAAM;AAAA,EAClC,WAAW;AACb,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,IAQG,CAAC,UAAU,cAAc,MAAM,MAAM,QAAQ,GAAG,MAAM,UAAU,CAAC;AAAA;AAAA,IAEjE,sCAAM;AAAA,IACN,kCAAa;AAAA;AAEjB,IAAO,iBAAQ;;;AC1Cf,mBAAkB;AAkEd;AA5DJ,SAAS,MACJ,QACK;AACR,QAAM,UAAoB,CAAC;AAE3B,aAAW,SAAS,QAAQ;AAC1B,QAAI,CAAC,MAAO;AAEZ,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,KAAK,KAAK;AAAA,IACpB,WAA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GAAG;AAAA,QACH,GAAG;AAAA,QAEH;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEAD,MAAK,cAAc;AAEnB,IAAOE,gBAAQF;;;AEjDf,IAAAG,SAAuB;;;ATEvB,IAAO,cAAQ;","names":["Icon_default","React","import_styled_components","React","import_seeds_react_utilities","import_seeds_react_system_props","styled","React","import_jsx_runtime","import_jsx_runtime","PartnerLogoNames","PartnerLogo","import_jsx_runtime","styled","Box","React","React","import_styled_components","import_seeds_react_system_props","Container","styled","styles_default","import_jsx_runtime","Icon","styles_default","Icon_default","React"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sproutsocial/seeds-react-icon",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.4",
|
|
4
4
|
"description": "Seeds React Icon component",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"test:watch": "jest --watch --coverage=false"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@sproutsocial/seeds-react-box": "^1.1.
|
|
38
|
-
"@sproutsocial/seeds-react-partner-logo": "^1.7.
|
|
37
|
+
"@sproutsocial/seeds-react-box": "^1.1.25",
|
|
38
|
+
"@sproutsocial/seeds-react-partner-logo": "^1.7.17",
|
|
39
39
|
"@sproutsocial/seeds-react-system-props": "^3.1.2",
|
|
40
|
-
"@sproutsocial/seeds-react-theme": "^4.2.
|
|
40
|
+
"@sproutsocial/seeds-react-theme": "^4.2.1",
|
|
41
41
|
"@sproutsocial/seeds-react-utilities": "^4.0.1",
|
|
42
42
|
"styled-system": "^5.1.5"
|
|
43
43
|
},
|