@mittwald/flow-react-components 0.2.0-alpha.804 → 0.2.0-alpha.806
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 +13 -0
- package/MIGRATION.md +101 -0
- package/dist/assets/doc-properties.json +9557 -9169
- package/dist/css/all.css +1 -1
- package/dist/js/_virtual/_.locale.json@cbc1b50fe3e51afbdb1b35a65308b79e.mjs +14 -0
- package/dist/js/_virtual/_.locale.json@cbc1b50fe3e51afbdb1b35a65308b79e.mjs.map +1 -0
- package/dist/js/default.mjs +2 -1
- package/dist/js/default.mjs.map +1 -1
- package/dist/js/flr-universal.mjs +10 -8
- package/dist/js/flr-universal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs +72 -62
- package/dist/js/packages/components/src/components/Accordion/Accordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Action/models/ActionStateContext.mjs +1 -1
- package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs +1 -2
- package/dist/js/packages/components/src/components/ActionGroup/ActionGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs +13 -4
- package/dist/js/packages/components/src/components/Autocomplete/Autocomplete.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs +16 -3
- package/dist/js/packages/components/src/components/CartesianChart/CartesianChart.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs +2 -0
- package/dist/js/packages/components/src/components/CartesianChart/components/Area/Area.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/ChartLegend.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/LegendContent.mjs +3 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartLegend/LegendContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs +6 -6
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/ChartTooltip.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipContent.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipContent.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.mjs +5 -5
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipLegendItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs +7 -2
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/types.mjs +16 -0
- package/dist/js/packages/components/src/components/CartesianChart/components/ChartTooltip/types.mjs.map +1 -0
- package/dist/js/packages/components/src/components/CartesianChart/components/Line/Line.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/XAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/types.mjs +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/XAxis/types.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/YAxis.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/components/YAxis/types.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CartesianChart/types.mjs +8 -0
- package/dist/js/packages/components/src/components/CartesianChart/types.mjs.map +1 -0
- package/dist/js/packages/components/src/components/Chat/Chat.mjs +37 -21
- package/dist/js/packages/components/src/components/Chat/Chat.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs +1 -1
- package/dist/js/packages/components/src/components/Checkbox/Checkbox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs +1 -1
- package/dist/js/packages/components/src/components/CheckboxButton/CheckboxButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs +24 -12
- package/dist/js/packages/components/src/components/CheckboxGroup/CheckboxGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs +70 -16
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.module.scss.mjs +7 -3
- package/dist/js/packages/components/src/components/CodeBlock/CodeBlock.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs +2 -3
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.scss.mjs +3 -1
- package/dist/js/packages/components/src/components/CodeEditor/CodeEditor.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs +4 -4
- package/dist/js/packages/components/src/components/CodeEditor/themes/defaultEditorTheme.mjs.map +1 -1
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs +9 -6
- package/dist/js/packages/components/src/components/ComboBox/ComboBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs +1 -1
- package/dist/js/packages/components/src/components/DatePicker/DatePicker.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/DatePicker/components/DateInput/DateInput.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs +1 -1
- package/dist/js/packages/components/src/components/DateRangePicker/DateRangePicker.mjs.map +1 -1
- package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/DateRangePicker/components/DateRangeInput/DateRangeInput.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileCard/FileCard.mjs +13 -7
- package/dist/js/packages/components/src/components/FileCard/FileCard.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs +1 -1
- package/dist/js/packages/components/src/components/FileDropZone/FileDropZone.mjs.map +1 -1
- package/dist/js/packages/components/src/components/FileField/FileField.mjs +1 -1
- package/dist/js/packages/components/src/components/FileField/FileField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Heading/Heading.mjs +18 -18
- package/dist/js/packages/components/src/components/Heading/Heading.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Label/Label.mjs +19 -10
- package/dist/js/packages/components/src/components/Label/Label.mjs.map +1 -1
- package/dist/js/packages/components/src/components/LightBox/LightBox.mjs +8 -5
- package/dist/js/packages/components/src/components/LightBox/LightBox.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/List.mjs +12 -6
- package/dist/js/packages/components/src/components/List/List.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/Header.mjs +2 -2
- package/dist/js/packages/components/src/components/List/components/Header/Header.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs +3 -5
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/AllFiltersModal.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs +5 -8
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/SortingAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs +6 -9
- package/dist/js/packages/components/src/components/List/components/Header/components/AllFiltersModal/ViewModeAccordion.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs +9 -12
- package/dist/js/packages/components/src/components/List/components/Header/components/FilterContextMenu/FilterContextMenus.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs +9 -12
- package/dist/js/packages/components/src/components/List/components/Header/components/SortingContextMenu/SortingMenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs +6 -7
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeContextMenu.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs +6 -9
- package/dist/js/packages/components/src/components/List/components/Header/components/ViewModeContextMenu/ViewModeMenuItem.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Header/lib.mjs +9 -12
- package/dist/js/packages/components/src/components/List/components/Header/lib.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs +4 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/AccordionButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/components/OptionsButton/OptionsButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs +9 -12
- package/dist/js/packages/components/src/components/List/components/Items/components/Item/hooks/useGridItemProps.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs +84 -51
- package/dist/js/packages/components/src/components/List/components/ListItemView/ListItemView.mjs.map +1 -1
- package/dist/js/packages/components/src/components/List/components/Table/Table.mjs +9 -12
- package/dist/js/packages/components/src/components/List/components/Table/Table.mjs.map +1 -1
- package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs +2 -3
- package/dist/js/packages/components/src/components/MarkdownEditor/MarkdownEditor.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/Navigation.mjs +8 -5
- package/dist/js/packages/components/src/components/Navigation/Navigation.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs +15 -21
- package/dist/js/packages/components/src/components/Navigation/components/NavigationGroup/NavigationGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/NumberField/NumberField.mjs +1 -1
- package/dist/js/packages/components/src/components/NumberField/NumberField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs +21 -9
- package/dist/js/packages/components/src/components/PasswordCreationField/PasswordCreationField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs +1 -1
- package/dist/js/packages/components/src/components/PasswordCreationField/components/TogglePasswordVisibilityButton/TogglePasswordVisibilityButton.mjs.map +1 -1
- package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs +16 -10
- package/dist/js/packages/components/src/components/RadioGroup/RadioGroup.mjs.map +1 -1
- package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/RadioGroup/components/RadioButton/RadioButton.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Rating/Rating.mjs +1 -1
- package/dist/js/packages/components/src/components/Rating/Rating.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs +11 -8
- package/dist/js/packages/components/src/components/SearchField/SearchField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs +82 -48
- package/dist/js/packages/components/src/components/Section/components/SectionHeader/SectionHeader.mjs.map +1 -1
- package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs +17 -8
- package/dist/js/packages/components/src/components/SegmentedControl/SegmentedControl.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Select/Select.mjs +11 -8
- package/dist/js/packages/components/src/components/Select/Select.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Select/Select.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/Select/Select.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Slider/Slider.mjs +9 -6
- package/dist/js/packages/components/src/components/Slider/Slider.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Switch/Switch.mjs +1 -1
- package/dist/js/packages/components/src/components/Switch/Switch.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/Tabs.mjs +4 -4
- package/dist/js/packages/components/src/components/Tabs/Tabs.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs +2 -2
- package/dist/js/packages/components/src/components/Tabs/components/Tab/Tab.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs +4 -4
- package/dist/js/packages/components/src/components/Tabs/components/TabList/TabList.mjs.map +1 -1
- package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs +4 -5
- package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextArea/TextArea.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/TextArea/TextArea.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TextField/TextField.mjs +16 -7
- package/dist/js/packages/components/src/components/TextField/TextField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TimeField/TimeField.mjs +1 -1
- package/dist/js/packages/components/src/components/TimeField/TimeField.mjs.map +1 -1
- package/dist/js/packages/components/src/components/TimeField/TimeField.module.scss.mjs +1 -2
- package/dist/js/packages/components/src/components/TimeField/TimeField.module.scss.mjs.map +1 -1
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs +19 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs.map +1 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs +19 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs.map +1 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs +13 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs.map +1 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/lib.mjs +7 -0
- package/dist/js/packages/components/src/components/UiComponentTunnel/lib.mjs.map +1 -0
- package/dist/js/packages/components/src/components/propTypes/index.mjs +4 -0
- package/dist/js/packages/components/src/components/propTypes/index.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/componentFactory/flowComponent.mjs +8 -4
- package/dist/js/packages/components/src/lib/componentFactory/flowComponent.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs +4 -2
- package/dist/js/packages/components/src/lib/hooks/useFieldComponent.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs +6 -6
- package/dist/js/packages/components/src/lib/hooks/useFieldError.mjs.map +1 -1
- package/dist/js/packages/components/src/lib/types/props.mjs.map +1 -1
- package/dist/types/components/Accordion/Accordion.d.ts.map +1 -1
- package/dist/types/components/ActionGroup/ActionGroup.d.ts.map +1 -1
- package/dist/types/components/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/CartesianChart.d.ts +6 -8
- package/dist/types/components/CartesianChart/CartesianChart.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/Area/Area.d.ts +9 -4
- package/dist/types/components/CartesianChart/components/Area/Area.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartLegend/ChartLegend.d.ts +1 -1
- package/dist/types/components/CartesianChart/components/ChartLegend/ChartLegend.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartLegend/LegendContent.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/ChartTooltip.d.ts +5 -25
- package/dist/types/components/CartesianChart/components/ChartTooltip/ChartTooltip.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts +2 -2
- package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts +2 -2
- package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/index.d.ts +1 -0
- package/dist/types/components/CartesianChart/components/ChartTooltip/index.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/ChartTooltip/types.d.ts +26 -0
- package/dist/types/components/CartesianChart/components/ChartTooltip/types.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/components/Line/Line.d.ts +3 -3
- package/dist/types/components/CartesianChart/components/Line/Line.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/XAxis/XAxis.d.ts +3 -3
- package/dist/types/components/CartesianChart/components/XAxis/XAxis.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/XAxis/types.d.ts +2 -2
- package/dist/types/components/CartesianChart/components/XAxis/types.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts +2 -2
- package/dist/types/components/CartesianChart/components/YAxis/YAxis.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/components/YAxis/types.d.ts +2 -2
- package/dist/types/components/CartesianChart/components/YAxis/types.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/CartesianChart/typedCartesianChart.test-types.d.ts +2 -0
- package/dist/types/components/CartesianChart/typedCartesianChart.test-types.d.ts.map +1 -0
- package/dist/types/components/CartesianChart/types.d.ts +11 -0
- package/dist/types/components/CartesianChart/types.d.ts.map +1 -0
- package/dist/types/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/components/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/types/components/CodeBlock/CodeBlock.d.ts +7 -0
- package/dist/types/components/CodeBlock/CodeBlock.d.ts.map +1 -1
- package/dist/types/components/CodeBlock/stories/Default.stories.d.ts +1 -2
- package/dist/types/components/CodeBlock/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/CodeEditor/CodeEditor.d.ts +1 -2
- package/dist/types/components/CodeEditor/CodeEditor.d.ts.map +1 -1
- package/dist/types/components/ComboBox/ComboBox.d.ts.map +1 -1
- package/dist/types/components/FileCard/FileCard.d.ts.map +1 -1
- package/dist/types/components/Heading/Heading.d.ts +0 -1
- package/dist/types/components/Heading/Heading.d.ts.map +1 -1
- package/dist/types/components/Heading/index.d.ts +1 -0
- package/dist/types/components/Heading/index.d.ts.map +1 -1
- package/dist/types/components/Label/Label.d.ts.map +1 -1
- package/dist/types/components/LightBox/LightBox.d.ts.map +1 -1
- package/dist/types/components/List/List.d.ts.map +1 -1
- package/dist/types/components/List/components/Items/components/Item/components/AccordionButton.d.ts.map +1 -1
- package/dist/types/components/List/components/ListItemView/ListItemView.d.ts +11 -1
- package/dist/types/components/List/components/ListItemView/ListItemView.d.ts.map +1 -1
- package/dist/types/components/List/typedList.d.ts +18 -8
- package/dist/types/components/List/typedList.d.ts.map +1 -1
- package/dist/types/components/MarkdownEditor/MarkdownEditor.d.ts.map +1 -1
- package/dist/types/components/Navigation/Navigation.d.ts.map +1 -1
- package/dist/types/components/Navigation/components/NavigationGroup/NavigationGroup.d.ts.map +1 -1
- package/dist/types/components/Navigation/stories/Default.stories.d.ts.map +1 -1
- package/dist/types/components/PasswordCreationField/PasswordCreationField.d.ts.map +1 -1
- package/dist/types/components/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/types/components/Rating/Rating.d.ts +2 -2
- package/dist/types/components/Rating/Rating.d.ts.map +1 -1
- package/dist/types/components/SearchField/SearchField.d.ts.map +1 -1
- package/dist/types/components/Section/components/SectionHeader/SectionHeader.d.ts.map +1 -1
- package/dist/types/components/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/types/components/Select/Select.d.ts.map +1 -1
- package/dist/types/components/Slider/Slider.d.ts.map +1 -1
- package/dist/types/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/types/components/Tabs/components/TabTitle/TabTitle.d.ts.map +1 -1
- package/dist/types/components/TextField/TextField.d.ts.map +1 -1
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelEntry.d.ts +8 -0
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelEntry.d.ts.map +1 -0
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelExit.d.ts +8 -0
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelExit.d.ts.map +1 -0
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelProvider.d.ts +7 -0
- package/dist/types/components/UiComponentTunnel/UiComponentTunnelProvider.d.ts.map +1 -0
- package/dist/types/components/UiComponentTunnel/lib.d.ts +3 -0
- package/dist/types/components/UiComponentTunnel/lib.d.ts.map +1 -0
- package/dist/types/components/propTypes/index.d.ts +8 -1
- package/dist/types/components/propTypes/index.d.ts.map +1 -1
- package/dist/types/lib/componentFactory/flowComponent.d.ts.map +1 -1
- package/dist/types/lib/hooks/useFieldComponent.d.ts +2 -1
- package/dist/types/lib/hooks/useFieldComponent.d.ts.map +1 -1
- package/dist/types/lib/hooks/useFieldError.d.ts +6 -1
- package/dist/types/lib/hooks/useFieldError.d.ts.map +1 -1
- package/dist/types/lib/types/props.d.ts.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.mjs","sources":["../../../../../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Slider.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconMinus, IconPlus } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport {
|
|
1
|
+
{"version":3,"file":"Slider.mjs","sources":["../../../../../../../src/components/Slider/Slider.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./Slider.module.scss\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Button } from \"@/components/Button\";\nimport { IconMinus, IconPlus } from \"@/components/Icon/components/icons\";\nimport locales from \"./locales/*.locale.json\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { UiComponentTunnelExit } from \"../UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface SliderProps\n extends\n FlowComponentProps<HTMLInputElement>,\n PropsWithChildren<Aria.SliderProps>,\n Pick<Aria.SliderThumbProps, \"name\"> {\n /** Whether the marker for the initial value should be visible */\n showInitialMarker?: boolean;\n /** Whether the component is read only. */\n isReadOnly?: boolean;\n /** Whether the component is invalid. */\n isInvalid?: boolean;\n /** Hide Buttons, Label and Value */\n sliderOnly?: boolean;\n}\n\n/** @flr-generate all */\nexport const Slider = flowComponent(\"Slider\", (props) => {\n const {\n className,\n children,\n name,\n isDisabled,\n defaultValue,\n showInitialMarker,\n isReadOnly,\n ref,\n step,\n sliderOnly,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.slider,\n isDisabled && styles.disabled,\n className,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"Slider\");\n\n const stringFormatter = useLocalizedStringFormatter(locales, \"Slider\");\n\n const objectRef = useObjectRef(ref);\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n unstyled: true,\n tunnel: {\n id: \"label\",\n component: \"Slider\",\n },\n ...fieldPropsContext.Label,\n className: styles.label,\n },\n };\n\n return (\n <div {...fieldProps}>\n <Aria.Slider\n {...rest}\n className={rootClassName}\n isDisabled={isDisabled}\n defaultValue={defaultValue}\n step={step}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n\n {!sliderOnly && (\n <div className={styles.text}>\n <Aria.SliderOutput className={styles.value} />{\" \"}\n <UiComponentTunnelExit id=\"label\" component=\"Slider\" />\n </div>\n )}\n\n <Aria.SliderTrack className={styles.track}>\n {({ state }) => (\n <PropsContextProvider\n props={{\n Button: {\n isPending: false,\n isFailed: false,\n isSucceeded: false,\n isReadOnly: isReadOnly,\n excludeFromTabOrder: true,\n isDisabled,\n variant: \"plain\",\n color: \"secondary\",\n },\n }}\n >\n {!sliderOnly && (\n <>\n <Button\n onPress={() => state.decrementThumb(0, step)}\n aria-label={stringFormatter.format(\"decrement\")}\n className={styles.decrement}\n >\n <IconMinus />\n </Button>\n <Button\n onPress={() => state.incrementThumb(0, step)}\n aria-label={stringFormatter.format(\"increment\")}\n className={styles.increment}\n >\n <IconPlus />\n </Button>\n </>\n )}\n\n <div\n className={styles.fill}\n style={{ width: state.getThumbPercent(0) * 100 + \"%\" }}\n />\n\n {showInitialMarker &&\n defaultValue &&\n typeof defaultValue === \"number\" && (\n <div\n className={styles.initialMarker}\n style={{\n left: `calc(${state.getValuePercent(defaultValue) * 100}% - 2px)`,\n }}\n />\n )}\n <Aria.SliderThumb\n inputRef={objectRef}\n name={name}\n className={styles.handle}\n isDisabled={isReadOnly}\n />\n </PropsContextProvider>\n )}\n </Aria.SliderTrack>\n <FieldErrorView />\n </PropsContextProvider>\n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":3,"file":"Switch.mjs","sources":["../../../../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Switch.module.scss\";\nimport clsx from \"clsx\";\nimport { IconCheck, IconClose } from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport labelStyles from \"../Label/Label.module.scss\";\nimport { useObjectRef } from \"react-aria\";\n\nexport interface SwitchProps\n extends\n PropsWithChildren<Omit<Aria.SwitchProps, \"children\" | \"inputRef\">>,\n FlowComponentProps<HTMLInputElement> {\n /**\n * Whether the label should appear before or after the switch. @default\n * \"trailing\"\n */\n labelPosition?: \"leading\" | \"trailing\";\n}\n\n/** @flr-generate all */\nexport const Switch = flowComponent(\"Switch\", (props) => {\n const {\n children,\n className,\n labelPosition = \"trailing\",\n ref,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.switch,\n className,\n styles[`label-${labelPosition}`],\n );\n\n const objectRef = useObjectRef(ref);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n ...fieldPropsContext.Label,\n optional: false,\n },\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <Aria.Switch {...rest} className={rootClassName} inputRef={objectRef}>\n {({ isSelected }) => (\n <PropsContextProvider props={propsContext}>\n <div className={styles.track}>\n <div className={styles.handle}>\n {isSelected ? <IconCheck size=\"s\" /> : <IconClose size=\"s\" />}\n </div>\n </div>\n <div className={labelStyles.label}>{children}</div>\n </PropsContextProvider>\n )}\n </Aria.Switch>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Switch;\n"],"names":["labelStyles"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,MAAM,MAAA,GAAS,aAAA,CAAc,QAAA,EAAU,CAAC,KAAA,KAAU;AACvD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA,GAAgB,UAAA;AAAA,IAChB,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,SAAA;AAAA,IACA,MAAA,CAAO,CAAA,MAAA,EAAS,aAAa,CAAA,CAAE;AAAA,GACjC;AAEA,EAAA,MAAM,SAAA,GAAY,aAAa,GAAG,CAAA;AAElC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,
|
|
1
|
+
{"version":3,"file":"Switch.mjs","sources":["../../../../../../../src/components/Switch/Switch.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Switch.module.scss\";\nimport clsx from \"clsx\";\nimport { IconCheck, IconClose } from \"@/components/Icon/components/icons\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport labelStyles from \"../Label/Label.module.scss\";\nimport { useObjectRef } from \"react-aria\";\n\nexport interface SwitchProps\n extends\n PropsWithChildren<Omit<Aria.SwitchProps, \"children\" | \"inputRef\">>,\n FlowComponentProps<HTMLInputElement> {\n /**\n * Whether the label should appear before or after the switch. @default\n * \"trailing\"\n */\n labelPosition?: \"leading\" | \"trailing\";\n}\n\n/** @flr-generate all */\nexport const Switch = flowComponent(\"Switch\", (props) => {\n const {\n children,\n className,\n labelPosition = \"trailing\",\n ref,\n ...rest\n } = props;\n\n const rootClassName = clsx(\n styles.switch,\n className,\n styles[`label-${labelPosition}`],\n );\n\n const objectRef = useObjectRef(ref);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"Switch\");\n\n const propsContext: PropsContext = {\n ...fieldPropsContext,\n Label: {\n ...fieldPropsContext.Label,\n optional: false,\n },\n };\n\n return (\n <div {...fieldProps}>\n <FieldErrorCaptureContext>\n <Aria.Switch {...rest} className={rootClassName} inputRef={objectRef}>\n {({ isSelected }) => (\n <PropsContextProvider props={propsContext}>\n <div className={styles.track}>\n <div className={styles.handle}>\n {isSelected ? <IconCheck size=\"s\" /> : <IconClose size=\"s\" />}\n </div>\n </div>\n <div className={labelStyles.label}>{children}</div>\n </PropsContextProvider>\n )}\n </Aria.Switch>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </div>\n );\n});\n\nexport default Switch;\n"],"names":["labelStyles"],"mappings":";;;;;;;;;;;;;;;;;;AAwBO,MAAM,MAAA,GAAS,aAAA,CAAc,QAAA,EAAU,CAAC,KAAA,KAAU;AACvD,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA,GAAgB,UAAA;AAAA,IAChB,GAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,KAAA;AAEJ,EAAA,MAAM,aAAA,GAAgB,IAAA;AAAA,IACpB,MAAA,CAAO,MAAA;AAAA,IACP,SAAA;AAAA,IACA,MAAA,CAAO,CAAA,MAAA,EAAS,aAAa,CAAA,CAAE;AAAA,GACjC;AAEA,EAAA,MAAM,SAAA,GAAY,aAAa,GAAG,CAAA;AAElC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,QAAQ,CAAA;AAErC,EAAA,MAAM,YAAA,GAA6B;AAAA,IACjC,GAAG,iBAAA;AAAA,IACH,KAAA,EAAO;AAAA,MACL,GAAG,iBAAA,CAAkB,KAAA;AAAA,MACrB,QAAA,EAAU;AAAA;AACZ,GACF;AAEA,EAAA,uBACE,IAAA,CAAC,KAAA,EAAA,EAAK,GAAG,UAAA,EACP,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,4BACC,QAAA,kBAAA,GAAA,CAAC,IAAA,CAAK,QAAL,EAAa,GAAG,MAAM,SAAA,EAAW,aAAA,EAAe,QAAA,EAAU,SAAA,EACxD,WAAC,EAAE,UAAA,uBACF,IAAA,CAAC,oBAAA,EAAA,EAAqB,OAAO,YAAA,EAC3B,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,KAAA,EAAA,EAAI,WAAW,MAAA,CAAO,KAAA,EACrB,8BAAC,KAAA,EAAA,EAAI,SAAA,EAAW,OAAO,MAAA,EACpB,QAAA,EAAA,UAAA,uBAAc,SAAA,EAAA,EAAU,IAAA,EAAK,KAAI,CAAA,mBAAK,GAAA,CAAC,aAAU,IAAA,EAAK,GAAA,EAAI,GAC7D,CAAA,EACF,CAAA;AAAA,sBACA,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAWA,QAAA,CAAY,OAAQ,QAAA,EAAS;AAAA,KAAA,EAC/C,GAEJ,CAAA,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { TabList } from './components/TabList/TabList.mjs';
|
|
5
5
|
import { flowComponent } from '../../lib/componentFactory/flowComponent.mjs';
|
|
6
|
-
import { TunnelProvider, TunnelExit } from '@mittwald/react-tunnel';
|
|
7
6
|
import clsx from 'clsx';
|
|
8
7
|
import { useState } from 'react';
|
|
9
8
|
import * as Aria from 'react-aria-components';
|
|
10
9
|
import styles from './Tabs.module.scss.mjs';
|
|
11
10
|
import { FallbackTab } from './components/FallbackTab/FallbackTab.mjs';
|
|
11
|
+
import { UiComponentTunnelExit } from '../UiComponentTunnel/UiComponentTunnelExit.mjs';
|
|
12
12
|
|
|
13
13
|
const Tabs = flowComponent("Tabs", (props) => {
|
|
14
14
|
const {
|
|
@@ -25,7 +25,7 @@ const Tabs = flowComponent("Tabs", (props) => {
|
|
|
25
25
|
const rootClassName = clsx(styles.tabs, className);
|
|
26
26
|
const [selectedKeyState, setSelectedKeyState] = useState(defaultSelectedKey);
|
|
27
27
|
const selectedKey = selectedKeyProps ?? selectedKeyState;
|
|
28
|
-
return /* @__PURE__ */ jsxs(
|
|
28
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
29
29
|
children,
|
|
30
30
|
/* @__PURE__ */ jsxs(
|
|
31
31
|
Aria.Tabs,
|
|
@@ -56,7 +56,7 @@ const Tabs = flowComponent("Tabs", (props) => {
|
|
|
56
56
|
disabledKeys
|
|
57
57
|
}
|
|
58
58
|
),
|
|
59
|
-
/* @__PURE__ */ jsx(
|
|
59
|
+
/* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "Panels", component: "Tabs" }),
|
|
60
60
|
/* @__PURE__ */ jsx(FallbackTab, { tabNotFoundView })
|
|
61
61
|
]
|
|
62
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.mjs","sources":["../../../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { TabList } from \"@/components/Tabs/components/TabList\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport
|
|
1
|
+
{"version":3,"file":"Tabs.mjs","sources":["../../../../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { TabList } from \"@/components/Tabs/components/TabList\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport clsx from \"clsx\";\nimport type { PropsWithChildren, ReactNode } from \"react\";\nimport { useState } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./Tabs.module.scss\";\nimport { FallbackTab } from \"@/components/Tabs/components/FallbackTab\";\nimport { UiComponentTunnelExit } from \"../UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TabsProps\n extends\n Omit<Aria.TabsProps, \"children\">,\n PropsWithChildren,\n FlowComponentProps {\n /* custom fallback view for not found tabs */\n tabNotFoundView?: ReactNode;\n}\n\n/** @flr-generate all */\nexport const Tabs = flowComponent(\"Tabs\", (props) => {\n const {\n children,\n className,\n defaultSelectedKey,\n selectedKey: selectedKeyProps,\n disabledKeys,\n ref,\n onSelectionChange,\n tabNotFoundView,\n ...rest\n } = props;\n\n const rootClassName = clsx(styles.tabs, className);\n const [selectedKeyState, setSelectedKeyState] = useState<\n Aria.Key | undefined\n >(defaultSelectedKey);\n\n const selectedKey = selectedKeyProps ?? selectedKeyState;\n\n return (\n <>\n {children}\n <Aria.Tabs\n slot={null}\n className={rootClassName}\n {...rest}\n selectedKey={selectedKey}\n onSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n ref={ref}\n >\n <TabList\n selection={selectedKey}\n onContextMenuSelectionChange={(key) => {\n setSelectedKeyState(key);\n if (onSelectionChange) {\n onSelectionChange(key);\n }\n }}\n disabledKeys={disabledKeys}\n />\n <UiComponentTunnelExit id=\"Panels\" component=\"Tabs\" />\n <FallbackTab tabNotFoundView={tabNotFoundView} />\n </Aria.Tabs>\n </>\n );\n});\n\nexport default Tabs;\n"],"names":[],"mappings":";;;;;;;;;;AAqBO,MAAM,IAAA,GAAO,aAAA,CAAc,MAAA,EAAQ,CAAC,KAAA,KAAU;AACnD,E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EAAG,QAAA,EAAS,WAAU,MAAA,EAAO,CAAA;AAAA,0BACpD,GAAA,CAAC,eAAY,eAAA,EAAkC;AAAA;AAAA;AAAA;AACjD,GAAA,EACF,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -6,10 +6,10 @@ import * as Aria from 'react-aria-components';
|
|
|
6
6
|
import styles from '../../Tabs.module.scss.mjs';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
import { TabContextProvider } from './context.mjs';
|
|
9
|
-
import { TunnelEntry } from '@mittwald/react-tunnel';
|
|
10
9
|
import '../../../../lib/propsContext/propsContext.mjs';
|
|
11
10
|
import { PropsContextProvider } from '../../../../lib/propsContext/components/PropsContextProvider.mjs';
|
|
12
11
|
import { Activity } from '../../../Activity/Activity.mjs';
|
|
12
|
+
import { UiComponentTunnelEntry } from '../../../UiComponentTunnel/UiComponentTunnelEntry.mjs';
|
|
13
13
|
|
|
14
14
|
const Tab = (props) => {
|
|
15
15
|
const { children, className, id: idFromProps, ...rest } = props;
|
|
@@ -35,7 +35,7 @@ const Tab = (props) => {
|
|
|
35
35
|
}
|
|
36
36
|
);
|
|
37
37
|
};
|
|
38
|
-
return /* @__PURE__ */ jsx(
|
|
38
|
+
return /* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: "Panels", component: "Tabs", children: /* @__PURE__ */ jsx(TabContextProvider, { value: { id }, children: /* @__PURE__ */ jsx(
|
|
39
39
|
Aria.TabPanel,
|
|
40
40
|
{
|
|
41
41
|
className: rootClassName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tab.mjs","sources":["../../../../../../../../../src/components/Tabs/components/Tab/Tab.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport type { TabPanelRenderProps } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Tabs.module.scss\";\nimport clsx from \"clsx\";\nimport { TabContextProvider } from \"@/components/Tabs/components/Tab/context\";\nimport {
|
|
1
|
+
{"version":3,"file":"Tab.mjs","sources":["../../../../../../../../../src/components/Tabs/components/Tab/Tab.tsx"],"sourcesContent":["import type { FC, PropsWithChildren, ReactNode } from \"react\";\nimport { useId } from \"react\";\nimport type { TabPanelRenderProps } from \"react-aria-components\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"../../Tabs.module.scss\";\nimport clsx from \"clsx\";\nimport { TabContextProvider } from \"@/components/Tabs/components/Tab/context\";\nimport type { PropsContext } from \"@/lib/propsContext\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport { Activity } from \"@/components/Activity\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\n\nexport interface TabProps\n extends Omit<Aria.TabPanelProps, \"children\">, PropsWithChildren {}\n\n/** @flr-generate all */\nexport const Tab: FC<TabProps> = (props) => {\n const { children, className, id: idFromProps, ...rest } = props;\n\n const rootClassName = clsx(styles.tabPanel, className);\n\n const generatedId = useId();\n const id = idFromProps ?? generatedId;\n\n const TabPanelRenderer = (props: TabPanelRenderProps): Awaited<ReactNode> => {\n const isSelected = props.state.selectedKey === id;\n\n const propsContext: PropsContext = {\n Content: {\n wrapWith: <Activity isActive={isSelected} />,\n },\n Section: {\n wrapWith: <Activity isActive={isSelected} />,\n },\n };\n\n return (\n <PropsContextProvider\n props={propsContext}\n dependencies={[isSelected, children]}\n >\n {children}\n </PropsContextProvider>\n );\n };\n\n return (\n <UiComponentTunnelEntry id=\"Panels\" component=\"Tabs\">\n <TabContextProvider value={{ id }}>\n <Aria.TabPanel\n className={rootClassName}\n shouldForceMount\n id={id}\n {...rest}\n >\n {TabPanelRenderer}\n </Aria.TabPanel>\n </TabContextProvider>\n </UiComponentTunnelEntry>\n );\n};\n\nexport default Tab;\n"],"names":["props"],"mappings":";;;;;;;;;;;AAgBO,MAAM,GAAA,GAAoB,CAAC,KAAA,KAAU;AAC1C,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EA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 import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
4
4
|
import { useId } from 'react';
|
|
5
5
|
import * as Aria from 'react-aria-components';
|
|
6
6
|
import styles from './TabList.module.scss.mjs';
|
|
7
|
-
import { TunnelExit } from '@mittwald/react-tunnel';
|
|
8
7
|
import { useObserveOverflow } from '../../../../lib/hooks/dom/useObserveOverflow.mjs';
|
|
9
8
|
import { Button } from '../../../Button/Button.mjs';
|
|
10
9
|
import clsx from 'clsx';
|
|
@@ -15,6 +14,7 @@ import '../../../Icon/components/IconSetProvider.mjs';
|
|
|
15
14
|
import '../../../Icon/Icon.mjs';
|
|
16
15
|
import '../../../../views/IconView.mjs';
|
|
17
16
|
import { IconChevronDown } from '../../../Icon/components/icons/IconChevronDown.mjs';
|
|
17
|
+
import { UiComponentTunnelExit } from '../../../UiComponentTunnel/UiComponentTunnelExit.mjs';
|
|
18
18
|
|
|
19
19
|
const TabList = (props) => {
|
|
20
20
|
const { selection, disabledKeys, onContextMenuSelectionChange } = props;
|
|
@@ -25,7 +25,7 @@ const TabList = (props) => {
|
|
|
25
25
|
const handleContextMenuSelectionChange = (key) => {
|
|
26
26
|
onContextMenuSelectionChange(key);
|
|
27
27
|
};
|
|
28
|
-
const regularTabTitles = /* @__PURE__ */ jsx(Aria.TabList, { className: styles.titles, ref: overflowObserver.ref, children: /* @__PURE__ */ jsx(
|
|
28
|
+
const regularTabTitles = /* @__PURE__ */ jsx(Aria.TabList, { className: styles.titles, ref: overflowObserver.ref, children: /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "Titles", component: "Tabs" }) });
|
|
29
29
|
const contextMenuWhenCollapsed = isCollapsed && /* @__PURE__ */ jsxs(ContextMenuTriggerView, { children: [
|
|
30
30
|
/* @__PURE__ */ jsxs(
|
|
31
31
|
Button,
|
|
@@ -35,7 +35,7 @@ const TabList = (props) => {
|
|
|
35
35
|
color: "light",
|
|
36
36
|
"aria-labelledby": titleCollapsedElementId,
|
|
37
37
|
children: [
|
|
38
|
-
/* @__PURE__ */ jsx(
|
|
38
|
+
/* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "ActiveTitle", component: "Tabs" }),
|
|
39
39
|
/* @__PURE__ */ jsx(IconChevronDown, {})
|
|
40
40
|
]
|
|
41
41
|
}
|
|
@@ -47,7 +47,7 @@ const TabList = (props) => {
|
|
|
47
47
|
selectedKeys: selection ? [selection] : void 0,
|
|
48
48
|
selectionMode: "navigation",
|
|
49
49
|
onAction: (key) => handleContextMenuSelectionChange(key),
|
|
50
|
-
children: /* @__PURE__ */ jsx(
|
|
50
|
+
children: /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "ContextMenuItems", component: "Tabs" })
|
|
51
51
|
}
|
|
52
52
|
)
|
|
53
53
|
] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabList.mjs","sources":["../../../../../../../../../src/components/Tabs/components/TabList/TabList.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useId } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./TabList.module.scss\";\nimport {
|
|
1
|
+
{"version":3,"file":"TabList.mjs","sources":["../../../../../../../../../src/components/Tabs/components/TabList/TabList.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { useId } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport styles from \"./TabList.module.scss\";\nimport { useObserveOverflow } from \"@/lib/hooks/dom/useObserveOverflow\";\nimport { Button } from \"@/components/Button\";\nimport clsx from \"clsx\";\nimport ContextMenuTriggerView from \"@/views/ContextMenuTriggerView\";\nimport ContextMenuView from \"@/views/ContextMenuView\";\nimport { IconChevronDown } from \"@/components/Icon/components/icons\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\n\ninterface Props {\n selection: Aria.Key | undefined;\n onContextMenuSelectionChange: (key: Aria.Key) => void;\n disabledKeys?: Iterable<Aria.Key>;\n}\n\nexport const TabList: FC<Props> = (props) => {\n const { selection, disabledKeys, onContextMenuSelectionChange } = props;\n\n const titleCollapsedElementId = useId();\n const overflowObserver = useObserveOverflow();\n const isCollapsed = overflowObserver.isOverflowing;\n const rootClassName = clsx(styles.tabList, isCollapsed && styles.collapsed);\n\n const handleContextMenuSelectionChange = (key: Aria.Key) => {\n onContextMenuSelectionChange(key);\n };\n\n const regularTabTitles = (\n <Aria.TabList className={styles.titles} ref={overflowObserver.ref}>\n <UiComponentTunnelExit id=\"Titles\" component=\"Tabs\" />\n </Aria.TabList>\n );\n\n const contextMenuWhenCollapsed = isCollapsed && (\n <ContextMenuTriggerView>\n <Button\n variant=\"solid\"\n className={styles.contextMenuButton}\n color=\"light\"\n aria-labelledby={titleCollapsedElementId}\n >\n <UiComponentTunnelExit id=\"ActiveTitle\" component=\"Tabs\" />\n <IconChevronDown />\n </Button>\n\n <ContextMenuView\n disabledKeys={disabledKeys}\n selectedKeys={selection ? [selection] : undefined}\n selectionMode=\"navigation\"\n onAction={(key) => handleContextMenuSelectionChange(key)}\n >\n <UiComponentTunnelExit id=\"ContextMenuItems\" component=\"Tabs\" />\n </ContextMenuView>\n </ContextMenuTriggerView>\n );\n\n return (\n <div className={rootClassName}>\n {regularTabTitles}\n {contextMenuWhenCollapsed}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAkBO,MAAM,OAAA,GAAqB,CAAC,KAAA,KAAU;AAC3C,EAAA,MAAM,EAAE,SAAA,EAAW,YAAA,EAAc,4BAAA,EAA6B,GAAI,KAAA;AAElE,EAAA,MAAM,0BAA0B,KAAA,EAAM;AACtC,EAAA,MAAM,mBAAmB,kBAAA,EAAmB;AAC5C,EAAA,MAAM,cAAc,gBAAA,CAAiB,aAAA;AACrC,EAAA,MAAM,gBAAgB,IAAA,CAAK,MAAA,CAAO,OAAA,EAAS,WAAA,IAAe,OAAO,SAAS,CAAA;AAE1E,EAAA,MAAM,gCAAA,GAAmC,CAAC,GAAA,KAAkB;AAC1D,IAAA,4BAAA,CAA6B,GAAG,CAAA;AA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,24 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
/* */
|
|
3
3
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
4
|
-
import 'react';
|
|
5
4
|
import * as Aria from 'react-aria-components';
|
|
6
5
|
import clsx from 'clsx';
|
|
7
6
|
import styles from './TabTitle.module.scss.mjs';
|
|
8
7
|
import { Text } from '../../../Text/Text.mjs';
|
|
9
8
|
import { useTabContext } from '../Tab/context.mjs';
|
|
10
|
-
import { TunnelEntry } from '@mittwald/react-tunnel';
|
|
11
9
|
import { MenuItem } from '../../../MenuItem/MenuItem.mjs';
|
|
10
|
+
import { UiComponentTunnelEntry } from '../../../UiComponentTunnel/UiComponentTunnelEntry.mjs';
|
|
12
11
|
|
|
13
12
|
const TabTitle = (props) => {
|
|
14
13
|
const { children, className, ...rest } = props;
|
|
15
14
|
const { id } = useTabContext();
|
|
16
15
|
const titleClassName = clsx(styles.tabTitle, className);
|
|
17
16
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18
|
-
/* @__PURE__ */ jsx(
|
|
17
|
+
/* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: "Titles", component: "Tabs", children: /* @__PURE__ */ jsx(Aria.Tab, { ...rest, id, className: titleClassName, children: (p) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
19
18
|
/* @__PURE__ */ jsx(Text, { emulateBoldWidth: true, children: /* @__PURE__ */ jsx("span", { className: styles.text, children }) }),
|
|
20
|
-
/* @__PURE__ */ jsx(
|
|
19
|
+
/* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: "ActiveTitle", component: "Tabs", children: p.isSelected && children })
|
|
21
20
|
] }) }) }),
|
|
22
|
-
/* @__PURE__ */ jsx(
|
|
21
|
+
/* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: "ContextMenuItems", component: "Tabs", children: /* @__PURE__ */ jsx(MenuItem, { className: styles.menuItem, id, children }) })
|
|
23
22
|
] });
|
|
24
23
|
};
|
|
25
24
|
|
package/dist/js/packages/components/src/components/Tabs/components/TabTitle/TabTitle.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabTitle.mjs","sources":["../../../../../../../../../src/components/Tabs/components/TabTitle/TabTitle.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport
|
|
1
|
+
{"version":3,"file":"TabTitle.mjs","sources":["../../../../../../../../../src/components/Tabs/components/TabTitle/TabTitle.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport clsx from \"clsx\";\nimport styles from \"./TabTitle.module.scss\";\nimport { Text } from \"@/components/Text\";\nimport { useTabContext } from \"@/components/Tabs/components/Tab/context\";\nimport { MenuItem } from \"@/components/MenuItem\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\n\nexport interface TabTitleProps\n extends\n Omit<Aria.TabProps, \"children\" | \"id\" | \"isDisabled\">,\n PropsWithChildren {}\n\n/** @flr-generate all */\nexport const TabTitle: FC<TabTitleProps> = (props) => {\n const { children, className, ...rest } = props;\n\n const { id } = useTabContext();\n const titleClassName = clsx(styles.tabTitle, className);\n\n return (\n <>\n <UiComponentTunnelEntry id=\"Titles\" component=\"Tabs\">\n <Aria.Tab {...rest} id={id} className={titleClassName}>\n {(p) => (\n <>\n <Text emulateBoldWidth>\n <span className={styles.text}>{children}</span>\n </Text>\n <UiComponentTunnelEntry id=\"ActiveTitle\" component=\"Tabs\">\n {p.isSelected && children}\n </UiComponentTunnelEntry>\n </>\n )}\n </Aria.Tab>\n </UiComponentTunnelEntry>\n\n <UiComponentTunnelEntry id=\"ContextMenuItems\" component=\"Tabs\">\n <MenuItem className={styles.menuItem} id={id}>\n {children}\n </MenuItem>\n </UiComponentTunnelEntry>\n </>\n );\n};\n\nexport default TabTitle;\n"],"names":[],"mappings":";;;;;;;;;AAeO,MAAM,QAAA,GAA8B,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAW,GAAG,MAAK,GAAI,KAAA;AAEzC,EAAA,MAAM,EAAE,EAAA,EAAG,GAAI,aAAA,EAAc;AAC7B,EAAA,MAAM,cAAA,GAAiB,IAAA,CAAK,MAAA,CAAO,QAAA,EAAU,SAAS,CAAA;AAEtD,EAAA,uBACE,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,oBAAA,GAAA,CAAC,0BAAuB,EAAA,EAAG,QAAA,EAAS,SAAA,EAAU,MAAA,EAC5C,8BAAC,IAAA,CAAK,GAAA,EAAL,EAAU,GAAG,MAAM,EAAA,EAAQ,SAAA,EAAW,cAAA,EACpC,QAAA,EAAA,CAAC,sBACA,IAAA,CAAA,QAAA,EAAA,EACE,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,kBAAgB,IAAA,EACpB,QAAA,kBAAA,GAAA,CAAC,UAAK,SAAA,EAAW,MAAA,CAAO,IAAA,EAAO,QAAA,EAAS,CAAA,EAC1C,CAAA;AAAA,sBACA,GAAA,CAAC,0BAAuB,EAAA,EAAG,aAAA,EAAc,WAAU,MAAA,EAChD,QAAA,EAAA,CAAA,CAAE,cAAc,QAAA,EACnB;AAAA,KAAA,EACF,GAEJ,CAAA,EACF,CAAA;AAAA,oBAEA,GAAA,CAAC,sBAAA,EAAA,EAAuB,EAAA,EAAG,kBAAA,EAAmB,SAAA,EAAU,MAAA,EACtD,QAAA,kBAAA,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAW,MAAA,CAAO,QAAA,EAAU,EAAA,EACnC,UACH,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -37,7 +37,7 @@ const TextArea = flowComponent("TextArea", (props) => {
|
|
|
37
37
|
FieldErrorCaptureContext,
|
|
38
38
|
fieldPropsContext,
|
|
39
39
|
fieldProps
|
|
40
|
-
} = useFieldComponent(props);
|
|
40
|
+
} = useFieldComponent(props, "TextArea");
|
|
41
41
|
let { allowResize } = props;
|
|
42
42
|
if (allowVerticalResize) {
|
|
43
43
|
allowResize = "vertical";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;;;;;;;AAmCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA,GAAO,CAAA;AAAA,IACP,iBAAA,GAAoB,IAAA;AAAA,IACpB,GAAA;AAAA,IACA,mBAAA;AAAA,IACA,qBAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,
|
|
1
|
+
{"version":3,"file":"TextArea.mjs","sources":["../../../../../../../src/components/TextArea/TextArea.tsx"],"sourcesContent":["import * as Aria from \"react-aria-components\";\nimport styles from \"./TextArea.module.scss\";\nimport type { FlowComponentProps } from \"@/lib/componentFactory/flowComponent\";\nimport { flowComponent } from \"@/lib/componentFactory/flowComponent\";\nimport { useObjectRef } from \"@react-aria/utils\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport clsx from \"clsx\";\nimport { type PropsWithChildren, useEffect, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider/useLocalizedStringFormatter\";\nimport locales from \"./locales/*.locale.json\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\n\nexport interface TextAreaProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.TextAreaProps, \"placeholder\" | \"rows\" | \"aria-hidden\">,\n FlowComponentProps<HTMLTextAreaElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n /**\n * Whether the text area should grow if its content gets longer than its\n * initial height.\n */\n autoResizeMaxRows?: number;\n /** Allows the user to manually resize the textArea horizontally. */\n allowResize?: boolean | \"horizontal\" | \"vertical\";\n /** @deprecated Use `allowResize` instead. */\n allowHorizontalResize?: boolean;\n /** @deprecated Use `allowResize` instead. */\n allowVerticalResize?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextArea = flowComponent(\"TextArea\", (props) => {\n const {\n children,\n placeholder,\n rows = 5,\n autoResizeMaxRows = rows,\n ref,\n allowVerticalResize,\n allowHorizontalResize,\n showCharacterCount,\n className,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextArea\");\n\n let { allowResize } = props;\n if (allowVerticalResize) {\n allowResize = \"vertical\";\n } else if (allowHorizontalResize) {\n allowResize = \"horizontal\";\n }\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const inputClassName = clsx(\n styles.input,\n typeof allowResize === \"boolean\" && allowResize ? styles.resize : null,\n allowResize === \"horizontal\"\n ? styles.horizontalResize\n : allowResize === \"vertical\"\n ? styles.verticalResize\n : null,\n );\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextArea\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n const localRef = useObjectRef(ref);\n\n const getHeight = (rows: number) => {\n return `calc(var(--line-height--m) * ${rows} + (var(--form-control--padding-y) * 2))`;\n };\n\n const [resized, setResized] = useState(false);\n\n const autoResizable = rows !== autoResizeMaxRows;\n\n const verticallyResizable =\n allowResize && (!autoResizable || (autoResizable && resized));\n\n useEffect(() => {\n const textarea = localRef.current;\n if (!textarea) return;\n\n const startHeight = textarea.offsetHeight;\n let tracking = false;\n\n const handleMouseDown = () => {\n tracking = true;\n };\n\n const handleMouseMove = () => {\n if (!tracking || resized) return;\n\n const currentHeight = textarea.offsetHeight;\n\n if (currentHeight !== startHeight) {\n setResized(true);\n tracking = false;\n }\n };\n\n const handleMouseUp = () => {\n tracking = false;\n };\n\n window.addEventListener(\"mousedown\", handleMouseDown);\n window.addEventListener(\"mousemove\", handleMouseMove);\n window.addEventListener(\"mouseup\", handleMouseUp);\n\n return () => {\n window.removeEventListener(\"mousedown\", handleMouseDown);\n window.removeEventListener(\"mousemove\", handleMouseMove);\n window.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }, [resized]);\n\n const updateHeight = () => {\n if (localRef.current && autoResizable && !verticallyResizable) {\n // https://stackoverflow.com/a/60795884\n localRef.current.style.height = \"0px\";\n const scrollHeight = localRef.current.scrollHeight;\n // + 2 to add border height\n localRef.current.style.height = scrollHeight + 2 + \"px\";\n }\n };\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n >\n <PropsContextProvider props={fieldPropsContext}>\n <FieldErrorCaptureContext>{children}</FieldErrorCaptureContext>\n <Aria.TextArea\n rows={rows}\n aria-hidden={props[\"aria-hidden\"]}\n placeholder={placeholder}\n className={inputClassName}\n ref={localRef}\n onChange={updateHeight}\n style={{\n minHeight: getHeight(rows),\n maxHeight: verticallyResizable\n ? undefined\n : getHeight(autoResizeMaxRows),\n }}\n />\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextArea;\n"],"names":["rows"],"mappings":";;;;;;;;;;;;;;;AAmCO,MAAM,QAAA,GAAW,aAAA,CAAc,UAAA,EAAY,CAAC,KAAA,KAAU;AAC3D,EAAA,MAAM;AAAA,IACJ,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA,GAAO,CAAA;AAAA,IACP,iBAAA,GAAoB,IAAA;AAAA,IACpB,GAAA;AAAA,IACA,mBAAA;AAAA,IACA,qBAAA;AAAA,IACA,kBAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,GAAG;AAAA,GACL,GAAI,4BAA4B,KAAK,CAAA;AAErC,EAAA,MAAM,CAAC,eAAA,EAAiB,kBAAkB,CAAA,GAAI,QAAA;AAAA,IAC5C,KAAA,CAAM,YAAA,EAAc,MAAA,IAAU,KAAA,CAAM,OAAO,MAAA,IAAU;AAAA,GACvD;AAEA,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,G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
|
|
9
9
|
horizontalResize: horizontalResize,
|
|
10
10
|
verticalResize: verticalResize,
|
|
11
|
-
resize: resize
|
|
12
|
-
};
|
|
11
|
+
resize: resize};
|
|
13
12
|
|
|
14
13
|
export { styles as default, horizontalResize, input, resize, verticalResize };
|
|
15
14
|
//# sourceMappingURL=TextArea.module.scss.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -19,9 +19,9 @@ import '../../views/IconView.mjs';
|
|
|
19
19
|
import { IconHide } from '../Icon/components/icons/IconHide.mjs';
|
|
20
20
|
import { IconShow } from '../Icon/components/icons/IconShow.mjs';
|
|
21
21
|
import clsx from 'clsx';
|
|
22
|
-
import { TunnelProvider, TunnelExit } from '@mittwald/react-tunnel';
|
|
23
22
|
import '../TranslationProvider/TranslationProvider.mjs';
|
|
24
23
|
import { useLocalizedStringFormatter } from '../TranslationProvider/useLocalizedStringFormatter.mjs';
|
|
24
|
+
import { UiComponentTunnelExit } from '../UiComponentTunnel/UiComponentTunnelExit.mjs';
|
|
25
25
|
|
|
26
26
|
const TextField = flowComponent("TextField", (props) => {
|
|
27
27
|
const {
|
|
@@ -44,16 +44,25 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
44
44
|
FieldErrorCaptureContext,
|
|
45
45
|
fieldPropsContext,
|
|
46
46
|
fieldProps
|
|
47
|
-
} = useFieldComponent(props);
|
|
47
|
+
} = useFieldComponent(props, "TextField");
|
|
48
48
|
const rootClassName = clsx(fieldProps.className, className);
|
|
49
49
|
const propsContext = {
|
|
50
50
|
Button: {
|
|
51
51
|
className: styles.button,
|
|
52
52
|
variant: "plain",
|
|
53
53
|
color: "secondary",
|
|
54
|
-
|
|
54
|
+
tunnel: {
|
|
55
|
+
id: "button",
|
|
56
|
+
component: "TextField"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
CopyButton: {
|
|
60
|
+
className: styles.button,
|
|
61
|
+
tunnel: {
|
|
62
|
+
id: "button",
|
|
63
|
+
component: "TextField"
|
|
64
|
+
}
|
|
55
65
|
},
|
|
56
|
-
CopyButton: { className: styles.button, tunnelId: "button" },
|
|
57
66
|
...fieldPropsContext
|
|
58
67
|
};
|
|
59
68
|
const handleChange = (v) => {
|
|
@@ -77,7 +86,7 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
77
86
|
className: rootClassName,
|
|
78
87
|
onChange: handleChange,
|
|
79
88
|
type,
|
|
80
|
-
children: /* @__PURE__ */
|
|
89
|
+
children: /* @__PURE__ */ jsxs(PropsContextProvider, { props: propsContext, children: [
|
|
81
90
|
/* @__PURE__ */ jsxs(FieldErrorCaptureContext, { children: [
|
|
82
91
|
children,
|
|
83
92
|
/* @__PURE__ */ jsxs("div", { className: styles.inputContainer, children: [
|
|
@@ -90,7 +99,7 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
90
99
|
ref
|
|
91
100
|
}
|
|
92
101
|
),
|
|
93
|
-
/* @__PURE__ */ jsx(
|
|
102
|
+
/* @__PURE__ */ jsx(UiComponentTunnelExit, { id: "button", component: "TextField" }),
|
|
94
103
|
typeFromProps === "password" && /* @__PURE__ */ jsx(
|
|
95
104
|
Button,
|
|
96
105
|
{
|
|
@@ -108,7 +117,7 @@ const TextField = flowComponent("TextField", (props) => {
|
|
|
108
117
|
showCharacterCount && /* @__PURE__ */ jsx(FieldDescription, { children: charactersCountDescription })
|
|
109
118
|
] }),
|
|
110
119
|
/* @__PURE__ */ jsx(FieldErrorView, {})
|
|
111
|
-
] })
|
|
120
|
+
] })
|
|
112
121
|
}
|
|
113
122
|
);
|
|
114
123
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.mjs","sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport {
|
|
1
|
+
{"version":3,"file":"TextField.mjs","sources":["../../../../../../../src/components/TextField/TextField.tsx"],"sourcesContent":["import {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport * as Aria from \"react-aria-components\";\nimport { type PropsWithChildren, useState } from \"react\";\nimport { useControlledHostValueProps } from \"@/lib/remote/useControlledHostValueProps\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport styles from \"./TextField.module.scss\";\nimport { FieldDescription } from \"@/components/FieldDescription\";\nimport locales from \"./locales/*.locale.json\";\nimport { Button } from \"@/components/Button\";\nimport { IconHide, IconShow } from \"@/components/Icon/components/icons\";\nimport clsx from \"clsx\";\nimport { useLocalizedStringFormatter } from \"@/components/TranslationProvider\";\nimport { UiComponentTunnelExit } from \"../UiComponentTunnel/UiComponentTunnelExit\";\n\nexport interface TextFieldProps\n extends\n PropsWithChildren<Omit<Aria.TextFieldProps, \"children\">>,\n Pick<Aria.InputProps, \"placeholder\">,\n FlowComponentProps<HTMLInputElement> {\n /** Whether a character count should be displayed inside the field description. */\n showCharacterCount?: boolean;\n}\n\n/** @flr-generate all */\nexport const TextField = flowComponent(\"TextField\", (props) => {\n const {\n className,\n showCharacterCount,\n form,\n placeholder,\n ref,\n type: typeFromProps,\n children,\n onChange,\n ...rest\n } = useControlledHostValueProps(props);\n\n const [charactersCount, setCharactersCount] = useState(\n props.defaultValue?.length ?? props.value?.length ?? 0,\n );\n\n const [type, setType] = useState(typeFromProps);\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TextField\");\n\n const rootClassName = clsx(fieldProps.className, className);\n\n const propsContext: PropsContext = {\n Button: {\n className: styles.button,\n variant: \"plain\",\n color: \"secondary\",\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n CopyButton: {\n className: styles.button,\n tunnel: {\n id: \"button\",\n component: \"TextField\",\n },\n },\n ...fieldPropsContext,\n };\n\n const handleChange = (v: string) => {\n if (showCharacterCount) {\n setCharactersCount(v.length);\n }\n if (onChange) {\n onChange(v);\n }\n };\n\n const translation = useLocalizedStringFormatter(locales, \"TextField\");\n\n const charactersCountDescription = translation.format(\"characters\", {\n count: charactersCount,\n maxCount: props.maxLength ?? 0,\n });\n\n return (\n <Aria.TextField\n {...rest}\n {...fieldProps}\n className={rootClassName}\n onChange={handleChange}\n type={type}\n >\n <PropsContextProvider props={propsContext}>\n <FieldErrorCaptureContext>\n {children}\n <div className={styles.inputContainer}>\n <Aria.Input\n form={form}\n placeholder={placeholder}\n className={styles.input}\n ref={ref}\n />\n <UiComponentTunnelExit id=\"button\" component=\"TextField\" />\n {typeFromProps === \"password\" && (\n <Button\n color=\"secondary\"\n variant=\"plain\"\n className={styles.button}\n onPress={() =>\n setType(type === \"password\" ? \"text\" : \"password\")\n }\n aria-label={translation.format(\n `password.${type === \"password\" ? \"show\" : \"hide\"}`,\n )}\n >\n {type === \"password\" ? <IconShow /> : <IconHide />}\n </Button>\n )}\n </div>\n {showCharacterCount && (\n <FieldDescription>{charactersCountDescription}</FieldDescription>\n )}\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </PropsContextProvider>\n </Aria.TextField>\n );\n});\n\nexport default TextField;\n"],"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A,gBACN,OAAA,EAAQ,OAAA;AAAA,gBACR,WAAW,MAAA,CAAO,MAAA;AAAA,gBAClB,SAAS,MACP,OAAA,CAAQ,IAAA,KAAS,UAAA,GAAa,SAAS,UAAU,CAAA;AAAA,gBAEnD,cAAY,WAAA,CAAY,MAAA;AAAA,kBACtB,CAAA,SAAA,EAAY,IAAA,KAAS,UAAA,GAAa,MAAA,GAAS,MAAM,CAAA;AAAA,iBACnD;AAAA,gBAEC,mBAAS,UAAA,mBAAa,GAAA,CAAC,QAAA,EAAA,EAAS,CAAA,uBAAM,QAAA,EAAA,EAAS;AAAA;AAAA;AAClD,WAAA,EAEJ,CAAA;AAAA,UACC,kBAAA,oBACC,GAAA,CAAC,gBAAA,EAAA,EAAkB,QAAA,EAAA,0BAAA,EAA2B;AAAA,SAAA,EAElD,CAAA;AAAA,4BACC,cAAA,EAAA,EAAe;AAAA,OAAA,EAClB;AAAA;AAAA,GACF;AAEJ,CAAC;;;;"}
|
|
@@ -17,7 +17,7 @@ const TimeField = flowComponent("TimeField", (props) => {
|
|
|
17
17
|
FieldErrorCaptureContext,
|
|
18
18
|
fieldPropsContext,
|
|
19
19
|
fieldProps
|
|
20
|
-
} = useFieldComponent(props);
|
|
20
|
+
} = useFieldComponent(props, "TimeField");
|
|
21
21
|
return /* @__PURE__ */ jsxs(Aria.TimeField, { hourCycle: 24, ...rest, ...fieldProps, children: [
|
|
22
22
|
/* @__PURE__ */ jsxs(FieldErrorCaptureContext, { children: [
|
|
23
23
|
/* @__PURE__ */ jsx(DateInput, { className: styles.dateInput, ref }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.mjs","sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props);\n\n return (\n <Aria.TimeField hourCycle={24} {...rest} {...fieldProps}>\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"names":[],"mappings":";;;;;;;;;;AAiBO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM,EAAE,QAAA,EAAU,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,
|
|
1
|
+
{"version":3,"file":"TimeField.mjs","sources":["../../../../../../../src/components/TimeField/TimeField.tsx"],"sourcesContent":["import { type PropsWithChildren } from \"react\";\nimport * as Aria from \"react-aria-components\";\nimport {\n flowComponent,\n type FlowComponentProps,\n} from \"@/lib/componentFactory/flowComponent\";\nimport { PropsContextProvider } from \"@/lib/propsContext\";\nimport styles from \"./TimeField.module.scss\";\nimport { useFieldComponent } from \"@/lib/hooks/useFieldComponent\";\nimport DateInput from \"@/components/DateInput\";\n\nexport interface TimeFieldProps<T extends Aria.TimeValue = Aria.TimeValue>\n extends\n PropsWithChildren<Omit<Aria.TimeFieldProps<T>, \"children\">>,\n FlowComponentProps<HTMLSpanElement> {}\n\n/** @flr-generate all */\nexport const TimeField = flowComponent(\"TimeField\", (props) => {\n const { children, ref, ...rest } = props;\n\n const {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps,\n } = useFieldComponent(props, \"TimeField\");\n\n return (\n <Aria.TimeField hourCycle={24} {...rest} {...fieldProps}>\n <FieldErrorCaptureContext>\n <DateInput className={styles.dateInput} ref={ref} />\n <PropsContextProvider props={fieldPropsContext}>\n {children}\n </PropsContextProvider>\n </FieldErrorCaptureContext>\n <FieldErrorView />\n </Aria.TimeField>\n );\n});\n\nexport default TimeField;\n"],"names":[],"mappings":";;;;;;;;;;AAiBO,MAAM,SAAA,GAAY,aAAA,CAAc,WAAA,EAAa,CAAC,KAAA,KAAU;AAC7D,EAAA,MAAM,EAAE,QAAA,EAAU,GAAA,EAAK,GAAG,MAAK,GAAI,KAAA;AAEnC,EAAA,MAAM;AAAA,IACJ,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA;AAAA,GACF,GAAI,iBAAA,CAAkB,KAAA,EAAO,WAAW,CAAA;AAExC,EAAA,uBACE,IAAA,CAAC,KAAK,SAAA,EAAL,EAAe,WAAW,EAAA,EAAK,GAAG,IAAA,EAAO,GAAG,UAAA,EAC3C,QAAA,EAAA;AAAA,oBAAA,IAAA,CAAC,wBAAA,EAAA,EACC,QAAA,EAAA;AAAA,sBAAA,GAAA,CAAC,SAAA,EAAA,EAAU,SAAA,EAAW,MAAA,CAAO,SAAA,EAAW,GAAA,EAAU,CAAA;AAAA,sBAClD,GAAA,CAAC,oBAAA,EAAA,EAAqB,KAAA,EAAO,iBAAA,EAC1B,QAAA,EACH;AAAA,KAAA,EACF,CAAA;AAAA,wBACC,cAAA,EAAA,EAAe;AAAA,GAAA,EAClB,CAAA;AAEJ,CAAC;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeField.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TimeField.module.scss.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { TunnelEntry } from '@mittwald/react-tunnel';
|
|
5
|
+
import { getTunnelProviderId } from './lib.mjs';
|
|
6
|
+
|
|
7
|
+
const UiComponentTunnelEntry = (props) => {
|
|
8
|
+
const { component, ...tunnelEntryProps } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
TunnelEntry,
|
|
11
|
+
{
|
|
12
|
+
...tunnelEntryProps,
|
|
13
|
+
providerId: getTunnelProviderId(component)
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { UiComponentTunnelEntry };
|
|
19
|
+
//# sourceMappingURL=UiComponentTunnelEntry.mjs.map
|
package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelEntry.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiComponentTunnelEntry.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelEntry.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelEntry, type TunnelEntryProps } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport type UiComponentTunnelEntryProps = Omit<\n TunnelEntryProps,\n \"providerId\"\n> & {\n component: FlowComponentName;\n};\n\nexport const UiComponentTunnelEntry: FC<UiComponentTunnelEntryProps> = (\n props,\n) => {\n const { component, ...tunnelEntryProps } = props;\n return (\n <TunnelEntry\n {...tunnelEntryProps}\n providerId={getTunnelProviderId(component)}\n />\n );\n};\n"],"names":[],"mappings":";;;;AAYO,MAAM,sBAAA,GAA0D,CACrE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,gBAAA,EAAiB,GAAI,KAAA;AAC3C,EAAA,uBACE,GAAA;AAAA,IAAC,WAAA;AAAA,IAAA;AAAA,MACE,GAAG,gBAAA;AAAA,MACJ,UAAA,EAAY,oBAAoB,SAAS;AAAA;AAAA,GAC3C;AAEJ;;;;"}
|
package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { TunnelExit } from '@mittwald/react-tunnel';
|
|
5
|
+
import { getTunnelProviderId } from './lib.mjs';
|
|
6
|
+
|
|
7
|
+
const UiComponentTunnelExit = (props) => {
|
|
8
|
+
const { component, ...tunnelExitProps } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
TunnelExit,
|
|
11
|
+
{
|
|
12
|
+
...tunnelExitProps,
|
|
13
|
+
providerId: getTunnelProviderId(component)
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export { UiComponentTunnelExit };
|
|
19
|
+
//# sourceMappingURL=UiComponentTunnelExit.mjs.map
|
package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelExit.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiComponentTunnelExit.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelExit.tsx"],"sourcesContent":["import type { FC } from \"react\";\nimport { TunnelExit, type TunnelExitProps } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport type UiComponentTunnelExitProps = Omit<TunnelExitProps, \"providerId\"> & {\n component: FlowComponentName;\n};\n\nexport const UiComponentTunnelExit: FC<UiComponentTunnelExitProps> = (\n props,\n) => {\n const { component, ...tunnelExitProps } = props;\n return (\n <TunnelExit\n {...tunnelExitProps}\n providerId={getTunnelProviderId(component)}\n />\n );\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,qBAAA,GAAwD,CACnE,KAAA,KACG;AACH,EAAA,MAAM,EAAE,SAAA,EAAW,GAAG,eAAA,EAAgB,GAAI,KAAA;AAC1C,EAAA,uBACE,GAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACE,GAAG,eAAA;AAAA,MACJ,UAAA,EAAY,oBAAoB,SAAS;AAAA;AAAA,GAC3C;AAEJ;;;;"}
|
package/dist/js/packages/components/src/components/UiComponentTunnel/UiComponentTunnelProvider.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
/* */
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
import { TunnelProvider } from '@mittwald/react-tunnel';
|
|
5
|
+
import { getTunnelProviderId } from './lib.mjs';
|
|
6
|
+
|
|
7
|
+
const UiComponentTunnelProvider = (props) => {
|
|
8
|
+
const { children, component } = props;
|
|
9
|
+
return /* @__PURE__ */ jsx(TunnelProvider, { id: getTunnelProviderId(component), children });
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { UiComponentTunnelProvider };
|
|
13
|
+
//# sourceMappingURL=UiComponentTunnelProvider.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiComponentTunnelProvider.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/UiComponentTunnelProvider.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { TunnelProvider } from \"@mittwald/react-tunnel\";\nimport { getTunnelProviderId } from \"./lib\";\nimport type { FlowComponentName } from \"../propTypes\";\n\nexport interface UiComponentTunnelProviderProps extends PropsWithChildren {\n component: FlowComponentName;\n}\n\nexport const UiComponentTunnelProvider: FC<UiComponentTunnelProviderProps> = (\n props,\n) => {\n const { children, component } = props;\n\n return (\n <TunnelProvider id={getTunnelProviderId(component)}>\n {children}\n </TunnelProvider>\n );\n};\n"],"names":[],"mappings":";;;;AASO,MAAM,yBAAA,GAAgE,CAC3E,KAAA,KACG;AACH,EAAA,MAAM,EAAE,QAAA,EAAU,SAAA,EAAU,GAAI,KAAA;AAEhC,EAAA,2BACG,cAAA,EAAA,EAAe,EAAA,EAAI,mBAAA,CAAoB,SAAS,GAC9C,QAAA,EACH,CAAA;AAEJ;;;;"}
|