@mittwald/flow-react-components 0.1.0-alpha.64 → 0.1.0-alpha.66
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/{Action-CeKzQsag.js → Action-DZzRGFBL.js} +1 -1
- package/dist/Action.js +1 -1
- package/dist/Avatar.js +1 -1
- package/dist/Breadcrumb.js +12 -13
- package/dist/Button-CdGfSPx-.js +101 -0
- package/dist/Button.js +1 -1
- package/dist/ButtonGroup.js +1 -1
- package/dist/Checkbox-Bc-Yp2Li.js +24 -0
- package/dist/Checkbox.js +1 -1
- package/dist/CheckboxButton-D5G0rxZz.js +29 -0
- package/dist/CheckboxButton.js +1 -1
- package/dist/CheckboxGroup.js +26 -20
- package/dist/Content.js +7 -7
- package/dist/ContextMenu.js +2 -2
- package/dist/ContextMenuItem-k4nwztKS.js +67 -0
- package/dist/CopyButton.js +15 -16
- package/dist/FieldDescription.js +12 -12
- package/dist/FieldError-CBxCl2nS.js +22 -0
- package/dist/FieldError.js +1 -1
- package/dist/Header.js +5 -5
- package/dist/Heading.js +15 -15
- package/dist/{Icon-DnhU6oCr.js → Icon-DVRBNZZe.js} +1 -1
- package/dist/Icon.js +1 -1
- package/dist/{IconCheck-VQzoZYpg.js → IconCheck-D9Y94psR.js} +1 -1
- package/dist/{IconCheckboxEmpty-BYBEifGn.js → IconCheckboxEmpty-BneZ_izo.js} +1 -1
- package/dist/{IconCheckboxIndeterminate-DCWISQ9y.js → IconCheckboxIndeterminate-DZM-0gVy.js} +1 -1
- package/dist/{IconChevronDown-BmKMxrq1.js → IconChevronDown-D8WRADYa.js} +1 -1
- package/dist/{IconChevronRight-ngvPFPMg.js → IconChevronRight-D2iaxujY.js} +1 -1
- package/dist/{IconClose-BkmXvQ2z.js → IconClose-zpsdo5WH.js} +1 -1
- package/dist/{IconContextMenu-B7uKuktv.js → IconContextMenu-D58YJ4YL.js} +1 -1
- package/dist/{IconCopy-BmKbdWWX.js → IconCopy-Dg12Fbk9.js} +1 -1
- package/dist/{IconDanger-C0Tcw4tP.js → IconDanger-BKH4QbJ1.js} +1 -1
- package/dist/{IconPlus-DfL7-kUg.js → IconPlus-WchYGpT1.js} +1 -1
- package/dist/{IconRadioOn-VUVt3QQC.js → IconRadioOn-DNpq9Xk7.js} +1 -1
- package/dist/{IconSucceeded-CENvDJzH.js → IconSucceeded-d5GrQkmO.js} +1 -1
- package/dist/{IconWarning-43TmpPox.js → IconWarning-pPmXp5KC.js} +1 -1
- package/dist/Icons.js +14 -14
- package/dist/Image.js +7 -7
- package/dist/Initials.js +11 -11
- package/dist/InlineAlert.js +19 -19
- package/dist/Label-BFDBIwAZ.js +34 -0
- package/dist/Label.js +1 -1
- package/dist/LayoutCard.js +10 -10
- package/dist/Link-kCrtSVrZ.js +51 -0
- package/dist/Link.js +1 -1
- package/dist/List.js +27 -29
- package/dist/NumberField.js +56 -42
- package/dist/RadioGroup.js +47 -44
- package/dist/Select.js +62 -39
- package/dist/StatusBadge.js +17 -17
- package/dist/StatusIcon-gxczp9bZ.js +37 -0
- package/dist/StatusIcon.js +1 -1
- package/dist/Switch.js +23 -17
- package/dist/Tabs.js +2 -2
- package/dist/Text-D7C_T7CE.js +38 -0
- package/dist/Text.js +1 -1
- package/dist/TextArea.js +16 -14
- package/dist/TextField.js +19 -11
- package/dist/TextFieldBase-DuP4Ls0l.js +32 -0
- package/dist/flowComponent-CEo3pjEA.js +19 -0
- package/dist/nextjs.js +12 -0
- package/dist/react-hook-form.js +62 -0
- package/dist/types/components/Button/Button.d.ts +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +4 -3
- package/dist/types/components/CheckboxButton/CheckboxButton.d.ts +4 -3
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts +4 -3
- package/dist/types/components/Content/Content.d.ts +2 -2
- package/dist/types/components/ContextMenu/ContextMenu.d.ts +1 -1
- package/dist/types/components/CopyButton/CopyButton.d.ts +1 -1
- package/dist/types/components/FieldDescription/FieldDescription.d.ts +1 -1
- package/dist/types/components/FieldError/FieldError.d.ts +1 -1
- package/dist/types/components/Header/Header.d.ts +2 -2
- package/dist/types/components/Heading/Heading.d.ts +1 -1
- package/dist/types/components/Icon/Icon.d.ts +1 -1
- package/dist/types/components/Image/Image.d.ts +1 -1
- package/dist/types/components/Initials/Initials.d.ts +1 -1
- package/dist/types/components/InlineAlert/InlineAlert.d.ts +1 -1
- package/dist/types/components/Label/Label.d.ts +1 -1
- package/dist/types/components/LayoutCard/LayoutCard.d.ts +2 -2
- package/dist/types/components/Link/Link.d.ts +1 -1
- package/dist/types/components/NumberField/NumberField.d.ts +4 -3
- package/dist/types/components/RadioGroup/RadioGroup.d.ts +4 -3
- package/dist/types/components/RadioGroup/components/Radio/Radio.d.ts +1 -1
- package/dist/types/components/RadioGroup/components/RadioButton/RadioButton.d.ts +4 -3
- package/dist/types/components/Section/stories/EdgeCases.stories.d.ts +1 -2
- package/dist/types/components/Select/Select.d.ts +5 -3
- package/dist/types/components/Select/components/Option/Option.d.ts +5 -3
- package/dist/types/components/Select/index.d.ts +0 -1
- package/dist/types/components/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/types/components/Switch/Switch.d.ts +1 -1
- package/dist/types/components/Text/Text.d.ts +2 -2
- package/dist/types/components/TextArea/TextArea.d.ts +4 -3
- package/dist/types/components/TextField/TextField.d.ts +4 -3
- package/dist/types/components/TextFieldBase/TextFieldBase.d.ts +2 -2
- package/dist/types/components/propTypes/index.d.ts +18 -1
- package/dist/types/integrations/nextjs/index.d.ts +2 -0
- package/dist/types/integrations/react-hook-form/components/Controller/Controller.d.ts +8 -0
- package/dist/types/integrations/react-hook-form/components/Controller/index.d.ts +4 -0
- package/dist/types/integrations/react-hook-form/components/Controller/stories/Default.stories.d.ts +7 -0
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts +8 -0
- package/dist/types/integrations/react-hook-form/components/Form/index.d.ts +4 -0
- package/dist/types/integrations/react-hook-form/components/context/formContext.d.ts +10 -0
- package/dist/types/integrations/react-hook-form/index.d.ts +2 -0
- package/dist/types/lib/childProps/ChildPropsContextProvider.d.ts +9 -0
- package/dist/types/lib/childProps/ChildPropsStore.d.ts +14 -0
- package/dist/types/lib/childProps/context.d.ts +5 -0
- package/dist/types/lib/childProps/index.d.ts +2 -0
- package/dist/types/lib/childProps/useSetChildProps.d.ts +3 -0
- package/dist/types/lib/componentFactory/flowComponent.d.ts +6 -4
- package/dist/types/lib/propsContext/propsContext.d.ts +10 -0
- package/dist/types/lib/types/props.d.ts +2 -2
- package/dist/{useProps-DqP5wneE.js → useProps-DoKnPAup.js} +38 -28
- package/package.json +24 -15
- package/dist/Button-CUr754ra.js +0 -99
- package/dist/Checkbox-CBAAtfxq.js +0 -24
- package/dist/CheckboxButton-BYp2HCfN.js +0 -27
- package/dist/ContextMenuItem-7xGNJkkK.js +0 -66
- package/dist/FieldError-D9ZaMqoL.js +0 -22
- package/dist/Label-CnhSifzw.js +0 -27
- package/dist/Link-3bAuyVEg.js +0 -49
- package/dist/StatusIcon-D6re4qSI.js +0 -39
- package/dist/Text-2sThcKor.js +0 -37
- package/dist/TextFieldBase-Dtcmh0_x.js +0 -30
- package/dist/flowComponent-Dfn_Z9Yx.js +0 -19
- package/dist/nextjs/LinkProvider.js +0 -12
- /package/dist/types/{components/nextjs → integrations/nextjs/components}/Link/Link.d.ts +0 -0
- /package/dist/types/{components/nextjs → integrations/nextjs/components}/Link/index.d.ts +0 -0
- /package/dist/types/{components/nextjs → integrations/nextjs/components}/LinkProvider/LinkProvider.d.ts +0 -0
- /package/dist/types/{components/nextjs → integrations/nextjs/components}/LinkProvider/index.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChildPropsStore } from './ChildPropsStore';
|
|
2
|
+
import { FC, PropsWithChildren } from 'react';
|
|
3
|
+
|
|
4
|
+
interface ChildPropsContextProviderProps extends PropsWithChildren {
|
|
5
|
+
store?: ChildPropsStore;
|
|
6
|
+
scope?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ChildPropsContextProvider: FC<ChildPropsContextProviderProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ChildProps = object;
|
|
2
|
+
export declare class ChildPropsStore {
|
|
3
|
+
children: Record<string, ChildProps>;
|
|
4
|
+
readonly scope: string;
|
|
5
|
+
constructor(scope: string);
|
|
6
|
+
static useNew(scope: string): ChildPropsStore;
|
|
7
|
+
static useFromContext(scope: string): ChildPropsStore;
|
|
8
|
+
setProps(childId: string, props: ChildProps): void;
|
|
9
|
+
removeProps(childId: string): void;
|
|
10
|
+
getPropsArray<T>(): T[];
|
|
11
|
+
getProp<T>(name: string): T | undefined;
|
|
12
|
+
useProp<T>(name: string): T | undefined;
|
|
13
|
+
usePropsArray<T>(): T[];
|
|
14
|
+
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { PropsWithHOC, PropsWithTunnel } from '../types/props';
|
|
2
|
-
import { ComponentType } from 'react';
|
|
2
|
+
import { ComponentType, ForwardRefExoticComponent, LegacyRef, PropsWithoutRef, RefAttributes } from 'react';
|
|
3
3
|
import { FlowComponentName, FlowComponentProps as FlowComponentPropsOfName } from '../../components/propTypes';
|
|
4
4
|
|
|
5
5
|
export type FlowComponentProps<P = unknown> = P & PropsWithTunnel & PropsWithHOC<P>;
|
|
6
|
-
type FlowComponentImplementationType<C extends FlowComponentName> = ComponentType<Omit<FlowComponentPropsOfName<C>, keyof FlowComponentProps
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
type FlowComponentImplementationType<C extends FlowComponentName> = ComponentType<Omit<FlowComponentPropsOfName<C>, keyof FlowComponentProps> & {
|
|
7
|
+
ref?: LegacyRef<never>;
|
|
8
|
+
}>;
|
|
9
|
+
type FlowComponentType<C extends FlowComponentName> = ForwardRefExoticComponent<PropsWithoutRef<FlowComponentPropsOfName<C>> & RefAttributes<never>>;
|
|
10
|
+
export declare function flowComponent<C extends FlowComponentName>(componentName: C, ImplementationComponentType: FlowComponentImplementationType<C>): FlowComponentType<C>;
|
|
9
11
|
export {};
|
|
@@ -5,6 +5,9 @@ export declare const propsContext: import('react').Context<Partial<{
|
|
|
5
5
|
Avatar: import("@/lib/propsContext/types").ComponentPropsContext<"Avatar">;
|
|
6
6
|
Button: import("@/lib/propsContext/types").ComponentPropsContext<"Button">;
|
|
7
7
|
ButtonGroup: import("@/lib/propsContext/types").ComponentPropsContext<"ButtonGroup">;
|
|
8
|
+
Checkbox: import("@/lib/propsContext/types").ComponentPropsContext<"Checkbox">;
|
|
9
|
+
CheckboxGroup: import("@/lib/propsContext/types").ComponentPropsContext<"CheckboxGroup">;
|
|
10
|
+
CheckboxButton: import("@/lib/propsContext/types").ComponentPropsContext<"CheckboxButton">;
|
|
8
11
|
Content: import("@/lib/propsContext/types").ComponentPropsContext<"Content">;
|
|
9
12
|
ContextMenu: import("@/lib/propsContext/types").ComponentPropsContext<"ContextMenu">;
|
|
10
13
|
CopyButton: import("@/lib/propsContext/types").ComponentPropsContext<"CopyButton">;
|
|
@@ -19,10 +22,17 @@ export declare const propsContext: import('react').Context<Partial<{
|
|
|
19
22
|
Label: import("@/lib/propsContext/types").ComponentPropsContext<"Label">;
|
|
20
23
|
LayoutCard: import("@/lib/propsContext/types").ComponentPropsContext<"LayoutCard">;
|
|
21
24
|
Link: import("@/lib/propsContext/types").ComponentPropsContext<"Link">;
|
|
25
|
+
NumberField: import("@/lib/propsContext/types").ComponentPropsContext<"NumberField">;
|
|
26
|
+
Option: import("@/lib/propsContext/types").ComponentPropsContext<"Option">;
|
|
22
27
|
Radio: import("@/lib/propsContext/types").ComponentPropsContext<"Radio">;
|
|
28
|
+
RadioButton: import("@/lib/propsContext/types").ComponentPropsContext<"RadioButton">;
|
|
29
|
+
RadioGroup: import("@/lib/propsContext/types").ComponentPropsContext<"RadioGroup">;
|
|
30
|
+
Select: import("@/lib/propsContext/types").ComponentPropsContext<"Select">;
|
|
23
31
|
StatusBadge: import("@/lib/propsContext/types").ComponentPropsContext<"StatusBadge">;
|
|
24
32
|
Switch: import("@/lib/propsContext/types").ComponentPropsContext<"Switch">;
|
|
25
33
|
Text: import("@/lib/propsContext/types").ComponentPropsContext<"Text">;
|
|
34
|
+
TextArea: import("@/lib/propsContext/types").ComponentPropsContext<"TextArea">;
|
|
35
|
+
TextField: import("@/lib/propsContext/types").ComponentPropsContext<"TextField">;
|
|
26
36
|
TestComponent: import("@/lib/propsContext/types").ComponentPropsContext<"TestComponent">;
|
|
27
37
|
}>>;
|
|
28
38
|
export declare const useContextProps: () => PropsContext;
|
|
@@ -11,6 +11,6 @@ export interface PropsWithHOC<P> {
|
|
|
11
11
|
export interface PropsWithClassName {
|
|
12
12
|
className?: string;
|
|
13
13
|
}
|
|
14
|
-
export type PropsWithElementType<
|
|
15
|
-
elementType?:
|
|
14
|
+
export type PropsWithElementType<T extends keyof ReactHTML = never> = HTMLAttributes<HTMLElement> & {
|
|
15
|
+
elementType?: T | ExoticComponent;
|
|
16
16
|
};
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { mergeProps as
|
|
3
|
+
import { mergeProps as s } from "@react-aria/utils";
|
|
4
4
|
import { u as p } from "./propsContext-CauylOgH.js";
|
|
5
5
|
import c, { isValidElement as d } from "react";
|
|
6
6
|
import { pickBy as a, omit as m } from "remeda";
|
|
7
7
|
import { P as C } from "./PropsContextProvider-BcOGMJkn.js";
|
|
8
|
-
const
|
|
8
|
+
const l = {
|
|
9
9
|
Action: !0,
|
|
10
10
|
Avatar: !0,
|
|
11
11
|
Button: !0,
|
|
12
12
|
ButtonGroup: !0,
|
|
13
|
+
Checkbox: !0,
|
|
14
|
+
CheckboxGroup: !0,
|
|
15
|
+
CheckboxButton: !0,
|
|
13
16
|
Content: !0,
|
|
14
17
|
ContextMenu: !0,
|
|
15
18
|
CopyButton: !0,
|
|
@@ -24,54 +27,61 @@ const f = {
|
|
|
24
27
|
Label: !0,
|
|
25
28
|
LayoutCard: !0,
|
|
26
29
|
Link: !0,
|
|
30
|
+
NumberField: !0,
|
|
27
31
|
Radio: !0,
|
|
32
|
+
Option: !0,
|
|
33
|
+
RadioButton: !0,
|
|
34
|
+
RadioGroup: !0,
|
|
28
35
|
StatusBadge: !0,
|
|
36
|
+
Select: !0,
|
|
29
37
|
Switch: !0,
|
|
30
38
|
TestComponent: !0,
|
|
31
|
-
Text: !0
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
Text: !0,
|
|
40
|
+
TextArea: !0,
|
|
41
|
+
TextField: !0
|
|
42
|
+
}, u = Object.keys(
|
|
43
|
+
l
|
|
34
44
|
);
|
|
35
|
-
function
|
|
45
|
+
function f(t) {
|
|
36
46
|
return !!t && typeof t == "object" && "__dynamicProp" in t;
|
|
37
47
|
}
|
|
38
|
-
function
|
|
39
|
-
return typeof t == "string" &&
|
|
48
|
+
function i(t) {
|
|
49
|
+
return typeof t == "string" && u.includes(t);
|
|
40
50
|
}
|
|
41
|
-
function
|
|
42
|
-
return !
|
|
51
|
+
function x(t) {
|
|
52
|
+
return !i(t);
|
|
43
53
|
}
|
|
44
|
-
const
|
|
54
|
+
const y = (t, r) => {
|
|
45
55
|
const e = {};
|
|
46
|
-
for (const
|
|
47
|
-
if (
|
|
48
|
-
const
|
|
49
|
-
|
|
56
|
+
for (const o in t)
|
|
57
|
+
if (x(o)) {
|
|
58
|
+
const n = t[o];
|
|
59
|
+
f(n) && (e[o] = n.__dynamicProp(r));
|
|
50
60
|
}
|
|
51
61
|
return e;
|
|
52
62
|
};
|
|
53
|
-
function
|
|
63
|
+
function P(t) {
|
|
54
64
|
return !!t && typeof t == "object" && "children" in t && !!t.children;
|
|
55
65
|
}
|
|
56
|
-
const h = (t) => a(t, (r, e) =>
|
|
57
|
-
if (!
|
|
66
|
+
const h = (t) => a(t, (r, e) => i(e)), b = (t, r) => {
|
|
67
|
+
if (!P(r))
|
|
58
68
|
return {};
|
|
59
69
|
const e = r.children;
|
|
60
70
|
if (!Array.isArray(e) && !d(e))
|
|
61
71
|
return {};
|
|
62
|
-
const
|
|
63
|
-
return Object.keys(
|
|
64
|
-
children: /* @__PURE__ */ c.createElement(C, { props:
|
|
72
|
+
const o = h(t);
|
|
73
|
+
return Object.keys(o).length === 0 ? {} : {
|
|
74
|
+
children: /* @__PURE__ */ c.createElement(C, { props: o }, r.children)
|
|
65
75
|
};
|
|
66
|
-
},
|
|
67
|
-
const e = p()[t],
|
|
68
|
-
return
|
|
69
|
-
e && m(e,
|
|
76
|
+
}, N = (t, r) => {
|
|
77
|
+
const e = p()[t], o = e ? y(e, r) : void 0, n = e ? b(e, r) : void 0;
|
|
78
|
+
return s(
|
|
79
|
+
e && m(e, u),
|
|
70
80
|
r,
|
|
71
|
-
|
|
72
|
-
|
|
81
|
+
o,
|
|
82
|
+
n
|
|
73
83
|
);
|
|
74
84
|
};
|
|
75
85
|
export {
|
|
76
|
-
|
|
86
|
+
N as u
|
|
77
87
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.66",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -190,9 +190,13 @@
|
|
|
190
190
|
"types": "./dist/types/components/Tooltip/index.d.ts",
|
|
191
191
|
"import": "./dist/Tooltip.js"
|
|
192
192
|
},
|
|
193
|
-
"./nextjs
|
|
194
|
-
"types": "./dist/types/
|
|
195
|
-
"import": "./dist/nextjs
|
|
193
|
+
"./nextjs": {
|
|
194
|
+
"types": "./dist/types/integrations/nextjs/index.d.ts",
|
|
195
|
+
"import": "./dist/nextjs.js"
|
|
196
|
+
},
|
|
197
|
+
"./react-hook-form": {
|
|
198
|
+
"types": "./dist/types/integrations/react-hook-form/index.d.ts",
|
|
199
|
+
"import": "./dist/react-hook-form.js"
|
|
196
200
|
},
|
|
197
201
|
"./styles": "./dist/styles.css"
|
|
198
202
|
},
|
|
@@ -214,7 +218,7 @@
|
|
|
214
218
|
"test:unit": "run vitest run"
|
|
215
219
|
},
|
|
216
220
|
"dependencies": {
|
|
217
|
-
"@mittwald/react-tunnel": "^0.1.0-alpha.
|
|
221
|
+
"@mittwald/react-tunnel": "^0.1.0-alpha.65",
|
|
218
222
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
219
223
|
"@react-aria/utils": "^3.23.2",
|
|
220
224
|
"@react-types/shared": "^3.22.1",
|
|
@@ -233,13 +237,13 @@
|
|
|
233
237
|
"react-aria-components": "^1.1.1",
|
|
234
238
|
"react-children-utilities": "^2.10.0",
|
|
235
239
|
"react-stately": "^3.30.1",
|
|
236
|
-
"remeda": "^1.
|
|
240
|
+
"remeda": "^1.58.1"
|
|
237
241
|
},
|
|
238
242
|
"devDependencies": {
|
|
239
243
|
"@faker-js/faker": "^8.4.1",
|
|
240
|
-
"@mittwald/flow-design-tokens": "^0.1.0-alpha.
|
|
244
|
+
"@mittwald/flow-design-tokens": "^0.1.0-alpha.65",
|
|
241
245
|
"@mittwald/react-use-promise": "^2.3.13",
|
|
242
|
-
"@nx/storybook": "^18.2.
|
|
246
|
+
"@nx/storybook": "^18.2.4",
|
|
243
247
|
"@storybook/addon-a11y": "^8.0.6",
|
|
244
248
|
"@storybook/addon-actions": "^8.0.6",
|
|
245
249
|
"@storybook/addon-essentials": "^8.0.6",
|
|
@@ -255,13 +259,13 @@
|
|
|
255
259
|
"@storybook/theming": "^8.0.6",
|
|
256
260
|
"@testing-library/dom": "^10.0.0",
|
|
257
261
|
"@testing-library/jest-dom": "^6.4.2",
|
|
258
|
-
"@testing-library/react": "^14.
|
|
262
|
+
"@testing-library/react": "^14.3.0",
|
|
259
263
|
"@testing-library/user-event": "^14.5.2",
|
|
260
264
|
"@types/invariant": "^2.2.37",
|
|
261
|
-
"@types/node": "20.12.
|
|
265
|
+
"@types/node": "20.12.7",
|
|
262
266
|
"@types/prettier": "^3.0.0",
|
|
263
267
|
"@types/prop-types": "^15.7.12",
|
|
264
|
-
"@types/react": "^18.2.
|
|
268
|
+
"@types/react": "^18.2.75",
|
|
265
269
|
"@types/react-dom": "^18.2.24",
|
|
266
270
|
"@types/rollup": "^0.54.0",
|
|
267
271
|
"@vitejs/plugin-react": "^4.2.1",
|
|
@@ -270,7 +274,7 @@
|
|
|
270
274
|
"fs-jetpack": "^5.1.0",
|
|
271
275
|
"happy-dom": "^14.7.1",
|
|
272
276
|
"next": "^14.1.4",
|
|
273
|
-
"nx": "^18.2.
|
|
277
|
+
"nx": "^18.2.4",
|
|
274
278
|
"postcss": "^8.4.38",
|
|
275
279
|
"postcss-nested-import": "^1.3.0",
|
|
276
280
|
"postcss-nesting": "^12.1.1",
|
|
@@ -279,11 +283,12 @@
|
|
|
279
283
|
"react": "^18.2.0",
|
|
280
284
|
"react-dom": "^18.2.0",
|
|
281
285
|
"react-element-to-jsx-string": "^15.0.0",
|
|
286
|
+
"react-hook-form": "^7.51.2",
|
|
282
287
|
"rollup": "^4.14.1",
|
|
283
288
|
"sass": "^1.74.1",
|
|
284
289
|
"storybook": "^8.0.6",
|
|
285
290
|
"tsx": "^4.7.2",
|
|
286
|
-
"typescript": "^5.4.
|
|
291
|
+
"typescript": "^5.4.5",
|
|
287
292
|
"typescript-plugin-css-modules": "^5.1.0",
|
|
288
293
|
"vite": "^5.2.8",
|
|
289
294
|
"vite-plugin-banner": "^0.7.1",
|
|
@@ -297,7 +302,8 @@
|
|
|
297
302
|
"@mittwald/react-use-promise": "^2.3.12",
|
|
298
303
|
"next": "*",
|
|
299
304
|
"react": "18.2.0",
|
|
300
|
-
"react-dom": "18.2.0"
|
|
305
|
+
"react-dom": "18.2.0",
|
|
306
|
+
"react-hook-form": "*"
|
|
301
307
|
},
|
|
302
308
|
"peerDependenciesMeta": {
|
|
303
309
|
"@mittwald/react-use-promise": {
|
|
@@ -305,7 +311,10 @@
|
|
|
305
311
|
},
|
|
306
312
|
"next": {
|
|
307
313
|
"optional": true
|
|
314
|
+
},
|
|
315
|
+
"react-hook-form": {
|
|
316
|
+
"optional": true
|
|
308
317
|
}
|
|
309
318
|
},
|
|
310
|
-
"gitHead": "
|
|
319
|
+
"gitHead": "9bdbe8df30140d2017e418b1147b13163857e6fc"
|
|
311
320
|
}
|
package/dist/Button-CUr754ra.js
DELETED
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import n from "react";
|
|
4
|
-
import * as E from "react-aria-components";
|
|
5
|
-
import p from "clsx";
|
|
6
|
-
import { C as x } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
-
import { P as C } from "./PropsContextProvider-BcOGMJkn.js";
|
|
8
|
-
import "@react-aria/utils";
|
|
9
|
-
import "./propsContext-CauylOgH.js";
|
|
10
|
-
import "remeda";
|
|
11
|
-
import "@tabler/icons-react";
|
|
12
|
-
import "html-react-parser";
|
|
13
|
-
import { f as I } from "./flowComponent-Dfn_Z9Yx.js";
|
|
14
|
-
import { I as N, a as h, b as z } from "./IconSucceeded-CENvDJzH.js";
|
|
15
|
-
import { W as d } from "./Wrap-DGT1h1o3.js";
|
|
16
|
-
import { T as B } from "./Text-2sThcKor.js";
|
|
17
|
-
import { useLocalizedStringFormatter as A } from "react-aria";
|
|
18
|
-
const D = "flow--button", L = "flow--button--avatar", T = "flow--button--icon", K = "flow--button--text", U = "flow--button--content", W = "flow--button--state-icon", $ = "flow--button--is-succeeded", R = "flow--button--is-failed", j = "flow--button--is-pending", k = "flow--button--plain", q = "flow--button--primary", G = "flow--button--solid", H = "flow--button--accent", J = "flow--button--danger", M = "flow--button--secondary", O = "flow--button--soft", e = {
|
|
19
|
-
button: D,
|
|
20
|
-
avatar: L,
|
|
21
|
-
icon: T,
|
|
22
|
-
text: K,
|
|
23
|
-
content: U,
|
|
24
|
-
stateIcon: W,
|
|
25
|
-
"size-s": "flow--button--size-s",
|
|
26
|
-
isSucceeded: $,
|
|
27
|
-
isFailed: R,
|
|
28
|
-
isPending: j,
|
|
29
|
-
plain: k,
|
|
30
|
-
primary: q,
|
|
31
|
-
solid: G,
|
|
32
|
-
accent: H,
|
|
33
|
-
danger: J,
|
|
34
|
-
secondary: M,
|
|
35
|
-
soft: O
|
|
36
|
-
}, Q = {
|
|
37
|
-
"de-DE": {
|
|
38
|
-
"button.isFailed": "Fehlgeschlagen",
|
|
39
|
-
"button.isPending": "Ausstehend",
|
|
40
|
-
"button.isSucceeded": "Erfolgreich"
|
|
41
|
-
},
|
|
42
|
-
"en-EN": {
|
|
43
|
-
"button.isFailed": "Failed",
|
|
44
|
-
"button.isPending": "Pending",
|
|
45
|
-
"button.isSucceeded": "Succeeded"
|
|
46
|
-
}
|
|
47
|
-
}, V = (t) => ((t.isPending || t.isSucceeded || t.isFailed) && (t = { ...t }, t.onPress = void 0, t.onPressStart = void 0, t.onPressEnd = void 0, t.onPressChange = void 0, t.onPressUp = void 0, t.onKeyDown = void 0, t.onKeyUp = void 0), t), dt = I("Button", (t) => {
|
|
48
|
-
t = V(t);
|
|
49
|
-
const {
|
|
50
|
-
variant: m = "primary",
|
|
51
|
-
style: u = "solid",
|
|
52
|
-
children: c,
|
|
53
|
-
className: f,
|
|
54
|
-
size: i = "m",
|
|
55
|
-
isPending: a,
|
|
56
|
-
isDisabled: b,
|
|
57
|
-
isSucceeded: o,
|
|
58
|
-
isFailed: s,
|
|
59
|
-
"aria-label": g,
|
|
60
|
-
...P
|
|
61
|
-
} = t, w = p(
|
|
62
|
-
e.button,
|
|
63
|
-
a && e.isPending,
|
|
64
|
-
o && e.isSucceeded,
|
|
65
|
-
s && e.isFailed,
|
|
66
|
-
e[`size-${i}`],
|
|
67
|
-
e[m],
|
|
68
|
-
e[u],
|
|
69
|
-
f
|
|
70
|
-
), v = {
|
|
71
|
-
Icon: {
|
|
72
|
-
className: e.icon,
|
|
73
|
-
"aria-hidden": !0,
|
|
74
|
-
size: i
|
|
75
|
-
},
|
|
76
|
-
Text: {
|
|
77
|
-
className: e.text
|
|
78
|
-
},
|
|
79
|
-
Avatar: {
|
|
80
|
-
className: e.avatar
|
|
81
|
-
}
|
|
82
|
-
}, S = A(Q), F = o || s || a ? S.format(
|
|
83
|
-
`button.${o ? "isSucceeded" : s ? "isFailed" : "isPending"}`
|
|
84
|
-
) : void 0, r = o ? N : s ? h : a ? z : void 0, l = r && /* @__PURE__ */ n.createElement(r, { size: i, className: e.stateIcon }), y = typeof c == "string";
|
|
85
|
-
return /* @__PURE__ */ n.createElement(x, null, /* @__PURE__ */ n.createElement(
|
|
86
|
-
E.Button,
|
|
87
|
-
{
|
|
88
|
-
className: w,
|
|
89
|
-
isDisabled: b,
|
|
90
|
-
"aria-label": F ?? g,
|
|
91
|
-
...P
|
|
92
|
-
},
|
|
93
|
-
/* @__PURE__ */ n.createElement(d, { if: l }, /* @__PURE__ */ n.createElement("span", { className: e.content }, /* @__PURE__ */ n.createElement(d, { if: y }, /* @__PURE__ */ n.createElement(B, null, /* @__PURE__ */ n.createElement(C, { props: v }, c))))),
|
|
94
|
-
l
|
|
95
|
-
));
|
|
96
|
-
});
|
|
97
|
-
export {
|
|
98
|
-
dt as B
|
|
99
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import e from "react";
|
|
4
|
-
import * as l from "react-aria-components";
|
|
5
|
-
import i from "clsx";
|
|
6
|
-
import "@tabler/icons-react";
|
|
7
|
-
import "html-react-parser";
|
|
8
|
-
import { C as p } from "./ClearPropsContext-CeCMjUK9.js";
|
|
9
|
-
import "./propsContext-CauylOgH.js";
|
|
10
|
-
import "@react-aria/utils";
|
|
11
|
-
import "remeda";
|
|
12
|
-
import "@mittwald/react-tunnel";
|
|
13
|
-
import { I as x, a as h } from "./IconCheckboxEmpty-BYBEifGn.js";
|
|
14
|
-
import { I as k } from "./IconCheckboxIndeterminate-DCWISQ9y.js";
|
|
15
|
-
const C = "flow--checkbox", b = "flow--checkbox--icon", o = {
|
|
16
|
-
checkbox: C,
|
|
17
|
-
icon: b
|
|
18
|
-
}, P = (c) => {
|
|
19
|
-
const { children: t, className: r, ...m } = c, a = i(o.checkbox, r);
|
|
20
|
-
return /* @__PURE__ */ e.createElement(p, null, /* @__PURE__ */ e.createElement(l.Checkbox, { ...m, className: a }, ({ isSelected: n, isIndeterminate: s }) => /* @__PURE__ */ e.createElement(e.Fragment, null, n ? /* @__PURE__ */ e.createElement(x, { className: o.icon }) : s ? /* @__PURE__ */ e.createElement(k, { className: o.icon }) : /* @__PURE__ */ e.createElement(h, { className: o.icon }), t)));
|
|
21
|
-
};
|
|
22
|
-
export {
|
|
23
|
-
P as C
|
|
24
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import o from "react";
|
|
4
|
-
import a from "clsx";
|
|
5
|
-
import "./propsContext-CauylOgH.js";
|
|
6
|
-
import { P as m } from "./PropsContextProvider-BcOGMJkn.js";
|
|
7
|
-
import "@react-aria/utils";
|
|
8
|
-
import "remeda";
|
|
9
|
-
import { C as b } from "./Checkbox-CBAAtfxq.js";
|
|
10
|
-
const p = "flow--checkbox-button", x = "flow--checkbox-button--content", h = "flow--checkbox-button--label", t = {
|
|
11
|
-
checkboxButton: p,
|
|
12
|
-
content: x,
|
|
13
|
-
label: h
|
|
14
|
-
}, w = (e) => {
|
|
15
|
-
const { children: c, className: n, ...s } = e, r = a(t.checkboxButton, n), l = {
|
|
16
|
-
Text: {
|
|
17
|
-
className: t.label
|
|
18
|
-
},
|
|
19
|
-
Content: {
|
|
20
|
-
className: t.content
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return /* @__PURE__ */ o.createElement(b, { ...s, className: r }, /* @__PURE__ */ o.createElement(m, { props: l }, c));
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
w as C
|
|
27
|
-
};
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import e from "react";
|
|
4
|
-
import * as i from "react-aria-components";
|
|
5
|
-
import { f as u } from "./flowComponent-Dfn_Z9Yx.js";
|
|
6
|
-
import { P as x } from "./Popover-MmxZkKu3.js";
|
|
7
|
-
import f from "clsx";
|
|
8
|
-
import "./propsContext-CauylOgH.js";
|
|
9
|
-
import { P as d } from "./PropsContextProvider-BcOGMJkn.js";
|
|
10
|
-
import "@react-aria/utils";
|
|
11
|
-
import "remeda";
|
|
12
|
-
import "@tabler/icons-react";
|
|
13
|
-
import "html-react-parser";
|
|
14
|
-
import "@mittwald/react-tunnel";
|
|
15
|
-
import { I as C, a as I } from "./IconCheckboxEmpty-BYBEifGn.js";
|
|
16
|
-
import { I as M, a as E } from "./IconRadioOn-VUVt3QQC.js";
|
|
17
|
-
import { T as a } from "./Text-2sThcKor.js";
|
|
18
|
-
import { d as h } from "./deepFindOfType-6pG0fH7S.js";
|
|
19
|
-
import { W as y } from "./Wrap-DGT1h1o3.js";
|
|
20
|
-
const N = "flow--context-menu", w = {
|
|
21
|
-
contextMenu: N
|
|
22
|
-
}, J = u("ContextMenu", (n) => {
|
|
23
|
-
const {
|
|
24
|
-
children: t,
|
|
25
|
-
onAction: o,
|
|
26
|
-
selectionMode: c,
|
|
27
|
-
selectedKeys: m,
|
|
28
|
-
defaultSelectedKeys: s,
|
|
29
|
-
onSelectionChange: r,
|
|
30
|
-
...p
|
|
31
|
-
} = n;
|
|
32
|
-
return /* @__PURE__ */ e.createElement(x, { ...p }, /* @__PURE__ */ e.createElement(
|
|
33
|
-
i.Menu,
|
|
34
|
-
{
|
|
35
|
-
className: w.contextMenu,
|
|
36
|
-
onAction: o,
|
|
37
|
-
selectionMode: c,
|
|
38
|
-
selectedKeys: m,
|
|
39
|
-
defaultSelectedKeys: s,
|
|
40
|
-
onSelectionChange: r
|
|
41
|
-
},
|
|
42
|
-
t
|
|
43
|
-
));
|
|
44
|
-
}), P = "flow--context-menu--context-menu-item", T = "flow--context-menu--context-menu-item--icon", g = "flow--context-menu--context-menu-item--text", l = {
|
|
45
|
-
contextMenuItem: P,
|
|
46
|
-
icon: T,
|
|
47
|
-
text: g
|
|
48
|
-
}, k = (n, t) => !!h(n, t), O = (n) => {
|
|
49
|
-
const { selectionMode: t, isSelected: o, children: c } = n, m = {
|
|
50
|
-
Icon: {
|
|
51
|
-
className: l.icon
|
|
52
|
-
},
|
|
53
|
-
Text: {
|
|
54
|
-
className: l.text
|
|
55
|
-
}
|
|
56
|
-
}, s = t === "none" ? null : t === "single" && o ? /* @__PURE__ */ e.createElement(M, null) : t === "single" && !o ? /* @__PURE__ */ e.createElement(E, null) : t === "multiple" && o ? /* @__PURE__ */ e.createElement(C, null) : /* @__PURE__ */ e.createElement(I, null), r = k(c, a);
|
|
57
|
-
return /* @__PURE__ */ e.createElement(d, { props: m }, s, /* @__PURE__ */ e.createElement(y, { if: !r }, /* @__PURE__ */ e.createElement(a, null, c)));
|
|
58
|
-
}, L = (n) => {
|
|
59
|
-
const { children: t, className: o, ...c } = n, m = f(l.contextMenuItem, o);
|
|
60
|
-
return /* @__PURE__ */ e.createElement(i.MenuItem, { ...c, className: m }, (s) => /* @__PURE__ */ e.createElement(O, { ...s }, t));
|
|
61
|
-
};
|
|
62
|
-
export {
|
|
63
|
-
J as C,
|
|
64
|
-
L as a,
|
|
65
|
-
k as d
|
|
66
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import r from "react";
|
|
4
|
-
import * as n from "react-aria-components";
|
|
5
|
-
import a from "clsx";
|
|
6
|
-
import { C as i } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
-
import "./propsContext-CauylOgH.js";
|
|
8
|
-
import "@react-aria/utils";
|
|
9
|
-
import "remeda";
|
|
10
|
-
import "@tabler/icons-react";
|
|
11
|
-
import "html-react-parser";
|
|
12
|
-
import { f as c } from "./flowComponent-Dfn_Z9Yx.js";
|
|
13
|
-
import { I as p } from "./IconDanger-C0Tcw4tP.js";
|
|
14
|
-
const f = "flow--field-error", E = {
|
|
15
|
-
fieldError: f
|
|
16
|
-
}, j = c("FieldError", (o) => {
|
|
17
|
-
const { children: e, className: t, ...l } = o, m = a(E.fieldError, t);
|
|
18
|
-
return /* @__PURE__ */ r.createElement(i, null, /* @__PURE__ */ r.createElement(n.FieldError, { ...l, className: m }, ({ validationErrors: s }) => /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement(p, { size: "s" }), /* @__PURE__ */ r.createElement("span", null, e || s.join(" ")))));
|
|
19
|
-
});
|
|
20
|
-
export {
|
|
21
|
-
j as F
|
|
22
|
-
};
|
package/dist/Label-CnhSifzw.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import t from "react";
|
|
4
|
-
import * as p from "react-aria-components";
|
|
5
|
-
import c from "clsx";
|
|
6
|
-
import { C as f } from "./ClearPropsContext-CeCMjUK9.js";
|
|
7
|
-
import "./propsContext-CauylOgH.js";
|
|
8
|
-
import "@react-aria/utils";
|
|
9
|
-
import "remeda";
|
|
10
|
-
import { useLocalizedStringFormatter as b } from "react-aria";
|
|
11
|
-
import { f as C } from "./flowComponent-Dfn_Z9Yx.js";
|
|
12
|
-
const L = "flow--label", d = {
|
|
13
|
-
label: L
|
|
14
|
-
}, u = {
|
|
15
|
-
"de-DE": {
|
|
16
|
-
"label.optional": "(optional)"
|
|
17
|
-
},
|
|
18
|
-
"en-EN": {
|
|
19
|
-
"label.optional": "(optional)"
|
|
20
|
-
}
|
|
21
|
-
}, k = C("Label", (l) => {
|
|
22
|
-
const { children: e, className: o, optional: a, unstyled: r = !1, ...s } = l, n = b(u), m = r ? o : c(d.label, o), i = " " + n.format("label.optional");
|
|
23
|
-
return /* @__PURE__ */ t.createElement(f, null, /* @__PURE__ */ t.createElement(p.Label, { ...s, className: m }, e, a && i));
|
|
24
|
-
});
|
|
25
|
-
export {
|
|
26
|
-
k as L
|
|
27
|
-
};
|
package/dist/Link-3bAuyVEg.js
DELETED
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import o, { useContext as d } from "react";
|
|
4
|
-
import * as x from "react-aria-components";
|
|
5
|
-
import { C as w } from "./ClearPropsContext-CeCMjUK9.js";
|
|
6
|
-
import { P as y } from "./PropsContextProvider-BcOGMJkn.js";
|
|
7
|
-
import "@react-aria/utils";
|
|
8
|
-
import "./propsContext-CauylOgH.js";
|
|
9
|
-
import "remeda";
|
|
10
|
-
import L from "clsx";
|
|
11
|
-
import { f as P } from "./flowComponent-Dfn_Z9Yx.js";
|
|
12
|
-
import { l as g } from "./context-BlNV7smK.js";
|
|
13
|
-
const N = "flow--link", E = "flow--link--inline", v = "flow--link--icon", F = "flow--link--primary", h = "flow--link--danger", n = {
|
|
14
|
-
link: N,
|
|
15
|
-
inline: E,
|
|
16
|
-
icon: v,
|
|
17
|
-
primary: F,
|
|
18
|
-
danger: h
|
|
19
|
-
}, D = P("Link", (r) => {
|
|
20
|
-
const {
|
|
21
|
-
children: i,
|
|
22
|
-
className: t,
|
|
23
|
-
variant: e = "default",
|
|
24
|
-
inline: s,
|
|
25
|
-
linkComponent: l,
|
|
26
|
-
unstyled: a = !1,
|
|
27
|
-
"aria-current": m,
|
|
28
|
-
...p
|
|
29
|
-
} = r, { linkComponent: c } = d(g), k = l ?? c ?? x.Link, f = a ? t : L(n.link, n[e], s && n.inline, t), C = {
|
|
30
|
-
Icon: {
|
|
31
|
-
className: n.icon,
|
|
32
|
-
size: "s"
|
|
33
|
-
}
|
|
34
|
-
}, u = {
|
|
35
|
-
"aria-current": m
|
|
36
|
-
};
|
|
37
|
-
return /* @__PURE__ */ o.createElement(w, null, /* @__PURE__ */ o.createElement(
|
|
38
|
-
k,
|
|
39
|
-
{
|
|
40
|
-
className: f,
|
|
41
|
-
...p,
|
|
42
|
-
...u
|
|
43
|
-
},
|
|
44
|
-
/* @__PURE__ */ o.createElement(y, { props: C }, i)
|
|
45
|
-
));
|
|
46
|
-
});
|
|
47
|
-
export {
|
|
48
|
-
D as L
|
|
49
|
-
};
|