@mittwald/flow-react-components 1.3.0-next.21 → 1.3.0-next.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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 +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +4 -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 +4 -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 +4 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useChartAnimation.mjs +27 -0
- package/dist/js/packages/components/src/components/CartesianChart/hooks/useChartAnimation.mjs.map +1 -0
- package/dist/js/packages/components/src/components/DonutChart/DonutChart.module.mjs +6 -3
- package/dist/js/packages/components/src/components/DonutChart/DonutChart.module.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs +13 -2
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.module.mjs +1 -0
- package/dist/js/packages/components/src/components/ProgressBar/ProgressBar.module.mjs.map +1 -1
- package/dist/js/packages/design-tokens/dist/json-runtime/all-dark.mjs +12 -0
- 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 +12 -0
- package/dist/js/packages/design-tokens/dist/json-runtime/all-light.mjs.map +1 -1
- package/dist/types/components/CartesianChart/hooks/useChartAnimation.d.ts +1 -0
- package/dist/types/lib/theming/hooks/useDesignTokens.d.ts +14 -0
- package/package.json +9 -9
|
@@ -5,6 +5,7 @@ import { AreaDot } from "../AreaDot/AreaDot.mjs";
|
|
|
5
5
|
import { isCategoricalColor } from "../../../../lib/tokens/isCategoricalColor.mjs";
|
|
6
6
|
import { isDataKeyWithLabel } from "../../types.mjs";
|
|
7
7
|
import { useScopedStackId } from "../../hooks/useScopedStackId.mjs";
|
|
8
|
+
import { useChartAnimation } from "../../hooks/useChartAnimation.mjs";
|
|
8
9
|
import "react";
|
|
9
10
|
import { jsx } from "react/jsx-runtime";
|
|
10
11
|
import * as Recharts from "recharts";
|
|
@@ -14,6 +15,7 @@ var Area = (props) => {
|
|
|
14
15
|
const { color: colorFromProps = "sea-green", stackId: stackIdFromProps = 1, fillOpacity = 1, ...rest } = props;
|
|
15
16
|
const tokens = useDesignTokens();
|
|
16
17
|
const stackId = useScopedStackId(stackIdFromProps);
|
|
18
|
+
const animation = useChartAnimation();
|
|
17
19
|
const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
|
|
18
20
|
return /* @__PURE__ */ jsx(Recharts.Area, {
|
|
19
21
|
name: isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey,
|
|
@@ -23,7 +25,8 @@ var Area = (props) => {
|
|
|
23
25
|
activeDot: /* @__PURE__ */ jsx(AreaDot, { color }),
|
|
24
26
|
fill: color,
|
|
25
27
|
stroke: tokens.area["border-color"].value,
|
|
26
|
-
strokeWidth: tokens.area["border-width"].value
|
|
28
|
+
strokeWidth: tokens.area["border-width"].value,
|
|
29
|
+
...animation
|
|
27
30
|
});
|
|
28
31
|
};
|
|
29
32
|
var TypedArea = () => Area;
|
package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Area/Area.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 {\n type ChartDataValue,\n type DataKeyProp,\n type DataKeyWithLabel,\n isDataKeyWithLabel,\n} from \"@/components/CartesianChart/types\";\nimport { useScopedStackId } from \"@/components/CartesianChart/hooks/useScopedStackId\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\ntype AreaBaseProps = Pick<\n Recharts.AreaProps,\n | \"className\"\n | \"stackId\"\n | \"fillOpacity\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"type\"\n | \"unit\"\n> & {\n /** The color of the area. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n};\n\nexport interface AreaPropsByDataKeyProp<\n TData extends ChartDataValue = ChartDataValue,\n> extends AreaBaseProps {\n dataKey: DataKeyProp<TData>;\n}\n\nexport interface AreaPropsByDataKey<\n TData extends ChartDataValue = ChartDataValue,\n>\n extends AreaBaseProps, DataKeyWithLabel<TData> {}\n\nexport type AreaProps<TData extends ChartDataValue = ChartDataValue> =\n AreaPropsByDataKey<TData> | AreaPropsByDataKeyProp<TData>;\n\n/** @flr-generate all */\nexport const Area: FC<AreaProps> = (props) => {\n const {\n color: colorFromProps = \"sea-green\",\n stackId: stackIdFromProps = 1,\n fillOpacity = 1,\n ...rest\n } = props;\n\n const tokens = useDesignTokens();\n const stackId = useScopedStackId(stackIdFromProps);\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Area\n name={isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey}\n stackId={stackId}\n fillOpacity={fillOpacity}\n {...rest}\n activeDot={<AreaDot color={color} />}\n fill={color}\n stroke={tokens.area[\"border-color\"].value}\n strokeWidth={tokens.area[\"border-width\"].value}\n />\n );\n};\n\nexport const TypedArea = <TData extends ChartDataValue = ChartDataValue>() =>\n Area as ComponentType<AreaPropsByDataKeyProp<TData>>;\n\nexport default Area;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Area.mjs","names":[],"sources":["../../../../../../../../../src/components/CartesianChart/components/Area/Area.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 {\n type ChartDataValue,\n type DataKeyProp,\n type DataKeyWithLabel,\n isDataKeyWithLabel,\n} from \"@/components/CartesianChart/types\";\nimport { useScopedStackId } from \"@/components/CartesianChart/hooks/useScopedStackId\";\nimport { useChartAnimation } from \"@/components/CartesianChart/hooks/useChartAnimation\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\ntype AreaBaseProps = Pick<\n Recharts.AreaProps,\n | \"className\"\n | \"stackId\"\n | \"fillOpacity\"\n | \"key\"\n | \"xAxisId\"\n | \"yAxisId\"\n | \"type\"\n | \"unit\"\n> & {\n /** The color of the area. @default \"sea-green\" */\n color?: CategoricalWithCustomColor;\n};\n\nexport interface AreaPropsByDataKeyProp<\n TData extends ChartDataValue = ChartDataValue,\n> extends AreaBaseProps {\n dataKey: DataKeyProp<TData>;\n}\n\nexport interface AreaPropsByDataKey<\n TData extends ChartDataValue = ChartDataValue,\n>\n extends AreaBaseProps, DataKeyWithLabel<TData> {}\n\nexport type AreaProps<TData extends ChartDataValue = ChartDataValue> =\n AreaPropsByDataKey<TData> | AreaPropsByDataKeyProp<TData>;\n\n/** @flr-generate all */\nexport const Area: FC<AreaProps> = (props) => {\n const {\n color: colorFromProps = \"sea-green\",\n stackId: stackIdFromProps = 1,\n fillOpacity = 1,\n ...rest\n } = props;\n\n const tokens = useDesignTokens();\n const stackId = useScopedStackId(stackIdFromProps);\n const animation = useChartAnimation();\n\n const color = isCategoricalColor(colorFromProps)\n ? `var(--color--categorical--${colorFromProps})`\n : colorFromProps;\n\n return (\n <Recharts.Area\n name={isDataKeyWithLabel(props) ? props.dataKeyLabel : props.dataKey}\n stackId={stackId}\n fillOpacity={fillOpacity}\n {...rest}\n activeDot={<AreaDot color={color} />}\n fill={color}\n stroke={tokens.area[\"border-color\"].value}\n strokeWidth={tokens.area[\"border-width\"].value}\n {...animation}\n />\n );\n};\n\nexport const TypedArea = <TData extends ChartDataValue = ChartDataValue>() =>\n Area as ComponentType<AreaPropsByDataKeyProp<TData>>;\n\nexport default Area;\n"],"mappings":";;;;;;;;;;;;;AA6CA,IAAa,QAAuB,UAAU;CAC5C,MAAM,EACJ,OAAO,iBAAiB,aACxB,SAAS,mBAAmB,GAC5B,cAAc,GACd,GAAG,SACD;CAEJ,MAAM,SAAS,gBAAgB;CAC/B,MAAM,UAAU,iBAAiB,gBAAgB;CACjD,MAAM,YAAY,kBAAkB;CAEpC,MAAM,QAAQ,mBAAmB,cAAc,IAC3C,6BAA6B,eAAe,KAC5C;CAEJ,OACE,oBAAC,SAAS,MAAV;EACE,MAAM,mBAAmB,KAAK,IAAI,MAAM,eAAe,MAAM;EACpD;EACI;EACb,GAAI;EACJ,WAAW,oBAAC,SAAD,EAAgB,MAAQ,CAAA;EACnC,MAAM;EACN,QAAQ,OAAO,KAAK,eAAe,CAAC;EACpC,aAAa,OAAO,KAAK,eAAe,CAAC;EACzC,GAAI;CACL,CAAA;AAEL;AAEA,IAAa,kBACX"}
|
|
@@ -5,6 +5,7 @@ import { useCartesianChartContext } from "../../context.mjs";
|
|
|
5
5
|
import { isCategoricalColor } from "../../../../lib/tokens/isCategoricalColor.mjs";
|
|
6
6
|
import { isDataKeyWithLabel } from "../../types.mjs";
|
|
7
7
|
import { useScopedStackId } from "../../hooks/useScopedStackId.mjs";
|
|
8
|
+
import { useChartAnimation } from "../../hooks/useChartAnimation.mjs";
|
|
8
9
|
import "react";
|
|
9
10
|
import { jsx } from "react/jsx-runtime";
|
|
10
11
|
import * as Recharts from "recharts";
|
|
@@ -13,6 +14,7 @@ import * as Recharts from "recharts";
|
|
|
13
14
|
var Bar = (props) => {
|
|
14
15
|
const { color: colorFromProps = "sea-green", ...rest } = props;
|
|
15
16
|
const tokens = useDesignTokens();
|
|
17
|
+
const animation = useChartAnimation();
|
|
16
18
|
const { layout } = useCartesianChartContext();
|
|
17
19
|
const stackId = useScopedStackId(props.stackId);
|
|
18
20
|
const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
|
|
@@ -33,7 +35,8 @@ var Bar = (props) => {
|
|
|
33
35
|
...rest,
|
|
34
36
|
stackId,
|
|
35
37
|
fill: color,
|
|
36
|
-
radius: stackId === void 0 ? radius : 0
|
|
38
|
+
radius: stackId === void 0 ? radius : 0,
|
|
39
|
+
...animation
|
|
37
40
|
});
|
|
38
41
|
if (stackId === void 0) return bar;
|
|
39
42
|
return /* @__PURE__ */ jsx(Recharts.BarStack, {
|
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 { 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 { 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 />\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":"
|
|
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"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { useDesignTokens } from "../../../../lib/theming/hooks/useDesignTokens.mjs";
|
|
4
4
|
import { AreaDot } from "../AreaDot/AreaDot.mjs";
|
|
5
5
|
import { isCategoricalColor } from "../../../../lib/tokens/isCategoricalColor.mjs";
|
|
6
|
+
import { useChartAnimation } from "../../hooks/useChartAnimation.mjs";
|
|
6
7
|
import "react";
|
|
7
8
|
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
import * as Recharts from "recharts";
|
|
@@ -11,6 +12,7 @@ import * as Recharts from "recharts";
|
|
|
11
12
|
var Line = (props) => {
|
|
12
13
|
const { color: colorFromProps = "sea-green", ...rest } = props;
|
|
13
14
|
const tokens = useDesignTokens();
|
|
15
|
+
const animation = useChartAnimation();
|
|
14
16
|
const color = isCategoricalColor(colorFromProps) ? `var(--color--categorical--${colorFromProps})` : colorFromProps;
|
|
15
17
|
return /* @__PURE__ */ jsx(Recharts.Line, {
|
|
16
18
|
...rest,
|
|
@@ -18,7 +20,8 @@ var Line = (props) => {
|
|
|
18
20
|
activeDot: /* @__PURE__ */ jsx(AreaDot, { color }),
|
|
19
21
|
dot: false,
|
|
20
22
|
stroke: color,
|
|
21
|
-
strokeWidth: tokens.line["border-width"].value
|
|
23
|
+
strokeWidth: tokens.line["border-width"].value,
|
|
24
|
+
...animation
|
|
22
25
|
});
|
|
23
26
|
};
|
|
24
27
|
var TypedLine = () => Line;
|
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 { 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\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 />\n );\n};\n\nexport const TypedLine = <T extends ChartDataValue = ChartDataValue>() =>\n Line as ComponentType<LineProps<T>>;\n\nexport default Line;\n"],"mappings":"
|
|
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"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useDesignTokens } from "../../../lib/theming/hooks/useDesignTokens.mjs";
|
|
4
|
+
import { useReducedMotion } from "framer-motion";
|
|
5
|
+
//#region src/components/CartesianChart/hooks/useChartAnimation.ts
|
|
6
|
+
/**
|
|
7
|
+
* Animation props for the chart's graphical items. Recharts animates on mount
|
|
8
|
+
* by default and does not look at the user's motion preference on its own.
|
|
9
|
+
*
|
|
10
|
+
* Replaces recharts' default `"auto"`, which means "not during SSR" – moot
|
|
11
|
+
* here, since `ResponsiveContainer` renders nothing on the server.
|
|
12
|
+
*
|
|
13
|
+
* @internal
|
|
14
|
+
*/
|
|
15
|
+
var useChartAnimation = () => {
|
|
16
|
+
const prefersReducedMotion = useReducedMotion();
|
|
17
|
+
const tokens = useDesignTokens();
|
|
18
|
+
return {
|
|
19
|
+
isAnimationActive: !prefersReducedMotion,
|
|
20
|
+
animationDuration: parseInt(tokens["cartesian-chart"]["transition-duration"].value),
|
|
21
|
+
animationEasing: "ease"
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
//#endregion
|
|
25
|
+
export { useChartAnimation };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=useChartAnimation.mjs.map
|
package/dist/js/packages/components/src/components/CartesianChart/hooks/useChartAnimation.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useChartAnimation.mjs","names":[],"sources":["../../../../../../../../src/components/CartesianChart/hooks/useChartAnimation.ts"],"sourcesContent":["import { useReducedMotion } from \"framer-motion\";\nimport { useDesignTokens } from \"@/lib/theming\";\n\n/**\n * Animation props for the chart's graphical items. Recharts animates on mount\n * by default and does not look at the user's motion preference on its own.\n *\n * Replaces recharts' default `\"auto\"`, which means \"not during SSR\" – moot\n * here, since `ResponsiveContainer` renders nothing on the server.\n *\n * @internal\n */\nexport const useChartAnimation = () => {\n const prefersReducedMotion = useReducedMotion();\n const tokens = useDesignTokens();\n\n return {\n isAnimationActive: !prefersReducedMotion,\n animationDuration: parseInt(\n tokens[\"cartesian-chart\"][\"transition-duration\"].value,\n ),\n // Recharts' own default, pinned to match the CSS `ease` of the DonutChart\n // and the ProgressBar.\n animationEasing: \"ease\" as const,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;AAYA,IAAa,0BAA0B;CACrC,MAAM,uBAAuB,iBAAiB;CAC9C,MAAM,SAAS,gBAAgB;CAE/B,OAAO;EACL,mBAAmB,CAAC;EACpB,mBAAmB,SACjB,OAAO,kBAAkB,CAAC,sBAAsB,CAAC,KACnD;EAGA,iBAAiB;CACnB;AACF"}
|
|
@@ -4,9 +4,10 @@
|
|
|
4
4
|
var donutChart = "flow--donut-chart";
|
|
5
5
|
var border = "flow--donut-chart--border";
|
|
6
6
|
var background = "flow--donut-chart--background";
|
|
7
|
+
var fill = "flow--donut-chart--fill";
|
|
8
|
+
var segment = "flow--donut-chart--segment";
|
|
7
9
|
var value = "flow--donut-chart--value";
|
|
8
10
|
var info = "flow--donut-chart--info";
|
|
9
|
-
var fill = "flow--donut-chart--fill";
|
|
10
11
|
var success = "flow--donut-chart--success";
|
|
11
12
|
var danger = "flow--donut-chart--danger";
|
|
12
13
|
var warning = "flow--donut-chart--warning";
|
|
@@ -20,10 +21,12 @@ var DonutChart_module_default = {
|
|
|
20
21
|
donutChart,
|
|
21
22
|
border,
|
|
22
23
|
background,
|
|
24
|
+
fill,
|
|
25
|
+
segment,
|
|
26
|
+
"donut-chart-fill": "flow--donut-chart--donut-chart-fill",
|
|
23
27
|
value,
|
|
24
28
|
"size-l": "flow--donut-chart--size-l",
|
|
25
29
|
info,
|
|
26
|
-
fill,
|
|
27
30
|
success,
|
|
28
31
|
danger,
|
|
29
32
|
warning,
|
|
@@ -35,6 +38,6 @@ var DonutChart_module_default = {
|
|
|
35
38
|
left
|
|
36
39
|
};
|
|
37
40
|
//#endregion
|
|
38
|
-
export { background, border, bottom, danger, DonutChart_module_default as default, donutChart, donutChartContainer, fill, info, left, legend, right, success, top, value, warning };
|
|
41
|
+
export { background, border, bottom, danger, DonutChart_module_default as default, donutChart, donutChartContainer, fill, info, left, legend, right, segment, success, top, value, warning };
|
|
39
42
|
|
|
40
43
|
//# sourceMappingURL=DonutChart.module.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChart.module.mjs","names":[],"sources":["../../../../../../../src/components/DonutChart/DonutChart.module.scss"],"sourcesContent":[".donutChart {\n position: relative;\n width: fit-content;\n height: fit-content;\n flex-shrink: 0;\n\n .border {\n stroke: var(--donut-chart--border-color);\n }\n\n .background {\n stroke: var(--donut-chart--background-color);\n }\n\n .value {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: anywhere;\n padding: var(--donut-chart--padding--m);\n }\n\n &.size-l {\n .value {\n font-size: var(--font-size-heading--xl);\n padding: var(--donut-chart--padding--l);\n\n // Raw consumer markup inside the value slot — nothing to class.\n // stylelint-disable-next-line selector-max-type -- consumer markup\n small {\n font-size: var(--font-size-heading--l);\n }\n }\n }\n\n /* Variants */\n @mixin status($status) {\n &.#{$status} {\n .fill {\n stroke: var(--donut-chart--#{$status}-fill-background-color);\n }\n }\n }\n\n @include status(info);\n @include status(success);\n @include status(danger);\n @include status(warning);\n}\n\n.donutChartContainer {\n display: flex;\n gap: var(--donut-chart--spacing-y) var(--donut-chart--spacing-x);\n align-items: center;\n\n &.bottom {\n flex-direction: column;\n }\n\n &.top {\n flex-direction: column-reverse;\n }\n\n &.right {\n .legend {\n justify-content: start;\n }\n }\n\n &.left {\n flex-direction: row-reverse;\n\n .legend {\n justify-content: start;\n }\n }\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"DonutChart.module.mjs","names":[],"sources":["../../../../../../../src/components/DonutChart/DonutChart.module.scss"],"sourcesContent":[".donutChart {\n position: relative;\n width: fit-content;\n height: fit-content;\n flex-shrink: 0;\n\n .border {\n stroke: var(--donut-chart--border-color);\n }\n\n .background {\n stroke: var(--donut-chart--background-color);\n }\n\n .fill,\n .segment {\n transform: rotate(var(--donut-chart--fill-rotation));\n transform-box: fill-box;\n transform-origin: center;\n animation: donut-chart-fill var(--donut-chart--transition-duration) ease;\n }\n\n .value {\n position: absolute;\n inset: 0;\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n text-align: center;\n overflow-wrap: anywhere;\n padding: var(--donut-chart--padding--m);\n }\n\n &.size-l {\n .value {\n font-size: var(--font-size-heading--xl);\n padding: var(--donut-chart--padding--l);\n\n // Raw consumer markup inside the value slot — nothing to class.\n // stylelint-disable-next-line selector-max-type -- consumer markup\n small {\n font-size: var(--font-size-heading--l);\n }\n }\n }\n\n /* Variants */\n @mixin status($status) {\n &.#{$status} {\n .fill {\n stroke: var(--donut-chart--#{$status}-fill-background-color);\n }\n }\n }\n\n @include status(info);\n @include status(success);\n @include status(danger);\n @include status(warning);\n}\n\n.donutChartContainer {\n display: flex;\n gap: var(--donut-chart--spacing-y) var(--donut-chart--spacing-x);\n align-items: center;\n\n &.bottom {\n flex-direction: column;\n }\n\n &.top {\n flex-direction: column-reverse;\n }\n\n &.right {\n .legend {\n justify-content: start;\n }\n }\n\n &.left {\n flex-direction: row-reverse;\n\n .legend {\n justify-content: start;\n }\n }\n}\n\n/* The implicit \"to\" keyframe picks up the fill's own offset and rotation. */\n@keyframes donut-chart-fill {\n from {\n stroke-dashoffset: var(--donut-chart--circumference);\n transform: rotate(-90deg);\n }\n}\n"],"mappings":""}
|
|
@@ -5,6 +5,16 @@ import { getCategoricalColorByIndex } from "../../../lib/tokens/getCategoricalCo
|
|
|
5
5
|
import DonutChart_module_default from "../DonutChart.module.mjs";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/DonutChart/components/DonutChartFill.tsx
|
|
8
|
+
/**
|
|
9
|
+
* The rotation is a custom property instead of a `transform` attribute so that
|
|
10
|
+
* the load-in keyframes can animate it – growing every segment out of 12
|
|
11
|
+
* o'clock instead of leaving gaps between them. They need the circumference,
|
|
12
|
+
* too, to animate out of an empty circle.
|
|
13
|
+
*/
|
|
14
|
+
var fillStyle = (rotation, circumference) => ({
|
|
15
|
+
"--donut-chart--fill-rotation": `${rotation}deg`,
|
|
16
|
+
"--donut-chart--circumference": circumference
|
|
17
|
+
});
|
|
8
18
|
var DonutChartFill = (props) => {
|
|
9
19
|
const { center, value = 0, radius, segments, maxValue } = props;
|
|
10
20
|
const circumference = 2 * radius * Math.PI;
|
|
@@ -16,7 +26,7 @@ var DonutChartFill = (props) => {
|
|
|
16
26
|
r: radius,
|
|
17
27
|
strokeDasharray: `${circumference} ${circumference}`,
|
|
18
28
|
strokeDashoffset: circumference - percent / 100 * circumference,
|
|
19
|
-
|
|
29
|
+
style: fillStyle(-90, circumference)
|
|
20
30
|
});
|
|
21
31
|
let rotationOffset = 0;
|
|
22
32
|
return segments.map((s, i) => {
|
|
@@ -25,13 +35,14 @@ var DonutChartFill = (props) => {
|
|
|
25
35
|
rotationOffset = rotationOffset + 360 / 100 * segmentPercent;
|
|
26
36
|
const color = !s.color || isCategoricalColor(s.color) ? `var(--color--categorical--${s.color ?? getCategoricalColorByIndex(i)})` : s.color;
|
|
27
37
|
return /* @__PURE__ */ jsx("circle", {
|
|
38
|
+
className: DonutChart_module_default.segment,
|
|
28
39
|
cx: center,
|
|
29
40
|
cy: center,
|
|
30
41
|
r: radius,
|
|
31
42
|
strokeDasharray: `${circumference} ${circumference}`,
|
|
32
43
|
strokeDashoffset: circumference - segmentPercent / 100 * circumference,
|
|
33
44
|
stroke: color,
|
|
34
|
-
|
|
45
|
+
style: fillStyle(-90 + currentRotationOffset, circumference)
|
|
35
46
|
}, i);
|
|
36
47
|
});
|
|
37
48
|
};
|
package/dist/js/packages/components/src/components/DonutChart/components/DonutChartFill.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChartFill.mjs","names":[],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartFill.tsx"],"sourcesContent":["import type { 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\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const circumference = 2 * radius * Math.PI;\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 strokeDasharray={`${circumference} ${circumference}`}\n strokeDashoffset={circumference - (percent / 100) * circumference}\n
|
|
1
|
+
{"version":3,"file":"DonutChartFill.mjs","names":[],"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 * The rotation is a custom property instead of a `transform` attribute so that\n * the load-in keyframes can animate it – growing every segment out of 12\n * o'clock instead of leaving gaps between them. They need the circumference,\n * too, to animate out of an empty circle.\n */\nconst fillStyle = (rotation: number, circumference: number) =>\n ({\n \"--donut-chart--fill-rotation\": `${rotation}deg`,\n \"--donut-chart--circumference\": circumference,\n }) as CSSProperties;\n\nexport const DonutChartFill: FC<Props> = (props) => {\n const { center, value = 0, radius, segments, maxValue } = props;\n\n const circumference = 2 * radius * Math.PI;\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 strokeDasharray={`${circumference} ${circumference}`}\n strokeDashoffset={circumference - (percent / 100) * circumference}\n style={fillStyle(-90, circumference)}\n />\n );\n }\n\n let rotationOffset = 0;\n\n return segments.map((s, i) => {\n const segmentPercent = (100 / maxValue) * s.value;\n\n const currentRotationOffset = rotationOffset;\n\n rotationOffset = rotationOffset + (360 / 100) * 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 strokeDasharray={`${circumference} ${circumference}`}\n strokeDashoffset={\n circumference - (segmentPercent / 100) * circumference\n }\n stroke={color}\n style={fillStyle(-90 + currentRotationOffset, circumference)}\n />\n );\n });\n};\n"],"mappings":";;;;;;;;;;;;;AAmBA,IAAM,aAAa,UAAkB,mBAClC;CACC,gCAAgC,GAAG,SAAS;CAC5C,gCAAgC;AAClC;AAEF,IAAa,kBAA6B,UAAU;CAClD,MAAM,EAAE,QAAQ,QAAQ,GAAG,QAAQ,UAAU,aAAa;CAE1D,MAAM,gBAAgB,IAAI,SAAS,KAAK;CAExC,MAAM,UAAW,MAAM,WAAY;CAEnC,IAAI,CAAC,UACH,OACE,oBAAC,UAAD;EACE,WAAW,0BAAO;EAClB,IAAI;EACJ,IAAI;EACJ,GAAG;EACH,iBAAiB,GAAG,cAAc,GAAG;EACrC,kBAAkB,gBAAiB,UAAU,MAAO;EACpD,OAAO,UAAU,KAAK,aAAa;CACpC,CAAA;CAIL,IAAI,iBAAiB;CAErB,OAAO,SAAS,KAAK,GAAG,MAAM;EAC5B,MAAM,iBAAkB,MAAM,WAAY,EAAE;EAE5C,MAAM,wBAAwB;EAE9B,iBAAiB,iBAAkB,MAAM,MAAO;EAEhD,MAAM,QACJ,CAAC,EAAE,SAAS,mBAAmB,EAAE,KAAK,IAClC,6BAA6B,EAAE,SAAS,2BAA2B,CAAC,EAAE,KACtE,EAAE;EAIR,OACE,oBAAC,UAAD;GAEE,WAAW,0BAAO;GAClB,IAAI;GACJ,IAAI;GACJ,GAAG;GACH,iBAAiB,GAAG,cAAc,GAAG;GACrC,kBACE,gBAAiB,iBAAiB,MAAO;GAE3C,QAAQ;GACR,OAAO,UAAU,MAAM,uBAAuB,aAAa;EAC5D,GAXM,CAWN;CAEL,CAAC;AACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.module.mjs","names":[],"sources":["../../../../../../../src/components/ProgressBar/ProgressBar.module.scss"],"sourcesContent":[".progressBar {\n display: grid;\n grid-template-areas:\n \"label value\"\n \"bar bar\";\n grid-template-columns: 1fr auto;\n column-gap: var(--progress-bar--spacing-x);\n width: 100%;\n font-size: var(--progress-bar--font-size);\n\n @extend .size-m;\n @extend .info;\n\n &:has(.legend) {\n grid-template-areas:\n \"label value\"\n \"bar bar\"\n \"legend legend\";\n }\n\n /* Elements */\n\n .label {\n grid-area: label;\n }\n\n .value {\n grid-area: value;\n font-weight: var(--progress-bar--value-font-weight);\n }\n\n .bar {\n grid-area: bar;\n border-radius: var(--progress-bar--corner-radius);\n background-color: var(--progress-bar--background-color);\n box-shadow: inset 0 0 0 var(--progress-bar--border-width)\n var(--progress-bar--border-color);\n overflow: hidden;\n margin-top: var(--progress-bar--spacing-y);\n }\n\n .fill {\n height: 100%;\n display: flex;\n }\n\n .legend {\n grid-area: legend;\n margin-top: var(--progress-bar--spacing-bar-to-legend);\n }\n\n /* Size */\n\n &.size-s {\n font-size: var(--progress-bar--font-size-s);\n }\n\n /* Sizes */\n\n @mixin size($size) {\n &.size-#{$size} {\n .bar {\n height: var(--progress-bar--height--#{$size});\n }\n }\n }\n\n @include size(s);\n @include size(m);\n @include size(l);\n\n /* Variants */\n\n @mixin status($status) {\n &.#{$status} {\n .fill {\n background: var(--progress-bar--#{$status}-fill-background-color);\n }\n }\n }\n\n @include status(info);\n @include status(success);\n @include status(danger);\n @include status(warning);\n}\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"ProgressBar.module.mjs","names":[],"sources":["../../../../../../../src/components/ProgressBar/ProgressBar.module.scss"],"sourcesContent":[".progressBar {\n display: grid;\n grid-template-areas:\n \"label value\"\n \"bar bar\";\n grid-template-columns: 1fr auto;\n column-gap: var(--progress-bar--spacing-x);\n width: 100%;\n font-size: var(--progress-bar--font-size);\n\n @extend .size-m;\n @extend .info;\n\n &:has(.legend) {\n grid-template-areas:\n \"label value\"\n \"bar bar\"\n \"legend legend\";\n }\n\n /* Elements */\n\n .label {\n grid-area: label;\n }\n\n .value {\n grid-area: value;\n font-weight: var(--progress-bar--value-font-weight);\n }\n\n .bar {\n grid-area: bar;\n border-radius: var(--progress-bar--corner-radius);\n background-color: var(--progress-bar--background-color);\n box-shadow: inset 0 0 0 var(--progress-bar--border-width)\n var(--progress-bar--border-color);\n overflow: hidden;\n margin-top: var(--progress-bar--spacing-y);\n }\n\n .fill {\n height: 100%;\n display: flex;\n animation: progress-bar-fill var(--progress-bar--transition-duration) ease;\n }\n\n .legend {\n grid-area: legend;\n margin-top: var(--progress-bar--spacing-bar-to-legend);\n }\n\n /* Size */\n\n &.size-s {\n font-size: var(--progress-bar--font-size-s);\n }\n\n /* Sizes */\n\n @mixin size($size) {\n &.size-#{$size} {\n .bar {\n height: var(--progress-bar--height--#{$size});\n }\n }\n }\n\n @include size(s);\n @include size(m);\n @include size(l);\n\n /* Variants */\n\n @mixin status($status) {\n &.#{$status} {\n .fill {\n background: var(--progress-bar--#{$status}-fill-background-color);\n }\n }\n }\n\n @include status(info);\n @include status(success);\n @include status(danger);\n @include status(warning);\n}\n\n/* The implicit \"to\" keyframe picks up the fill's inline width. */\n@keyframes progress-bar-fill {\n from {\n width: 0%;\n }\n}\n"],"mappings":""}
|
|
@@ -4326,6 +4326,10 @@ var all_dark_default = {
|
|
|
4326
4326
|
"path": ["big-number", "font-weight"]
|
|
4327
4327
|
}
|
|
4328
4328
|
},
|
|
4329
|
+
"cartesian-chart": { "transition-duration": {
|
|
4330
|
+
"value": "800ms",
|
|
4331
|
+
"path": ["cartesian-chart", "transition-duration"]
|
|
4332
|
+
} },
|
|
4329
4333
|
"cartesian-grid": {
|
|
4330
4334
|
"color": {
|
|
4331
4335
|
"value": "#E5EFF8",
|
|
@@ -4341,6 +4345,10 @@ var all_dark_default = {
|
|
|
4341
4345
|
"path": ["chart-tooltip", "spacing"]
|
|
4342
4346
|
} },
|
|
4343
4347
|
"donut-chart": {
|
|
4348
|
+
"transition-duration": {
|
|
4349
|
+
"value": "800ms",
|
|
4350
|
+
"path": ["donut-chart", "transition-duration"]
|
|
4351
|
+
},
|
|
4344
4352
|
"border-color": {
|
|
4345
4353
|
"value": "#DCE9F7",
|
|
4346
4354
|
"path": ["donut-chart", "border-color"]
|
|
@@ -5302,6 +5310,10 @@ var all_dark_default = {
|
|
|
5302
5310
|
"path": ["password-creation-field", "rule-to-rule-spacing"]
|
|
5303
5311
|
} },
|
|
5304
5312
|
"progress-bar": {
|
|
5313
|
+
"transition-duration": {
|
|
5314
|
+
"value": "800ms",
|
|
5315
|
+
"path": ["progress-bar", "transition-duration"]
|
|
5316
|
+
},
|
|
5305
5317
|
"font-size": {
|
|
5306
5318
|
"value": "1rem",
|
|
5307
5319
|
"path": ["progress-bar", "font-size"]
|