@mittwald/flow-react-components 0.2.0-alpha.741 → 0.2.0-alpha.743

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.
@@ -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":";;;;;;;;;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;;;;"}
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":";;;;;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;;;;"}
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":";;;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;;;;"}
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,7 @@ 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
+ export { useFormSubmitAction } from './components/src/integrations/react-hook-form/components/FormContextProvider/useFormSubmitAction.mjs';
10
11
  export { FormAction } from './components/src/integrations/react-hook-form/components/FormAction/FormAction.mjs';
11
12
  export { flags } from './components/src/integrations/react-hook-form/flags.mjs';
12
13
  //# 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":";;;;;;;;;"}
@@ -1,3 +1,4 @@
1
1
  export { default } from './FormContextProvider';
2
2
  export { FormContextProvider, type FormContextProviderProps, useFormContext, useOptionalFormContext, } from './FormContextProvider';
3
+ export * from './useFormSubmitAction';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -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"}
@@ -4,7 +4,7 @@ export * from './components/SubmitButton';
4
4
  export { FormSettingsProvider, type FormSettingsProviderProps, type SubmitInterceptor, type SubmitInterceptorContext, } from './components/FormSettingsProvider';
5
5
  export * from './components/ResetButton';
6
6
  export * from './components/FormRootError';
7
- export { useFormContext, useOptionalFormContext, } from './components/FormContextProvider';
7
+ export { useFormContext, useOptionalFormContext, useFormSubmitAction, } from './components/FormContextProvider';
8
8
  export * from './components/FormAction';
9
9
  export { flags } from './flags';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,sBAAsB,GACvB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/react-hook-form/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,OAAO,EACL,oBAAoB,EACpB,KAAK,yBAAyB,EAC9B,KAAK,iBAAiB,EACtB,KAAK,wBAAwB,GAC9B,MAAM,mCAAmC,CAAC;AAC3C,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,kCAAkC,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mittwald/flow-react-components",
3
- "version": "0.2.0-alpha.741",
3
+ "version": "0.2.0-alpha.743",
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.741",
60
+ "@mittwald/flow-icons": "0.2.0-alpha.743",
61
61
  "@mittwald/password-tools-js": "3.0.0-alpha.18",
62
- "@mittwald/react-tunnel": "0.2.0-alpha.741",
62
+ "@mittwald/react-tunnel": "0.2.0-alpha.743",
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.741",
107
+ "@mittwald/flow-design-tokens": "0.2.0-alpha.743",
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.740",
160
+ "@mittwald/flow-icons-pro": "0.2.0-alpha.742",
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": "829d42cd2c9141a84d8b4268fd9fbe8f2b8f2183"
181
+ "gitHead": "9f333c31c55e11c2481b7ae1082d58f420f47941"
182
182
  }