@mittwald/flow-react-components 1.6.0-next.66 → 1.6.0-next.67
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/AGENTS.md +0 -11
- package/MIGRATION.md +0 -205
- package/USAGE.md +1 -1
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/css/all-layered.css +1 -1
- package/dist/css/all.css +6 -8
- package/dist/js/default.mjs +1 -1
- package/dist/js/internal.mjs +2 -2
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs +11 -35
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs +11 -11
- package/dist/js/packages/components/src/components/AccentBox/AccentBox.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +1 -1
- package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +1 -1
- package/dist/js/packages/components/src/components/Alert/Alert.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Avatar/Avatar.mjs +2 -8
- package/dist/js/packages/components/src/components/Avatar/Avatar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs +7 -9
- package/dist/js/packages/components/src/components/Avatar/Avatar.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs +7 -3
- package/dist/js/packages/components/src/components/Avatar/avatarColors.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/Badge.mjs +3 -16
- package/dist/js/packages/components/src/components/Badge/Badge.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Badge/Badge.module.mjs +11 -11
- package/dist/js/packages/components/src/components/Badge/Badge.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Breadcrumb/Breadcrumb.mjs +1 -1
- package/dist/js/packages/components/src/components/Button/Button.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs +10 -10
- package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Color/Color.mjs +6 -5
- package/dist/js/packages/components/src/components/Color/Color.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Color/Color.module.mjs +5 -7
- package/dist/js/packages/components/src/components/Color/Color.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
- package/dist/js/packages/components/src/components/HeaderNavigation/HeaderNavigation.mjs +1 -1
- package/dist/js/packages/components/src/components/Heading/Heading.mjs +1 -1
- package/dist/js/packages/components/src/components/Icon/Icon.mjs +7 -5
- package/dist/js/packages/components/src/components/Icon/Icon.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Icon/Icon.module.mjs +5 -7
- package/dist/js/packages/components/src/components/Icon/Icon.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -1
- package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs +1 -1
- package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs +1 -1
- package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Link/Link.mjs +1 -1
- package/dist/js/packages/components/src/components/LoadingSpinner/LoadingSpinner.mjs +1 -1
- package/dist/js/packages/components/src/components/Notification/Notification.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Overlay/Overlay.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Text/Text.mjs +1 -1
- package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs +1 -1
- package/dist/js/packages/components/src/lib/tokens/CategoricalColors.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/types/props.mjs +1 -17
- package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +1270 -1779
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs +1270 -1779
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
- package/dist/types/components/AccentBox/AccentBox.d.ts +3 -12
- package/dist/types/components/Avatar/Avatar.d.ts +3 -7
- package/dist/types/components/Avatar/avatarColors.d.ts +1 -2
- package/dist/types/components/Badge/Badge.d.ts +3 -19
- package/dist/types/components/Color/Color.d.ts +4 -8
- package/dist/types/components/Icon/Icon.d.ts +3 -5
- package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +889 -1409
- package/dist/types/lib/tokens/CategoricalColors.d.ts +1 -1
- package/dist/types/lib/tokens/getCategoricalColorByIndex.d.ts +1 -1
- package/dist/types/lib/types/props.d.ts +0 -12
- package/package.json +10 -10
- package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs +0 -20
- package/dist/js/packages/components/src/lib/hooks/useDeprecatedColor.mjs.map +0 -1
- package/dist/types/lib/hooks/useDeprecatedColor.d.ts +0 -9
package/dist/js/packages/components/src/components/CartesianChart/components/Bar/Bar.mjs.map
CHANGED
|
@@ -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(--categorical
|
|
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"}
|
|
@@ -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(--categorical
|
|
16
|
+
const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
|
|
17
17
|
return /* @__PURE__ */ jsx(Recharts.Line, {
|
|
18
18
|
...rest,
|
|
19
19
|
fill: color,
|
package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map
CHANGED
|
@@ -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(--categorical
|
|
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"}
|
|
@@ -17,7 +17,7 @@ var defaultLightTheme = githubLightInit({
|
|
|
17
17
|
styles: [
|
|
18
18
|
{
|
|
19
19
|
tag: tags.keyword,
|
|
20
|
-
color: "var(--code-syntax--
|
|
20
|
+
color: "var(--color--code-syntax--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(--code-syntax--
|
|
28
|
+
color: "var(--color--code-syntax--type)"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
31
|
tag: tags.variableName,
|
|
32
|
-
color: "var(--code-syntax--
|
|
32
|
+
color: "var(--color--code-syntax--variable)"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
tag: [tags.propertyName, tags.attributeName],
|
|
36
|
-
color: "var(--code-syntax--
|
|
36
|
+
color: "var(--color--code-syntax--property)"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
tag: [tags.string, tags.regexp],
|
|
40
|
-
color: "var(--code-syntax--
|
|
40
|
+
color: "var(--color--code-syntax--string)"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
tag: tags.number,
|
|
44
|
-
color: "var(--code-syntax--
|
|
44
|
+
color: "var(--color--code-syntax--number)"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
tag: tags.comment,
|
|
48
|
-
color: "var(--code-syntax--
|
|
48
|
+
color: "var(--color--code-syntax--comment)"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
tag: [tags.function(tags.variableName), tags.function(tags.propertyName)],
|
|
52
|
-
color: "var(--code-syntax--
|
|
52
|
+
color: "var(--color--code-syntax--function)"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
tag: [tags.operator, tags.typeOperator],
|
|
56
|
-
color: "var(--code-syntax--
|
|
56
|
+
color: "var(--color--code-syntax--operator)"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
tag: tags.invalid,
|
|
60
|
-
color: "var(--code-syntax--
|
|
60
|
+
color: "var(--color--code-syntax--invalid)"
|
|
61
61
|
}
|
|
62
62
|
]
|
|
63
63
|
});
|
package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map
CHANGED
|
@@ -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(--code-syntax--
|
|
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,13 +1,15 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { alphaColors,
|
|
4
|
-
import { useDeprecatedColor } from "../../lib/hooks/useDeprecatedColor.mjs";
|
|
3
|
+
import { alphaColors, statusTypes } from "../../lib/types/props.mjs";
|
|
5
4
|
import Color_module_default from "./Color.module.mjs";
|
|
6
5
|
import clsx from "clsx";
|
|
7
6
|
import { jsx } from "react/jsx-runtime";
|
|
8
7
|
// src/components/Color/Color.tsx
|
|
9
8
|
var flowColors = [
|
|
10
|
-
|
|
9
|
+
"blue",
|
|
10
|
+
"violet",
|
|
11
|
+
"teal",
|
|
12
|
+
"lilac",
|
|
11
13
|
...statusTypes,
|
|
12
14
|
...alphaColors
|
|
13
15
|
];
|
|
@@ -16,8 +18,7 @@ function isFlowColor(something) {
|
|
|
16
18
|
}
|
|
17
19
|
/** @flr-generate all */
|
|
18
20
|
var Color = (props) => {
|
|
19
|
-
const { children, className, color
|
|
20
|
-
const color = useDeprecatedColor(colorFromProps, deprecatedDecorativeColors) ?? "blue";
|
|
21
|
+
const { children, className, color = "blue" } = props;
|
|
21
22
|
const isAFlowColor = isFlowColor(color);
|
|
22
23
|
const rootClassName = clsx(isAFlowColor && Color_module_default[color], className);
|
|
23
24
|
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
|
|
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"}
|
|
@@ -2,10 +2,9 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
// src/components/Color/Color.module.scss
|
|
4
4
|
var blue = "flow--color--blue";
|
|
5
|
-
var
|
|
5
|
+
var violet = "flow--color--violet";
|
|
6
|
+
var teal = "flow--color--teal";
|
|
6
7
|
var lilac = "flow--color--lilac";
|
|
7
|
-
var sage = "flow--color--sage";
|
|
8
|
-
var salmon = "flow--color--salmon";
|
|
9
8
|
var danger = "flow--color--danger";
|
|
10
9
|
var warning = "flow--color--warning";
|
|
11
10
|
var success = "flow--color--success";
|
|
@@ -15,10 +14,9 @@ var light = "flow--color--light";
|
|
|
15
14
|
var dark = "flow--color--dark";
|
|
16
15
|
var Color_module_default = {
|
|
17
16
|
blue,
|
|
18
|
-
|
|
17
|
+
violet,
|
|
18
|
+
teal,
|
|
19
19
|
lilac,
|
|
20
|
-
sage,
|
|
21
|
-
salmon,
|
|
22
20
|
danger,
|
|
23
21
|
warning,
|
|
24
22
|
success,
|
|
@@ -29,6 +27,6 @@ var Color_module_default = {
|
|
|
29
27
|
"light-static": "flow--color--light-static",
|
|
30
28
|
"dark-static": "flow--color--dark-static"
|
|
31
29
|
};
|
|
32
|
-
export { blue, danger, dark, Color_module_default as default, info, light, lilac,
|
|
30
|
+
export { blue, danger, dark, Color_module_default as default, info, light, lilac, success, teal, unavailable, violet, warning };
|
|
33
31
|
|
|
34
32
|
//# 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(--
|
|
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":""}
|
|
@@ -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(--categorical
|
|
33
|
+
const color = !s.color || isCategoricalColor(s.color) ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})` : s.color;
|
|
34
34
|
return /* @__PURE__ */ jsx("circle", {
|
|
35
35
|
className: DonutChart_module_default.segment,
|
|
36
36
|
cx: center,
|
package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map
CHANGED
|
@@ -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(--categorical
|
|
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,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { isAlphaColor } from "../../lib/types/props.mjs";
|
|
4
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
5
4
|
import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
|
|
6
5
|
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";
|
|
7
6
|
import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
|
|
8
7
|
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,11 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { alphaColors, decorativeColors, deprecatedDecorativeColors, statusTypes } from "../../lib/types/props.mjs";
|
|
4
3
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
5
|
-
import { useWarnDeprecation } from "../DeprecationWarningProvider/DeprecationWarningProvider.mjs";
|
|
6
|
-
import { useDeprecatedColor } from "../../lib/hooks/useDeprecatedColor.mjs";
|
|
7
4
|
import Icon_module_default from "./Icon.module.mjs";
|
|
8
5
|
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";
|
|
9
8
|
import { useSkeletonMode } from "../SkeletonMode/skeletonModeContext.mjs";
|
|
10
9
|
import clsx from "clsx";
|
|
11
10
|
import React from "react";
|
|
@@ -13,7 +12,10 @@ import { jsx } from "react/jsx-runtime";
|
|
|
13
12
|
// src/components/Icon/Icon.tsx
|
|
14
13
|
var iconColors = [
|
|
15
14
|
"neutral",
|
|
16
|
-
|
|
15
|
+
"blue",
|
|
16
|
+
"violet",
|
|
17
|
+
"teal",
|
|
18
|
+
"lilac",
|
|
17
19
|
...statusTypes,
|
|
18
20
|
...alphaColors
|
|
19
21
|
];
|
|
@@ -26,7 +28,7 @@ var Icon = flowComponent("Icon", (props) => {
|
|
|
26
28
|
const isSkeleton = useSkeletonMode();
|
|
27
29
|
const { className, "aria-label": ariaLabel, children, size = "m", status, color, ...svgAttributes } = props;
|
|
28
30
|
if (status !== void 0) warnDeprecation("The 'status' prop is deprecated and will be removed in a future release. Use 'color' instead.");
|
|
29
|
-
const resolvedColor =
|
|
31
|
+
const resolvedColor = color ?? status;
|
|
30
32
|
const paletteColor = isIconColor(resolvedColor) ? resolvedColor : void 0;
|
|
31
33
|
const customColor = paletteColor === void 0 ? resolvedColor : void 0;
|
|
32
34
|
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 {
|
|
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"}
|
|
@@ -9,10 +9,9 @@ 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
|
|
12
|
+
var violet = "flow--icon--violet";
|
|
13
|
+
var teal = "flow--icon--teal";
|
|
13
14
|
var lilac = "flow--icon--lilac";
|
|
14
|
-
var sage = "flow--icon--sage";
|
|
15
|
-
var salmon = "flow--icon--salmon";
|
|
16
15
|
var dark = "flow--icon--dark";
|
|
17
16
|
var light = "flow--icon--light";
|
|
18
17
|
var skeleton = "flow--icon--skeleton";
|
|
@@ -28,10 +27,9 @@ var Icon_module_default = {
|
|
|
28
27
|
info,
|
|
29
28
|
unavailable,
|
|
30
29
|
blue,
|
|
31
|
-
|
|
30
|
+
violet,
|
|
31
|
+
teal,
|
|
32
32
|
lilac,
|
|
33
|
-
sage,
|
|
34
|
-
salmon,
|
|
35
33
|
dark,
|
|
36
34
|
light,
|
|
37
35
|
"dark-static": "flow--icon--dark-static",
|
|
@@ -40,6 +38,6 @@ var Icon_module_default = {
|
|
|
40
38
|
"skeleton-surface-shimmer": "flow--icon--skeleton-surface-shimmer",
|
|
41
39
|
"skeleton-text-shimmer": "flow--icon--skeleton-text-shimmer"
|
|
42
40
|
};
|
|
43
|
-
export { blue, danger, dark, Icon_module_default as default, icon, info, light, lilac,
|
|
41
|
+
export { blue, danger, dark, Icon_module_default as default, icon, info, light, lilac, neutral, skeleton, success, teal, unavailable, violet, warning };
|
|
44
42
|
|
|
45
43
|
//# 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(\"
|
|
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":""}
|
package/dist/js/packages/components/src/components/IllustratedMessage/IllustratedMessage.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { isAlphaColor } from "../../lib/types/props.mjs";
|
|
4
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
5
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
6
5
|
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);
|
|
8
|
+
const number = Math.abs(code % (avatarColors.length - 1));
|
|
9
9
|
return avatarColors[number] ?? "blue";
|
|
10
10
|
};
|
|
11
11
|
export { getColorFromInitials };
|
package/dist/js/packages/components/src/components/Initials/lib/getColorFromInitials.mjs.map
CHANGED
|
@@ -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);\n return avatarColors[number] ?? \"blue\";\n};\n"],"mappings":";;;;;AAIA,IAAa,wBAAwB,aAAmC;CACtE,MAAM,OAAOA,KAAW,QAAQ;CAChC,MAAM,SAAS,KAAK,IAAI,
|
|
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"}
|
package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs
CHANGED
|
@@ -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(--categorical
|
|
13
|
+
const color = colorFromProps ? isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps : void 0;
|
|
14
14
|
return /* @__PURE__ */ jsxs("li", {
|
|
15
15
|
className: LegendItem_module_default.legendItem,
|
|
16
16
|
inert: isSkeleton || void 0,
|
package/dist/js/packages/components/src/components/Legend/components/LegendItem/LegendItem.mjs.map
CHANGED
|
@@ -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(--categorical
|
|
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,10 +1,10 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { isAlphaColor } from "../../lib/types/props.mjs";
|
|
4
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
5
4
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
6
5
|
import dynamic from "../../lib/propsContext/dynamicProps/dynamic.mjs";
|
|
7
6
|
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 { isAlphaColor } from "../../lib/types/props.mjs";
|
|
4
3
|
import { flowComponent } from "../../lib/componentFactory/flowComponent.mjs";
|
|
4
|
+
import { isAlphaColor } from "../../lib/types/props.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
|
|
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 +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--
|
|
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":""}
|
package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs
CHANGED
|
@@ -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(--categorical
|
|
13
|
+
const backgroundColor = !s.color ? `var(--color--categorical--${getCategoricalColorByIndex(i)})` : isCategoricalColor(s.color) ? `var(--color--categorical--${s.color})` : s.color;
|
|
14
14
|
return /* @__PURE__ */ jsx("div", {
|
|
15
15
|
"aria-hidden": true,
|
|
16
16
|
className: ProgressBar_module_default.segment,
|
package/dist/js/packages/components/src/components/ProgressBar/components/ProgressBarBar.mjs.map
CHANGED
|
@@ -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(--categorical
|
|
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,8 +1,8 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { isAlphaColor } from "../../lib/types/props.mjs";
|
|
4
3
|
import { PropsContextProvider } from "../../lib/propsContext/components/PropsContextProvider.mjs";
|
|
5
4
|
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";
|
|
@@ -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.categorical
|
|
5
|
+
var categoricalColors = Object.keys(all_light_default.color.categorical);
|
|
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.categorical
|
|
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"}
|
|
@@ -17,22 +17,6 @@ var alphaColors = [
|
|
|
17
17
|
function isAlphaColor(color) {
|
|
18
18
|
return alphaColors.includes(color);
|
|
19
19
|
}
|
|
20
|
-
|
|
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 };
|
|
20
|
+
export { alphaColors, isAlphaColor, statusTypes };
|
|
37
21
|
|
|
38
22
|
//# sourceMappingURL=props.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.mjs","names":[],"sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { FlowComponentName } from \"@/components/propTypes\";\nimport type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport type TunnelTarget = {\n id: string;\n component: FlowComponentName;\n /**\n * A stable entry id instead of a generated one. Needed wherever the same\n * component is rendered more than once for a single logical element:\n * react-aria renders collection children twice — once into its hidden\n * collection document, once for real — and a generated id would register each\n * render as its own entry, so the tunnel exit renders every element twice.\n * Must be unique among the siblings of one tunnel.\n */\n staticEntryId?: string;\n} | null;\n\nexport interface PropsWithTunnel {\n /** @internal */\n tunnel?: TunnelTarget;\n}\n\nexport interface PropsWithClassName {\n /** The elements class name. */\n className?: string;\n}\n\nexport type PropsWithElementType<\n T extends keyof HTMLElementTagNameMap = never,\n> = HTMLAttributes<HTMLElement> & {\n /** The HTML element or React component rendered as the elements root. */\n elementType?: T | ExoticComponent;\n};\n\nexport type ContainerBreakpointSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface PropsWithContainerBreakpointSize {\n /**\n * The breakpoint at which the element switches to its compact layout.\n * Evaluated as a container query against the surrounding container, not\n * against the viewport.\n */\n containerBreakpointSize?: ContainerBreakpointSize;\n}\n\nexport const alphaColors = [\n \"dark\",\n \"light\",\n \"dark-static\",\n \"light-static\",\n] as const;\n\nexport type AlphaColor = (typeof alphaColors)[number];\n\nexport function isAlphaColor(color: string): color is AlphaColor {\n return alphaColors.includes(color as AlphaColor);\n}\n
|
|
1
|
+
{"version":3,"file":"props.mjs","names":[],"sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { FlowComponentName } from \"@/components/propTypes\";\nimport type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport type TunnelTarget = {\n id: string;\n component: FlowComponentName;\n /**\n * A stable entry id instead of a generated one. Needed wherever the same\n * component is rendered more than once for a single logical element:\n * react-aria renders collection children twice — once into its hidden\n * collection document, once for real — and a generated id would register each\n * render as its own entry, so the tunnel exit renders every element twice.\n * Must be unique among the siblings of one tunnel.\n */\n staticEntryId?: string;\n} | null;\n\nexport interface PropsWithTunnel {\n /** @internal */\n tunnel?: TunnelTarget;\n}\n\nexport interface PropsWithClassName {\n /** The elements class name. */\n className?: string;\n}\n\nexport type PropsWithElementType<\n T extends keyof HTMLElementTagNameMap = never,\n> = HTMLAttributes<HTMLElement> & {\n /** The HTML element or React component rendered as the elements root. */\n elementType?: T | ExoticComponent;\n};\n\nexport type ContainerBreakpointSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface PropsWithContainerBreakpointSize {\n /**\n * The breakpoint at which the element switches to its compact layout.\n * Evaluated as a container query against the surrounding container, not\n * against the viewport.\n */\n containerBreakpointSize?: ContainerBreakpointSize;\n}\n\nexport const alphaColors = [\n \"dark\",\n \"light\",\n \"dark-static\",\n \"light-static\",\n] as const;\n\nexport type AlphaColor = (typeof alphaColors)[number];\n\nexport function isAlphaColor(color: string): color is AlphaColor {\n return alphaColors.includes(color as AlphaColor);\n}\n"],"mappings":";;;AAGA,IAAa,cAAc;CACzB;CACA;CACA;CACA;CACA;AACF;AAmDA,IAAa,cAAc;CACzB;CACA;CACA;CACA;AACF;AAIA,SAAgB,aAAa,OAAoC;CAC/D,OAAO,YAAY,SAAS,KAAmB;AACjD"}
|