@mittwald/flow-react-components 0.2.0-alpha.502 → 0.2.0-alpha.503

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.
@@ -21,7 +21,8 @@ const DonutChartLegend = (props) => {
21
21
  {
22
22
  color: s.color ?? getCategoricalColorByIndex(i),
23
23
  children: `${s.title} (${s.valueText ?? formattedValue})`
24
- }
24
+ },
25
+ s.title
25
26
  );
26
27
  }) });
27
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartLegend.mjs","sources":["../../../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport React, { type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport { Legend, LegendItem } from \"@/components/Legend\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ntype Props = Pick<DonutChartProps, \"segments\" | \"showLegend\" | \"formatOptions\">;\n\nexport const DonutChartLegend: FC<Props> = (props) => {\n const { segments, showLegend, formatOptions } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (!segments || !showLegend) {\n return null;\n }\n\n return (\n <Legend className={styles.legend}>\n {segments.map((s, i) => {\n const formattedValue = formatOptions\n ? formatter.format(s.value)\n : `${s.value} %`;\n\n return (\n <LegendItem\n color={s.color ?? getCategoricalColorByIndex(i)}\n >{`${s.title} (${s.valueText ?? formattedValue})`}</LegendItem>\n );\n })}\n </Legend>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASa,MAAA,gBAAA,GAA8B,CAAC,KAAU,KAAA;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,UAAY,EAAA,aAAA,EAAkB,GAAA,KAAA;AAEhD,EAAM,MAAA,SAAA,GAAY,mBAAmB,aAAa,CAAA;AAElD,EAAI,IAAA,CAAC,QAAY,IAAA,CAAC,UAAY,EAAA;AAC5B,IAAO,OAAA,IAAA;AAAA;AAGT,EACE,uBAAA,GAAA,CAAC,UAAO,SAAW,EAAA,MAAA,CAAO,QACvB,QAAS,EAAA,QAAA,CAAA,GAAA,CAAI,CAAC,CAAA,EAAG,CAAM,KAAA;AACtB,IAAM,MAAA,cAAA,GAAiB,gBACnB,SAAU,CAAA,MAAA,CAAO,EAAE,KAAK,CAAA,GACxB,CAAG,EAAA,CAAA,CAAE,KAAK,CAAA,EAAA,CAAA;AAEd,IACE,uBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QACC,KAAO,EAAA,CAAA,CAAE,KAAS,IAAA,0BAAA,CAA2B,CAAC,CAAA;AAAA,QAC9C,aAAG,CAAE,CAAA,KAAK,CAAK,EAAA,EAAA,CAAA,CAAE,aAAa,cAAc,CAAA,CAAA;AAAA;AAAA,KAAI;AAAA,GAErD,CACH,EAAA,CAAA;AAEJ;;;;"}
1
+ {"version":3,"file":"DonutChartLegend.mjs","sources":["../../../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport React, { type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport { Legend, LegendItem } from \"@/components/Legend\";\nimport { getCategoricalColorByIndex } from \"@/lib/tokens/getCategoricalColorByIndex\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ntype Props = Pick<DonutChartProps, \"segments\" | \"showLegend\" | \"formatOptions\">;\n\nexport const DonutChartLegend: FC<Props> = (props) => {\n const { segments, showLegend, formatOptions } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (!segments || !showLegend) {\n return null;\n }\n\n return (\n <Legend className={styles.legend}>\n {segments.map((s, i) => {\n const formattedValue = formatOptions\n ? formatter.format(s.value)\n : `${s.value} %`;\n\n return (\n <LegendItem\n key={s.title}\n color={s.color ?? getCategoricalColorByIndex(i)}\n >{`${s.title} (${s.valueText ?? formattedValue})`}</LegendItem>\n );\n })}\n </Legend>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASa,MAAA,gBAAA,GAA8B,CAAC,KAAU,KAAA;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,UAAY,EAAA,aAAA,EAAkB,GAAA,KAAA;AAEhD,EAAM,MAAA,SAAA,GAAY,mBAAmB,aAAa,CAAA;AAElD,EAAI,IAAA,CAAC,QAAY,IAAA,CAAC,UAAY,EAAA;AAC5B,IAAO,OAAA,IAAA;AAAA;AAGT,EACE,uBAAA,GAAA,CAAC,UAAO,SAAW,EAAA,MAAA,CAAO,QACvB,QAAS,EAAA,QAAA,CAAA,GAAA,CAAI,CAAC,CAAA,EAAG,CAAM,KAAA;AACtB,IAAM,MAAA,cAAA,GAAiB,gBACnB,SAAU,CAAA,MAAA,CAAO,EAAE,KAAK,CAAA,GACxB,CAAG,EAAA,CAAA,CAAE,KAAK,CAAA,EAAA,CAAA;AAEd,IACE,uBAAA,GAAA;AAAA,MAAC,UAAA;AAAA,MAAA;AAAA,QAEC,KAAO,EAAA,CAAA,CAAE,KAAS,IAAA,0BAAA,CAA2B,CAAC,CAAA;AAAA,QAC9C,aAAG,CAAE,CAAA,KAAK,CAAK,EAAA,EAAA,CAAA,CAAE,aAAa,cAAc,CAAA,CAAA;AAAA,OAAA;AAAA,MAFvC,CAAE,CAAA;AAAA,KAEyC;AAAA,GAErD,CACH,EAAA,CAAA;AAEJ;;;;"}
@@ -15,9 +15,6 @@ const Navigation = flowComponent("Navigation", (props) => {
15
15
  wrapWith: /* @__PURE__ */ jsx("li", {}),
16
16
  className: styles.item,
17
17
  unstyled: true,
18
- Text: {
19
- className: styles.text
20
- },
21
18
  Icon: {
22
19
  className: styles.icon
23
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.mjs","sources":["../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Navigation.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\n\nexport interface NavigationProps\n extends PropsWithChildren<ComponentProps<\"nav\">>,\n PropsWithClassName,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Navigation = flowComponent(\"Navigation\", (props) => {\n const { className, children, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.navigation, className);\n\n const linkPropsContext: ComponentPropsContext<\"Link\"> = {\n wrapWith: <li />,\n className: styles.item,\n unstyled: true,\n Text: {\n className: styles.text,\n },\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <PropsContextProvider\n props={{\n Link: {\n ...linkPropsContext,\n tunnelId: \"links\",\n },\n NavigationGroup: {\n Link: linkPropsContext,\n },\n }}\n >\n <TunnelProvider>\n <nav className={rootClassName} role=\"navigation\" {...rest} ref={ref}>\n <ul>\n <TunnelExit id=\"links\" />\n </ul>\n {children}\n </nav>\n </TunnelProvider>\n </PropsContextProvider>\n );\n});\n\nexport default Navigation;\n"],"names":[],"mappings":";;;;;;;;AAkBO,MAAM,UAAa,GAAA,aAAA,CAAc,YAAc,EAAA,CAAC,KAAU,KAAA;AAC/D,EAAA,MAAM,EAAE,SAAW,EAAA,QAAA,EAAU,GAAK,EAAA,GAAG,MAAS,GAAA,KAAA;AAE9C,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,UAAA,EAAY,SAAS,CAAA;AAEvD,EAAA,MAAM,gBAAkD,GAAA;AAAA,IACtD,QAAA,sBAAW,IAAG,EAAA,EAAA,CAAA;AAAA,IACd,WAAW,MAAO,CAAA,IAAA;AAAA,IAClB,QAAU,EAAA,IAAA;AAAA,IACV,IAAM,EAAA;AAAA,MACJ,WAAW,MAAO,CAAA;AAAA,KACpB;AAAA,IACA,IAAM,EAAA;AAAA,MACJ,WAAW,MAAO,CAAA;AAAA;AACpB,GACF;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,IAAM,EAAA;AAAA,UACJ,GAAG,gBAAA;AAAA,UACH,QAAU,EAAA;AAAA,SACZ;AAAA,QACA,eAAiB,EAAA;AAAA,UACf,IAAM,EAAA;AAAA;AACR,OACF;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,cACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,eAAe,IAAK,EAAA,YAAA,EAAc,GAAG,IAAA,EAAM,GACzD,EAAA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,SAAQ,CACzB,EAAA,CAAA;AAAA,QACC;AAAA,OAAA,EACH,CACF,EAAA;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
1
+ {"version":3,"file":"Navigation.mjs","sources":["../../../../../../src/components/Navigation/Navigation.tsx"],"sourcesContent":["import type { ComponentProps, PropsWithChildren } from \"react\";\nimport styles from \"./Navigation.module.scss\";\nimport clsx from \"clsx\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { ComponentPropsContext } from \"@/lib/propsContext/types\";\n\nexport interface NavigationProps\n extends PropsWithChildren<ComponentProps<\"nav\">>,\n PropsWithClassName,\n FlowComponentProps<HTMLElement> {}\n\n/** @flr-generate all */\nexport const Navigation = flowComponent(\"Navigation\", (props) => {\n const { className, children, ref, ...rest } = props;\n\n const rootClassName = clsx(styles.navigation, className);\n\n const linkPropsContext: ComponentPropsContext<\"Link\"> = {\n wrapWith: <li />,\n className: styles.item,\n unstyled: true,\n Icon: {\n className: styles.icon,\n },\n };\n\n return (\n <PropsContextProvider\n props={{\n Link: {\n ...linkPropsContext,\n tunnelId: \"links\",\n },\n NavigationGroup: {\n Link: linkPropsContext,\n },\n }}\n >\n <TunnelProvider>\n <nav className={rootClassName} role=\"navigation\" {...rest} ref={ref}>\n <ul>\n <TunnelExit id=\"links\" />\n </ul>\n {children}\n </nav>\n </TunnelProvider>\n </PropsContextProvider>\n );\n});\n\nexport default Navigation;\n"],"names":[],"mappings":";;;;;;;;AAkBO,MAAM,UAAa,GAAA,aAAA,CAAc,YAAc,EAAA,CAAC,KAAU,KAAA;AAC/D,EAAA,MAAM,EAAE,SAAW,EAAA,QAAA,EAAU,GAAK,EAAA,GAAG,MAAS,GAAA,KAAA;AAE9C,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,MAAO,CAAA,UAAA,EAAY,SAAS,CAAA;AAEvD,EAAA,MAAM,gBAAkD,GAAA;AAAA,IACtD,QAAA,sBAAW,IAAG,EAAA,EAAA,CAAA;AAAA,IACd,WAAW,MAAO,CAAA,IAAA;AAAA,IAClB,QAAU,EAAA,IAAA;AAAA,IACV,IAAM,EAAA;AAAA,MACJ,WAAW,MAAO,CAAA;AAAA;AACpB,GACF;AAEA,EACE,uBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAO,EAAA;AAAA,QACL,IAAM,EAAA;AAAA,UACJ,GAAG,gBAAA;AAAA,UACH,QAAU,EAAA;AAAA,SACZ;AAAA,QACA,eAAiB,EAAA;AAAA,UACf,IAAM,EAAA;AAAA;AACR,OACF;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,cACC,EAAA,EAAA,QAAA,kBAAA,IAAA,CAAC,KAAI,EAAA,EAAA,SAAA,EAAW,eAAe,IAAK,EAAA,YAAA,EAAc,GAAG,IAAA,EAAM,GACzD,EAAA,QAAA,EAAA;AAAA,wBAAA,GAAA,CAAC,IACC,EAAA,EAAA,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,SAAQ,CACzB,EAAA,CAAA;AAAA,QACC;AAAA,OAAA,EACH,CACF,EAAA;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DonutChartLegend.d.ts","sourceRoot":"","sources":["../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC;AAEhF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAwBtC,CAAC"}
1
+ {"version":3,"file":"DonutChartLegend.d.ts","sourceRoot":"","sources":["../../../../../src/components/DonutChart/components/DonutChartLegend.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,KAAK,KAAK,GAAG,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,GAAG,eAAe,CAAC,CAAC;AAEhF,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,KAAK,CAyBtC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,WAAW,eACf,SAAQ,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAC9C,kBAAkB,EAClB,kBAAkB,CAAC,WAAW,CAAC;CAAG;AAEtC,wBAAwB;AACxB,eAAO,MAAM,UAAU,iGAuCrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../../src/components/Navigation/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAI/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,WAAW,eACf,SAAQ,iBAAiB,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,EAC9C,kBAAkB,EAClB,kBAAkB,CAAC,WAAW,CAAC;CAAG;AAEtC,wBAAwB;AACxB,eAAO,MAAM,UAAU,iGAoCrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.502",
3
+ "version": "0.2.0-alpha.503",
4
4
  "type": "module",
5
5
  "description": "A React implementation of Flow, mittwald’s design system",
6
6
  "homepage": "https://mittwald.github.io/flow",
@@ -58,7 +58,7 @@
58
58
  "dependencies": {
59
59
  "@internationalized/string-compiler": "^3.2.6",
60
60
  "@mittwald/password-tools-js": "3.0.0-alpha.18",
61
- "@mittwald/react-tunnel": "0.2.0-alpha.502",
61
+ "@mittwald/react-tunnel": "0.2.0-alpha.503",
62
62
  "@mittwald/react-use-promise": "^3.0.4",
63
63
  "@react-aria/form": "^3.1.1",
64
64
  "@react-aria/live-announcer": "^3.4.4",
@@ -101,7 +101,7 @@
101
101
  "@faker-js/faker": "^9.9.0",
102
102
  "@internationalized/date": "^3.9.0",
103
103
  "@mittwald/flow-core": "",
104
- "@mittwald/flow-design-tokens": "0.2.0-alpha.502",
104
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.503",
105
105
  "@mittwald/react-use-promise": "^3.0.4",
106
106
  "@mittwald/remote-dom-react": "1.2.2-mittwald.3",
107
107
  "@mittwald/typescript-config": "",
@@ -174,5 +174,5 @@
174
174
  "optional": true
175
175
  }
176
176
  },
177
- "gitHead": "ed4bf0d0da36e9b2f366a9fa80a135243bd2d63b"
177
+ "gitHead": "eb3e6aa927c6dd63f6e9ebc6919ea63d978cd889"
178
178
  }