@webiny/admin-ui 6.6.0-alpha.0 → 6.6.0-alpha.10
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/Accordion/components/AccordionContent.js +4 -1
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Accordion/components/AccordionItem.d.ts +1 -0
- package/Accordion/components/AccordionItem.js.map +1 -1
- package/Accordion/components/AccordionItemDragHandle.d.ts +2 -1
- package/Accordion/components/AccordionItemDragHandle.js +2 -1
- package/Accordion/components/AccordionItemDragHandle.js.map +1 -1
- package/Accordion/components/AccordionTrigger.js +4 -2
- package/Accordion/components/AccordionTrigger.js.map +1 -1
- package/Alert/Alert.d.ts +1 -20
- package/Alert/Alert.js.map +1 -1
- package/AutoComplete/primitives/AutoCompletePrimitive.d.ts +8 -2
- package/AutoComplete/primitives/AutoCompletePrimitive.js +1 -0
- package/AutoComplete/primitives/AutoCompletePrimitive.js.map +1 -1
- package/BetaBadge/BetaBadge.d.ts +6 -0
- package/BetaBadge/BetaBadge.js +7 -0
- package/BetaBadge/BetaBadge.js.map +1 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +54 -0
- package/Breadcrumbs/Breadcrumbs.js +66 -0
- package/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/Breadcrumbs/Breadcrumbs.stories.d.ts +9 -0
- package/Breadcrumbs/Breadcrumbs.stories.js +71 -0
- package/Breadcrumbs/Breadcrumbs.stories.js.map +1 -0
- package/Breadcrumbs/index.d.ts +1 -0
- package/Breadcrumbs/index.js +1 -0
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js +14 -0
- package/Button/Button.js.map +1 -1
- package/Button/Button.mdx +13 -0
- package/Button/Button.stories.d.ts +1 -0
- package/Button/Button.stories.js +10 -2
- package/Button/Button.stories.js.map +1 -1
- package/Button/Button.test.d.ts +1 -0
- package/Button/Button.test.js +28 -0
- package/Button/Button.test.js.map +1 -0
- package/Calendar/calendarClassNames.js +1 -1
- package/Calendar/calendarClassNames.js.map +1 -1
- package/Checkbox/primitives/presenters/CheckboxPresenter.js +5 -2
- package/Checkbox/primitives/presenters/CheckboxPresenter.js.map +1 -1
- package/Checkbox/primitives/presenters/CheckboxPresenter.jsxLabel.test.d.ts +1 -0
- package/Checkbox/primitives/presenters/CheckboxPresenter.jsxLabel.test.js +61 -0
- package/Checkbox/primitives/presenters/CheckboxPresenter.jsxLabel.test.js.map +1 -0
- package/CheckboxGroup/CheckboxGroup.js +4 -1
- package/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.d.ts +6 -1
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.js +5 -2
- package/CheckboxGroup/primitives/CheckboxGroupPrimitive.js.map +1 -1
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.js +5 -2
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.js.map +1 -1
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.jsxLabel.test.d.ts +1 -0
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.jsxLabel.test.js +108 -0
- package/CheckboxGroup/primitives/presenters/CheckboxGroupPresenter.jsxLabel.test.js.map +1 -0
- package/Code/Code.d.ts +29 -0
- package/Code/Code.js +23 -0
- package/Code/Code.js.map +1 -0
- package/Code/index.d.ts +1 -0
- package/Code/index.js +1 -0
- package/CodeEditor/CodeEditor.js +6 -0
- package/CodeEditor/CodeEditor.js.map +1 -1
- package/CodeEditor/CodeEditorPrimitive.js +3 -1
- package/CodeEditor/CodeEditorPrimitive.js.map +1 -1
- package/ColorPicker/ColorPicker.js +4 -1
- package/ColorPicker/ColorPicker.js.map +1 -1
- package/ColorPicker/primitives/ColorPickerPrimitive.d.ts +1 -1
- package/ColorPicker/primitives/ColorPickerPrimitive.js +3 -1
- package/ColorPicker/primitives/ColorPickerPrimitive.js.map +1 -1
- package/Command/components/List.d.ts +1 -1
- package/Command/components/List.js +9 -5
- package/Command/components/List.js.map +1 -1
- package/DataTable/DataTable.d.ts +42 -7
- package/DataTable/DataTable.js +122 -26
- package/DataTable/DataTable.js.map +1 -1
- package/DataTable/DataTable.mdx +64 -0
- package/DataTable/DataTable.stories.d.ts +4 -0
- package/DataTable/DataTable.stories.js +40 -1
- package/DataTable/DataTable.stories.js.map +1 -1
- package/DataTable/DataTable.subRows.test.d.ts +1 -0
- package/DataTable/DataTable.subRows.test.js +216 -0
- package/DataTable/DataTable.subRows.test.js.map +1 -0
- package/DataTable/components/ColumnsVisibility.d.ts +5 -4
- package/DataTable/components/ColumnsVisibility.js +7 -3
- package/DataTable/components/ColumnsVisibility.js.map +1 -1
- package/DatePicker/DatePicker.d.ts +5 -2
- package/DatePicker/DatePicker.js +14 -3
- package/DatePicker/DatePicker.js.map +1 -1
- package/DatePicker/DatePicker.stories.d.ts +10 -0
- package/DatePicker/DatePicker.stories.js +44 -1
- package/DatePicker/DatePicker.stories.js.map +1 -1
- package/DatePicker/primitives/BirthdayPicker.d.ts +13 -0
- package/DatePicker/primitives/BirthdayPicker.js +355 -0
- package/DatePicker/primitives/BirthdayPicker.js.map +1 -0
- package/DatePicker/primitives/BirthdayPickerCell.d.ts +14 -0
- package/DatePicker/primitives/BirthdayPickerCell.js +19 -0
- package/DatePicker/primitives/BirthdayPickerCell.js.map +1 -0
- package/DatePicker/primitives/BirthdayPickerSegments.d.ts +9 -0
- package/DatePicker/primitives/BirthdayPickerSegments.js +43 -0
- package/DatePicker/primitives/BirthdayPickerSegments.js.map +1 -0
- package/DatePicker/primitives/DateOnlyPicker.d.ts +1 -1
- package/DatePicker/primitives/DateOnlyPicker.js +13 -4
- package/DatePicker/primitives/DateOnlyPicker.js.map +1 -1
- package/DatePicker/primitives/DatePickerPrimitive.js +3 -0
- package/DatePicker/primitives/DatePickerPrimitive.js.map +1 -1
- package/DatePicker/primitives/DateRangePicker.d.ts +1 -1
- package/DatePicker/primitives/DateRangePicker.js +5 -4
- package/DatePicker/primitives/DateRangePicker.js.map +1 -1
- package/DatePicker/primitives/DateTimePicker.d.ts +1 -1
- package/DatePicker/primitives/DateTimePicker.js +27 -18
- package/DatePicker/primitives/DateTimePicker.js.map +1 -1
- package/DatePicker/primitives/MonthPicker.d.ts +1 -1
- package/DatePicker/primitives/MonthPicker.js +2 -1
- package/DatePicker/primitives/MonthPicker.js.map +1 -1
- package/DatePicker/primitives/MultipleDatesPicker.d.ts +1 -1
- package/DatePicker/primitives/MultipleDatesPicker.js +5 -4
- package/DatePicker/primitives/MultipleDatesPicker.js.map +1 -1
- package/DatePicker/primitives/MultipleMonthsPicker.d.ts +1 -1
- package/DatePicker/primitives/MultipleMonthsPicker.js +2 -1
- package/DatePicker/primitives/MultipleMonthsPicker.js.map +1 -1
- package/DatePicker/primitives/MultipleYearsPicker.d.ts +1 -1
- package/DatePicker/primitives/MultipleYearsPicker.js +2 -1
- package/DatePicker/primitives/MultipleYearsPicker.js.map +1 -1
- package/DatePicker/primitives/TimeOnlyPicker.d.ts +1 -1
- package/DatePicker/primitives/TimeOnlyPicker.js +2 -1
- package/DatePicker/primitives/TimeOnlyPicker.js.map +1 -1
- package/DatePicker/primitives/WeekPicker.d.ts +1 -1
- package/DatePicker/primitives/WeekPicker.js +2 -1
- package/DatePicker/primitives/WeekPicker.js.map +1 -1
- package/DatePicker/primitives/YearPicker.d.ts +1 -1
- package/DatePicker/primitives/YearPicker.js +2 -1
- package/DatePicker/primitives/YearPicker.js.map +1 -1
- package/DatePicker/primitives/components/DatePickerTrigger.js +1 -1
- package/DatePicker/primitives/components/DatePickerTrigger.js.map +1 -1
- package/DatePicker/primitives/components/TimePicker.d.ts +2 -1
- package/DatePicker/primitives/components/TimePicker.js +2 -1
- package/DatePicker/primitives/components/TimePicker.js.map +1 -1
- package/DatePicker/utils/birthdayHelpers.d.ts +77 -0
- package/DatePicker/utils/birthdayHelpers.js +145 -0
- package/DatePicker/utils/birthdayHelpers.js.map +1 -0
- package/DatePicker/utils/birthdayHelpers.test.d.ts +1 -0
- package/DatePicker/utils/birthdayHelpers.test.js +394 -0
- package/DatePicker/utils/birthdayHelpers.test.js.map +1 -0
- package/DatePicker/utils/dateHelpers.d.ts +6 -1
- package/DatePicker/utils/dateHelpers.js +13 -5
- package/DatePicker/utils/dateHelpers.js.map +1 -1
- package/DatePicker/utils/dateHelpers.test.d.ts +1 -0
- package/DatePicker/utils/dateHelpers.test.js +119 -0
- package/DatePicker/utils/dateHelpers.test.js.map +1 -0
- package/DatePicker/utils/index.d.ts +1 -0
- package/DatePicker/utils/index.js +1 -0
- package/DatePicker/utils/timezoneHelpers.d.ts +3 -0
- package/DatePicker/utils/timezoneHelpers.js +32 -0
- package/DatePicker/utils/timezoneHelpers.js.map +1 -0
- package/DatePicker/utils/types.d.ts +17 -2
- package/DelayedOnChange/DelayedOnChange.d.ts +9 -2
- package/DelayedOnChange/DelayedOnChange.js.map +1 -1
- package/Dialog/Dialog.d.ts +8 -7
- package/Dialog/Dialog.js.map +1 -1
- package/Drawer/Drawer.d.ts +10 -6
- package/Drawer/Drawer.js +2 -1
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.stories.d.ts +1 -0
- package/Drawer/Drawer.stories.js +20 -2
- package/Drawer/Drawer.stories.js.map +1 -1
- package/Drawer/components/DrawerHeader.d.ts +2 -2
- package/Drawer/components/DrawerHeader.js +11 -8
- package/Drawer/components/DrawerHeader.js.map +1 -1
- package/Drawer/components/Icon.d.ts +1 -1
- package/Drawer/components/Icon.js +3 -4
- package/Drawer/components/Icon.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuItem.d.ts +5 -0
- package/DropdownMenu/components/DropdownMenuItem.js +3 -2
- package/DropdownMenu/components/DropdownMenuItem.js.map +1 -1
- package/EmptyState/EmptyState.d.ts +2 -1
- package/EmptyState/EmptyState.js +8 -2
- package/EmptyState/EmptyState.js.map +1 -1
- package/FilePicker/FilePicker.d.ts +12 -12
- package/FilePicker/FilePicker.js +6 -1
- package/FilePicker/FilePicker.js.map +1 -1
- package/FilePicker/FilePicker.stories.d.ts +6 -0
- package/FilePicker/FilePicker.stories.js +24 -1
- package/FilePicker/FilePicker.stories.js.map +1 -1
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +13 -13
- package/FilePicker/primitives/FilePickerPrimitive.js +3 -1
- package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
- package/FilePicker/primitives/components/Label.d.ts +3 -1
- package/FilePicker/primitives/components/Label.js +2 -1
- package/FilePicker/primitives/components/Label.js.map +1 -1
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.d.ts +13 -2
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js +15 -6
- package/FilePicker/primitives/components/previews/ImagePreview/ImagePreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/ItemActions.js +1 -1
- package/FilePicker/primitives/components/previews/ItemActions.js.map +1 -1
- package/FilePicker/primitives/components/previews/ItemDescription.js +1 -1
- package/FilePicker/primitives/components/previews/ItemDescription.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.d.ts +5 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js +45 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/FileType.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.d.ts +5 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js +14 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Placeholder.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.d.ts +6 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js +54 -12
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemPreview.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.d.ts +11 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js +8 -61
- package/FilePicker/primitives/components/previews/RichItemPreview/RichItemThumbnail.js.map +1 -1
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.d.ts +11 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js +24 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/Thumbnail.js.map +1 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.d.ts +10 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js +46 -0
- package/FilePicker/primitives/components/previews/RichItemPreview/ThumbnailActions.js.map +1 -0
- package/FilePicker/primitives/components/previews/TruncatedFileName.d.ts +7 -0
- package/FilePicker/primitives/components/previews/TruncatedFileName.js +20 -0
- package/FilePicker/primitives/components/previews/TruncatedFileName.js.map +1 -0
- package/FilePicker/primitives/components/previews/fileName.d.ts +4 -0
- package/FilePicker/primitives/components/previews/fileName.js +26 -0
- package/FilePicker/primitives/components/previews/fileName.js.map +1 -0
- package/FilePicker/primitives/components/previews/index.d.ts +1 -0
- package/FilePicker/primitives/components/previews/index.js +1 -0
- package/FormComponent/Label.d.ts +6 -1
- package/FormComponent/Label.js +5 -2
- package/FormComponent/Label.js.map +1 -1
- package/FormComponent/labels.test.d.ts +1 -0
- package/FormComponent/labels.test.js +276 -0
- package/FormComponent/labels.test.js.map +1 -0
- package/Icon/Icon.d.ts +6 -1
- package/Icon/Icon.js.map +1 -1
- package/IconPicker/IconPicker.js +6 -1
- package/IconPicker/IconPicker.js.map +1 -1
- package/IconPicker/domains/IconPickerIcon.js +1 -1
- package/IconPicker/domains/IconPickerIcon.js.map +1 -1
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +2 -0
- package/IconPicker/primitives/IconPickerPrimitive.js +2 -2
- package/IconPicker/primitives/IconPickerPrimitive.js.map +1 -1
- package/IconPicker/primitives/components/IconPickerGrid.js.map +1 -1
- package/ImageEditor/AspectRatioPreview.d.ts +16 -0
- package/ImageEditor/AspectRatioPreview.js +26 -0
- package/ImageEditor/AspectRatioPreview.js.map +1 -0
- package/ImageEditor/CropHotspotEditor.d.ts +22 -0
- package/ImageEditor/CropHotspotEditor.js +402 -0
- package/ImageEditor/CropHotspotEditor.js.map +1 -0
- package/ImageEditor/ImageEditor.d.ts +18 -0
- package/ImageEditor/ImageEditor.js +151 -0
- package/ImageEditor/ImageEditor.js.map +1 -0
- package/ImageEditor/ImageEditor.stories.d.ts +6 -0
- package/ImageEditor/ImageEditor.stories.js +42 -0
- package/ImageEditor/ImageEditor.stories.js.map +1 -0
- package/ImageEditor/MetaFields.d.ts +12 -0
- package/ImageEditor/MetaFields.js +20 -0
- package/ImageEditor/MetaFields.js.map +1 -0
- package/ImageEditor/SectionLabel.d.ts +8 -0
- package/ImageEditor/SectionLabel.js +7 -0
- package/ImageEditor/SectionLabel.js.map +1 -0
- package/ImageEditor/geometry.d.ts +46 -0
- package/ImageEditor/geometry.js +126 -0
- package/ImageEditor/geometry.js.map +1 -0
- package/ImageEditor/index.d.ts +3 -0
- package/ImageEditor/index.js +3 -0
- package/ImageEditor/types.d.ts +52 -0
- package/ImageEditor/types.js +35 -0
- package/ImageEditor/types.js.map +1 -0
- package/Input/InputPrimitive.d.ts +4 -4
- package/Input/InputPrimitive.js +0 -1
- package/Input/InputPrimitive.js.map +1 -1
- package/Kbd/Kbd.d.ts +35 -0
- package/Kbd/Kbd.js +34 -0
- package/Kbd/Kbd.js.map +1 -0
- package/Kbd/index.d.ts +1 -0
- package/Kbd/index.js +1 -0
- package/Link/Link.d.ts +1 -1
- package/Link/Link.js +1 -1
- package/Link/Link.js.map +1 -1
- package/Markdown/Markdown.d.ts +47 -0
- package/Markdown/Markdown.js +17 -0
- package/Markdown/Markdown.js.map +1 -0
- package/Markdown/index.d.ts +1 -0
- package/Markdown/index.js +1 -0
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.d.ts +8 -2
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js +1 -0
- package/MultiAutoComplete/primitives/MultiAutoCompletePrimitive.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompletePresenter.test.js.map +1 -1
- package/MultiAutoComplete/primitives/useMultiAutoComplete.js +3 -2
- package/MultiAutoComplete/primitives/useMultiAutoComplete.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.d.ts +12 -12
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.d.ts +12 -12
- package/MultiSelect/MultiSelect.js +6 -1
- package/MultiSelect/MultiSelect.js.map +1 -1
- package/MultiSelect/primitives/MultiSelectPrimitive.d.ts +3 -1
- package/MultiSelect/primitives/MultiSelectPrimitive.js +16 -7
- package/MultiSelect/primitives/MultiSelectPrimitive.js.map +1 -1
- package/Popover/Popover.stories.d.ts +7 -0
- package/Popover/Popover.stories.js +24 -1
- package/Popover/Popover.stories.js.map +1 -1
- package/Popover/primitives/components/PopoverContent.js +6 -1
- package/Popover/primitives/components/PopoverContent.js.map +1 -1
- package/RadioGroup/RadioGroup.js +4 -1
- package/RadioGroup/RadioGroup.js.map +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.d.ts +1 -1
- package/RadioGroup/primitives/RadioGroupPrimitive.js +4 -2
- package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.js +4 -2
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.js.map +1 -1
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.jsxLabel.test.d.ts +1 -0
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.jsxLabel.test.js +88 -0
- package/RadioGroup/primitives/presenters/RadioGroupPresenter.jsxLabel.test.js.map +1 -0
- package/RangeSlider/RangeSlider.js +4 -1
- package/RangeSlider/RangeSlider.js.map +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.d.ts +1 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.js +3 -1
- package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
- package/ScrollArea/ScrollArea.d.ts +16 -2
- package/ScrollArea/ScrollArea.js +19 -5
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/SegmentedControl/SegmentedControl.js +4 -1
- package/SegmentedControl/SegmentedControl.js.map +1 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +5 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js +2 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
- package/Select/Select.js +6 -1
- package/Select/Select.js.map +1 -1
- package/Select/primitives/SelectPrimitive.d.ts +4 -0
- package/Select/primitives/SelectPrimitive.js +4 -2
- package/Select/primitives/SelectPrimitive.js.map +1 -1
- package/Select/primitives/components/SelectContent.js +4 -6
- package/Select/primitives/components/SelectContent.js.map +1 -1
- package/SidePanel/SidePanel.d.ts +46 -0
- package/SidePanel/SidePanel.js +47 -0
- package/SidePanel/SidePanel.js.map +1 -0
- package/SidePanel/SidePanelBody.d.ts +37 -0
- package/SidePanel/SidePanelBody.js +14 -0
- package/SidePanel/SidePanelBody.js.map +1 -0
- package/SidePanel/SidePanelFooter.d.ts +27 -0
- package/SidePanel/SidePanelFooter.js +10 -0
- package/SidePanel/SidePanelFooter.js.map +1 -0
- package/SidePanel/index.d.ts +3 -0
- package/SidePanel/index.js +3 -0
- package/Sidebar/Sidebar.groups.test.d.ts +1 -0
- package/Sidebar/Sidebar.groups.test.js +113 -0
- package/Sidebar/Sidebar.groups.test.js.map +1 -0
- package/Sidebar/components/SidebarContent.js +1 -1
- package/Sidebar/components/SidebarContent.js.map +1 -1
- package/Sidebar/components/SidebarRoot.js +1 -1
- package/Sidebar/components/SidebarRoot.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuRootButton.js +1 -0
- package/Sidebar/components/items/SidebarMenuRootButton.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuSubButton.js +8 -5
- package/Sidebar/components/items/SidebarMenuSubButton.js.map +1 -1
- package/Sidebar/components/items/SidebarMenuSubItem.js +3 -3
- package/Sidebar/components/items/SidebarMenuSubItem.js.map +1 -1
- package/Slider/Slider.js +10 -2
- package/Slider/Slider.js.map +1 -1
- package/Slider/primitives/SliderPrimitive.d.ts +1 -1
- package/Slider/primitives/SliderPrimitive.js +2 -1
- package/Slider/primitives/SliderPrimitive.js.map +1 -1
- package/Slider/primitives/components/SliderThumb.d.ts +5 -2
- package/Slider/primitives/components/SliderThumb.js +2 -1
- package/Slider/primitives/components/SliderThumb.js.map +1 -1
- package/Switch/Switch.d.ts +4 -4
- package/Switch/Switch.js +21 -7
- package/Switch/Switch.js.map +1 -1
- package/Switch/domains/SwitchItemDto.d.ts +1 -1
- package/Switch/primitives/SwitchPrimitive.js +4 -3
- package/Switch/primitives/SwitchPrimitive.js.map +1 -1
- package/Tabs/Tabs.d.ts +7 -2
- package/Tabs/Tabs.js +29 -11
- package/Tabs/Tabs.js.map +1 -1
- package/Tabs/Tabs.mdx +27 -0
- package/Tabs/Tabs.stories.d.ts +1 -0
- package/Tabs/Tabs.stories.js +19 -1
- package/Tabs/Tabs.stories.js.map +1 -1
- package/Tag/Tag.d.ts +1 -1
- package/Tag/Tag.js +5 -0
- package/Tag/Tag.js.map +1 -1
- package/Tag/TagIcon.js +7 -1
- package/Tag/TagIcon.js.map +1 -1
- package/Tags/primitives/TagsPrimitive.d.ts +2 -2
- package/Tags/primitives/TagsPrimitive.js.map +1 -1
- package/Toast/useToast.stories.js.map +1 -1
- package/ToggleGroup/ToggleGroup.js +4 -1
- package/ToggleGroup/ToggleGroup.js.map +1 -1
- package/ToggleGroup/primitives/ToggleGroupPrimitive.d.ts +2 -0
- package/ToggleGroup/primitives/ToggleGroupPrimitive.js +3 -2
- package/ToggleGroup/primitives/ToggleGroupPrimitive.js.map +1 -1
- package/Tree/useTree.js +6 -2
- package/Tree/useTree.js.map +1 -1
- package/exports/admin/ui.d.ts +2 -0
- package/exports/admin/ui.js +2 -0
- package/hooks/index.d.ts +1 -0
- package/hooks/index.js +1 -0
- package/hooks/useEscapeScrollLock.d.ts +13 -0
- package/hooks/useEscapeScrollLock.js +21 -0
- package/hooks/useEscapeScrollLock.js.map +1 -0
- package/index.d.ts +7 -0
- package/index.js +7 -0
- package/package.json +31 -29
- package/theme.css +43 -0
package/Slider/Slider.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Label } from "../Label/index.js";
|
|
2
|
-
import { makeDecoratable } from "../utils.js";
|
|
2
|
+
import { generateId, makeDecoratable } from "../utils.js";
|
|
3
3
|
import { SliderPrimitiveRenderer, SliderValue, useSlider } from "./primitives/index.js";
|
|
4
4
|
import { FormComponentDescription, FormComponentErrorMessage, FormComponentLabel, FormComponentNote } from "../FormComponent/index.js";
|
|
5
5
|
import * as __rspack_external_react from "react";
|
|
@@ -8,6 +8,7 @@ const SliderRendererWithSideValue = (props)=>/*#__PURE__*/ __rspack_external_rea
|
|
|
8
8
|
}, /*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
9
9
|
className: "basis-2/12 pr-sm"
|
|
10
10
|
}, /*#__PURE__*/ __rspack_external_react.createElement(Label, {
|
|
11
|
+
id: props.labelId,
|
|
11
12
|
text: props.label,
|
|
12
13
|
required: props.required,
|
|
13
14
|
disabled: props.disabled,
|
|
@@ -15,7 +16,10 @@ const SliderRendererWithSideValue = (props)=>/*#__PURE__*/ __rspack_external_rea
|
|
|
15
16
|
weight: "light"
|
|
16
17
|
})), /*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
17
18
|
className: "basis-9/12"
|
|
18
|
-
}, /*#__PURE__*/ __rspack_external_react.createElement(SliderPrimitiveRenderer,
|
|
19
|
+
}, /*#__PURE__*/ __rspack_external_react.createElement(SliderPrimitiveRenderer, {
|
|
20
|
+
...props,
|
|
21
|
+
"aria-labelledby": props.labelId
|
|
22
|
+
})), /*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
19
23
|
className: "basis-1/12 pl-sm text-right"
|
|
20
24
|
}, /*#__PURE__*/ __rspack_external_react.createElement(SliderValue, {
|
|
21
25
|
value: props.textValue,
|
|
@@ -24,6 +28,7 @@ const SliderRendererWithSideValue = (props)=>/*#__PURE__*/ __rspack_external_rea
|
|
|
24
28
|
const DecoratableSlider = ({ description, note, hint, validation, labelPosition, ...props })=>{
|
|
25
29
|
const { isValid: validationIsValid, message: validationMessage } = validation || {};
|
|
26
30
|
const invalid = false === validationIsValid;
|
|
31
|
+
const labelId = __rspack_external_react.useMemo(()=>`${generateId()}-label`, []);
|
|
27
32
|
const { vm, changeValue, commitValue } = useSlider(props);
|
|
28
33
|
if ("side" === labelPosition) return /*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
29
34
|
className: "w-full"
|
|
@@ -32,6 +37,7 @@ const DecoratableSlider = ({ description, note, hint, validation, labelPosition,
|
|
|
32
37
|
disabled: props.disabled
|
|
33
38
|
}), /*#__PURE__*/ __rspack_external_react.createElement(SliderRendererWithSideValue, {
|
|
34
39
|
...props,
|
|
40
|
+
labelId: labelId,
|
|
35
41
|
...vm,
|
|
36
42
|
invalid: invalid,
|
|
37
43
|
onValueChange: changeValue,
|
|
@@ -47,6 +53,7 @@ const DecoratableSlider = ({ description, note, hint, validation, labelPosition,
|
|
|
47
53
|
return /*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
48
54
|
className: "w-full"
|
|
49
55
|
}, /*#__PURE__*/ __rspack_external_react.createElement(FormComponentLabel, {
|
|
56
|
+
labelId: labelId,
|
|
50
57
|
hint: hint,
|
|
51
58
|
text: /*#__PURE__*/ __rspack_external_react.createElement(Label, {
|
|
52
59
|
text: props.label,
|
|
@@ -61,6 +68,7 @@ const DecoratableSlider = ({ description, note, hint, validation, labelPosition,
|
|
|
61
68
|
}), /*#__PURE__*/ __rspack_external_react.createElement(SliderPrimitiveRenderer, {
|
|
62
69
|
...props,
|
|
63
70
|
...vm,
|
|
71
|
+
"aria-labelledby": labelId,
|
|
64
72
|
onValueChange: changeValue,
|
|
65
73
|
onValueCommit: commitValue
|
|
66
74
|
}), /*#__PURE__*/ __rspack_external_react.createElement(FormComponentErrorMessage, {
|
package/Slider/Slider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider/Slider.js","sources":["../../src/Slider/Slider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Label } from \"~/Label/index.js\";\nimport { makeDecoratable } from \"~/utils.js\";\nimport type { SliderPrimitiveProps, SliderPrimitiveRendererProps } from \"./primitives/index.js\";\nimport { SliderPrimitiveRenderer, useSlider, SliderValue } from \"./primitives/index.js\";\nimport type { FormComponentProps } from \"~/FormComponent/index.js\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote\n} from \"~/FormComponent/index.js\";\n\n/**\n * Slider Renderer with side label\n */\ninterface SliderRendererWithSideValueProps extends SliderPrimitiveRendererProps {\n label?: React.ReactNode;\n invalid?: boolean;\n required?: boolean;\n}\n\nconst SliderRendererWithSideValue = (props: SliderRendererWithSideValueProps) => {\n return (\n <div className={\"w-full flex flex-row items-center justify-between\"}>\n <div className={\"basis-2/12 pr-sm\"}>\n <Label\n text={props.label}\n required={props.required}\n disabled={props.disabled}\n invalid={props.invalid}\n weight={\"light\"}\n />\n </div>\n <div className={\"basis-9/12\"}>\n <SliderPrimitiveRenderer {...props} />\n </div>\n <div className={\"basis-1/12 pl-sm text-right\"}>\n <SliderValue value={props.textValue} disabled={props.disabled} />\n </div>\n </div>\n );\n};\n\n/**\n * Slider\n */\ntype SliderProps = FormComponentProps &\n SliderPrimitiveProps & {\n labelPosition?: \"top\" | \"side\";\n };\n\nconst DecoratableSlider = ({\n description,\n note,\n hint,\n validation,\n labelPosition,\n ...props\n}: SliderProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const invalid = validationIsValid === false;\n\n const { vm, changeValue, commitValue } = useSlider(props);\n\n if (labelPosition === \"side\") {\n return (\n <div className={\"w-full\"}>\n <FormComponentDescription text={description} disabled={props.disabled} />\n <SliderRendererWithSideValue\n {...props}\n {...vm}\n invalid={invalid}\n onValueChange={changeValue}\n onValueCommit={commitValue}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={props.disabled}\n />\n <FormComponentNote text={note} disabled={props.disabled} />\n </div>\n );\n }\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel\n hint={hint}\n text={<Label text={props.label} value={vm.textValue} />}\n disabled={props.disabled}\n required={props.required}\n invalid={invalid}\n />\n <FormComponentDescription text={description} disabled={props.disabled} />\n <SliderPrimitiveRenderer\n {...props}\n {...vm}\n onValueChange={changeValue}\n onValueCommit={commitValue}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={props.disabled}\n />\n <FormComponentNote text={note} disabled={props.disabled} />\n </div>\n );\n};\nconst Slider = makeDecoratable(\"Slider\", DecoratableSlider);\n\nexport { Slider, type SliderProps };\n"],"names":["SliderRendererWithSideValue","props","Label","SliderPrimitiveRenderer","SliderValue","DecoratableSlider","description","note","hint","validation","labelPosition","validationIsValid","validationMessage","invalid","vm","changeValue","commitValue","useSlider","FormComponentDescription","FormComponentErrorMessage","FormComponentNote","FormComponentLabel","Slider","makeDecoratable"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"Slider/Slider.js","sources":["../../src/Slider/Slider.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Label } from \"~/Label/index.js\";\nimport { makeDecoratable, generateId } from \"~/utils.js\";\nimport type { SliderPrimitiveProps, SliderPrimitiveRendererProps } from \"./primitives/index.js\";\nimport { SliderPrimitiveRenderer, useSlider, SliderValue } from \"./primitives/index.js\";\nimport type { FormComponentProps } from \"~/FormComponent/index.js\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote\n} from \"~/FormComponent/index.js\";\n\n/**\n * Slider Renderer with side label\n */\ninterface SliderRendererWithSideValueProps extends SliderPrimitiveRendererProps {\n label?: React.ReactNode;\n /** The side label's id — the thumb names itself with it. */\n labelId?: string;\n invalid?: boolean;\n required?: boolean;\n}\n\nconst SliderRendererWithSideValue = (props: SliderRendererWithSideValueProps) => {\n return (\n <div className={\"w-full flex flex-row items-center justify-between\"}>\n <div className={\"basis-2/12 pr-sm\"}>\n <Label\n id={props.labelId}\n text={props.label}\n required={props.required}\n disabled={props.disabled}\n invalid={props.invalid}\n weight={\"light\"}\n />\n </div>\n <div className={\"basis-9/12\"}>\n <SliderPrimitiveRenderer {...props} aria-labelledby={props.labelId} />\n </div>\n <div className={\"basis-1/12 pl-sm text-right\"}>\n <SliderValue value={props.textValue} disabled={props.disabled} />\n </div>\n </div>\n );\n};\n\n/**\n * Slider\n */\ntype SliderProps = FormComponentProps &\n SliderPrimitiveProps & {\n labelPosition?: \"top\" | \"side\";\n };\n\nconst DecoratableSlider = ({\n description,\n note,\n hint,\n validation,\n labelPosition,\n ...props\n}: SliderProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const invalid = validationIsValid === false;\n /* The thumb (`role=slider`) can't be a `<label for>` target, so it names itself after the label. */\n const labelId = React.useMemo(() => `${generateId()}-label`, []);\n\n const { vm, changeValue, commitValue } = useSlider(props);\n\n if (labelPosition === \"side\") {\n return (\n <div className={\"w-full\"}>\n <FormComponentDescription text={description} disabled={props.disabled} />\n <SliderRendererWithSideValue\n {...props}\n labelId={labelId}\n {...vm}\n invalid={invalid}\n onValueChange={changeValue}\n onValueCommit={commitValue}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={props.disabled}\n />\n <FormComponentNote text={note} disabled={props.disabled} />\n </div>\n );\n }\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel\n labelId={labelId}\n hint={hint}\n text={<Label text={props.label} value={vm.textValue} />}\n disabled={props.disabled}\n required={props.required}\n invalid={invalid}\n />\n <FormComponentDescription text={description} disabled={props.disabled} />\n <SliderPrimitiveRenderer\n {...props}\n {...vm}\n aria-labelledby={labelId}\n onValueChange={changeValue}\n onValueCommit={commitValue}\n />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={props.disabled}\n />\n <FormComponentNote text={note} disabled={props.disabled} />\n </div>\n );\n};\nconst Slider = makeDecoratable(\"Slider\", DecoratableSlider);\n\nexport { Slider, type SliderProps };\n"],"names":["SliderRendererWithSideValue","props","Label","SliderPrimitiveRenderer","SliderValue","DecoratableSlider","description","note","hint","validation","labelPosition","validationIsValid","validationMessage","invalid","labelId","React","generateId","vm","changeValue","commitValue","useSlider","FormComponentDescription","FormComponentErrorMessage","FormComponentNote","FormComponentLabel","Slider","makeDecoratable"],"mappings":";;;;;AAwBA,MAAMA,8BAA8B,CAACC,QAC1B,WAAP,GACI,sCAAC;QAAI,WAAW;qBACZ,sCAAC;QAAI,WAAW;qBACZ,sCAACC,OAAKA;QACF,IAAID,MAAM,OAAO;QACjB,MAAMA,MAAM,KAAK;QACjB,UAAUA,MAAM,QAAQ;QACxB,UAAUA,MAAM,QAAQ;QACxB,SAASA,MAAM,OAAO;QACtB,QAAQ;uBAGhB,sCAAC;QAAI,WAAW;qBACZ,sCAACE,yBAAuBA;QAAE,GAAGF,KAAK;QAAE,mBAAiBA,MAAM,OAAO;uBAEtE,sCAAC;QAAI,WAAW;qBACZ,sCAACG,aAAWA;QAAC,OAAOH,MAAM,SAAS;QAAE,UAAUA,MAAM,QAAQ;;AAc7E,MAAMI,oBAAoB,CAAC,EACvBC,WAAW,EACXC,IAAI,EACJC,IAAI,EACJC,UAAU,EACVC,aAAa,EACb,GAAGT,OACO;IACV,MAAM,EAAE,SAASU,iBAAiB,EAAE,SAASC,iBAAiB,EAAE,GAAGH,cAAc,CAAC;IAClF,MAAMI,UAAUF,AAAsB,UAAtBA;IAEhB,MAAMG,UAAUC,wBAAAA,OAAa,CAAC,IAAM,GAAGC,aAAa,MAAM,CAAC,EAAE,EAAE;IAE/D,MAAM,EAAEC,EAAE,EAAEC,WAAW,EAAEC,WAAW,EAAE,GAAGC,UAAUnB;IAEnD,IAAIS,AAAkB,WAAlBA,eACA,OAAO,WAAP,GACI,sCAAC;QAAI,WAAW;qBACZ,sCAACW,0BAAwBA;QAAC,MAAMf;QAAa,UAAUL,MAAM,QAAQ;sBACrE,sCAACD,6BAA2BA;QACvB,GAAGC,KAAK;QACT,SAASa;QACR,GAAGG,EAAE;QACN,SAASJ;QACT,eAAeK;QACf,eAAeC;sBAEnB,sCAACG,2BAAyBA;QACtB,MAAMV;QACN,SAASC;QACT,UAAUZ,MAAM,QAAQ;sBAE5B,sCAACsB,mBAAiBA;QAAC,MAAMhB;QAAM,UAAUN,MAAM,QAAQ;;IAKnE,OAAO,WAAP,GACI,sCAAC;QAAI,WAAW;qBACZ,sCAACuB,oBAAkBA;QACf,SAASV;QACT,MAAMN;QACN,oBAAM,sCAACN,OAAKA;YAAC,MAAMD,MAAM,KAAK;YAAE,OAAOgB,GAAG,SAAS;;QACnD,UAAUhB,MAAM,QAAQ;QACxB,UAAUA,MAAM,QAAQ;QACxB,SAASY;sBAEb,sCAACQ,0BAAwBA;QAAC,MAAMf;QAAa,UAAUL,MAAM,QAAQ;sBACrE,sCAACE,yBAAuBA;QACnB,GAAGF,KAAK;QACR,GAAGgB,EAAE;QACN,mBAAiBH;QACjB,eAAeI;QACf,eAAeC;sBAEnB,sCAACG,2BAAyBA;QACtB,MAAMV;QACN,SAASC;QACT,UAAUZ,MAAM,QAAQ;sBAE5B,sCAACsB,mBAAiBA;QAAC,MAAMhB;QAAM,UAAUN,MAAM,QAAQ;;AAGnE;AACA,MAAMwB,SAASC,gBAAgB,UAAUrB"}
|
|
@@ -5,7 +5,7 @@ type SliderRootProps = Omit<SliderPrimitives.SliderProps, "min"> & {
|
|
|
5
5
|
min: number;
|
|
6
6
|
};
|
|
7
7
|
type SliderPrimitiveRendererProps = SliderRootProps & SliderThumbProps;
|
|
8
|
-
declare const SliderPrimitiveRenderer: ({ tooltipSide, textValue, showTooltip, ...sliderProps }: SliderPrimitiveVm) => React.JSX.Element;
|
|
8
|
+
declare const SliderPrimitiveRenderer: ({ tooltipSide, textValue, showTooltip, "aria-labelledby": labelledBy, ...sliderProps }: SliderPrimitiveVm) => React.JSX.Element;
|
|
9
9
|
interface SliderPrimitiveProps extends Omit<SliderPrimitives.SliderProps, "defaultValue" | "value" | "onValueChange" | "onValueCommit"> {
|
|
10
10
|
onValueChange: (value: number) => void;
|
|
11
11
|
onValueCommit?: (value: number) => void;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useSlider } from "./useSlider.js";
|
|
2
2
|
import { SliderRoot, SliderThumb, SliderTrack } from "./components/index.js";
|
|
3
3
|
import * as __rspack_external_react from "react";
|
|
4
|
-
const SliderPrimitiveRenderer = ({ tooltipSide, textValue, showTooltip, ...sliderProps })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
4
|
+
const SliderPrimitiveRenderer = ({ tooltipSide, textValue, showTooltip, "aria-labelledby": labelledBy, ...sliderProps })=>/*#__PURE__*/ __rspack_external_react.createElement("div", {
|
|
5
5
|
className: "flex h-md w-full"
|
|
6
6
|
}, /*#__PURE__*/ __rspack_external_react.createElement(SliderRoot, sliderProps, /*#__PURE__*/ __rspack_external_react.createElement(SliderTrack, null), /*#__PURE__*/ __rspack_external_react.createElement(SliderThumb, {
|
|
7
|
+
"aria-labelledby": labelledBy,
|
|
7
8
|
textValue: textValue,
|
|
8
9
|
showTooltip: showTooltip,
|
|
9
10
|
tooltipSide: tooltipSide
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider/primitives/SliderPrimitive.js","sources":["../../../src/Slider/primitives/SliderPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type { Slider as SliderPrimitives } from \"radix-ui\";\nimport { useSlider } from \"./useSlider.js\";\nimport { SliderRoot, SliderThumb, SliderTrack, type SliderThumbProps } from \"./components/index.js\";\n\ntype SliderRootProps = Omit<SliderPrimitives.SliderProps, \"min\"> & {\n min: number;\n};\n\ntype SliderPrimitiveRendererProps = SliderRootProps & SliderThumbProps;\n\nconst SliderPrimitiveRenderer = ({\n tooltipSide,\n textValue,\n showTooltip,\n ...sliderProps\n}: SliderPrimitiveVm) => {\n return (\n <div className={\"flex h-md w-full\"}>\n <SliderRoot {...sliderProps}>\n <SliderTrack />\n <SliderThumb\n textValue={textValue}\n showTooltip={showTooltip}\n tooltipSide={tooltipSide}\n />\n </SliderRoot>\n </div>\n );\n};\n\ninterface SliderPrimitiveProps extends Omit<\n SliderPrimitives.SliderProps,\n \"defaultValue\" | \"value\" | \"onValueChange\" | \"onValueCommit\"\n> {\n onValueChange: (value: number) => void;\n onValueCommit?: (value: number) => void;\n showTooltip?: boolean;\n tooltipSide?: \"top\" | \"bottom\";\n transformValue?: (value: number) => string;\n value?: number;\n}\n\ntype SliderPrimitiveVm = SliderRootProps & SliderThumbProps;\n\nconst SliderPrimitive = (props: SliderPrimitiveProps) => {\n const { transformValue, ...restProps } = props;\n const { vm, changeValue, commitValue } = useSlider({
|
|
1
|
+
{"version":3,"file":"Slider/primitives/SliderPrimitive.js","sources":["../../../src/Slider/primitives/SliderPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport type { Slider as SliderPrimitives } from \"radix-ui\";\nimport { useSlider } from \"./useSlider.js\";\nimport { SliderRoot, SliderThumb, SliderTrack, type SliderThumbProps } from \"./components/index.js\";\n\ntype SliderRootProps = Omit<SliderPrimitives.SliderProps, \"min\"> & {\n min: number;\n};\n\ntype SliderPrimitiveRendererProps = SliderRootProps & SliderThumbProps;\n\nconst SliderPrimitiveRenderer = ({\n tooltipSide,\n textValue,\n showTooltip,\n \"aria-labelledby\": labelledBy,\n ...sliderProps\n}: SliderPrimitiveVm) => {\n return (\n <div className={\"flex h-md w-full\"}>\n <SliderRoot {...sliderProps}>\n <SliderTrack />\n <SliderThumb\n aria-labelledby={labelledBy}\n textValue={textValue}\n showTooltip={showTooltip}\n tooltipSide={tooltipSide}\n />\n </SliderRoot>\n </div>\n );\n};\n\ninterface SliderPrimitiveProps extends Omit<\n SliderPrimitives.SliderProps,\n \"defaultValue\" | \"value\" | \"onValueChange\" | \"onValueCommit\"\n> {\n onValueChange: (value: number) => void;\n onValueCommit?: (value: number) => void;\n showTooltip?: boolean;\n tooltipSide?: \"top\" | \"bottom\";\n transformValue?: (value: number) => string;\n value?: number;\n}\n\ntype SliderPrimitiveVm = SliderRootProps & SliderThumbProps;\n\nconst SliderPrimitive = (props: SliderPrimitiveProps) => {\n const { transformValue, ...restProps } = props;\n const { vm, changeValue, commitValue } = useSlider({\n ...restProps,\n transformValue\n });\n\n return (\n <SliderPrimitiveRenderer\n {...restProps}\n {...vm}\n onValueChange={changeValue}\n onValueCommit={commitValue}\n />\n );\n};\n\nexport {\n SliderPrimitive,\n SliderPrimitiveRenderer,\n type SliderPrimitiveVm,\n type SliderPrimitiveProps,\n type SliderPrimitiveRendererProps\n};\n"],"names":["SliderPrimitiveRenderer","tooltipSide","textValue","showTooltip","labelledBy","sliderProps","SliderRoot","SliderTrack","SliderThumb","SliderPrimitive","props","transformValue","restProps","vm","changeValue","commitValue","useSlider"],"mappings":";;;AAWA,MAAMA,0BAA0B,CAAC,EAC7BC,WAAW,EACXC,SAAS,EACTC,WAAW,EACX,mBAAmBC,UAAU,EAC7B,GAAGC,aACa,GACT,WAAP,GACI,sCAAC;QAAI,WAAW;qBACZ,sCAACC,YAAeD,aAAAA,WAAAA,GACZ,sCAACE,aAAWA,OAAAA,WAAAA,GACZ,sCAACC,aAAWA;QACR,mBAAiBJ;QACjB,WAAWF;QACX,aAAaC;QACb,aAAaF;;AAqBjC,MAAMQ,kBAAkB,CAACC;IACrB,MAAM,EAAEC,cAAc,EAAE,GAAGC,WAAW,GAAGF;IACzC,MAAM,EAAEG,EAAE,EAAEC,WAAW,EAAEC,WAAW,EAAE,GAAGC,UAAU;QAC/C,GAAGJ,SAAS;QACZD;IACJ;IAEA,OAAO,WAAP,GACI,sCAACX,yBAAuBA;QACnB,GAAGY,SAAS;QACZ,GAAGC,EAAE;QACN,eAAeC;QACf,eAAeC;;AAG3B"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { SliderTooltipProps } from "./SliderTooltip.js";
|
|
3
|
-
type SliderThumbProps = SliderTooltipProps
|
|
4
|
-
|
|
3
|
+
type SliderThumbProps = SliderTooltipProps & {
|
|
4
|
+
/** The thumb is the `role=slider` element, so it carries the label's id — not the root. */
|
|
5
|
+
"aria-labelledby"?: string;
|
|
6
|
+
};
|
|
7
|
+
declare const SliderThumb: ({ textValue, showTooltip, tooltipSide, "aria-labelledby": labelledBy }: SliderThumbProps) => React.JSX.Element;
|
|
5
8
|
export { SliderThumb, type SliderThumbProps };
|
|
@@ -2,7 +2,8 @@ import { Slider } from "radix-ui";
|
|
|
2
2
|
import { cn } from "../../../utils.js";
|
|
3
3
|
import { SliderTooltip } from "./SliderTooltip.js";
|
|
4
4
|
import * as __rspack_external_react from "react";
|
|
5
|
-
const SliderThumb = ({ textValue, showTooltip, tooltipSide })=>/*#__PURE__*/ __rspack_external_react.createElement(Slider.Thumb, {
|
|
5
|
+
const SliderThumb = ({ textValue, showTooltip, tooltipSide, "aria-labelledby": labelledBy })=>/*#__PURE__*/ __rspack_external_react.createElement(Slider.Thumb, {
|
|
6
|
+
"aria-labelledby": labelledBy,
|
|
6
7
|
className: cn("inline-block w-md h-md mt-xs-plus rounded-xxl border-md transition-colors outline-none", "bg-primary border-white", "hover:bg-primary-strong", "active:bg-primary", "data-disabled:pointer-events-none data-disabled:bg-primary-disabled")
|
|
7
8
|
}, /*#__PURE__*/ __rspack_external_react.createElement(SliderTooltip, {
|
|
8
9
|
showTooltip: showTooltip,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider/primitives/components/SliderThumb.js","sources":["../../../../src/Slider/primitives/components/SliderThumb.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slider as SliderPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils.js\";\nimport type { SliderTooltipProps } from \"./SliderTooltip.js\";\nimport { SliderTooltip } from \"./SliderTooltip.js\";\n\ntype SliderThumbProps = SliderTooltipProps;\n\nconst SliderThumb = ({
|
|
1
|
+
{"version":3,"file":"Slider/primitives/components/SliderThumb.js","sources":["../../../../src/Slider/primitives/components/SliderThumb.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Slider as SliderPrimitives } from \"radix-ui\";\nimport { cn } from \"~/utils.js\";\nimport type { SliderTooltipProps } from \"./SliderTooltip.js\";\nimport { SliderTooltip } from \"./SliderTooltip.js\";\n\ntype SliderThumbProps = SliderTooltipProps & {\n /** The thumb is the `role=slider` element, so it carries the label's id — not the root. */\n \"aria-labelledby\"?: string;\n};\n\nconst SliderThumb = ({\n textValue,\n showTooltip,\n tooltipSide,\n \"aria-labelledby\": labelledBy\n}: SliderThumbProps) => (\n <SliderPrimitives.Thumb\n aria-labelledby={labelledBy}\n className={cn(\n \"inline-block w-md h-md mt-xs-plus rounded-xxl border-md transition-colors outline-none\",\n \"bg-primary border-white\",\n \"hover:bg-primary-strong\",\n \"active:bg-primary\",\n \"data-disabled:pointer-events-none data-disabled:bg-primary-disabled\"\n )}\n >\n <SliderTooltip showTooltip={showTooltip} textValue={textValue} tooltipSide={tooltipSide} />\n </SliderPrimitives.Thumb>\n);\n\nexport { SliderThumb, type SliderThumbProps };\n"],"names":["SliderThumb","textValue","showTooltip","tooltipSide","labelledBy","SliderPrimitives","cn","SliderTooltip"],"mappings":";;;;AAWA,MAAMA,cAAc,CAAC,EACjBC,SAAS,EACTC,WAAW,EACXC,WAAW,EACX,mBAAmBC,UAAU,EACd,iBACf,sCAACC,OAAAA,KAAsB;QACnB,mBAAiBD;QACjB,WAAWE,GACP,0FACA,2BACA,2BACA,qBACA;qBAGJ,sCAACC,eAAaA;QAAC,aAAaL;QAAa,WAAWD;QAAW,aAAaE"}
|
package/Switch/Switch.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { SwitchPrimitiveProps } from "./primitives/index.js";
|
|
3
|
-
import type
|
|
4
|
-
type SwitchProps = SwitchPrimitiveProps & FormComponentProps;
|
|
5
|
-
declare const DecoratableSwitch: ({ note, validation, ...props }: SwitchProps) => React.JSX.Element;
|
|
3
|
+
import { type FormComponentProps } from "../FormComponent/index.js";
|
|
4
|
+
type SwitchProps = Omit<SwitchPrimitiveProps, "label"> & FormComponentProps;
|
|
5
|
+
declare const DecoratableSwitch: ({ label, description, hint, note, required, disabled, validation, ...props }: SwitchProps) => React.JSX.Element;
|
|
6
6
|
declare const Switch: typeof DecoratableSwitch & {
|
|
7
7
|
original: typeof DecoratableSwitch;
|
|
8
8
|
originalName: string;
|
|
@@ -22,4 +22,4 @@ declare const Switch: typeof DecoratableSwitch & {
|
|
|
22
22
|
displayName: string;
|
|
23
23
|
}>) => (props: unknown) => React.JSX.Element;
|
|
24
24
|
};
|
|
25
|
-
export { Switch };
|
|
25
|
+
export { Switch, type SwitchProps };
|
package/Switch/Switch.js
CHANGED
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import react, { useMemo } from "react";
|
|
2
|
-
import { makeDecoratable } from "../utils.js";
|
|
2
|
+
import { generateId, makeDecoratable } from "../utils.js";
|
|
3
3
|
import { SwitchPrimitive } from "./primitives/index.js";
|
|
4
|
-
import { FormComponentErrorMessage, FormComponentNote } from "../FormComponent/index.js";
|
|
5
|
-
const DecoratableSwitch = ({ note, validation, ...props })=>{
|
|
4
|
+
import { FormComponentDescription, FormComponentErrorMessage, FormComponentLabel, FormComponentNote } from "../FormComponent/index.js";
|
|
5
|
+
const DecoratableSwitch = ({ label, description, hint, note, required, disabled, validation, ...props })=>{
|
|
6
6
|
const { isValid: validationIsValid, message: validationMessage } = validation || {};
|
|
7
|
+
const id = useMemo(()=>generateId(props.id), [
|
|
8
|
+
props.id
|
|
9
|
+
]);
|
|
7
10
|
const invalid = useMemo(()=>false === validationIsValid, [
|
|
8
11
|
validationIsValid
|
|
9
12
|
]);
|
|
10
13
|
return /*#__PURE__*/ react.createElement("div", {
|
|
11
14
|
className: "w-full"
|
|
12
|
-
}, /*#__PURE__*/ react.createElement(
|
|
15
|
+
}, /*#__PURE__*/ react.createElement(FormComponentLabel, {
|
|
16
|
+
htmlFor: id,
|
|
17
|
+
text: label,
|
|
18
|
+
required: required,
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
invalid: invalid,
|
|
21
|
+
hint: hint
|
|
22
|
+
}), /*#__PURE__*/ react.createElement(FormComponentDescription, {
|
|
23
|
+
text: description,
|
|
24
|
+
disabled: disabled
|
|
25
|
+
}), /*#__PURE__*/ react.createElement(SwitchPrimitive, {
|
|
13
26
|
...props,
|
|
14
|
-
|
|
27
|
+
id: id,
|
|
28
|
+
disabled: disabled
|
|
15
29
|
}), /*#__PURE__*/ react.createElement(FormComponentErrorMessage, {
|
|
16
30
|
text: validationMessage,
|
|
17
31
|
invalid: invalid,
|
|
18
|
-
disabled:
|
|
32
|
+
disabled: disabled
|
|
19
33
|
}), /*#__PURE__*/ react.createElement(FormComponentNote, {
|
|
20
34
|
text: note,
|
|
21
|
-
disabled:
|
|
35
|
+
disabled: disabled
|
|
22
36
|
}));
|
|
23
37
|
};
|
|
24
38
|
const Switch = makeDecoratable("Switch", DecoratableSwitch);
|
package/Switch/Switch.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch/Switch.js","sources":["../../src/Switch/Switch.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { makeDecoratable } from \"~/utils.js\";\nimport type { SwitchPrimitiveProps } from \"./primitives/index.js\";\nimport { SwitchPrimitive } from \"./primitives/index.js\";\nimport
|
|
1
|
+
{"version":3,"file":"Switch/Switch.js","sources":["../../src/Switch/Switch.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { generateId, makeDecoratable } from \"~/utils.js\";\nimport type { SwitchPrimitiveProps } from \"./primitives/index.js\";\nimport { SwitchPrimitive } from \"./primitives/index.js\";\nimport {\n FormComponentDescription,\n FormComponentErrorMessage,\n FormComponentLabel,\n FormComponentNote,\n type FormComponentProps\n} from \"~/FormComponent/index.js\";\n\ntype SwitchProps = Omit<SwitchPrimitiveProps, \"label\"> & FormComponentProps;\n\nconst DecoratableSwitch = ({\n label,\n description,\n hint,\n note,\n required,\n disabled,\n validation,\n ...props\n}: SwitchProps) => {\n const { isValid: validationIsValid, message: validationMessage } = validation || {};\n const id = useMemo(() => generateId(props.id), [props.id]);\n const invalid = useMemo(() => validationIsValid === false, [validationIsValid]);\n\n return (\n <div className={\"w-full\"}>\n <FormComponentLabel\n htmlFor={id}\n text={label}\n required={required}\n disabled={disabled}\n invalid={invalid}\n hint={hint}\n />\n <FormComponentDescription text={description} disabled={disabled} />\n <SwitchPrimitive {...props} id={id} disabled={disabled} />\n <FormComponentErrorMessage\n text={validationMessage}\n invalid={invalid}\n disabled={disabled}\n />\n <FormComponentNote text={note} disabled={disabled} />\n </div>\n );\n};\n\nconst Switch = makeDecoratable(\"Switch\", DecoratableSwitch);\n\nexport { Switch, type SwitchProps };\n"],"names":["DecoratableSwitch","label","description","hint","note","required","disabled","validation","props","validationIsValid","validationMessage","id","useMemo","generateId","invalid","FormComponentLabel","FormComponentDescription","SwitchPrimitive","FormComponentErrorMessage","FormComponentNote","Switch","makeDecoratable"],"mappings":";;;;AAcA,MAAMA,oBAAoB,CAAC,EACvBC,KAAK,EACLC,WAAW,EACXC,IAAI,EACJC,IAAI,EACJC,QAAQ,EACRC,QAAQ,EACRC,UAAU,EACV,GAAGC,OACO;IACV,MAAM,EAAE,SAASC,iBAAiB,EAAE,SAASC,iBAAiB,EAAE,GAAGH,cAAc,CAAC;IAClF,MAAMI,KAAKC,QAAQ,IAAMC,WAAWL,MAAM,EAAE,GAAG;QAACA,MAAM,EAAE;KAAC;IACzD,MAAMM,UAAUF,QAAQ,IAAMH,AAAsB,UAAtBA,mBAA6B;QAACA;KAAkB;IAE9E,OAAO,WAAP,GACI,oBAAC;QAAI,WAAW;qBACZ,oBAACM,oBAAkBA;QACf,SAASJ;QACT,MAAMV;QACN,UAAUI;QACV,UAAUC;QACV,SAASQ;QACT,MAAMX;sBAEV,oBAACa,0BAAwBA;QAAC,MAAMd;QAAa,UAAUI;sBACvD,oBAACW,iBAAeA;QAAE,GAAGT,KAAK;QAAE,IAAIG;QAAI,UAAUL;sBAC9C,oBAACY,2BAAyBA;QACtB,MAAMR;QACN,SAASI;QACT,UAAUR;sBAEd,oBAACa,mBAAiBA;QAAC,MAAMf;QAAM,UAAUE;;AAGrD;AAEA,MAAMc,SAASC,gBAAgB,UAAUrB"}
|
|
@@ -18,7 +18,7 @@ const SwitchRenderer = ({ id, label, changeChecked, description, className, labe
|
|
|
18
18
|
className: cn(switchVariants({
|
|
19
19
|
labelPosition
|
|
20
20
|
}), className)
|
|
21
|
-
}, /*#__PURE__*/ __rspack_external_react.createElement(Label, {
|
|
21
|
+
}, label && /*#__PURE__*/ __rspack_external_react.createElement(Label, {
|
|
22
22
|
htmlFor: id,
|
|
23
23
|
text: label,
|
|
24
24
|
disabled: disabled,
|
|
@@ -30,10 +30,11 @@ const SwitchRenderer = ({ id, label, changeChecked, description, className, labe
|
|
|
30
30
|
id: id,
|
|
31
31
|
checked: checked,
|
|
32
32
|
className: cn([
|
|
33
|
-
"peer inline-flex h-md w-[26px]
|
|
33
|
+
"peer inline-flex h-md w-[26px] shrink-0 cursor-pointer items-center rounded-xxl border-sm transition-colors",
|
|
34
34
|
"border-transparent data-[state=checked]:bg-secondary data-[state=unchecked]:bg-neutral-strong",
|
|
35
35
|
"focus-visible:outline-none focus-visible:border-success focus-visible:ring-lg focus-visible:ring-primary-dimmed",
|
|
36
|
-
"disabled:cursor-not-allowed disabled:bg-neutral-muted disabled:data-[state=checked]:bg-neutral-muted"
|
|
36
|
+
"disabled:cursor-not-allowed disabled:bg-neutral-muted disabled:data-[state=checked]:bg-neutral-muted",
|
|
37
|
+
label && "mt-xxs"
|
|
37
38
|
]),
|
|
38
39
|
disabled: disabled,
|
|
39
40
|
onCheckedChange: changeChecked
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch/primitives/SwitchPrimitive.js","sources":["../../../src/Switch/primitives/SwitchPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Switch as SwitchPrimitives } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { Label } from \"~/Label/index.js\";\nimport { useSwitch } from \"./useSwitch.js\";\nimport type { SwitchItemDto, SwitchItemFormatted } from \"../domains/index.js\";\n\n/**\n * Switch Renderer\n */\n\nconst switchVariants = cva(\"inline-flex items-start space-x-sm\", {\n variants: {\n labelPosition: {\n start: \"\",\n end: \"flex-row-reverse space-x-sm-extra space-x-reverse\"\n }\n },\n defaultVariants: {\n labelPosition: \"start\"\n }\n});\n\ntype SwitchPrimitiveProps = Omit<\n SwitchPrimitives.SwitchProps,\n \"defaultChecked\" | \"onCheckedChange\" | \"onChange\"\n> &\n VariantProps<typeof switchVariants> &\n SwitchItemDto & {\n onChange?: (checked: boolean) => void;\n };\n\ntype SwitchPrimitivVm = {\n item?: SwitchItemFormatted;\n};\n\ntype SwitchRendererProps = Omit<SwitchPrimitiveProps, \"onCheckedChange\"> &\n NonNullable<SwitchPrimitivVm[\"item\"]> & {\n changeChecked: (checked: boolean) => void;\n description?: React.ReactNode;\n };\n\nconst SwitchRenderer = ({\n id,\n label,\n changeChecked,\n description,\n className,\n labelPosition,\n disabled,\n required,\n checked\n}: SwitchRendererProps) => {\n return (\n <div className={cn(switchVariants({ labelPosition }), className)}>\n <Label\n
|
|
1
|
+
{"version":3,"file":"Switch/primitives/SwitchPrimitive.js","sources":["../../../src/Switch/primitives/SwitchPrimitive.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { Switch as SwitchPrimitives } from \"radix-ui\";\nimport { cn, cva, makeDecoratable, type VariantProps } from \"~/utils.js\";\nimport { Label } from \"~/Label/index.js\";\nimport { useSwitch } from \"./useSwitch.js\";\nimport type { SwitchItemDto, SwitchItemFormatted } from \"../domains/index.js\";\n\n/**\n * Switch Renderer\n */\n\nconst switchVariants = cva(\"inline-flex items-start space-x-sm\", {\n variants: {\n labelPosition: {\n start: \"\",\n end: \"flex-row-reverse space-x-sm-extra space-x-reverse\"\n }\n },\n defaultVariants: {\n labelPosition: \"start\"\n }\n});\n\ntype SwitchPrimitiveProps = Omit<\n SwitchPrimitives.SwitchProps,\n \"defaultChecked\" | \"onCheckedChange\" | \"onChange\"\n> &\n VariantProps<typeof switchVariants> &\n SwitchItemDto & {\n onChange?: (checked: boolean) => void;\n };\n\ntype SwitchPrimitivVm = {\n item?: SwitchItemFormatted;\n};\n\ntype SwitchRendererProps = Omit<SwitchPrimitiveProps, \"onCheckedChange\"> &\n NonNullable<SwitchPrimitivVm[\"item\"]> & {\n changeChecked: (checked: boolean) => void;\n description?: React.ReactNode;\n };\n\nconst SwitchRenderer = ({\n id,\n label,\n changeChecked,\n description,\n className,\n labelPosition,\n disabled,\n required,\n checked\n}: SwitchRendererProps) => {\n return (\n <div className={cn(switchVariants({ labelPosition }), className)}>\n {label && (\n <Label\n htmlFor={id}\n text={label}\n disabled={disabled}\n required={required}\n hint={description}\n weight={\"light\"}\n className={\"text-md\"}\n />\n )}\n <SwitchPrimitives.Root\n id={id}\n checked={checked}\n className={cn([\n \"peer inline-flex h-md w-[26px] shrink-0 cursor-pointer items-center rounded-xxl border-sm transition-colors\",\n \"border-transparent data-[state=checked]:bg-secondary data-[state=unchecked]:bg-neutral-strong\",\n \"focus-visible:outline-none focus-visible:border-success focus-visible:ring-lg focus-visible:ring-primary-dimmed\",\n \"disabled:cursor-not-allowed disabled:bg-neutral-muted disabled:data-[state=checked]:bg-neutral-muted\",\n // Nudges the switch down to line up with the inline label's text.\n label && \"mt-xxs\"\n ])}\n disabled={disabled}\n onCheckedChange={changeChecked}\n >\n <SwitchPrimitives.Thumb\n className={cn(\n \"pointer-events-none block h-sm-plus w-sm-plus rounded-xxl bg-neutral-base shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-sm-extra data-[state=unchecked]:translate-x-xxs\"\n )}\n />\n </SwitchPrimitives.Root>\n </div>\n );\n};\n\n/**\n * Switch\n */\nconst DecoratableSwitchPrimitive = (props: SwitchPrimitiveProps) => {\n const { vm, changeChecked } = useSwitch(props);\n\n if (!vm.item) {\n return null;\n }\n\n return <SwitchRenderer {...props} {...vm.item} changeChecked={changeChecked} />;\n};\nconst SwitchPrimitive = makeDecoratable(\"SwitchPrimitive\", DecoratableSwitchPrimitive);\n\nexport { SwitchPrimitive, type SwitchPrimitiveProps, type SwitchPrimitivVm };\n"],"names":["switchVariants","cva","SwitchRenderer","id","label","changeChecked","description","className","labelPosition","disabled","required","checked","cn","Label","SwitchPrimitives","DecoratableSwitchPrimitive","props","vm","useSwitch","SwitchPrimitive","makeDecoratable"],"mappings":";;;;;AAWA,MAAMA,iBAAiBC,IAAI,sCAAsC;IAC7D,UAAU;QACN,eAAe;YACX,OAAO;YACP,KAAK;QACT;IACJ;IACA,iBAAiB;QACb,eAAe;IACnB;AACJ;AAqBA,MAAMC,iBAAiB,CAAC,EACpBC,EAAE,EACFC,KAAK,EACLC,aAAa,EACbC,WAAW,EACXC,SAAS,EACTC,aAAa,EACbC,QAAQ,EACRC,QAAQ,EACRC,OAAO,EACW,GACX,WAAP,GACI,sCAAC;QAAI,WAAWC,GAAGZ,eAAe;YAAEQ;QAAc,IAAID;OACjDH,SAAS,WAATA,GACG,sCAACS,OAAKA;QACF,SAASV;QACT,MAAMC;QACN,UAAUK;QACV,UAAUC;QACV,MAAMJ;QACN,QAAQ;QACR,WAAW;sBAGnB,sCAACQ,OAAAA,IAAqB;QAClB,IAAIX;QACJ,SAASQ;QACT,WAAWC,GAAG;YACV;YACA;YACA;YACA;YAEAR,SAAS;SACZ;QACD,UAAUK;QACV,iBAAiBJ;qBAEjB,sCAACS,OAAAA,KAAsB;QACnB,WAAWF,GACP;;AAWxB,MAAMG,6BAA6B,CAACC;IAChC,MAAM,EAAEC,EAAE,EAAEZ,aAAa,EAAE,GAAGa,UAAUF;IAExC,IAAI,CAACC,GAAG,IAAI,EACR,OAAO;IAGX,OAAO,WAAP,GAAO,sCAACf,gBAAcA;QAAE,GAAGc,KAAK;QAAG,GAAGC,GAAG,IAAI;QAAE,eAAeZ;;AAClE;AACA,MAAMc,kBAAkBC,gBAAgB,mBAAmBL"}
|
package/Tabs/Tabs.d.ts
CHANGED
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Tabs as TabsPrimitive } from "radix-ui";
|
|
3
3
|
import { type VariantProps } from "../utils.js";
|
|
4
|
-
import type { TabProps
|
|
4
|
+
import type { TabProps } from "./components/index.js";
|
|
5
|
+
import { tabListVariants } from "./components/index.js";
|
|
5
6
|
interface TabsProps extends Omit<TabsPrimitive.TabsProps, "children"> {
|
|
6
7
|
tabs: React.ReactElement<TabProps>[];
|
|
7
8
|
size?: VariantProps<typeof tabListVariants>["size"];
|
|
8
9
|
spacing?: VariantProps<typeof tabListVariants>["spacing"];
|
|
9
10
|
separator?: VariantProps<typeof tabListVariants>["separator"];
|
|
10
11
|
loading?: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* Controls rendered at the end of the tab row, e.g. a filter checkbox or a button.
|
|
14
|
+
*/
|
|
15
|
+
actions?: React.ReactNode;
|
|
11
16
|
}
|
|
12
|
-
declare const DecoratableTabs: ({ defaultValue: initialValue, size, spacing, separator, loading, tabs: tabComponents, ...props }: TabsProps) => React.JSX.Element;
|
|
17
|
+
declare const DecoratableTabs: ({ defaultValue: initialValue, size, spacing, separator, loading, actions, tabs: tabComponents, ...props }: TabsProps) => React.JSX.Element;
|
|
13
18
|
declare const Tabs: typeof DecoratableTabs & {
|
|
14
19
|
original: typeof DecoratableTabs;
|
|
15
20
|
originalName: string;
|
package/Tabs/Tabs.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
import react, { useMemo, useState } from "react";
|
|
2
2
|
import { Tabs } from "radix-ui";
|
|
3
|
-
import { makeDecoratable, withStaticProps } from "../utils.js";
|
|
4
|
-
import { Content, List, Tab, TabsContext, Trigger } from "./components/index.js";
|
|
3
|
+
import { cn, makeDecoratable, withStaticProps } from "../utils.js";
|
|
4
|
+
import { Content, List, Tab, TabsContext, Trigger, tabListVariants } from "./components/index.js";
|
|
5
5
|
const Root = Tabs.Root;
|
|
6
|
-
const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator, loading, tabs: tabComponents, ...props })=>{
|
|
6
|
+
const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator, loading, actions, tabs: tabComponents, ...props })=>{
|
|
7
7
|
const [tabs, setTabs] = useState([]);
|
|
8
8
|
const defaultValue = useMemo(()=>initialValue || tabComponents.find((tab)=>!tab.props.disabled && false !== tab.props.visible)?.props.value, [
|
|
9
9
|
initialValue,
|
|
10
10
|
tabComponents
|
|
11
11
|
]);
|
|
12
|
-
const triggers = useMemo(()
|
|
13
|
-
|
|
14
|
-
size: size,
|
|
15
|
-
spacing: spacing,
|
|
16
|
-
separator: separator
|
|
17
|
-
}, tabs.map((tab)=>/*#__PURE__*/ react.createElement(Trigger, {
|
|
12
|
+
const triggers = useMemo(()=>{
|
|
13
|
+
const triggerList = tabs.map((tab)=>/*#__PURE__*/ react.createElement(Trigger, {
|
|
18
14
|
"data-testid": tab["data-testid"],
|
|
19
15
|
disabled: tab.disabled,
|
|
20
16
|
icon: tab.icon,
|
|
@@ -24,12 +20,34 @@ const DecoratableTabs = ({ defaultValue: initialValue, size, spacing, separator,
|
|
|
24
20
|
text: tab.trigger,
|
|
25
21
|
value: tab.value,
|
|
26
22
|
visible: tab.visible
|
|
27
|
-
}))
|
|
23
|
+
}));
|
|
24
|
+
const listKey = tabs.map((tab)=>tab.id).join(";");
|
|
25
|
+
if (!actions) return /*#__PURE__*/ react.createElement(List, {
|
|
26
|
+
key: listKey,
|
|
27
|
+
size: size,
|
|
28
|
+
spacing: spacing,
|
|
29
|
+
separator: separator
|
|
30
|
+
}, triggerList);
|
|
31
|
+
return /*#__PURE__*/ react.createElement("div", {
|
|
32
|
+
className: cn(tabListVariants({
|
|
33
|
+
size,
|
|
34
|
+
spacing,
|
|
35
|
+
separator
|
|
36
|
+
}))
|
|
37
|
+
}, /*#__PURE__*/ react.createElement(List, {
|
|
38
|
+
key: listKey,
|
|
39
|
+
size: size,
|
|
40
|
+
className: "w-auto"
|
|
41
|
+
}, triggerList), /*#__PURE__*/ react.createElement("div", {
|
|
42
|
+
className: "ml-auto flex items-center gap-sm"
|
|
43
|
+
}, actions));
|
|
44
|
+
}, [
|
|
28
45
|
tabs,
|
|
29
46
|
size,
|
|
30
47
|
spacing,
|
|
31
48
|
separator,
|
|
32
|
-
loading
|
|
49
|
+
loading,
|
|
50
|
+
actions
|
|
33
51
|
]);
|
|
34
52
|
const contents = useMemo(()=>tabs.map((tab)=>/*#__PURE__*/ react.createElement(Content, {
|
|
35
53
|
key: tab.id,
|
package/Tabs/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps
|
|
1
|
+
{"version":3,"file":"Tabs/Tabs.js","sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import React, { useMemo, useState } from \"react\";\nimport { Tabs as TabsPrimitive } from \"radix-ui\";\nimport { cn, makeDecoratable, type VariantProps, withStaticProps } from \"~/utils.js\";\nimport type { ITabsContext, TabItem, TabProps } from \"./components/index.js\";\nimport { Content, List, Tab, TabsContext, Trigger, tabListVariants } from \"./components/index.js\";\n\nconst Root = TabsPrimitive.Root;\n\ninterface TabsProps extends Omit<TabsPrimitive.TabsProps, \"children\"> {\n tabs: React.ReactElement<TabProps>[];\n size?: VariantProps<typeof tabListVariants>[\"size\"];\n spacing?: VariantProps<typeof tabListVariants>[\"spacing\"];\n separator?: VariantProps<typeof tabListVariants>[\"separator\"];\n loading?: boolean;\n /**\n * Controls rendered at the end of the tab row, e.g. a filter checkbox or a button.\n */\n actions?: React.ReactNode;\n}\n\nconst DecoratableTabs = ({\n defaultValue: initialValue,\n size,\n spacing,\n separator,\n loading,\n actions,\n tabs: tabComponents,\n ...props\n}: TabsProps) => {\n const [tabs, setTabs] = useState<TabItem[]>([]);\n\n const defaultValue = useMemo(() => {\n return (\n initialValue ||\n tabComponents.find(tab => !tab.props.disabled && tab.props.visible !== false)?.props\n .value\n );\n }, [initialValue, tabComponents]);\n\n const triggers = useMemo(() => {\n const triggerList = tabs.map(tab => (\n <Trigger\n data-testid={tab[\"data-testid\"]}\n disabled={tab.disabled}\n icon={tab.icon}\n key={tab.id}\n loading={loading}\n size={size}\n text={tab.trigger}\n value={tab.value}\n visible={tab.visible}\n />\n ));\n const listKey = tabs.map(tab => tab.id).join(\";\");\n\n if (!actions) {\n return (\n <List key={listKey} size={size} spacing={spacing} separator={separator}>\n {triggerList}\n </List>\n );\n }\n\n // Actions sit outside the tablist, so arrow keys only move between tabs.\n return (\n <div className={cn(tabListVariants({ size, spacing, separator }))}>\n <List key={listKey} size={size} className={\"w-auto\"}>\n {triggerList}\n </List>\n <div className={\"ml-auto flex items-center gap-sm\"}>{actions}</div>\n </div>\n );\n }, [tabs, size, spacing, separator, loading, actions]);\n\n const contents = useMemo(\n () =>\n tabs.map(tab => (\n <Content\n key={tab.id}\n value={tab.value}\n content={tab.content}\n spacing={tab.spacing ?? spacing}\n className={tab.className}\n />\n )),\n [tabs, spacing]\n );\n\n const context: ITabsContext = useMemo(\n () => ({\n addTab(props) {\n setTabs(tabs => {\n const existingIndex = tabs.findIndex(tab => tab.value === props.value);\n if (existingIndex > -1) {\n return [\n ...tabs.slice(0, existingIndex),\n props,\n ...tabs.slice(existingIndex + 1)\n ];\n }\n return [...tabs, props];\n });\n },\n removeTab(id) {\n setTabs(tabs => tabs.filter(tab => tab.id !== id));\n }\n }),\n [setTabs]\n );\n\n return (\n <Root {...props} defaultValue={defaultValue}>\n {triggers}\n {contents}\n <TabsContext.Provider value={context}>{tabComponents}</TabsContext.Provider>\n </Root>\n );\n};\n\nconst BaseTabs = makeDecoratable(\"Tabs\", DecoratableTabs);\n\nconst Tabs = withStaticProps(BaseTabs, {\n Tab\n});\n\nexport { Tabs, type TabsProps };\n"],"names":["Root","TabsPrimitive","DecoratableTabs","initialValue","size","spacing","separator","loading","actions","tabComponents","props","tabs","setTabs","useState","defaultValue","useMemo","tab","triggers","triggerList","Trigger","listKey","List","cn","tabListVariants","contents","Content","context","existingIndex","id","TabsContext","BaseTabs","makeDecoratable","Tabs","withStaticProps","Tab"],"mappings":";;;;AAMA,MAAMA,OAAOC,KAAAA,IAAkB;AAc/B,MAAMC,kBAAkB,CAAC,EACrB,cAAcC,YAAY,EAC1BC,IAAI,EACJC,OAAO,EACPC,SAAS,EACTC,OAAO,EACPC,OAAO,EACP,MAAMC,aAAa,EACnB,GAAGC,OACK;IACR,MAAM,CAACC,MAAMC,QAAQ,GAAGC,SAAoB,EAAE;IAE9C,MAAMC,eAAeC,QAAQ,IAErBZ,gBACAM,cAAc,IAAI,CAACO,CAAAA,MAAO,CAACA,IAAI,KAAK,CAAC,QAAQ,IAAIA,AAAsB,UAAtBA,IAAI,KAAK,CAAC,OAAO,GAAa,MAC1E,OAEV;QAACb;QAAcM;KAAc;IAEhC,MAAMQ,WAAWF,QAAQ;QACrB,MAAMG,cAAcP,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACzB,oBAACG,SAAOA;gBACJ,eAAaH,GAAG,CAAC,cAAc;gBAC/B,UAAUA,IAAI,QAAQ;gBACtB,MAAMA,IAAI,IAAI;gBACd,KAAKA,IAAI,EAAE;gBACX,SAAST;gBACT,MAAMH;gBACN,MAAMY,IAAI,OAAO;gBACjB,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;;QAG5B,MAAMI,UAAUT,KAAK,GAAG,CAACK,CAAAA,MAAOA,IAAI,EAAE,EAAE,IAAI,CAAC;QAE7C,IAAI,CAACR,SACD,OAAO,WAAP,GACI,oBAACa,MAAIA;YAAC,KAAKD;YAAS,MAAMhB;YAAM,SAASC;YAAS,WAAWC;WACxDY;QAMb,OAAO,WAAP,GACI,oBAAC;YAAI,WAAWI,GAAGC,gBAAgB;gBAAEnB;gBAAMC;gBAASC;YAAU;yBAC1D,oBAACe,MAAIA;YAAC,KAAKD;YAAS,MAAMhB;YAAM,WAAW;WACtCc,cAAAA,WAAAA,GAEL,oBAAC;YAAI,WAAW;WAAqCV;IAGjE,GAAG;QAACG;QAAMP;QAAMC;QAASC;QAAWC;QAASC;KAAQ;IAErD,MAAMgB,WAAWT,QACb,IACIJ,KAAK,GAAG,CAACK,CAAAA,MAAAA,WAAAA,GACL,oBAACS,SAAOA;gBACJ,KAAKT,IAAI,EAAE;gBACX,OAAOA,IAAI,KAAK;gBAChB,SAASA,IAAI,OAAO;gBACpB,SAASA,IAAI,OAAO,IAAIX;gBACxB,WAAWW,IAAI,SAAS;iBAGpC;QAACL;QAAMN;KAAQ;IAGnB,MAAMqB,UAAwBX,QAC1B,IAAO;YACH,QAAOL,KAAK;gBACRE,QAAQD,CAAAA;oBACJ,MAAMgB,gBAAgBhB,KAAK,SAAS,CAACK,CAAAA,MAAOA,IAAI,KAAK,KAAKN,MAAM,KAAK;oBACrE,IAAIiB,gBAAgB,IAChB,OAAO;2BACAhB,KAAK,KAAK,CAAC,GAAGgB;wBACjBjB;2BACGC,KAAK,KAAK,CAACgB,gBAAgB;qBACjC;oBAEL,OAAO;2BAAIhB;wBAAMD;qBAAM;gBAC3B;YACJ;YACA,WAAUkB,EAAE;gBACRhB,QAAQD,CAAAA,OAAQA,KAAK,MAAM,CAACK,CAAAA,MAAOA,IAAI,EAAE,KAAKY;YAClD;QACJ,IACA;QAAChB;KAAQ;IAGb,OAAO,WAAP,GACI,oBAACZ,MAAIA;QAAE,GAAGU,KAAK;QAAE,cAAcI;OAC1BG,UACAO,UAAAA,WAAAA,GACD,oBAACK,YAAY,QAAQ;QAAC,OAAOH;OAAUjB;AAGnD;AAEA,MAAMqB,WAAWC,gBAAgB,QAAQ7B;AAEzC,MAAM8B,YAAOC,gBAAgBH,UAAU;IACnCI,KAAGA;AACP"}
|
package/Tabs/Tabs.mdx
CHANGED
|
@@ -385,6 +385,33 @@ const [value, setValue] = useState("password");
|
|
|
385
385
|
export default WithControlledValueExample;
|
|
386
386
|
` } } />
|
|
387
387
|
|
|
388
|
+
### With Actions
|
|
389
|
+
|
|
390
|
+
Use `actions` to put controls at the end of the tab row, such as a filter checkbox or a button. They render outside the tab list, so arrow keys still move only between tabs.
|
|
391
|
+
|
|
392
|
+
<Canvas of={Tabs.WithActions} source={ { code: `
|
|
393
|
+
import React, { useState } from "react";
|
|
394
|
+
import { Checkbox, Tabs } from "@webiny/admin-ui";
|
|
395
|
+
|
|
396
|
+
const WithActionsExample = () => {
|
|
397
|
+
const [unreadOnly, setUnreadOnly] = useState(false);
|
|
398
|
+
|
|
399
|
+
return (
|
|
400
|
+
<Tabs
|
|
401
|
+
separator={true}
|
|
402
|
+
actions={<Checkbox label="Unread only" checked={unreadOnly} onChange={setUnreadOnly} />}
|
|
403
|
+
tabs={[
|
|
404
|
+
<Tabs.Tab key="inbox" value="inbox" trigger="Inbox" content="Inbox content" />,
|
|
405
|
+
<Tabs.Tab key="archive" value="archive" trigger="Archive" content="Archive content" />
|
|
406
|
+
]}
|
|
407
|
+
/>
|
|
408
|
+
);
|
|
409
|
+
|
|
410
|
+
};
|
|
411
|
+
|
|
412
|
+
export default WithActionsExample;
|
|
413
|
+
` } } />
|
|
414
|
+
|
|
388
415
|
### With Icons
|
|
389
416
|
|
|
390
417
|
<Canvas of={Tabs.WithIcons} source={ { code: `
|
package/Tabs/Tabs.stories.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare const SpacingDoubleExtraLarge: Story;
|
|
|
17
17
|
export declare const WithSeparator: Story;
|
|
18
18
|
export declare const WithDefaultValue: Story;
|
|
19
19
|
export declare const WithControlledValue: Story;
|
|
20
|
+
export declare const WithActions: Story;
|
|
20
21
|
export declare const WithIcons: Story;
|
|
21
22
|
export declare const WithDisabledTab: Story;
|
|
22
23
|
export declare const WithHiddenTab: Story;
|
package/Tabs/Tabs.stories.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import react, { useState } from "react";
|
|
2
2
|
import { ReactComponent } from "@webiny/icons/person.svg";
|
|
3
3
|
import { ReactComponent as lock_svg_ReactComponent } from "@webiny/icons/lock.svg";
|
|
4
|
+
import { Checkbox } from "../Checkbox/index.js";
|
|
4
5
|
import { Tabs } from "./Tabs.js";
|
|
5
6
|
const meta = {
|
|
6
7
|
title: "Components/Tabs",
|
|
@@ -114,6 +115,23 @@ const WithControlledValue = {
|
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
};
|
|
118
|
+
const WithActions = {
|
|
119
|
+
args: {
|
|
120
|
+
...Default.args,
|
|
121
|
+
separator: true
|
|
122
|
+
},
|
|
123
|
+
render: (args)=>{
|
|
124
|
+
const [unreadOnly, setUnreadOnly] = useState(false);
|
|
125
|
+
return /*#__PURE__*/ react.createElement(Tabs, {
|
|
126
|
+
...args,
|
|
127
|
+
actions: /*#__PURE__*/ react.createElement(Checkbox, {
|
|
128
|
+
label: "Unread only",
|
|
129
|
+
checked: unreadOnly,
|
|
130
|
+
onChange: setUnreadOnly
|
|
131
|
+
})
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
};
|
|
117
135
|
const WithIcons = {
|
|
118
136
|
args: {
|
|
119
137
|
...Default.args,
|
|
@@ -271,6 +289,6 @@ const Documentation = {
|
|
|
271
289
|
}
|
|
272
290
|
};
|
|
273
291
|
export default Tabs_stories;
|
|
274
|
-
export { Default, Documentation, SizeExtraLarge, SizeLarge, SizeMedium, SizeSmall, SpacingDoubleExtraLarge, SpacingExtraLarge, SpacingExtraSmall, SpacingLarge, SpacingMedium, SpacingSmall, WithControlledValue, WithCustomTabSpacing, WithDefaultValue, WithDisabledTab, WithHiddenTab, WithIcons, WithSeparator };
|
|
292
|
+
export { Default, Documentation, SizeExtraLarge, SizeLarge, SizeMedium, SizeSmall, SpacingDoubleExtraLarge, SpacingExtraLarge, SpacingExtraSmall, SpacingLarge, SpacingMedium, SpacingSmall, WithActions, WithControlledValue, WithCustomTabSpacing, WithDefaultValue, WithDisabledTab, WithHiddenTab, WithIcons, WithSeparator };
|
|
275
293
|
|
|
276
294
|
//# sourceMappingURL=Tabs.stories.js.map
|
package/Tabs/Tabs.stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs/Tabs.stories.js","sources":["../../src/Tabs/Tabs.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as PersonIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as LockIcon } from \"@webiny/icons/lock.svg\";\nimport { Tabs } from \"./Tabs.js\";\n\nconst meta: Meta<typeof Tabs> = {\n title: \"Components/Tabs\",\n component: Tabs,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tabs>;\n\nexport const Default: Story = {\n args: {\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const SizeSmall: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const SizeMedium: Story = {\n args: {\n ...Default.args,\n size: \"md\"\n }\n};\n\nexport const SizeLarge: Story = {\n args: {\n ...Default.args,\n size: \"lg\"\n }\n};\n\nexport const SizeExtraLarge: Story = {\n args: {\n ...Default.args,\n size: \"xl\"\n }\n};\n\nexport const SpacingExtraSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"xs\"\n }\n};\n\nexport const SpacingSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\"\n }\n};\n\nexport const SpacingMedium: Story = {\n args: {\n ...Default.args,\n spacing: \"md\"\n }\n};\n\nexport const SpacingLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"lg\"\n }\n};\n\nexport const SpacingExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xl\"\n }\n};\n\nexport const SpacingDoubleExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xxl\"\n }\n};\n\nexport const WithSeparator: Story = {\n args: {\n ...Default.args,\n separator: true\n }\n};\n\nexport const WithDefaultValue: Story = {\n args: {\n ...Default.args,\n defaultValue: \"password\"\n }\n};\n\nexport const WithControlledValue: Story = {\n args: {\n ...Default.args,\n value: \"password\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Tabs {...args} value={value} onValueChange={setValue} />;\n }\n};\n\nexport const WithIcons: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n icon={<PersonIcon />}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n icon={<LockIcon />}\n />\n ]\n }\n};\n\nexport const WithDisabledTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n disabled={true}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithHiddenTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n visible={false}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithCustomTabSpacing: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Tab with custom spacing XXL - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n spacing={\"xxl\"}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Tab with inherited spacing - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\n// Update the Documentation story to properly handle control changes\nexport const Documentation: Story = {\n render: args => {\n // Force re-render when args change by using a key\n return <Tabs key={JSON.stringify(args)} {...args} />;\n },\n args: {\n size: \"md\",\n spacing: \"lg\",\n separator: true,\n defaultValue: \"account\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - This tab contains account settings and personal information. Users can update their profile details, change email address, and manage notification preferences.\"\n }\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\n \"Security content - This tab contains security settings. Users can change their password, enable two-factor authentication, and review recent account activity.\"\n }\n />,\n <Tabs.Tab\n key={\"preferences\"}\n value={\"preferences\"}\n trigger={\"Preferences\"}\n content={\n \"Preferences content - This tab contains user preferences. Users can customize the interface, set language preferences, and configure other application settings.\"\n }\n />\n ],\n value: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the tabs\",\n control: \"select\",\n options: [\"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"md\"\n },\n spacing: {\n description: \"Spacing around the tabs and content\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"],\n defaultValue: \"lg\"\n },\n separator: {\n description:\n \"Whether to show a separator line below the tabs, by default it's `false`.\",\n control: \"boolean\",\n defaultValue: false\n },\n defaultValue: {\n description: \"The value of the tab that should be active by default\",\n control: \"text\"\n },\n value: {\n description:\n \"The controlled value of the active tab, please refer to the example code for details.\"\n },\n tabs: {\n description: \"The tabs to render, please refer to the example code for details.\"\n }\n }\n};\n"],"names":["meta","Tabs","Default","SizeSmall","SizeMedium","SizeLarge","SizeExtraLarge","SpacingExtraSmall","SpacingSmall","SpacingMedium","SpacingLarge","SpacingExtraLarge","SpacingDoubleExtraLarge","WithSeparator","WithDefaultValue","WithControlledValue","args","value","setValue","useState","WithIcons","PersonIcon","LockIcon","WithDisabledTab","WithHiddenTab","WithCustomTabSpacing","Documentation","JSON","undefined"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Tabs/Tabs.stories.js","sources":["../../src/Tabs/Tabs.stories.tsx"],"sourcesContent":["import React, { useState } from \"react\";\nimport type { Meta, StoryObj } from \"@storybook/react\";\nimport { ReactComponent as PersonIcon } from \"@webiny/icons/person.svg\";\nimport { ReactComponent as LockIcon } from \"@webiny/icons/lock.svg\";\nimport { Checkbox } from \"~/Checkbox/index.js\";\nimport { Tabs } from \"./Tabs.js\";\n\nconst meta: Meta<typeof Tabs> = {\n title: \"Components/Tabs\",\n component: Tabs,\n parameters: {\n layout: \"padded\"\n }\n};\n\nexport default meta;\ntype Story = StoryObj<typeof Tabs>;\n\nexport const Default: Story = {\n args: {\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const SizeSmall: Story = {\n args: {\n ...Default.args,\n size: \"sm\"\n }\n};\n\nexport const SizeMedium: Story = {\n args: {\n ...Default.args,\n size: \"md\"\n }\n};\n\nexport const SizeLarge: Story = {\n args: {\n ...Default.args,\n size: \"lg\"\n }\n};\n\nexport const SizeExtraLarge: Story = {\n args: {\n ...Default.args,\n size: \"xl\"\n }\n};\n\nexport const SpacingExtraSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"xs\"\n }\n};\n\nexport const SpacingSmall: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\"\n }\n};\n\nexport const SpacingMedium: Story = {\n args: {\n ...Default.args,\n spacing: \"md\"\n }\n};\n\nexport const SpacingLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"lg\"\n }\n};\n\nexport const SpacingExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xl\"\n }\n};\n\nexport const SpacingDoubleExtraLarge: Story = {\n args: {\n ...Default.args,\n spacing: \"xxl\"\n }\n};\n\nexport const WithSeparator: Story = {\n args: {\n ...Default.args,\n separator: true\n }\n};\n\nexport const WithDefaultValue: Story = {\n args: {\n ...Default.args,\n defaultValue: \"password\"\n }\n};\n\nexport const WithControlledValue: Story = {\n args: {\n ...Default.args,\n value: \"password\"\n },\n render: args => {\n const [value, setValue] = useState(args.value);\n return <Tabs {...args} value={value} onValueChange={setValue} />;\n }\n};\n\nexport const WithActions: Story = {\n args: {\n ...Default.args,\n separator: true\n },\n render: args => {\n const [unreadOnly, setUnreadOnly] = useState(false);\n return (\n <Tabs\n {...args}\n actions={\n <Checkbox label=\"Unread only\" checked={unreadOnly} onChange={setUnreadOnly} />\n }\n />\n );\n }\n};\n\nexport const WithIcons: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n icon={<PersonIcon />}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n icon={<LockIcon />}\n />\n ]\n }\n};\n\nexport const WithDisabledTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n disabled={true}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithHiddenTab: Story = {\n args: {\n ...Default.args,\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n visible={false}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\nexport const WithCustomTabSpacing: Story = {\n args: {\n ...Default.args,\n spacing: \"sm\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Tab with custom spacing XXL - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum.\"\n }\n spacing={\"xxl\"}\n />,\n <Tabs.Tab\n key={\"password\"}\n value={\"password\"}\n trigger={\"Password\"}\n content={\n \"Tab with inherited spacing - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla vel libero nec libero lacinia fermentum. Nullam nec nunc nec libero lacinia fermentum. \"\n }\n />\n ]\n }\n};\n\n// Update the Documentation story to properly handle control changes\nexport const Documentation: Story = {\n render: args => {\n // Force re-render when args change by using a key\n return <Tabs key={JSON.stringify(args)} {...args} />;\n },\n args: {\n size: \"md\",\n spacing: \"lg\",\n separator: true,\n defaultValue: \"account\",\n tabs: [\n <Tabs.Tab\n key={\"account\"}\n value={\"account\"}\n trigger={\"Account\"}\n content={\n \"Account content - This tab contains account settings and personal information. Users can update their profile details, change email address, and manage notification preferences.\"\n }\n />,\n <Tabs.Tab\n key={\"security\"}\n value={\"security\"}\n trigger={\"Security\"}\n content={\n \"Security content - This tab contains security settings. Users can change their password, enable two-factor authentication, and review recent account activity.\"\n }\n />,\n <Tabs.Tab\n key={\"preferences\"}\n value={\"preferences\"}\n trigger={\"Preferences\"}\n content={\n \"Preferences content - This tab contains user preferences. Users can customize the interface, set language preferences, and configure other application settings.\"\n }\n />\n ],\n value: undefined\n },\n argTypes: {\n size: {\n description: \"Size of the tabs\",\n control: \"select\",\n options: [\"sm\", \"md\", \"lg\", \"xl\"],\n defaultValue: \"md\"\n },\n spacing: {\n description: \"Spacing around the tabs and content\",\n control: \"select\",\n options: [\"xs\", \"sm\", \"md\", \"lg\", \"xl\", \"xxl\"],\n defaultValue: \"lg\"\n },\n separator: {\n description:\n \"Whether to show a separator line below the tabs, by default it's `false`.\",\n control: \"boolean\",\n defaultValue: false\n },\n defaultValue: {\n description: \"The value of the tab that should be active by default\",\n control: \"text\"\n },\n value: {\n description:\n \"The controlled value of the active tab, please refer to the example code for details.\"\n },\n tabs: {\n description: \"The tabs to render, please refer to the example code for details.\"\n }\n }\n};\n"],"names":["meta","Tabs","Default","SizeSmall","SizeMedium","SizeLarge","SizeExtraLarge","SpacingExtraSmall","SpacingSmall","SpacingMedium","SpacingLarge","SpacingExtraLarge","SpacingDoubleExtraLarge","WithSeparator","WithDefaultValue","WithControlledValue","args","value","setValue","useState","WithActions","unreadOnly","setUnreadOnly","Checkbox","WithIcons","PersonIcon","LockIcon","WithDisabledTab","WithHiddenTab","WithCustomTabSpacing","Documentation","JSON","undefined"],"mappings":"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"}
|