@mittwald/flow-react-components 1.4.26 → 1.4.28
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 +10 -1
- package/dist/assets/component-index.json +1 -1
- package/dist/assets/doc-properties.json +1 -1
- package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs +1 -1
- package/dist/js/packages/components/src/components/AvatarStack/AvatarStack.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs +1 -1
- package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map +1 -1
- package/dist/types/lib/dev/parkPointer.d.ts +1 -0
- package/package.json +9 -9
|
@@ -12,7 +12,7 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
12
12
|
/** @flr-generate all */
|
|
13
13
|
var AvatarStack = (props) => {
|
|
14
14
|
const { className, children, totalCount = 0, size = "m", onCountPress } = props;
|
|
15
|
-
const additionalItemsCount = totalCount - Children.
|
|
15
|
+
const additionalItemsCount = totalCount - Children.toArray(children).length;
|
|
16
16
|
const rootClassName = clsx(AvatarStack_module_default.avatarStack, AvatarStack_module_default[`size-${size}`], className);
|
|
17
17
|
const propsContext = {
|
|
18
18
|
Avatar: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AvatarStack.mjs","names":["styles"],"sources":["../../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName, PropsWithChildren {\n /**\n * The total count of items, as avatars should only be displayed for the first\n * view\n */\n totalCount?: number;\n /** The onPress action of the additional items count element */\n onCountPress?: () => void;\n /** The size of the avatars inside the stack. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n}\n\n/** @flr-generate all */\nexport const AvatarStack: FC<AvatarStackProps> = (props) => {\n const {\n className,\n children,\n totalCount = 0,\n size = \"m\",\n onCountPress,\n } = props;\n\n const avatarCount = Children.
|
|
1
|
+
{"version":3,"file":"AvatarStack.mjs","names":["styles"],"sources":["../../../../../../../src/components/AvatarStack/AvatarStack.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { Children } from \"react\";\nimport clsx from \"clsx\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport styles from \"./AvatarStack.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { Avatar } from \"@/components/Avatar\";\nimport { Wrap } from \"@/components/Wrap\";\n\nexport interface AvatarStackProps\n extends PropsWithClassName, PropsWithChildren {\n /**\n * The total count of items, as avatars should only be displayed for the first\n * view\n */\n totalCount?: number;\n /** The onPress action of the additional items count element */\n onCountPress?: () => void;\n /** The size of the avatars inside the stack. @default \"m\" */\n size?: \"xs\" | \"s\" | \"m\" | \"l\";\n}\n\n/** @flr-generate all */\nexport const AvatarStack: FC<AvatarStackProps> = (props) => {\n const {\n className,\n children,\n totalCount = 0,\n size = \"m\",\n onCountPress,\n } = props;\n\n const avatarCount = Children.toArray(children).length;\n\n const additionalItemsCount = totalCount - avatarCount;\n\n const rootClassName = clsx(\n styles.avatarStack,\n styles[`size-${size}`],\n className,\n );\n\n const propsContext: PropsContext = {\n Avatar: { className: styles.avatar, size },\n Button: {\n className: styles.avatar,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>\n {children}\n {additionalItemsCount > 0 && (\n <Wrap if={onCountPress}>\n <Button onPress={onCountPress}>\n <Avatar size={size}>+{additionalItemsCount}</Avatar>\n </Button>\n </Wrap>\n )}\n </div>\n </PropsContextProvider>\n );\n};\n\nexport default AvatarStack;\n"],"mappings":";;;;;;;;;;;;AAyBA,IAAa,eAAqC,UAAU;CAC1D,MAAM,EACJ,WACA,UACA,aAAa,GACb,OAAO,KACP,iBACE;CAIJ,MAAM,uBAAuB,aAFT,SAAS,QAAQ,QAAQ,CAAC,CAAC;CAI/C,MAAM,gBAAgB,KACpBA,2BAAO,aACPA,2BAAO,QAAQ,SACf,SACF;CAEA,MAAM,eAA6B;EACjC,QAAQ;GAAE,WAAWA,2BAAO;GAAQ;EAAK;EACzC,QAAQ,EACN,WAAWA,2BAAO,OACpB;CACF;CAEA,OACE,oBAAC,sBAAD;EAAsB,OAAO;EAC3B,UAAA,qBAAC,OAAD;GAAK,WAAW;GAAhB,UAAA,CACG,UACA,uBAAuB,KACtB,oBAAC,MAAD;IAAM,IAAI;IACR,UAAA,oBAAC,QAAD;KAAQ,SAAS;KACf,UAAA,qBAAC,QAAD;MAAc;MAAd,UAAA,CAAoB,KAAE,oBAA6B;;IAC7C,CAAA;GACJ,CAAA,CAEL;;CACe,CAAA;AAE1B"}
|
package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { useNumberFormatter } from "react-aria";
|
|
|
8
8
|
var DonutChartValue = (props) => {
|
|
9
9
|
const { value = 0, formatOptions, children } = props;
|
|
10
10
|
const formatter = useNumberFormatter(formatOptions);
|
|
11
|
-
if (Children.
|
|
11
|
+
if (Children.toArray(children).length > 0) return /* @__PURE__ */ jsx("span", {
|
|
12
12
|
className: DonutChart_module_default.value,
|
|
13
13
|
children
|
|
14
14
|
});
|
package/dist/js/packages/components/src/components/DonutChart/components/DonutChartValue.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DonutChartValue.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartValue.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { Children, type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<DonutChartProps, \"formatOptions\" | \"children\"> {\n value?: number;\n}\n\nexport const DonutChartValue: FC<Props> = (props) => {\n const { value = 0, formatOptions, children } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (Children.
|
|
1
|
+
{"version":3,"file":"DonutChartValue.mjs","names":["styles"],"sources":["../../../../../../../../src/components/DonutChart/components/DonutChartValue.tsx"],"sourcesContent":["import styles from \"../DonutChart.module.scss\";\nimport { Children, type FC } from \"react\";\nimport { useNumberFormatter } from \"react-aria\";\nimport type { DonutChartProps } from \"@/components/DonutChart\";\n\ninterface Props extends Pick<DonutChartProps, \"formatOptions\" | \"children\"> {\n value?: number;\n}\n\nexport const DonutChartValue: FC<Props> = (props) => {\n const { value = 0, formatOptions, children } = props;\n\n const formatter = useNumberFormatter(formatOptions);\n\n if (Children.toArray(children).length > 0) {\n return <span className={styles.value}>{children}</span>;\n }\n\n const formattedValue = formatOptions ? formatter.format(value) : `${value} %`;\n\n return (\n <span className={styles.value}>\n <strong>{formattedValue}</strong>\n </span>\n );\n};\n"],"mappings":";;;;;;;AASA,IAAa,mBAA8B,UAAU;CACnD,MAAM,EAAE,QAAQ,GAAG,eAAe,aAAa;CAE/C,MAAM,YAAY,mBAAmB,aAAa;CAElD,IAAI,SAAS,QAAQ,QAAQ,CAAC,CAAC,SAAS,GACtC,OAAO,oBAAC,QAAD;EAAM,WAAWA,0BAAO;EAAQ;CAAe,CAAA;CAGxD,MAAM,iBAAiB,gBAAgB,UAAU,OAAO,KAAK,IAAI,GAAG,MAAM;CAE1E,OACE,oBAAC,QAAD;EAAM,WAAWA,0BAAO;EACtB,UAAA,oBAAC,UAAD,EAAA,UAAS,eAAuB,CAAA;CAC5B,CAAA;AAEV"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parkPointer: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://flow.mittwald.de",
|
|
@@ -84,9 +84,9 @@
|
|
|
84
84
|
"@internationalized/string-compiler": "^3.4.1",
|
|
85
85
|
"@lezer/common": "^1.5.2",
|
|
86
86
|
"@lezer/highlight": "^1.2.3",
|
|
87
|
-
"@mittwald/flow-icons": "^1.4.
|
|
87
|
+
"@mittwald/flow-icons": "^1.4.28",
|
|
88
88
|
"@mittwald/password-tools-js": "^3.0.0",
|
|
89
|
-
"@mittwald/react-tunnel": "^1.4.
|
|
89
|
+
"@mittwald/react-tunnel": "^1.4.28",
|
|
90
90
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
91
91
|
"@react-aria/form": "^3.2.1",
|
|
92
92
|
"@react-aria/i18n": "^3.13.1",
|
|
@@ -139,12 +139,12 @@
|
|
|
139
139
|
"@internationalized/date": "^3.12.3",
|
|
140
140
|
"@lezer/generator": "^1.8.0",
|
|
141
141
|
"@lezer/lr": "^1.4.10",
|
|
142
|
-
"@mittwald/flow-core": "1.4.
|
|
143
|
-
"@mittwald/flow-design-tokens": "1.4.
|
|
144
|
-
"@mittwald/flow-icons-base": "1.4.
|
|
142
|
+
"@mittwald/flow-core": "1.4.28",
|
|
143
|
+
"@mittwald/flow-design-tokens": "1.4.28",
|
|
144
|
+
"@mittwald/flow-icons-base": "1.4.28",
|
|
145
145
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
146
146
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
147
|
-
"@mittwald/typescript-config": "1.4.
|
|
147
|
+
"@mittwald/typescript-config": "1.4.28",
|
|
148
148
|
"@nx/storybook": "^22.7.6",
|
|
149
149
|
"@storybook/addon-a11y": "^10.5.10",
|
|
150
150
|
"@storybook/addon-actions": "^9.0.8",
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
},
|
|
199
199
|
"peerDependencies": {
|
|
200
200
|
"@internationalized/date": "^3.12.2",
|
|
201
|
-
"@mittwald/flow-icons-pro": "1.4.
|
|
201
|
+
"@mittwald/flow-icons-pro": "1.4.28",
|
|
202
202
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
203
203
|
"next": "^16.2.3",
|
|
204
204
|
"react": "^19.2.0",
|
|
@@ -222,5 +222,5 @@
|
|
|
222
222
|
"browserslist": [
|
|
223
223
|
"baseline widely available"
|
|
224
224
|
],
|
|
225
|
-
"gitHead": "
|
|
225
|
+
"gitHead": "c6649fb3f39ae3f99791d3fc30888a67cf4d1db3"
|
|
226
226
|
}
|