@mittwald/flow-react-components 0.2.0-alpha.566 → 0.2.0-alpha.568
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 +2234 -1009
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs +62 -50
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs +1 -0
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/components/src/components/Checkbox/Checkbox.mjs +4 -11
- package/dist/js/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/js/components/src/components/CheckboxButton/CheckboxButton.mjs +2 -19
- package/dist/js/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs +3 -3
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/components/src/components/ComboBox/ComboBox.mjs +11 -37
- package/dist/js/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
- package/dist/js/components/src/components/DateInput/DateInput.mjs +20 -0
- package/dist/js/components/src/components/DateInput/DateInput.mjs.map +1 -0
- package/dist/js/components/src/components/DatePicker/DatePicker.mjs +1 -6
- package/dist/js/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
- package/dist/js/components/src/components/DatePicker/components/DateInput/DateInput.mjs +3 -2
- package/dist/js/components/src/components/DatePicker/components/DateInput/DateInput.mjs.map +1 -1
- package/dist/js/components/src/components/DateRangePicker/DateRangePicker.mjs +1 -6
- package/dist/js/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
- package/dist/js/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs +4 -3
- package/dist/js/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.mjs.map +1 -1
- package/dist/js/components/src/components/FileField/FileField.mjs +4 -10
- package/dist/js/components/src/components/FileField/FileField.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +1 -0
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +1 -0
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs.map +1 -1
- package/dist/js/components/src/components/Markdown/Markdown.mjs.map +1 -1
- package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs +19 -24
- package/dist/js/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
- package/dist/js/components/src/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax.mjs +2 -2
- package/dist/js/components/src/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax.mjs.map +1 -1
- package/dist/js/components/src/components/MarkdownEditor/lib/modifyValueByType.mjs +1 -1
- package/dist/js/components/src/components/MarkdownEditor/lib/modifyValueByType.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs +1 -0
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/NumberField/NumberField.mjs +4 -22
- package/dist/js/components/src/components/NumberField/NumberField.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/Overlay.mjs +1 -0
- package/dist/js/components/src/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs +1 -0
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs +8 -15
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/components/src/components/Popover/Popover.mjs +1 -2
- package/dist/js/components/src/components/Popover/Popover.mjs.map +1 -1
- package/dist/js/components/src/components/SearchField/SearchField.mjs +6 -13
- package/dist/js/components/src/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/components/src/components/SegmentedControl/SegmentedControl.mjs +3 -3
- package/dist/js/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/js/components/src/components/Select/Select.mjs +5 -16
- package/dist/js/components/src/components/Select/Select.mjs.map +1 -1
- package/dist/js/components/src/components/Slider/Slider.mjs +2 -9
- package/dist/js/components/src/components/Slider/Slider.mjs.map +1 -1
- package/dist/js/components/src/components/Switch/Switch.mjs +6 -21
- package/dist/js/components/src/components/Switch/Switch.mjs.map +1 -1
- package/dist/js/components/src/components/TextArea/TextArea.mjs +13 -20
- package/dist/js/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/components/src/components/TextField/TextField.mjs +4 -11
- package/dist/js/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/components/src/components/TextFieldBase/TextFieldBase.mjs +9 -23
- package/dist/js/components/src/components/TextFieldBase/TextFieldBase.mjs.map +1 -1
- package/dist/js/components/src/components/TimeField/TimeField.mjs +3 -6
- package/dist/js/components/src/components/TimeField/TimeField.mjs.map +1 -1
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs +1 -0
- package/dist/js/components/src/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/Field/Field.mjs +6 -7
- 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 +4 -6
- 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/ResetButton/ResetButton.mjs +1 -3
- package/dist/js/components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs.map +1 -1
- package/dist/js/components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs +2 -2
- package/dist/js/components/src/lib/controller/overlay/OverlayController.mjs +6 -0
- package/dist/js/components/src/lib/controller/overlay/OverlayController.mjs.map +1 -1
- package/dist/js/components/src/lib/form/isFocused.mjs +8 -0
- package/dist/js/components/src/lib/form/isFocused.mjs.map +1 -0
- package/dist/js/components/src/lib/hooks/useFieldError.mjs +1 -0
- package/dist/js/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/components/src/lib/remote/eventHandlerContext.mjs +9 -0
- package/dist/js/components/src/lib/remote/eventHandlerContext.mjs.map +1 -0
- package/dist/js/components/src/lib/remote/useControlledHostValueProps.mjs +31 -0
- package/dist/js/components/src/lib/remote/useControlledHostValueProps.mjs.map +1 -0
- package/dist/js/components/src/lib/remote/useControlledRemoteValueProps.mjs +20 -0
- package/dist/js/components/src/lib/remote/useControlledRemoteValueProps.mjs.map +1 -0
- package/dist/js/default.mjs +2 -0
- package/dist/js/default.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +1 -0
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/Checkbox/Checkbox.d.ts +3 -4
- package/dist/types/components/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/CheckboxButton/CheckboxButton.d.ts +2 -4
- package/dist/types/components/CheckboxButton/CheckboxButton.d.ts.map +1 -1
- package/dist/types/components/ComboBox/ComboBox.d.ts +3 -6
- package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/types/components/DateInput/DateInput.d.ts +8 -0
- package/dist/types/components/DateInput/DateInput.d.ts.map +1 -0
- package/dist/types/components/DateInput/index.d.ts +3 -0
- package/dist/types/components/DateInput/index.d.ts.map +1 -0
- package/dist/types/components/DatePicker/DatePicker.d.ts +2 -2
- package/dist/types/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/types/components/DatePicker/components/DateInput/DateInput.d.ts +2 -1
- package/dist/types/components/DatePicker/components/DateInput/DateInput.d.ts.map +1 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +2 -2
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/dist/types/components/DateRangePicker/components/DateRangeInput/DateRangeInput.d.ts +2 -1
- package/dist/types/components/DateRangePicker/components/DateRangeInput/DateRangeInput.d.ts.map +1 -1
- package/dist/types/components/FileField/FileField.d.ts +1 -2
- package/dist/types/components/FileField/FileField.d.ts.map +1 -1
- package/dist/types/components/Header/Header.d.ts +1 -1
- package/dist/types/components/List/typedList.d.ts +2 -2
- package/dist/types/components/Markdown/Markdown.d.ts +2 -2
- package/dist/types/components/Markdown/Markdown.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts +3 -7
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax.d.ts +2 -2
- package/dist/types/components/MarkdownEditor/lib/modifyValueByMarkdownSyntax.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/lib/modifyValueByType.d.ts +1 -1
- package/dist/types/components/MarkdownEditor/lib/modifyValueByType.d.ts.map +1 -1
- package/dist/types/components/NumberField/NumberField.d.ts +3 -4
- package/dist/types/components/NumberField/NumberField.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
- package/dist/types/components/Popover/Popover.d.ts +1 -1
- package/dist/types/components/Popover/Popover.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
- package/dist/types/components/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/types/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/components/Select/Select.d.ts +2 -5
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/Slider/Slider.d.ts +3 -3
- package/dist/types/components/Slider/Slider.d.ts.map +1 -1
- package/dist/types/components/Switch/Switch.d.ts +2 -2
- package/dist/types/components/Switch/Switch.d.ts.map +1 -1
- package/dist/types/components/TextArea/TextArea.d.ts.map +1 -1
- package/dist/types/components/TextField/TextField.d.ts.map +1 -1
- package/dist/types/components/TextFieldBase/TextFieldBase.d.ts.map +1 -1
- package/dist/types/components/TimeField/TimeField.d.ts +3 -3
- package/dist/types/components/TimeField/TimeField.d.ts.map +1 -1
- package/dist/types/index/default.d.ts +2 -0
- package/dist/types/index/default.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 +2 -2
- package/dist/types/integrations/react-hook-form/components/Form/Form.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/ResetButton/ResetButton.d.ts +1 -1
- package/dist/types/integrations/react-hook-form/components/ResetButton/ResetButton.d.ts.map +1 -1
- package/dist/types/integrations/react-hook-form/components/SubmitButton/SubmitButton.d.ts +1 -1
- package/dist/types/lib/controller/overlay/OverlayController.d.ts.map +1 -1
- package/dist/types/lib/form/isFocused.d.ts +2 -0
- package/dist/types/lib/form/isFocused.d.ts.map +1 -0
- package/dist/types/lib/remote/eventHandlerContext.d.ts +11 -0
- package/dist/types/lib/remote/eventHandlerContext.d.ts.map +1 -0
- package/dist/types/lib/remote/types.d.ts +6 -0
- package/dist/types/lib/remote/types.d.ts.map +1 -0
- package/dist/types/lib/remote/useControlledHostValueProps.d.ts +18 -0
- package/dist/types/lib/remote/useControlledHostValueProps.d.ts.map +1 -0
- package/dist/types/lib/remote/useControlledRemoteValueProps.d.ts +11 -0
- package/dist/types/lib/remote/useControlledRemoteValueProps.d.ts.map +1 -0
- package/package.json +5 -4
- package/dist/js/components/src/lib/hooks/useManagedValue.mjs +0 -27
- package/dist/js/components/src/lib/hooks/useManagedValue.mjs.map +0 -1
- package/dist/js/components/src/lib/react/ReactAriaControlledValueFix.mjs +0 -65
- package/dist/js/components/src/lib/react/ReactAriaControlledValueFix.mjs.map +0 -1
- package/dist/js/components/src/lib/react/emitElementValueChange.mjs +0 -22
- package/dist/js/components/src/lib/react/emitElementValueChange.mjs.map +0 -1
- package/dist/types/lib/hooks/useManagedValue.d.ts +0 -13
- package/dist/types/lib/hooks/useManagedValue.d.ts.map +0 -1
- package/dist/types/lib/react/ReactAriaControlledValueFix.d.ts +0 -16
- package/dist/types/lib/react/ReactAriaControlledValueFix.d.ts.map +0 -1
- package/dist/types/lib/react/ReactAriaControlledValueFix.test.d.ts +0 -2
- package/dist/types/lib/react/ReactAriaControlledValueFix.test.d.ts.map +0 -1
- package/dist/types/lib/react/emitElementValueChange.d.ts +0 -6
- package/dist/types/lib/react/emitElementValueChange.d.ts.map +0 -1
|
@@ -4,7 +4,6 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { FormContextProvider } from '../context/formContext.mjs';
|
|
5
5
|
import { useState, useId, useMemo, useRef } from 'react';
|
|
6
6
|
import { FormProvider } from 'react-hook-form';
|
|
7
|
-
import { useObjectRef } from '@react-aria/utils';
|
|
8
7
|
import { useRegisterActionStateContext } from './lib/useRegisterActionStateContext.mjs';
|
|
9
8
|
|
|
10
9
|
const DefaultFormComponent = (p) => /* @__PURE__ */ jsx("form", { ...p });
|
|
@@ -21,11 +20,10 @@ function Form(props) {
|
|
|
21
20
|
const [readonlyContextState, setReadOnlyContextState] = useState(!!isReadOnlyFromProps);
|
|
22
21
|
const formId = useId();
|
|
23
22
|
const FormViewComponent = useMemo(() => FormView, [formId]);
|
|
24
|
-
const formRef = useObjectRef(ref);
|
|
25
23
|
const submitButtonRef = useRef(null);
|
|
26
24
|
const isReadOnly = isReadOnlyFromProps || readonlyContextState;
|
|
27
25
|
const { action, registerSubmitResult } = useRegisterActionStateContext(form);
|
|
28
|
-
const
|
|
26
|
+
const handleSubmit = (e) => {
|
|
29
27
|
const { isSubmitting, isValidating } = form.control._formState;
|
|
30
28
|
const formEvent = e && "nativeEvent" in e ? e : void 0;
|
|
31
29
|
formEvent?.stopPropagation();
|
|
@@ -51,7 +49,7 @@ function Form(props) {
|
|
|
51
49
|
id: formId,
|
|
52
50
|
isReadOnly,
|
|
53
51
|
setReadOnly: setReadOnlyContextState,
|
|
54
|
-
submit:
|
|
52
|
+
submit: handleSubmit,
|
|
55
53
|
submitButtonRef,
|
|
56
54
|
formActionModel: action
|
|
57
55
|
},
|
|
@@ -59,9 +57,9 @@ function Form(props) {
|
|
|
59
57
|
FormViewComponent,
|
|
60
58
|
{
|
|
61
59
|
...formProps,
|
|
62
|
-
ref
|
|
60
|
+
ref,
|
|
63
61
|
id: formId,
|
|
64
|
-
onSubmit:
|
|
62
|
+
onSubmit: handleSubmit,
|
|
65
63
|
children
|
|
66
64
|
}
|
|
67
65
|
)
|
|
@@ -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 FC,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n type
|
|
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 FC,\n type FormEvent,\n type FormEventHandler,\n type PropsWithChildren,\n type Ref,\n useId,\n useMemo,\n useRef,\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 { useRegisterActionStateContext } from \"@/integrations/react-hook-form/components/Form/lib/useRegisterActionStateContext\";\n\nexport type FormOnSubmitHandler<F extends FieldValues> = SubmitHandler<F>;\n\ntype FormComponentType = FC<\n PropsWithChildren<{\n id: string;\n onSubmit?: FormEventHandler | FormOnSubmitHandler<never>;\n ref?: Ref<HTMLFormElement>;\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?: FC<Omit<FormComponentType, \"ref\">>;\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 ref,\n ...formProps\n } = props;\n\n const [readonlyContextState, setReadOnlyContextState] =\n useState(!!isReadOnlyFromProps);\n\n const formId = useId();\n const FormViewComponent = useMemo(() => FormView, [formId]);\n\n const submitButtonRef = useRef<HTMLButtonElement>(null);\n\n const isReadOnly = isReadOnlyFromProps || readonlyContextState;\n const { action, registerSubmitResult } = useRegisterActionStateContext(form);\n\n const handleSubmit = (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 const submit = form.handleSubmit((values) => {\n setReadOnlyContextState(true);\n const result = onSubmit(values, formEvent);\n registerSubmitResult(result);\n return result;\n });\n\n return submit(formEvent).finally(() => {\n setReadOnlyContextState(false);\n });\n };\n\n return (\n <RhfFormContextProvider {...form}>\n <FormContextProvider\n value={{\n form,\n id: formId,\n isReadOnly,\n setReadOnly: setReadOnlyContextState,\n submit: handleSubmit,\n submitButtonRef: submitButtonRef,\n formActionModel: action,\n }}\n >\n <FormViewComponent\n {...formProps}\n ref={ref}\n id={formId}\n onSubmit={handleSubmit}\n >\n {children}\n </FormViewComponent>\n </FormContextProvider>\n </RhfFormContextProvider>\n );\n}\n\nexport default Form;\n"],"names":["RhfFormContextProvider"],"mappings":";;;;;;AAwCA,MAAM,uBAA0C,CAAC,CAAA,qBAAM,GAAA,CAAC,MAAA,EAAA,EAAM,GAAG,CAAA,EAAG,CAAA;AAE7D,SAAS,KAA4B,KAAA,EAAqB;AAC/D,EAAA,MAAM;AAAA,IACJ,IAAA;AAAA,IACA,QAAA;AAAA,IACA,QAAA;AAAA,IACA,eAAe,QAAA,GAAW,oBAAA;AAAA,IAC1B,UAAA,EAAY,mBAAA;AAAA,IACZ,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,CAAC,oBAAA,EAAsB,uBAAuB,IAClD,QAAA,CAAS,CAAC,CAAC,mBAAmB,CAAA;AAEhC,EAAA,MAAM,SAAS,KAAA,EAAM;AACrB,EAAA,MAAM,oBAAoB,OAAA,CAAQ,MAAM,QAAA,EAAU,CAAC,MAAM,CAAC,CAAA;AAE1D,EAAA,MAAM,eAAA,GAAkB,OAA0B,IAAI,CAAA;AAEtD,EAAA,MAAM,aAAa,mBAAA,IAAuB,oBAAA;AAC1C,EAAA,MAAM,EAAE,MAAA,EAAQ,oBAAA,EAAqB,GAAI,8BAA8B,IAAI,CAAA;AAE3E,EAAA,MAAM,YAAA,GAAe,CAAC,CAAA,KAAuC;AAC3D,IAAA,MAAM,EAAE,YAAA,EAAc,YAAA,EAAa,GAAI,KAAK,OAAA,CAAQ,UAAA;AACpD,IAAA,MAAM,SAAA,GACJ,CAAA,IAAK,aAAA,IAAiB,CAAA,GAAK,CAAA,GAAmC,MAAA;AAEhE,IAAA,SAAA,EAAW,eAAA,EAAgB;AAE3B,IAAA,IAAI,gBAAgB,YAAA,EAAc;AAChC,MAAA,SAAA,EAAW,cAAA,EAAe;AAC1B,MAAA;AAAA,IACF;AAEA,IAAA,MAAM,MAAA,GAAS,IAAA,CAAK,YAAA,CAAa,CAAC,MAAA,KAAW;AAC3C,MAAA,uBAAA,CAAwB,IAAI,CAAA;AAC5B,MAAA,MAAM,MAAA,GAAS,QAAA,CAAS,MAAA,EAAQ,SAAS,CAAA;AACzC,MAAA,oBAAA,CAAqB,MAAM,CAAA;AAC3B,MAAA,OAAO,MAAA;AAAA,IACT,CAAC,CAAA;AAED,IAAA,OAAO,MAAA,CAAO,SAAS,CAAA,CAAE,OAAA,CAAQ,MAAM;AACrC,MAAA,uBAAA,CAAwB,KAAK,CAAA;AAAA,IAC/B,CAAC,CAAA;AAAA,EACH,CAAA;AAEA,EAAA,uBACE,GAAA,CAACA,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,uBAAA;AAAA,QACb,MAAA,EAAQ,YAAA;AAAA,QACR,eAAA;AAAA,QACA,eAAA,EAAiB;AAAA,OACnB;AAAA,MAEA,QAAA,kBAAA,GAAA;AAAA,QAAC,iBAAA;AAAA,QAAA;AAAA,UACE,GAAG,SAAA;AAAA,UACJ,GAAA;AAAA,UACA,EAAA,EAAI,MAAA;AAAA,UACJ,QAAA,EAAU,YAAA;AAAA,UAET;AAAA;AAAA;AACH;AAAA,GACF,EACF,CAAA;AAEJ;;;;"}
|
package/dist/js/components/src/integrations/react-hook-form/components/ResetButton/ResetButton.mjs
CHANGED
|
@@ -8,10 +8,9 @@ import '../../../../lib/propsContext/propsContext.mjs';
|
|
|
8
8
|
import '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
10
|
import 'react-hook-form';
|
|
11
|
+
import 'react-hotkeys-hook';
|
|
11
12
|
import 'react-aria';
|
|
12
13
|
import '../../../../views/FieldErrorView.mjs';
|
|
13
|
-
import 'react-hotkeys-hook';
|
|
14
|
-
import 'use-callback-ref';
|
|
15
14
|
import '@react-aria/utils';
|
|
16
15
|
import 'mobx';
|
|
17
16
|
import '../../../../lib/controller/overlay/context.mjs';
|
|
@@ -39,7 +38,6 @@ const ResetButton = flowComponent("ResetButton", (props) => {
|
|
|
39
38
|
...rest,
|
|
40
39
|
ref,
|
|
41
40
|
isReadOnly: actionState === "isExecuting" || actionState === "isPending",
|
|
42
|
-
type: "reset",
|
|
43
41
|
onPress: () => form.reset(),
|
|
44
42
|
form: formId,
|
|
45
43
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResetButton.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/ResetButton/ResetButton.tsx"],"sourcesContent":["import { Button, type ButtonProps } from \"@/components/Button\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFormContext } from \"@/integrations/react-hook-form\";\nimport { type FC, useMemo } from \"react\";\n\nexport type ResetButtonProps = Omit<\n ButtonProps,\n \"isFailed\" | \"isSucceeded\" | \"isPending\" | \"isReadOnly\" | \"type\"\n> & {\n buttonComponent?: FC<Omit<ButtonProps, \"ref\">>;\n};\n\nexport const ResetButton = flowComponent(\"ResetButton\", (props) => {\n const {\n children,\n ref,\n buttonComponent: ButtonComponent = Button,\n ...rest\n } = props;\n\n const { id: formId = props.form, form, formActionModel } = useFormContext();\n\n const ButtonViewComponent = useMemo(() => ButtonComponent, [formId]);\n const actionState = formActionModel.state.useValue();\n\n return (\n <ButtonViewComponent\n color=\"secondary\"\n variant=\"soft\"\n {...rest}\n ref={ref}\n isReadOnly={actionState === \"isExecuting\" || actionState === \"isPending\"}\n
|
|
1
|
+
{"version":3,"file":"ResetButton.mjs","sources":["../../../../../../../../src/integrations/react-hook-form/components/ResetButton/ResetButton.tsx"],"sourcesContent":["import { Button, type ButtonProps } from \"@/components/Button\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFormContext } from \"@/integrations/react-hook-form\";\nimport { type FC, useMemo } from \"react\";\n\nexport type ResetButtonProps = Omit<\n ButtonProps,\n \"isFailed\" | \"isSucceeded\" | \"isPending\" | \"isReadOnly\" | \"type\"\n> & {\n buttonComponent?: FC<Omit<ButtonProps, \"ref\">>;\n};\n\nexport const ResetButton = flowComponent(\"ResetButton\", (props) => {\n const {\n children,\n ref,\n buttonComponent: ButtonComponent = Button,\n ...rest\n } = props;\n\n const { id: formId = props.form, form, formActionModel } = useFormContext();\n\n const ButtonViewComponent = useMemo(() => ButtonComponent, [formId]);\n const actionState = formActionModel.state.useValue();\n\n return (\n <ButtonViewComponent\n color=\"secondary\"\n variant=\"soft\"\n {...rest}\n ref={ref}\n isReadOnly={actionState === \"isExecuting\" || actionState === \"isPending\"}\n onPress={() => form.reset()}\n form={formId}\n >\n {children}\n </ButtonViewComponent>\n );\n});\n\nexport default ResetButton;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAYO,MAAM,WAAA,GAAc,aAAA,CAAc,aAAA,EAAe,CAAC,KAAA,KAAU;AACjE,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,GAAA;AAAA,IACA,iBAAiB,eAAA,GAAkB,MAAA;AAAA,IACnC,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,EAAE,IAAI,MAAA,GAAS,KAAA,CAAM,MAAM,IAAA,EAAM,eAAA,KAAoB,cAAA,EAAe;AAE1E,EAAA,MAAM,sBAAsB,OAAA,CAAQ,MAAM,eAAA,EAAiB,CAAC,MAAM,CAAC,CAAA;AACnE,EAAA,MAAM,WAAA,GAAc,eAAA,CAAgB,KAAA,CAAM,QAAA,EAAS;AAEnD,EAAA,uBACE,GAAA;AAAA,IAAC,mBAAA;AAAA,IAAA;AAAA,MACC,KAAA,EAAM,WAAA;AAAA,MACN,OAAA,EAAQ,MAAA;AAAA,MACP,GAAG,IAAA;AAAA,MACJ,GAAA;AAAA,MACA,UAAA,EAAY,WAAA,KAAgB,aAAA,IAAiB,WAAA,KAAgB,WAAA;AAAA,MAC7D,OAAA,EAAS,MAAM,IAAA,CAAK,KAAA,EAAM;AAAA,MAC1B,IAAA,EAAM,MAAA;AAAA,MAEL;AAAA;AAAA,GACH;AAEJ,CAAC;;;;"}
|
package/dist/js/components/src/integrations/react-hook-form/components/SubmitButton/SubmitButton.mjs
CHANGED
|
@@ -8,10 +8,9 @@ import '../../../../lib/propsContext/propsContext.mjs';
|
|
|
8
8
|
import '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
9
9
|
import { useMemo } from 'react';
|
|
10
10
|
import 'react-hook-form';
|
|
11
|
+
import 'react-hotkeys-hook';
|
|
11
12
|
import 'react-aria';
|
|
12
13
|
import '../../../../views/FieldErrorView.mjs';
|
|
13
|
-
import 'react-hotkeys-hook';
|
|
14
|
-
import { useMergeRefs } from 'use-callback-ref';
|
|
15
14
|
import { useObjectRef } from '@react-aria/utils';
|
|
16
15
|
import 'mobx';
|
|
17
16
|
import '../../../../lib/controller/overlay/context.mjs';
|
|
@@ -22,6 +21,7 @@ import 'remeda';
|
|
|
22
21
|
import '../ResetButton/ResetButton.mjs';
|
|
23
22
|
import { Action } from '../../../../components/Action/Action.mjs';
|
|
24
23
|
import '@react-aria/live-announcer';
|
|
24
|
+
import { useMergeRefs } from 'use-callback-ref';
|
|
25
25
|
|
|
26
26
|
const SubmitButton = flowComponent(
|
|
27
27
|
"SubmitButton",
|
|
@@ -46,10 +46,16 @@ class OverlayController {
|
|
|
46
46
|
this.onOpenHandlers.forEach((handler) => handler());
|
|
47
47
|
}
|
|
48
48
|
open() {
|
|
49
|
+
if (this.isOpen) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
49
52
|
this.isOpen = true;
|
|
50
53
|
this.executeOnOpen();
|
|
51
54
|
}
|
|
52
55
|
close() {
|
|
56
|
+
if (!this.isOpen) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
53
59
|
this.isOpen = false;
|
|
54
60
|
this.executeOnClose();
|
|
55
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OverlayController.mjs","sources":["../../../../../../../src/lib/controller/overlay/OverlayController.ts"],"sourcesContent":["import { action, makeObservable, observable } from \"mobx\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\n\ntype OpenStateHandler = () => void;\ntype DisposerFn = () => void;\n\nexport interface OverlayControllerOptions {\n isDefaultOpen?: boolean;\n onOpen?: OpenStateHandler;\n onClose?: OpenStateHandler;\n}\n\nexport class OverlayController {\n public isOpen = false;\n private onOpenHandlers = new Set<OpenStateHandler>();\n private onCloseHandlers = new Set<OpenStateHandler>();\n\n public constructor(options?: OverlayControllerOptions) {\n makeObservable(this, {\n isOpen: observable,\n open: action.bound,\n close: action.bound,\n toggle: action.bound,\n setOpen: action.bound,\n });\n this.isOpen = options?.isDefaultOpen ?? false;\n\n if (options?.onOpen) {\n this.onOpenHandlers.add(options.onOpen);\n }\n if (options?.onClose) {\n this.onCloseHandlers.add(options.onClose);\n }\n }\n\n public static useNew(options?: OverlayControllerOptions): OverlayController {\n return useStatic(() => new OverlayController(options));\n }\n\n public addOnOpen(handler: OpenStateHandler): DisposerFn {\n this.onOpenHandlers.add(handler);\n return () => {\n this.onOpenHandlers.delete(handler);\n };\n }\n\n public addOnClose(handler: OpenStateHandler): DisposerFn {\n this.onCloseHandlers.add(handler);\n return () => {\n this.onCloseHandlers.delete(handler);\n };\n }\n\n private executeOnClose(): void {\n this.onCloseHandlers.forEach((handler) => handler());\n }\n\n private executeOnOpen(): void {\n this.onOpenHandlers.forEach((handler) => handler());\n }\n\n public open(): void {\n this.isOpen = true;\n this.executeOnOpen();\n }\n\n public close(): void {\n this.isOpen = false;\n this.executeOnClose();\n }\n\n public toggle(): void {\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n this.executeOnOpen();\n } else {\n this.executeOnClose();\n }\n }\n\n public setOpen(to: boolean): void {\n this.isOpen = to;\n\n if (to) {\n this.executeOnOpen();\n } else {\n this.executeOnClose();\n }\n }\n\n public useIsOpen(): boolean {\n return useSelector(() => this.isOpen);\n }\n}\n"],"names":[],"mappings":";;;;AAaO,MAAM,iBAAA,CAAkB;AAAA,EACtB,MAAA,GAAS,KAAA;AAAA,EACR,cAAA,uBAAqB,GAAA,EAAsB;AAAA,EAC3C,eAAA,uBAAsB,GAAA,EAAsB;AAAA,EAE7C,YAAY,OAAA,EAAoC;AACrD,IAAA,cAAA,CAAe,IAAA,EAAM;AAAA,MACnB,MAAA,EAAQ,UAAA;AAAA,MACR,MAAM,MAAA,CAAO,KAAA;AAAA,MACb,OAAO,MAAA,CAAO,KAAA;AAAA,MACd,QAAQ,MAAA,CAAO,KAAA;AAAA,MACf,SAAS,MAAA,CAAO;AAAA,KACjB,CAAA;AACD,IAAA,IAAA,CAAK,MAAA,GAAS,SAAS,aAAA,IAAiB,KAAA;AAExC,IAAA,IAAI,SAAS,MAAA,EAAQ;AACnB,MAAA,IAAA,CAAK,cAAA,CAAe,GAAA,CAAI,OAAA,CAAQ,MAAM,CAAA;AAAA,IACxC;AACA,IAAA,IAAI,SAAS,OAAA,EAAS;AACpB,MAAA,IAAA,CAAK,eAAA,CAAgB,GAAA,CAAI,OAAA,CAAQ,OAAO,CAAA;AAAA,IAC1C;AAAA,EACF;AAAA,EAEA,OAAc,OAAO,OAAA,EAAuD;AAC1E,IAAA,OAAO,SAAA,CAAU,MAAM,IAAI,iBAAA,CAAkB,OAAO,CAAC,CAAA;AAAA,EACvD;AAAA,EAEO,UAAU,OAAA,EAAuC;AACtD,IAAA,IAAA,CAAK,cAAA,CAAe,IAAI,OAAO,CAAA;AAC/B,IAAA,OAAO,MAAM;AACX,MAAA,IAAA,CAAK,cAAA,CAAe,OAAO,OAAO,CAAA;AAAA,IACpC,CAAA;AAAA,EACF;AAAA,EAEO,WAAW,OAAA,EAAuC;AACvD,IAAA,IAAA,CAAK,eAAA,CAAgB,IAAI,OAAO,CAAA;AAChC,IAAA,OAAO,MAAM;AACX,MAAA,IAAA,CAAK,eAAA,CAAgB,OAAO,OAAO,CAAA;AAAA,IACrC,CAAA;AAAA,EACF;AAAA,EAEQ,cAAA,GAAuB;AAC7B,IAAA,IAAA,CAAK,eAAA,CAAgB,OAAA,CAAQ,CAAC,OAAA,KAAY,SAAS,CAAA;AAAA,EACrD;AAAA,EAEQ,aAAA,GAAsB;AAC5B,IAAA,IAAA,CAAK,cAAA,CAAe,OAAA,CAAQ,CAAC,OAAA,KAAY,SAAS,CAAA;AAAA,EACpD;AAAA,EAEO,IAAA,GAAa;AAClB,IAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AACd,IAAA,IAAA,CAAK,aAAA,EAAc;AAAA,EACrB;AAAA,EAEO,KAAA,GAAc;AACnB,IAAA,IAAA,CAAK,MAAA,GAAS,KAAA;AACd,IAAA,IAAA,CAAK,cAAA,EAAe;AAAA,EACtB;AAAA,EAEO,MAAA,GAAe;AACpB,IAAA,IAAA,CAAK,MAAA,GAAS,CAAC,IAAA,CAAK,MAAA;AAEpB,IAAA,IAAI,KAAK,MAAA,EAAQ;AACf,MAAA,IAAA,CAAK,aAAA,EAAc;AAAA,IACrB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,cAAA,EAAe;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,QAAQ,EAAA,EAAmB;AAChC,IAAA,IAAA,CAAK,MAAA,GAAS,EAAA;AAEd,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,IAAA,CAAK,aAAA,EAAc;AAAA,IACrB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,cAAA,EAAe;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,SAAA,GAAqB;AAC1B,IAAA,OAAO,WAAA,CAAY,MAAM,IAAA,CAAK,MAAM,CAAA;AAAA,EACtC;AACF;;;;"}
|
|
1
|
+
{"version":3,"file":"OverlayController.mjs","sources":["../../../../../../../src/lib/controller/overlay/OverlayController.ts"],"sourcesContent":["import { action, makeObservable, observable } from \"mobx\";\nimport useSelector from \"@/lib/mobx/useSelector\";\nimport { useStatic } from \"@/lib/hooks/useStatic\";\n\ntype OpenStateHandler = () => void;\ntype DisposerFn = () => void;\n\nexport interface OverlayControllerOptions {\n isDefaultOpen?: boolean;\n onOpen?: OpenStateHandler;\n onClose?: OpenStateHandler;\n}\n\nexport class OverlayController {\n public isOpen = false;\n private onOpenHandlers = new Set<OpenStateHandler>();\n private onCloseHandlers = new Set<OpenStateHandler>();\n\n public constructor(options?: OverlayControllerOptions) {\n makeObservable(this, {\n isOpen: observable,\n open: action.bound,\n close: action.bound,\n toggle: action.bound,\n setOpen: action.bound,\n });\n this.isOpen = options?.isDefaultOpen ?? false;\n\n if (options?.onOpen) {\n this.onOpenHandlers.add(options.onOpen);\n }\n if (options?.onClose) {\n this.onCloseHandlers.add(options.onClose);\n }\n }\n\n public static useNew(options?: OverlayControllerOptions): OverlayController {\n return useStatic(() => new OverlayController(options));\n }\n\n public addOnOpen(handler: OpenStateHandler): DisposerFn {\n this.onOpenHandlers.add(handler);\n return () => {\n this.onOpenHandlers.delete(handler);\n };\n }\n\n public addOnClose(handler: OpenStateHandler): DisposerFn {\n this.onCloseHandlers.add(handler);\n return () => {\n this.onCloseHandlers.delete(handler);\n };\n }\n\n private executeOnClose(): void {\n this.onCloseHandlers.forEach((handler) => handler());\n }\n\n private executeOnOpen(): void {\n this.onOpenHandlers.forEach((handler) => handler());\n }\n\n public open(): void {\n if (this.isOpen) {\n return;\n }\n this.isOpen = true;\n this.executeOnOpen();\n }\n\n public close(): void {\n if (!this.isOpen) {\n return;\n }\n this.isOpen = false;\n this.executeOnClose();\n }\n\n public toggle(): void {\n this.isOpen = !this.isOpen;\n\n if (this.isOpen) {\n this.executeOnOpen();\n } else {\n this.executeOnClose();\n }\n }\n\n public setOpen(to: boolean): void {\n this.isOpen = to;\n\n if (to) {\n this.executeOnOpen();\n } else {\n this.executeOnClose();\n }\n }\n\n public useIsOpen(): boolean {\n return useSelector(() => this.isOpen);\n }\n}\n"],"names":[],"mappings":";;;;AAaO,MAAM,iBAAA,CAAkB;AAAA,EACtB,MAAA,GAAS,KAAA;AAAA,EACR,cAAA,uBAAqB,GAAA,EAAsB;AAAA,EAC3C,eAAA,uBAAsB,GAAA,EAAsB;AAAA,EAE7C,YAAY,OAAA,EAAoC;AACrD,IAAA,cAAA,CAAe,IAAA,EAAM;AAAA,MACnB,MAAA,EAAQ,UAAA;AAAA,MACR,MAAM,MAAA,CAAO,KAAA;AAAA,MACb,OAAO,MAAA,CAAO,KAAA;AAAA,MACd,QAAQ,MAAA,CAAO,KAAA;AAAA,MACf,SAAS,MAAA,CAAO;AAAA,KACjB,CAAA;AACD,IAAA,IAAA,CAAK,MAAA,GAAS,SAAS,aAAA,IAAiB,KAAA;AAExC,IAAA,IAAI,SAAS,MAAA,EAAQ;AACnB,MAAA,IAAA,CAAK,cAAA,CAAe,GAAA,CAAI,OAAA,CAAQ,MAAM,CAAA;AAAA,IACxC;AACA,IAAA,IAAI,SAAS,OAAA,EAAS;AACpB,MAAA,IAAA,CAAK,eAAA,CAAgB,GAAA,CAAI,OAAA,CAAQ,OAAO,CAAA;AAAA,IAC1C;AAAA,EACF;AAAA,EAEA,OAAc,OAAO,OAAA,EAAuD;AAC1E,IAAA,OAAO,SAAA,CAAU,MAAM,IAAI,iBAAA,CAAkB,OAAO,CAAC,CAAA;AAAA,EACvD;AAAA,EAEO,UAAU,OAAA,EAAuC;AACtD,IAAA,IAAA,CAAK,cAAA,CAAe,IAAI,OAAO,CAAA;AAC/B,IAAA,OAAO,MAAM;AACX,MAAA,IAAA,CAAK,cAAA,CAAe,OAAO,OAAO,CAAA;AAAA,IACpC,CAAA;AAAA,EACF;AAAA,EAEO,WAAW,OAAA,EAAuC;AACvD,IAAA,IAAA,CAAK,eAAA,CAAgB,IAAI,OAAO,CAAA;AAChC,IAAA,OAAO,MAAM;AACX,MAAA,IAAA,CAAK,eAAA,CAAgB,OAAO,OAAO,CAAA;AAAA,IACrC,CAAA;AAAA,EACF;AAAA,EAEQ,cAAA,GAAuB;AAC7B,IAAA,IAAA,CAAK,eAAA,CAAgB,OAAA,CAAQ,CAAC,OAAA,KAAY,SAAS,CAAA;AAAA,EACrD;AAAA,EAEQ,aAAA,GAAsB;AAC5B,IAAA,IAAA,CAAK,cAAA,CAAe,OAAA,CAAQ,CAAC,OAAA,KAAY,SAAS,CAAA;AAAA,EACpD;AAAA,EAEO,IAAA,GAAa;AAClB,IAAA,IAAI,KAAK,MAAA,EAAQ;AACf,MAAA;AAAA,IACF;AACA,IAAA,IAAA,CAAK,MAAA,GAAS,IAAA;AACd,IAAA,IAAA,CAAK,aAAA,EAAc;AAAA,EACrB;AAAA,EAEO,KAAA,GAAc;AACnB,IAAA,IAAI,CAAC,KAAK,MAAA,EAAQ;AAChB,MAAA;AAAA,IACF;AACA,IAAA,IAAA,CAAK,MAAA,GAAS,KAAA;AACd,IAAA,IAAA,CAAK,cAAA,EAAe;AAAA,EACtB;AAAA,EAEO,MAAA,GAAe;AACpB,IAAA,IAAA,CAAK,MAAA,GAAS,CAAC,IAAA,CAAK,MAAA;AAEpB,IAAA,IAAI,KAAK,MAAA,EAAQ;AACf,MAAA,IAAA,CAAK,aAAA,EAAc;AAAA,IACrB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,cAAA,EAAe;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,QAAQ,EAAA,EAAmB;AAChC,IAAA,IAAA,CAAK,MAAA,GAAS,EAAA;AAEd,IAAA,IAAI,EAAA,EAAI;AACN,MAAA,IAAA,CAAK,aAAA,EAAc;AAAA,IACrB,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,cAAA,EAAe;AAAA,IACtB;AAAA,EACF;AAAA,EAEO,SAAA,GAAqB;AAC1B,IAAA,OAAO,WAAA,CAAY,MAAM,IAAA,CAAK,MAAM,CAAA;AAAA,EACtC;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isFocused.mjs","sources":["../../../../../../src/lib/form/isFocused.ts"],"sourcesContent":["export const isFocused = (element: HTMLElement | null) => {\n return element?.getAttribute(\"data-focused\") === \"true\";\n};\n"],"names":[],"mappings":"AAAO,MAAM,SAAA,GAAY,CAAC,OAAA,KAAgC;AACxD,EAAA,OAAO,OAAA,EAAS,YAAA,CAAa,cAAc,CAAA,KAAM,MAAA;AACnD;;;;"}
|
|
@@ -108,6 +108,7 @@ import '../../components/TextArea/TextArea.mjs';
|
|
|
108
108
|
import '../../components/TextField/TextField.mjs';
|
|
109
109
|
import '../../components/TimeField/TimeField.mjs';
|
|
110
110
|
import '../../components/TranslationProvider/TranslationProvider.mjs';
|
|
111
|
+
import '../remote/eventHandlerContext.mjs';
|
|
111
112
|
|
|
112
113
|
const useFieldError = (tunnelIdFromProps) => {
|
|
113
114
|
const id = useId();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFieldError.mjs","sources":["../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/index/default\";\n\nexport const useFieldError = (tunnelIdFromProps?: string) => {\n const id = useId();\n const currentTunnelId = useProps(\"FieldError\", {}).tunnelId;\n const tunnelId = tunnelIdFromProps ?? currentTunnelId ?? `${id}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n ___inherit: \"preserve\",\n tunnelId,\n className: formFieldStyles.fieldError,\n },\n };\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n levelMode=\"keep\"\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n const FieldErrorView = () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <TunnelExit id={tunnelId}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </TunnelExit>\n );\n };\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n } as const;\n};\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFieldError.mjs","sources":["../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { TunnelExit } from \"@mittwald/react-tunnel\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/index/default\";\n\nexport const useFieldError = (tunnelIdFromProps?: string) => {\n const id = useId();\n const currentTunnelId = useProps(\"FieldError\", {}).tunnelId;\n const tunnelId = tunnelIdFromProps ?? currentTunnelId ?? `${id}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n ___inherit: \"preserve\",\n tunnelId,\n className: formFieldStyles.fieldError,\n },\n };\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n levelMode=\"keep\"\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n const FieldErrorView = () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <TunnelExit id={tunnelId}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </TunnelExit>\n );\n };\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n } as const;\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,MAAM,aAAA,GAAgB,CAAC,iBAAA,KAA+B;AAC3D,EAAA,MAAM,KAAK,KAAA,EAAM;AACjB,EAAA,MAAM,eAAA,GAAkB,QAAA,CAAS,YAAA,EAAc,EAAE,CAAA,CAAE,QAAA;AACnD,EAAA,MAAM,QAAA,GAAgC,eAAA,IAAmB,CAAA,EAAG,EAAE,CAAA,WAAA,CAAA;AAE9D,EAAA,MAAM,6BAAA,GAA8C;AAAA,IAClD,UAAA,EAAY;AAAA,MACV,UAAA,EAAY,UAAA;AAAA,MACZ,QAAA;AAAA,MACA,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,MAAM,wBAAA,GAAkD,OAAA;AAAA,IACtD,MAAM,CAAC,KAAA,KAAU;AACf,MAAA,uBACE,GAAA;AAAA,QAAC,oBAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAU,MAAA;AAAA,UACV,KAAA,EAAO,6BAAA;AAAA,UACP,YAAA,EAAc,CAAC,QAAQ,CAAA;AAAA,UAEtB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,OACT;AAAA,IAEJ,CAAA;AAAA,IACA,CAAC,QAAQ;AAAA,GACX;AAEA,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,IAAI,eAAA,EAAiB;AACnB,MAAA,OAAO,IAAA;AAAA,IACT;AAEA,IAAA,uBACE,GAAA,CAAC,UAAA,EAAA,EAAW,EAAA,EAAI,QAAA,EACb,WAAC,QAAA,KAAa;AACb,MAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,MAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,QAAA,EAAA,aAAA,CAAc,CAAC,CAAA,EAAE,CAAA;AAAA,IAC9C,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { createCascade } from 'context';
|
|
4
|
+
|
|
5
|
+
const eventHandlerContext = createCascade();
|
|
6
|
+
const getRemoteEvent = () => eventHandlerContext.use()?.remoteEvent;
|
|
7
|
+
|
|
8
|
+
export { eventHandlerContext, getRemoteEvent };
|
|
9
|
+
//# sourceMappingURL=eventHandlerContext.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHandlerContext.mjs","sources":["../../../../../../src/lib/remote/eventHandlerContext.ts"],"sourcesContent":["import { createCascade } from \"context\";\n\nexport interface EventHandlerContext {\n remoteEvent?: {\n type: string;\n };\n [key: string]: unknown;\n}\n\nexport const eventHandlerContext = createCascade<EventHandlerContext>();\n\nexport const getRemoteEvent = () => eventHandlerContext.use()?.remoteEvent;\n"],"names":[],"mappings":";;AASO,MAAM,sBAAsB,aAAA;AAE5B,MAAM,cAAA,GAAiB,MAAM,mBAAA,CAAoB,GAAA,EAAI,EAAG;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useState, useLayoutEffect } from 'react';
|
|
4
|
+
import { controlledRemoteValueMarker } from './useControlledRemoteValueProps.mjs';
|
|
5
|
+
|
|
6
|
+
const useControlledHostValueProps = (props) => {
|
|
7
|
+
const {
|
|
8
|
+
value: valueFromProps,
|
|
9
|
+
onChange: onChangeFromProps,
|
|
10
|
+
defaultValue
|
|
11
|
+
} = props;
|
|
12
|
+
const regularValue = valueFromProps === controlledRemoteValueMarker ? void 0 : valueFromProps;
|
|
13
|
+
const [value, setValue] = useState(regularValue ?? defaultValue);
|
|
14
|
+
useLayoutEffect(() => {
|
|
15
|
+
if (regularValue !== void 0) {
|
|
16
|
+
setValue(regularValue);
|
|
17
|
+
}
|
|
18
|
+
}, [valueFromProps]);
|
|
19
|
+
const onChange = (v) => {
|
|
20
|
+
setValue(v);
|
|
21
|
+
onChangeFromProps?.(v);
|
|
22
|
+
};
|
|
23
|
+
return {
|
|
24
|
+
...props,
|
|
25
|
+
value,
|
|
26
|
+
onChange
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { useControlledHostValueProps };
|
|
31
|
+
//# sourceMappingURL=useControlledHostValueProps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledHostValueProps.mjs","sources":["../../../../../../src/lib/remote/useControlledHostValueProps.ts"],"sourcesContent":["import { useLayoutEffect, useState } from \"react\";\nimport { controlledRemoteValueMarker } from \"./useControlledRemoteValueProps\";\nimport type { FieldProps } from \"@/lib/remote/types\";\n\n/**\n * Returns props with controlled value handling for remote components. It works\n * by omitting values resulting from a remotely executed event handler. These\n * values are marked by the `controlledRemoteValueMarker`.\n *\n * This hook is noly necessary for text inputs. If not use the controlled input\n * value may be corrupted by interleaved host inputs and remote events.\n */\nexport const useControlledHostValueProps = <T, P>(props: FieldProps<T, P>) => {\n const {\n value: valueFromProps,\n onChange: onChangeFromProps,\n defaultValue,\n } = props;\n\n const regularValue =\n valueFromProps === controlledRemoteValueMarker ? undefined : valueFromProps;\n\n const [value, setValue] = useState(regularValue ?? defaultValue);\n\n useLayoutEffect(() => {\n if (regularValue !== undefined) {\n setValue(regularValue);\n }\n }, [valueFromProps]);\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const onChange = (v: any) => {\n setValue(v);\n onChangeFromProps?.(v);\n };\n\n return {\n ...props,\n value,\n onChange,\n };\n};\n"],"names":[],"mappings":";;;AAYO,MAAM,2BAAA,GAA8B,CAAO,KAAA,KAA4B;AAC5E,EAAA,MAAM;AAAA,IACJ,KAAA,EAAO,cAAA;AAAA,IACP,QAAA,EAAU,iBAAA;AAAA,IACV;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,MAAM,YAAA,GACJ,cAAA,KAAmB,2BAAA,GAA8B,MAAA,GAAY,cAAA;AAE/D,EAAA,MAAM,CAAC,KAAA,EAAO,QAAQ,CAAA,GAAI,QAAA,CAAS,gBAAgB,YAAY,CAAA;AAE/D,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,iBAAiB,MAAA,EAAW;AAC9B,MAAA,QAAA,CAAS,YAAY,CAAA;AAAA,IACvB;AAAA,EACF,CAAA,EAAG,CAAC,cAAc,CAAC,CAAA;AAGnB,EAAA,MAAM,QAAA,GAAW,CAAC,CAAA,KAAW;AAC3B,IAAA,QAAA,CAAS,CAAC,CAAA;AACV,IAAA,iBAAA,GAAoB,CAAC,CAAA;AAAA,EACvB,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,GAAG,KAAA;AAAA,IACH,KAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { getRemoteEvent } from './eventHandlerContext.mjs';
|
|
5
|
+
|
|
6
|
+
const unknownRemoteEventValue = Symbol("unknownRemoteEventValue");
|
|
7
|
+
const controlledRemoteValueMarker = "___flowControlledRemoteValue___";
|
|
8
|
+
const useControlledRemoteValueProps = (props) => {
|
|
9
|
+
const valueOfRemoteEvent = useRef(unknownRemoteEventValue);
|
|
10
|
+
const onChange = (value2) => {
|
|
11
|
+
const remoteEvent = getRemoteEvent();
|
|
12
|
+
valueOfRemoteEvent.current = remoteEvent ? value2 : unknownRemoteEventValue;
|
|
13
|
+
props.onChange?.(value2);
|
|
14
|
+
};
|
|
15
|
+
const value = valueOfRemoteEvent.current === props.value ? controlledRemoteValueMarker : props.value;
|
|
16
|
+
return { ...props, onChange, value };
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { controlledRemoteValueMarker, useControlledRemoteValueProps };
|
|
20
|
+
//# sourceMappingURL=useControlledRemoteValueProps.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledRemoteValueProps.mjs","sources":["../../../../../../src/lib/remote/useControlledRemoteValueProps.ts"],"sourcesContent":["import { useRef } from \"react\";\nimport { getRemoteEvent } from \"./eventHandlerContext\";\nimport type { FieldProps } from \"@/lib/remote/types\";\n\nconst unknownRemoteEventValue = Symbol(\"unknownRemoteEventValue\");\n\nexport const controlledRemoteValueMarker = \"___flowControlledRemoteValue___\";\n\nexport const useControlledRemoteValueProps = <T, P>(\n props: FieldProps<T, P>,\n) => {\n const valueOfRemoteEvent = useRef<unknown>(unknownRemoteEventValue);\n\n const onChange = (value: T) => {\n const remoteEvent = getRemoteEvent();\n valueOfRemoteEvent.current = remoteEvent ? value : unknownRemoteEventValue;\n props.onChange?.(value);\n };\n\n const value =\n valueOfRemoteEvent.current === props.value\n ? controlledRemoteValueMarker\n : props.value;\n\n return { ...props, onChange, value };\n};\n"],"names":["value"],"mappings":";;;AAIA,MAAM,uBAAA,GAA0B,OAAO,yBAAyB,CAAA;AAEzD,MAAM,2BAAA,GAA8B;AAEpC,MAAM,6BAAA,GAAgC,CAC3C,KAAA,KACG;AACH,EAAA,MAAM,kBAAA,GAAqB,OAAgB,uBAAuB,CAAA;AAElE,EAAA,MAAM,QAAA,GAAW,CAACA,MAAAA,KAAa;AAC7B,IAAA,MAAM,cAAc,cAAA,EAAe;AACnC,IAAA,kBAAA,CAAmB,OAAA,GAAU,cAAcA,MAAAA,GAAQ,uBAAA;AACnD,IAAA,KAAA,CAAM,WAAWA,MAAK,CAAA;AAAA,EACxB,CAAA;AAEA,EAAA,MAAM,QACJ,kBAAA,CAAmB,OAAA,KAAY,KAAA,CAAM,KAAA,GACjC,8BACA,KAAA,CAAM,KAAA;AAEZ,EAAA,OAAO,EAAE,GAAG,KAAA,EAAO,QAAA,EAAU,KAAA,EAAM;AACrC;;;;"}
|
package/dist/js/default.mjs
CHANGED
|
@@ -278,4 +278,6 @@ export { useProps } from './components/src/lib/hooks/useProps.mjs';
|
|
|
278
278
|
export { dynamic } from './components/src/lib/propsContext/dynamicProps/dynamic.mjs';
|
|
279
279
|
export { propsContext } from './components/src/lib/propsContext/propsContext.mjs';
|
|
280
280
|
export { PropsContextProvider } from './components/src/lib/propsContext/components/PropsContextProvider.mjs';
|
|
281
|
+
export { eventHandlerContext, getRemoteEvent } from './components/src/lib/remote/eventHandlerContext.mjs';
|
|
282
|
+
export { useControlledRemoteValueProps } from './components/src/lib/remote/useControlledRemoteValueProps.mjs';
|
|
281
283
|
//# sourceMappingURL=default.mjs.map
|
package/dist/js/default.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"default.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -204,6 +204,7 @@ import './components/src/views/OverlayContentView.mjs';
|
|
|
204
204
|
export { useOnChange } from './components/src/lib/hooks/useOnChange.mjs';
|
|
205
205
|
export { useIsMounted } from './components/src/lib/hooks/useIsMounted.mjs';
|
|
206
206
|
export { useProps } from './components/src/lib/hooks/useProps.mjs';
|
|
207
|
+
import './components/src/lib/remote/eventHandlerContext.mjs';
|
|
207
208
|
import './components/src/views/LoadingSpinnerView.mjs';
|
|
208
209
|
import './components/src/components/OverlayTrigger/components/MenuTrigger/MenuTrigger.mjs';
|
|
209
210
|
import './components/src/components/PasswordCreationField/PasswordCreationField.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"flr-universal.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -2,13 +2,13 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import * as Aria from "react-aria-components";
|
|
5
|
-
export interface AutocompleteProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps
|
|
5
|
+
export interface AutocompleteProps extends PropsWithChildren, PropsWithClassName, FlowComponentProps<HTMLInputElement>, Omit<Aria.AutocompleteProps, "children" | "onInputChange" | "inputValue" | "defaultInputValue" | "ref"> {
|
|
6
6
|
isInvalid?: boolean;
|
|
7
7
|
value?: string;
|
|
8
8
|
defaultValue?: string;
|
|
9
9
|
onChange?: (value: string) => void;
|
|
10
10
|
}
|
|
11
11
|
/** @flr-generate all */
|
|
12
|
-
export declare const Autocomplete: import('react').FunctionComponent<AutocompleteProps & import('react').RefAttributes<
|
|
12
|
+
export declare const Autocomplete: import('react').FunctionComponent<AutocompleteProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
13
|
export default Autocomplete;
|
|
14
14
|
//# sourceMappingURL=Autocomplete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAkB9C,MAAM,WAAW,iBACf,SAAQ,iBAAiB,EACvB,kBAAkB,EAClB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CACF,IAAI,CAAC,iBAAiB,EACtB,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,KAAK,CAC1E;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,wBAAwB;AACxB,eAAO,MAAM,YAAY,wGA+GvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
2
|
-
import { PropsWithChildren
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
|
-
export interface CheckboxProps extends PropsWithChildren<Omit<Aria.CheckboxProps, "children">>, FlowComponentProps {
|
|
4
|
+
export interface CheckboxProps extends PropsWithChildren<Omit<Aria.CheckboxProps, "children" | "ref" | "inputRef">>, FlowComponentProps<HTMLInputElement> {
|
|
5
5
|
inputClassName?: string;
|
|
6
|
-
inputRef?: RefObject<HTMLInputElement | null>;
|
|
7
6
|
}
|
|
8
7
|
/** @flr-generate all */
|
|
9
|
-
export declare const Checkbox: import('react').FunctionComponent<CheckboxProps & import('react').RefAttributes<
|
|
8
|
+
export declare const Checkbox: import('react').FunctionComponent<CheckboxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
10
9
|
export default Checkbox;
|
|
11
10
|
//# sourceMappingURL=Checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"Checkbox.d.ts","sourceRoot":"","sources":["../../../../src/components/Checkbox/Checkbox.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAM9C,MAAM,WAAW,aACf,SAAQ,iBAAiB,CACrB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,KAAK,GAAG,UAAU,CAAC,CAC1D,EACD,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,oGAwCnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { CheckboxProps } from '../Checkbox';
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
|
-
|
|
4
|
-
export interface CheckboxButtonProps extends CheckboxProps, FlowComponentProps {
|
|
5
|
-
inputRef?: RefObject<HTMLInputElement | null>;
|
|
3
|
+
export interface CheckboxButtonProps extends CheckboxProps, FlowComponentProps<HTMLInputElement> {
|
|
6
4
|
}
|
|
7
5
|
/** @flr-generate all */
|
|
8
|
-
export declare const CheckboxButton: import('react').FunctionComponent<CheckboxButtonProps & import('react').RefAttributes<
|
|
6
|
+
export declare const CheckboxButton: import('react').FunctionComponent<CheckboxButtonProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
9
7
|
export default CheckboxButton;
|
|
10
8
|
//# sourceMappingURL=CheckboxButton.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxButton.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxButton.d.ts","sourceRoot":"","sources":["../../../../src/components/CheckboxButton/CheckboxButton.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAI/E,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,kBAAkB,CAAC,gBAAgB,CAAC;CAAG;AAE3C,wBAAwB;AACxB,eAAO,MAAM,cAAc,0GAmCzB,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { PropsWithChildren
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
|
-
import { OverlayController } from '../../lib/controller';
|
|
4
3
|
import { OptionsProps } from '../Options/Options';
|
|
5
4
|
import * as Aria from "react-aria-components";
|
|
6
|
-
export interface ComboBoxProps extends Omit<Aria.ComboBoxProps<never>, "children">, Pick<Aria.InputProps, "placeholder">, Pick<OptionsProps, "renderEmptyState">, PropsWithChildren, FlowComponentProps {
|
|
5
|
+
export interface ComboBoxProps extends Omit<Aria.ComboBoxProps<never>, "children">, Pick<Aria.InputProps, "placeholder">, Pick<OptionsProps, "renderEmptyState">, PropsWithChildren, FlowComponentProps<HTMLInputElement> {
|
|
7
6
|
onChange?: (value: string) => void;
|
|
8
|
-
controller?: OverlayController;
|
|
9
|
-
inputRef?: RefObject<HTMLInputElement | null>;
|
|
10
7
|
}
|
|
11
8
|
/** @flr-generate all */
|
|
12
|
-
export declare const ComboBox: import('react').FunctionComponent<ComboBoxProps & import('react').RefAttributes<
|
|
9
|
+
export declare const ComboBox: import('react').FunctionComponent<ComboBoxProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
13
10
|
export default ComboBox;
|
|
14
11
|
//# sourceMappingURL=ComboBox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"ComboBox.d.ts","sourceRoot":"","sources":["../../../../src/components/ComboBox/ComboBox.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAW9C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAG/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,EACjD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,aAAa,CAAC,EACpC,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,EACtC,iBAAiB,EACjB,kBAAkB,CAAC,gBAAgB,CAAC;IACtC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,oGAsFnB,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC, Ref } from 'react';
|
|
2
|
+
import * as Aria from "react-aria-components";
|
|
3
|
+
interface DateInputProps extends Omit<Aria.DateInputProps, "children" | "ref"> {
|
|
4
|
+
ref?: Ref<HTMLSpanElement | null>;
|
|
5
|
+
}
|
|
6
|
+
export declare const DateInput: FC<DateInputProps>;
|
|
7
|
+
export default DateInput;
|
|
8
|
+
//# sourceMappingURL=DateInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,UAAU,cAAe,SAAQ,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,KAAK,CAAC;IAC5E,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;CACnC;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAmBxC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/DateInput/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
|
-
export interface DatePickerProps<T extends Aria.DateValue = Aria.DateValue> extends PropsWithChildren<Omit<Aria.DatePickerProps<T>, "children">>, FlowComponentProps {
|
|
4
|
+
export interface DatePickerProps<T extends Aria.DateValue = Aria.DateValue> extends PropsWithChildren<Omit<Aria.DatePickerProps<T>, "children" | "ref">>, FlowComponentProps<HTMLSpanElement> {
|
|
5
5
|
}
|
|
6
6
|
/** @flr-generate all */
|
|
7
|
-
export declare const DatePicker: import('react').FunctionComponent<DatePickerProps<Aria.DateValue> & import('react').RefAttributes<
|
|
7
|
+
export declare const DatePicker: import('react').FunctionComponent<DatePickerProps<Aria.DateValue> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
8
8
|
export default DatePicker;
|
|
9
9
|
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAI9C,MAAM,WAAW,eAAe,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CACxE,SAAQ,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,CAAC,EAC1E,kBAAkB,CAAC,eAAe,CAAC;CAAG;AAE1C,wBAAwB;AACxB,eAAO,MAAM,UAAU,qHA4CrB,CAAC;AAEH,eAAe,UAAU,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DatePicker/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DatePicker/components/DateInput/DateInput.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAO1C,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,GAAG,CAAC,eAAe,CAAC,CAAC;CAC5B;AAED,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAWxC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
3
3
|
import * as Aria from "react-aria-components";
|
|
4
|
-
export interface DateRangePickerProps<T extends Aria.DateValue = Aria.DateValue> extends PropsWithChildren<Omit<Aria.DateRangePickerProps<T>, "children">>, FlowComponentProps {
|
|
4
|
+
export interface DateRangePickerProps<T extends Aria.DateValue = Aria.DateValue> extends PropsWithChildren<Omit<Aria.DateRangePickerProps<T>, "children" | "ref">>, FlowComponentProps<HTMLSpanElement> {
|
|
5
5
|
}
|
|
6
6
|
/** @flr-generate all */
|
|
7
|
-
export declare const DateRangePicker: import('react').FunctionComponent<DateRangePickerProps<Aria.DateValue> & import('react').RefAttributes<
|
|
7
|
+
export declare const DateRangePicker: import('react').FunctionComponent<DateRangePickerProps<Aria.DateValue> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
8
8
|
export default DateRangePicker;
|
|
9
9
|
//# sourceMappingURL=DateRangePicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAK9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAG9C,MAAM,WAAW,oBAAoB,CAAC,CAAC,SAAS,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAC7E,SAAQ,iBAAiB,CACrB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,CACvD,EACD,kBAAkB,CAAC,eAAe,CAAC;CAAG;AAE1C,wBAAwB;AACxB,eAAO,MAAM,eAAe,0HA2C1B,CAAC;AAEH,eAAe,eAAe,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, default as React } from 'react';
|
|
2
2
|
export interface DateInputProps {
|
|
3
3
|
isDisabled?: boolean;
|
|
4
|
+
ref?: React.Ref<HTMLSpanElement>;
|
|
4
5
|
}
|
|
5
6
|
export declare const DateRangeInput: FC<DateInputProps>;
|
|
6
7
|
export default DateRangeInput;
|
package/dist/types/components/DateRangePicker/components/DateRangeInput/DateRangeInput.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../../../../src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,cAAc;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;CAClC;AAED,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,cAAc,CAe7C,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropsWithChildren
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { FileInputOnChangeHandler } from './components/FileInput';
|
|
3
3
|
import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
4
4
|
import type * as Aria from "react-aria-components";
|
|
@@ -7,7 +7,6 @@ export interface FileFieldProps extends PropsWithChildren, FlowComponentProps<HT
|
|
|
7
7
|
onChange?: FileInputOnChangeHandler;
|
|
8
8
|
/** Whether the component is read only. */
|
|
9
9
|
isReadOnly?: boolean;
|
|
10
|
-
inputRef?: RefObject<HTMLInputElement>;
|
|
11
10
|
}
|
|
12
11
|
/** @flr-generate all */
|
|
13
12
|
export declare const FileField: import('react').FunctionComponent<FileFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileField.d.ts","sourceRoot":"","sources":["../../../../src/components/FileField/FileField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"FileField.d.ts","sourceRoot":"","sources":["../../../../src/components/FileField/FileField.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAEnD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAE5F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAO/E,MAAM,WAAW,cACf,SAAQ,iBAAiB,EACvB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC,EACrD,IAAI,CACF,IAAI,CAAC,cAAc,EACnB,YAAY,GAAG,WAAW,GAAG,oBAAoB,GAAG,YAAY,CACjE;IACH,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,0CAA0C;IAC1C,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,qGA2EpB,CAAC;AACH,eAAe,SAAS,CAAC"}
|
|
@@ -4,6 +4,6 @@ import { FlowComponentProps } from '../../lib/componentFactory/flowComponent';
|
|
|
4
4
|
export interface HeaderProps extends PropsWithChildren, PropsWithElementType<"div" | "header" | "span">, FlowComponentProps<HTMLDivElement | HTMLHeadElement | HTMLSpanElement> {
|
|
5
5
|
}
|
|
6
6
|
/** @flr-generate all */
|
|
7
|
-
export declare const Header: React.FunctionComponent<HeaderProps & React.RefAttributes<HTMLDivElement |
|
|
7
|
+
export declare const Header: React.FunctionComponent<HeaderProps & React.RefAttributes<HTMLDivElement | HTMLSpanElement | HTMLHeadElement>>;
|
|
8
8
|
export default Header;
|
|
9
9
|
//# sourceMappingURL=Header.d.ts.map
|
|
@@ -99,15 +99,15 @@ export declare const typedList: <T, TMeta = unknown>() => {
|
|
|
99
99
|
onTransitionStartCapture?: import('react').TransitionEventHandler<HTMLTableRowElement> | undefined;
|
|
100
100
|
id?: import('react-aria').Key | undefined;
|
|
101
101
|
rel?: string | undefined;
|
|
102
|
-
isDisabled?: boolean | undefined;
|
|
103
|
-
value?: undefined;
|
|
104
102
|
href?: import('@react-types/shared').Href | undefined;
|
|
105
103
|
target?: import('react').HTMLAttributeAnchorTarget | undefined;
|
|
104
|
+
isDisabled?: boolean | undefined;
|
|
106
105
|
onPress?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
107
106
|
onPressStart?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
108
107
|
onPressEnd?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
109
108
|
onPressChange?: ((isPressed: boolean) => void) | undefined;
|
|
110
109
|
onPressUp?: ((e: import('react-aria').PressEvent) => void) | undefined;
|
|
110
|
+
value?: undefined;
|
|
111
111
|
onHoverStart?: ((e: import('react-aria').HoverEvent) => void) | undefined;
|
|
112
112
|
onHoverEnd?: ((e: import('react-aria').HoverEvent) => void) | undefined;
|
|
113
113
|
onHoverChange?: ((isHovering: boolean) => void) | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FC,
|
|
1
|
+
import { FC, Ref } from 'react';
|
|
2
2
|
import { Options } from 'react-markdown';
|
|
3
3
|
import { PropsWithClassName } from '../../lib/types/props';
|
|
4
4
|
export interface MarkdownProps extends PropsWithClassName, Omit<Options, "components"> {
|
|
@@ -6,7 +6,7 @@ export interface MarkdownProps extends PropsWithClassName, Omit<Options, "compon
|
|
|
6
6
|
color?: "dark" | "light" | "default";
|
|
7
7
|
/** Shifts all heading levels by the given offset. @default 0 */
|
|
8
8
|
headingOffset?: number;
|
|
9
|
-
ref?:
|
|
9
|
+
ref?: Ref<HTMLDivElement>;
|
|
10
10
|
}
|
|
11
11
|
/** @flr-generate all */
|
|
12
12
|
export declare const Markdown: FC<MarkdownProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,EAAE,EAAa,
|
|
1
|
+
{"version":3,"file":"Markdown.d.ts","sourceRoot":"","sources":["../../../../src/components/Markdown/Markdown.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAiB,EAAE,EAAa,GAAG,EAAE,MAAM,OAAO,CAAC;AAE/D,OAAO,KAAK,EAAc,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAI1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,MAAM,WAAW,aACf,SAAQ,kBAAkB,EACxB,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC;IAC7B,kDAAkD;IAClD,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACrC,gEAAgE;IAChE,aAAa,CAAC,EAAE,MAAM,CAAC;IAGvB,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC3B;AAED,wBAAwB;AACxB,eAAO,MAAM,QAAQ,EAAE,EAAE,CAAC,aAAa,CAyHtC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|