@mittwald/flow-react-components 0.2.0-alpha.542 → 0.2.0-alpha.544
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 +10 -0
- package/dist/assets/doc-properties.json +22853 -22853
- package/dist/js/components/src/components/Modal/Modal.mjs +2 -1
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +7 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs +9 -34
- package/dist/js/components/src/integrations/react-hook-form/components/Form/Form.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs.map +1 -1
- package/dist/js/components/src/lib/react/ReactAriaControlledValueFix.mjs +27 -6
- package/dist/js/components/src/lib/react/ReactAriaControlledValueFix.mjs.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Field/Field.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/context/formContext.d.ts +2 -1
- package/dist/types/integrations/react-hook-form/components/context/formContext.d.ts.map +1 -1
- package/dist/types/lib/react/ReactAriaControlledValueFix.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -54,7 +54,8 @@ const Modal = flowComponent(
|
|
|
54
54
|
const nestedHeadingLevel = 3;
|
|
55
55
|
const nestedHeadingProps = {
|
|
56
56
|
Heading: { level: nestedHeadingLevel },
|
|
57
|
-
Section: { Heading: { level: nestedHeadingLevel } }
|
|
57
|
+
Section: { Heading: { level: nestedHeadingLevel } },
|
|
58
|
+
Header: { Heading: { level: nestedHeadingLevel } }
|
|
58
59
|
};
|
|
59
60
|
const propsContext = {
|
|
60
61
|
Content: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { Suspense, type PropsWithChildren, type ReactNode } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport type { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport Wrap from \"@/components/Wrap\";\n\nexport interface ModalProps\n extends PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n}\n\nexport const Modal = flowComponent(\n \"Modal\",\n (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n ...rest\n } = props;\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n className,\n );\n\n const header = (children: ReactNode) => (\n <>\n {children}\n <Action closeOverlay=\"Modal\">\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n onPress={controller?.close}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, color: \"neutral\" },\n },\n Heading: {\n className: styles.header,\n level: 2,\n slot: \"title\",\n children: dynamic((props) => header(props.children)),\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n </Overlay>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,GAAA;AAAA,MACP,SAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAA;AAAA,MACA,oBAAA,GAAuB,OAAA;AAAA,MACvB,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,MACpB,SAAA,GAAY,MAAA,CAAO,SAAA,GAAY,MAAA,CAAO,KAAA;AAAA,MACtC,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,MACrB,oBAAA,KAAyB,MAAA,IAAU,MAAA,CAAO,MAAM,CAAA;AAAA,MAChD;AAAA,KACF;AAEA,IAAA,MAAM,MAAA,GAAS,CAACA,SAAAA,qBACd,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAAA,SAAAA;AAAA,sBACD,GAAA,CAAC,MAAA,EAAA,EAAO,YAAA,EAAa,OAAA,EACnB,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,OAAA;AAAA,UACR,KAAA,EAAM,WAAA;AAAA,UACN,SAAS,UAAA,EAAY,KAAA;AAAA,UAErB,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA,OACb,EACF;AAAA,KAAA,EACF,CAAA;AAGF,IAAA,MAAM,kBAAA,GAAqB,CAAA;AAE3B,IAAA,MAAM,kBAAA,GAAmC;AAAA,MACvC,OAAA,EAAS,EAAE,KAAA,EAAO,kBAAA,EAAmB;AAAA,MACrC,SAAS,EAAE,OAAA,EAAS,EAAE,KAAA,EAAO,oBAAmB;AAAE,
|
|
1
|
+
{"version":3,"file":"Modal.mjs","sources":["../../../../../../src/components/Modal/Modal.tsx"],"sourcesContent":["import { Suspense, type PropsWithChildren, type ReactNode } from \"react\";\nimport styles from \"./Modal.module.scss\";\nimport clsx from \"clsx\";\nimport {\n dynamic,\n type PropsContext,\n PropsContextProvider,\n} from \"@/lib/propsContext\";\nimport type { OverlayController } from \"@/lib/controller/overlay\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { Overlay } from \"@/components/Overlay/Overlay\";\nimport { Action } from \"@/components/Action\";\nimport { IconClose } from \"@/components/Icon/components/icons\";\nimport type { PropsWithClassName } from \"@/lib/types/props\";\nimport ButtonView from \"@/views/ButtonView\";\nimport { OffCanvasSuspenseFallback } from \"@/components/Modal/components/OffCanvasSuspenseFallback\";\nimport Wrap from \"@/components/Wrap\";\n\nexport interface ModalProps\n extends PropsWithChildren,\n FlowComponentProps,\n PropsWithClassName {\n /** The size of the modal. @default \"s\" */\n size?: \"s\" | \"m\" | \"l\";\n /** Whether the modal should be displayed as an off canvas. */\n offCanvas?: boolean;\n /**\n * Whether the off canvas should be displayed on the right or left side of the\n * screen. @default \"right\"\n */\n offCanvasOrientation?: \"left\" | \"right\";\n /** An overlay controller to control the modal state. */\n controller?: OverlayController;\n /**\n * Accepts \"actionConfirm\" to use the modal as a confirmation modal for an\n * action.\n */\n slot?: string;\n /** Whether the modal can be closed by clicking outside of it. */\n isDismissable?: boolean;\n}\n\nexport const Modal = flowComponent(\n \"Modal\",\n (props) => {\n const {\n size = \"s\",\n offCanvas,\n controller,\n children,\n ref,\n className,\n offCanvasOrientation = \"right\",\n ...rest\n } = props;\n\n const rootClassName = clsx(\n offCanvas ? styles.offCanvas : styles.modal,\n styles[`size-${size}`],\n offCanvasOrientation === \"left\" && styles[\"left\"],\n className,\n );\n\n const header = (children: ReactNode) => (\n <>\n {children}\n <Action closeOverlay=\"Modal\">\n <ButtonView\n variant=\"plain\"\n color=\"secondary\"\n onPress={controller?.close}\n >\n <IconClose />\n </ButtonView>\n </Action>\n </>\n );\n\n const nestedHeadingLevel = 3;\n\n const nestedHeadingProps: PropsContext = {\n Heading: { level: nestedHeadingLevel },\n Section: { Heading: { level: nestedHeadingLevel } },\n Header: { Heading: { level: nestedHeadingLevel } },\n };\n\n const propsContext: PropsContext = {\n Content: {\n ...nestedHeadingProps,\n className: styles.content,\n },\n ColumnLayout: {\n ...nestedHeadingProps,\n l: [2, 1],\n m: [1],\n className: styles.columnLayout,\n AccentBox: { className: styles.accentBox, color: \"neutral\" },\n },\n Heading: {\n className: styles.header,\n level: 2,\n slot: \"title\",\n children: dynamic((props) => header(props.children)),\n },\n ActionGroup: {\n className: styles.actionGroup,\n spacing: \"m\",\n },\n };\n\n return (\n <Overlay\n className={rootClassName}\n controller={controller}\n ref={ref}\n {...rest}\n >\n <PropsContextProvider props={propsContext}>\n <Wrap if={offCanvas}>\n <Suspense fallback={<OffCanvasSuspenseFallback />}>\n {children}\n </Suspense>\n </Wrap>\n </PropsContextProvider>\n </Overlay>\n );\n },\n {\n type: \"provider\",\n },\n);\n\nexport default Modal;\n"],"names":["children","props"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2CO,MAAM,KAAA,GAAQ,aAAA;AAAA,EACnB,OAAA;AAAA,EACA,CAAC,KAAA,KAAU;AACT,IAAA,MAAM;AAAA,MACJ,IAAA,GAAO,GAAA;AAAA,MACP,SAAA;AAAA,MACA,UAAA;AAAA,MACA,QAAA;AAAA,MACA,GAAA;AAAA,MACA,SAAA;AAAA,MACA,oBAAA,GAAuB,OAAA;AAAA,MACvB,GAAG;AAAA,KACL,GAAI,KAAA;AAEJ,IAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,MACpB,SAAA,GAAY,MAAA,CAAO,SAAA,GAAY,MAAA,CAAO,KAAA;AAAA,MACtC,MAAA,CAAO,CAAA,KAAA,EAAQ,IAAI,CAAA,CAAE,CAAA;AAAA,MACrB,oBAAA,KAAyB,MAAA,IAAU,MAAA,CAAO,MAAM,CAAA;AAAA,MAChD;AAAA,KACF;AAEA,IAAA,MAAM,MAAA,GAAS,CAACA,SAAAA,qBACd,IAAA,CAAA,QAAA,EAAA,EACG,QAAA,EAAA;AAAA,MAAAA,SAAAA;AAAA,sBACD,GAAA,CAAC,MAAA,EAAA,EAAO,YAAA,EAAa,OAAA,EACnB,QAAA,kBAAA,GAAA;AAAA,QAAC,UAAA;AAAA,QAAA;AAAA,UACC,OAAA,EAAQ,OAAA;AAAA,UACR,KAAA,EAAM,WAAA;AAAA,UACN,SAAS,UAAA,EAAY,KAAA;AAAA,UAErB,8BAAC,SAAA,EAAA,EAAU;AAAA;AAAA,OACb,EACF;AAAA,KAAA,EACF,CAAA;AAGF,IAAA,MAAM,kBAAA,GAAqB,CAAA;AAE3B,IAAA,MAAM,kBAAA,GAAmC;AAAA,MACvC,OAAA,EAAS,EAAE,KAAA,EAAO,k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AAA;AAAA,KACF;AAAA,EAEJ,CAAA;AAAA,EACA;AAAA,IACE,IAAA,EAAM;AAAA;AAEV;;;;"}
|
|
@@ -46,6 +46,7 @@ function Field(props) {
|
|
|
46
46
|
name,
|
|
47
47
|
form: formContext.id,
|
|
48
48
|
isRequired: !!rest.rules?.required,
|
|
49
|
+
isReadOnly: formContext.isReadOnly,
|
|
49
50
|
validationBehavior: "aria",
|
|
50
51
|
defaultValue,
|
|
51
52
|
isInvalid: isFieldInvalid,
|
|
@@ -100,7 +101,12 @@ function Field(props) {
|
|
|
100
101
|
PropsContextProvider,
|
|
101
102
|
{
|
|
102
103
|
props: propsContext,
|
|
103
|
-
dependencies: [
|
|
104
|
+
dependencies: [
|
|
105
|
+
controller.fieldState,
|
|
106
|
+
controller.field,
|
|
107
|
+
value,
|
|
108
|
+
formContext.isReadOnly
|
|
109
|
+
],
|
|
104
110
|
children
|
|
105
111
|
}
|
|
106
112
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport { dynamic, type PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { inheritProps } from \"@/lib/propsContext/inherit/types\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...inheritProps,\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[controller.fieldState
|
|
1
|
+
{"version":3,"file":"Field.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"sourcesContent":["import { useFormContext } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport { dynamic, type PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { type PropsWithChildren } from \"react\";\nimport {\n type ControllerProps,\n type FieldValues,\n useController,\n type UseFormReturn,\n useWatch,\n} from \"react-hook-form\";\nimport { useLocalizedStringFormatter } from \"react-aria\";\nimport locales from \"./locales/*.locale.json\";\nimport { inheritProps } from \"@/lib/propsContext/inherit/types\";\nimport FieldErrorView from \"@/views/FieldErrorView\";\n\nexport interface FieldProps<T extends FieldValues>\n extends Omit<ControllerProps<T>, \"render\">,\n PropsWithChildren {}\n\nexport function Field<T extends FieldValues>(props: FieldProps<T>) {\n const { children, name, defaultValue, ...rest } = props;\n\n const stringFormatter = useLocalizedStringFormatter(locales);\n\n const controller = useController({\n ...props,\n rules: {\n ...props.rules,\n minLength:\n typeof rest.rules?.minLength === \"number\"\n ? {\n value: rest.rules.minLength,\n message: stringFormatter.format(\"minLength\", {\n number: rest.rules.minLength,\n }),\n }\n : rest.rules?.minLength,\n maxLength:\n typeof rest.rules?.maxLength === \"number\"\n ? {\n value: rest.rules.maxLength,\n message: stringFormatter.format(\"maxLength\", {\n number: rest.rules.maxLength,\n }),\n }\n : rest.rules?.maxLength,\n },\n });\n const formContext = useFormContext<T>();\n /**\n * We don't use controller.field.value here, because it doesn't update when\n * the form value is updated outside of this field (e.g. when setting values\n * with form.setValue or resetting the form), and the Field unmounts in\n * between. This is generally a feature of React Hook Form, but this breaks\n * dynamic forms where fields are conditionally rendered.\n *\n * By using formContext.form.watch(name), we ensure that the field value is\n * always in sync with the form state. See:\n * https://react-hook-form.com/api/usecontroller/controller/\n */\n const value =\n useWatch({\n control: formContext.form.control,\n name,\n }) ?? controller.field.value;\n\n const isFieldInvalid = controller.fieldState.invalid;\n\n const fieldProps = {\n ...inheritProps,\n ...controller.field,\n value,\n name,\n form: formContext.id,\n isRequired: !!rest.rules?.required,\n isReadOnly: formContext.isReadOnly,\n validationBehavior: \"aria\" as const,\n defaultValue,\n isInvalid: isFieldInvalid,\n children: dynamic((p) => {\n return (\n <>\n {p.children}\n <FieldErrorView>\n {controller.fieldState.error?.message}\n </FieldErrorView>\n </>\n );\n }),\n };\n\n const { value: ignoredValue, ...fieldPropsWithoutValue } = fieldProps;\n\n const propsContext: PropsContext = {\n SearchField: fieldProps,\n TextField: fieldProps,\n TextArea: fieldProps,\n MarkdownEditor: fieldProps,\n Checkbox: {\n ...fieldProps,\n isSelected: value,\n },\n CheckboxGroup: {\n ...fieldProps,\n },\n CheckboxButton: {\n ...fieldProps,\n isSelected: value,\n },\n FileField: fieldProps,\n FileDropZone: fieldProps,\n NumberField: fieldProps,\n RadioGroup: fieldProps,\n Switch: {\n ...fieldProps,\n isSelected: value,\n },\n Slider: fieldProps,\n PasswordCreationField: fieldProps,\n DatePicker: fieldProps,\n DateRangePicker: fieldProps,\n TimeField: fieldProps,\n SegmentedControl: fieldProps,\n Select: {\n ...fieldProps,\n selectedKey: value,\n },\n ComboBox: {\n ...fieldPropsWithoutValue,\n selectedKey: value,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[\n controller.fieldState,\n controller.field,\n value,\n formContext.isReadOnly,\n ]}\n >\n {children}\n </PropsContextProvider>\n );\n}\n\nexport const typedField = <T extends FieldValues>(\n ignoredForm: UseFormReturn<T> | UseFormReturn<T>[\"control\"],\n): typeof Field<T> => Field;\n\nexport default Field;\n"],"names":[],"mappings":";;;;;;;;;;;;AAoBO,SAAS,MAA6B,KAAA,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;AAAA,IACjB,SAAA,EAAW,UAAA;AAAA,IACX,gBAAA,EAAkB,UAAA;AAAA,IAClB,MAAA,EAAQ;AAAA,MACN,GAAG,UAAA;AAAA,MACH,WAAA,EAAa;AAAA,KACf;AAAA,IACA,QAAA,EAAU;AAAA,MACR,GAAG,sBAAA;AAAA,MACH,WAAA,EAAa;AAAA;AACf,GACF;AAEA,EAAA,uBACE,GAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO,YAAA;AAAA,MACP,YAAA,EAAc;AAAA,QACZ,UAAA,CAAW,UAAA;AAAA,QACX,UAAA,CAAW,KAAA;AAAA,QACX,KAAA;AAAA,QACA,WAAA,CAAY;AAAA,OACd;AAAA,MAEC;AAAA;AAAA,GACH;AAEJ;AAEO,MAAM,UAAA,GAAa,CACxB,WAAA,KACoB;;;;"}
|
|
@@ -4,13 +4,10 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { FormContextProvider } from '../context/formContext.mjs';
|
|
5
5
|
import { useState, useId, useMemo } from 'react';
|
|
6
6
|
import { FormProvider } from 'react-hook-form';
|
|
7
|
-
import '../../../../lib/propsContext/propsContext.mjs';
|
|
8
|
-
import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
7
|
import { Action } from '../../../../components/Action/Action.mjs';
|
|
10
8
|
import 'react-aria';
|
|
11
9
|
import '@react-aria/live-announcer';
|
|
12
10
|
import { useRegisterActionStateContext } from './lib/useRegisterActionStateContext.mjs';
|
|
13
|
-
import { inheritProps } from '../../../../lib/propsContext/inherit/types.mjs';
|
|
14
11
|
|
|
15
12
|
const DefaultFormComponent = (p) => /* @__PURE__ */ jsx("form", { ...p });
|
|
16
13
|
function Form(props) {
|
|
@@ -22,7 +19,7 @@ function Form(props) {
|
|
|
22
19
|
isReadOnly: isReadOnlyFromProps,
|
|
23
20
|
...formProps
|
|
24
21
|
} = props;
|
|
25
|
-
const [readonlyContextState,
|
|
22
|
+
const [readonlyContextState, setReadOnlyContextState] = useState(!!isReadOnlyFromProps);
|
|
26
23
|
const isReadOnly = isReadOnlyFromProps || readonlyContextState;
|
|
27
24
|
const formId = useId();
|
|
28
25
|
const FormViewComponent = useMemo(() => FormView, [formId]);
|
|
@@ -41,37 +38,15 @@ function Form(props) {
|
|
|
41
38
|
return result;
|
|
42
39
|
})(formEvent);
|
|
43
40
|
};
|
|
44
|
-
|
|
45
|
-
...inheritProps,
|
|
46
|
-
isReadOnly
|
|
47
|
-
};
|
|
48
|
-
const propsContext = {
|
|
49
|
-
SearchField: readonlyPropsContext,
|
|
50
|
-
TextField: readonlyPropsContext,
|
|
51
|
-
TextArea: readonlyPropsContext,
|
|
52
|
-
MarkdownEditor: readonlyPropsContext,
|
|
53
|
-
Checkbox: readonlyPropsContext,
|
|
54
|
-
CheckboxGroup: readonlyPropsContext,
|
|
55
|
-
CheckboxButton: readonlyPropsContext,
|
|
56
|
-
FileField: readonlyPropsContext,
|
|
57
|
-
FileDropZone: readonlyPropsContext,
|
|
58
|
-
NumberField: readonlyPropsContext,
|
|
59
|
-
RadioGroup: readonlyPropsContext,
|
|
60
|
-
Switch: readonlyPropsContext,
|
|
61
|
-
Slider: readonlyPropsContext,
|
|
62
|
-
PasswordCreationField: readonlyPropsContext,
|
|
63
|
-
DatePicker: readonlyPropsContext,
|
|
64
|
-
DateRangePicker: readonlyPropsContext,
|
|
65
|
-
TimeField: readonlyPropsContext,
|
|
66
|
-
SegmentedControl: readonlyPropsContext,
|
|
67
|
-
Select: readonlyPropsContext,
|
|
68
|
-
ComboBox: readonlyPropsContext,
|
|
69
|
-
Button: readonlyPropsContext
|
|
70
|
-
};
|
|
71
|
-
return /* @__PURE__ */ jsx(PropsContextProvider, { props: propsContext, dependencies: [isReadOnly], children: /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(
|
|
41
|
+
return /* @__PURE__ */ jsx(FormProvider, { ...form, children: /* @__PURE__ */ jsx(
|
|
72
42
|
FormContextProvider,
|
|
73
43
|
{
|
|
74
|
-
value: {
|
|
44
|
+
value: {
|
|
45
|
+
form,
|
|
46
|
+
id: formId,
|
|
47
|
+
isReadOnly,
|
|
48
|
+
setReadOnly: setReadOnlyContextState
|
|
49
|
+
},
|
|
75
50
|
children: /* @__PURE__ */ jsx(Action, { actionModel: action, children: /* @__PURE__ */ jsx(
|
|
76
51
|
FormViewComponent,
|
|
77
52
|
{
|
|
@@ -82,7 +57,7 @@ function Form(props) {
|
|
|
82
57
|
}
|
|
83
58
|
) })
|
|
84
59
|
}
|
|
85
|
-
) })
|
|
60
|
+
) });
|
|
86
61
|
}
|
|
87
62
|
|
|
88
63
|
export { Form, Form as default };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport {
|
|
1
|
+
{"version":3,"file":"Form.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"sourcesContent":["import { FormContextProvider } from \"@/integrations/react-hook-form/components/context/formContext\";\nimport {\n type ComponentProps,\n type ComponentType,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n useId,\n useMemo,\n useState,\n} from \"react\";\nimport type {\n FieldValues,\n SubmitHandler,\n UseFormReturn,\n} from \"react-hook-form\";\nimport { FormProvider as RhfFormContextProvider } from \"react-hook-form\";\nimport { Action } from \"@/components/Action\";\nimport { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = ComponentType<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n }>\n>;\n\nexport interface FormProps<F extends FieldValues>\n extends Omit<ComponentProps<\"form\">, \"onSubmit\">,\n PropsWithChildren {\n form: UseFormReturn<F>;\n onSubmit: FormOnSubmitHandler<F>;\n formComponent?: FormComponentType;\n isReadOnly?: boolean;\n}\n\nconst DefaultFormComponent: FormComponentType = (p) => <form {...p} />;\n\nexport function Form<F extends FieldValues>(props: FormProps<F>) {\n const {\n form,\n children,\n onSubmit,\n formComponent: FormView = DefaultFormComponent,\n isReadOnly: isReadOnlyFromProps,\n ...formProps\n } = props;\n\n const [readonlyContextState, setReadOnlyContextState] =\n useState(!!isReadOnlyFromProps);\n\n const isReadOnly = isReadOnlyFromProps || readonlyContextState;\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleOnSubmit = (e?: FormEvent<HTMLFormElement> | F) => {\n const { isSubmitting, isValidating } = form.control._formState;\n const formEvent =\n e && \"nativeEvent\" in e ? (e as FormEvent<HTMLFormElement>) : undefined;\n\n formEvent?.stopPropagation();\n\n if (isSubmitting || isValidating) {\n formEvent?.preventDefault();\n return;\n }\n\n form.handleSubmit((values) => {\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n })(formEvent);\n };\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n value={{\n form,\n id: formId,\n isReadOnly,\n setReadOnly: setReadOnlyContextState,\n }}\n >\n <Action actionModel={action}>\n <FormViewComponent\n {...formProps}\n id={formId}\n onSubmit={handleOnSubmit}\n >\n {children}\n </FormViewComponent>\n </Action>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;;;;AAsCA,MAAM,uBAA0C,CAAC,CAAA,qBAAM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,YAAA,EAAA,EAAwB,GAAG,IAAA,EAC1B,QAAA,kBAAA,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAO;AAAA,QACL,IAAA;AAAA,QACA,EAAA,EAAI,MAAA;AAAA,QACJ,UAAA;AAAA,QACA,WAAA,EAAa;AAAA,OACf;AAAA,MAEA,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,WAAA,EAAa,MAAA,EACnB,QAAA,kBAAA,GAAA;AAAA,QAAC,iBAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,EAAA,EAAI,MAAA;AAAA,UACJ,QAAA,EAAU,cAAA;AAAA,UAET;AAAA;AAAA,OACH,EACF;AAAA;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
package/dist/js/components/src/integrations/react-hook-form/components/context/formContext.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formContext.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"sourcesContent":["import type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport { createContext, useContext, type Dispatch } from \"react\";\nimport invariant from \"invariant\";\n\ninterface FormContext<F extends FieldValues> {\n form: UseFormReturn<F>;\n id: string;\n
|
|
1
|
+
{"version":3,"file":"formContext.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"sourcesContent":["import type { FieldValues, UseFormReturn } from \"react-hook-form\";\nimport { createContext, useContext, type Dispatch } from \"react\";\nimport invariant from \"invariant\";\n\ninterface FormContext<F extends FieldValues> {\n form: UseFormReturn<F>;\n id: string;\n isReadOnly: boolean;\n setReadOnly: Dispatch<React.SetStateAction<boolean>>;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyFormContext = FormContext<any>;\n\nexport const formContext = createContext<AnyFormContext | undefined>(undefined);\n\nexport const FormContextProvider = formContext.Provider;\n\nexport const useFormContext = <F extends FieldValues>(): FormContext<F> => {\n const ctx = useContext(formContext);\n invariant(\n !!ctx,\n \"Could not useFormContext() outside a Form, or multiple versions of Flow installed.\",\n );\n return ctx;\n};\n\nexport const useOptionalFormContext = <F extends FieldValues>() =>\n useContext(formContext) as FormContext<F> | undefined;\n"],"names":[],"mappings":";;;AAcO,MAAM,WAAA,GAAc,cAA0C,MAAS;AAEvE,MAAM,sBAAsB,WAAA,CAAY;AAExC,MAAM,iBAAiB,MAA6C;AACzE,EAAA,MAAM,GAAA,GAAM,WAAW,WAAW,CAAA;AAClC,EAAA,SAAA;AAAA,IACE,CAAC,CAAC,GAAA;AAAA,IACF;AAAA,GACF;AACA,EAAA,OAAO,GAAA;AACT;AAEO,MAAM,sBAAA,GAAyB,MACpC,UAAA,CAAW,WAAW;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import * as Aria from 'react-aria-components';
|
|
5
|
-
import { Children, isValidElement, useLayoutEffect } from 'react';
|
|
5
|
+
import { Children, isValidElement, useRef, useDeferredValue, useLayoutEffect } from 'react';
|
|
6
6
|
import { emitElementValueChange } from './emitElementValueChange.mjs';
|
|
7
7
|
|
|
8
8
|
const ReactAriaControlledValueFix = (props) => {
|
|
@@ -17,13 +17,34 @@ const ReactAriaControlledValueFix = (props) => {
|
|
|
17
17
|
ref,
|
|
18
18
|
context
|
|
19
19
|
);
|
|
20
|
+
const elementRef = contextRef.current;
|
|
21
|
+
const isInFocus = useRef(false);
|
|
22
|
+
const isValidElementType = elementRef && (elementRef instanceof HTMLInputElement || elementRef instanceof HTMLTextAreaElement);
|
|
23
|
+
const deferredValueFromContext = useDeferredValue(String(contextProps.value));
|
|
20
24
|
useLayoutEffect(() => {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const newValue = String(contextProps.value ?? "");
|
|
24
|
-
emitElementValueChange(element, newValue);
|
|
25
|
+
if (!isValidElementType) {
|
|
26
|
+
return;
|
|
25
27
|
}
|
|
26
|
-
|
|
28
|
+
emitElementValueChange(elementRef, deferredValueFromContext);
|
|
29
|
+
const onFocus = (event) => {
|
|
30
|
+
isInFocus.current = !!event?.isTrusted;
|
|
31
|
+
};
|
|
32
|
+
const onBlur = () => {
|
|
33
|
+
isInFocus.current = false;
|
|
34
|
+
};
|
|
35
|
+
elementRef?.addEventListener("focus", onFocus);
|
|
36
|
+
elementRef?.addEventListener("blur", onBlur);
|
|
37
|
+
return () => {
|
|
38
|
+
elementRef?.removeEventListener("focus", onFocus);
|
|
39
|
+
elementRef?.removeEventListener("blur", onBlur);
|
|
40
|
+
};
|
|
41
|
+
}, [elementRef]);
|
|
42
|
+
useLayoutEffect(() => {
|
|
43
|
+
if (!isValidElementType || isInFocus.current) {
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
emitElementValueChange(elementRef, deferredValueFromContext);
|
|
47
|
+
}, [deferredValueFromContext]);
|
|
27
48
|
const uncontrolledContextProps = {
|
|
28
49
|
...contextProps,
|
|
29
50
|
value: void 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactAriaControlledValueFix.mjs","sources":["../../../../../../src/lib/react/ReactAriaControlledValueFix.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport {\n Children,\n isValidElement,\n type Context,\n type FC,\n type ForwardedRef,\n type PropsWithChildren,\n useLayoutEffect,\n} from \"react\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\n\nexport interface ReactAriaControlledValueFixProps extends PropsWithChildren {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputContext: Context<any>;\n props: unknown;\n}\n\ninterface ChildProps {\n [key: string]: unknown;\n ref: ForwardedRef<Element>;\n}\n\n/**\n * React Aria (accidentally?!) enforces controlled inputs by always setting the\n * value prop on Inputs and TextAreas with its context props API. This component\n * also uses this API to only unset the value prop. Furthermore setting an input\n * value is finally done by directly on the DOM element.\n *\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/textfield/src/useTextField.ts#L182\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/numberfield/src/useNumberField.ts#L206\n */\nexport const ReactAriaControlledValueFix: FC<\n ReactAriaControlledValueFixProps\n> = (props) => {\n const { inputContext: context, children } = props;\n\n const child = Children.only(children);\n if (!isValidElement<ChildProps>(child)) {\n throw new Error(\"Expected valid element\");\n }\n\n const { ref, ...inputProps } = child.props;\n const [contextProps, contextRef] = Aria.useContextProps(\n inputProps,\n ref,\n context,\n );\n\n
|
|
1
|
+
{"version":3,"file":"ReactAriaControlledValueFix.mjs","sources":["../../../../../../src/lib/react/ReactAriaControlledValueFix.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport {\n Children,\n isValidElement,\n type Context,\n type FC,\n type ForwardedRef,\n type PropsWithChildren,\n useDeferredValue,\n useLayoutEffect,\n useRef,\n} from \"react\";\nimport { emitElementValueChange } from \"@/lib/react/emitElementValueChange\";\n\nexport interface ReactAriaControlledValueFixProps extends PropsWithChildren {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n inputContext: Context<any>;\n props: unknown;\n}\n\ninterface ChildProps {\n [key: string]: unknown;\n ref: ForwardedRef<Element>;\n}\n\n/**\n * React Aria (accidentally?!) enforces controlled inputs by always setting the\n * value prop on Inputs and TextAreas with its context props API. This component\n * also uses this API to only unset the value prop. Furthermore setting an input\n * value is finally done by directly on the DOM element.\n *\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/textfield/src/useTextField.ts#L182\n * https://github.com/adobe/react-spectrum/blob/main/packages/%40react-aria/numberfield/src/useNumberField.ts#L206\n */\nexport const ReactAriaControlledValueFix: FC<\n ReactAriaControlledValueFixProps\n> = (props) => {\n const { inputContext: context, children } = props;\n\n const child = Children.only(children);\n if (!isValidElement<ChildProps>(child)) {\n throw new Error(\"Expected valid element\");\n }\n\n const { ref, ...inputProps } = child.props;\n const [contextProps, contextRef] = Aria.useContextProps(\n inputProps,\n ref,\n context,\n );\n\n const elementRef = contextRef.current;\n const isInFocus = useRef(false);\n\n const isValidElementType =\n elementRef &&\n (elementRef instanceof HTMLInputElement ||\n elementRef instanceof HTMLTextAreaElement);\n\n const deferredValueFromContext = useDeferredValue(String(contextProps.value));\n\n useLayoutEffect(() => {\n if (!isValidElementType) {\n return;\n }\n\n // sync the last known value when element reference is available\n emitElementValueChange(elementRef, deferredValueFromContext);\n\n const onFocus = (event: Event) => {\n isInFocus.current = !!event?.isTrusted;\n };\n const onBlur = () => {\n isInFocus.current = false;\n };\n\n elementRef?.addEventListener(\"focus\", onFocus);\n elementRef?.addEventListener(\"blur\", onBlur);\n\n return () => {\n elementRef?.removeEventListener(\"focus\", onFocus);\n elementRef?.removeEventListener(\"blur\", onBlur);\n };\n }, [elementRef]);\n\n useLayoutEffect(() => {\n if (!isValidElementType || isInFocus.current) {\n return;\n }\n\n emitElementValueChange(elementRef, deferredValueFromContext);\n }, [deferredValueFromContext]);\n\n const uncontrolledContextProps = {\n ...contextProps,\n value: undefined,\n ref: contextRef,\n };\n\n return (\n <Aria.Provider values={[[context, uncontrolledContextProps]]}>\n {child}\n </Aria.Provider>\n );\n};\n"],"names":[],"mappings":";;;;;AAkCO,MAAM,2BAAA,GAET,CAAC,KAAA,KAAU;AACb,EAAA,MAAM,EAAE,YAAA,EAAc,OAAA,EAAS,QAAA,EAAS,GAAI,KAAA;AAE5C,EAAA,MAAM,KAAA,GAAQ,QAAA,CAAS,IAAA,CAAK,QAAQ,CAAA;AACpC,EAAA,IAAI,CAAC,cAAA,CAA2B,KAAK,CAAA,EAAG;AACtC,IAAA,MAAM,IAAI,MAAM,wBAAwB,CAAA;AAAA,EAC1C;AAEA,EAAA,MAAM,EAAE,GAAA,EAAK,GAAG,UAAA,KAAe,KAAA,CAAM,KAAA;AACrC,EAAA,MAAM,CAAC,YAAA,EAAc,UAAU,CAAA,GAAI,IAAA,CAAK,eAAA;AAAA,IACtC,UAAA;AAAA,IACA,GAAA;AAA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AAA,IAC/B,GAAG,YAAA;AAAA,IACH,KAAA,EAAO,MAAA;AAAA,IACP,GAAA,EAAK;AAAA,GACP;AAEA,EAAA,uBACE,GAAA,CAAC,IAAA,CAAK,QAAA,EAAL,EAAc,MAAA,EAAQ,CAAC,CAAC,OAAA,EAAS,wBAAwB,CAAC,CAAA,EACxD,QAAA,EAAA,KAAA,EACH,CAAA;AAEJ;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,iBAAiB,EAAkB,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,kBAAkB;IACpB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,wDAAwD;IACxD,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,KAAK,+
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,iBAAiB,EAAkB,MAAM,OAAO,CAAC;AAQzE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAK/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,kBAAkB;IACpB,0CAA0C;IAC1C,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACxC,wDAAwD;IACxD,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,KAAK,+FAwFjB,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Field/Field.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,WAAW,EAEhB,KAAK,aAAa,EAEnB,MAAM,iBAAiB,CAAC;AAMzB,MAAM,WAAW,UAAU,CAAC,CAAC,SAAS,WAAW,CAC/C,SAAQ,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,QAAQ,CAAC,EACxC,iBAAiB;CAAG;AAExB,wBAAgB,KAAK,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAAC,CAAC,2CA+HhE;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,EAC9C,aAAa,aAAa,CAAC,CAAC,CAAC,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,KAC1D,OAAO,KAAK,CAAC,CAAC,CAAU,CAAC;AAE5B,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"Form.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/Form/Form.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,gBAAgB,EACrB,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,WAAW,EACX,aAAa,EACb,aAAa,EACd,MAAM,iBAAiB,CAAC;AAKzB,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,WAAW,IAAI,aAAa,CAAC,CAAC,CAAC,CAAC;AAE1E,KAAK,iBAAiB,GAAG,aAAa,CACpC,iBAAiB,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,gBAAgB,GAAG,mBAAmB,CAAC,KAAK,CAAC,CAAC;CAC1D,CAAC,CACH,CAAC;AAEF,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,WAAW,CAC9C,SAAQ,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,EAC9C,iBAAiB;IACnB,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,QAAQ,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;IACjC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAID,wBAAgB,IAAI,CAAC,CAAC,SAAS,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,2CA4D9D;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -3,7 +3,8 @@ import { Dispatch } from 'react';
|
|
|
3
3
|
interface FormContext<F extends FieldValues> {
|
|
4
4
|
form: UseFormReturn<F>;
|
|
5
5
|
id: string;
|
|
6
|
-
|
|
6
|
+
isReadOnly: boolean;
|
|
7
|
+
setReadOnly: Dispatch<React.SetStateAction<boolean>>;
|
|
7
8
|
}
|
|
8
9
|
type AnyFormContext = FormContext<any>;
|
|
9
10
|
export declare const formContext: import('react').Context<AnyFormContext | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formContext.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjE,UAAU,WAAW,CAAC,CAAC,SAAS,WAAW;IACzC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACtD;AAGD,KAAK,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAEvC,eAAO,MAAM,WAAW,qDAAuD,CAAC;AAEhF,eAAO,MAAM,mBAAmB,sDAAuB,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,OAAK,WAAW,CAAC,CAAC,CAOrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,WAAW,OAC/B,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"formContext.d.ts","sourceRoot":"","sources":["../../../../../../src/integrations/react-hook-form/components/context/formContext.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAA6B,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjE,UAAU,WAAW,CAAC,CAAC,SAAS,WAAW;IACzC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;CACtD;AAGD,KAAK,cAAc,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC;AAEvC,eAAO,MAAM,WAAW,qDAAuD,CAAC;AAEhF,eAAO,MAAM,mBAAmB,sDAAuB,CAAC;AAExD,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,WAAW,OAAK,WAAW,CAAC,CAAC,CAOrE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,CAAC,SAAS,WAAW,OAC/B,WAAW,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactAriaControlledValueFix.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/ReactAriaControlledValueFix.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,EAAE,EAEP,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"ReactAriaControlledValueFix.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/ReactAriaControlledValueFix.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,OAAO,EACZ,KAAK,EAAE,EAEP,KAAK,iBAAiB,EAIvB,MAAM,OAAO,CAAC;AAGf,MAAM,WAAW,gCAAiC,SAAQ,iBAAiB;IAEzE,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;CAChB;AAOD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,EAAE,EAAE,CAC1C,gCAAgC,CAqEjC,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.544",
|
|
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.544",
|
|
62
62
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
63
63
|
"@react-aria/form": "^3.1.2",
|
|
64
64
|
"@react-aria/live-announcer": "^3.4.4",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@faker-js/faker": "^10.1.0",
|
|
102
102
|
"@internationalized/date": "^3.10.0",
|
|
103
103
|
"@mittwald/flow-core": "",
|
|
104
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
104
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.544",
|
|
105
105
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
106
106
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
107
107
|
"@mittwald/typescript-config": "",
|
|
@@ -174,5 +174,5 @@
|
|
|
174
174
|
"optional": true
|
|
175
175
|
}
|
|
176
176
|
},
|
|
177
|
-
"gitHead": "
|
|
177
|
+
"gitHead": "ba0ba069b66a7d8adc981b36c8b0e383b7fa2189"
|
|
178
178
|
}
|