@mittwald/flow-react-components 0.2.0-alpha.567 → 0.2.0-alpha.569
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 +2065 -878
- package/dist/css/all.css +1 -1
- package/dist/js/components/src/components/AccentBox/AccentBox.mjs +22 -21
- package/dist/js/components/src/components/AccentBox/AccentBox.mjs.map +1 -1
- package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs +37 -31
- package/dist/js/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
- package/dist/js/components/src/components/Align/Align.mjs +22 -16
- package/dist/js/components/src/components/Align/Align.mjs.map +1 -1
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs +61 -50
- package/dist/js/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs +7 -0
- package/dist/js/components/src/components/BrowserOnly/BrowserOnly.mjs.map +1 -1
- package/dist/js/components/src/components/CartesianChart/CartesianChart.mjs +5 -2
- 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 +4 -4
- package/dist/js/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/components/src/components/ColumnLayout/ColumnLayout.mjs +64 -58
- package/dist/js/components/src/components/ColumnLayout/ColumnLayout.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/ContextMenu/components/ContextMenuSection/ContextMenuSection.mjs +2 -1
- package/dist/js/components/src/components/ContextMenu/components/ContextMenuSection/ContextMenuSection.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/Header/Header.mjs +20 -15
- package/dist/js/components/src/components/Header/Header.mjs.map +1 -1
- package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs +1 -1
- package/dist/js/components/src/components/IllustratedMessage/IllustratedMessage.mjs.map +1 -1
- package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs +16 -12
- package/dist/js/components/src/components/LayoutCard/LayoutCard.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs +5 -2
- package/dist/js/components/src/components/List/components/Header/components/ActiveFilters/ActiveFilters.mjs.map +1 -1
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs +6 -0
- package/dist/js/components/src/components/List/components/Header/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/components/src/components/List/hooks/useAriaAnnounceSearchState.mjs +5 -2
- 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/Modal.mjs +70 -76
- package/dist/js/components/src/components/Modal/Modal.mjs.map +1 -1
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs +5 -2
- package/dist/js/components/src/components/Modal/components/OffCanvasSuspenseFallback/OffCanvasSuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +1 -4
- package/dist/js/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.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 +2 -104
- package/dist/js/components/src/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs +5 -2
- package/dist/js/components/src/components/Overlay/components/OverlaySuspenseFallback.mjs.map +1 -1
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs +10 -16
- package/dist/js/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/components/src/components/Popover/Popover.mjs +2 -106
- package/dist/js/components/src/components/Popover/Popover.mjs.map +1 -1
- package/dist/js/components/src/components/RadioGroup/RadioGroup.mjs +1 -1
- package/dist/js/components/src/components/RadioGroup/RadioGroup.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/Section/Section.mjs +41 -35
- package/dist/js/components/src/components/Section/Section.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 +6 -2
- 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/componentFactory/flowComponent.mjs +7 -23
- package/dist/js/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- 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 -2
- package/dist/js/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/components/src/lib/hooks/useProps.mjs +1 -2
- package/dist/js/components/src/lib/hooks/useProps.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs +4 -10
- package/dist/js/components/src/lib/propsContext/components/ClearPropsContext.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs +2 -2
- package/dist/js/components/src/lib/propsContext/components/ComponentPropsContextProvider.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs +7 -22
- package/dist/js/components/src/lib/propsContext/components/PropsContextProvider.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs +22 -30
- package/dist/js/components/src/lib/propsContext/mergePropsContext.mjs.map +1 -1
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs +27 -7
- package/dist/js/components/src/lib/propsContext/nestedPropsContext/lib.mjs.map +1 -1
- package/dist/js/components/src/lib/react/getPropsMerger.mjs +7 -2
- package/dist/js/components/src/lib/react/getPropsMerger.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 +2 -2
- package/dist/types/components/AccentBox/AccentBox.d.ts.map +1 -1
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts +1 -0
- package/dist/types/components/AccentBox/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
- package/dist/types/components/Align/Align.d.ts.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/ColumnLayout/ColumnLayout.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/ContextMenu/components/ContextMenuSection/ContextMenuSection.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 +2 -2
- package/dist/types/components/Header/Header.d.ts.map +1 -1
- package/dist/types/components/LayoutCard/LayoutCard.d.ts.map +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/Message/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.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/Overlay/Overlay.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/Section/Section.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/componentFactory/flowComponent.d.ts +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +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/hooks/useFieldError.d.ts.map +1 -1
- package/dist/types/lib/hooks/useProps.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts +1 -5
- package/dist/types/lib/propsContext/components/ClearPropsContext.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts +0 -2
- package/dist/types/lib/propsContext/components/ComponentPropsContextProvider.d.ts.map +1 -1
- package/dist/types/lib/propsContext/components/PropsContextProvider.d.ts +0 -3
- package/dist/types/lib/propsContext/components/PropsContextProvider.d.ts.map +1 -1
- package/dist/types/lib/propsContext/mergePropsContext.d.ts +1 -1
- package/dist/types/lib/propsContext/mergePropsContext.d.ts.map +1 -1
- package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts +3 -84
- package/dist/types/lib/propsContext/nestedPropsContext/lib.d.ts.map +1 -1
- package/dist/types/lib/propsContext/types.d.ts +1 -2
- package/dist/types/lib/propsContext/types.d.ts.map +1 -1
- package/dist/types/lib/react/getPropsMerger.d.ts.map +1 -1
- 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/propsContext/inherit/PropsContextLevelProvider.mjs +0 -20
- package/dist/js/components/src/lib/propsContext/inherit/PropsContextLevelProvider.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/lib.mjs +0 -39
- package/dist/js/components/src/lib/propsContext/inherit/lib.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs +0 -13
- package/dist/js/components/src/lib/propsContext/inherit/propsContextLevel.mjs.map +0 -1
- package/dist/js/components/src/lib/propsContext/inherit/types.mjs +0 -6
- package/dist/js/components/src/lib/propsContext/inherit/types.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/propsContext/inherit/PropsContextLevelProvider.d.ts +0 -8
- package/dist/types/lib/propsContext/inherit/PropsContextLevelProvider.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/lib.d.ts +0 -8
- package/dist/types/lib/propsContext/inherit/lib.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts +0 -4
- package/dist/types/lib/propsContext/inherit/propsContextLevel.d.ts.map +0 -1
- package/dist/types/lib/propsContext/inherit/types.d.ts +0 -6
- package/dist/types/lib/propsContext/inherit/types.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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ComponentPropsContextProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/components/ComponentPropsContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ComponentPropsContextProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/components/ComponentPropsContextProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,WAAW,kCAAmC,SAAQ,iBAAiB;IAC3E,cAAc,CAAC,EAAE,YAAY,CAAC;CAC/B;AAED;;;GAGG;AACH,eAAO,MAAM,6BAA6B,EAAE,EAAE,CAAC,kCAAkC,CAQ7E,CAAC"}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { PropsContextLevelMode } from '../inherit/types';
|
|
2
1
|
import { PropsContext as PropsContextShape } from '../types';
|
|
3
2
|
import { DependencyList, FC, PropsWithChildren } from 'react';
|
|
4
3
|
interface Props extends PropsWithChildren {
|
|
5
4
|
props: PropsContextShape;
|
|
6
5
|
dependencies?: DependencyList;
|
|
7
|
-
clear?: boolean;
|
|
8
|
-
levelMode?: PropsContextLevelMode;
|
|
9
6
|
}
|
|
10
7
|
export declare const PropsContextProvider: FC<Props>;
|
|
11
8
|
export default PropsContextProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PropsContextProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/components/PropsContextProvider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"PropsContextProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/components/PropsContextProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnE,UAAU,KAAM,SAAQ,iBAAiB;IACvC,KAAK,EAAE,iBAAiB,CAAC;IACzB,YAAY,CAAC,EAAE,cAAc,CAAC;CAC/B;AAKD,eAAO,MAAM,oBAAoB,EAAE,EAAE,CAAC,KAAK,CAWzC,CAAC;AAIH,eAAe,oBAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { PropsContext } from './types';
|
|
2
|
-
export declare const mergePropsContext: (
|
|
2
|
+
export declare const mergePropsContext: (firstContext?: PropsContext, secondContext?: PropsContext) => PropsContext;
|
|
3
3
|
export default mergePropsContext;
|
|
4
4
|
//# sourceMappingURL=mergePropsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergePropsContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/mergePropsContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mergePropsContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/mergePropsContext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAkB,MAAM,0BAA0B,CAAC;AAQ7E,eAAO,MAAM,iBAAiB,GAC5B,eAAc,YAAiB,EAC/B,gBAAe,YAAiB,KAC/B,YAeF,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -1,88 +1,7 @@
|
|
|
1
1
|
import { PropsContext } from '../types';
|
|
2
2
|
import { NestingLevelProps } from './types';
|
|
3
|
-
export declare function isNestingProps(propsContext:
|
|
3
|
+
export declare function isNestingProps(propsContext: unknown): propsContext is NestingLevelProps;
|
|
4
4
|
export declare function isNestingLevelKey(key: string): key is "___nestingLevel";
|
|
5
|
-
export declare const getNestingLevel: (props:
|
|
6
|
-
export declare const
|
|
7
|
-
___nestingLevel: number;
|
|
8
|
-
AccentBox?: import('../types').ComponentPropsContext<"AccentBox"> | undefined;
|
|
9
|
-
Action?: import('../types').ComponentPropsContext<"Action"> | undefined;
|
|
10
|
-
ActionGroup?: import('../types').ComponentPropsContext<"ActionGroup"> | undefined;
|
|
11
|
-
Alert?: import('../types').ComponentPropsContext<"Alert"> | undefined;
|
|
12
|
-
AlertBadge?: import('../types').ComponentPropsContext<"AlertBadge"> | undefined;
|
|
13
|
-
AlertIcon?: import('../types').ComponentPropsContext<"AlertIcon"> | undefined;
|
|
14
|
-
Align?: import('../types').ComponentPropsContext<"Align"> | undefined;
|
|
15
|
-
Avatar?: import('../types').ComponentPropsContext<"Avatar"> | undefined;
|
|
16
|
-
Autocomplete?: import('../types').ComponentPropsContext<"Autocomplete"> | undefined;
|
|
17
|
-
Badge?: import('../types').ComponentPropsContext<"Badge"> | undefined;
|
|
18
|
-
Button?: import('../types').ComponentPropsContext<"Button"> | undefined;
|
|
19
|
-
Checkbox?: import('../types').ComponentPropsContext<"Checkbox"> | undefined;
|
|
20
|
-
CheckboxButton?: import('../types').ComponentPropsContext<"CheckboxButton"> | undefined;
|
|
21
|
-
CheckboxGroup?: import('../types').ComponentPropsContext<"CheckboxGroup"> | undefined;
|
|
22
|
-
ColumnLayout?: import('../types').ComponentPropsContext<"ColumnLayout"> | undefined;
|
|
23
|
-
ComboBox?: import('../types').ComponentPropsContext<"ComboBox"> | undefined;
|
|
24
|
-
Content?: import('../types').ComponentPropsContext<"Content"> | undefined;
|
|
25
|
-
ContextMenu?: import('../types').ComponentPropsContext<"ContextMenu"> | undefined;
|
|
26
|
-
ContextMenuSection?: import('../types').ComponentPropsContext<"ContextMenuSection"> | undefined;
|
|
27
|
-
ContextMenuTrigger?: import('../types').ComponentPropsContext<"ContextMenuTrigger"> | undefined;
|
|
28
|
-
ContextualHelp?: import('../types').ComponentPropsContext<"ContextualHelp"> | undefined;
|
|
29
|
-
ContextualHelpTrigger?: import('../types').ComponentPropsContext<"ContextualHelpTrigger"> | undefined;
|
|
30
|
-
CopyButton?: import('../types').ComponentPropsContext<"CopyButton"> | undefined;
|
|
31
|
-
CounterBadge?: import('../types').ComponentPropsContext<"CounterBadge"> | undefined;
|
|
32
|
-
CountryOptions?: import('../types').ComponentPropsContext<"CountryOptions"> | undefined;
|
|
33
|
-
DatePicker?: import('../types').ComponentPropsContext<"DatePicker"> | undefined;
|
|
34
|
-
DateRangePicker?: import('../types').ComponentPropsContext<"DateRangePicker"> | undefined;
|
|
35
|
-
FieldDescription?: import('../types').ComponentPropsContext<"FieldDescription"> | undefined;
|
|
36
|
-
FieldError?: import('../types').ComponentPropsContext<"FieldError"> | undefined;
|
|
37
|
-
FileCard?: import('../types').ComponentPropsContext<"FileCard"> | undefined;
|
|
38
|
-
FileCardList?: import('../types').ComponentPropsContext<"FileCardList"> | undefined;
|
|
39
|
-
FileField?: import('../types').ComponentPropsContext<"FileField"> | undefined;
|
|
40
|
-
FileDropZone?: import('../types').ComponentPropsContext<"FileDropZone"> | undefined;
|
|
41
|
-
Header?: import('../types').ComponentPropsContext<"Header"> | undefined;
|
|
42
|
-
Heading?: import('../types').ComponentPropsContext<"Heading"> | undefined;
|
|
43
|
-
Icon?: import('../types').ComponentPropsContext<"Icon"> | undefined;
|
|
44
|
-
Image?: import('../types').ComponentPropsContext<"Image"> | undefined;
|
|
45
|
-
Initials?: import('../types').ComponentPropsContext<"Initials"> | undefined;
|
|
46
|
-
Label?: import('../types').ComponentPropsContext<"Label"> | undefined;
|
|
47
|
-
LayoutCard?: import('../types').ComponentPropsContext<"LayoutCard"> | undefined;
|
|
48
|
-
LightBox?: import('../types').ComponentPropsContext<"LightBox"> | undefined;
|
|
49
|
-
Link?: import('../types').ComponentPropsContext<"Link"> | undefined;
|
|
50
|
-
List?: import('../types').ComponentPropsContext<"List"> | undefined;
|
|
51
|
-
ListSummary?: import('../types').ComponentPropsContext<"ListSummary"> | undefined;
|
|
52
|
-
MarkdownEditor?: import('../types').ComponentPropsContext<"MarkdownEditor"> | undefined;
|
|
53
|
-
MenuItem?: import('../types').ComponentPropsContext<"MenuItem"> | undefined;
|
|
54
|
-
MenuTrigger?: import('../types').ComponentPropsContext<"MenuTrigger"> | undefined;
|
|
55
|
-
Message?: import('../types').ComponentPropsContext<"Message"> | undefined;
|
|
56
|
-
MessageThread?: import('../types').ComponentPropsContext<"MessageThread"> | undefined;
|
|
57
|
-
Modal?: import('../types').ComponentPropsContext<"Modal"> | undefined;
|
|
58
|
-
Navigation?: import('../types').ComponentPropsContext<"Navigation"> | undefined;
|
|
59
|
-
NavigationGroup?: import('../types').ComponentPropsContext<"NavigationGroup"> | undefined;
|
|
60
|
-
NumberField?: import('../types').ComponentPropsContext<"NumberField"> | undefined;
|
|
61
|
-
Option?: import('../types').ComponentPropsContext<"Option"> | undefined;
|
|
62
|
-
Options?: import('../types').ComponentPropsContext<"Options"> | undefined;
|
|
63
|
-
Popover?: import('../types').ComponentPropsContext<"Popover"> | undefined;
|
|
64
|
-
PopoverTrigger?: import('../types').ComponentPropsContext<"PopoverTrigger"> | undefined;
|
|
65
|
-
PasswordCreationField?: import('../types').ComponentPropsContext<"PasswordCreationField"> | undefined;
|
|
66
|
-
ProgressBar?: import('../types').ComponentPropsContext<"ProgressBar"> | undefined;
|
|
67
|
-
Radio?: import('../types').ComponentPropsContext<"Radio"> | undefined;
|
|
68
|
-
RadioButton?: import('../types').ComponentPropsContext<"RadioButton"> | undefined;
|
|
69
|
-
RadioGroup?: import('../types').ComponentPropsContext<"RadioGroup"> | undefined;
|
|
70
|
-
SearchField?: import('../types').ComponentPropsContext<"SearchField"> | undefined;
|
|
71
|
-
Section?: import('../types').ComponentPropsContext<"Section"> | undefined;
|
|
72
|
-
Segment?: import('../types').ComponentPropsContext<"Segment"> | undefined;
|
|
73
|
-
SegmentedControl?: import('../types').ComponentPropsContext<"SegmentedControl"> | undefined;
|
|
74
|
-
Select?: import('../types').ComponentPropsContext<"Select"> | undefined;
|
|
75
|
-
Slider?: import('../types').ComponentPropsContext<"Slider"> | undefined;
|
|
76
|
-
SubmitButton?: import('../types').ComponentPropsContext<"SubmitButton"> | undefined;
|
|
77
|
-
ResetButton?: import('../types').ComponentPropsContext<"ResetButton"> | undefined;
|
|
78
|
-
Switch?: import('../types').ComponentPropsContext<"Switch"> | undefined;
|
|
79
|
-
Tabs?: import('../types').ComponentPropsContext<"Tabs"> | undefined;
|
|
80
|
-
TabTitle?: import('../types').ComponentPropsContext<"TabTitle"> | undefined;
|
|
81
|
-
Text?: import('../types').ComponentPropsContext<"Text"> | undefined;
|
|
82
|
-
TextArea?: import('../types').ComponentPropsContext<"TextArea"> | undefined;
|
|
83
|
-
TextField?: import('../types').ComponentPropsContext<"TextField"> | undefined;
|
|
84
|
-
TimeField?: import('../types').ComponentPropsContext<"TimeField"> | undefined;
|
|
85
|
-
TestComponent?: import('../types').ComponentPropsContext<"TestComponent"> | undefined;
|
|
86
|
-
___inherit?: boolean | "preserve";
|
|
87
|
-
};
|
|
5
|
+
export declare const getNestingLevel: (props: unknown) => number;
|
|
6
|
+
export declare const addNestingLevel: (propsContext: PropsContext, currentLevel?: number) => PropsContext;
|
|
88
7
|
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/nestedPropsContext/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6CAA6C,CAAC;
|
|
1
|
+
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/nestedPropsContext/lib.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6CAA6C,CAAC;AAGrD,wBAAgB,cAAc,CAC5B,YAAY,EAAE,OAAO,GACpB,YAAY,IAAI,iBAAiB,CAOnC;AAED,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,4BAE5C;AAED,eAAO,MAAM,eAAe,GAAI,OAAO,OAAO,WAE7C,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,cAAc,YAAY,EAC1B,qBAAgB,iBAgBjB,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { FlowComponentName, FlowComponentPropName, FlowComponentPropType } from '../../components/propTypes/types';
|
|
2
2
|
import { DynamicProp } from './dynamicProps/types';
|
|
3
|
-
import { InheritPropsContextSettings } from './inherit/types';
|
|
4
3
|
import { NestingLevelProps } from './nestedPropsContext/types';
|
|
5
4
|
export type PropsContext = Partial<{
|
|
6
5
|
[C in FlowComponentName]: ComponentPropsContext<C>;
|
|
7
|
-
}> &
|
|
6
|
+
}> & NestingLevelProps;
|
|
8
7
|
export type ComponentPropsContext<C extends FlowComponentName> = Partial<{
|
|
9
8
|
[P in FlowComponentPropName<C>]: FlowComponentPropType<C, P> | DynamicProp<C, P>;
|
|
10
9
|
}> & PropsContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/propsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,iBAAiB,EACjB,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAErF,MAAM,MAAM,YAAY,GAAG,OAAO,CAAC;KAChC,CAAC,IAAI,iBAAiB,GAAG,qBAAqB,CAAC,CAAC,CAAC;CACnD,CAAC,GACA,iBAAiB,CAAC;AAEpB,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,iBAAiB,IAAI,OAAO,CAAC;KACtE,CAAC,IAAI,qBAAqB,CAAC,CAAC,CAAC,GAC1B,qBAAqB,CAAC,CAAC,EAAE,CAAC,CAAC,GAC3B,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;CACtB,CAAC,GACA,YAAY,CAAC;AAIf,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPropsMerger.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/getPropsMerger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"getPropsMerger.d.ts","sourceRoot":"","sources":["../../../../src/lib/react/getPropsMerger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAMjE,UAAU,iBAAiB;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,cAAc,GACxB,UAAS,iBAAsB,KAAG,OAAO,cA+DzC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface EventHandlerContext {
|
|
2
|
+
remoteEvent?: {
|
|
3
|
+
type: string;
|
|
4
|
+
};
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
}
|
|
7
|
+
export declare const eventHandlerContext: import('context').CtxCascadeApi<EventHandlerContext>;
|
|
8
|
+
export declare const getRemoteEvent: () => {
|
|
9
|
+
type: string;
|
|
10
|
+
} | undefined;
|
|
11
|
+
//# sourceMappingURL=eventHandlerContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"eventHandlerContext.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote/eventHandlerContext.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE;QACZ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,sDAAuC,CAAC;AAExE,eAAO,MAAM,cAAc;UAPjB,MAAM;aAO0D,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,CAAC,CAAC,EAAE,CAAC,IAAI;IAC7B,KAAK,CAAC,EAAE,CAAC,CAAC;IACV,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,GAAG,CAAC,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FieldProps } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns props with controlled value handling for remote components. It works
|
|
4
|
+
* by omitting values resulting from a remotely executed event handler. These
|
|
5
|
+
* values are marked by the `controlledRemoteValueMarker`.
|
|
6
|
+
*
|
|
7
|
+
* This hook is noly necessary for text inputs. If not use the controlled input
|
|
8
|
+
* value may be corrupted by interleaved host inputs and remote events.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useControlledHostValueProps: <T, P>(props: FieldProps<T, P>) => {
|
|
11
|
+
value?: T | undefined;
|
|
12
|
+
defaultValue?: T | undefined;
|
|
13
|
+
onChange?: ((value: T) => void) | undefined;
|
|
14
|
+
} & P & {
|
|
15
|
+
value: T | undefined;
|
|
16
|
+
onChange: (v: any) => void;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=useControlledHostValueProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledHostValueProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote/useControlledHostValueProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,GAAI,CAAC,EAAE,CAAC,EAAE,OAAO,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;;kBAmBlD,GAAG;CAUzB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FieldProps } from './types';
|
|
2
|
+
export declare const controlledRemoteValueMarker = "___flowControlledRemoteValue___";
|
|
3
|
+
export declare const useControlledRemoteValueProps: <T, P>(props: FieldProps<T, P>) => {
|
|
4
|
+
value?: T | undefined;
|
|
5
|
+
defaultValue?: T | undefined;
|
|
6
|
+
onChange?: ((value: T) => void) | undefined;
|
|
7
|
+
} & P & {
|
|
8
|
+
onChange: (value: T) => void;
|
|
9
|
+
value: string | T | undefined;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=useControlledRemoteValueProps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledRemoteValueProps.d.ts","sourceRoot":"","sources":["../../../../src/lib/remote/useControlledRemoteValueProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAIrD,eAAO,MAAM,2BAA2B,oCAAoC,CAAC;AAE7E,eAAO,MAAM,6BAA6B,GAAI,CAAC,EAAE,CAAC,EAChD,OAAO,UAAU,CAAC,CAAC,EAAE,CAAC,CAAC;;;;;sBAIE,CAAC;;CAY3B,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.569",
|
|
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.569",
|
|
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",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"@types/react-dom": "^19.2.2",
|
|
75
75
|
"@types/react-syntax-highlighter": "^15.5.13",
|
|
76
76
|
"clsx": "^2.1.1",
|
|
77
|
+
"context": "^3.0.33",
|
|
77
78
|
"copy-to-clipboard": "^3.3.3",
|
|
78
79
|
"dot-prop": "^10.1.0",
|
|
79
80
|
"framer-motion": "^12.23.24",
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
"@faker-js/faker": "^10.1.0",
|
|
103
104
|
"@internationalized/date": "^3.10.0",
|
|
104
105
|
"@mittwald/flow-core": "",
|
|
105
|
-
"@mittwald/flow-design-tokens": "0.2.0-alpha.
|
|
106
|
+
"@mittwald/flow-design-tokens": "0.2.0-alpha.569",
|
|
106
107
|
"@mittwald/react-use-promise": "^4.2.2",
|
|
107
108
|
"@mittwald/remote-dom-react": "1.2.2-mittwald.10",
|
|
108
109
|
"@mittwald/typescript-config": "",
|
|
@@ -175,5 +176,5 @@
|
|
|
175
176
|
"optional": true
|
|
176
177
|
}
|
|
177
178
|
},
|
|
178
|
-
"gitHead": "
|
|
179
|
+
"gitHead": "b3cc64583d628802ab78e5cc3a726f8e8537dff4"
|
|
179
180
|
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
|
|
5
|
-
const useManagedValue = (props, onChange = props.onChange, managedValuePropName = {
|
|
6
|
-
value: "value",
|
|
7
|
-
defaultValue: "defaultValue"
|
|
8
|
-
}) => {
|
|
9
|
-
const valueFromProps = props[managedValuePropName.value];
|
|
10
|
-
const defaultValueFromProps = props[managedValuePropName.defaultValue];
|
|
11
|
-
const isControlled = typeof valueFromProps !== "undefined";
|
|
12
|
-
const hasDefaultValue = typeof defaultValueFromProps !== "undefined";
|
|
13
|
-
const [internalValue, setInternalValue] = useState(
|
|
14
|
-
hasDefaultValue ? defaultValueFromProps : valueFromProps
|
|
15
|
-
);
|
|
16
|
-
const value = isControlled ? valueFromProps : internalValue;
|
|
17
|
-
const handleOnChange = (value2) => {
|
|
18
|
-
onChange?.(value2);
|
|
19
|
-
if (!isControlled) {
|
|
20
|
-
setInternalValue(() => value2);
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return { value, handleOnChange };
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export { useManagedValue };
|
|
27
|
-
//# sourceMappingURL=useManagedValue.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useManagedValue.mjs","sources":["../../../../../../src/lib/hooks/useManagedValue.ts"],"sourcesContent":["import { useState } from \"react\";\n\ninterface ManagedValuePropNames<K extends string> {\n value: K;\n defaultValue: K;\n}\n\ntype PossibleValueProps<P> = Extract<\n keyof Omit<P, \"onChange\">,\n string | boolean\n>;\n\nexport const useManagedValue = <\n P extends object,\n V = unknown,\n PDV extends PossibleValueProps<P> = PossibleValueProps<P>,\n>(\n props: P & { onChange?: (value: V) => void },\n onChange = props.onChange,\n managedValuePropName: ManagedValuePropNames<PDV> = {\n value: \"value\" as PDV,\n defaultValue: \"defaultValue\" as PDV,\n },\n) => {\n const valueFromProps = props[managedValuePropName.value] as V;\n const defaultValueFromProps = props[managedValuePropName.defaultValue] as V;\n\n const isControlled = typeof valueFromProps !== \"undefined\";\n const hasDefaultValue = typeof defaultValueFromProps !== \"undefined\";\n\n const [internalValue, setInternalValue] = useState(\n hasDefaultValue ? defaultValueFromProps : valueFromProps,\n );\n const value = isControlled ? valueFromProps : internalValue;\n\n const handleOnChange = (value: V) => {\n onChange?.(value);\n\n if (!isControlled) {\n setInternalValue(() => value);\n }\n };\n\n return { value, handleOnChange } as const;\n};\n"],"names":["value"],"mappings":";;AAYO,MAAM,kBAAkB,CAK7B,KAAA,EACA,QAAA,GAAW,KAAA,CAAM,UACjB,oBAAA,GAAmD;AAAA,EACjD,KAAA,EAAO,OAAA;AAAA,EACP,YAAA,EAAc;AAChB,CAAA,KACG;AACH,EAAA,MAAM,cAAA,GAAiB,KAAA,CAAM,oBAAA,CAAqB,KAAK,CAAA;AACvD,EAAA,MAAM,qBAAA,GAAwB,KAAA,CAAM,oBAAA,CAAqB,YAAY,CAAA;AAErE,EAAA,MAAM,YAAA,GAAe,OAAO,cAAA,KAAmB,WAAA;AAC/C,EAAA,MAAM,eAAA,GAAkB,OAAO,qBAAA,KAA0B,WAAA;AAEzD,EAAA,MAAM,CAAC,aAAA,EAAe,gBAAgB,CAAA,GAAI,QAAA;AAAA,IACxC,kBAAkB,qBAAA,GAAwB;AAAA,GAC5C;AACA,EAAA,MAAM,KAAA,GAAQ,eAAe,cAAA,GAAiB,aAAA;AAE9C,EAAA,MAAM,cAAA,GAAiB,CAACA,MAAAA,KAAa;AACnC,IAAA,QAAA,GAAWA,MAAK,CAAA;AAEhB,IAAA,IAAI,CAAC,YAAA,EAAc;AACjB,MAAA,gBAAA,CAAiB,MAAMA,MAAK,CAAA;AAAA,IAC9B;AAAA,EACF,CAAA;AAEA,EAAA,OAAO,EAAE,OAAO,cAAA,EAAe;AACjC;;;;"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import { propsContextLevelContext, usePropsContextLevel } from './propsContextLevel.mjs';
|
|
5
|
-
import { memo } from 'react';
|
|
6
|
-
|
|
7
|
-
const Provider = memo(propsContextLevelContext.Provider);
|
|
8
|
-
Provider.displayName = "PropsContextLevelContextProviderInner";
|
|
9
|
-
const PropsContextLevelProvider = memo((props) => {
|
|
10
|
-
const { mode, children } = props;
|
|
11
|
-
const newLevel = usePropsContextLevel(mode);
|
|
12
|
-
if (mode === "keep") {
|
|
13
|
-
return children;
|
|
14
|
-
}
|
|
15
|
-
return /* @__PURE__ */ jsx(Provider, { value: newLevel, children });
|
|
16
|
-
});
|
|
17
|
-
PropsContextLevelProvider.displayName = "PropsContextLevelProvider";
|
|
18
|
-
|
|
19
|
-
export { PropsContextLevelProvider, PropsContextLevelProvider as default };
|
|
20
|
-
//# sourceMappingURL=PropsContextLevelProvider.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PropsContextLevelProvider.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/PropsContextLevelProvider.tsx"],"sourcesContent":["import {\n propsContextLevelContext,\n usePropsContextLevel,\n} from \"@/lib/propsContext/inherit/propsContextLevel\";\nimport type { PropsContextLevelMode } from \"@/lib/propsContext/inherit/types\";\nimport { memo, type FC, type PropsWithChildren } from \"react\";\n\nexport interface PropsContextLevelProviderProps extends PropsWithChildren {\n mode: PropsContextLevelMode;\n}\n\nconst Provider = memo(propsContextLevelContext.Provider);\nProvider.displayName = \"PropsContextLevelContextProviderInner\";\n\nexport const PropsContextLevelProvider: FC<PropsContextLevelProviderProps> =\n memo((props) => {\n const { mode, children } = props;\n\n const newLevel = usePropsContextLevel(mode);\n\n if (mode === \"keep\") {\n return children;\n }\n\n return <Provider value={newLevel}>{children}</Provider>;\n });\n\nPropsContextLevelProvider.displayName = \"PropsContextLevelProvider\";\n\nexport default PropsContextLevelProvider;\n"],"names":[],"mappings":";;;;AAWA,MAAM,QAAA,GAAW,IAAA,CAAK,wBAAA,CAAyB,QAAQ,CAAA;AACvD,QAAA,CAAS,WAAA,GAAc,uCAAA;AAEhB,MAAM,yBAAA,GACX,IAAA,CAAK,CAAC,KAAA,KAAU;AACd,EAAA,MAAM,EAAE,IAAA,EAAM,QAAA,EAAS,GAAI,KAAA;AAE3B,EAAA,MAAM,QAAA,GAAW,qBAAqB,IAAI,CAAA;AAE1C,EAAA,IAAI,SAAS,MAAA,EAAQ;AACnB,IAAA,OAAO,QAAA;AAAA,EACT;AAEA,EAAA,uBAAO,GAAA,CAAC,QAAA,EAAA,EAAS,KAAA,EAAO,QAAA,EAAW,QAAA,EAAS,CAAA;AAC9C,CAAC;AAEH,yBAAA,CAA0B,WAAA,GAAc,2BAAA;;;;"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { inheritPropsContextKey } from './types.mjs';
|
|
4
|
-
|
|
5
|
-
function isMaxRecursionLevelProp(something) {
|
|
6
|
-
return !!something && typeof something === "object" && inheritPropsContextKey in something;
|
|
7
|
-
}
|
|
8
|
-
const getMaxRecursionLevel = (props) => {
|
|
9
|
-
if (isMaxRecursionLevelProp(props)) {
|
|
10
|
-
return props[inheritPropsContextKey] ? Infinity : 0;
|
|
11
|
-
}
|
|
12
|
-
return 0;
|
|
13
|
-
};
|
|
14
|
-
const isInheritedPropsContextKey = (key) => key === inheritPropsContextKey;
|
|
15
|
-
const getLevelAfterModeApplied = (currentLevel, mode) => {
|
|
16
|
-
switch (mode) {
|
|
17
|
-
case "increment":
|
|
18
|
-
return currentLevel + 1;
|
|
19
|
-
case "decrement":
|
|
20
|
-
return currentLevel - 1;
|
|
21
|
-
case "reset":
|
|
22
|
-
return 0;
|
|
23
|
-
case "keep":
|
|
24
|
-
default:
|
|
25
|
-
return currentLevel;
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const filterPreservedInheritEntries = (currentPropsContext) => {
|
|
29
|
-
const resultPropsContext = {};
|
|
30
|
-
for (const [key, value] of Object.entries(currentPropsContext)) {
|
|
31
|
-
if (value && typeof value === "object" && !Array.isArray(value) && value.___inherit && value.___inherit === "preserve") {
|
|
32
|
-
resultPropsContext[key] = value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
return resultPropsContext;
|
|
36
|
-
};
|
|
37
|
-
|
|
38
|
-
export { filterPreservedInheritEntries, getLevelAfterModeApplied, getMaxRecursionLevel, isInheritedPropsContextKey, isMaxRecursionLevelProp };
|
|
39
|
-
//# sourceMappingURL=lib.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/lib.ts"],"sourcesContent":["import {\n inheritPropsContextKey,\n type InheritPropsContextSettings,\n type PropsContextLevelMode,\n} from \"@/lib/propsContext/inherit/types\";\nimport type { PropsContext as PropsContextShape } from \"@/lib/propsContext\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport function isMaxRecursionLevelProp(\n something: unknown,\n): something is InheritPropsContextSettings {\n return (\n !!something &&\n typeof something === \"object\" &&\n inheritPropsContextKey in something\n );\n}\n\nexport const getMaxRecursionLevel = (props: unknown) => {\n if (isMaxRecursionLevelProp(props)) {\n return props[inheritPropsContextKey] ? Infinity : 0;\n }\n return 0;\n};\n\nexport const isInheritedPropsContextKey = (key: unknown) =>\n key === inheritPropsContextKey;\n\nexport const getLevelAfterModeApplied = (\n currentLevel: number,\n mode: PropsContextLevelMode,\n) => {\n switch (mode) {\n case \"increment\":\n return currentLevel + 1;\n case \"decrement\":\n return currentLevel - 1;\n case \"reset\":\n return 0;\n case \"keep\":\n default:\n return currentLevel;\n }\n};\n\nexport const filterPreservedInheritEntries = (\n currentPropsContext: PropsContextShape,\n): Partial<PropsContextShape> => {\n const resultPropsContext: Partial<PropsContextShape> = {};\n\n for (const [key, value] of Object.entries(currentPropsContext)) {\n if (\n value &&\n typeof value === \"object\" &&\n !Array.isArray(value) &&\n value.___inherit &&\n value.___inherit === \"preserve\"\n ) {\n resultPropsContext[key as FlowComponentName] = value;\n }\n }\n\n return resultPropsContext;\n};\n"],"names":[],"mappings":";;AAQO,SAAS,wBACd,SAAA,EAC0C;AAC1C,EAAA,OACE,CAAC,CAAC,SAAA,IACF,OAAO,SAAA,KAAc,YACrB,sBAAA,IAA0B,SAAA;AAE9B;AAEO,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAAmB;AACtD,EAAA,IAAI,uBAAA,CAAwB,KAAK,CAAA,EAAG;AAClC,IAAA,OAAO,KAAA,CAAM,sBAAsB,CAAA,GAAI,QAAA,GAAW,CAAA;AAAA,EACpD;AACA,EAAA,OAAO,CAAA;AACT;AAEO,MAAM,0BAAA,GAA6B,CAAC,GAAA,KACzC,GAAA,KAAQ;AAEH,MAAM,wBAAA,GAA2B,CACtC,YAAA,EACA,IAAA,KACG;AACH,EAAA,QAAQ,IAAA;AAAM,IACZ,KAAK,WAAA;AACH,MAAA,OAAO,YAAA,GAAe,CAAA;AAAA,IACxB,KAAK,WAAA;AACH,MAAA,OAAO,YAAA,GAAe,CAAA;AAAA,IACxB,KAAK,OAAA;AACH,MAAA,OAAO,CAAA;AAAA,IACT,KAAK,MAAA;AAAA,IACL;AACE,MAAA,OAAO,YAAA;AAAA;AAEb;AAEO,MAAM,6BAAA,GAAgC,CAC3C,mBAAA,KAC+B;AAC/B,EAAA,MAAM,qBAAiD,EAAC;AAExD,EAAA,KAAA,MAAW,CAAC,GAAA,EAAK,KAAK,KAAK,MAAA,CAAO,OAAA,CAAQ,mBAAmB,CAAA,EAAG;AAC9D,IAAA,IACE,KAAA,IACA,OAAO,KAAA,KAAU,QAAA,IACjB,CAAC,KAAA,CAAM,OAAA,CAAQ,KAAK,CAAA,IACpB,KAAA,CAAM,UAAA,IACN,KAAA,CAAM,eAAe,UAAA,EACrB;AACA,MAAA,kBAAA,CAAmB,GAAwB,CAAA,GAAI,KAAA;AAAA,IACjD;AAAA,EACF;AAEA,EAAA,OAAO,kBAAA;AACT;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { getLevelAfterModeApplied } from './lib.mjs';
|
|
4
|
-
import { createContext, useContext } from 'react';
|
|
5
|
-
|
|
6
|
-
const propsContextLevelContext = createContext(0);
|
|
7
|
-
const usePropsContextLevel = (mode = "keep") => {
|
|
8
|
-
const level = useContext(propsContextLevelContext);
|
|
9
|
-
return getLevelAfterModeApplied(level, mode);
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
export { propsContextLevelContext, usePropsContextLevel };
|
|
13
|
-
//# sourceMappingURL=propsContextLevel.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propsContextLevel.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/propsContextLevel.ts"],"sourcesContent":["import { getLevelAfterModeApplied } from \"@/lib/propsContext/inherit/lib\";\nimport type { PropsContextLevelMode } from \"@/lib/propsContext/inherit/types\";\nimport { createContext, useContext } from \"react\";\n\nexport const propsContextLevelContext = createContext<number>(0);\n\nexport const usePropsContextLevel = (\n mode: PropsContextLevelMode = \"keep\",\n): number => {\n const level = useContext(propsContextLevelContext);\n return getLevelAfterModeApplied(level, mode);\n};\n"],"names":[],"mappings":";;;AAIO,MAAM,wBAAA,GAA2B,cAAsB,CAAC;AAExD,MAAM,oBAAA,GAAuB,CAClC,IAAA,GAA8B,MAAA,KACnB;AACX,EAAA,MAAM,KAAA,GAAQ,WAAW,wBAAwB,CAAA;AACjD,EAAA,OAAO,wBAAA,CAAyB,OAAO,IAAI,CAAA;AAC7C;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sources":["../../../../../../../src/lib/propsContext/inherit/types.ts"],"sourcesContent":["/** @internal */\nexport const inheritPropsContextKey = \"___inherit\" as const;\n\n/** @internal */\nexport type InheritPropsContextKey = typeof inheritPropsContextKey;\n\nexport interface InheritPropsContextSettings {\n [inheritPropsContextKey]?: boolean | \"preserve\";\n}\n\nexport const inheritProps: InheritPropsContextSettings = {\n [inheritPropsContextKey]: true,\n};\n\nexport type PropsContextLevelMode =\n | \"reset\"\n | \"increment\"\n | \"decrement\"\n | \"keep\";\n"],"names":[],"mappings":"AACO,MAAM,sBAAA,GAAyB;;;;"}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
import * as Aria from 'react-aria-components';
|
|
5
|
-
import { Children, isValidElement, useRef, useDeferredValue, useEffect, useLayoutEffect } from 'react';
|
|
6
|
-
import { emitElementValueChange } from './emitElementValueChange.mjs';
|
|
7
|
-
|
|
8
|
-
const ReactAriaControlledValueFix = (props) => {
|
|
9
|
-
const { inputContext: context, children } = props;
|
|
10
|
-
const child = Children.only(children);
|
|
11
|
-
if (!isValidElement(child)) {
|
|
12
|
-
throw new Error("Expected valid element");
|
|
13
|
-
}
|
|
14
|
-
const { ref, inputRef, ...inputProps } = child.props;
|
|
15
|
-
const [contextProps, contextRef] = Aria.useContextProps(
|
|
16
|
-
inputProps,
|
|
17
|
-
inputRef ?? ref,
|
|
18
|
-
context
|
|
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(
|
|
24
|
-
String(contextProps.value ?? "")
|
|
25
|
-
);
|
|
26
|
-
useEffect(() => {
|
|
27
|
-
if (!isValidElementType || !elementRef) {
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
emitElementValueChange(elementRef, deferredValueFromContext);
|
|
31
|
-
const onFocus = (event) => {
|
|
32
|
-
isInFocus.current = !!event?.isTrusted;
|
|
33
|
-
};
|
|
34
|
-
const onBlur = () => {
|
|
35
|
-
isInFocus.current = false;
|
|
36
|
-
};
|
|
37
|
-
elementRef.addEventListener("focus", onFocus);
|
|
38
|
-
elementRef.addEventListener("blur", onBlur);
|
|
39
|
-
return () => {
|
|
40
|
-
elementRef.removeEventListener("focus", onFocus);
|
|
41
|
-
elementRef.removeEventListener("blur", onBlur);
|
|
42
|
-
};
|
|
43
|
-
}, [elementRef]);
|
|
44
|
-
useLayoutEffect(() => {
|
|
45
|
-
if (!isValidElementType || isInFocus.current) {
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
emitElementValueChange(elementRef, deferredValueFromContext);
|
|
49
|
-
if (elementRef) {
|
|
50
|
-
const { selectionStart, selectionEnd } = elementRef;
|
|
51
|
-
elementRef.focus();
|
|
52
|
-
elementRef.selectionStart = selectionStart;
|
|
53
|
-
elementRef.selectionEnd = selectionEnd;
|
|
54
|
-
}
|
|
55
|
-
}, [deferredValueFromContext]);
|
|
56
|
-
const uncontrolledContextProps = {
|
|
57
|
-
...contextProps,
|
|
58
|
-
value: void 0,
|
|
59
|
-
ref: contextRef
|
|
60
|
-
};
|
|
61
|
-
return /* @__PURE__ */ jsx(Aria.Provider, { values: [[context, uncontrolledContextProps]], children: child });
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export { ReactAriaControlledValueFix };
|
|
65
|
-
//# sourceMappingURL=ReactAriaControlledValueFix.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
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 useEffect,\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 inputRef: 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, inputRef, ...inputProps } = child.props;\n const [contextProps, contextRef] = Aria.useContextProps(\n inputProps,\n inputRef ?? 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(\n String(contextProps.value ?? \"\"),\n );\n\n useEffect(() => {\n if (!isValidElementType || !elementRef) {\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 if (elementRef) {\n const { selectionStart, selectionEnd } = elementRef;\n elementRef.focus();\n elementRef.selectionStart = selectionStart;\n elementRef.selectionEnd = selectionEnd;\n }\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":";;;;;AAoCO,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,QAAA,EAAU,GAAG,UAAA,KAAe,KAAA,CAAM,KAAA;AAC/C,EAAA,MAAM,CAAC,YAAA,EAAc,UAAU,CAAA,GAAI,IAAA,CAAK,eAAA;AAAA,IACtC,UAAA;AAAA,IACA,QAAA,IAAY,GAAA;AAAA,IACZ;AAAA,GACF;AAEA,EAAA,MAAM,aAAa,UAAA,CAAW,OAAA;AAC9B,EAAA,MAAM,SAAA,GAAY,OAAO,KAAK,CAAA;AAE9B,EAAA,MAAM,kBAAA,GACJ,UAAA,KACC,UAAA,YAAsB,gBAAA,IACrB,UAAA,YAAsB,mBAAA,CAAA;AAE1B,EAAA,MAAM,wBAAA,GAA2B,gBAAA;AAAA,IAC/B,MAAA,CAAO,YAAA,CAAa,KAAA,IAAS,EAAE;AAAA,GACjC;AAEA,EAAA,SAAA,CAAU,MAAM;AACd,IAAA,IAAI,CAAC,kBAAA,IAAsB,CAAC,UAAA,EAAY;AACtC,MAAA;AAAA,IACF;AAGA,IAAA,sBAAA,CAAuB,YAAY,wBAAwB,CAAA;AAE3D,IAAA,MAAM,OAAA,GAAU,CAAC,KAAA,KAAiB;AAChC,MAAA,SAAA,CAAU,OAAA,GAAU,CAAC,CAAC,KAAA,EAAO,SAAA;AAAA,IAC/B,CAAA;AACA,IAAA,MAAM,SAAS,MAAM;AACnB,MAAA,SAAA,CAAU,OAAA,GAAU,KAAA;AAAA,IACtB,CAAA;AAEA,IAAA,UAAA,CAAW,gBAAA,CAAiB,SAAS,OAAO,CAAA;AAC5C,IAAA,UAAA,CAAW,gBAAA,CAAiB,QAAQ,MAAM,CAAA;AAE1C,IAAA,OAAO,MAAM;AACX,MAAA,UAAA,CAAW,mBAAA,CAAoB,SAAS,OAAO,CAAA;AAC/C,MAAA,UAAA,CAAW,mBAAA,CAAoB,QAAQ,MAAM,CAAA;AAAA,IAC/C,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,UAAU,CAAC,CAAA;AAEf,EAAA,eAAA,CAAgB,MAAM;AACpB,IAAA,IAAI,CAAC,kBAAA,IAAsB,SAAA,CAAU,OAAA,EAAS;AAC5C,MAAA;AAAA,IACF;AAEA,IAAA,sBAAA,CAAuB,YAAY,wBAAwB,CAAA;AAC3D,IAAA,IAAI,UAAA,EAAY;AACd,MAAA,MAAM,EAAE,cAAA,EAAgB,YAAA,EAAa,GAAI,UAAA;AACzC,MAAA,UAAA,CAAW,KAAA,EAAM;AACjB,MAAA,UAAA,CAAW,cAAA,GAAiB,cAAA;AAC5B,MAAA,UAAA,CAAW,YAAA,GAAe,YAAA;AAAA,IAC5B;AAAA,EACF,CAAA,EAAG,CAAC,wBAAwB,CAAC,CAAA;AAE7B,EAAA,MAAM,wBAAA,GAA2B;AAAA,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,22 +0,0 @@
|
|
|
1
|
-
"use client"
|
|
2
|
-
/* */
|
|
3
|
-
const emitElementValueChange = (element, value, event = new Event("change", { bubbles: true })) => {
|
|
4
|
-
try {
|
|
5
|
-
const nativeInputValueSetter = Object.getOwnPropertyDescriptor(
|
|
6
|
-
Object.getPrototypeOf(element),
|
|
7
|
-
"value"
|
|
8
|
-
)?.set;
|
|
9
|
-
nativeInputValueSetter?.call(element, value);
|
|
10
|
-
element.dispatchEvent(event);
|
|
11
|
-
} catch (ignoredError) {
|
|
12
|
-
if ("value" in element) {
|
|
13
|
-
element.value = value;
|
|
14
|
-
element.dispatchEvent(event);
|
|
15
|
-
} else {
|
|
16
|
-
throw Error("could not emit value update for element");
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
export { emitElementValueChange };
|
|
22
|
-
//# sourceMappingURL=emitElementValueChange.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"emitElementValueChange.mjs","sources":["../../../../../../src/lib/react/emitElementValueChange.ts"],"sourcesContent":["/**\n * Triggers a Value Update for an Element that also fires the React onChange\n * routine\n */\nexport const emitElementValueChange = (\n element: HTMLElement,\n value: string,\n event: Event = new Event(\"change\", { bubbles: true }),\n) => {\n try {\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(element),\n \"value\",\n )?.set;\n nativeInputValueSetter?.call(element, value);\n element.dispatchEvent(event);\n } catch (ignoredError) {\n if (\"value\" in element) {\n element.value = value;\n element.dispatchEvent(event);\n } else {\n throw Error(\"could not emit value update for element\");\n }\n }\n};\n"],"names":[],"mappings":"AAIO,MAAM,sBAAA,GAAyB,CACpC,OAAA,EACA,KAAA,EACA,KAAA,GAAe,IAAI,KAAA,CAAM,QAAA,EAAU,EAAE,OAAA,EAAS,IAAA,EAAM,CAAA,KACjD;AACH,EAAA,IAAI;AACF,IAAA,MAAM,yBAAyB,MAAA,CAAO,wBAAA;AAAA,MACpC,MAAA,CAAO,eAAe,OAAO,CAAA;AAAA,MAC7B;AAAA,KACF,EAAG,GAAA;AACH,IAAA,sBAAA,EAAwB,IAAA,CAAK,SAAS,KAAK,CAAA;AAC3C,IAAA,OAAA,CAAQ,cAAc,KAAK,CAAA;AAAA,EAC7B,SAAS,YAAA,EAAc;AACrB,IAAA,IAAI,WAAW,OAAA,EAAS;AACtB,MAAA,OAAA,CAAQ,KAAA,GAAQ,KAAA;AAChB,MAAA,OAAA,CAAQ,cAAc,KAAK,CAAA;AAAA,IAC7B,CAAA,MAAO;AACL,MAAA,MAAM,MAAM,yCAAyC,CAAA;AAAA,IACvD;AAAA,EACF;AACF;;;;"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
interface ManagedValuePropNames<K extends string> {
|
|
2
|
-
value: K;
|
|
3
|
-
defaultValue: K;
|
|
4
|
-
}
|
|
5
|
-
type PossibleValueProps<P> = Extract<keyof Omit<P, "onChange">, string | boolean>;
|
|
6
|
-
export declare const useManagedValue: <P extends object, V = unknown, PDV extends PossibleValueProps<P> = PossibleValueProps<P>>(props: P & {
|
|
7
|
-
onChange?: (value: V) => void;
|
|
8
|
-
}, onChange?: ((value: V) => void) | undefined, managedValuePropName?: ManagedValuePropNames<PDV>) => {
|
|
9
|
-
readonly value: V;
|
|
10
|
-
readonly handleOnChange: (value: V) => void;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=useManagedValue.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useManagedValue.d.ts","sourceRoot":"","sources":["../../../../src/lib/hooks/useManagedValue.ts"],"names":[],"mappings":"AAEA,UAAU,qBAAqB,CAAC,CAAC,SAAS,MAAM;IAC9C,KAAK,EAAE,CAAC,CAAC;IACT,YAAY,EAAE,CAAC,CAAC;CACjB;AAED,KAAK,kBAAkB,CAAC,CAAC,IAAI,OAAO,CAClC,MAAM,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,EACzB,MAAM,GAAG,OAAO,CACjB,CAAC;AAEF,eAAO,MAAM,eAAe,GAC1B,CAAC,SAAS,MAAM,EAChB,CAAC,GAAG,OAAO,EACX,GAAG,SAAS,kBAAkB,CAAC,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAAC,CAAC,EAEzD,OAAO,CAAC,GAAG;IAAE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAA;CAAE,EAC5C,oBADgC,CAAC,KAAK,IAAI,aACjB,EACzB,uBAAsB,qBAAqB,CAAC,GAAG,CAG9C;;qCAa8B,CAAC;CASjC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { PropsContextLevelMode } from './types';
|
|
2
|
-
import { FC, PropsWithChildren } from 'react';
|
|
3
|
-
export interface PropsContextLevelProviderProps extends PropsWithChildren {
|
|
4
|
-
mode: PropsContextLevelMode;
|
|
5
|
-
}
|
|
6
|
-
export declare const PropsContextLevelProvider: FC<PropsContextLevelProviderProps>;
|
|
7
|
-
export default PropsContextLevelProvider;
|
|
8
|
-
//# sourceMappingURL=PropsContextLevelProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PropsContextLevelProvider.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/inherit/PropsContextLevelProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAQ,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,WAAW,8BAA+B,SAAQ,iBAAiB;IACvE,IAAI,EAAE,qBAAqB,CAAC;CAC7B;AAKD,eAAO,MAAM,yBAAyB,EAAE,EAAE,CAAC,8BAA8B,CAWrE,CAAC;AAIL,eAAe,yBAAyB,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { InheritPropsContextSettings, PropsContextLevelMode } from './types';
|
|
2
|
-
import { PropsContext as PropsContextShape } from '..';
|
|
3
|
-
export declare function isMaxRecursionLevelProp(something: unknown): something is InheritPropsContextSettings;
|
|
4
|
-
export declare const getMaxRecursionLevel: (props: unknown) => number;
|
|
5
|
-
export declare const isInheritedPropsContextKey: (key: unknown) => key is "___inherit";
|
|
6
|
-
export declare const getLevelAfterModeApplied: (currentLevel: number, mode: PropsContextLevelMode) => number;
|
|
7
|
-
export declare const filterPreservedInheritEntries: (currentPropsContext: PropsContextShape) => Partial<PropsContextShape>;
|
|
8
|
-
//# sourceMappingURL=lib.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lib.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/inherit/lib.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAC3B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,KAAK,EAAE,YAAY,IAAI,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG5E,wBAAgB,uBAAuB,CACrC,SAAS,EAAE,OAAO,GACjB,SAAS,IAAI,2BAA2B,CAM1C;AAED,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,WAKlD,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAI,KAAK,OAAO,wBACvB,CAAC;AAEjC,eAAO,MAAM,wBAAwB,GACnC,cAAc,MAAM,EACpB,MAAM,qBAAqB,WAa5B,CAAC;AAEF,eAAO,MAAM,6BAA6B,GACxC,qBAAqB,iBAAiB,KACrC,OAAO,CAAC,iBAAiB,CAgB3B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propsContextLevel.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/inherit/propsContextLevel.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAG9E,eAAO,MAAM,wBAAwB,iCAA2B,CAAC;AAEjE,eAAO,MAAM,oBAAoB,GAC/B,OAAM,qBAA8B,KACnC,MAGF,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export interface InheritPropsContextSettings {
|
|
2
|
-
[inheritPropsContextKey]?: boolean | "preserve";
|
|
3
|
-
}
|
|
4
|
-
export declare const inheritProps: InheritPropsContextSettings;
|
|
5
|
-
export type PropsContextLevelMode = "reset" | "increment" | "decrement" | "keep";
|
|
6
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/propsContext/inherit/types.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,2BAA2B;IAC1C,CAAC,sBAAsB,CAAC,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CACjD;AAED,eAAO,MAAM,YAAY,EAAE,2BAE1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAC7B,OAAO,GACP,WAAW,GACX,WAAW,GACX,MAAM,CAAC"}
|