@mittwald/flow-react-components 0.2.0-alpha.568 → 0.2.0-alpha.569
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/CHANGELOG.md +4 -0
- package/dist/assets/doc-properties.json +304 -284
- package/dist/css/all.css +1 -1
- package/dist/js/components/src/components/AccentBox/AccentBox.mjs +22 -21
- package/dist/js/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs +37 -31
- package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Align/Align.mjs +22 -16
- package/dist/js/components/src/components/Align/Align.mjs.map +1 -1
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs +0 -1
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs +7 -0
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs +5 -3
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs +1 -1
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs +64 -58
- package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs.map +1 -1
- package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +2 -1
- package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs.map +1 -1
- package/dist/js/components/src/components/Header/Header.mjs +20 -15
- package/dist/js/components/src/components/Header/Header.mjs.map +1 -1
- package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -1
- package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
- package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs +16 -12
- package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +4 -2
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs +6 -0
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +4 -2
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/Modal.mjs +70 -76
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs +4 -2
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +1 -4
- package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/Overlay.mjs +2 -105
- package/dist/js/components/src/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs +4 -2
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs +2 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/components/src/components/Popover/Popover.mjs +2 -105
- package/dist/js/components/src/components/Popover/Popover.mjs.map +1 -1
- package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs +1 -1
- package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Section/Section.mjs +41 -35
- package/dist/js/components/src/components/Section/Section.mjs.map +1 -1
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs +5 -2
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs +7 -23
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- package/dist/js/components/src/lib/hooks/useFieldError.mjs +0 -2
- package/dist/js/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/components/src/lib/hooks/useProps.mjs +1 -2
- package/dist/js/components/src/lib/hooks/useProps.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs +4 -10
- package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs +2 -2
- package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs +7 -22
- package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs +22 -30
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs +27 -7
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs.map +1 -1
- package/dist/js/components/src/lib/react/getPropsMerger.mjs +7 -2
- package/dist/js/components/src/lib/react/getPropsMerger.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +1 -2
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/types/components/AccentBox/AccentBox.d.ts.map +1 -1
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
- package/dist/types/components/Align/Align.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/ColumnLayout/ColumnLayout.d.ts.map +1 -1
- package/dist/types/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.d.ts.map +1 -1
- package/dist/types/components/Header/Header.d.ts +2 -2
- package/dist/types/components/Header/Header.d.ts.map +1 -1
- package/dist/types/components/LayoutCard/LayoutCard.d.ts.map +1 -1
- package/dist/types/components/Message/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts.map +1 -1
- package/dist/types/components/Overlay/Overlay.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
- package/dist/types/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/Section/Section.d.ts.map +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
- package/dist/types/lib/hooks/useFieldError.d.ts.map +1 -1
- package/dist/types/lib/hooks/useProps.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts +1 -5
- package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts +0 -2
- package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/PropsContextProvider.d.ts +0 -3
- package/dist/types/lib/propsContext/components/PropsContextProvider.d.ts.map +1 -1
- package/dist/types/lib/propsContext/mergePropsContext.d.ts +1 -1
- package/dist/types/lib/propsContext/mergePropsContext.d.ts.map +1 -1
- package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts +3 -84
- package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts.map +1 -1
- package/dist/types/lib/propsContext/types.d.ts +1 -2
- package/dist/types/lib/propsContext/types.d.ts.map +1 -1
- package/dist/types/lib/react/getPropsMerger.d.ts.map +1 -1
- package/package.json +4 -4
- package/dist/js/components/src/lib/propsContext/inherit/PropsContextLevelProvider.mjs +0 -20
- package/dist/js/components/src/lib/propsContext/inherit/PropsContextLevelProvider.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/lib.mjs +0 -39
- package/dist/js/components/src/lib/propsContext/inherit/lib.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs +0 -13
- package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/types.mjs +0 -6
- package/dist/js/components/src/lib/propsContext/inherit/types.mjs.map +0 -1
- package/dist/types/lib/propsContext/inherit/PropsContextLevelProvider.d.ts +0 -8
- package/dist/types/lib/propsContext/inherit/PropsContextLevelProvider.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/lib.d.ts +0 -8
- package/dist/types/lib/propsContext/inherit/lib.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts +0 -4
- package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/types.d.ts +0 -6
- package/dist/types/lib/propsContext/inherit/types.d.ts.map +0 -1
|
@@ -7,27 +7,28 @@ import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
|
7
7
|
import '../../lib/propsContext/propsContext.mjs';
|
|
8
8
|
import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
9
|
|
|
10
|
-
const AccentBox = flowComponent(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
10
|
+
const AccentBox = flowComponent(
|
|
11
|
+
"AccentBox",
|
|
12
|
+
(props) => {
|
|
13
|
+
const { color = "blue", children, elementType = "div", className } = props;
|
|
14
|
+
const rootClassName = clsx(styles.accentBox, className, styles[color]);
|
|
15
|
+
const Element = elementType;
|
|
16
|
+
const contentColor = color === "green" ? "dark" : void 0;
|
|
17
|
+
const propsContext = {
|
|
18
|
+
Link: {
|
|
19
|
+
color: contentColor
|
|
20
|
+
},
|
|
21
|
+
Text: {
|
|
22
|
+
color: contentColor
|
|
23
|
+
},
|
|
24
|
+
Heading: {
|
|
25
|
+
color: contentColor
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(Element, { className: rootClassName, children }) });
|
|
29
|
+
},
|
|
30
|
+
{ type: "layout" }
|
|
31
|
+
);
|
|
31
32
|
|
|
32
33
|
export { AccentBox, AccentBox as default };
|
|
33
34
|
//# sourceMappingURL=AccentBox.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccentBox.mjs","sources":["../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AccentBoxProps\n extends PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n color?: \"blue\" | \"green\" | \"gradient\" | \"neutral\";\n}\n\n/** @flr-generate all */\nexport const AccentBox = flowComponent(\"AccentBox\"
|
|
1
|
+
{"version":3,"file":"AccentBox.mjs","sources":["../../../../../../src/components/AccentBox/AccentBox.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport clsx from \"clsx\";\nimport styles from \"./AccentBox.module.scss\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\n\nexport interface AccentBoxProps\n extends PropsWithChildren,\n PropsWithElementType<\"div\" | \"section\" | \"article\">,\n PropsWithClassName,\n FlowComponentProps {\n color?: \"blue\" | \"green\" | \"gradient\" | \"neutral\";\n}\n\n/** @flr-generate all */\nexport const AccentBox = flowComponent(\n \"AccentBox\",\n (props) => {\n const { color = \"blue\", children, elementType = \"div\", className } = props;\n\n const rootClassName = clsx(styles.accentBox, className, styles[color]);\n\n const Element = elementType;\n\n const contentColor = color === \"green\" ? \"dark\" : undefined;\n\n const propsContext: PropsContext = {\n Link: {\n color: contentColor,\n },\n Text: {\n color: contentColor,\n },\n Heading: {\n color: contentColor,\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <Element className={rootClassName}>{children}</Element>\n </PropsContextProvider>\n );\n },\n { type: \"layout\" },\n);\n\nexport default AccentBox;\n"],"names":[],"mappings":";;;;;;;AAsBO,MAAM,SAAA,GAAY,aAAA;AAAA,EACvB,WAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,KAAA,GAAQ,MAAA,EAAQ,UAAU,WAAA,GAAc,KAAA,EAAO,WAAU,GAAI,KAAA;AAErE,IAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,WAAW,SAAA,EAAW,MAAA,CAAO,KAAK,CAAC,CAAA;AAErE,IAAA,MAAM,OAAA,GAAU,WAAA;AAEhB,IAAA,MAAM,YAAA,GAAe,KAAA,KAAU,OAAA,GAAU,MAAA,GAAS,MAAA;AAElD,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,OACT;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,KAAA,EAAO;AAAA,OACT;AAAA,MACA,OAAA,EAAS;AAAA,QACP,KAAA,EAAO;AAAA;AACT,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,wBAAqB,KAAA,EAAO,YAAA,EAC3B,8BAAC,OAAA,EAAA,EAAQ,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAS,CAAA,EAC/C,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA,EAAE,MAAM,QAAA;AACV;;;;"}
|
|
@@ -11,37 +11,43 @@ import { TunnelProvider } from '@mittwald/react-tunnel';
|
|
|
11
11
|
import { ActionStateContextProvider } from '../Action/models/ActionStateContext.mjs';
|
|
12
12
|
import { getActionGroupSlot } from './lib/getActionGroupSlot.mjs';
|
|
13
13
|
|
|
14
|
-
const ActionGroup = flowComponent(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
14
|
+
const ActionGroup = flowComponent(
|
|
15
|
+
"ActionGroup",
|
|
16
|
+
(props) => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
className,
|
|
20
|
+
ref,
|
|
21
|
+
spacing = "s",
|
|
22
|
+
...rest
|
|
23
|
+
} = props;
|
|
24
|
+
const rootClassName = clsx(styles.actionGroup, className, styles[spacing]);
|
|
25
|
+
const propsContext = {
|
|
26
|
+
Button: {
|
|
27
|
+
slot: dynamic((props2) => getActionGroupSlot(props2)),
|
|
28
|
+
className: dynamic((props2) => {
|
|
29
|
+
const slot = getActionGroupSlot(props2);
|
|
30
|
+
return clsx(props2.className, styles[slot]);
|
|
31
|
+
})
|
|
32
|
+
},
|
|
33
|
+
Switch: {
|
|
34
|
+
labelPosition: "leading",
|
|
35
|
+
className: dynamic((props2) => {
|
|
36
|
+
return clsx(props2.className, props2.slot && styles[props2.slot]);
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
Link: {
|
|
40
|
+
className: dynamic((props2) => {
|
|
41
|
+
return clsx(props2.className, props2.slot && styles[props2.slot]);
|
|
42
|
+
})
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
return /* @__PURE__ */ jsx(ActionStateContextProvider, { children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(TunnelProvider, { children: /* @__PURE__ */ jsx("div", { ...rest, className: rootClassName, ref, role: "group", children }) }) }) });
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
type: "layout"
|
|
49
|
+
}
|
|
50
|
+
);
|
|
45
51
|
|
|
46
52
|
export { ActionGroup, ActionGroup as default };
|
|
47
53
|
//# sourceMappingURL=ActionGroup.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionGroup.mjs","sources":["../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\n\nexport interface ActionGroupProps\n extends PropsWithChildren,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {\n /** The spacing between the buttons inside the action group. @default \"m\" */\n spacing?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const ActionGroup = flowComponent(\"ActionGroup\"
|
|
1
|
+
{"version":3,"file":"ActionGroup.mjs","sources":["../../../../../../src/components/ActionGroup/ActionGroup.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./ActionGroup.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { dynamic, PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { ActionStateContextProvider } from \"@/components/Action/models/ActionStateContext\";\nimport { getActionGroupSlot } from \"@/components/ActionGroup/lib/getActionGroupSlot\";\n\nexport interface ActionGroupProps\n extends PropsWithChildren,\n FlowComponentProps<HTMLDivElement>,\n PropsWithClassName {\n /** The spacing between the buttons inside the action group. @default \"m\" */\n spacing?: \"s\" | \"m\";\n}\n\n/** @flr-generate all */\nexport const ActionGroup = flowComponent(\n \"ActionGroup\",\n (props) => {\n const {\n children,\n className,\n ref,\n\n spacing = \"s\",\n ...rest\n } = props;\n\n const rootClassName = clsx(styles.actionGroup, className, styles[spacing]);\n\n const propsContext: PropsContext = {\n Button: {\n slot: dynamic((props) => getActionGroupSlot(props)),\n className: dynamic((props) => {\n const slot = getActionGroupSlot(props);\n return clsx(props.className, styles[slot]);\n }),\n },\n Switch: {\n labelPosition: \"leading\",\n className: dynamic((props) => {\n return clsx(props.className, props.slot && styles[props.slot]);\n }),\n },\n Link: {\n className: dynamic((props) => {\n return clsx(props.className, props.slot && styles[props.slot]);\n }),\n },\n };\n\n return (\n <ActionStateContextProvider>\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n <div {...rest} className={rootClassName} ref={ref} role=\"group\">\n {children}\n </div>\n </TunnelProvider>\n </PropsContextProvider>\n </ActionStateContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ActionGroup;\n"],"names":["props"],"mappings":";;;;;;;;;;;AAqBO,MAAM,WAAA,GAAc,aAAA;AAAA,EACzB,aAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,QAAA;AAAA,MACA,SAAA;AAAA,MACA,GAAA;AAAA,MAEA,OAAA,GAAU,GAAA;AAAA,MACV,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,aAAa,SAAA,EAAW,MAAA,CAAO,OAAO,CAAC,CAAA;AAEzE,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,MAAA,EAAQ;AAAA,QACN,MAAM,OAAA,CAAQ,CAACA,MAAAA,KAAU,kBAAA,CAAmBA,MAAK,CAAC,CAAA;AAAA,QAClD,SAAA,EAAW,OAAA,CAAQ,CAACA,MAAAA,KAAU;AAC5B,UAAA,MAAM,IAAA,GAAO,mBAAmBA,MAAK,CAAA;AACrC,UAAA,OAAO,IAAA,CAAKA,MAAAA,CAAM,SAAA,EAAW,MAAA,CAAO,IAAI,CAAC,CAAA;AAAA,QAC3C,CAAC;AAAA,OACH;AAAA,MACA,MAAA,EAAQ;AAAA,QACN,aAAA,EAAe,SAAA;AAAA,QACf,SAAA,EAAW,OAAA,CAAQ,CAACA,MAAAA,KAAU;AAC5B,UAAA,OAAO,IAAA,CAAKA,OAAM,SAAA,EAAWA,MAAAA,CAAM,QAAQ,MAAA,CAAOA,MAAAA,CAAM,IAAI,CAAC,CAAA;AAAA,QAC/D,CAAC;AAAA,OACH;AAAA,MACA,IAAA,EAAM;AAAA,QACJ,SAAA,EAAW,OAAA,CAAQ,CAACA,MAAAA,KAAU;AAC5B,UAAA,OAAO,IAAA,CAAKA,OAAM,SAAA,EAAWA,MAAAA,CAAM,QAAQ,MAAA,CAAOA,MAAAA,CAAM,IAAI,CAAC,CAAA;AAAA,QAC/D,CAAC;AAAA;AACH,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,8BACC,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,kBACC,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,IAAA,EAAM,SAAA,EAAW,eAAe,GAAA,EAAU,IAAA,EAAK,SACrD,QAAA,EACH,CAAA,EACF,GACF,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -7,23 +7,29 @@ import '../../lib/propsContext/propsContext.mjs';
|
|
|
7
7
|
import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
8
8
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
9
9
|
|
|
10
|
-
const Align = flowComponent(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
const Align = flowComponent(
|
|
11
|
+
"Align",
|
|
12
|
+
(props) => {
|
|
13
|
+
const { children, className } = props;
|
|
14
|
+
const rootClassName = clsx(styles.align, className);
|
|
15
|
+
const propsContext = {
|
|
16
|
+
Text: { className: styles.text },
|
|
17
|
+
Button: { className: styles.button },
|
|
18
|
+
Avatar: { className: styles.avatar, size: "m" },
|
|
19
|
+
CopyButton: { size: "s", className: styles.copyButton },
|
|
20
|
+
Icon: { size: "s", className: styles.icon },
|
|
21
|
+
ContextualHelpTrigger: {
|
|
22
|
+
Button: {
|
|
23
|
+
className: styles.contextualHelpTriggerButton
|
|
24
|
+
}
|
|
22
25
|
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx("div", { className: rootClassName, children }) });
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: "layout"
|
|
31
|
+
}
|
|
32
|
+
);
|
|
27
33
|
|
|
28
34
|
export { Align, Align as default };
|
|
29
35
|
//# sourceMappingURL=Align.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Align.mjs","sources":["../../../../../../src/components/Align/Align.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Align.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlignProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps {}\n\n/** @flr-generate all */\nexport const Align = flowComponent(\"Align\"
|
|
1
|
+
{"version":3,"file":"Align.mjs","sources":["../../../../../../src/components/Align/Align.tsx"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport styles from \"./Align.module.scss\";\nimport clsx from \"clsx\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\n\nexport interface AlignProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps {}\n\n/** @flr-generate all */\nexport const Align = flowComponent(\n \"Align\",\n (props) => {\n const { children, className } = props;\n\n const rootClassName = clsx(styles.align, className);\n\n const propsContext: PropsContext = {\n Text: { className: styles.text },\n Button: { className: styles.button },\n Avatar: { className: styles.avatar, size: \"m\" },\n CopyButton: { size: \"s\", className: styles.copyButton },\n Icon: { size: \"s\", className: styles.icon },\n ContextualHelpTrigger: {\n Button: {\n className: styles.contextualHelpTriggerButton,\n },\n },\n };\n\n return (\n <PropsContextProvider props={propsContext}>\n <div className={rootClassName}>{children}</div>\n </PropsContextProvider>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default Align;\n"],"names":[],"mappings":";;;;;;;AAeO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,KAAA;AAEhC,IAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,KAAA,EAAO,SAAS,CAAA;AAElD,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,IAAA,EAAM,EAAE,SAAA,EAAW,MAAA,CAAO,IAAA,EAAK;AAAA,MAC/B,MAAA,EAAQ,EAAE,SAAA,EAAW,MAAA,CAAO,MAAA,EAAO;AAAA,MACnC,QAAQ,EAAE,SAAA,EAAW,MAAA,CAAO,MAAA,EAAQ,MAAM,GAAA,EAAI;AAAA,MAC9C,YAAY,EAAE,IAAA,EAAM,GAAA,EAAK,SAAA,EAAW,OAAO,UAAA,EAAW;AAAA,MACtD,MAAM,EAAE,IAAA,EAAM,GAAA,EAAK,SAAA,EAAW,OAAO,IAAA,EAAK;AAAA,MAC1C,qBAAA,EAAuB;AAAA,QACrB,MAAA,EAAQ;AAAA,UACN,WAAW,MAAA,CAAO;AAAA;AACpB;AACF,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,wBAAqB,KAAA,EAAO,YAAA,EAC3B,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAgB,QAAA,EAAS,CAAA,EAC3C,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.mjs","sources":["../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { isFocused } from \"@/lib/form/isFocused\";\n\nexport interface AutocompleteProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement>,\n Omit<\n Aria.AutocompleteProps,\n \"children\" | \"onInputChange\" | \"inputValue\" | \"defaultInputValue\" | \"ref\"\n > {\n isInvalid?: boolean;\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n}\n\n/** @flr-generate all */\nexport const Autocomplete = flowComponent(\"Autocomplete\", (props) => {\n const { children, isInvalid, value, defaultValue, ref, onChange, ...rest } =\n useControlledHostValueProps(props);\n\n const inputRef = useObjectRef(ref);\n\n const { contains } = Aria.useFilter({ sensitivity: \"base\" });\n const stringFormatter = useLocalizedStringFormatter(locales);\n const container = useRef(null);\n\n const optionsOverlayController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n\n const focusWithin = useFocusWithin({\n onBlurWithin: optionsOverlayController.close,\n });\n\n const renderEmptyState = () => (\n <Text className={styles.empty}>\n {stringFormatter.format(\"autocomplete.empty\")}\n </Text>\n );\n\n const handleInputChange = (value: string) => {\n if (value === \"\") {\n optionsOverlayController.close();\n } else if (isFocused(inputRef.current)) {\n optionsOverlayController.open();\n }\n onChange?.(value);\n };\n\n const handleOptionAction = (key: Aria.Key) => {\n const value = String(key);\n onChange(value);\n optionsOverlayController.close();\n };\n\n const inputProps: SearchFieldProps & TextFieldProps = {\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && optionsOverlayController.isOpen) {\n e.preventDefault();\n }\n },\n isInvalid,\n ref: inputRef,\n onChange: handleInputChange,\n value,\n defaultValue,\n };\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n SearchField: inputProps,\n TextField: inputProps,\n Option: {\n tunnelId: \"options\",\n },\n Popover: {\n className: styles.popover,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <PropsContextProvider\n props={propsContext}\n
|
|
1
|
+
{"version":3,"file":"Autocomplete.mjs","sources":["../../../../../../src/components/Autocomplete/Autocomplete.tsx"],"sourcesContent":["import { useRef, type PropsWithChildren } from \"react\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport * as Aria from \"react-aria-components\";\nimport { useOverlayController } from \"@/lib/controller\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport Options from \"@/components/Options\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport locales from \"./locales/*.locale.json\";\nimport Text from \"@/components/Text\";\nimport styles from \"./Autocomplete.module.scss\";\nimport {\n UNSAFE_PortalProvider,\n useFocusWithin,\n useLocalizedStringFormatter,\n useObjectRef,\n} from \"react-aria\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { isFocused } from \"@/lib/form/isFocused\";\n\nexport interface AutocompleteProps\n extends PropsWithChildren,\n PropsWithClassName,\n FlowComponentProps<HTMLInputElement>,\n Omit<\n Aria.AutocompleteProps,\n \"children\" | \"onInputChange\" | \"inputValue\" | \"defaultInputValue\" | \"ref\"\n > {\n isInvalid?: boolean;\n value?: string;\n defaultValue?: string;\n onChange?: (value: string) => void;\n}\n\n/** @flr-generate all */\nexport const Autocomplete = flowComponent(\"Autocomplete\", (props) => {\n const { children, isInvalid, value, defaultValue, ref, onChange, ...rest } =\n useControlledHostValueProps(props);\n\n const inputRef = useObjectRef(ref);\n\n const { contains } = Aria.useFilter({ sensitivity: \"base\" });\n const stringFormatter = useLocalizedStringFormatter(locales);\n const container = useRef(null);\n\n const optionsOverlayController = useOverlayController(\"Popover\", {\n reuseControllerFromContext: false,\n });\n\n const focusWithin = useFocusWithin({\n onBlurWithin: optionsOverlayController.close,\n });\n\n const renderEmptyState = () => (\n <Text className={styles.empty}>\n {stringFormatter.format(\"autocomplete.empty\")}\n </Text>\n );\n\n const handleInputChange = (value: string) => {\n if (value === \"\") {\n optionsOverlayController.close();\n } else if (isFocused(inputRef.current)) {\n optionsOverlayController.open();\n }\n onChange?.(value);\n };\n\n const handleOptionAction = (key: Aria.Key) => {\n const value = String(key);\n onChange(value);\n optionsOverlayController.close();\n };\n\n const inputProps: SearchFieldProps & TextFieldProps = {\n onKeyDown: (e) => {\n if (e.key === \"Enter\" && optionsOverlayController.isOpen) {\n e.preventDefault();\n }\n },\n isInvalid,\n ref: inputRef,\n onChange: handleInputChange,\n value,\n defaultValue,\n };\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n SearchField: inputProps,\n TextField: inputProps,\n Option: {\n tunnelId: \"options\",\n },\n Popover: {\n className: styles.popover,\n },\n ...fieldPropsContext,\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n value,\n isInvalid,\n defaultValue,\n optionsOverlayController,\n onChange,\n ]}\n >\n <div {...focusWithin.focusWithinProps} ref={container}>\n <UNSAFE_PortalProvider getContainer={() => container.current}>\n <Aria.Autocomplete\n filter={contains}\n disableAutoFocusFirst\n {...rest}\n >\n {children}\n <Options\n onAction={handleOptionAction}\n triggerRef={inputRef}\n controller={optionsOverlayController}\n renderEmptyState={renderEmptyState}\n isNonModal\n placement=\"bottom start\"\n >\n <TunnelExit id=\"options\" />\n </Options>\n </Aria.Autocomplete>\n </UNSAFE_PortalProvider>\n </div>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Autocomplete;\n"],"names":["value"],"mappings":";;;;;;;;;;;;;;;;;;AAyCO,MAAM,YAAA,GAAe,aAAA,CAAc,cAAA,EAAgB,CAAC,KAAA,KAAU;AACnE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,KAAA,EAAO,YAAA,EAAc,GAAA,EAAK,QAAA,EAAU,GAAG,IAAA,EAAK,GACvE,2BAAA,CAA4B,KAAK,CAAA;AAEnC,EAAA,MAAM,QAAA,GAAW,aAAa,GAAG,CAAA;AAEjC,EAAA,MAAM,EAAE,UAAS,GAAI,IAAA,CAAK,UAAU,EAAE,WAAA,EAAa,QAAQ,CAAA;AAC3D,EAAA,MAAM,eAAA,GAAkB,4BAA4B,OAAO,CAAA;AAC3D,EAAA,MAAM,SAAA,GAAY,OAAO,IAAI,CAAA;AAE7B,EAAA,MAAM,wBAAA,GAA2B,qBAAqB,SA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AA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAG,SAAA,EAAU;AAAA;AAAA;AAC3B;AAAA;AAAA,WAEJ,CAAA,EACF;AAAA;AAAA,KACF,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -6,6 +6,13 @@ import '../../lib/controller/overlay/context.mjs';
|
|
|
6
6
|
import { useIsMounted } from '../../lib/hooks/useIsMounted.mjs';
|
|
7
7
|
import '../../lib/propsContext/propsContext.mjs';
|
|
8
8
|
import 'remeda';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
10
|
+
import '@mittwald/react-tunnel';
|
|
11
|
+
import '../../lib/slotContext/SlotContextProvider.mjs';
|
|
12
|
+
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
13
|
+
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
14
|
+
import '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
15
|
+
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
9
16
|
import '@react-aria/utils';
|
|
10
17
|
import 'dot-prop';
|
|
11
18
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserOnly.mjs","sources":["../../../../../../src/components/BrowserOnly/BrowserOnly.tsx"],"sourcesContent":["import { useIsMounted } from \"@/lib/hooks\";\nimport type { PropsWithChildren } from \"react\";\n\nexport type BrowserOnlyProps = PropsWithChildren;\n\nexport const BrowserOnly = (props: PropsWithChildren) => {\n if (useIsMounted()) {\n return props.children;\n }\n};\n\nexport default BrowserOnly;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BrowserOnly.mjs","sources":["../../../../../../src/components/BrowserOnly/BrowserOnly.tsx"],"sourcesContent":["import { useIsMounted } from \"@/lib/hooks\";\nimport type { PropsWithChildren } from \"react\";\n\nexport type BrowserOnlyProps = PropsWithChildren;\n\nexport const BrowserOnly = (props: PropsWithChildren) => {\n if (useIsMounted()) {\n return props.children;\n }\n};\n\nexport default BrowserOnly;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAKO,MAAM,WAAA,GAAc,CAAC,KAAA,KAA6B;AACvD,EAAA,IAAI,cAAa,EAAG;AAClB,IAAA,OAAO,KAAA,CAAM,QAAA;AAAA,EACf;AACF;;;;"}
|
|
@@ -29,6 +29,10 @@ import 'react-aria-components';
|
|
|
29
29
|
import 'mobx';
|
|
30
30
|
import '../../lib/controller/overlay/context.mjs';
|
|
31
31
|
import 'remeda';
|
|
32
|
+
import '../../lib/slotContext/SlotContextProvider.mjs';
|
|
33
|
+
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
34
|
+
import '../../views/ComponentPropsContextProviderView.mjs';
|
|
35
|
+
import '../../lib/viewComponentContext/viewComponentContext.mjs';
|
|
32
36
|
import '@react-aria/utils';
|
|
33
37
|
import 'dot-prop';
|
|
34
38
|
import '../Heading/Heading.mjs';
|
|
@@ -37,12 +41,10 @@ import { CartesianGrid } from './components/CartesianGrid/CartesianGrid.mjs';
|
|
|
37
41
|
import '../Checkbox/Checkbox.mjs';
|
|
38
42
|
import '../CheckboxButton/CheckboxButton.mjs';
|
|
39
43
|
import '../CheckboxGroup/CheckboxGroup.mjs';
|
|
40
|
-
import '../../lib/propsContext/inherit/PropsContextLevelProvider.mjs';
|
|
41
44
|
import 'react-syntax-highlighter';
|
|
42
45
|
import '../CopyButton/CopyButton.mjs';
|
|
43
46
|
import '../ColumnLayout/ColumnLayout.mjs';
|
|
44
47
|
import '../ComboBox/ComboBox.mjs';
|
|
45
|
-
import '../../lib/propsContext/components/ComponentPropsContextProvider.mjs';
|
|
46
48
|
import '../Content/Content.mjs';
|
|
47
49
|
import '../ContextMenu/ContextMenu.mjs';
|
|
48
50
|
import '../MenuItem/MenuItem.mjs';
|
|
@@ -89,8 +91,8 @@ import 'luxon';
|
|
|
89
91
|
import '../NumberField/NumberField.mjs';
|
|
90
92
|
import '../Option/Option.mjs';
|
|
91
93
|
import '../../views/OverlayContentView.mjs';
|
|
92
|
-
import '../../lib/remote/eventHandlerContext.mjs';
|
|
93
94
|
import '../../views/LoadingSpinnerView.mjs';
|
|
95
|
+
import '../../lib/remote/eventHandlerContext.mjs';
|
|
94
96
|
import '../PasswordCreationField/PasswordCreationField.mjs';
|
|
95
97
|
import '../Popover/components/PopoverTrigger/PopoverTrigger.mjs';
|
|
96
98
|
import '../Popover/Popover.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends Pick<\n ComponentProps<typeof Recharts.ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n /** View that is provided when data is empty/undefined */\n emptyView?: React.ComponentType<CartesianChartEmptyViewProps>;\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView: EmptyView,\n ...rest\n } = props;\n const rootClassName = clsx(styles.cartesianChart, className);\n\n const otherChildren: ReactElement[] = [];\n const gridChildren: ReactElement[] = [];\n\n Children.forEach(children, (child) => {\n if (!child) return;\n const element = child as ReactElement;\n\n if (element.type === CartesianGrid) {\n gridChildren.push(element);\n } else {\n otherChildren.push(element);\n }\n });\n\n const showEmptyView = (!data || data.length === 0) && EmptyView;\n\n const chartContainerRef = useRef<HTMLDivElement>(null);\n const [viewDimensions, setViewDimensions] = useState<Partial<\n SVGProps<SVGForeignObjectElement>\n > | null>(null);\n\n // resizing the foreignObject for the EmptyView on size changes\n useEffect(() => {\n if (showEmptyView) {\n const updateDimensions = () => {\n const svg = chartContainerRef.current?.querySelector(\n \"svg\",\n ) as SVGSVGElement | null;\n if (!svg) return;\n\n const clip = svg.querySelector(\"clipPath rect\");\n if (clip) {\n const x = parseFloat(clip.getAttribute(\"x\") ?? \"0\");\n const y = parseFloat(clip.getAttribute(\"y\") ?? \"0\");\n const width = parseFloat(clip.getAttribute(\"width\") ?? \"0\");\n const height = parseFloat(clip.getAttribute(\"height\") ?? \"0\");\n setViewDimensions({ x, y, width, height });\n }\n };\n\n updateDimensions();\n\n const container = chartContainerRef.current;\n const observer = new ResizeObserver(updateDimensions);\n if (container) observer.observe(container);\n\n return () => {\n observer.disconnect();\n };\n }\n }, []);\n\n return (\n <Wrap if={height}>\n <div\n style={{ height, flex: flexGrow ? 1 : undefined }}\n ref={chartContainerRef}\n >\n <Recharts.ResponsiveContainer>\n <Recharts.ComposedChart\n data={data}\n className={rootClassName}\n {...rest}\n >\n {!showEmptyView && gridChildren}\n {otherChildren}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <div className={styles.emptyViewContainer}>\n <EmptyView data={data} />\n </div>\n </foreignObject>\n )}\n </Recharts.ComposedChart>\n </Recharts.ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":["height"],"mappings":"
|
|
1
|
+
{"version":3,"file":"CartesianChart.mjs","sources":["../../../../../../src/components/CartesianChart/CartesianChart.tsx"],"sourcesContent":["import * as Recharts from \"recharts\";\nimport React, {\n Children,\n useEffect,\n useRef,\n useState,\n type ComponentProps,\n type FC,\n type PropsWithChildren,\n type ReactElement,\n type SVGProps,\n} from \"react\";\nimport clsx from \"clsx\";\nimport styles from \"./CartesianChart.module.scss\";\nimport Wrap from \"../Wrap\";\nimport { CartesianGrid } from \"../public\";\n\nexport interface CartesianChartEmptyViewProps {\n data?: ComponentProps<typeof Recharts.ComposedChart>[\"data\"];\n}\n\nexport interface CartesianChartProps\n extends Pick<\n ComponentProps<typeof Recharts.ComposedChart>,\n \"data\" | \"className\" | \"syncId\" | \"syncMethod\"\n >,\n PropsWithChildren {\n height?: string;\n /** View that is provided when data is empty/undefined */\n emptyView?: React.ComponentType<CartesianChartEmptyViewProps>;\n /**\n * Allow the height controlling container to set flex-grow: 1. Can only be\n * used in combination with `height`\n */\n flexGrow?: boolean;\n}\n\n/** @flr-generate all */\nexport const CartesianChart: FC<CartesianChartProps> = (props) => {\n const {\n children,\n data,\n className,\n height,\n flexGrow,\n emptyView: EmptyView,\n ...rest\n } = props;\n const rootClassName = clsx(styles.cartesianChart, className);\n\n const otherChildren: ReactElement[] = [];\n const gridChildren: ReactElement[] = [];\n\n Children.forEach(children, (child) => {\n if (!child) return;\n const element = child as ReactElement;\n\n if (element.type === CartesianGrid) {\n gridChildren.push(element);\n } else {\n otherChildren.push(element);\n }\n });\n\n const showEmptyView = (!data || data.length === 0) && EmptyView;\n\n const chartContainerRef = useRef<HTMLDivElement>(null);\n const [viewDimensions, setViewDimensions] = useState<Partial<\n SVGProps<SVGForeignObjectElement>\n > | null>(null);\n\n // resizing the foreignObject for the EmptyView on size changes\n useEffect(() => {\n if (showEmptyView) {\n const updateDimensions = () => {\n const svg = chartContainerRef.current?.querySelector(\n \"svg\",\n ) as SVGSVGElement | null;\n if (!svg) return;\n\n const clip = svg.querySelector(\"clipPath rect\");\n if (clip) {\n const x = parseFloat(clip.getAttribute(\"x\") ?? \"0\");\n const y = parseFloat(clip.getAttribute(\"y\") ?? \"0\");\n const width = parseFloat(clip.getAttribute(\"width\") ?? \"0\");\n const height = parseFloat(clip.getAttribute(\"height\") ?? \"0\");\n setViewDimensions({ x, y, width, height });\n }\n };\n\n updateDimensions();\n\n const container = chartContainerRef.current;\n const observer = new ResizeObserver(updateDimensions);\n if (container) observer.observe(container);\n\n return () => {\n observer.disconnect();\n };\n }\n }, []);\n\n return (\n <Wrap if={height}>\n <div\n style={{ height, flex: flexGrow ? 1 : undefined }}\n ref={chartContainerRef}\n >\n <Recharts.ResponsiveContainer>\n <Recharts.ComposedChart\n data={data}\n className={rootClassName}\n {...rest}\n >\n {!showEmptyView && gridChildren}\n {otherChildren}\n {showEmptyView && viewDimensions && (\n <foreignObject {...viewDimensions}>\n <div className={styles.emptyViewContainer}>\n <EmptyView data={data} />\n </div>\n </foreignObject>\n )}\n </Recharts.ComposedChart>\n </Recharts.ResponsiveContainer>\n </div>\n </Wrap>\n );\n};\n\nexport default CartesianChart;\n"],"names":["height"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCO,MAAM,cAAA,GAA0C,CAAC,KAAA,KAAU;AAChE,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA;AAAA,IACA,MAAA;AAAA,IACA,QAAA;AAAA,IACA,SAAA,EAAW,SAAA;AAAA,IACX,GAAG;AAAA,GACL,GAAI,KAAA;AACJ,EAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,cAAA,EAAgB,SAAS,CAAA;AAE3D,EAAA,MAAM,gBAAgC,EAAC;AACvC,EAAA,MAAM,eAA+B,EAAC;AAEtC,EAAA,QAAA,CAAS,OAAA,CAAQ,QAAA,EAAU,CAAC,KAAA,KAAU;AACpC,IAAA,IAAI,CAAC,KAAA,EAAO;AACZ,IAAA,MAAM,OAAA,GAAU,KAAA;AAEhB,IAAA,IAAI,OAAA,CAAQ,SAAS,aAAA,EAAe;AAClC,MAAA,YAAA,CAAa,KAAK,OAAO,CAAA;AAAA,IAC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AAI,SAAA,EAAW,QAAA,CAAS,OAAA,CAAQ,SAAS,CAAA;AAEzC,MAAA,OAAO,MAAM;AACX,QAAA,QAAA,CAAS,UAAA,EAAW;AAAA,MACtB,CAAA;AAAA,IACF;AAAA,EACF,CAAA,EAAG,EAAE,CAAA;AAEL,EAAA,uBACE,GAAA,CAAC,IAAA,EAAA,EAAK,EAAA,EAAI,MAAA,EACR,QAAA,kBAAA,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,OAAO,EAAE,MAAA,EAAQ,IAAA,EAAM,QAAA,GAAW,IAAI,MAAA,EAAU;AAAA,MAChD,GAAA,EAAK,iBAAA;AAAA,MAEL,QAAA,kBAAA,GAAA,CAAC,QAAA,CAAS,mBAAA,EAAT,EACC,QAAA,kBAAA,IAAA;AAAA,QAAC,QAAA,CAAS,aAAA;AAAA,QAAT;AAAA,UACC,IAAA;AAAA,UACA,SAAA,EAAW,aAAA;AAAA,UACV,GAAG,IAAA;AAAA,UAEH,QAAA,EAAA;AAAA,YAAA,CAAC,aAAA,IAAiB,YAAA;AAAA,YAClB,aAAA;AAAA,YACA,aAAA,IAAiB,cAAA,oBAChB,GAAA,CAAC,eAAA,EAAA,EAAe,GAAG,cAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAO,kBAAA,EACrB,QAAA,kBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,IAAA,EAAY,GACzB,CAAA,EACF;AAAA;AAAA;AAAA,OAEJ,EACF;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -45,7 +45,7 @@ const CheckboxGroup = flowComponent("CheckboxGroup", (props) => {
|
|
|
45
45
|
className: clsx(fieldProps.className, className),
|
|
46
46
|
ref: objectRef,
|
|
47
47
|
children: /* @__PURE__ */ jsxs(TunnelProvider, { children: [
|
|
48
|
-
/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext,
|
|
48
|
+
/* @__PURE__ */ jsx(FieldErrorCaptureContext, { children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
|
|
49
49
|
children,
|
|
50
50
|
/* @__PURE__ */ jsx(ColumnLayout, { s, m, l, className: styles.checkboxGroup, children: /* @__PURE__ */ jsx(TunnelExit, { id: "checkboxButtons" }) }),
|
|
51
51
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.mjs","sources":["../../../../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":["import type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport { ColumnLayout } from \"@/components/ColumnLayout\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./CheckboxGroup.module.scss\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxGroupProps\n extends PropsWithChildren<Omit<Aria.CheckboxGroupProps, \"children\">>,\n Pick<ColumnLayoutProps, \"s\" | \"m\" | \"l\">,\n FlowComponentProps {}\n\n/** @flr-generate all */\nexport const CheckboxGroup = flowComponent(\"CheckboxGroup\", (props) => {\n const { children, className, isInvalid, s, m, l, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n fieldPropsContext,\n fieldProps,\n FieldErrorCaptureContext,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n Checkbox: {\n isInvalid,\n tunnelId: \"checkboxes\",\n className: styles.checkbox,\n },\n CheckboxButton: {\n isInvalid,\n tunnelId: \"checkboxButtons\",\n className: styles.checkboxButton,\n },\n ...fieldPropsContext,\n };\n\n const objectRef = useObjectRef(ref);\n useMakeFocusable(objectRef);\n\n return (\n <Aria.CheckboxGroup\n {...rest}\n {...fieldProps}\n isInvalid={isInvalid}\n className={clsx(fieldProps.className, className)}\n ref={objectRef}\n >\n <TunnelProvider>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={propsContext}
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.mjs","sources":["../../../../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"sourcesContent":["import type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport { ColumnLayout } from \"@/components/ColumnLayout\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { TunnelExit, TunnelProvider } from \"@mittwald/react-tunnel\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./CheckboxGroup.module.scss\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\n\nexport interface CheckboxGroupProps\n extends PropsWithChildren<Omit<Aria.CheckboxGroupProps, \"children\">>,\n Pick<ColumnLayoutProps, \"s\" | \"m\" | \"l\">,\n FlowComponentProps {}\n\n/** @flr-generate all */\nexport const CheckboxGroup = flowComponent(\"CheckboxGroup\", (props) => {\n const { children, className, isInvalid, s, m, l, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n fieldPropsContext,\n fieldProps,\n FieldErrorCaptureContext,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n Checkbox: {\n isInvalid,\n tunnelId: \"checkboxes\",\n className: styles.checkbox,\n },\n CheckboxButton: {\n isInvalid,\n tunnelId: \"checkboxButtons\",\n className: styles.checkboxButton,\n },\n ...fieldPropsContext,\n };\n\n const objectRef = useObjectRef(ref);\n useMakeFocusable(objectRef);\n\n return (\n <Aria.CheckboxGroup\n {...rest}\n {...fieldProps}\n isInvalid={isInvalid}\n className={clsx(fieldProps.className, className)}\n ref={objectRef}\n >\n <TunnelProvider>\n <FieldErrorCaptureContext>\n <PropsContextProvider props={propsContext}>\n {children}\n <ColumnLayout s={s} m={m} l={l} className={styles.checkboxGroup}>\n <TunnelExit id=\"checkboxButtons\" />\n </ColumnLayout>\n\n <ColumnLayout\n s={s ?? [1]}\n m={m ?? [1]}\n l={l ?? [1]}\n rowGap=\"s\"\n className={styles.checkboxGroup}\n >\n <TunnelExit id=\"checkboxes\" />\n </ColumnLayout>\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </TunnelProvider>\n </Aria.CheckboxGroup>\n );\n});\n\nexport default CheckboxGroup;\n"],"names":[],"mappings":";;;;;;;;;;;;;AAqBO,MAAM,aAAA,GAAgB,aAAA,CAAc,eAAA,EAAiB,CAAC,KAAA,KAAU;AACrE,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,SAAA,EAAW,CAAA,EAAG,GAAG,CAAA,EAAG,GAAA,EAAK,GAAG,IAAA,EAAK,GAAI,KAAA;AAElE,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA;AAAA,IACA;AAAA,GACF,GAAI,kBAAkB,KAAK,CAAA;AAE3B,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,QAAA,EAAU;AAAA,MACR,SAAA;AAAA,MACA,QAAA,EAAU,YAAA;AAAA,MACV,WAAW,MAAA,CAAO;AAAA,KACpB;AAAA,IACA,cAAA,EAAgB;AAAA,MACd,SAAA;AAAA,MACA,QAAA,EAAU,iBAAA;AAAA,MACV,WAAW,MAAA,CAAO;AAA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}
|
|
@@ -8,65 +8,71 @@ import '../../lib/propsContext/propsContext.mjs';
|
|
|
8
8
|
import { PropsContextProvider } from '../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
9
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
10
10
|
|
|
11
|
-
const ColumnLayout = flowComponent(
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
style: styleFromProps
|
|
25
|
-
} = props;
|
|
26
|
-
let elementClassName = styles.columnLayout;
|
|
27
|
-
s?.map((v, i) => {
|
|
28
|
-
if (v === null) {
|
|
29
|
-
elementClassName = clsx(elementClassName, styles[`hide-s-${i + 1}`]);
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
m?.map((v, i) => {
|
|
33
|
-
if (v === null) {
|
|
34
|
-
elementClassName = clsx(elementClassName, styles[`hide-m-${i + 1}`]);
|
|
35
|
-
}
|
|
36
|
-
});
|
|
37
|
-
l?.map((v, i) => {
|
|
38
|
-
if (v === null) {
|
|
39
|
-
elementClassName = clsx(elementClassName, styles[`hide-l-${i + 1}`]);
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
const columnsS = s ? getColumns(s) : "1fr";
|
|
43
|
-
const columnsM = m ? getColumns(m) : s ? columnsS : "1fr 1fr";
|
|
44
|
-
const columnsL = l ? getColumns(l) : m || s ? columnsM : "1fr 1fr 1fr";
|
|
45
|
-
const style = {
|
|
46
|
-
...styleFromProps,
|
|
47
|
-
"--column-layout--columns-s": columnsS,
|
|
48
|
-
"--column-layout--columns-m": columnsM,
|
|
49
|
-
"--column-layout--columns-l": columnsL,
|
|
50
|
-
"--column-layout--row-gap": `var(--column-layout--gap--${rowGap})`,
|
|
51
|
-
"--column-layout--column-gap": `var(--column-layout--gap--${columnGap})`
|
|
52
|
-
};
|
|
53
|
-
const rootClassName = clsx(styles.columnLayoutContainer, className);
|
|
54
|
-
const Element = elementType;
|
|
55
|
-
const propsContext = {
|
|
56
|
-
Section: {
|
|
57
|
-
hideSeparator: true
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
return /* @__PURE__ */ jsx("div", { className: rootClassName, style, children: /* @__PURE__ */ jsx(
|
|
61
|
-
Element,
|
|
62
|
-
{
|
|
63
|
-
ref,
|
|
11
|
+
const ColumnLayout = flowComponent(
|
|
12
|
+
"ColumnLayout",
|
|
13
|
+
(props) => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
className,
|
|
17
|
+
s,
|
|
18
|
+
m,
|
|
19
|
+
l,
|
|
20
|
+
gap = "m",
|
|
21
|
+
rowGap = gap,
|
|
22
|
+
columnGap = gap,
|
|
23
|
+
elementType = "div",
|
|
64
24
|
"aria-label": ariaLabel,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
25
|
+
ref,
|
|
26
|
+
style: styleFromProps
|
|
27
|
+
} = props;
|
|
28
|
+
let elementClassName = styles.columnLayout;
|
|
29
|
+
s?.map((v, i) => {
|
|
30
|
+
if (v === null) {
|
|
31
|
+
elementClassName = clsx(elementClassName, styles[`hide-s-${i + 1}`]);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
m?.map((v, i) => {
|
|
35
|
+
if (v === null) {
|
|
36
|
+
elementClassName = clsx(elementClassName, styles[`hide-m-${i + 1}`]);
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
l?.map((v, i) => {
|
|
40
|
+
if (v === null) {
|
|
41
|
+
elementClassName = clsx(elementClassName, styles[`hide-l-${i + 1}`]);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const columnsS = s ? getColumns(s) : "1fr";
|
|
45
|
+
const columnsM = m ? getColumns(m) : s ? columnsS : "1fr 1fr";
|
|
46
|
+
const columnsL = l ? getColumns(l) : m || s ? columnsM : "1fr 1fr 1fr";
|
|
47
|
+
const style = {
|
|
48
|
+
...styleFromProps,
|
|
49
|
+
"--column-layout--columns-s": columnsS,
|
|
50
|
+
"--column-layout--columns-m": columnsM,
|
|
51
|
+
"--column-layout--columns-l": columnsL,
|
|
52
|
+
"--column-layout--row-gap": `var(--column-layout--gap--${rowGap})`,
|
|
53
|
+
"--column-layout--column-gap": `var(--column-layout--gap--${columnGap})`
|
|
54
|
+
};
|
|
55
|
+
const rootClassName = clsx(styles.columnLayoutContainer, className);
|
|
56
|
+
const Element = elementType;
|
|
57
|
+
const propsContext = {
|
|
58
|
+
Section: {
|
|
59
|
+
hideSeparator: true
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
return /* @__PURE__ */ jsx("div", { className: rootClassName, style, children: /* @__PURE__ */ jsx(
|
|
63
|
+
Element,
|
|
64
|
+
{
|
|
65
|
+
ref,
|
|
66
|
+
"aria-label": ariaLabel,
|
|
67
|
+
className: elementClassName,
|
|
68
|
+
children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children })
|
|
69
|
+
}
|
|
70
|
+
) });
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
type: "layout"
|
|
74
|
+
}
|
|
75
|
+
);
|
|
70
76
|
|
|
71
77
|
export { ColumnLayout, ColumnLayout as default };
|
|
72
78
|
//# sourceMappingURL=ColumnLayout.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnLayout.mjs","sources":["../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n> extends PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\"ColumnLayout\"
|
|
1
|
+
{"version":3,"file":"ColumnLayout.mjs","sources":["../../../../../../src/components/ColumnLayout/ColumnLayout.tsx"],"sourcesContent":["import type { CSSProperties, PropsWithChildren } from \"react\";\nimport styles from \"./ColumnLayout.module.scss\";\nimport { getColumns } from \"./lib/getColumns\";\nimport clsx from \"clsx\";\nimport type {\n PropsWithClassName,\n PropsWithElementType,\n} from \"@/lib/types/props\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\n\ntype GapSize = \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface ColumnLayoutProps<\n T extends keyof HTMLElementTagNameMap = \"div\" | \"ul\",\n> extends PropsWithChildren,\n PropsWithElementType<T>,\n PropsWithClassName,\n FlowComponentProps<HTMLElementTagNameMap[T]> {\n /** Column layout for container size s. */\n s?: (number | null)[];\n /** Column layout for container size m. */\n m?: (number | null)[];\n /** Column layout for container size l. */\n l?: (number | null)[];\n /**\n * Size of the row and column gap between the content blocks inside the column\n * layout.\n *\n * @default \"m\"\n */\n gap?: GapSize;\n /** Size of the row gap between the content blocks inside the column layout. */\n rowGap?: GapSize;\n /** Size of the column gap between the content blocks inside the column layout. */\n columnGap?: GapSize;\n}\n\n/** @flr-generate all */\nexport const ColumnLayout = flowComponent(\n \"ColumnLayout\",\n (props) => {\n const {\n children,\n className,\n s,\n m,\n l,\n gap = \"m\",\n rowGap = gap,\n columnGap = gap,\n elementType = \"div\",\n \"aria-label\": ariaLabel,\n ref,\n style: styleFromProps,\n } = props;\n\n let elementClassName = styles.columnLayout;\n\n s?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(elementClassName, styles[`hide-s-${i + 1}`]);\n }\n });\n m?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(elementClassName, styles[`hide-m-${i + 1}`]);\n }\n });\n l?.map((v, i) => {\n if (v === null) {\n elementClassName = clsx(elementClassName, styles[`hide-l-${i + 1}`]);\n }\n });\n\n const columnsS = s ? getColumns(s) : \"1fr\";\n const columnsM = m ? getColumns(m) : s ? columnsS : \"1fr 1fr\";\n const columnsL = l ? getColumns(l) : m || s ? columnsM : \"1fr 1fr 1fr\";\n\n const style = {\n ...styleFromProps,\n \"--column-layout--columns-s\": columnsS,\n \"--column-layout--columns-m\": columnsM,\n \"--column-layout--columns-l\": columnsL,\n \"--column-layout--row-gap\": `var(--column-layout--gap--${rowGap})`,\n \"--column-layout--column-gap\": `var(--column-layout--gap--${columnGap})`,\n } as CSSProperties;\n\n const rootClassName = clsx(styles.columnLayoutContainer, className);\n\n const Element = elementType;\n\n const propsContext: PropsContext = {\n Section: {\n hideSeparator: true,\n },\n };\n\n return (\n <div className={rootClassName} style={style}>\n <Element\n ref={ref as never}\n aria-label={ariaLabel}\n className={elementClassName}\n >\n <PropsContextProvider props={propsContext}>\n {children}\n </PropsContextProvider>\n </Element>\n </div>\n );\n },\n {\n type: \"layout\",\n },\n);\n\nexport default ColumnLayout;\n"],"names":[],"mappings":";;;;;;;;AA2CO,MAAM,YAAA,GAAe,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AA,CAAW,CAAC,CAAA,GAAI,IAAI,QAAA,GAAW,SAAA;AACpD,IAAA,MAAM,WAAW,CAAA,GAAI,UAAA,CAAW,CAAC,CAAA,GAAI,CAAA,IAAK,IAAI,QAAA,GAAW,aAAA;AAEzD,IAAA,MAAM,KAAA,GAAQ;AAAA,MACZ,GAAG,cAAA;AAAA,MACH,4BAAA,EAA8B,QAAA;AAAA,MAC9B,4BAAA,EAA8B,QAAA;AAAA,MAC9B,4BAAA,EAA8B,QAAA;AAAA,MAC9B,0BAAA,EAA4B,6BAA6B,MAAM,CAAA,CAAA,CAAA;AAAA,MAC/D,6BAAA,EAA+B,6BAA6B,SAAS,CAAA,CAAA;AAAA,KACvE;AAEA,IAAA,MAAM,aAAA,GAAgB,IAAA,CAAK,MAAA,CAAO,qBAAA,EAAuB,SAAS,CAAA;AAElE,IAAA,MAAM,OAAA,GAAU,WAAA;AAEhB,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,OAAA,EAAS;AAAA,QACP,aAAA,EAAe;AAAA;AACjB,KACF;AAEA,IAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,aAAA,EAAe,KAAA,EAC7B,QAAA,kBAAA,GAAA;AAAA,MAAC,OAAA;AAAA,MAAA;AAAA,QACC,GAAA;AAAA,QACA,YAAA,EAAY,SAAA;AAAA,QACZ,SAAA,EAAW,gBAAA;AAAA,QAEX,QAAA,kBAAA,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC1B,QAAA,EACH;AAAA;AAAA,KACF,EACF,CAAA;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -36,7 +36,8 @@ const ContextMenuSection = flowComponent(
|
|
|
36
36
|
children: /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsx(Action, { skip: true, children: /* @__PURE__ */ jsx(Action, { closeOverlay: getCloseOverlayType(selectionMode), children }) }) })
|
|
37
37
|
}
|
|
38
38
|
);
|
|
39
|
-
}
|
|
39
|
+
},
|
|
40
|
+
{ type: "layout" }
|
|
40
41
|
);
|
|
41
42
|
|
|
42
43
|
export { ContextMenuSection, ContextMenuSection as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n);\n\nexport default ContextMenuSection;\n"],"names":[],"mappings":";;;;;;;;;;;;AA0BO,MAAM,kBAAA,GAAqB,aAAA;AAAA,EAChC,oBAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,aAAA,EAAe,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAElD,IAAA,MAAM,gBAAA,GAAmB,4BAA4B,aAAa,CAAA;AAElE,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,OAAA,EAAS;AAAA,QACP,KAAA,EAAO,CAAA;AAAA,QACP,QAAA,kBAAU,GAAA,CAAC,IAAA,CAAK,MAAA,EAAL,EAAY;AAAA,OACzB;AAAA,MACA,QAAA,EAAU;AAAA,QACR;AAAA;AACF,KACF;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,IAAA,CAAK,WAAA;AAAA,MAAL;AAAA,QACC,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QACJ,aAAA,EAAe,qBAAqB,aAAa,CAAA;AAAA,QACjD,WAAW,MAAA,CAAO,OAAA;AAAA,QAElB,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,UAAO,IAAA,EAAI,IAAA,EACV,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,cAAc,mBAAA,CAAoB,aAAa,CAAA,EACpD,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ;
|
|
1
|
+
{"version":3,"file":"ContextMenuSection.mjs","sources":["../../../../../../../../src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport type { PropsWithChildren } from \"react\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport styles from \"../../ContextMenu.module.scss\";\nimport type { ContextMenuSelectionMode } from \"@/components/ContextMenu/lib\";\nimport {\n getAriaSelectionMode,\n getCloseOverlayType,\n getMenuItemSelectionVariant,\n} from \"@/components/ContextMenu/lib\";\nimport { Action } from \"@/components/Action\";\nimport type { MenuItemProps } from \"@/components/MenuItem\";\n\nexport type ContextMenuSectionProps = PropsWithChildren &\n FlowComponentProps &\n Pick<\n Aria.MenuSectionProps<MenuItemProps>,\n \"defaultSelectedKeys\" | \"selectedKeys\"\n > & {\n selectionMode?: ContextMenuSelectionMode;\n };\n\n/** @flr-generate all */\nexport const ContextMenuSection = flowComponent(\n \"ContextMenuSection\",\n (props) => {\n const { children, selectionMode, ref, ...rest } = props;\n\n const selectionVariant = getMenuItemSelectionVariant(selectionMode);\n\n const propsContext: PropsContext = {\n Heading: {\n level: 5,\n wrapWith: <Aria.Header />,\n },\n MenuItem: {\n selectionVariant,\n },\n };\n\n return (\n <Aria.MenuSection\n ref={ref}\n {...rest}\n selectionMode={getAriaSelectionMode(selectionMode)}\n className={styles.section}\n >\n <PropsContextProvider props={propsContext}>\n <Action skip>\n <Action closeOverlay={getCloseOverlayType(selectionMode)}>\n {children}\n </Action>\n </Action>\n </PropsContextProvider>\n </Aria.MenuSection>\n );\n },\n { type: \"layout\" },\n);\n\nexport default ContextMenuSection;\n"],"names":[],"mappings":";;;;;;;;;;;;AA0BO,MAAM,kBAAA,GAAqB,aAAA;AAAA,EAChC,oBAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM,EAAE,QAAA,EAAU,aAAA,EAAe,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAElD,IAAA,MAAM,gBAAA,GAAmB,4BAA4B,aAAa,CAAA;AAElE,IAAA,MAAM,YAAA,GAA6B;AAAA,MACjC,OAAA,EAAS;AAAA,QACP,KAAA,EAAO,CAAA;AAAA,QACP,QAAA,kBAAU,GAAA,CAAC,IAAA,CAAK,MAAA,EAAL,EAAY;AAAA,OACzB;AAAA,MACA,QAAA,EAAU;AAAA,QACR;AAAA;AACF,KACF;AAEA,IAAA,uBACE,GAAA;AAAA,MAAC,IAAA,CAAK,WAAA;AAAA,MAAL;AAAA,QACC,GAAA;AAAA,QACC,GAAG,IAAA;AAAA,QACJ,aAAA,EAAe,qBAAqB,aAAa,CAAA;AAAA,QACjD,WAAW,MAAA,CAAO,OAAA;AAAA,QAElB,8BAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,YAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,UAAO,IAAA,EAAI,IAAA,EACV,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,cAAc,mBAAA,CAAoB,aAAa,CAAA,EACpD,QAAA,EACH,GACF,CAAA,EACF;AAAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAAA,EACA,EAAE,MAAM,QAAA;AACV;;;;"}
|