@mittwald/flow-react-components 0.2.0-alpha.511 → 0.2.0-alpha.513
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 +8 -0
- package/dist/assets/doc-properties.json +1620 -1620
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs +2 -1
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -15,7 +15,7 @@ import { useObjectRef } from '@react-aria/utils';
|
|
|
15
15
|
import { useMakeFocusable } from '../../lib/hooks/dom/useMakeFocusable.mjs';
|
|
16
16
|
|
|
17
17
|
const CheckboxGroup = flowComponent("CheckboxGroup", (props) => {
|
|
18
|
-
const { children, className, s, m, l, ref, ...rest } = props;
|
|
18
|
+
const { children, className, s, m, l, ref, value, ...rest } = props;
|
|
19
19
|
const rootClassName = clsx(formFieldStyles.formField, className);
|
|
20
20
|
const propsContext = {
|
|
21
21
|
Label: {
|
|
@@ -46,6 +46,7 @@ const CheckboxGroup = flowComponent("CheckboxGroup", (props) => {
|
|
|
46
46
|
...rest,
|
|
47
47
|
className: rootClassName,
|
|
48
48
|
ref: localCheckboxGroupRef,
|
|
49
|
+
value: Array.isArray(value) ? value : void 0,
|
|
49
50
|
children: [
|
|
50
51
|
/* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, children: /* @__PURE__ */ jsxs(TunnelProvider, { children: [
|
|
51
52
|
children,
|
|
@@ -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 { FieldError } from \"@/components/FieldError\";\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 formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./CheckboxGroup.module.scss\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\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, s, m, l, ref, ...rest } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n tunnelId: \"fieldDescription\",\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n tunnelId: \"fieldError\",\n },\n Checkbox: {\n tunnelId: \"checkboxes\",\n className: styles.checkbox,\n },\n CheckboxButton: {\n tunnelId: \"checkboxButtons\",\n className: styles.checkboxButton,\n },\n };\n\n const localCheckboxGroupRef = useObjectRef(ref);\n useMakeFocusable(localCheckboxGroupRef);\n\n return (\n <Aria.CheckboxGroup\n {...rest}\n className={rootClassName}\n ref={localCheckboxGroupRef}\n >\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n {children}\n\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\n <TunnelExit id=\"fieldDescription\" />\n <TunnelExit id=\"fieldError\" />\n </TunnelProvider>\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError} />\n </Aria.CheckboxGroup>\n );\n});\n\nexport default CheckboxGroup;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBO,MAAM,aAAgB,GAAA,aAAA,CAAc,eAAiB,EAAA,CAAC,KAAU,KAAA;AACrE,EAAM,MAAA,EAAE,
|
|
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 { FieldError } from \"@/components/FieldError\";\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 formFieldStyles from \"../FormField/FormField.module.scss\";\nimport styles from \"./CheckboxGroup.module.scss\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useMakeFocusable } from \"@/lib/hooks/dom/useMakeFocusable\";\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, s, m, l, ref, value, ...rest } = props;\n\n const rootClassName = clsx(formFieldStyles.formField, className);\n\n const propsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n tunnelId: \"fieldDescription\",\n },\n FieldError: {\n className: formFieldStyles.customFieldError,\n tunnelId: \"fieldError\",\n },\n Checkbox: {\n tunnelId: \"checkboxes\",\n className: styles.checkbox,\n },\n CheckboxButton: {\n tunnelId: \"checkboxButtons\",\n className: styles.checkboxButton,\n },\n };\n\n const localCheckboxGroupRef = useObjectRef(ref);\n useMakeFocusable(localCheckboxGroupRef);\n\n return (\n <Aria.CheckboxGroup\n {...rest}\n className={rootClassName}\n ref={localCheckboxGroupRef}\n value={Array.isArray(value) ? value : undefined}\n >\n <PropsContextProvider props={propsContext}>\n <TunnelProvider>\n {children}\n\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\n <TunnelExit id=\"fieldDescription\" />\n <TunnelExit id=\"fieldError\" />\n </TunnelProvider>\n </PropsContextProvider>\n <FieldError className={formFieldStyles.fieldError} />\n </Aria.CheckboxGroup>\n );\n});\n\nexport default CheckboxGroup;\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAsBO,MAAM,aAAgB,GAAA,aAAA,CAAc,eAAiB,EAAA,CAAC,KAAU,KAAA;AACrE,EAAM,MAAA,EAAE,QAAU,EAAA,SAAA,EAAW,CAAG,EAAA,CAAA,EAAG,GAAG,GAAK,EAAA,KAAA,EAAO,GAAG,IAAA,EAAS,GAAA,KAAA;AAE9D,EAAA,MAAM,aAAgB,GAAA,IAAA,CAAK,eAAgB,CAAA,SAAA,EAAW,SAAS,CAAA;AAE/D,EAAA,MAAM,YAA6B,GAAA;AAAA,IACjC,KAAO,EAAA;AAAA,MACL,WAAW,eAAgB,CAAA;AAAA,KAC7B;AAAA,IACA,gBAAkB,EAAA;AAAA,MAChB,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IAAA,CAAC,CAAC,CAAA;AAAA,cACV,MAAO,EAAA,GAAA;AAAA,cACP,WAAW,MAAO,CAAA,aAAA;AAAA,cAElB,QAAA,kBAAA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,YAAa,EAAA;AAAA;AAAA,WAC9B;AAAA,0BAEA,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,kBAAmB,EAAA,CAAA;AAAA,0BAClC,GAAA,CAAC,UAAW,EAAA,EAAA,EAAA,EAAG,YAAa,EAAA;AAAA,SAAA,EAC9B,CACF,EAAA,CAAA;AAAA,wBACC,GAAA,CAAA,UAAA,EAAA,EAAW,SAAW,EAAA,eAAA,CAAgB,UAAY,EAAA;AAAA;AAAA;AAAA,GACrD;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAM9C,MAAM,WAAW,kBACf,SAAQ,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,EAClE,IAAI,CAAC,iBAAiB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EACxC,kBAAkB;CAAG;AAEzB,wBAAwB;AACxB,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckboxGroup/CheckboxGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAGnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAM/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAM9C,MAAM,WAAW,kBACf,SAAQ,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC,EAClE,IAAI,CAAC,iBAAiB,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC,EACxC,kBAAkB;CAAG;AAEzB,wBAAwB;AACxB,eAAO,MAAM,aAAa,uGA8DxB,CAAC;AAEH,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mittwald/flow-react-components",
|
|
3
|
-
"version": "0.2.0-alpha.
|
|
3
|
+
"version": "0.2.0-alpha.513",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
60
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
61
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
61
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.513",
|
|
62
62
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
63
63
|
"@react-aria/form": "^3.1.1",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@faker-js/faker": "^9.9.0",
|
|
102
102
|
"@internationalized/date": "^3.9.0",
|
|
103
103
|
"@mittwald/flow-core": "",
|
|
104
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
104
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.513",
|
|
105
105
|
"@mittwald/react-use-promise": "^3.0.4",
|
|
106
106
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.3",
|
|
107
107
|
"@mittwald/typescript-config": "",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optional": true
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "cf5c4d2ff6f0da7df453acadf2276917e3c773a8"
|
|
178
178
|
}
|