@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lib.mjs","sources":["../../../../../../../src/components/UiComponentTunnel/lib.ts"],"sourcesContent":["import type { FlowComponentName } from \"../propTypes\";\n\nconst tunnelProviderPrefix = \"@mittwald/flow/tunnel/\";\n\nexport const getTunnelProviderId = (componentName: FlowComponentName) =>\n `${tunnelProviderPrefix}${componentName}`;\n"],"names":[],"mappings":"AAEA,MAAM,oBAAA,GAAuB,wBAAA;AAEtB,MAAM,sBAAsB,CAAC,aAAA,KAClC,CAAA,EAAG,oBAAoB,GAAG,aAAa,CAAA;;;;"}
|
|
@@ -2,6 +2,7 @@ const propsContextSupportingComponentsMap = {
|
|
|
2
2
|
AccentBox: true,
|
|
3
3
|
Action: true,
|
|
4
4
|
ActionGroup: true,
|
|
5
|
+
Accordion: true,
|
|
5
6
|
Avatar: true,
|
|
6
7
|
Autocomplete: true,
|
|
7
8
|
Alert: true,
|
|
@@ -12,6 +13,7 @@ const propsContextSupportingComponentsMap = {
|
|
|
12
13
|
Badge: true,
|
|
13
14
|
Button: true,
|
|
14
15
|
CodeEditor: true,
|
|
16
|
+
Chat: true,
|
|
15
17
|
Checkbox: true,
|
|
16
18
|
CheckboxButton: true,
|
|
17
19
|
CheckboxGroup: true,
|
|
@@ -46,6 +48,7 @@ const propsContextSupportingComponentsMap = {
|
|
|
46
48
|
LightBox: true,
|
|
47
49
|
Link: true,
|
|
48
50
|
List: true,
|
|
51
|
+
ListItemView: true,
|
|
49
52
|
ListSummary: true,
|
|
50
53
|
MarkdownEditor: true,
|
|
51
54
|
MenuItem: true,
|
|
@@ -68,6 +71,7 @@ const propsContextSupportingComponentsMap = {
|
|
|
68
71
|
Rating: true,
|
|
69
72
|
SearchField: true,
|
|
70
73
|
Section: true,
|
|
74
|
+
SectionHeader: true,
|
|
71
75
|
Segment: true,
|
|
72
76
|
SegmentedControl: true,
|
|
73
77
|
Select: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../../../../../../src/components/propTypes/index.ts"],"sourcesContent":["import type { TextProps } from \"@/components/Text\";\nimport type { ButtonProps } from \"@/components/Button\";\nimport type { IconProps } from \"@/components/Icon\";\nimport type { LabelProps } from \"@/components/Label\";\nimport type { ContentProps } from \"@/components/Content\";\nimport type { LayoutCardProps } from \"@/components/LayoutCard\";\nimport type { LinkProps } from \"@/components/Link\";\nimport type { LightBoxProps } from \"@/components/LightBox\";\nimport type { FieldErrorProps } from \"@/components/FieldError\";\nimport type { FieldDescriptionProps } from \"@/components/FieldDescription\";\nimport type { AlertProps } from \"@/components/Alert\";\nimport type { HeadingProps } from \"@/components/Heading\";\nimport type { InitialsProps } from \"@/components/Initials\";\nimport type { ImageProps } from \"@/components/Image\";\nimport type { CopyButtonProps } from \"@/components/CopyButton\";\nimport type { HeaderProps } from \"@/components/Header/\";\nimport type { SwitchProps } from \"@/components/Switch\";\nimport type { AlertBadgeProps } from \"@/components/AlertBadge\";\nimport type { ActionGroupProps } from \"@/components/ActionGroup\";\nimport type { AvatarProps } from \"@/components/Avatar\";\nimport type { ActionProps } from \"@/components/Action\";\nimport type {\n ContextMenuProps,\n ContextMenuTriggerProps,\n MenuItemProps,\n} from \"@/components/ContextMenu\";\nimport type { SelectProps } from \"@/components/Select\";\nimport type {\n RadioButtonProps,\n RadioGroupProps,\n RadioProps,\n} from \"@/components/RadioGroup\";\nimport type { TextFieldProps } from \"@/components/TextField\";\nimport type { NumberFieldProps } from \"@/components/NumberField\";\nimport type { TextAreaProps } from \"@/components/TextArea\";\nimport type { CheckboxGroupProps } from \"@/components/CheckboxGroup\";\nimport type { CheckboxProps } from \"@/components/Checkbox\";\nimport type { CheckboxButtonProps } from \"@/components/CheckboxButton\";\nimport type { TabsProps } from \"@/components/Tabs\";\nimport type { ModalProps } from \"@/components/Modal\";\nimport type { SectionProps } from \"@/components/Section\";\nimport type { SliderProps } from \"@/components/Slider\";\nimport type { CounterBadgeProps } from \"@/components/CounterBadge\";\nimport type { FlowComponentName } from \"@/components/propTypes/types\";\nimport type {\n ContextualHelpProps,\n ContextualHelpTriggerProps,\n} from \"@/components/ContextualHelp\";\nimport type { PopoverProps, PopoverTriggerProps } from \"@/components/Popover\";\nimport type { ContextMenuSectionProps } from \"@/components/ContextMenu/components/ContextMenuSection\";\nimport type { ListItemViewContentProps, ListProps } from \"@/components/List\";\nimport type { PasswordCreationFieldProps } from \"@/components/PasswordCreationField\";\nimport type { SearchFieldProps } from \"@/components/SearchField\";\nimport type { BadgeProps } from \"@/components/Badge\";\nimport type { DatePickerProps } from \"@/components/DatePicker\";\nimport type * as Aria from \"react-aria-components\";\nimport type { DateRangePickerProps } from \"@/components/DateRangePicker\";\nimport type { TimeFieldProps } from \"@/components/TimeField\";\nimport type { AlertIconProps } from \"@/components/AlertIcon\";\nimport type { ListSummaryProps } from \"@/components/List/components/ListSummary/ListSummary\";\nimport type { SegmentedControlProps } from \"@/components/SegmentedControl\";\nimport type { SegmentProps } from \"@/components/SegmentedControl/components/Segment\";\nimport type { FileCardProps } from \"@/components/FileCard\";\nimport type { FileFieldProps } from \"@/components/FileField\";\nimport type { AlignProps } from \"@/components/Align\";\nimport type { CountryOptionsProps } from \"src/components/CountryOptions\";\nimport type { ComboBoxProps } from \"@/components/ComboBox\";\nimport type { OptionProps } from \"@/components/Option\";\nimport type { MessageProps } from \"@/components/Message\";\nimport type { MessageThreadProps } from \"@/components/MessageThread\";\nimport type { FileCardListProps } from \"@/components/FileCardList\";\nimport type { AccentBoxProps } from \"@/components/AccentBox\";\nimport type { ColumnLayoutProps } from \"@/components/ColumnLayout\";\nimport type { MenuTriggerProps } from \"@/components/OverlayTrigger\";\nimport type { ProgressBarProps } from \"@/components/ProgressBar\";\nimport type { FileDropZoneProps } from \"@/components/FileDropZone\";\nimport type { NavigationProps } from \"@/components/Navigation\";\nimport type { NavigationGroupProps } from \"@/components/Navigation/components/NavigationGroup\";\nimport type { AutocompleteProps } from \"@/components/Autocomplete/Autocomplete\";\nimport type { OptionsProps } from \"@/components/Options/Options\";\nimport type { MarkdownEditorProps } from \"@/components/MarkdownEditor\";\nimport type { AlertTextProps } from \"@/components/AlertText\";\nimport type { IllustratedMessageProps } from \"@/components/IllustratedMessage\";\nimport type { RatingProps } from \"@/components/Rating\";\nimport type { CodeEditorProps } from \"@/components/CodeEditor\";\nimport type { KbdProps } from \"@/components/Kbd/Kbd\";\nimport type { AccordionProps } from \"@/components/Accordion\";\nimport type { ChatProps } from \"../Chat\";\nimport type { SectionHeaderProps } from \"../Section/components/SectionHeader/SectionHeader\";\n\nexport * from \"./types\";\n\nexport interface FlowComponentPropsTypes {\n AccentBox: AccentBoxProps;\n Action: ActionProps;\n ActionGroup: ActionGroupProps;\n Accordion: AccordionProps;\n Alert: AlertProps;\n AlertBadge: AlertBadgeProps;\n AlertIcon: AlertIconProps;\n AlertText: AlertTextProps;\n Align: AlignProps;\n Avatar: AvatarProps;\n Autocomplete: AutocompleteProps;\n Badge: BadgeProps;\n Button: ButtonProps;\n CodeEditor: CodeEditorProps;\n Chat: ChatProps;\n Checkbox: CheckboxProps;\n CheckboxButton: CheckboxButtonProps;\n CheckboxGroup: CheckboxGroupProps;\n ColumnLayout: ColumnLayoutProps;\n ComboBox: ComboBoxProps;\n Content: ContentProps;\n ContextMenu: ContextMenuProps;\n ContextMenuSection: ContextMenuSectionProps;\n ContextMenuTrigger: ContextMenuTriggerProps;\n ContextualHelp: ContextualHelpProps;\n ContextualHelpTrigger: ContextualHelpTriggerProps;\n CopyButton: CopyButtonProps;\n CounterBadge: CounterBadgeProps;\n CountryOptions: CountryOptionsProps;\n DatePicker: DatePickerProps<Aria.DateValue>;\n DateRangePicker: DateRangePickerProps<Aria.DateValue>;\n FieldDescription: FieldDescriptionProps;\n FieldError: FieldErrorProps;\n FileCard: FileCardProps;\n FileCardList: FileCardListProps;\n FileField: FileFieldProps;\n FileDropZone: FileDropZoneProps;\n Header: HeaderProps;\n Heading: HeadingProps;\n Icon: IconProps;\n IllustratedMessage: IllustratedMessageProps;\n Image: ImageProps;\n Initials: InitialsProps;\n Label: LabelProps;\n LayoutCard: LayoutCardProps;\n LightBox: LightBoxProps;\n Link: LinkProps;\n List: ListProps<never>;\n ListItemView: ListItemViewContentProps;\n ListSummary: ListSummaryProps;\n MarkdownEditor: MarkdownEditorProps;\n MenuItem: MenuItemProps;\n MenuTrigger: MenuTriggerProps;\n Message: MessageProps;\n MessageThread: MessageThreadProps;\n Modal: ModalProps;\n Navigation: NavigationProps;\n NavigationGroup: NavigationGroupProps;\n NumberField: NumberFieldProps;\n Option: OptionProps;\n Options: OptionsProps;\n Popover: PopoverProps;\n PopoverTrigger: PopoverTriggerProps;\n PasswordCreationField: PasswordCreationFieldProps;\n ProgressBar: ProgressBarProps;\n Radio: RadioProps;\n RadioButton: RadioButtonProps;\n RadioGroup: RadioGroupProps;\n Rating: RatingProps;\n SearchField: SearchFieldProps;\n Section: SectionProps;\n Segment: SegmentProps;\n SegmentedControl: SegmentedControlProps;\n Select: SelectProps;\n Kbd: KbdProps;\n SectionHeader: SectionHeaderProps;\n Slider: SliderProps;\n Switch: SwitchProps;\n Tabs: TabsProps;\n TabTitle: TabsProps;\n Text: TextProps;\n TextArea: TextAreaProps;\n TextField: TextFieldProps;\n TimeField: TimeFieldProps;\n}\n\nconst propsContextSupportingComponentsMap: Record<\n keyof FlowComponentPropsTypes,\n true\n> = {\n AccentBox: true,\n Action: true,\n ActionGroup: true,\n Accordion: true,\n Avatar: true,\n Autocomplete: true,\n Alert: true,\n AlertBadge: true,\n AlertIcon: true,\n AlertText: true,\n Align: true,\n Badge: true,\n Button: true,\n CodeEditor: true,\n Chat: true,\n Checkbox: true,\n CheckboxButton: true,\n CheckboxGroup: true,\n ColumnLayout: true,\n ComboBox: true,\n Content: true,\n ContextMenu: true,\n ContextMenuSection: true,\n ContextMenuTrigger: true,\n ContextualHelp: true,\n ContextualHelpTrigger: true,\n CopyButton: true,\n CounterBadge: true,\n CountryOptions: true,\n DatePicker: true,\n DateRangePicker: true,\n FieldDescription: true,\n FieldError: true,\n FileCard: true,\n FileCardList: true,\n FileField: true,\n FileDropZone: true,\n Header: true,\n Heading: true,\n Icon: true,\n IllustratedMessage: true,\n Image: true,\n Initials: true,\n Kbd: true,\n Label: true,\n LayoutCard: true,\n LightBox: true,\n Link: true,\n List: true,\n ListItemView: true,\n ListSummary: true,\n MarkdownEditor: true,\n MenuItem: true,\n MenuTrigger: true,\n Message: true,\n MessageThread: true,\n Modal: true,\n Navigation: true,\n NavigationGroup: true,\n NumberField: true,\n Radio: true,\n Option: true,\n Options: true,\n Popover: true,\n PopoverTrigger: true,\n PasswordCreationField: true,\n ProgressBar: true,\n RadioButton: true,\n RadioGroup: true,\n Rating: true,\n SearchField: true,\n Section: true,\n SectionHeader: true,\n Segment: true,\n SegmentedControl: true,\n Select: true,\n Slider: true,\n Switch: true,\n Tabs: true,\n TabTitle: true,\n TestComponent: true,\n Text: true,\n TextArea: true,\n TextField: true,\n TimeField: true,\n};\n\nexport const propsContextSupportingComponents = Object.keys(\n propsContextSupportingComponentsMap,\n) as FlowComponentName[];\n"],"names":[],"mappings":"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"}
|
|
@@ -2,19 +2,20 @@
|
|
|
2
2
|
/* */
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { memo, cloneElement } from 'react';
|
|
5
|
-
import { TunnelEntry } from '@mittwald/react-tunnel';
|
|
6
5
|
import { SlotContextProvider } from '../slotContext/SlotContextProvider.mjs';
|
|
7
6
|
import { useProps } from '../hooks/useProps.mjs';
|
|
8
7
|
import { useComponentPropsContext } from '../propsContext/propsContext.mjs';
|
|
9
8
|
import { ComponentPropsContextProvider } from '../propsContext/components/ComponentPropsContextProvider.mjs';
|
|
10
9
|
import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';
|
|
11
10
|
import ClearPropsContextView from '../../views/ClearPropsContextView.mjs';
|
|
11
|
+
import { UiComponentTunnelProvider } from '../../components/UiComponentTunnel/UiComponentTunnelProvider.mjs';
|
|
12
|
+
import { UiComponentTunnelEntry } from '../../components/UiComponentTunnel/UiComponentTunnelEntry.mjs';
|
|
12
13
|
|
|
13
14
|
function flowComponent(componentName, ImplementationComponentType, options = {}) {
|
|
14
15
|
const { type = "ui", isRemoteComponent = false } = options;
|
|
15
16
|
const MemoizedImplementationComponentType = memo(ImplementationComponentType);
|
|
16
17
|
function Component(props) {
|
|
17
|
-
const {
|
|
18
|
+
const { tunnel, wrapWith, ...propsWithContext } = useProps(
|
|
18
19
|
componentName,
|
|
19
20
|
props
|
|
20
21
|
);
|
|
@@ -22,6 +23,9 @@ function flowComponent(componentName, ImplementationComponentType, options = {})
|
|
|
22
23
|
const componentProps = useComponentPropsContext(componentName);
|
|
23
24
|
ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;
|
|
24
25
|
let element = /* @__PURE__ */ jsx(MemoizedImplementationComponentType, { ...implementationTypeProps });
|
|
26
|
+
if (type === "ui" || type === "layout") {
|
|
27
|
+
element = /* @__PURE__ */ jsx(UiComponentTunnelProvider, { component: componentName, children: element });
|
|
28
|
+
}
|
|
25
29
|
element = /* @__PURE__ */ jsx(ComponentPropsContextProvider, { componentProps, children: element });
|
|
26
30
|
if (type === "ui") {
|
|
27
31
|
if (isRemoteComponent) {
|
|
@@ -36,8 +40,8 @@ function flowComponent(componentName, ImplementationComponentType, options = {})
|
|
|
36
40
|
if (wrapWith) {
|
|
37
41
|
element = cloneElement(wrapWith, void 0, element);
|
|
38
42
|
}
|
|
39
|
-
if (
|
|
40
|
-
element = /* @__PURE__ */ jsx(
|
|
43
|
+
if (tunnel) {
|
|
44
|
+
element = /* @__PURE__ */ jsx(UiComponentTunnelEntry, { id: tunnel.id, component: tunnel.component, children: element });
|
|
41
45
|
}
|
|
42
46
|
return element;
|
|
43
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n FunctionComponent,\n ReactElement,\n ReactNode,\n RefAttributes,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport
|
|
1
|
+
{"version":3,"file":"flowComponent.mjs","sources":["../../../../../../../src/lib/componentFactory/flowComponent.tsx"],"sourcesContent":["import type {\n FlowComponentName,\n FlowComponentProps as FlowComponentPropsOfName,\n} from \"@/components/propTypes\";\nimport type {\n ComponentProps,\n ComponentType,\n FunctionComponent,\n ReactElement,\n ReactNode,\n RefAttributes,\n} from \"react\";\nimport { cloneElement, memo } from \"react\";\nimport type { PropsWithTunnel } from \"@/lib/types/props\";\nimport SlotContextProvider from \"@/lib/slotContext/SlotContextProvider\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { useComponentPropsContext } from \"@/lib/propsContext/propsContext\";\nimport { ComponentPropsContextProvider } from \"@/components/ComponentPropsContextProvider\";\nimport { ClearPropsContext } from \"@/components/ClearPropsContext\";\nimport ClearPropsContextView from \"@/views/ClearPropsContextView\";\nimport { UiComponentTunnelProvider } from \"@/components/UiComponentTunnel/UiComponentTunnelProvider\";\nimport { UiComponentTunnelEntry } from \"@/components/UiComponentTunnel/UiComponentTunnelEntry\";\n\ntype RefType<T> = T extends RefAttributes<infer R> ? R : undefined;\n\nexport interface FlowComponentProps<R = HTMLDivElement>\n extends PropsWithTunnel, RefAttributes<R> {\n wrapWith?: ReactElement;\n}\n\nexport type FlowComponentImplementationProps<C extends FlowComponentName> =\n Omit<FlowComponentPropsOfName<C>, keyof FlowComponentProps> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\ntype FlowComponentImplementationType<C extends FlowComponentName> =\n ComponentType<FlowComponentImplementationProps<C>>;\n\ntype FlowComponentType<C extends FlowComponentName> = FunctionComponent<\n FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>\n>;\n\nexport type FlowComponentProvisionType = \"provider\" | \"ui\" | \"layout\";\n\ninterface Options {\n type?: FlowComponentProvisionType;\n isRemoteComponent?: boolean;\n}\n\nexport function flowComponent<C extends FlowComponentName>(\n componentName: C,\n ImplementationComponentType: FlowComponentImplementationType<C>,\n options: Options = {},\n): FlowComponentType<C> {\n type Props = FlowComponentPropsOfName<C> &\n RefAttributes<RefType<FlowComponentPropsOfName<C>>>;\n\n const { type = \"ui\", isRemoteComponent = false } = options;\n\n const MemoizedImplementationComponentType = memo(ImplementationComponentType);\n\n function Component(props: Props) {\n const { tunnel, wrapWith, ...propsWithContext } = useProps(\n componentName,\n props as FlowComponentPropsOfName<C>,\n ) as FlowComponentProps<RefType<FlowComponentPropsOfName<C>>>;\n\n const implementationTypeProps = propsWithContext as ComponentProps<\n typeof ImplementationComponentType\n >;\n\n const componentProps = useComponentPropsContext(componentName);\n\n ImplementationComponentType.displayName = `FlowComponentImpl(${componentName})`;\n\n let element: ReactNode = (\n <MemoizedImplementationComponentType {...implementationTypeProps} />\n );\n\n if (type === \"ui\" || type === \"layout\") {\n element = (\n <UiComponentTunnelProvider component={componentName}>\n {element}\n </UiComponentTunnelProvider>\n );\n }\n\n element = (\n <ComponentPropsContextProvider componentProps={componentProps}>\n {element}\n </ComponentPropsContextProvider>\n );\n\n if (type === \"ui\") {\n /**\n * Protect the inside of UI components for accidental prop changes through\n * the Props Context.\n */\n if (isRemoteComponent) {\n element = <ClearPropsContext>{element}</ClearPropsContext>;\n } else {\n /**\n * In case of a UI component that does not have a remote counterpart\n * (like the Modal component), the <ClearPropsContext> must be\n * additionally applied on the host side by using the\n * <ClearPropsContextView>.\n *\n * This prevents Props Contexts created by parent components on the host\n * side affecting the children of this UI component.\n */\n element = (\n <ClearPropsContext>\n <ClearPropsContextView>{element}</ClearPropsContextView>\n </ClearPropsContext>\n );\n }\n }\n\n if (\"slot\" in props && !!props.slot && typeof props.slot === \"string\") {\n element = (\n <SlotContextProvider slot={props.slot} component={componentName}>\n {element}\n </SlotContextProvider>\n );\n }\n\n if (wrapWith) {\n element = cloneElement(wrapWith, undefined, element);\n }\n\n if (tunnel) {\n element = (\n <UiComponentTunnelEntry id={tunnel.id} component={tunnel.component}>\n {element}\n </UiComponentTunnelEntry>\n );\n }\n\n return element;\n }\n\n Component.displayName = `FlowComponent(${componentName})`;\n return memo(Component);\n}\n"],"names":[],"mappings":";;;;;;;;;;;AAiDO,SAAS,aAAA,CACd,aAAA,EACA,2BAAA,EACA,OAAA,GAAmB,EAAC,EACE;AAItB,EAAA,MAAM,EAAE,IAAA,GAAO,IAAA,EAAM,iBAAA,GAAoB,OAAM,GAAI,OAAA;AAEnD,EAAA,MAAM,mCAAA,GAAsC,KAAK,2BAA2B,CAAA;AAE5E,EAAA,SAAS,UAAU,KAAA,EAAc;AAC/B,IAAA,MAAM,EAAE,MAAA,EAAQ,QAAA,EAAU,GAAG,kBAAiB,GAAI,QAAA;AAAA,MAChD,aAAA;AAAA,MACA;AAAA,KACF;AAEA,IAAA,MAAM,uBAAA,GAA0B,gBAAA;AAIhC,IAAA,MAAM,cAAA,GAAiB,yBAAyB,aAAa,CAAA;AAE7D,IAAA,2BAAA,CAA4B,WAAA,GAAc,qBAAqB,aAAa,CAAA,CAAA,CAAA;AAE5E,IAAA,IAAI,OAAA,mBACF,GAAA,CAAC,mCAAA,EAAA,EAAqC,GAAG,uBAAA,EAAyB,CAAA;AAGpE,IAAA,IAAI,IAAA,KAAS,IAAA,IAAQ,IAAA,KAAS,QAAA,EAAU;AACtC,MAAA,OAAA,mBACE,GAAA,CAAC,yBAAA,EAAA,EAA0B,SAAA,EAAW,aAAA,EACnC,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAA,mBACE,GAAA,CAAC,6BAAA,EAAA,EAA8B,cAAA,EAC5B,QAAA,EAAA,OAAA,EACH,CAAA;AAGF,IAAA,IAAI,SAAS,IAAA,EAAM;AAKjB,MAAA,IAAI,iBAAA,EAAmB;AACrB,QAAA,OAAA,mBAAU,GAAA,CAAC,qBAAmB,QAAA,EAAA,OAAA,EAAQ,CAAA;AAAA,MACxC,CAAA,MAAO;AAUL,QAAA,OAAA,mBACE,GAAA,CAAC,iBAAA,EAAA,EACC,QAAA,kBAAA,GAAA,CAAC,qBAAA,EAAA,EAAuB,mBAAQ,CAAA,EAClC,CAAA;AAAA,MAEJ;AAAA,IACF;AAEA,IAAA,IAAI,MAAA,IAAU,SAAS,CAAC,CAAC,MAAM,IAAA,IAAQ,OAAO,KAAA,CAAM,IAAA,KAAS,QAAA,EAAU;AACrE,MAAA,OAAA,uBACG,mBAAA,EAAA,EAAoB,IAAA,EAAM,MAAM,IAAA,EAAM,SAAA,EAAW,eAC/C,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,IAAI,QAAA,EAAU;AACZ,MAAA,OAAA,GAAU,YAAA,CAAa,QAAA,EAAU,MAAA,EAAW,OAAO,CAAA;AAAA,IACrD;AAEA,IAAA,IAAI,MAAA,EAAQ;AACV,MAAA,OAAA,mBACE,GAAA,CAAC,0BAAuB,EAAA,EAAI,MAAA,CAAO,IAAI,SAAA,EAAW,MAAA,CAAO,WACtD,QAAA,EAAA,OAAA,EACH,CAAA;AAAA,IAEJ;AAEA,IAAA,OAAO,OAAA;AAAA,EACT;AAEA,EAAA,SAAA,CAAU,WAAA,GAAc,iBAAiB,aAAa,CAAA,CAAA,CAAA;AACtD,EAAA,OAAO,KAAK,SAAS,CAAA;AACvB;;;;"}
|
|
@@ -6,8 +6,10 @@ import formFieldStyles from '../../components/FormField/FormField.module.scss.mj
|
|
|
6
6
|
import { useFieldError } from './useFieldError.mjs';
|
|
7
7
|
import clsx from 'clsx';
|
|
8
8
|
|
|
9
|
-
const useFieldComponent = (props) => {
|
|
10
|
-
const { FieldErrorView, FieldErrorCaptureContext } = useFieldError(
|
|
9
|
+
const useFieldComponent = (props, component) => {
|
|
10
|
+
const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({
|
|
11
|
+
component
|
|
12
|
+
});
|
|
11
13
|
const fieldPropsContext = {
|
|
12
14
|
Label: {
|
|
13
15
|
className: formFieldStyles.label,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFieldComponent.mjs","sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport clsx, { type ClassValue } from \"clsx\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n): UseFieldComponent => {\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError();\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps: {\n className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"useFieldComponent.mjs","sources":["../../../../../../../src/lib/hooks/useFieldComponent.tsx"],"sourcesContent":["import type { FC, PropsWithChildren } from \"react\";\nimport { type PropsContext } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport { useFieldError } from \"@/lib/hooks/useFieldError\";\nimport clsx, { type ClassValue } from \"clsx\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\ninterface FieldComponentProps {\n className?: ClassValue;\n isRequired?: boolean;\n isDisabled?: boolean;\n}\n\nexport interface UseFieldComponent {\n FieldErrorCaptureContext: FC<PropsWithChildren>;\n FieldErrorView: FC;\n fieldPropsContext: PropsContext;\n fieldProps: {\n className?: ReturnType<typeof clsx>;\n };\n}\n\nexport const useFieldComponent = (\n props: FieldComponentProps,\n component: FlowComponentName,\n): UseFieldComponent => {\n const { FieldErrorView, FieldErrorCaptureContext } = useFieldError({\n component,\n });\n\n // setting up the props context for all components that\n // are part of a form control\n const fieldPropsContext: PropsContext = {\n Label: {\n className: formFieldStyles.label,\n optional: !props.isRequired,\n isDisabled: !!props.isDisabled,\n },\n FieldDescription: {\n className: formFieldStyles.fieldDescription,\n },\n };\n\n return {\n FieldErrorView,\n FieldErrorCaptureContext,\n fieldPropsContext,\n fieldProps: {\n className: clsx(formFieldStyles.formField),\n },\n } as const;\n};\n"],"names":[],"mappings":";;;;;;AAsBO,MAAM,iBAAA,GAAoB,CAC/B,KAAA,EACA,SAAA,KACsB;AACtB,EAAA,MAAM,EAAE,cAAA,EAAgB,wBAAA,EAAyB,GAAI,aAAA,CAAc;AAAA,IACjE;AAAA,GACD,CAAA;AAID,EAAA,MAAM,iBAAA,GAAkC;AAAA,IACtC,KAAA,EAAO;AAAA,MACL,WAAW,eAAA,CAAgB,KAAA;AAAA,MAC3B,QAAA,EAAU,CAAC,KAAA,CAAM,UAAA;AAAA,MACjB,UAAA,EAAY,CAAC,CAAC,KAAA,CAAM;AAAA,KACtB;AAAA,IACA,gBAAA,EAAkB;AAAA,MAChB,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,OAAO;AAAA,IACL,cAAA;AAAA,IACA,wBAAA;AAAA,IACA,iBAAA;AAAA,IACA,UAAA,EAAY;AAAA,MACV,SAAA,EAAW,IAAA,CAAK,eAAA,CAAgB,SAAS;AAAA;AAC3C,GACF;AACF;;;;"}
|
|
@@ -5,17 +5,17 @@ import React, { useId, useMemo } from 'react';
|
|
|
5
5
|
import '../propsContext/propsContext.mjs';
|
|
6
6
|
import { PropsContextProvider } from '../propsContext/components/PropsContextProvider.mjs';
|
|
7
7
|
import formFieldStyles from '../../components/FormField/FormField.module.scss.mjs';
|
|
8
|
-
import { TunnelExit } from '@mittwald/react-tunnel';
|
|
9
8
|
import { ClearPropsContext } from '../propsContext/components/ClearPropsContext.mjs';
|
|
10
9
|
import { useProps } from './useProps.mjs';
|
|
10
|
+
import { UiComponentTunnelExit } from '../../components/UiComponentTunnel/UiComponentTunnelExit.mjs';
|
|
11
11
|
|
|
12
|
-
const useFieldError = (
|
|
12
|
+
const useFieldError = (options) => {
|
|
13
13
|
const id = useId();
|
|
14
|
-
const currentTunnelId = useProps("FieldError", {}).
|
|
15
|
-
const tunnelId = currentTunnelId ?? `${id}.fieldError`;
|
|
14
|
+
const currentTunnelId = useProps("FieldError", {}).tunnel?.id;
|
|
15
|
+
const tunnelId = options.tunnelId ?? currentTunnelId ?? `${id}.fieldError`;
|
|
16
16
|
const fieldErrorCapturePropsContext = {
|
|
17
17
|
FieldError: {
|
|
18
|
-
tunnelId,
|
|
18
|
+
tunnel: { id: tunnelId, component: options.component },
|
|
19
19
|
className: formFieldStyles.fieldError
|
|
20
20
|
}
|
|
21
21
|
};
|
|
@@ -36,7 +36,7 @@ const useFieldError = (tunnelIdFromProps) => {
|
|
|
36
36
|
if (currentTunnelId) {
|
|
37
37
|
return null;
|
|
38
38
|
}
|
|
39
|
-
return /* @__PURE__ */ jsx(
|
|
39
|
+
return /* @__PURE__ */ jsx(UiComponentTunnelExit, { id: tunnelId, component: options.component, children: (children) => {
|
|
40
40
|
const childrenArray = React.Children.toArray(children);
|
|
41
41
|
return /* @__PURE__ */ jsx(ClearPropsContext, { children: childrenArray[0] });
|
|
42
42
|
} });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFieldError.mjs","sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport {
|
|
1
|
+
{"version":3,"file":"useFieldError.mjs","sources":["../../../../../../../src/lib/hooks/useFieldError.tsx"],"sourcesContent":["import React, { type FC, type PropsWithChildren, useId, useMemo } from \"react\";\nimport { type PropsContext, PropsContextProvider } from \"@/lib/propsContext\";\nimport formFieldStyles from \"@/components/FormField/FormField.module.scss\";\nimport ClearPropsContext from \"@/lib/propsContext/components/ClearPropsContext\";\nimport { useProps } from \"@/lib/hooks/useProps\";\nimport { UiComponentTunnelExit } from \"@/components/UiComponentTunnel/UiComponentTunnelExit\";\nimport type { FlowComponentName } from \"@/components/propTypes\";\n\nexport interface UseFieldErrorOptions {\n tunnelId?: string;\n component: FlowComponentName;\n}\n\nexport const useFieldError = (options: UseFieldErrorOptions) => {\n const id = useId();\n const currentTunnelId = useProps(\"FieldError\", {}).tunnel?.id;\n const tunnelId = options.tunnelId ?? currentTunnelId ?? `${id}.fieldError`;\n\n const fieldErrorCapturePropsContext: PropsContext = {\n FieldError: {\n tunnel: { id: tunnelId, component: options.component },\n className: formFieldStyles.fieldError,\n },\n };\n\n const FieldErrorCaptureContext: FC<PropsWithChildren> = useMemo(\n () => (props) => {\n return (\n <PropsContextProvider\n props={fieldErrorCapturePropsContext}\n dependencies={[tunnelId]}\n >\n {props.children}\n </PropsContextProvider>\n );\n },\n [tunnelId],\n );\n\n const FieldErrorView = () => {\n if (currentTunnelId) {\n return null;\n }\n\n return (\n <UiComponentTunnelExit id={tunnelId} component={options.component}>\n {(children) => {\n const childrenArray = React.Children.toArray(children);\n return <ClearPropsContext>{childrenArray[0]}</ClearPropsContext>;\n }}\n </UiComponentTunnelExit>\n );\n };\n\n return {\n FieldErrorCaptureContext,\n FieldErrorView,\n } as const;\n};\n"],"names":[],"mappings":";;;;;;;;;AAaO,MAAM,aAAA,GAAgB,CAAC,OAAA,KAAkC;AAC9D,EAAA,MAAM,KAAK,KAAA,EAAM;AACjB,EAAA,MAAM,kBAAkB,QAAA,CAAS,YAAA,EAAc,EAAE,EAAE,MAAA,EAAQ,EAAA;AAC3D,EAAA,MAAM,QAAA,GAAW,OAAA,CAAQ,QAAA,IAAY,eAAA,IAAmB,GAAG,EAAE,CAAA,WAAA,CAAA;AAE7D,EAAA,MAAM,6BAAA,GAA8C;AAAA,IAClD,UAAA,EAAY;AAAA,MACV,QAAQ,EAAE,EAAA,EAAI,QAAA,EAAU,SAAA,EAAW,QAAQ,SAAA,EAAU;AAAA,MACrD,WAAW,eAAA,CAAgB;AAAA;AAC7B,GACF;AAEA,EAAA,MAAM,wBAAA,GAAkD,OAAA;AAAA,IACtD,MAAM,CAAC,KAAA,KAAU;AACf,MAAA,uBACE,GAAA;AAAA,QAAC,oBAAA;AAAA,QAAA;AAAA,UACC,KAAA,EAAO,6BAAA;AAAA,UACP,YAAA,EAAc,CAAC,QAAQ,CAAA;AAAA,UAEtB,QAAA,EAAA,KAAA,CAAM;AAAA;AAAA,OACT;AAAA,IAEJ,CAAA;AAAA,IACA,CAAC,QAAQ;AAAA,GACX;AAEA,EAAA,MAAM,iBAAiB,MAAM;AAC3B,IAAA,IAAI,eAAA,EAAiB;AACnB,MAAA,OAAO,IAAA;AAAA,IACT;AAEA,IAAA,uBACE,GAAA,CAAC,yBAAsB,EAAA,EAAI,QAAA,EAAU,WAAW,OAAA,CAAQ,SAAA,EACrD,WAAC,QAAA,KAAa;AACb,MAAA,MAAM,aAAA,GAAgB,KAAA,CAAM,QAAA,CAAS,OAAA,CAAQ,QAAQ,CAAA;AACrD,MAAA,uBAAO,GAAA,CAAC,iBAAA,EAAA,EAAmB,QAAA,EAAA,aAAA,CAAc,CAAC,CAAA,EAAE,CAAA;AAAA,IAC9C,CAAA,EACF,CAAA;AAAA,EAEJ,CAAA;AAEA,EAAA,OAAO;AAAA,IACL,wBAAA;AAAA,IACA;AAAA,GACF;AACF;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.mjs","sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport interface PropsWithTunnel {\n /** @internal */\n
|
|
1
|
+
{"version":3,"file":"props.mjs","sources":["../../../../../../../src/lib/types/props.ts"],"sourcesContent":["import type { FlowComponentName } from \"@/components/propTypes\";\nimport type { ExoticComponent, HTMLAttributes } from \"react\";\n\nexport const statusTypes = [\n \"info\",\n \"success\",\n \"warning\",\n \"danger\",\n \"unavailable\",\n] as const;\n\nexport type Status = (typeof statusTypes)[number];\n\nexport type PropsWithStatus<T extends Status = Status, P = unknown> = P & {\n /** The elements status */\n status?: T;\n};\n\nexport interface PropsWithTunnel {\n /** @internal */\n tunnel?: {\n id: string;\n component: FlowComponentName;\n } | null;\n}\n\nexport interface PropsWithClassName {\n /** The elements class name. */\n className?: string;\n}\n\nexport type PropsWithElementType<\n T extends keyof HTMLElementTagNameMap = never,\n> = HTMLAttributes<HTMLElement> & {\n elementType?: T | ExoticComponent;\n};\n\nexport type ContainerBreakpointSize = \"xs\" | \"s\" | \"m\" | \"l\" | \"xl\";\n\nexport interface PropsWithContainerBreakpointSize {\n containerBreakpointSize?: ContainerBreakpointSize;\n}\n\nexport const alphaColors = [\n \"dark\",\n \"light\",\n \"dark-static\",\n \"light-static\",\n] as const;\n\nexport type AlphaColor = (typeof alphaColors)[number];\n\nexport function isAlphaColor(color: string): color is AlphaColor {\n return alphaColors.includes(color as AlphaColor);\n}\n"],"names":[],"mappings":"AAGO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,QAAA;AAAA,EACA;AACF;AAkCO,MAAM,WAAA,GAAc;AAAA,EACzB,MAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA;AACF;AAIO,SAAS,aAAa,KAAA,EAAoC;AAC/D,EAAA,OAAO,WAAA,CAAY,SAAS,KAAmB,CAAA;AACjD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,EAAE,EAAE,iBAAiB,EAAa,MAAM,OAAO,CAAC;AAY9E,MAAM,WAAW,cAAe,SAAQ,iBAAiB,CACvD,cAAc,CAAC,KAAK,CAAC,CACtB;IACC,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACjC;AAED,wBAAwB;AACxB,eAAO,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CA8ExC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionGroup/ActionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ActionGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/ActionGroup/ActionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAI5D,MAAM,WAAW,gBACf,SACE,iBAAiB,EACjB,kBAAkB,CAAC,cAAc,CAAC,EAClC,kBAAkB;IACpB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,GAAG,GAAG,GAAG,CAAC;CACrB;AAED,wBAAwB;AACxB,eAAO,MAAM,WAAW,qGAgDvB,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAkB9C,MAAM,WAAW,iBACf,SACE,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CACF,IAAI,CAAC,iBAAiB,EACtB,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,KAAK,CAC1E;CAAG;AAER,wBAAwB;AACxB,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"Autocomplete.d.ts","sourceRoot":"","sources":["../../../../src/components/Autocomplete/Autocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,KAAK,IAAI,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,sCAAsC,CAAC;AAkB9C,MAAM,WAAW,iBACf,SACE,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,CAAC,gBAAgB,CAAC,EACpC,IAAI,CACF,IAAI,CAAC,iBAAiB,EACtB,UAAU,GAAG,eAAe,GAAG,YAAY,GAAG,mBAAmB,GAAG,KAAK,CAC1E;CAAG;AAER,wBAAwB;AACxB,eAAO,MAAM,YAAY,wGA2GvB,CAAC;AAEH,eAAe,YAAY,CAAC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { ComposedChart } from 'recharts';
|
|
2
2
|
import { default as React, ComponentProps, ComponentType, FC, PropsWithChildren, ReactNode } from 'react';
|
|
3
|
+
import { ChartDataValue, DataKeyProp } from './types';
|
|
3
4
|
/** @deprecated Use a ReactNode instead */
|
|
4
5
|
export interface CartesianChartEmptyViewProps {
|
|
5
6
|
data?: ComponentProps<typeof ComposedChart>["data"];
|
|
6
7
|
}
|
|
7
|
-
export type ChartDataValue = Record<string, unknown>;
|
|
8
|
-
export type DataKey<TData> = keyof TData | (() => keyof TData) | number;
|
|
9
|
-
export type DataKeyValue<TData, TDataKey extends DataKey<TData>> = TDataKey extends keyof TData ? TData[TDataKey] : TDataKey extends () => infer K ? K extends keyof TData ? TData[K] : TData[keyof TData] : TData[keyof TData];
|
|
10
8
|
export interface CartesianChartProps<TData = ChartDataValue> extends Pick<ComponentProps<typeof ComposedChart>, "className" | "syncId" | "syncMethod">, PropsWithChildren {
|
|
11
9
|
data?: TData[];
|
|
12
10
|
height?: string;
|
|
@@ -20,14 +18,14 @@ export interface CartesianChartProps<TData = ChartDataValue> extends Pick<Compon
|
|
|
20
18
|
}
|
|
21
19
|
/** @flr-generate all */
|
|
22
20
|
export declare const CartesianChart: FC<CartesianChartProps>;
|
|
23
|
-
export declare const typedCartesianChart: <TData = ChartDataValue>() => {
|
|
21
|
+
export declare const typedCartesianChart: <TData extends ChartDataValue<any> = ChartDataValue<any>, XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>>() => {
|
|
24
22
|
Chart: ComponentType<CartesianChartProps<TData>>;
|
|
25
|
-
Area: React.ComponentType<import('./components/Area').
|
|
26
|
-
XAxis: <const TProp extends
|
|
27
|
-
YAxis: <const TProp extends
|
|
23
|
+
Area: React.ComponentType<import('./components/Area').AreaPropsByDataKeyProp<TData>>;
|
|
24
|
+
XAxis: <const TProp extends XAxisDataKey, XAxisDataKeyValue = import('./types').DataKeyValue<TData, TProp>>(props: import('./components/XAxis').XAxisProps<TData, TProp, XAxisDataKeyValue>) => ReactNode;
|
|
25
|
+
YAxis: <const TProp extends keyof TData, TMatcherValue = import('./types').DataKeyValue<TData, TProp>>(props: import('./components/YAxis').YAxisProps<TData, TProp, TMatcherValue>) => ReactNode;
|
|
28
26
|
Grid: React.ComponentType<import('./components/ChartGrid').ChartGridProps>;
|
|
29
27
|
Legend: React.ComponentType<import('./components/ChartLegend').ChartLegendProps>;
|
|
30
|
-
Tooltip: React.ComponentType<import('./components/ChartTooltip').ChartTooltipProps<TData>>;
|
|
28
|
+
Tooltip: React.ComponentType<import('./components/ChartTooltip').ChartTooltipProps<TData, XAxisDataKey>>;
|
|
31
29
|
Line: React.ComponentType<import('./components/Line').LineProps<TData>>;
|
|
32
30
|
};
|
|
33
31
|
export default CartesianChart;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../src/components/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../src/components/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAuB,MAAM,UAAU,CAAC;AAC9D,OAAO,KAAK,EAAE,EACZ,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,EAAE,EAEP,KAAK,iBAAiB,EACtB,KAAK,SAAS,EAEf,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAS3C,0CAA0C;AAC1C,MAAM,WAAW,4BAA4B;IAC3C,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;CACrD;AAED,MAAM,WAAW,mBAAmB,CAAC,KAAK,GAAG,cAAc,CACzD,SACE,IAAI,CACF,cAAc,CAAC,OAAO,aAAa,CAAC,EACpC,WAAW,GAAG,QAAQ,GAAG,YAAY,CACtC,EACD,iBAAiB;IACnB,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAwB;AACxB,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAuDlD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAE9B,KAAK,SAAS,cAAc,CAAC,GAAG,CAAC,GAAG,cAAc,CAAC,GAAG,CAAC,EACvD,YAAY,SAAS,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC;WAEnC,aAAa,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC;;;;;;;;CAQlE,CAAC;AAEH,eAAe,cAAc,CAAC"}
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import { ComponentType, FC } from 'react';
|
|
2
2
|
import { CategoricalWithCustomColor } from '../../../../lib/tokens/CategoricalColors';
|
|
3
|
-
import { ChartDataValue,
|
|
3
|
+
import { ChartDataValue, DataKeyProp, DataKeyWithLabel } from '../../types';
|
|
4
4
|
import * as Recharts from "recharts";
|
|
5
|
-
|
|
6
|
-
dataKey: DataKey<TData>;
|
|
5
|
+
type AreaBaseProps = Pick<Recharts.AreaProps, "className" | "stackId" | "fillOpacity" | "key" | "xAxisId" | "yAxisId" | "type" | "unit"> & {
|
|
7
6
|
/** The color of the area. @default "sea-green" */
|
|
8
7
|
color?: CategoricalWithCustomColor;
|
|
8
|
+
};
|
|
9
|
+
export interface AreaPropsByDataKeyProp<TData extends ChartDataValue = ChartDataValue> extends AreaBaseProps {
|
|
10
|
+
dataKey: DataKeyProp<TData>;
|
|
9
11
|
}
|
|
12
|
+
export interface AreaPropsByDataKey<TData extends ChartDataValue = ChartDataValue> extends AreaBaseProps, DataKeyWithLabel<TData> {
|
|
13
|
+
}
|
|
14
|
+
export type AreaProps<TData extends ChartDataValue = ChartDataValue> = AreaPropsByDataKey<TData> | AreaPropsByDataKeyProp<TData>;
|
|
10
15
|
/** @flr-generate all */
|
|
11
16
|
export declare const Area: FC<AreaProps>;
|
|
12
|
-
export declare const TypedArea: <
|
|
17
|
+
export declare const TypedArea: <TData extends ChartDataValue = ChartDataValue>() => ComponentType<AreaPropsByDataKeyProp<TData>>;
|
|
13
18
|
export default Area;
|
|
14
19
|
//# sourceMappingURL=Area.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/Area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/Area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,gBAAgB,EAEtB,MAAM,mCAAmC,CAAC;AAE3C,KAAK,aAAa,GAAG,IAAI,CACvB,QAAQ,CAAC,SAAS,EAChB,WAAW,GACX,SAAS,GACT,aAAa,GACb,KAAK,GACL,SAAS,GACT,SAAS,GACT,MAAM,GACN,MAAM,CACT,GAAG;IACF,kDAAkD;IAClD,KAAK,CAAC,EAAE,0BAA0B,CAAC;CACpC,CAAC;AAEF,MAAM,WAAW,sBAAsB,CACrC,KAAK,SAAS,cAAc,GAAG,cAAc,CAC7C,SAAQ,aAAa;IACrB,OAAO,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB,CACjC,KAAK,SAAS,cAAc,GAAG,cAAc,CAE7C,SAAQ,aAAa,EAAE,gBAAgB,CAAC,KAAK,CAAC;CAAG;AAEnD,MAAM,MAAM,SAAS,CAAC,KAAK,SAAS,cAAc,GAAG,cAAc,IAC/D,kBAAkB,CAAC,KAAK,CAAC,GACzB,sBAAsB,CAAC,KAAK,CAAC,CAAC;AAElC,wBAAwB;AACxB,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAwB9B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,KAAK,SAAS,cAAc,GAAG,cAAc,OAC7D,aAAa,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAC,CAAC;AAEvD,eAAe,IAAI,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType, FC } from 'react';
|
|
2
2
|
import * as Recharts from "recharts";
|
|
3
|
-
export type ChartLegendFormatter = (text: string) => string;
|
|
3
|
+
export type ChartLegendFormatter = (text: string, index: number) => string;
|
|
4
4
|
export interface WithChartLegendFormatters {
|
|
5
5
|
/**
|
|
6
6
|
* A formatter function for the texts of the Legend. Can be used for purposes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartLegend/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"ChartLegend.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartLegend/ChartLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;AAE3E,MAAM,WAAW,yBAAyB;IACxC;;;OAGG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC;CAClC;AAED,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,QAAQ,CAAC,WAAW,EACpB,WAAW,GAAG,eAAe,CAC9B,GACC,yBAAyB,CAAC;AAE5B,wBAAwB;AACxB,eAAO,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CAS5C,CAAC;AAEF,eAAO,MAAM,gBAAgB,QACZ,aAAa,CAAC,gBAAgB,CAAC,CAAC;AAEjD,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LegendContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartLegend/LegendContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"LegendContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartLegend/LegendContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,+CAA+C,CAAC;AAC3E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKhC,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,EAAE,WAAW,CAAC,GAAG,yBAAyB,CAAC;AAE9E,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAkCxC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,34 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FC } from 'react';
|
|
2
2
|
import { TooltipProps } from 'recharts';
|
|
3
3
|
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export type TooltipLProgressBarFormatter<TData> = (value: TData[keyof TData], unit?: TooltipPayloadItem["unit"]) => Promise<string> | string;
|
|
9
|
-
export interface WithTooltipFormatters<TData> {
|
|
10
|
-
/**
|
|
11
|
-
* A formatter function for the lines in the tooltip. Can be used for purposes
|
|
12
|
-
* like translations.
|
|
13
|
-
*/
|
|
14
|
-
formatter?: TooltipLineFormatter<TData>;
|
|
15
|
-
/**
|
|
16
|
-
* A formatter function for the heading of the tooltip. Can be used for
|
|
17
|
-
* purposes like translations.
|
|
18
|
-
*/
|
|
19
|
-
headingFormatter?: TooltipHeadingFormatter<TData>;
|
|
20
|
-
/**
|
|
21
|
-
* A formatter function for the progressBar of the tooltip. Can be used for
|
|
22
|
-
* purposes like translations.
|
|
23
|
-
*/
|
|
24
|
-
progressBarFormatter?: TooltipLProgressBarFormatter<TData>;
|
|
25
|
-
}
|
|
26
|
-
export interface ChartTooltipProps<TData = ChartDataValue> extends Pick<TooltipProps<ValueType, NameType>, "wrapperClassName" | "allowEscapeViewBox">, WithTooltipFormatters<TData> {
|
|
4
|
+
import { ChartDataValue } from '../../types';
|
|
5
|
+
import { WithTooltipFormatters } from './types';
|
|
6
|
+
export { TypedChartTooltip } from './types';
|
|
7
|
+
export interface ChartTooltipProps<TData extends ChartDataValue = ChartDataValue, XAxisDataKey extends keyof TData = keyof TData> extends Pick<TooltipProps<ValueType, NameType>, "wrapperClassName" | "allowEscapeViewBox">, WithTooltipFormatters<TData, XAxisDataKey> {
|
|
27
8
|
/** Show progress bar for stacked areas @default "true" */
|
|
28
9
|
showProgressBar?: boolean;
|
|
29
10
|
}
|
|
30
11
|
/** @flr-generate all */
|
|
31
12
|
export declare const ChartTooltip: FC<ChartTooltipProps>;
|
|
32
|
-
export declare const TypedChartTooltip: <T = ChartDataValue>() => ComponentType<ChartTooltipProps<T>>;
|
|
33
13
|
export default ChartTooltip;
|
|
34
14
|
//# sourceMappingURL=ChartTooltip.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"ChartTooltip.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/ChartTooltip.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,KAAK,EAAE,EAAY,MAAM,OAAO,CAAC;AACjD,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACV,MAAM,gDAAgD,CAAC;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAEvG,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,WAAW,iBAAiB,CAChC,KAAK,SAAS,cAAc,GAAG,cAAc,EAC7C,YAAY,SAAS,MAAM,KAAK,GAAG,MAAM,KAAK,CAE9C,SACE,IAAI,CACF,YAAY,CAAC,SAAS,EAAE,QAAQ,CAAC,EACjC,kBAAkB,GAAG,oBAAoB,CAC1C,EACD,qBAAqB,CAAC,KAAK,EAAE,YAAY,CAAC;IAC5C,0DAA0D;IAC1D,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAwB;AACxB,eAAO,MAAM,YAAY,EAAE,EAAE,CAAC,iBAAiB,CAiC9C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TooltipContentProps as RechartTooltipContentProps } from 'recharts';
|
|
2
2
|
import { NameType, ValueType } from 'recharts/types/component/DefaultTooltipContent';
|
|
3
3
|
import { WithTooltipFormatters } from '../..';
|
|
4
|
-
import { ChartDataValue } from '../../
|
|
5
|
-
export interface TooltipContentProps<TData = ChartDataValue> extends WithTooltipFormatters<TData>, Omit<RechartTooltipContentProps<ValueType, NameType>, "formatter"> {
|
|
4
|
+
import { ChartDataValue } from '../../types';
|
|
5
|
+
export interface TooltipContentProps<TData extends ChartDataValue = ChartDataValue, TTooltipLabelValue extends keyof TData = keyof TData> extends WithTooltipFormatters<TData, TTooltipLabelValue>, Omit<RechartTooltipContentProps<ValueType, NameType>, "formatter"> {
|
|
6
6
|
showProgressBar?: boolean;
|
|
7
7
|
}
|
|
8
8
|
//# sourceMappingURL=TooltipContent.d.ts.map
|
package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipContent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,IAAI,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACV,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"TooltipContent.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipContent.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,IAAI,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,KAAK,EACV,QAAQ,EACR,SAAS,EACV,MAAM,gDAAgD,CAAC;AAGxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAMzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,MAAM,WAAW,mBAAmB,CAClC,KAAK,SAAS,cAAc,GAAG,cAAc,EAC7C,kBAAkB,SAAS,MAAM,KAAK,GAAG,MAAM,KAAK,CAEpD,SACE,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAChD,IAAI,CAAC,0BAA0B,CAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,WAAW,CAAC;IACpE,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { TooltipPayloadItem } from './TooltipLegendItem';
|
|
3
3
|
import { WithTooltipFormatters } from '../..';
|
|
4
|
-
import { ChartDataValue } from '../../
|
|
5
|
-
interface TooltipProgressBarProps<TData = ChartDataValue> extends Pick<WithTooltipFormatters<TData>, "progressBarFormatter"> {
|
|
4
|
+
import { ChartDataValue } from '../../types';
|
|
5
|
+
interface TooltipProgressBarProps<TData extends ChartDataValue = ChartDataValue, TTooltipLabelValue extends keyof TData = keyof TData> extends Pick<WithTooltipFormatters<TData, TTooltipLabelValue>, "progressBarFormatter"> {
|
|
6
6
|
items: TooltipPayloadItem[];
|
|
7
7
|
}
|
|
8
8
|
export declare const TooltipProgressBar: FC<TooltipProgressBarProps>;
|
package/dist/types/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipProgressBar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uEAAuE,CAAC;AAGhH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"TooltipProgressBar.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/TooltipProgressBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uEAAuE,CAAC;AAGhH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAGzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAExE,UAAU,uBAAuB,CAC/B,KAAK,SAAS,cAAc,GAAG,cAAc,EAC7C,kBAAkB,SAAS,MAAM,KAAK,GAAG,MAAM,KAAK,CACpD,SAAQ,IAAI,CACZ,qBAAqB,CAAC,KAAK,EAAE,kBAAkB,CAAC,EAChD,sBAAsB,CACvB;IACC,KAAK,EAAE,kBAAkB,EAAE,CAAC;CAC7B;AAED,eAAO,MAAM,kBAAkB,EAAE,EAAE,CAAC,uBAAuB,CAsD1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChartTooltipProps } from '../..';
|
|
2
|
+
import { ComponentType } from 'react';
|
|
3
|
+
import { ChartDataValue, DataKeyProp } from '../../types';
|
|
4
|
+
import { TooltipPayloadItem } from './TooltipLegendItem';
|
|
5
|
+
export declare const TypedChartTooltip: <TData extends ChartDataValue = ChartDataValue, XAxisDataKey extends DataKeyProp<TData> = DataKeyProp<TData>>() => ComponentType<ChartTooltipProps<TData, XAxisDataKey>>;
|
|
6
|
+
export type TooltipLineFormatter<TData extends ChartDataValue> = (value: TData[keyof TData], name: DataKeyProp<TData>, index: number, unit?: TooltipPayloadItem["unit"]) => Promise<string> | string;
|
|
7
|
+
export type TooltipHeadingFormatter<TTitleType> = (title: TTitleType) => Promise<string> | string;
|
|
8
|
+
export type TooltipLProgressBarFormatter = (value: number, unit?: TooltipPayloadItem["unit"]) => Promise<string> | string;
|
|
9
|
+
export interface WithTooltipFormatters<TData extends ChartDataValue, TitleDataKey extends keyof TData = keyof TData> {
|
|
10
|
+
/**
|
|
11
|
+
* A formatter function for the lines in the tooltip. Can be used for purposes
|
|
12
|
+
* like translations.
|
|
13
|
+
*/
|
|
14
|
+
formatter?: TooltipLineFormatter<Exclude<TData, TitleDataKey>>;
|
|
15
|
+
/**
|
|
16
|
+
* A formatter function for the heading of the tooltip. Can be used for
|
|
17
|
+
* purposes like translations.
|
|
18
|
+
*/
|
|
19
|
+
headingFormatter?: TooltipHeadingFormatter<TData[TitleDataKey]>;
|
|
20
|
+
/**
|
|
21
|
+
* A formatter function for the progressBar of the tooltip. Can be used for
|
|
22
|
+
* purposes like translations.
|
|
23
|
+
*/
|
|
24
|
+
progressBarFormatter?: TooltipLProgressBarFormatter;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/ChartTooltip/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACZ,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uEAAuE,CAAC;AAEhH,eAAO,MAAM,iBAAiB,GAC5B,KAAK,SAAS,cAAc,GAAG,cAAc,EAC7C,YAAY,SAAS,WAAW,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,OAEjC,aAAa,CACtC,iBAAiB,CAAC,KAAK,EAAE,YAAY,CAAC,CACvC,CAAC;AACJ,MAAM,MAAM,oBAAoB,CAAC,KAAK,SAAS,cAAc,IAAI,CAC/D,KAAK,EAAE,KAAK,CAAC,MAAM,KAAK,CAAC,EACzB,IAAI,EAAE,WAAW,CAAC,KAAK,CAAC,EACxB,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAC9B,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE9B,MAAM,MAAM,uBAAuB,CAAC,UAAU,IAAI,CAChD,KAAK,EAAE,UAAU,KACd,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE9B,MAAM,MAAM,4BAA4B,GAAG,CACzC,KAAK,EAAE,MAAM,EACb,IAAI,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,KAC9B,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAE9B,MAAM,WAAW,qBAAqB,CACpC,KAAK,SAAS,cAAc,EAC5B,YAAY,SAAS,MAAM,KAAK,GAAG,MAAM,KAAK;IAE9C;;;OAGG;IACH,SAAS,CAAC,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC;IAC/D;;;OAGG;IACH,gBAAgB,CAAC,EAAE,uBAAuB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAChE;;;OAGG;IACH,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;CACrD"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ComponentType, FC } from 'react';
|
|
2
2
|
import { CategoricalWithCustomColor } from '../../../../lib/tokens/CategoricalColors';
|
|
3
|
-
import { ChartDataValue, DataKey } from '../../
|
|
3
|
+
import { ChartDataValue, DataKey } from '../../types';
|
|
4
4
|
import * as Recharts from "recharts";
|
|
5
|
-
export interface LineProps<TData = ChartDataValue> extends Pick<Recharts.LineProps, "className" | "key" | "xAxisId" | "yAxisId" | "type" | "unit"> {
|
|
5
|
+
export interface LineProps<TData extends ChartDataValue = ChartDataValue> extends Pick<Recharts.LineProps, "className" | "key" | "xAxisId" | "yAxisId" | "type" | "unit"> {
|
|
6
6
|
dataKey?: DataKey<TData>;
|
|
7
7
|
/** The color of the line. @default "sea-green" */
|
|
8
8
|
color?: CategoricalWithCustomColor;
|
|
9
9
|
}
|
|
10
10
|
/** @flr-generate all */
|
|
11
11
|
export declare const Line: FC<LineProps>;
|
|
12
|
-
export declare const TypedLine: <T = ChartDataValue>() => ComponentType<LineProps<T>>;
|
|
12
|
+
export declare const TypedLine: <T extends ChartDataValue = ChartDataValue>() => ComponentType<LineProps<T>>;
|
|
13
13
|
export default Line;
|
|
14
14
|
//# sourceMappingURL=Line.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACR,MAAM,
|
|
1
|
+
{"version":3,"file":"Line.d.ts","sourceRoot":"","sources":["../../../../../../src/components/CartesianChart/components/Line/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,KAAK,QAAQ,MAAM,UAAU,CAAC;AAGrC,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAEjF,OAAO,KAAK,EACV,cAAc,EACd,OAAO,EACR,MAAM,mCAAmC,CAAC;AAE3C,MAAM,WAAW,SAAS,CACxB,KAAK,SAAS,cAAc,GAAG,cAAc,CAC7C,SAAQ,IAAI,CACZ,QAAQ,CAAC,SAAS,EAClB,WAAW,GAAG,KAAK,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAC9D;IACC,OAAO,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;IACzB,kDAAkD;IAClD,KAAK,CAAC,EAAE,0BAA0B,CAAC;CACpC;AAED,wBAAwB;AACxB,eAAO,MAAM,IAAI,EAAE,EAAE,CAAC,SAAS,CAiB9B,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,CAAC,SAAS,cAAc,GAAG,cAAc,OACzD,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;AAEtC,eAAe,IAAI,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { ChartDataValue, DataKey, DataKeyValue } from '../../
|
|
2
|
+
import { ChartDataValue, DataKey, DataKeyValue } from '../../types';
|
|
3
3
|
import * as Recharts from "recharts";
|
|
4
|
-
export type XAxisProps<TData = ChartDataValue, TDataKey extends DataKey<TData> = DataKey<TData>,
|
|
4
|
+
export type XAxisProps<TData extends ChartDataValue = ChartDataValue, TDataKey extends DataKey<TData> = DataKey<TData>, TDataKeyValue = DataKeyValue<TData, TDataKey>> = Pick<Recharts.XAxisProps, "className" | "orientation" | "allowDecimals" | "allowDataOverflow" | "interval" | "minTickGap" | "scale" | "type" | "domain" | "hide" | "unit"> & {
|
|
5
5
|
dataKey?: TDataKey;
|
|
6
|
-
tickFormatter?: (value:
|
|
6
|
+
tickFormatter?: (value: TDataKeyValue, index: number) => string;
|
|
7
7
|
};
|
|
8
8
|
/** @flr-generate all */
|
|
9
9
|
export declare const XAxis: FC<XAxisProps>;
|