@mittwald/flow-react-components 1.6.0-next.60 → 1.6.0-next.61

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.
Files changed (82) hide show
  1. package/AGENTS.md +11 -0
  2. package/MIGRATION.md +205 -0
  3. package/USAGE.md +1 -1
  4. package/dist/assets/component-index.json +1 -1
  5. package/dist/assets/doc-properties.json +1 -1
  6. package/dist/css/all-layered.css +1 -1
  7. package/dist/css/all.css +8 -6
  8. package/dist/js/default.mjs +1 -1
  9. package/dist/js/internal.mjs +2 -2
  10. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +35 -11
  11. package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
  12. package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs +11 -11
  13. package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs.map +1 -1
  14. package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +1 -1
  15. package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +1 -1
  16. package/dist/js/packages/components/src/components/Alert/Alert.module.mjs.map +1 -1
  17. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs +8 -2
  18. package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
  19. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs +9 -7
  20. package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs.map +1 -1
  21. package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs +3 -7
  22. package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs.map +1 -1
  23. package/dist/js/packages/components/src/components/Badge/Badge.mjs +16 -3
  24. package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
  25. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs +11 -11
  26. package/dist/js/packages/components/src/components/Badge/Badge.module.mjs.map +1 -1
  27. package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs +1 -1
  28. package/dist/js/packages/components/src/components/Button/Button.mjs +1 -1
  29. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +1 -1
  30. package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
  31. package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs +1 -1
  32. package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs.map +1 -1
  33. package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs +1 -1
  34. package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
  35. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs +10 -10
  36. package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
  37. package/dist/js/packages/components/src/components/Color/Color.mjs +5 -6
  38. package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
  39. package/dist/js/packages/components/src/components/Color/Color.module.mjs +7 -5
  40. package/dist/js/packages/components/src/components/Color/Color.module.mjs.map +1 -1
  41. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs +1 -1
  42. package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
  43. package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs +1 -1
  44. package/dist/js/packages/components/src/components/Heading/Heading.mjs +1 -1
  45. package/dist/js/packages/components/src/components/Icon/Icon.mjs +5 -7
  46. package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
  47. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs +7 -5
  48. package/dist/js/packages/components/src/components/Icon/Icon.module.mjs.map +1 -1
  49. package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -1
  50. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs +1 -1
  51. package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
  52. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs +1 -1
  53. package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
  54. package/dist/js/packages/components/src/components/Link/Link.mjs +1 -1
  55. package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs +1 -1
  56. package/dist/js/packages/components/src/components/Notification/Notification.module.mjs.map +1 -1
  57. package/dist/js/packages/components/src/components/Overlay/Overlay.module.mjs.map +1 -1
  58. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs +1 -1
  59. package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
  60. package/dist/js/packages/components/src/components/Text/Text.mjs +1 -1
  61. package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs +20 -0
  62. package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs.map +1 -0
  63. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs +1 -1
  64. package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
  65. package/dist/js/packages/components/src/lib/types/props.mjs +17 -1
  66. package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
  67. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +1779 -1270
  68. package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
  69. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +1779 -1270
  70. package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
  71. package/dist/types/components/AccentBox/AccentBox.d.ts +12 -3
  72. package/dist/types/components/Avatar/Avatar.d.ts +7 -3
  73. package/dist/types/components/Avatar/avatarColors.d.ts +2 -1
  74. package/dist/types/components/Badge/Badge.d.ts +19 -3
  75. package/dist/types/components/Color/Color.d.ts +8 -4
  76. package/dist/types/components/Icon/Icon.d.ts +5 -3
  77. package/dist/types/lib/hooks/useDeprecatedColor.d.ts +9 -0
  78. package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +1478 -958
  79. package/dist/types/lib/tokens/CategoricalColors.d.ts +1 -1
  80. package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
  81. package/dist/types/lib/types/props.d.ts +12 -0
  82. package/package.json +10 -10
