@mittwald/flow-react-components 0.2.0-alpha.741 → 0.2.0-alpha.742
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 +5207 -5207
- package/dist/js/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs +8 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormAction/FormResetAction.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs +13 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/FormRootError/useMountedFormRootErrorComponent.mjs +13 -0
- package/dist/js/components/src/integrations/react-hook-form/components/FormRootError/useMountedFormRootErrorComponent.mjs.map +1 -1
- package/dist/js/react-hook-form.mjs +14 -0
- package/dist/js/react-hook-form.mjs.map +1 -1
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/index.d.ts +1 -0
- package/dist/types/integrations/react-hook-form/components/FormContextProvider/index.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -6,7 +6,15 @@ import 'react-aria';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import '@react-aria/live-announcer';
|
|
8
8
|
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
9
|
+
import 'mobx';
|
|
9
10
|
import '../../../../lib/propsContext/propsContext.mjs';
|
|
11
|
+
import 'remeda';
|
|
12
|
+
import '@react-aria/utils';
|
|
13
|
+
import 'dot-prop';
|
|
14
|
+
import '../../../../lib/controller/overlay/context.mjs';
|
|
15
|
+
import 'invariant';
|
|
16
|
+
import '../../../../components/Action/context.mjs';
|
|
17
|
+
import '../../../../components/Action/models/ActionStateContext.mjs';
|
|
10
18
|
import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
11
19
|
|
|
12
20
|
const FormResetAction = (props) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormResetAction.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormAction/FormResetAction.tsx"],"sourcesContent":["import Action, { type ActionProps } from \"@/components/Action\";\nimport { useFormContext } from \"@/integrations/react-hook-form/components/FormContextProvider\";\nimport { PropsContextProvider, type PropsContext } from \"@/lib/propsContext\";\nimport type { FC, PropsWithChildren } from \"react\";\n\ntype SupportedActionProps = Pick<ActionProps, \"showFeedback\">;\n\nexport const FormResetAction: FC<PropsWithChildren<SupportedActionProps>> = (\n props,\n) => {\n const { children, ...actionProps } = props;\n\n const { form, isReadOnly, id } = useFormContext();\n\n const propsContext: PropsContext = {\n Button: {\n isReadOnly,\n form: id,\n color: \"secondary\",\n variant: \"soft\",\n type: \"button\",\n },\n };\n\n return (\n <Action onAction={() => form.reset()} {...actionProps}>\n <PropsContextProvider\n props={propsContext}\n dependencies={[isReadOnly, id]}\n >\n {children}\n </PropsContextProvider>\n </Action>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAOO,MAAM,eAAA,GAA+D,CAC1E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,GAAG,WAAA,EAAY,GAAI,KAAA;AAErC,EAAA,MAAM,EAAE,IAAA,EAAM,UAAA,EAAY,EAAA,KAAO,cAAA,EAAe;AAEhD,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,MAAA,EAAQ;AAAA,MACN,UAAA;AAAA,MACA,IAAA,EAAM,EAAA;AAAA,MACN,KAAA,EAAO,WAAA;AAAA,MACP,OAAA,EAAS,MAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACF;AAEA,EAAA,uBACE,GAAA,CAAC,UAAO,QAAA,EAAU,MAAM,KAAK,KAAA,EAAM,EAAI,GAAG,WAAA,EACxC,QAAA,kBAAA,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc,CAAC,UAAA,EAAY,EAAE,CAAA;AAAA,MAE5B;AAAA;AAAA,GACH,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
5
|
+
import '../../../../components/Action/Action.mjs';
|
|
6
|
+
import 'react-aria';
|
|
7
|
+
import 'react';
|
|
8
|
+
import '@react-aria/live-announcer';
|
|
9
|
+
import 'mobx';
|
|
10
|
+
import '../../../../lib/propsContext/propsContext.mjs';
|
|
11
|
+
import 'remeda';
|
|
12
|
+
import '@react-aria/utils';
|
|
13
|
+
import 'dot-prop';
|
|
14
|
+
import '../../../../lib/controller/overlay/context.mjs';
|
|
15
|
+
import 'invariant';
|
|
16
|
+
import '../../../../components/Action/context.mjs';
|
|
17
|
+
import '../../../../components/Action/models/ActionStateContext.mjs';
|
|
5
18
|
import FieldErrorView from '../../../../views/FieldErrorView.mjs';
|
|
6
19
|
import { useMountedFormRootErrorComponent } from './useMountedFormRootErrorComponent.mjs';
|
|
7
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormRootError.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormRootError/FormRootError.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useFormContext } from \"../FormContextProvider\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useMountedFormRootErrorComponent } from \"./useMountedFormRootErrorComponent\";\n\nexport const FormRootError: FC = () => {\n const form = useFormContext().form;\n useMountedFormRootErrorComponent();\n const error = form.formState.errors.root;\n return <FieldErrorView>{error?.message}</FieldErrorView>;\n};\n\nexport default FormRootError;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FormRootError.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormRootError/FormRootError.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useFormContext } from \"../FormContextProvider\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\nimport { useMountedFormRootErrorComponent } from \"./useMountedFormRootErrorComponent\";\n\nexport const FormRootError: FC = () => {\n const form = useFormContext().form;\n useMountedFormRootErrorComponent();\n const error = form.formState.errors.root;\n return <FieldErrorView>{error?.message}</FieldErrorView>;\n};\n\nexport default FormRootError;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAKO,MAAM,gBAAoB,MAAM;AACrC,EAAA,MAAM,IAAA,GAAO,gBAAe,CAAE,IAAA;AAC9B,EAAA,gCAAA,EAAiC;AACjC,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,SAAA,CAAU,MAAA,CAAO,IAAA;AACpC,EAAA,uBAAO,GAAA,CAAC,cAAA,EAAA,EAAgB,QAAA,EAAA,KAAA,EAAO,OAAA,EAAQ,CAAA;AACzC;;;;"}
|
|
@@ -2,6 +2,19 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { useFormContext } from '../FormContextProvider/FormContextProvider.mjs';
|
|
5
|
+
import '../../../../components/Action/Action.mjs';
|
|
6
|
+
import 'react/jsx-runtime';
|
|
7
|
+
import 'react-aria';
|
|
8
|
+
import '@react-aria/live-announcer';
|
|
9
|
+
import 'mobx';
|
|
10
|
+
import '../../../../lib/propsContext/propsContext.mjs';
|
|
11
|
+
import 'remeda';
|
|
12
|
+
import '@react-aria/utils';
|
|
13
|
+
import 'dot-prop';
|
|
14
|
+
import '../../../../lib/controller/overlay/context.mjs';
|
|
15
|
+
import 'invariant';
|
|
16
|
+
import '../../../../components/Action/context.mjs';
|
|
17
|
+
import '../../../../components/Action/models/ActionStateContext.mjs';
|
|
5
18
|
|
|
6
19
|
const useMountedFormRootErrorComponent = () => {
|
|
7
20
|
const controller = useFormContext().rootErrorController;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useMountedFormRootErrorComponent.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormRootError/useMountedFormRootErrorComponent.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useFormContext } from \"../FormContextProvider\";\n\nexport const useMountedFormRootErrorComponent = () => {\n const controller = useFormContext().rootErrorController;\n\n useEffect(() => {\n controller.updateErrorComponentMounted(true);\n return () => {\n controller.updateErrorComponentMounted(false);\n };\n }, [controller]);\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useMountedFormRootErrorComponent.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/FormRootError/useMountedFormRootErrorComponent.ts"],"sourcesContent":["import { useEffect } from \"react\";\nimport { useFormContext } from \"../FormContextProvider\";\n\nexport const useMountedFormRootErrorComponent = () => {\n const controller = useFormContext().rootErrorController;\n\n useEffect(() => {\n controller.updateErrorComponentMounted(true);\n return () => {\n controller.updateErrorComponentMounted(false);\n };\n }, [controller]);\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAGO,MAAM,mCAAmC,MAAM;AACpD,EAAA,MAAM,UAAA,GAAa,gBAAe,CAAE,mBAAA;AAEpC,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,UAAA,CAAW,4BAA4B,IAAI,CAAA;AAC3C,IAAA,OAAO,MAAM;AACX,MAAA,UAAA,CAAW,4BAA4B,KAAK,CAAA;AAAA,IAC9C,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AACjB;;;;"}
|
|
@@ -7,6 +7,20 @@ export { FormSettingsProvider } from './components/src/integrations/react-hook-f
|
|
|
7
7
|
export { ResetButton } from './components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs';
|
|
8
8
|
export { FormRootError } from './components/src/integrations/react-hook-form/components/FormRootError/FormRootError.mjs';
|
|
9
9
|
export { useFormContext, useOptionalFormContext } from './components/src/integrations/react-hook-form/components/FormContextProvider/FormContextProvider.mjs';
|
|
10
|
+
import './components/src/components/Action/Action.mjs';
|
|
11
|
+
import 'react/jsx-runtime';
|
|
12
|
+
import 'react-aria';
|
|
13
|
+
import 'react';
|
|
14
|
+
import '@react-aria/live-announcer';
|
|
15
|
+
import 'mobx';
|
|
16
|
+
import './components/src/lib/propsContext/propsContext.mjs';
|
|
17
|
+
import 'remeda';
|
|
18
|
+
import '@react-aria/utils';
|
|
19
|
+
import 'dot-prop';
|
|
20
|
+
import './components/src/lib/controller/overlay/context.mjs';
|
|
21
|
+
import 'invariant';
|
|
22
|
+
import './components/src/components/Action/context.mjs';
|
|
23
|
+
import './components/src/components/Action/models/ActionStateContext.mjs';
|
|
10
24
|
export { FormAction } from './components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs';
|
|
11
25
|
export { flags } from './components/src/integrations/react-hook-form/flags.mjs';
|
|
12
26
|
//# sourceMappingURL=react-hook-form.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-hook-form.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"react-hook-form.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/types/integrations/react-hook-form/components/FormContextProvider/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormContextProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mFAAmF,CAAC;AAC5G,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,cAAc,EACd,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/FormContextProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,mFAAmF,CAAC;AAC5G,OAAO,EACL,mBAAmB,EACnB,KAAK,wBAAwB,EAC7B,cAAc,EACd,sBAAsB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,cAAc,uBAAuB,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.742",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "A React implementation of Flow, mittwald’s design system",
|
|
6
6
|
"homepage": "https://mittwald.github.io/flow",
|
|
@@ -57,9 +57,9 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@internationalized/string-compiler": "^3.2.6",
|
|
60
|
-
"@mittwald/flow-icons": "0.2.0-alpha.
|
|
60
|
+
"@mittwald/flow-icons": "0.2.0-alpha.742",
|
|
61
61
|
"@mittwald/password-tools-js": "3.0.0-alpha.18",
|
|
62
|
-
"@mittwald/react-tunnel": "0.2.0-alpha.
|
|
62
|
+
"@mittwald/react-tunnel": "0.2.0-alpha.742",
|
|
63
63
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
64
64
|
"@react-aria/form": "^3.1.3",
|
|
65
65
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
"@faker-js/faker": "^10.2.0",
|
|
105
105
|
"@internationalized/date": "^3.10.1",
|
|
106
106
|
"@mittwald/flow-core": "",
|
|
107
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
107
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.742",
|
|
108
108
|
"@mittwald/flow-icons-base": "",
|
|
109
109
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
110
110
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
},
|
|
158
158
|
"peerDependencies": {
|
|
159
159
|
"@internationalized/date": "^3.10.0",
|
|
160
|
-
"@mittwald/flow-icons-pro": "0.2.0-alpha.
|
|
160
|
+
"@mittwald/flow-icons-pro": "0.2.0-alpha.741",
|
|
161
161
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
162
162
|
"next": "*",
|
|
163
163
|
"react": "^19.2.0",
|
|
@@ -178,5 +178,5 @@
|
|
|
178
178
|
"optional": true
|
|
179
179
|
}
|
|
180
180
|
},
|
|
181
|
-
"gitHead": "
|
|
181
|
+
"gitHead": "26c22db55c502bcd5848e20a2f338b78a7dbef32"
|
|
182
182
|
}
|