@@ -1 +1 @@
1
- {"version":3,"file":"Bar.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Bar/Bar.tsx"],"sourcesContent":["import { type ComponentType, type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport {\n type ChartDataValue,\n type DataKeyProp,\n type DataKeyWithLabel,\n isDataKeyWithLabel,\n} from \"@/components/CartesianChart/types\";\nimport { useCartesianChartContext } from \"@/components/CartesianChart/context\";\nimport { useScopedStackId } from \"@/components/CartesianChart/hooks/useScopedStackId\";\nimport { useChartAnimation } from \"@/components/CartesianChart/hooks/useChartAnimation\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\ntype BarBaseProps = Pick<\n Recharts.BarProps,\n | \"className\"\n | \"stackId\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"unit\"\n | \"barSize\"\n | \"maxBarSize\"\n | \"minPointSize\"\n> & {\n /** The color of the bar. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n};\n\nexport interface BarPropsByDataKeyProp<\n TData extends ChartDataValue = ChartDataValue,\n> extends BarBaseProps {\n dataKey: DataKeyProp<TData>;\n}\n\nexport interface BarPropsByDataKey<\n TData extends ChartDataValue = ChartDataValue,\n>\n extends BarBaseProps, DataKeyWithLabel<TData> {}\n\nexport type BarProps<TData extends ChartDataValue = ChartDataValue> =\n BarPropsByDataKey<TData> | BarPropsByDataKeyProp<TData>;\n\n/** @flr-generate all */\nexport const Bar: FC<BarProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const tokens = useDesignTokens();\n const animation = useChartAnimation();\n const { layout } = useCartesianChartContext();\n const stackId = useScopedStackId(props.stackId);\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n const cornerRadius = parseInt(tokens.bar[\"corner-radius\"].value);\n const radius: Recharts.BarProps[\"radius\"] =\n layout === \"vertical\"\n ? [0, cornerRadius, cornerRadius, 0]\n : [cornerRadius, cornerRadius, 0, 0];\n\n const bar = (\n <Recharts.Bar\n name={isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey}\n {...rest}\n stackId={stackId}\n fill={color}\n radius={stackId === undefined ? radius : 0}\n {...animation}\n />\n );\n\n if (stackId === undefined) {\n return bar;\n }\n\n // Every Bar of a stack renders its own BarStack, because a Bar cannot know\n // its siblings — they all describe the same clip path, so the duplicates are\n // redundant rather than conflicting.\n return (\n <Recharts.BarStack stackId={stackId} radius={radius}>\n {bar}\n </Recharts.BarStack>\n );\n};\n\nexport const TypedBar = <TData extends ChartDataValue = ChartDataValue>() =>\n Bar as ComponentType<BarPropsByDataKeyProp<TData>>;\n\nexport default Bar;\n"],"mappings":";;;;;;;;;;;;;AA8CA,IAAa,OAAqB,UAAU;CAC1C,MAAM,EAAE,OAAO,iBAAiB,aAAa,GAAG,SAAS;CAEzD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,YAAY,kBAAkB;CACpC,MAAM,EAAE,WAAW,yBAAyB;CAC5C,MAAM,UAAU,iBAAiB,MAAM,OAAO;CAE9C,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,MAAM,eAAe,SAAS,OAAO,IAAI,gBAAgB,CAAC,KAAK;CAC/D,MAAM,SACJ,WAAW,aACP;EAAC;EAAG;EAAc;EAAc;CAAC,IACjC;EAAC;EAAc;EAAc;EAAG;CAAC;CAEvC,MAAM,MACJ,oBAAC,SAAS,KAAV;EACE,MAAM,mBAAmB,KAAK,IAAI,MAAM,eAAe,MAAM;EAC7D,GAAI;EACK;EACT,MAAM;EACN,QAAQ,YAAY,KAAA,IAAY,SAAS;EACzC,GAAI;CACL,CAAA;CAGH,IAAI,YAAY,KAAA,GACd,OAAO;CAMT,OACE,oBAAC,SAAS,UAAV;EAA4B;EAAiB;EAC1C,UAAA;CACgB,CAAA;AAEvB;AAEA,IAAa,iBACX"}
1
+ {"version":3,"file":"Bar.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Bar/Bar.tsx"],"sourcesContent":["import { type ComponentType, type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport {\n type ChartDataValue,\n type DataKeyProp,\n type DataKeyWithLabel,\n isDataKeyWithLabel,\n} from \"@/components/CartesianChart/types\";\nimport { useCartesianChartContext } from \"@/components/CartesianChart/context\";\nimport { useScopedStackId } from \"@/components/CartesianChart/hooks/useScopedStackId\";\nimport { useChartAnimation } from \"@/components/CartesianChart/hooks/useChartAnimation\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\ntype BarBaseProps = Pick<\n Recharts.BarProps,\n | \"className\"\n | \"stackId\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"unit\"\n | \"barSize\"\n | \"maxBarSize\"\n | \"minPointSize\"\n> & {\n /** The color of the bar. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n};\n\nexport interface BarPropsByDataKeyProp<\n TData extends ChartDataValue = ChartDataValue,\n> extends BarBaseProps {\n dataKey: DataKeyProp<TData>;\n}\n\nexport interface BarPropsByDataKey<\n TData extends ChartDataValue = ChartDataValue,\n>\n extends BarBaseProps, DataKeyWithLabel<TData> {}\n\nexport type BarProps<TData extends ChartDataValue = ChartDataValue> =\n BarPropsByDataKey<TData> | BarPropsByDataKeyProp<TData>;\n\n/** @flr-generate all */\nexport const Bar: FC<BarProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const tokens = useDesignTokens();\n const animation = useChartAnimation();\n const { layout } = useCartesianChartContext();\n const stackId = useScopedStackId(props.stackId);\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--categorical--color--${colorFromProps})`\n : colorFromProps;\n\n const cornerRadius = parseInt(tokens.bar[\"corner-radius\"].value);\n const radius: Recharts.BarProps[\"radius\"] =\n layout === \"vertical\"\n ? [0, cornerRadius, cornerRadius, 0]\n : [cornerRadius, cornerRadius, 0, 0];\n\n const bar = (\n <Recharts.Bar\n name={isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey}\n {...rest}\n stackId={stackId}\n fill={color}\n radius={stackId === undefined ? radius : 0}\n {...animation}\n />\n );\n\n if (stackId === undefined) {\n return bar;\n }\n\n // Every Bar of a stack renders its own BarStack, because a Bar cannot know\n // its siblings — they all describe the same clip path, so the duplicates are\n // redundant rather than conflicting.\n return (\n <Recharts.BarStack stackId={stackId} radius={radius}>\n {bar}\n </Recharts.BarStack>\n );\n};\n\nexport const TypedBar = <TData extends ChartDataValue = ChartDataValue>() =>\n Bar as ComponentType<BarPropsByDataKeyProp<TData>>;\n\nexport default Bar;\n"],"mappings":";;;;;;;;;;;;;AA8CA,IAAa,OAAqB,UAAU;CAC1C,MAAM,EAAE,OAAO,iBAAiB,aAAa,GAAG,SAAS;CAEzD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,YAAY,kBAAkB;CACpC,MAAM,EAAE,WAAW,yBAAyB;CAC5C,MAAM,UAAU,iBAAiB,MAAM,OAAO;CAE9C,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,MAAM,eAAe,SAAS,OAAO,IAAI,gBAAgB,CAAC,KAAK;CAC/D,MAAM,SACJ,WAAW,aACP;EAAC;EAAG;EAAc;EAAc;CAAC,IACjC;EAAC;EAAc;EAAc;EAAG;CAAC;CAEvC,MAAM,MACJ,oBAAC,SAAS,KAAV;EACE,MAAM,mBAAmB,KAAK,IAAI,MAAM,eAAe,MAAM;EAC7D,GAAI;EACK;EACT,MAAM;EACN,QAAQ,YAAY,KAAA,IAAY,SAAS;EACzC,GAAI;CACL,CAAA;CAGH,IAAI,YAAY,KAAA,GACd,OAAO;CAMT,OACE,oBAAC,SAAS,UAAV;EAA4B;EAAiB;EAC1C,UAAA;CACgB,CAAA;AAEvB;AAEA,IAAa,iBACX"}
@@ -13,7 +13,7 @@ var Line = (props) => {
13
13
  const { color: colorFromProps = "sea-green", ...rest } = props;
14
14
  const tokens = useDesignTokens();
15
15
  const animation = useChartAnimation();
16
- const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
16
+ const color = isCategoricalColor(colorFromProps) ? `var(--categorical--color--${colorFromProps})` : colorFromProps;
17
17
  return /* @__PURE__ */ jsx(Recharts.Line, {
18
18
  ...rest,
19
19
  fill: color,
@@ -1 +1 @@
1
- {"version":3,"file":"Line.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"sourcesContent":["import { type ComponentType, type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport type {\n ChartDataValue,\n DataKey,\n} from \"@/components/CartesianChart/types\";\nimport { useChartAnimation } from \"@/components/CartesianChart/hooks/useChartAnimation\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\nexport interface LineProps<\n TData extends ChartDataValue = ChartDataValue,\n> extends Pick<\n Recharts.LineProps,\n \"className\" | \"key\" | \"xAxisId\" | \"yAxisId\" | \"type\" | \"unit\"\n> {\n dataKey?: DataKey<TData>;\n /** The color of the line. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Line: FC<LineProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const tokens = useDesignTokens();\n const animation = useChartAnimation();\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Line\n {...rest}\n fill={color}\n activeDot={<AreaDot color={color} />}\n dot={false}\n stroke={color}\n strokeWidth={tokens.line[\"border-width\"].value}\n {...animation}\n />\n );\n};\n\nexport const TypedLine = <T extends ChartDataValue = ChartDataValue>() =>\n Line as ComponentType<LineProps<T>>;\n\nexport default Line;\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,QAAuB,UAAU;CAC5C,MAAM,EAAE,OAAO,iBAAiB,aAAa,GAAG,SAAS;CAEzD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,YAAY,kBAAkB;CAEpC,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,OACE,oBAAC,SAAS,MAAV;EACE,GAAI;EACJ,MAAM;EACN,WAAW,oBAAC,SAAD,EAAgB,MAAQ,CAAA;EACnC,KAAK;EACL,QAAQ;EACR,aAAa,OAAO,KAAK,eAAe,CAAC;EACzC,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,kBACX"}
1
+ {"version":3,"file":"Line.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"sourcesContent":["import { type ComponentType, type FC } from \"react\";\nimport * as Recharts from \"recharts\";\nimport { AreaDot } from \"../AreaDot\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport type {\n ChartDataValue,\n DataKey,\n} from \"@/components/CartesianChart/types\";\nimport { useChartAnimation } from \"@/components/CartesianChart/hooks/useChartAnimation\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\nexport interface LineProps<\n TData extends ChartDataValue = ChartDataValue,\n> extends Pick<\n Recharts.LineProps,\n \"className\" | \"key\" | \"xAxisId\" | \"yAxisId\" | \"type\" | \"unit\"\n> {\n dataKey?: DataKey<TData>;\n /** The color of the line. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Line: FC<LineProps> = (props) => {\n const { color: colorFromProps = \"sea-green\", ...rest } = props;\n\n const tokens = useDesignTokens();\n const animation = useChartAnimation();\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--categorical--color--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Line\n {...rest}\n fill={color}\n activeDot={<AreaDot color={color} />}\n dot={false}\n stroke={color}\n strokeWidth={tokens.line[\"border-width\"].value}\n {...animation}\n />\n );\n};\n\nexport const TypedLine = <T extends ChartDataValue = ChartDataValue>() =>\n Line as ComponentType<LineProps<T>>;\n\nexport default Line;\n"],"mappings":";;;;;;;;;;;AAwBA,IAAa,QAAuB,UAAU;CAC5C,MAAM,EAAE,OAAO,iBAAiB,aAAa,GAAG,SAAS;CAEzD,MAAM,SAAS,gBAAgB;CAC/B,MAAM,YAAY,kBAAkB;CAEpC,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,OACE,oBAAC,SAAS,MAAV;EACE,GAAI;EACJ,MAAM;EACN,WAAW,oBAAC,SAAD,EAAgB,MAAQ,CAAA;EACnC,KAAK;EACL,QAAQ;EACR,aAAa,OAAO,KAAK,eAAe,CAAC;EACzC,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,kBACX"}
@@ -17,7 +17,7 @@ var defaultLightTheme = githubLightInit({
17
17
  styles: [
18
18
  {
19
19
  tag: tags.keyword,
20
- color: "var(--color--code-syntax--keyword)"
20
+ color: "var(--code-syntax--color--keyword)"
21
21
  },
22
22
  {
23
23
  tag: [
@@ -25,39 +25,39 @@ var defaultLightTheme = githubLightInit({
25
25
  tags.className,
26
26
  tags.tagName
27
27
  ],
28
- color: "var(--color--code-syntax--type)"
28
+ color: "var(--code-syntax--color--type)"
29
29
  },
30
30
  {
31
31
  tag: tags.variableName,
32
- color: "var(--color--code-syntax--variable)"
32
+ color: "var(--code-syntax--color--variable)"
33
33
  },
34
34
  {
35
35
  tag: [tags.propertyName, tags.attributeName],
36
- color: "var(--color--code-syntax--property)"
36
+ color: "var(--code-syntax--color--property)"
37
37
  },
38
38
  {
39
39
  tag: [tags.string, tags.regexp],
40
- color: "var(--color--code-syntax--string)"
40
+ color: "var(--code-syntax--color--string)"
41
41
  },
42
42
  {
43
43
  tag: tags.number,
44
- color: "var(--color--code-syntax--number)"
44
+ color: "var(--code-syntax--color--number)"
45
45
  },
46
46
  {
47
47
  tag: tags.comment,
48
- color: "var(--color--code-syntax--comment)"
48
+ color: "var(--code-syntax--color--comment)"
49
49
  },
50
50
  {
51
51
  tag: [tags.function(tags.variableName), tags.function(tags.propertyName)],
52
- color: "var(--color--code-syntax--function)"
52
+ color: "var(--code-syntax--color--function)"
53
53
  },
54
54
  {
55
55
  tag: [tags.operator, tags.typeOperator],
56
- color: "var(--color--code-syntax--operator)"
56
+ color: "var(--code-syntax--color--operator)"
57
57
  },
58
58
  {
59
59
  tag: tags.invalid,
60
- color: "var(--color--code-syntax--invalid)"
60
+ color: "var(--code-syntax--color--invalid)"
61
61
  }
62
62
  ]
63
63
  });
@@ -1 +1 @@
1
- {"version":3,"file":"defaultEditorTheme.mjs","names":["t"],"sources":["../../../../../../../../src/components/CodeEditor/themes/defaultEditorTheme.ts"],"sourcesContent":["import { githubLightInit } from \"@uiw/codemirror-theme-github\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const defaultLightTheme = githubLightInit({\n theme: \"light\",\n settings: {\n fontSize: \"var(--code-editor--font-size)\",\n fontFamily: \"var(--code-editor--font-family)\",\n foreground: \"var(--form-control--content-color--default)\",\n background: \"transparent\",\n gutterBackground: \"var(--form-control--background-color--default)\",\n gutterForeground: \"var(--form-control--content-color--default)\",\n gutterBorder: \"var(--code-editor--gutter-separator-color)\",\n },\n styles: [\n { tag: t.keyword, color: \"var(--color--code-syntax--keyword)\" },\n {\n tag: [t.typeName, t.className, t.tagName],\n color: \"var(--color--code-syntax--type)\",\n },\n { tag: t.variableName, color: \"var(--color--code-syntax--variable)\" },\n {\n tag: [t.propertyName, t.attributeName],\n color: \"var(--color--code-syntax--property)\",\n },\n { tag: [t.string, t.regexp], color: \"var(--color--code-syntax--string)\" },\n { tag: t.number, color: \"var(--color--code-syntax--number)\" },\n { tag: t.comment, color: \"var(--color--code-syntax--comment)\" },\n {\n tag: [t.function(t.variableName), t.function(t.propertyName)],\n color: \"var(--color--code-syntax--function)\",\n },\n {\n tag: [t.operator, t.typeOperator],\n color: \"var(--color--code-syntax--operator)\",\n },\n { tag: t.invalid, color: \"var(--color--code-syntax--invalid)\" },\n ],\n});\n"],"mappings":";;;;;AAGA,IAAa,oBAAoB,gBAAgB;CAC/C,OAAO;CACP,UAAU;EACR,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;CAChB;CACA,QAAQ;EACN;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK;IAACA,KAAE;IAAUA,KAAE;IAAWA,KAAE;GAAO;GACxC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAc,OAAO;EAAsC;EACpE;GACE,KAAK,CAACA,KAAE,cAAcA,KAAE,aAAa;GACrC,OAAO;EACT;EACA;GAAE,KAAK,CAACA,KAAE,QAAQA,KAAE,MAAM;GAAG,OAAO;EAAoC;EACxE;GAAE,KAAKA,KAAE;GAAQ,OAAO;EAAoC;EAC5D;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK,CAACA,KAAE,SAASA,KAAE,YAAY,GAAGA,KAAE,SAASA,KAAE,YAAY,CAAC;GAC5D,OAAO;EACT;EACA;GACE,KAAK,CAACA,KAAE,UAAUA,KAAE,YAAY;GAChC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;CAChE;AACF,CAAC"}
1
+ {"version":3,"file":"defaultEditorTheme.mjs","names":["t"],"sources":["../../../../../../../../src/components/CodeEditor/themes/defaultEditorTheme.ts"],"sourcesContent":["import { githubLightInit } from \"@uiw/codemirror-theme-github\";\nimport { tags as t } from \"@lezer/highlight\";\n\nexport const defaultLightTheme = githubLightInit({\n theme: \"light\",\n settings: {\n fontSize: \"var(--code-editor--font-size)\",\n fontFamily: \"var(--code-editor--font-family)\",\n foreground: \"var(--form-control--content-color--default)\",\n background: \"transparent\",\n gutterBackground: \"var(--form-control--background-color--default)\",\n gutterForeground: \"var(--form-control--content-color--default)\",\n gutterBorder: \"var(--code-editor--gutter-separator-color)\",\n },\n styles: [\n { tag: t.keyword, color: \"var(--code-syntax--color--keyword)\" },\n {\n tag: [t.typeName, t.className, t.tagName],\n color: \"var(--code-syntax--color--type)\",\n },\n { tag: t.variableName, color: \"var(--code-syntax--color--variable)\" },\n {\n tag: [t.propertyName, t.attributeName],\n color: \"var(--code-syntax--color--property)\",\n },\n { tag: [t.string, t.regexp], color: \"var(--code-syntax--color--string)\" },\n { tag: t.number, color: \"var(--code-syntax--color--number)\" },\n { tag: t.comment, color: \"var(--code-syntax--color--comment)\" },\n {\n tag: [t.function(t.variableName), t.function(t.propertyName)],\n color: \"var(--code-syntax--color--function)\",\n },\n {\n tag: [t.operator, t.typeOperator],\n color: \"var(--code-syntax--color--operator)\",\n },\n { tag: t.invalid, color: \"var(--code-syntax--color--invalid)\" },\n ],\n});\n"],"mappings":";;;;;AAGA,IAAa,oBAAoB,gBAAgB;CAC/C,OAAO;CACP,UAAU;EACR,UAAU;EACV,YAAY;EACZ,YAAY;EACZ,YAAY;EACZ,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;CAChB;CACA,QAAQ;EACN;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK;IAACA,KAAE;IAAUA,KAAE;IAAWA,KAAE;GAAO;GACxC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAc,OAAO;EAAsC;EACpE;GACE,KAAK,CAACA,KAAE,cAAcA,KAAE,aAAa;GACrC,OAAO;EACT;EACA;GAAE,KAAK,CAACA,KAAE,QAAQA,KAAE,MAAM;GAAG,OAAO;EAAoC;EACxE;GAAE,KAAKA,KAAE;GAAQ,OAAO;EAAoC;EAC5D;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;EAC9D;GACE,KAAK,CAACA,KAAE,SAASA,KAAE,YAAY,GAAGA,KAAE,SAASA,KAAE,YAAY,CAAC;GAC5D,OAAO;EACT;EACA;GACE,KAAK,CAACA,KAAE,UAAUA,KAAE,YAAY;GAChC,OAAO;EACT;EACA;GAAE,KAAKA,KAAE;GAAS,OAAO;EAAqC;CAChE;AACF,CAAC"}
@@ -1,15 +1,13 @@
1
1
  "use client"
2
2
  /* */
3
- import { alphaColors, statusTypes } from "../../lib/types/props.mjs";
3
+ import { alphaColors, decorativeColors, deprecatedDecorativeColors, statusTypes } from "../../lib/types/props.mjs";
4
+ import { useDeprecatedColor } from "../../lib/hooks/useDeprecatedColor.mjs";
4
5
  import Color_module_default from "./Color.module.mjs";
5
6
  import clsx from "clsx";
6
7
  import { jsx } from "react/jsx-runtime";
7
8
  // src/components/Color/Color.tsx
8
9
  var flowColors = [
9
- "blue",
10
- "violet",
11
- "teal",
12
- "lilac",
10
+ ...decorativeColors,
13
11
  ...statusTypes,
14
12
  ...alphaColors
15
13
  ];
@@ -18,7 +16,8 @@ function isFlowColor(something) {
18
16
  }
19
17
  /** @flr-generate all */
20
18
  var Color = (props) => {
21
- const { children, className, color = "blue" } = props;
19
+ const { children, className, color: colorFromProps = "blue" } = props;
20
+ const color = useDeprecatedColor(colorFromProps, deprecatedDecorativeColors) ?? "blue";
22
21
  const isAFlowColor = isFlowColor(color);
23
22
  const rootClassName = clsx(isAFlowColor && Color_module_default[color], className);
24
23
  return /* @__PURE__ */ jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"Color.mjs","names":["anyFlowColors","styles"],"sources":["../../../../../../../src/components/Color/Color.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Color.module.scss\";\nimport {\n alphaColors,\n type PropsWithClassName,\n statusTypes,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\n\nconst flowColors = [\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype FlowColor = (typeof flowColors)[number];\ntype FlowWithCustomColor = FlowColor | (string & {});\n\nfunction isFlowColor(something: unknown): something is FlowColor {\n const anyFlowColors = flowColors as readonly string[];\n return typeof something === \"string\" && anyFlowColors.includes(something);\n}\n\nexport interface ColorProps extends PropsWithChildren, PropsWithClassName {\n /** The color of the element. @default \"blue\" */\n color?: FlowWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Color: FC<ColorProps> = (props) => {\n const { children, className, color = \"blue\" } = props;\n\n const isAFlowColor = isFlowColor(color);\n const rootClassName = clsx(isAFlowColor && styles[color], className);\n const style = !isAFlowColor ? { color } : undefined;\n\n return (\n <span className={rootClassName} style={style}>\n {children}\n </span>\n );\n};\n\nexport default Color;\n"],"mappings":";;;;;;;AASA,IAAM,aAAa;CACjB;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL;AAKA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAYA,WAAc,SAAS,SAAS;AAC1E;;AAQA,IAAa,SAAyB,UAAU;CAC9C,MAAM,EAAE,UAAU,WAAW,QAAQ,WAAW;CAEhD,MAAM,eAAe,YAAY,KAAK;CACtC,MAAM,gBAAgB,KAAK,gBAAgBC,qBAAO,QAAQ,SAAS;CAGnE,OACE,oBAAC,QAAD;EAAM,WAAW;EAAsB,OAH3B,CAAC,eAAe,EAAE,MAAM,IAAI,KAAA;EAIrC;CACG,CAAA;AAEV"}
1
+ {"version":3,"file":"Color.mjs","names":["anyFlowColors","styles"],"sources":["../../../../../../../src/components/Color/Color.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./Color.module.scss\";\nimport {\n alphaColors,\n decorativeColors,\n deprecatedDecorativeColors,\n type DeprecatedDecorativeColor,\n type PropsWithClassName,\n statusTypes,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport { useDeprecatedColor } from \"@/lib/hooks/useDeprecatedColor\";\n\nconst flowColors = [\n ...decorativeColors,\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype FlowColor = (typeof flowColors)[number];\ntype FlowWithCustomColor =\n FlowColor | DeprecatedDecorativeColor | (string & {});\n\nfunction isFlowColor(something: unknown): something is FlowColor {\n const anyFlowColors = flowColors as readonly string[];\n return typeof something === \"string\" && anyFlowColors.includes(something);\n}\n\nexport interface ColorProps extends PropsWithChildren, PropsWithClassName {\n /**\n * The color of the element. @default \"blue\"\n *\n * @deprecatedValues violet, teal\n */\n color?: FlowWithCustomColor;\n}\n\n/** @flr-generate all */\nexport const Color: FC<ColorProps> = (props) => {\n const { children, className, color: colorFromProps = \"blue\" } = props;\n const color =\n useDeprecatedColor(colorFromProps, deprecatedDecorativeColors) ?? \"blue\";\n\n const isAFlowColor = isFlowColor(color);\n const rootClassName = clsx(isAFlowColor && styles[color], className);\n const style = !isAFlowColor ? { color } : undefined;\n\n return (\n <span className={rootClassName} style={style}>\n {children}\n </span>\n );\n};\n\nexport default Color;\n"],"mappings":";;;;;;;;AAaA,IAAM,aAAa;CACjB,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAMA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAYA,WAAc,SAAS,SAAS;AAC1E;;AAYA,IAAa,SAAyB,UAAU;CAC9C,MAAM,EAAE,UAAU,WAAW,OAAO,iBAAiB,WAAW;CAChE,MAAM,QACJ,mBAAmB,gBAAgB,0BAA0B,KAAK;CAEpE,MAAM,eAAe,YAAY,KAAK;CACtC,MAAM,gBAAgB,KAAK,gBAAgBC,qBAAO,QAAQ,SAAS;CAGnE,OACE,oBAAC,QAAD;EAAM,WAAW;EAAsB,OAH3B,CAAC,eAAe,EAAE,MAAM,IAAI,KAAA;EAIrC;CACG,CAAA;AAEV"}
@@ -2,9 +2,10 @@
2
2
  /* */
3
3
  // src/components/Color/Color.module.scss
4
4
  var blue = "flow--color--blue";
5
- var violet = "flow--color--violet";
6
- var teal = "flow--color--teal";
5
+ var navy = "flow--color--navy";
7
6
  var lilac = "flow--color--lilac";
7
+ var sage = "flow--color--sage";
8
+ var salmon = "flow--color--salmon";
8
9
  var danger = "flow--color--danger";
9
10
  var warning = "flow--color--warning";
10
11
  var success = "flow--color--success";
@@ -14,9 +15,10 @@ var light = "flow--color--light";
14
15
  var dark = "flow--color--dark";
15
16
  var Color_module_default = {
16
17
  blue,
17
- violet,
18
- teal,
18
+ navy,
19
19
  lilac,
20
+ sage,
21
+ salmon,
20
22
  danger,
21
23
  warning,
22
24
  success,
@@ -27,6 +29,6 @@ var Color_module_default = {
27
29
  "light-static": "flow--color--light-static",
28
30
  "dark-static": "flow--color--dark-static"
29
31
  };
30
- export { blue, danger, dark, Color_module_default as default, info, light, lilac, success, teal, unavailable, violet, warning };
32
+ export { blue, danger, dark, Color_module_default as default, info, light, lilac, navy, sage, salmon, success, unavailable, warning };
31
33
 
32
34
  //# sourceMappingURL=Color.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Color.module.mjs","names":[],"sources":["../../../../../../../src/components/Color/Color.module.scss"],"sourcesContent":[".blue {\n color: var(--primary--color--1000);\n}\n\n.violet {\n color: var(--color--soft-contrast-violet--800);\n}\n\n.teal {\n color: var(--color--super-teal--800);\n}\n\n.lilac {\n color: var(--color--bright-lilac--800);\n}\n\n.danger {\n color: var(--danger-plain-content-color);\n}\n\n.warning {\n color: var(--warning-plain-content-color);\n}\n\n.success {\n color: var(--success-plain-content-color);\n}\n\n.info {\n color: var(--info-plain-content-color);\n}\n\n.unavailable {\n color: var(--unavailable-plain-content-color);\n}\n\n.light {\n color: var(--light-plain-content-color);\n}\n\n.dark {\n color: var(--dark-plain-content-color);\n}\n\n.light-static {\n color: var(--light-static-plain-content-color);\n}\n\n.dark-static {\n color: var(--dark-static-plain-content-color);\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Color.module.mjs","names":[],"sources":["../../../../../../../src/components/Color/Color.module.scss"],"sourcesContent":[".blue {\n color: var(--decorative-blue--color--content);\n}\n\n.navy {\n color: var(--decorative-navy--color--content);\n}\n\n.lilac {\n color: var(--decorative-lilac--color--content);\n}\n\n.sage {\n color: var(--decorative-sage--color--content);\n}\n\n.salmon {\n color: var(--decorative-salmon--color--content);\n}\n\n.danger {\n color: var(--danger-plain-content-color);\n}\n\n.warning {\n color: var(--warning-plain-content-color);\n}\n\n.success {\n color: var(--success-plain-content-color);\n}\n\n.info {\n color: var(--info-plain-content-color);\n}\n\n.unavailable {\n color: var(--unavailable-plain-content-color);\n}\n\n.light {\n color: var(--light-plain-content-color);\n}\n\n.dark {\n color: var(--dark-plain-content-color);\n}\n\n.light-static {\n color: var(--light-static-plain-content-color);\n}\n\n.dark-static {\n color: var(--dark-static-plain-content-color);\n}\n"],"mappings":""}
@@ -30,7 +30,7 @@ var DonutChartFill = (props) => {
30
30
  const segmentPercent = 100 / maxValue * s.value;
31
31
  const currentOffsetPercent = offsetPercent;
32
32
  offsetPercent = offsetPercent + segmentPercent;
33
- const color = !s.color || isCategoricalColor(s.color) ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})` : s.color;
33
+ const color = !s.color || isCategoricalColor(s.color) ? `var(--categorical--color--${s.color ?? getCategoricalColorByIndex(i)})` : s.color;
34
34
  return /* @__PURE__ */ jsx("circle", {
35
35
  className: DonutChart_module_default.segment,
36
36
  cx: center,
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartFill.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartFill.tsx"],"sourcesContent":["import type { CSSProperties, FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\ninterface Props extends Pick<DonutChartProps, \"segments\"> {\n center: number;\n value?: number;\n radius: number;\n maxValue: number;\n}\n\n/**\n * `pathLength=\"100\"` measures the stroke in percent, so the stylesheet draws\n * and rotates each circle from its share and its offset alone – and the load-in\n * keyframes can grow every segment out of 12 o'clock.\n */\nconst fillStyle = (percent: number, offsetPercent: number): CSSProperties => ({\n \"--donut-chart--percent\": percent,\n \"--donut-chart--offset\": offsetPercent,\n});\n\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const percent = (100 / maxValue) * value;\n\n if (!segments) {\n return (\n <circle\n className={styles.fill}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n style={fillStyle(percent, 0)}\n />\n );\n }\n\n let offsetPercent = 0;\n\n return segments.map((s, i) => {\n const segmentPercent = (100 / maxValue) * s.value;\n\n const currentOffsetPercent = offsetPercent;\n\n offsetPercent = offsetPercent + segmentPercent;\n\n const color =\n !s.color || isCategoricalColor(s.color)\n ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})`\n : s.color;\n\n // Index keys: a segment added after mount animates alone out of 12 o'clock,\n // over the segments already there.\n return (\n <circle\n key={i}\n className={styles.segment}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n stroke={color}\n style={fillStyle(segmentPercent, currentOffsetPercent)}\n />\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAM,aAAa,SAAiB,mBAA0C;CAC5E,0BAA0B;CAC1B,yBAAyB;AAC3B;AAEA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa;CAE1D,MAAM,UAAW,MAAM,WAAY;CAEnC,IAAI,CAAC,UACH,OACE,oBAAC,UAAD;EACE,WAAWA,0BAAO;EAClB,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,YAAY;EACZ,OAAO,UAAU,SAAS,CAAC;CAC5B,CAAA;CAIL,IAAI,gBAAgB;CAEpB,OAAO,SAAS,KAAK,GAAG,MAAM;EAC5B,MAAM,iBAAkB,MAAM,WAAY,EAAE;EAE5C,MAAM,uBAAuB;EAE7B,gBAAgB,gBAAgB;EAEhC,MAAM,QACJ,CAAC,EAAE,SAAS,mBAAmB,EAAE,KAAK,IAClC,6BAA6B,EAAE,SAAS,2BAA2B,CAAC,EAAE,KACtE,EAAE;EAIR,OACE,oBAAC,UAAD;GAEE,WAAWA,0BAAO;GAClB,IAAI;GACJ,IAAI;GACJ,GAAG;GACH,YAAY;GACZ,QAAQ;GACR,OAAO,UAAU,gBAAgB,oBAAoB;EACtD,GARM,CAQN;CAEL,CAAC;AACH"}
1
+ {"version":3,"file":"DonutChartFill.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartFill.tsx"],"sourcesContent":["import type { CSSProperties, FC } from \"react\";\nimport styles from \"@/components/DonutChart/DonutChart.module.scss\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\n\ninterface Props extends Pick<DonutChartProps, \"segments\"> {\n center: number;\n value?: number;\n radius: number;\n maxValue: number;\n}\n\n/**\n * `pathLength=\"100\"` measures the stroke in percent, so the stylesheet draws\n * and rotates each circle from its share and its offset alone – and the load-in\n * keyframes can grow every segment out of 12 o'clock.\n */\nconst fillStyle = (percent: number, offsetPercent: number): CSSProperties => ({\n \"--donut-chart--percent\": percent,\n \"--donut-chart--offset\": offsetPercent,\n});\n\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const percent = (100 / maxValue) * value;\n\n if (!segments) {\n return (\n <circle\n className={styles.fill}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n style={fillStyle(percent, 0)}\n />\n );\n }\n\n let offsetPercent = 0;\n\n return segments.map((s, i) => {\n const segmentPercent = (100 / maxValue) * s.value;\n\n const currentOffsetPercent = offsetPercent;\n\n offsetPercent = offsetPercent + segmentPercent;\n\n const color =\n !s.color || isCategoricalColor(s.color)\n ? `var(--categorical--color--${s.color ?? getCategoricalColorByIndex(i)})`\n : s.color;\n\n // Index keys: a segment added after mount animates alone out of 12 o'clock,\n // over the segments already there.\n return (\n <circle\n key={i}\n className={styles.segment}\n cx={center}\n cy={center}\n r={radius}\n pathLength={100}\n stroke={color}\n style={fillStyle(segmentPercent, currentOffsetPercent)}\n />\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;AAkBA,IAAM,aAAa,SAAiB,mBAA0C;CAC5E,0BAA0B;CAC1B,yBAAyB;AAC3B;AAEA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa;CAE1D,MAAM,UAAW,MAAM,WAAY;CAEnC,IAAI,CAAC,UACH,OACE,oBAAC,UAAD;EACE,WAAWA,0BAAO;EAClB,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,YAAY;EACZ,OAAO,UAAU,SAAS,CAAC;CAC5B,CAAA;CAIL,IAAI,gBAAgB;CAEpB,OAAO,SAAS,KAAK,GAAG,MAAM;EAC5B,MAAM,iBAAkB,MAAM,WAAY,EAAE;EAE5C,MAAM,uBAAuB;EAE7B,gBAAgB,gBAAgB;EAEhC,MAAM,QACJ,CAAC,EAAE,SAAS,mBAAmB,EAAE,KAAK,IAClC,6BAA6B,EAAE,SAAS,2BAA2B,CAAC,EAAE,KACtE,EAAE;EAIR,OACE,oBAAC,UAAD;GAEE,WAAWA,0BAAO;GAClB,IAAI;GACJ,IAAI;GACJ,GAAG;GACH,YAAY;GACZ,QAAQ;GACR,OAAO,UAAU,gBAAgB,oBAAoB;EACtD,GARM,CAQN;CAEL,CAAC;AACH"}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  /* */
3
+ import { isAlphaColor } from "../../lib/types/props.mjs";
3
4
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
5
  import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
5
6
  import { containsTextChild } from "../../lib/react/remote.mjs";
6
- import { isAlphaColor } from "../../lib/types/props.mjs";
7
7
  import { Text } from "../Text/Text.mjs";
8
8
  import HeaderNavigation_module_default from "./HeaderNavigation.module.mjs";
9
9
  import clsx from "clsx";
@@ -3,9 +3,9 @@
3
3
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
4
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
5
  import { useRegisterSectionHeading } from "../Section/context.mjs";
6
+ import { styleClassname } from "../../lib/scss/selectors.mjs";
6
7
  import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
7
8
  import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
8
- import { styleClassname } from "../../lib/scss/selectors.mjs";
9
9
  import { SkeletonTextContent } from "../SkeletonMode/components/SkeletonTextContent/SkeletonTextContent.mjs";
10
10
  import Heading_module_default from "./Heading.module.mjs";
11
11
  import clsx from "clsx";
@@ -1,10 +1,11 @@
1
1
  "use client"
2
2
  /* */
3
+ import { alphaColors, decorativeColors, deprecatedDecorativeColors, statusTypes } from "../../lib/types/props.mjs";
3
4
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
+ import { useWarnDeprecation } from "../DeprecationWarningProvider/DeprecationWarningProvider.mjs";
6
+ import { useDeprecatedColor } from "../../lib/hooks/useDeprecatedColor.mjs";
4
7
  import Icon_module_default from "./Icon.module.mjs";
5
8
  import { cloneElement as cloneElement$1 } from "../../lib/react/cloneElement.mjs";
6
- import { alphaColors, statusTypes } from "../../lib/types/props.mjs";
7
- import { useWarnDeprecation } from "../DeprecationWarningProvider/DeprecationWarningProvider.mjs";
8
9
  import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
9
10
  import clsx from "clsx";
10
11
  import React from "react";
@@ -12,10 +13,7 @@ import { jsx } from "react/jsx-runtime";
12
13
  // src/components/Icon/Icon.tsx
13
14
  var iconColors = [
14
15
  "neutral",
15
- "blue",
16
- "violet",
17
- "teal",
18
- "lilac",
16
+ ...decorativeColors,
19
17
  ...statusTypes,
20
18
  ...alphaColors
21
19
  ];
@@ -28,7 +26,7 @@ var Icon = flowComponent("Icon", (props) => {
28
26
  const isSkeleton = useSkeletonMode();
29
27
  const { className, "aria-label": ariaLabel, children, size = "m", status, color, ...svgAttributes } = props;
30
28
  if (status !== void 0) warnDeprecation("The 'status' prop is deprecated and will be removed in a future release. Use 'color' instead.");
31
- const resolvedColor = color ?? status;
29
+ const resolvedColor = useDeprecatedColor(color, deprecatedDecorativeColors) ?? status;
32
30
  const paletteColor = isIconColor(resolvedColor) ? resolvedColor : void 0;
33
31
  const customColor = paletteColor === void 0 ? resolvedColor : void 0;
34
32
  const customColorStyle = customColor ? {
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.mjs","names":["anyIconColors","styles","cloneElement"],"sources":["../../../../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { PropsWithChildren, SVGAttributes } from \"react\";\nimport React from \"react\";\nimport styles from \"./Icon.module.scss\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { cloneElement } from \"@/lib/react/cloneElement\";\nimport { alphaColors, type Status, statusTypes } from \"@/lib/types/props\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\ntype SvgAttributeProps = SVGAttributes<SVGSVGElement>;\n\nconst iconColors = [\n \"neutral\",\n \"blue\",\n \"violet\",\n \"teal\",\n \"lilac\",\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype IconColor = (typeof iconColors)[number];\ntype IconWithCustomColor = IconColor | (string & {});\n\nfunction isIconColor(something: unknown): something is IconColor {\n const anyIconColors = iconColors as readonly string[];\n return typeof something === \"string\" && anyIconColors.includes(something);\n}\n\nexport interface IconProps\n extends\n PropsWithChildren<Omit<SvgAttributeProps, \"name\" | \"color\">>,\n FlowComponentProps {\n /** The size of the icon. @default \"m\" */\n size?: \"s\" | \"m\" | \"l\";\n /**\n * The color of the icon. Besides the Flow colors, any custom CSS color is\n * supported. Inherits the surrounding text color when unset.\n */\n color?: IconWithCustomColor;\n /**\n * The elements status.\n *\n * @deprecated Use `color` instead.\n */\n status?: Status;\n}\n\n/** @flr-generate all */\nexport const Icon = flowComponent(\"Icon\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const isSkeleton = useSkeletonMode();\n const {\n className,\n \"aria-label\": ariaLabel,\n children,\n size = \"m\",\n status,\n color,\n ...svgAttributes\n } = props;\n\n if (status !== undefined) {\n warnDeprecation(\n \"The 'status' prop is deprecated and will be removed in a future release. Use 'color' instead.\",\n );\n }\n\n const resolvedColor = color ?? status;\n const paletteColor = isIconColor(resolvedColor) ? resolvedColor : undefined;\n const customColor = paletteColor === undefined ? resolvedColor : undefined;\n const customColorStyle = customColor\n ? { color: customColor, ...svgAttributes.style }\n : undefined;\n\n const iconProps: SvgAttributeProps = {\n ...svgAttributes,\n ...(customColorStyle && { style: customColorStyle }),\n focusable: \"false\",\n role: \"img\",\n \"aria-hidden\": !ariaLabel,\n \"aria-label\": ariaLabel,\n className: clsx(\n styles.icon,\n styles[`size-${size}`],\n paletteColor && styles[paletteColor],\n className,\n ),\n };\n\n const iconElement = React.Children.toArray(children)[0];\n\n if (!React.isValidElement(iconElement)) {\n throw new Error(\n `Expected children of Icon component to be a valid React element (got ${String(\n children,\n )})`,\n );\n }\n\n /* An svg draws no `::after`, so the shimmer needs an element of its own. */\n if (isSkeleton) {\n return (\n <span\n className={clsx(iconProps.className, styles.skeleton)}\n style={svgAttributes.style}\n aria-hidden\n inert\n />\n );\n }\n\n return cloneElement(iconElement, iconProps);\n});\n\nexport default Icon;\n"],"mappings":";;;;;;;;;;;;AAaA,IAAM,aAAa;CACjB;CACA;CACA;CACA;CACA;CACA,GAAG;CACH,GAAG;AACL;AAKA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAYA,WAAc,SAAS,SAAS;AAC1E;;AAsBA,IAAa,OAAO,cAAc,SAAS,UAAU;CACnD,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,aAAa,gBAAgB;CACnC,MAAM,EACJ,WACA,cAAc,WACd,UACA,OAAO,KACP,QACA,OACA,GAAG,kBACD;CAEJ,IAAI,WAAW,KAAA,GACb,gBACE,+FACF;CAGF,MAAM,gBAAgB,SAAS;CAC/B,MAAM,eAAe,YAAY,aAAa,IAAI,gBAAgB,KAAA;CAClE,MAAM,cAAc,iBAAiB,KAAA,IAAY,gBAAgB,KAAA;CACjE,MAAM,mBAAmB,cACrB;EAAE,OAAO;EAAa,GAAG,cAAc;CAAM,IAC7C,KAAA;CAEJ,MAAM,YAA+B;EACnC,GAAG;EACH,GAAI,oBAAoB,EAAE,OAAO,iBAAiB;EAClD,WAAW;EACX,MAAM;EACN,eAAe,CAAC;EAChB,cAAc;EACd,WAAW,KACTC,oBAAO,MACPA,oBAAO,QAAQ,SACf,gBAAgBA,oBAAO,eACvB,SACF;CACF;CAEA,MAAM,cAAc,MAAM,SAAS,QAAQ,QAAQ,CAAC,CAAC;CAErD,IAAI,CAAC,MAAM,eAAe,WAAW,GACnC,MAAM,IAAI,MACR,wEAAwE,OACtE,QACF,EAAE,EACJ;CAIF,IAAI,YACF,OACE,oBAAC,QAAD;EACE,WAAW,KAAK,UAAU,WAAWA,oBAAO,QAAQ;EACpD,OAAO,cAAc;EACrB,eAAA;EACA,OAAA;CACD,CAAA;CAIL,OAAOC,eAAa,aAAa,SAAS;AAC5C,CAAC"}
1
+ {"version":3,"file":"Icon.mjs","names":["anyIconColors","styles","cloneElement"],"sources":["../../../../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import type { PropsWithChildren, SVGAttributes } from \"react\";\nimport React from \"react\";\nimport styles from \"./Icon.module.scss\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { cloneElement } from \"@/lib/react/cloneElement\";\nimport {\n alphaColors,\n decorativeColors,\n deprecatedDecorativeColors,\n type DeprecatedDecorativeColor,\n type Status,\n statusTypes,\n} from \"@/lib/types/props\";\nimport { useDeprecatedColor } from \"@/lib/hooks/useDeprecatedColor\";\nimport { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\ntype SvgAttributeProps = SVGAttributes<SVGSVGElement>;\n\nconst iconColors = [\n \"neutral\",\n ...decorativeColors,\n ...statusTypes,\n ...alphaColors,\n] as const;\n\ntype IconColor = (typeof iconColors)[number];\ntype IconWithCustomColor =\n IconColor | DeprecatedDecorativeColor | (string & {});\n\nfunction isIconColor(something: unknown): something is IconColor {\n const anyIconColors = iconColors as readonly string[];\n return typeof something === \"string\" && anyIconColors.includes(something);\n}\n\nexport interface IconProps\n extends\n PropsWithChildren<Omit<SvgAttributeProps, \"name\" | \"color\">>,\n FlowComponentProps {\n /** The size of the icon. @default \"m\" */\n size?: \"s\" | \"m\" | \"l\";\n /**\n * The color of the icon. Besides the Flow colors, any custom CSS color is\n * supported. Inherits the surrounding text color when unset.\n *\n * @deprecatedValues violet, teal\n */\n color?: IconWithCustomColor;\n /**\n * The elements status.\n *\n * @deprecated Use `color` instead.\n */\n status?: Status;\n}\n\n/** @flr-generate all */\nexport const Icon = flowComponent(\"Icon\", (props) => {\n const warnDeprecation = useWarnDeprecation();\n const isSkeleton = useSkeletonMode();\n const {\n className,\n \"aria-label\": ariaLabel,\n children,\n size = \"m\",\n status,\n color,\n ...svgAttributes\n } = props;\n\n if (status !== undefined) {\n warnDeprecation(\n \"The 'status' prop is deprecated and will be removed in a future release. Use 'color' instead.\",\n );\n }\n\n const resolvedColor =\n useDeprecatedColor(color, deprecatedDecorativeColors) ?? status;\n const paletteColor = isIconColor(resolvedColor) ? resolvedColor : undefined;\n const customColor = paletteColor === undefined ? resolvedColor : undefined;\n const customColorStyle = customColor\n ? { color: customColor, ...svgAttributes.style }\n : undefined;\n\n const iconProps: SvgAttributeProps = {\n ...svgAttributes,\n ...(customColorStyle && { style: customColorStyle }),\n focusable: \"false\",\n role: \"img\",\n \"aria-hidden\": !ariaLabel,\n \"aria-label\": ariaLabel,\n className: clsx(\n styles.icon,\n styles[`size-${size}`],\n paletteColor && styles[paletteColor],\n className,\n ),\n };\n\n const iconElement = React.Children.toArray(children)[0];\n\n if (!React.isValidElement(iconElement)) {\n throw new Error(\n `Expected children of Icon component to be a valid React element (got ${String(\n children,\n )})`,\n );\n }\n\n /* An svg draws no `::after`, so the shimmer needs an element of its own. */\n if (isSkeleton) {\n return (\n <span\n className={clsx(iconProps.className, styles.skeleton)}\n style={svgAttributes.style}\n aria-hidden\n inert\n />\n );\n }\n\n return cloneElement(iconElement, iconProps);\n});\n\nexport default Icon;\n"],"mappings":";;;;;;;;;;;;;AAqBA,IAAM,aAAa;CACjB;CACA,GAAG;CACH,GAAG;CACH,GAAG;AACL;AAMA,SAAS,YAAY,WAA4C;CAE/D,OAAO,OAAO,cAAc,YAAYA,WAAc,SAAS,SAAS;AAC1E;;AAwBA,IAAa,OAAO,cAAc,SAAS,UAAU;CACnD,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,aAAa,gBAAgB;CACnC,MAAM,EACJ,WACA,cAAc,WACd,UACA,OAAO,KACP,QACA,OACA,GAAG,kBACD;CAEJ,IAAI,WAAW,KAAA,GACb,gBACE,+FACF;CAGF,MAAM,gBACJ,mBAAmB,OAAO,0BAA0B,KAAK;CAC3D,MAAM,eAAe,YAAY,aAAa,IAAI,gBAAgB,KAAA;CAClE,MAAM,cAAc,iBAAiB,KAAA,IAAY,gBAAgB,KAAA;CACjE,MAAM,mBAAmB,cACrB;EAAE,OAAO;EAAa,GAAG,cAAc;CAAM,IAC7C,KAAA;CAEJ,MAAM,YAA+B;EACnC,GAAG;EACH,GAAI,oBAAoB,EAAE,OAAO,iBAAiB;EAClD,WAAW;EACX,MAAM;EACN,eAAe,CAAC;EAChB,cAAc;EACd,WAAW,KACTC,oBAAO,MACPA,oBAAO,QAAQ,SACf,gBAAgBA,oBAAO,eACvB,SACF;CACF;CAEA,MAAM,cAAc,MAAM,SAAS,QAAQ,QAAQ,CAAC,CAAC;CAErD,IAAI,CAAC,MAAM,eAAe,WAAW,GACnC,MAAM,IAAI,MACR,wEAAwE,OACtE,QACF,EAAE,EACJ;CAIF,IAAI,YACF,OACE,oBAAC,QAAD;EACE,WAAW,KAAK,UAAU,WAAWA,oBAAO,QAAQ;EACpD,OAAO,cAAc;EACrB,eAAA;EACA,OAAA;CACD,CAAA;CAIL,OAAOC,eAAa,aAAa,SAAS;AAC5C,CAAC"}
@@ -9,9 +9,10 @@ var warning = "flow--icon--warning";
9
9
  var info = "flow--icon--info";
10
10
  var unavailable = "flow--icon--unavailable";
11
11
  var blue = "flow--icon--blue";
12
- var violet = "flow--icon--violet";
13
- var teal = "flow--icon--teal";
12
+ var navy = "flow--icon--navy";
14
13
  var lilac = "flow--icon--lilac";
14
+ var sage = "flow--icon--sage";
15
+ var salmon = "flow--icon--salmon";
15
16
  var dark = "flow--icon--dark";
16
17
  var light = "flow--icon--light";
17
18
  var skeleton = "flow--icon--skeleton";
@@ -27,9 +28,10 @@ var Icon_module_default = {
27
28
  info,
28
29
  unavailable,
29
30
  blue,
30
- violet,
31
- teal,
31
+ navy,
32
32
  lilac,
33
+ sage,
34
+ salmon,
33
35
  dark,
34
36
  light,
35
37
  "dark-static": "flow--icon--dark-static",
@@ -38,6 +40,6 @@ var Icon_module_default = {
38
40
  "skeleton-surface-shimmer": "flow--icon--skeleton-surface-shimmer",
39
41
  "skeleton-text-shimmer": "flow--icon--skeleton-text-shimmer"
40
42
  };
41
- export { blue, danger, dark, Icon_module_default as default, icon, info, light, lilac, neutral, skeleton, success, teal, unavailable, violet, warning };
43
+ export { blue, danger, dark, Icon_module_default as default, icon, info, light, lilac, navy, neutral, sage, salmon, skeleton, success, unavailable, warning };
42
44
 
43
45
  //# sourceMappingURL=Icon.module.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.module.mjs","names":[],"sources":["../../../../../../../src/components/Icon/Icon.module.scss"],"sourcesContent":["@use \"@/styles/mixins/skeleton\";\n\n.icon {\n flex-shrink: 0;\n max-width: none;\n display: inline-block;\n vertical-align: baseline;\n\n @extend .size-m;\n\n /* Sizes */\n @mixin size($size, $faPadding) {\n &:where(.size-#{$size}) {\n width: var(--icon--size--#{$size});\n height: var(--icon--size--#{$size});\n\n /*\n * FontAwesome inserts its stylesheet as an unlayered `<style>` element at\n * runtime (`autoAddCss` defaults to true), outside of Flow's build, and\n * sizes `.svg-inline--fa` itself (`content-box`, `1.25em` × `1em`).\n * Unlayered CSS beats layered CSS regardless of specificity, so this\n * override only applies in the layered stylesheet variant if it leaves\n * the cascade layer as well.\n *\n * `display` and `vertical-align` are set the same way: a context hides\n * its icon (`display: none` on `Breadcrumb`'s last separator, an\n * unselected `Segment`'s checkmark) or aligns it (`Alert`, `Link`).\n *\n * The size goes back to Flow's layered rules (`revert-layer`) instead of\n * the token, so a context's size (`Avatar`'s 70 %) still applies. The\n * variants without layers drop these declarations — there Flow's rules\n * already win, and `revert-layer` would discard them all.\n *\n * Marked at the leaf rather than in a separate block, because these rules\n * live in a size mixin – a block would have to duplicate it.\n */\n &:global(.svg-inline--fa) {\n @layer flow.unlayered {\n width: revert-layer;\n height: revert-layer;\n display: revert-layer;\n vertical-align: revert-layer;\n box-sizing: border-box;\n padding: $faPadding;\n }\n }\n }\n }\n\n @include size(m, var(--size-rem--xxs));\n @include size(s, var(--size-rem--xxs));\n @include size(l, var(--size-rem--xs));\n\n /*\n * FontAwesome also sets `vertical-align: -0.125em`, which would shift the\n * icon a context aligns (`Heading`, `Alert`, `Link`). Same mechanism as the\n * size above.\n */\n &:global(.svg-inline--fa) {\n @layer flow.unlayered {\n vertical-align: revert-layer;\n }\n }\n\n /* Colors */\n @mixin color($color) {\n &.#{$color} {\n color: var(--icon--#{$color}-color);\n }\n }\n\n &.neutral {\n color: var(--icon--color);\n }\n\n @include color(\"danger\");\n @include color(\"success\");\n @include color(\"warning\");\n @include color(\"info\");\n @include color(\"unavailable\");\n @include color(\"blue\");\n @include color(\"violet\");\n @include color(\"teal\");\n @include color(\"lilac\");\n @include color(\"dark\");\n @include color(\"light\");\n @include color(\"dark-static\");\n @include color(\"light-static\");\n\n /* SkeletonMode */\n\n &.skeleton {\n @include skeleton.shape;\n\n --skeleton-radius: var(--corner-radius--s);\n }\n}\n\n@include skeleton.keyframes;\n"],"mappings":""}
1
+ {"version":3,"file":"Icon.module.mjs","names":[],"sources":["../../../../../../../src/components/Icon/Icon.module.scss"],"sourcesContent":["@use \"@/styles/mixins/skeleton\";\n\n.icon {\n flex-shrink: 0;\n max-width: none;\n display: inline-block;\n vertical-align: baseline;\n\n @extend .size-m;\n\n /* Sizes */\n @mixin size($size, $faPadding) {\n &:where(.size-#{$size}) {\n width: var(--icon--size--#{$size});\n height: var(--icon--size--#{$size});\n\n /*\n * FontAwesome inserts its stylesheet as an unlayered `<style>` element at\n * runtime (`autoAddCss` defaults to true), outside of Flow's build, and\n * sizes `.svg-inline--fa` itself (`content-box`, `1.25em` × `1em`).\n * Unlayered CSS beats layered CSS regardless of specificity, so this\n * override only applies in the layered stylesheet variant if it leaves\n * the cascade layer as well.\n *\n * `display` and `vertical-align` are set the same way: a context hides\n * its icon (`display: none` on `Breadcrumb`'s last separator, an\n * unselected `Segment`'s checkmark) or aligns it (`Alert`, `Link`).\n *\n * The size goes back to Flow's layered rules (`revert-layer`) instead of\n * the token, so a context's size (`Avatar`'s 70 %) still applies. The\n * variants without layers drop these declarations — there Flow's rules\n * already win, and `revert-layer` would discard them all.\n *\n * Marked at the leaf rather than in a separate block, because these rules\n * live in a size mixin – a block would have to duplicate it.\n */\n &:global(.svg-inline--fa) {\n @layer flow.unlayered {\n width: revert-layer;\n height: revert-layer;\n display: revert-layer;\n vertical-align: revert-layer;\n box-sizing: border-box;\n padding: $faPadding;\n }\n }\n }\n }\n\n @include size(m, var(--size-rem--xxs));\n @include size(s, var(--size-rem--xxs));\n @include size(l, var(--size-rem--xs));\n\n /*\n * FontAwesome also sets `vertical-align: -0.125em`, which would shift the\n * icon a context aligns (`Heading`, `Alert`, `Link`). Same mechanism as the\n * size above.\n */\n &:global(.svg-inline--fa) {\n @layer flow.unlayered {\n vertical-align: revert-layer;\n }\n }\n\n /* Colors */\n @mixin color($color) {\n &.#{$color} {\n color: var(--icon--#{$color}-color);\n }\n }\n\n &.neutral {\n color: var(--icon--color);\n }\n\n @include color(\"danger\");\n @include color(\"success\");\n @include color(\"warning\");\n @include color(\"info\");\n @include color(\"unavailable\");\n @include color(\"blue\");\n @include color(\"navy\");\n @include color(\"lilac\");\n @include color(\"sage\");\n @include color(\"salmon\");\n @include color(\"dark\");\n @include color(\"light\");\n @include color(\"dark-static\");\n @include color(\"light-static\");\n\n /* SkeletonMode */\n\n &.skeleton {\n @include skeleton.shape;\n\n --skeleton-radius: var(--corner-radius--s);\n }\n}\n\n@include skeleton.keyframes;\n"],"mappings":""}
@@ -1,9 +1,9 @@
1
1
  "use client"
2
2
  /* */
3
+ import { isAlphaColor } from "../../lib/types/props.mjs";
3
4
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
5
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
6
  import { SectionHeadingReset } from "../Section/context.mjs";
6
- import { isAlphaColor } from "../../lib/types/props.mjs";
7
7
  import IllustratedMessage_module_default from "./IllustratedMessage.module.mjs";
8
8
  import clsx from "clsx";
9
9
  import { jsx } from "react/jsx-runtime";
@@ -5,7 +5,7 @@ import { hash } from "object-code";
5
5
  // src/components/Initials/lib/getColorFromInitials.ts
6
6
  var getColorFromInitials = (initials) => {
7
7
  const code = hash(initials);
8
- const number = Math.abs(code % (avatarColors.length - 1));
8
+ const number = Math.abs(code % avatarColors.length);
9
9
  return avatarColors[number] ?? "blue";
10
10
  };
11
11
  export { getColorFromInitials };
@@ -1 +1 @@
1
- {"version":3,"file":"getColorFromInitials.mjs","names":["objectHash"],"sources":["../../../../../../../../src/components/Initials/lib/getColorFromInitials.ts"],"sourcesContent":["import { hash as objectHash } from \"object-code\";\nimport type { AvatarColors } from \"@/components/Avatar/Avatar\";\nimport { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport const getColorFromInitials = (initials: string): AvatarColors => {\n const code = objectHash(initials);\n const number = Math.abs(code % (avatarColors.length - 1));\n return avatarColors[number] ?? \"blue\";\n};\n"],"mappings":";;;;;AAIA,IAAa,wBAAwB,aAAmC;CACtE,MAAM,OAAOA,KAAW,QAAQ;CAChC,MAAM,SAAS,KAAK,IAAI,QAAQ,aAAa,SAAS,EAAE;CACxD,OAAO,aAAa,WAAW;AACjC"}
1
+ {"version":3,"file":"getColorFromInitials.mjs","names":["objectHash"],"sources":["../../../../../../../../src/components/Initials/lib/getColorFromInitials.ts"],"sourcesContent":["import { hash as objectHash } from \"object-code\";\nimport type { AvatarColors } from \"@/components/Avatar/Avatar\";\nimport { avatarColors } from \"@/components/Avatar/avatarColors\";\n\nexport const getColorFromInitials = (initials: string): AvatarColors => {\n const code = objectHash(initials);\n const number = Math.abs(code % avatarColors.length);\n return avatarColors[number] ?? \"blue\";\n};\n"],"mappings":";;;;;AAIA,IAAa,wBAAwB,aAAmC;CACtE,MAAM,OAAOA,KAAW,QAAQ;CAChC,MAAM,SAAS,KAAK,IAAI,OAAO,aAAa,MAAM;CAClD,OAAO,aAAa,WAAW;AACjC"}
@@ -10,7 +10,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
10
10
  var LegendItem = (props) => {
11
11
  const { children, color: colorFromProps } = props;
12
12
  const isSkeleton = useSkeletonMode();
13
- const color = colorFromProps ? isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps : void 0;
13
+ const color = colorFromProps ? isCategoricalColor(colorFromProps) ? `var(--categorical--color--${colorFromProps})` : colorFromProps : void 0;
14
14
  return /* @__PURE__ */ jsxs("li", {
15
15
  className: LegendItem_module_default.legendItem,
16
16
  inert: isSkeleton || void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Legend/components/LegendItem/LegendItem.tsx"],"sourcesContent":["import Text from \"@/components/Text\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./LegendItem.module.scss\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport clsx from \"clsx\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\nexport interface LegendItemProps extends PropsWithChildren {\n color?: CategoricalWithCustomColor;\n}\n\nexport const LegendItem: FC<LegendItemProps> = (props) => {\n const { children, color: colorFromProps } = props;\n\n const isSkeleton = useSkeletonMode();\n\n const color = colorFromProps\n ? isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps\n : undefined;\n\n return (\n <li className={styles.legendItem} inert={isSkeleton || undefined}>\n <div\n style={\n colorFromProps && !isSkeleton ? { backgroundColor: color } : undefined\n }\n className={clsx(styles.colorSquare, isSkeleton && styles.skeleton)}\n />\n <Text>\n <small>{children}</small>\n </Text>\n </li>\n );\n};\n\nexport default LegendItem;\n"],"mappings":";;;;;;;;;AAYA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,OAAO,mBAAmB;CAE5C,MAAM,aAAa,gBAAgB;CAEnC,MAAM,QAAQ,iBACV,mBAAmB,cAAc,IAC/B,6BAA6B,eAAe,KAC5C,iBACF,KAAA;CAEJ,OACE,qBAAC,MAAD;EAAI,WAAWA,0BAAO;EAAY,OAAO,cAAc,KAAA;EAAvD,UAAA,CACE,oBAAC,OAAD;GACE,OACE,kBAAkB,CAAC,aAAa,EAAE,iBAAiB,MAAM,IAAI,KAAA;GAE/D,WAAW,KAAKA,0BAAO,aAAa,cAAcA,0BAAO,QAAQ;EAClE,CAAA,GACD,oBAAC,MAAD,EAAA,UACE,oBAAC,SAAD,EAAQ,SAAgB,CAAA,EACpB,CAAA,CACJ;;AAER"}
1
+ {"version":3,"file":"LegendItem.mjs","names":["styles"],"sources":["../../../../../../../../../src/components/Legend/components/LegendItem/LegendItem.tsx"],"sourcesContent":["import Text from \"@/components/Text\";\nimport type { FC, PropsWithChildren } from \"react\";\nimport styles from \"./LegendItem.module.scss\";\nimport type { CategoricalWithCustomColor } from \"@/lib/tokens/CategoricalColors\";\nimport clsx from \"clsx\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\nexport interface LegendItemProps extends PropsWithChildren {\n color?: CategoricalWithCustomColor;\n}\n\nexport const LegendItem: FC<LegendItemProps> = (props) => {\n const { children, color: colorFromProps } = props;\n\n const isSkeleton = useSkeletonMode();\n\n const color = colorFromProps\n ? isCategoricalColor(colorFromProps)\n ? `var(--categorical--color--${colorFromProps})`\n : colorFromProps\n : undefined;\n\n return (\n <li className={styles.legendItem} inert={isSkeleton || undefined}>\n <div\n style={\n colorFromProps && !isSkeleton ? { backgroundColor: color } : undefined\n }\n className={clsx(styles.colorSquare, isSkeleton && styles.skeleton)}\n />\n <Text>\n <small>{children}</small>\n </Text>\n </li>\n );\n};\n\nexport default LegendItem;\n"],"mappings":";;;;;;;;;AAYA,IAAa,cAAmC,UAAU;CACxD,MAAM,EAAE,UAAU,OAAO,mBAAmB;CAE5C,MAAM,aAAa,gBAAgB;CAEnC,MAAM,QAAQ,iBACV,mBAAmB,cAAc,IAC/B,6BAA6B,eAAe,KAC5C,iBACF,KAAA;CAEJ,OACE,qBAAC,MAAD;EAAI,WAAWA,0BAAO;EAAY,OAAO,cAAc,KAAA;EAAvD,UAAA,CACE,oBAAC,OAAD;GACE,OACE,kBAAkB,CAAC,aAAa,EAAE,iBAAiB,MAAM,IAAI,KAAA;GAE/D,WAAW,KAAKA,0BAAO,aAAa,cAAcA,0BAAO,QAAQ;EAClE,CAAA,GACD,oBAAC,MAAD,EAAA,UACE,oBAAC,SAAD,EAAQ,SAAgB,CAAA,EACpB,CAAA,CACJ;;AAER"}
@@ -1,10 +1,10 @@
1
1
  "use client"
2
2
  /* */
3
+ import { isAlphaColor } from "../../lib/types/props.mjs";
3
4
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
5
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
6
  import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
6
7
  import { containsTextChild } from "../../lib/react/remote.mjs";
7
- import { isAlphaColor } from "../../lib/types/props.mjs";
8
8
  import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
9
9
  import { UiComponentTunnelExit } from "../UiComponentTunnel/UiComponentTunnelExit.mjs";
10
10
  import { hasContent } from "../SkeletonMode/lib/hasContent.mjs";
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
  /* */
3
- import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
4
3
  import { isAlphaColor } from "../../lib/types/props.mjs";
4
+ import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
5
  import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
6
6
  import { IconPending } from "../Icon/components/icons/IconPending.mjs";
7
7
  import LoadingSpinner_module_default from "./LoadingSpinner.module.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"Notification.module.mjs","names":[],"sources":["../../../../../../../src/components/Notification/Notification.module.scss"],"sourcesContent":["@use \"@/styles/mixins/focus\";\n@use \"@/styles/mixins/skeleton\";\n\n.notification {\n border-radius: var(--notification--corner-radius);\n width: var(--notification--width);\n max-width: var(--notification--max-width);\n box-shadow: var(--notification--box-shadow);\n position: relative;\n border: var(--notification--border-width) var(--notification--border-style)\n var(--notification--border-color);\n\n &::after {\n content: \"\";\n position: absolute;\n top: 0;\n bottom: 0;\n width: var(--notification--border-x-start-width);\n inset-inline-start: calc(var(--size-px--xxxs) * -1);\n border-start-start-radius: var(--notification--corner-radius);\n border-end-start-radius: var(--notification--corner-radius);\n }\n\n @extend .info;\n\n /* Elements */\n\n .link {\n padding: var(--notification--padding);\n padding-inline-start: calc(\n var(--notification--padding) + var(--notification--border-x-start-width)\n );\n display: flex;\n flex-direction: column;\n row-gap: var(--notification--heading-to-text-spacing);\n cursor: default;\n transition-property: background-color;\n transition-duration: var(--transition--duration--default);\n position: relative;\n border-radius: calc(var(--notification--corner-radius) - 1px);\n\n @include focus.focus;\n }\n\n .heading {\n --button-size: calc(\n var(--button--line-height-s) + 2 * var(--button--padding-s-x)\n );\n\n padding-inline-end: calc(\n var(--button-size) + var(--heading--icon-to-text-spacing)\n );\n\n .icon {\n height: var(--heading-line-height);\n width: var(--heading-line-height);\n vertical-align: bottom;\n display: inline-block;\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n }\n\n .text {\n font-size: var(--notification--font-size);\n }\n\n .close {\n position: absolute;\n top: var(--notification--padding);\n inset-inline-end: var(--notification--padding);\n }\n\n /* Status */\n\n @mixin status($status) {\n &.#{$status} {\n .link {\n border-color: var(--notification--#{$status}-background-color--default);\n background-color: var(\n --notification--#{$status}-background-color--default\n );\n }\n\n &::after {\n background-color: var(--notification--#{$status}-border-color);\n }\n\n &.hasLink {\n .link {\n &:hover {\n background-color: var(\n --notification--#{$status}-background-color--hover\n );\n }\n\n &[data-pressed] {\n background-color: var(\n --notification--#{$status}-background-color--pressed\n );\n }\n }\n }\n\n .heading {\n color: var(--notification--#{$status}-heading-color);\n }\n }\n }\n\n @include status(info);\n @include status(warning);\n @include status(danger);\n @include status(success);\n @include status(unavailable);\n\n /* SkeletonMode: no status color while the content loads */\n &.skeleton::after {\n background-color: skeleton.$background-color;\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Notification.module.mjs","names":[],"sources":["../../../../../../../src/components/Notification/Notification.module.scss"],"sourcesContent":["@use \"@/styles/mixins/focus\";\n@use \"@/styles/mixins/skeleton\";\n\n.notification {\n border-radius: var(--notification--corner-radius);\n width: var(--notification--width);\n max-width: var(--notification--max-width);\n box-shadow: var(--notification--box-shadow);\n position: relative;\n border: var(--notification--border-width) var(--notification--border-style)\n var(--notification--border-color);\n\n /* The status stripe is masked out of a layer in the notification's\n shape, so it follows the corner radius instead of bending into it. */\n &::after {\n content: \"\";\n position: absolute;\n inset: calc(var(--notification--border-width) * -1);\n border-radius: inherit;\n pointer-events: none;\n mask-image: linear-gradient(\n to right,\n #000 var(--notification--border-x-start-width),\n transparent 0\n );\n }\n\n &:dir(rtl)::after {\n mask-image: linear-gradient(\n to left,\n #000 var(--notification--border-x-start-width),\n transparent 0\n );\n }\n\n @extend .info;\n\n /* Elements */\n\n .link {\n padding: var(--notification--padding);\n padding-inline-start: calc(\n var(--notification--padding) + var(--notification--border-x-start-width)\n );\n display: flex;\n flex-direction: column;\n row-gap: var(--notification--heading-to-text-spacing);\n cursor: default;\n transition-property: background-color;\n transition-duration: var(--transition--duration--default);\n position: relative;\n border-radius: calc(var(--notification--corner-radius) - 1px);\n\n @include focus.focus;\n }\n\n .heading {\n --button-size: calc(\n var(--button--line-height-s) + 2 * var(--button--padding-s-x)\n );\n\n padding-inline-end: calc(\n var(--button-size) + var(--heading--icon-to-text-spacing)\n );\n\n .icon {\n height: var(--heading-line-height);\n width: var(--heading-line-height);\n vertical-align: bottom;\n display: inline-block;\n margin-inline-end: var(--heading--icon-to-text-spacing);\n }\n }\n\n .text {\n font-size: var(--notification--font-size);\n }\n\n .close {\n position: absolute;\n top: var(--notification--padding);\n inset-inline-end: var(--notification--padding);\n }\n\n /* Status */\n\n @mixin status($status) {\n &.#{$status} {\n .link {\n border-color: var(--notification--#{$status}-background-color--default);\n background-color: var(\n --notification--#{$status}-background-color--default\n );\n }\n\n &::after {\n background-color: var(--notification--#{$status}-border-color);\n }\n\n &.hasLink {\n .link {\n &:hover {\n background-color: var(\n --notification--#{$status}-background-color--hover\n );\n }\n\n &[data-pressed] {\n background-color: var(\n --notification--#{$status}-background-color--pressed\n );\n }\n }\n }\n\n .heading {\n color: var(--notification--#{$status}-heading-color);\n }\n }\n }\n\n @include status(info);\n @include status(warning);\n @include status(danger);\n @include status(success);\n @include status(unavailable);\n\n /* SkeletonMode: no status color while the content loads */\n &.skeleton::after {\n background-color: skeleton.$background-color;\n }\n}\n"],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Overlay.module.mjs","names":[],"sources":["../../../../../../../src/components/Overlay/Overlay.module.scss"],"sourcesContent":["/* Full-page backdrop behind every overlay (Modal, LightBox, …).\n\n Sized to `--visual-viewport-height`, the property the Modal wrapper uses too,\n so the whole overlay stack tracks the on-screen keyboard as one. react-aria\n publishes it on this element and updates it with the visual viewport.\n\n Not `--page-height` (the full document height): this element is `fixed`, so\n anything past the viewport never shows, while `backdrop-filter` blurs the\n whole layer every frame. Chromium drops an oversized one for single frames\n while scrolling, flickering backdrop and modal alike. #2338 switched\n `absolute` → `fixed` and added the blur, but kept the `--page-height` that\n `absolute` had needed. */\n.overlay {\n position: fixed;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--visual-viewport-height);\n isolation: isolate;\n background: var(--overlay--backdrop-color);\n backdrop-filter: blur(var(--blur));\n\n &[data-entering] {\n animation: overlay-fade var(--transition--duration--slow);\n }\n\n &[data-exiting] {\n animation: overlay-fade var(--transition--duration--default) reverse ease-in;\n }\n}\n\n/* Centering viewport between the backdrop and react-aria's modal wrapper.\n Sized to the visual viewport so it tracks the on-screen keyboard. Modal,\n OffCanvas and LightBox refine it (padding, pointer-events) — they used to\n repeat this whole block behind a `> div` selector each. */\n.viewport {\n position: fixed;\n height: var(--visual-viewport-height);\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n/* Fallback shown while suspended overlay content loads. */\n.suspense {\n padding: var(--size-px--xl);\n}\n\n@keyframes overlay-fade {\n 0% {\n opacity: 0;\n }\n\n 50% {\n opacity: 1;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-contrast: more), (prefers-reduced-transparency) {\n .overlay {\n backdrop-filter: none;\n background-color: var(--dark--color--600);\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"Overlay.module.mjs","names":[],"sources":["../../../../../../../src/components/Overlay/Overlay.module.scss"],"sourcesContent":["/* Full-page backdrop behind every overlay (Modal, LightBox, …).\n\n Sized to `--visual-viewport-height`, the property the Modal wrapper uses too,\n so the whole overlay stack tracks the on-screen keyboard as one. react-aria\n publishes it on this element and updates it with the visual viewport.\n\n Not `--page-height` (the full document height): this element is `fixed`, so\n anything past the viewport never shows, while `backdrop-filter` blurs the\n whole layer every frame. Chromium drops an oversized one for single frames\n while scrolling, flickering backdrop and modal alike. #2338 switched\n `absolute` → `fixed` and added the blur, but kept the `--page-height` that\n `absolute` had needed. */\n.overlay {\n position: fixed;\n top: 0;\n inset-inline-start: 0;\n width: 100%;\n height: var(--visual-viewport-height);\n isolation: isolate;\n background: var(--overlay--backdrop-color);\n backdrop-filter: blur(var(--blur));\n\n &[data-entering] {\n animation: overlay-fade var(--transition--duration--slow);\n }\n\n &[data-exiting] {\n animation: overlay-fade var(--transition--duration--default) reverse ease-in;\n }\n}\n\n/* Centering viewport between the backdrop and react-aria's modal wrapper.\n Sized to the visual viewport so it tracks the on-screen keyboard. Modal,\n OffCanvas and LightBox refine it (padding, pointer-events) — they used to\n repeat this whole block behind a `> div` selector each. */\n.viewport {\n position: fixed;\n height: var(--visual-viewport-height);\n display: flex;\n flex-direction: column;\n width: 100%;\n justify-content: center;\n align-items: center;\n}\n\n/* Fallback shown while suspended overlay content loads. */\n.suspense {\n padding: var(--size-px--xl);\n}\n\n@keyframes overlay-fade {\n 0% {\n opacity: 0;\n }\n\n 50% {\n opacity: 1;\n }\n\n 100% {\n opacity: 1;\n }\n}\n\n@media (prefers-contrast: more), (prefers-reduced-transparency) {\n .overlay {\n backdrop-filter: none;\n background-color: var(--dark--color--strong--300);\n }\n}\n"],"mappings":""}
@@ -10,7 +10,7 @@ var ProgressBarBar = (props) => {
10
10
  const { segments, percentage } = props;
11
11
  if (useSkeletonMode()) return /* @__PURE__ */ jsx("div", { className: ProgressBar_module_default.bar });
12
12
  const segmentFill = segments && segments.length > 0 ? segments.map((s, i) => {
13
- const backgroundColor = !s.color ? `var(--color--categorical--${getCategoricalColorByIndex(i)})` : isCategoricalColor(s.color) ? `var(--color--categorical--${s.color})` : s.color;
13
+ const backgroundColor = !s.color ? `var(--categorical--color--${getCategoricalColorByIndex(i)})` : isCategoricalColor(s.color) ? `var(--categorical--color--${s.color})` : s.color;
14
14
  return /* @__PURE__ */ jsx("div", {
15
15
  "aria-hidden": true,
16
16
  className: ProgressBar_module_default.segment,
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBarBar.mjs","names":["styles"],"sources":["../../../../../../../../src/components/ProgressBar/components/ProgressBarBar.tsx"],"sourcesContent":["import styles from \"@/components/ProgressBar/ProgressBar.module.scss\";\nimport type { FC } from \"react\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\ninterface Props extends Pick<ProgressBarProps, \"segments\"> {\n percentage?: number;\n}\n\nexport const ProgressBarBar: FC<Props> = (props) => {\n const { segments, percentage } = props;\n\n const isSkeleton = useSkeletonMode();\n\n /* In the mode, the track stays and shows no value. */\n if (isSkeleton) {\n return <div className={styles.bar} />;\n }\n\n const segmentFill =\n segments && segments.length > 0\n ? segments.map((s, i) => {\n const backgroundColor = !s.color\n ? `var(--color--categorical--${getCategoricalColorByIndex(i)})`\n : isCategoricalColor(s.color)\n ? `var(--color--categorical--${s.color})`\n : s.color;\n\n return (\n <div\n key={s.title}\n aria-hidden\n className={styles.segment}\n style={{\n backgroundColor,\n \"--progress-bar--segment-value\": s.value,\n }}\n />\n );\n })\n : null;\n\n return (\n <div className={styles.bar}>\n <div\n className={styles.fill}\n style={{ \"--progress-bar--percentage\": percentage }}\n >\n {segmentFill}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAWA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,UAAU,eAAe;CAKjC,IAHmB,gBAGf,GACF,OAAO,oBAAC,OAAD,EAAK,WAAWA,2BAAO,IAAM,CAAA;CAGtC,MAAM,cACJ,YAAY,SAAS,SAAS,IAC1B,SAAS,KAAK,GAAG,MAAM;EACrB,MAAM,kBAAkB,CAAC,EAAE,QACvB,6BAA6B,2BAA2B,CAAC,EAAE,KAC3D,mBAAmB,EAAE,KAAK,IACxB,6BAA6B,EAAE,MAAM,KACrC,EAAE;EAER,OACE,oBAAC,OAAD;GAEE,eAAA;GACA,WAAWA,2BAAO;GAClB,OAAO;IACL;IACA,iCAAiC,EAAE;GACrC;EACD,GAPM,EAAE,KAOR;CAEL,CAAC,IACD;CAEN,OACE,oBAAC,OAAD;EAAK,WAAWA,2BAAO;EACrB,UAAA,oBAAC,OAAD;GACE,WAAWA,2BAAO;GAClB,OAAO,EAAE,8BAA8B,WAAW;GAEjD,UAAA;EACE,CAAA;CACF,CAAA;AAET"}
1
+ {"version":3,"file":"ProgressBarBar.mjs","names":["styles"],"sources":["../../../../../../../../src/components/ProgressBar/components/ProgressBarBar.tsx"],"sourcesContent":["import styles from \"@/components/ProgressBar/ProgressBar.module.scss\";\nimport type { FC } from \"react\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport { isCategoricalColor } from \"@/lib/tokens/isCategoricalColor\";\nimport { useSkeletonMode } from \"@/components/SkeletonMode/skeletonModeContext\";\n\ninterface Props extends Pick<ProgressBarProps, \"segments\"> {\n percentage?: number;\n}\n\nexport const ProgressBarBar: FC<Props> = (props) => {\n const { segments, percentage } = props;\n\n const isSkeleton = useSkeletonMode();\n\n /* In the mode, the track stays and shows no value. */\n if (isSkeleton) {\n return <div className={styles.bar} />;\n }\n\n const segmentFill =\n segments && segments.length > 0\n ? segments.map((s, i) => {\n const backgroundColor = !s.color\n ? `var(--categorical--color--${getCategoricalColorByIndex(i)})`\n : isCategoricalColor(s.color)\n ? `var(--categorical--color--${s.color})`\n : s.color;\n\n return (\n <div\n key={s.title}\n aria-hidden\n className={styles.segment}\n style={{\n backgroundColor,\n \"--progress-bar--segment-value\": s.value,\n }}\n />\n );\n })\n : null;\n\n return (\n <div className={styles.bar}>\n <div\n className={styles.fill}\n style={{ \"--progress-bar--percentage\": percentage }}\n >\n {segmentFill}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;;;;;AAWA,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,UAAU,eAAe;CAKjC,IAHmB,gBAGf,GACF,OAAO,oBAAC,OAAD,EAAK,WAAWA,2BAAO,IAAM,CAAA;CAGtC,MAAM,cACJ,YAAY,SAAS,SAAS,IAC1B,SAAS,KAAK,GAAG,MAAM;EACrB,MAAM,kBAAkB,CAAC,EAAE,QACvB,6BAA6B,2BAA2B,CAAC,EAAE,KAC3D,mBAAmB,EAAE,KAAK,IACxB,6BAA6B,EAAE,MAAM,KACrC,EAAE;EAER,OACE,oBAAC,OAAD;GAEE,eAAA;GACA,WAAWA,2BAAO;GAClB,OAAO;IACL;IACA,iCAAiC,EAAE;GACrC;EACD,GAPM,EAAE,KAOR;CAEL,CAAC,IACD;CAEN,OACE,oBAAC,OAAD;EAAK,WAAWA,2BAAO;EACrB,UAAA,oBAAC,OAAD;GACE,WAAWA,2BAAO;GAClB,OAAO,EAAE,8BAA8B,WAAW;GAEjD,UAAA;EACE,CAAA;CACF,CAAA;AAET"}
@@ -1,8 +1,8 @@
1
1
  "use client"
2
2
  /* */
3
+ import { isAlphaColor } from "../../lib/types/props.mjs";
3
4
  import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
4
5
  import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
5
- import { isAlphaColor } from "../../lib/types/props.mjs";
6
6
  import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
7
7
  import { Wrap } from "../Wrap/Wrap.mjs";
8
8
  import { EmulatedBoldText } from "../EmulatedBoldText/EmulatedBoldText.mjs";
@@ -0,0 +1,20 @@
1
+ "use client"
2
+ /* */
3
+ import { useWarnDeprecation } from "../../components/DeprecationWarningProvider/DeprecationWarningProvider.mjs";
4
+ // src/lib/hooks/useDeprecatedColor.ts
5
+ /**
6
+ * Resolves a deprecated `color` prop value to the value it renders as, and
7
+ * warns when one is passed. Other values pass through unchanged. `prop` names
8
+ * the prop the replacement belongs on, where that is not the prop the value was
9
+ * passed to.
10
+ */
11
+ var useDeprecatedColor = (color, replacements, { prop } = {}) => {
12
+ const warnDeprecation = useWarnDeprecation();
13
+ if (color === void 0 || !Object.hasOwn(replacements, color)) return color;
14
+ const replacement = replacements[color];
15
+ warnDeprecation(`The color '${color}' is deprecated and will be removed in a future release. Use ${prop ? `${prop}="${replacement}"` : `'${replacement}'`} instead.`);
16
+ return replacement;
17
+ };
18
+ export { useDeprecatedColor };
19
+
20
+ //# sourceMappingURL=useDeprecatedColor.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDeprecatedColor.mjs","names":[],"sources":["../../../../../../../src/lib/hooks/useDeprecatedColor.ts"],"sourcesContent":["import { useWarnDeprecation } from \"@/components/DeprecationWarningProvider\";\n\n/**\n * Resolves a deprecated `color` prop value to the value it renders as, and\n * warns when one is passed. Other values pass through unchanged. `prop` names\n * the prop the replacement belongs on, where that is not the prop the value was\n * passed to.\n */\nexport const useDeprecatedColor = <\n TColor extends string,\n TReplacements extends Readonly<Record<string, string>>,\n>(\n color: TColor | undefined,\n replacements: TReplacements,\n { prop }: { prop?: string } = {},\n):\n | Exclude<TColor, keyof TReplacements>\n | TReplacements[keyof TReplacements]\n | undefined => {\n const warnDeprecation = useWarnDeprecation();\n\n if (color === undefined || !Object.hasOwn(replacements, color)) {\n return color as Exclude<TColor, keyof TReplacements> | undefined;\n }\n\n const replacement = replacements[color] as TReplacements[keyof TReplacements];\n const use = prop ? `${prop}=\"${replacement}\"` : `'${replacement}'`;\n warnDeprecation(\n `The color '${color}' is deprecated and will be removed in a future release. Use ${use} instead.`,\n );\n return replacement;\n};\n"],"mappings":";;;;;;;;;;AAQA,IAAa,sBAIX,OACA,cACA,EAAE,SAA4B,CAAC,MAIhB;CACf,MAAM,kBAAkB,mBAAmB;CAE3C,IAAI,UAAU,KAAA,KAAa,CAAC,OAAO,OAAO,cAAc,KAAK,GAC3D,OAAO;CAGT,MAAM,cAAc,aAAa;CAEjC,gBACE,cAAc,MAAM,+DAFV,OAAO,GAAG,KAAK,IAAI,YAAY,KAAK,IAAI,YAAY,GAEyB,UACzF;CACA,OAAO;AACT"}
@@ -2,7 +2,7 @@
2
2
  /* */
3
3
  import all_light_default from "../../../../design-tokens/dist/json-runtime/all-light.mjs";
4
4
  // src/lib/tokens/CategoricalColors.ts
5
- var categoricalColors = Object.keys(all_light_default.color.categorical);
5
+ var categoricalColors = Object.keys(all_light_default.categorical.color);
6
6
  export { categoricalColors };
7
7
 
8
8
  //# sourceMappingURL=CategoricalColors.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"CategoricalColors.mjs","names":["tokens"],"sources":["../../../../../../../src/lib/tokens/CategoricalColors.ts"],"sourcesContent":["import tokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\n\nexport const categoricalColors = Object.keys(\n tokens.color.categorical,\n) as (keyof typeof tokens.color.categorical)[];\n\nexport type CategoricalColor = (typeof categoricalColors)[number];\nexport type CategoricalWithCustomColor = CategoricalColor | (string & {});\n"],"mappings":";;;;AAEA,IAAa,oBAAoB,OAAO,KACtCA,kBAAO,MAAM,WACf"}
1
+ {"version":3,"file":"CategoricalColors.mjs","names":["tokens"],"sources":["../../../../../../../src/lib/tokens/CategoricalColors.ts"],"sourcesContent":["import tokens from \"@mittwald/flow-design-tokens/json-runtime/all-light.json\";\n\nexport const categoricalColors = Object.keys(\n tokens.categorical.color,\n) as (keyof typeof tokens.categorical.color)[];\n\nexport type CategoricalColor = (typeof categoricalColors)[number];\nexport type CategoricalWithCustomColor = CategoricalColor | (string & {});\n"],"mappings":";;;;AAEA,IAAa,oBAAoB,OAAO,KACtCA,kBAAO,YAAY,KACrB"}
@@ -17,6 +17,22 @@ var alphaColors = [
17
17
  function isAlphaColor(color) {
18
18
  return alphaColors.includes(color);
19
19
  }
20
- export { alphaColors, isAlphaColor, statusTypes };
20
+ /** The decorative colors, one per mittwald brand color. */
21
+ var decorativeColors = [
22
+ "blue",
23
+ "navy",
24
+ "lilac",
25
+ "sage",
26
+ "salmon"
27
+ ];
28
+ /**
29
+ * Deprecated decorative color values and the color each renders as. `violet`
30
+ * duplicated `lilac`; `teal` already rendered the sage tone.
31
+ */
32
+ var deprecatedDecorativeColors = {
33
+ violet: "lilac",
34
+ teal: "sage"
35
+ };
36
+ export { alphaColors, decorativeColors, deprecatedDecorativeColors, isAlphaColor, statusTypes };
21
37
 
22
38
  //# sourceMappingURL=props.mjs.map