@wix/design-system 1.192.0 → 1.194.0
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/dist/cjs/Accordion/Accordion.st.css.js +2 -2
- package/dist/cjs/Accordion/components/AccordionItem/AccordionItem.st.css.js +2 -2
- package/dist/cjs/Accordion/components/AccordionItemCaret/AccordionItemCaret.st.css.js +2 -2
- package/dist/cjs/AddItem/AddItem.st.css.js +2 -2
- package/dist/cjs/AddressInputItem/AddressInputItem.st.css.js +2 -2
- package/dist/cjs/AnalyticsLayout/AnalyticsLayout.st.css.js +2 -2
- package/dist/cjs/AnalyticsLayout/Cell/Cell.st.css.js +2 -2
- package/dist/cjs/AnalyticsSummaryCard/AnalyticsSummaryCard.st.css.js +2 -2
- package/dist/cjs/AngleInput/AngleInput.st.css.js +2 -2
- package/dist/cjs/AnnouncementModalLayout/AnnouncementModalLayout.st.css.js +2 -2
- package/dist/cjs/AreaChart/AreaChart.st.css.js +2 -2
- package/dist/cjs/AudioPlayer/AudioPlayer.st.css.js +3 -3
- package/dist/cjs/AutoCompleteWithLabel/AutoCompleteWithLabel.st.css.js +2 -2
- package/dist/cjs/Avatar/Avatar.st.css.js +2 -2
- package/dist/cjs/Avatar/AvatarCore/AvatarCore.st.css.js +2 -2
- package/dist/cjs/AvatarGroup/AvatarGroup.st.css.js +2 -2
- package/dist/cjs/Badge/Badge.st.css.js +2 -2
- package/dist/cjs/BadgeSelect/BadgeSelect.st.css.js +2 -2
- package/dist/cjs/BadgeSelectItem/BadgeSelectItem.st.css.js +2 -2
- package/dist/cjs/BarChart/BarChart.st.css.js +3 -3
- package/dist/cjs/BaseModalLayout/BaseModalLayout.st.css.js +2 -2
- package/dist/cjs/BaseModalLayout/LayoutBlocks/Content/Content.st.css.js +2 -2
- package/dist/cjs/BaseModalLayout/LayoutBlocks/Footer/Footer.st.css.js +2 -2
- package/dist/cjs/BaseModalLayout/LayoutBlocks/Footnote/Footnote.st.css.js +2 -2
- package/dist/cjs/BaseModalLayout/LayoutBlocks/Header/Header.st.css.js +2 -2
- package/dist/cjs/BaseModalLayout/LayoutBlocks/Illustration/Illustration.st.css.js +2 -2
- package/dist/cjs/BounceAnimation/BounceAnimation.st.css.js +3 -3
- package/dist/cjs/Box/Box.st.css.js +3 -3
- package/dist/cjs/Breadcrumbs/Breadcrumbs.st.css.js +2 -2
- package/dist/cjs/BrowserPreviewWidget/BrowserPreviewWidget.st.css.js +2 -2
- package/dist/cjs/Button/Button.st.css.js +2 -2
- package/dist/cjs/Button/ButtonCore/ButtonCore.st.css.js +2 -2
- package/dist/cjs/Calendar/BaseCalendar/BaseCalendar.st.css.js +2 -2
- package/dist/cjs/Calendar/Calendar.st.css.js +2 -2
- package/dist/cjs/Calendar/DatePickerDropdown/DatePickerDropdown.st.css.js +2 -2
- package/dist/cjs/Calendar/DatePickerHead/DatePickerHead.st.css.js +2 -2
- package/dist/cjs/Calendar/DatePickerHead/MonthDropdown/MonthDropdown.st.css.js +2 -2
- package/dist/cjs/Calendar/DatePickerHead/YearDropdown/YearDropdown.st.css.js +2 -2
- package/dist/cjs/CalendarPanel/CalendarPanel.st.css.js +2 -2
- package/dist/cjs/Card/Card.st.css.js +2 -2
- package/dist/cjs/Card/components/Content/Content.st.css.js +2 -2
- package/dist/cjs/Card/components/Header/Header.st.css.js +2 -2
- package/dist/cjs/Card/components/Subheader/Subheader.st.css.js +2 -2
- package/dist/cjs/CardFolderTabs/CardFolderTabs.st.css.js +3 -3
- package/dist/cjs/CardGalleryItem/CardGalleryItem.st.css.js +2 -2
- package/dist/cjs/Carousel/Carousel.st.css.js +3 -3
- package/dist/cjs/Carousel/Pagination/Pagination.st.css.js +2 -2
- package/dist/cjs/CarouselWIP/CarouselWIP.st.css.js +3 -3
- package/dist/cjs/CheckToggle/CheckToggle.st.css.js +2 -2
- package/dist/cjs/Checkbox/Checkbox.st.css.js +2 -2
- package/dist/cjs/CircularProgressBar/CircularProgressBar.st.css.js +2 -2
- package/dist/cjs/CircularProgressBar/CircularProgressBarCore/CircularProgressBarCore.st.css.js +2 -2
- package/dist/cjs/ClickableCard/ClickableCard.st.css.js +2 -2
- package/dist/cjs/CloseButton/CloseButton.st.css.js +2 -2
- package/dist/cjs/Collapse/Collapse.st.css.js +2 -2
- package/dist/cjs/ColorInput/components/ColorViewer.st.css.js +2 -2
- package/dist/cjs/ColorInput/components/Hash.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPicker.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPickerActions.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPickerConverter.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPickerHistory.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPickerHsb.st.css.js +2 -2
- package/dist/cjs/ColorPicker/ColorPickerHue.st.css.js +2 -2
- package/dist/cjs/ComposerButton/ComposerButton.st.css.js +2 -2
- package/dist/cjs/ComposerHeader/ComposerHeader.st.css.js +2 -2
- package/dist/cjs/ComposerSidebar/ComposerSidebar.st.css.js +2 -2
- package/dist/cjs/CornerRadiusInput/CornerRadiusInput.st.css.js +2 -2
- package/dist/cjs/CounterBadge/CounterBadge.st.css.js +2 -2
- package/dist/cjs/CustomModalLayout/CustomModalLayout.st.css.js +2 -2
- package/dist/cjs/DatePicker/DatePicker.st.css.js +2 -2
- package/dist/cjs/Divider/Divider.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/Introduction/IntroductionExample.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableGridBase/SingleAreaGrid/SingleAreaGrid.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/ListWithDelay/ListWithDelay.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/MultiAreaList/MultiAreaList.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/MultiAreaListPreventOfDropping/MultiAreaListPreventDropping.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/MultiAreaListWithInsertionRules/MultiAreaListWithInsertionRules.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/MultiAreaListWithSortableColumns/MultiAreaListWithSortableColumns.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/MultiAreaListWithSortableColumnsWithAnimations/MultiAreaListWithSortableColumnsWithAnimations.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/NestableListBaseExample/NestableListBase.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/SingleAreaList/SingleAreaList.st.css.js +2 -2
- package/dist/cjs/DragAndDrop/docs/SortableListBase/SingleAreaListWithAnimation/SingleAreaListWithAnimation.st.css.js +2 -2
- package/dist/cjs/DragHandle/DragHandle.st.css.js +2 -2
- package/dist/cjs/DraggableContainer/DraggableContainer.st.css.js +2 -2
- package/dist/cjs/Dropdown/Dropdown.st.css.js +2 -2
- package/dist/cjs/DropdownBase/DropdownBase.st.css.js +2 -2
- package/dist/cjs/DropdownLayout/DropdownLayout.st.css.js +2 -2
- package/dist/cjs/Dropzone/Dropzone.st.css.js +2 -2
- package/dist/cjs/EditableSelector/EditableSelector.st.css.js +2 -2
- package/dist/cjs/EditableTitle/EditableTitle.st.css.js +2 -2
- package/dist/cjs/EmptyState/EmptyState.st.css.js +2 -2
- package/dist/cjs/FacesRatingBar/FacesRatingBar.st.css.js +2 -2
- package/dist/cjs/FeatureList/FeatureList.st.css.js +2 -2
- package/dist/cjs/FieldSet/FieldSet.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/Asterisk/Asterisk.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/InfoContentIcon/InfoContentIcon.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/InlineLabelWrapper/InlineLabelWrapper.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/Label/Label.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/StatusMessage/StatusMessage.st.css.js +2 -2
- package/dist/cjs/FieldSet/components/Suffix/Suffix.st.css.js +2 -2
- package/dist/cjs/FilePicker/FilePicker.st.css.js +2 -2
- package/dist/cjs/FillButton/FillButton.st.css.js +2 -2
- package/dist/cjs/FillPreview/FillPreview.st.css.js +2 -2
- package/dist/cjs/FloatingHelper/FloatingHelper.st.css.js +2 -2
- package/dist/cjs/FloatingHelper/FloatingHelperContent/FloatingHelperContent.st.css.js +2 -2
- package/dist/cjs/FloatingNotification/FloatingNotification.st.css.js +2 -2
- package/dist/cjs/FormField/FormField.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/border.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/breakpoints.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/colors.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/default-scroll-bar.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/easing.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/gradients.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/opacity.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/shadows.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/spacing.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/typography.st.css.js +2 -2
- package/dist/cjs/Foundation/stylable/z-index.st.css.js +2 -2
- package/dist/cjs/FunnelChart/FunnelBadge/FunnelBadge.st.css.js +2 -2
- package/dist/cjs/FunnelChart/FunnelBar/FunnelBar.st.css.js +2 -2
- package/dist/cjs/FunnelChart/FunnelChart.st.css.js +2 -2
- package/dist/cjs/FunnelChart/FunnelLabel/FunnelLabel.st.css.js +2 -2
- package/dist/cjs/FunnelChart/FunnelStep/FunnelStep.st.css.js +2 -2
- package/dist/cjs/GoogleAddressInput/GoogleAddressInput.st.css.js +2 -2
- package/dist/cjs/GooglePreview/GooglePreview.st.css.js +2 -2
- package/dist/cjs/Heading/Heading.st.css.js +2 -2
- package/dist/cjs/Highlighter/Highlighter.st.css.js +2 -2
- package/dist/cjs/HorizontalScroll/HorizontalScroll.st.css.js +2 -2
- package/dist/cjs/HorizontalTimeline/HorizontalTimeline.st.css.js +2 -2
- package/dist/cjs/HorizontalTimeline/HorizontalTimelineIcons.st.css.js +3 -3
- package/dist/cjs/IconButton/IconButton.st.css.js +2 -2
- package/dist/cjs/Image/Image.js +1 -1
- package/dist/cjs/Image/Image.js.map +1 -1
- package/dist/cjs/Image/Image.st.css.js +4 -3
- package/dist/cjs/ImageViewer/ImageViewer.st.css.js +2 -2
- package/dist/cjs/InfoIcon/InfoIcon.st.css.js +2 -2
- package/dist/cjs/Input/Input.st.css.js +3 -3
- package/dist/cjs/Input/components/Affix/Affix.st.css.js +2 -2
- package/dist/cjs/Input/components/Group/Group.st.css.js +2 -2
- package/dist/cjs/Input/components/IconAffix/IconAffix.st.css.js +2 -2
- package/dist/cjs/Input/components/Ticker/Ticker.st.css.js +2 -2
- package/dist/cjs/InputArea/InputArea.st.css.js +3 -3
- package/dist/cjs/InputShell/InputShell.st.css.js +3 -3
- package/dist/cjs/InputWithLabel/InputWithLabel.st.css.js +2 -2
- package/dist/cjs/InputWithOptions/InputWithOptions.st.css.js +2 -2
- package/dist/cjs/LabelledElement/LabelledElement.st.css.js +2 -2
- package/dist/cjs/Layout/Cell/Cell.st.css.js +2 -2
- package/dist/cjs/Layout/Layout.st.css.js +2 -2
- package/dist/cjs/LinearProgressBar/LinearProgressBar.st.css.js +2 -2
- package/dist/cjs/LinearProgressBar/LinearProgressBarCore/LinearProgressBarCore.st.css.js +2 -2
- package/dist/cjs/ListItemAction/ListItemAction.st.css.js +2 -2
- package/dist/cjs/ListItemEditable/ListItemEditable.st.css.js +2 -2
- package/dist/cjs/ListItemSection/ListItemSection.st.css.js +2 -2
- package/dist/cjs/ListItemSelect/ListItemSelect.st.css.js +2 -2
- package/dist/cjs/ListItemSelectIcon/ListItemSelectIcon.st.css.js +2 -2
- package/dist/cjs/LiveRegion/LiveRegion.st.css.js +2 -2
- package/dist/cjs/Loader/Loader.st.css.js +3 -3
- package/dist/cjs/MarketingLayout/MarketingLayout.st.css.js +3 -3
- package/dist/cjs/MarketingPageLayout/MarketingPageLayout.st.css.js +2 -2
- package/dist/cjs/MarketingPageLayoutContent/MarketingPageLayoutContent.st.css.js +2 -2
- package/dist/cjs/MediaOverlay/MediaOverlay.st.css.js +2 -2
- package/dist/cjs/MessageBoxFunctionalLayout/MessageBoxFunctionalLayout.st.css.js +2 -2
- package/dist/cjs/MessageBoxMarketerialLayout/MessageBoxMarketerialLayout.st.css.js +2 -2
- package/dist/cjs/MessageModalLayout/MessageModalLayout.st.css.js +2 -2
- package/dist/cjs/MobilePreviewWidget/MobilePreviewWidget.st.css.js +2 -2
- package/dist/cjs/Modal/Modal.st.css.js +2 -2
- package/dist/cjs/ModalMobileLayout/ModalMobileLayout.st.css.js +2 -2
- package/dist/cjs/ModalMobileLayout/components/Footer/Footer.st.css.js +2 -2
- package/dist/cjs/ModalMobileLayout/components/Title/Title.st.css.js +2 -2
- package/dist/cjs/ModalPreviewLayout/ModalPreviewLayout.st.css.js +2 -2
- package/dist/cjs/ModalSelectorLayout/ModalSelectorLayout.st.css.js +2 -2
- package/dist/cjs/MultiSelect/InputWithTags.st.css.js +2 -2
- package/dist/cjs/MultiSelect/MultiSelect.st.css.js +2 -2
- package/dist/cjs/MultiSelectCheckbox/MultiSelectCheckbox.st.css.js +2 -2
- package/dist/cjs/NavigationToast/NavigationToast.st.css.js +2 -2
- package/dist/cjs/NestableList/NestableList.st.css.js +2 -2
- package/dist/cjs/NestableList/NestableListTheme.st.css.js +2 -2
- package/dist/cjs/Notification/Notification.st.css.js +2 -2
- package/dist/cjs/Page/Page.st.css.js +4 -4
- package/dist/cjs/Page/components/Footer/Footer.st.css.js +2 -2
- package/dist/cjs/Page/components/Footer/components/Center/Center.st.css.js +2 -2
- package/dist/cjs/Page/components/Footer/components/End/End.st.css.js +2 -2
- package/dist/cjs/Page/components/Footer/components/Start/Start.st.css.js +2 -2
- package/dist/cjs/Page/components/Header/Header.st.css.js +2 -2
- package/dist/cjs/Page/components/Section/Section.st.css.js +2 -2
- package/dist/cjs/Page/test/examples/BMPageContainer.st.css.js +2 -2
- package/dist/cjs/Page/test/examples/PageStory.st.css.js +2 -2
- package/dist/cjs/Page/test/examples/testExamples.st.css.js +2 -2
- package/dist/cjs/Pagination/Pagination.st.css.js +2 -2
- package/dist/cjs/Pagination/PaginationCore/PaginationCore.st.css.js +2 -2
- package/dist/cjs/Pagination/PaginationCore/PaginationCoreTest.st.css.js +2 -2
- package/dist/cjs/Palette/Palette.st.css.js +2 -2
- package/dist/cjs/Popover/Popover.st.css.js +2 -2
- package/dist/cjs/PopoverMenu/PopoverMenu.st.css.js +2 -2
- package/dist/cjs/PopoverNext/PopoverNext.st.css.js +2 -2
- package/dist/cjs/PopoverNext/components/Content/Content.st.css.js +2 -2
- package/dist/cjs/PreviewWidget/PreviewWidget.st.css.js +2 -2
- package/dist/cjs/Proportion/Proportion.st.css.js +2 -2
- package/dist/cjs/PulseAnimation/PulseAnimation.st.css.js +3 -3
- package/dist/cjs/RadarChart/RadarChart.st.css.js +2 -2
- package/dist/cjs/Radio/Radio.st.css.js +2 -2
- package/dist/cjs/RadioGroup/RadioGroup.st.css.js +2 -2
- package/dist/cjs/Range/Range.st.css.js +2 -2
- package/dist/cjs/RichTextInputArea/Form/RichTextInputAreaForm.st.css.js +2 -2
- package/dist/cjs/RichTextInputArea/RichTextInputArea.st.css.js +3 -3
- package/dist/cjs/RichTextInputArea/Toolbar/RichTextToolbarButton.st.css.js +2 -2
- package/dist/cjs/Search/Search.st.css.js +2 -2
- package/dist/cjs/SectionHeader/SectionHeader.st.css.js +3 -3
- package/dist/cjs/SectionHelper/SectionHelper.st.css.js +2 -2
- package/dist/cjs/SegmentedToggle/SegmentedToggle.st.css.js +2 -2
- package/dist/cjs/SegmentedToggle/ToggleButton/ToggleButton.st.css.js +2 -2
- package/dist/cjs/SegmentedToggle/ToggleIcon/ToggleIcon.st.css.js +2 -2
- package/dist/cjs/SelectableAccordion/Item/Item.st.css.js +2 -2
- package/dist/cjs/SelectableAccordion/SelectableAccordion.st.css.js +2 -2
- package/dist/cjs/Selector/ProgressBar/ProgressBar.st.css.js +2 -2
- package/dist/cjs/Selector/Selector.st.css.js +2 -2
- package/dist/cjs/SelectorButton/SelectorButton.st.css.js +2 -2
- package/dist/cjs/SelectorList/Content/Content.st.css.js +2 -2
- package/dist/cjs/SelectorList/SelectorList.st.css.js +2 -2
- package/dist/cjs/SidePanel/SidePanel.st.css.js +2 -2
- package/dist/cjs/SidePanel/components/Content/Content.st.css.js +2 -2
- package/dist/cjs/SidePanel/components/Divider/Divider.st.css.js +2 -2
- package/dist/cjs/SidePanel/components/Field/Field.st.css.js +3 -3
- package/dist/cjs/SidePanel/components/Footer/Footer.st.css.js +2 -2
- package/dist/cjs/SidePanel/components/Header/Header.st.css.js +2 -2
- package/dist/cjs/SidePanel/components/Section/Section.st.css.js +2 -2
- package/dist/cjs/Sidebar/Sidebar.st.css.js +3 -3
- package/dist/cjs/Sidebar/colors.st.css.js +2 -2
- package/dist/cjs/SidebarBackButton/SidebarBackButton.st.css.js +3 -3
- package/dist/cjs/SidebarDivider/SidebarDivider.st.css.js +2 -2
- package/dist/cjs/SidebarDividerNext/SidebarDividerNext.st.css.js +2 -2
- package/dist/cjs/SidebarHeader/SidebarHeader.st.css.js +2 -2
- package/dist/cjs/SidebarHeaderNext/SidebarHeaderNext.st.css.js +2 -2
- package/dist/cjs/SidebarItemNext/SidebarItemNext.st.css.js +2 -2
- package/dist/cjs/SidebarNext/SidebarNext.st.css.js +2 -2
- package/dist/cjs/SidebarNext/components/SidebarSkeleton.st.css.js +3 -3
- package/dist/cjs/SidebarNext/components/ToggleButton.st.css.js +2 -2
- package/dist/cjs/SidebarSectionItem/SidebarSectionItem.st.css.js +2 -2
- package/dist/cjs/SidebarSectionTitle/SidebarSectionTitle.st.css.js +2 -2
- package/dist/cjs/SidebarSubMenuNext/SidebarSubMenuNext.st.css.js +3 -3
- package/dist/cjs/SidebarTitleItemNext/SidebarTitleItemNext.st.css.js +2 -2
- package/dist/cjs/Skeleton/Skeleton.st.css.js +3 -3
- package/dist/cjs/SkeletonCircle/SkeletonCircle.st.css.js +2 -2
- package/dist/cjs/SkeletonGroup/SkeletonGroup.st.css.js +4 -4
- package/dist/cjs/SkeletonLine/SkeletonLine.st.css.js +2 -2
- package/dist/cjs/SkeletonRectangle/SkeletonRectangle.st.css.js +2 -2
- package/dist/cjs/Slider/Slider.st.css.js +2 -2
- package/dist/cjs/SocialButton/SocialButton.st.css.js +2 -2
- package/dist/cjs/SocialPostPreview/SocialPostPreview.st.css.js +2 -2
- package/dist/cjs/SocialPostPreview/components/FacebookPost.st.css.js +2 -2
- package/dist/cjs/SocialPostPreview/components/InstagramPost.st.css.js +2 -2
- package/dist/cjs/SocialPreview/SocialPreview.st.css.js +2 -2
- package/dist/cjs/SortableGridBase/SortableGridBase.st.css.js +2 -2
- package/dist/cjs/SparklineChart/ChartTooltip.st.css.js +2 -2
- package/dist/cjs/SparklineChart/SparklineChart.st.css.js +2 -2
- package/dist/cjs/StackedBarChart/StackedBarChart.st.css.js +2 -2
- package/dist/cjs/StarsRatingBar/components/StarsRatingBar.st.css.js +2 -2
- package/dist/cjs/StarsRatingBar/index.d.js +0 -6
- package/dist/cjs/StarsRatingBar/index.d.js.map +1 -1
- package/dist/cjs/StatisticsWidget/StatisticsItem/StatisticsItem.st.css.js +2 -2
- package/dist/cjs/StatisticsWidget/StatisticsWidget.st.css.js +2 -2
- package/dist/cjs/StatusIndicator/StatusIndicator.st.css.js +4 -3
- package/dist/cjs/StatusToast/StatusToast.st.css.js +2 -2
- package/dist/cjs/Stepper/Stepper.st.css.js +2 -2
- package/dist/cjs/Stepper/components/Step.st.css.js +2 -2
- package/dist/cjs/Stepper/components/StepMarker.st.css.js +2 -2
- package/dist/cjs/Table/DataTable/DataTable.st.css.js +2 -2
- package/dist/cjs/Table/DataTable/components/DataTableRow.st.css.js +2 -2
- package/dist/cjs/Table/DataTable/components/DataTableRowVirtual.st.css.js +2 -2
- package/dist/cjs/Table/DataTable/docs/Example.st.css.js +2 -2
- package/dist/cjs/Table/FloatingScrollBar/FloatingScrollBar.st.css.js +2 -2
- package/dist/cjs/Table/Table.st.css.js +2 -2
- package/dist/cjs/TableActionCell/TableActionCell.st.css.js +2 -2
- package/dist/cjs/TableListHeader/TableListHeader.st.css.js +2 -2
- package/dist/cjs/TableListItem/TableListItem.st.css.js +3 -3
- package/dist/cjs/TableToolbar/TableToolbar.st.css.js +2 -2
- package/dist/cjs/Tabs/Tabs.st.css.js +2 -2
- package/dist/cjs/Tag/Tag.st.css.js +2 -2
- package/dist/cjs/TagList/TagList.st.css.js +2 -2
- package/dist/cjs/TestimonialList/TestimonialList.st.css.js +2 -2
- package/dist/cjs/Text/Caption.st.css.js +2 -2
- package/dist/cjs/Text/Text.st.css.js +2 -2
- package/dist/cjs/TextButton/TextButton.st.css.js +2 -2
- package/dist/cjs/Themes/brand/Brand.st.css.js +2 -2
- package/dist/cjs/Themes/brand/Foundations/colors.st.css.js +2 -2
- package/dist/cjs/Themes/brand/components/Button/Button.st.css.js +2 -2
- package/dist/cjs/Themes/brand/components/Heading/Heading.st.css.js +2 -2
- package/dist/cjs/Themes/brand/components/InputWithLabel/InputWithLabel.st.css.js +2 -2
- package/dist/cjs/Themes/brand/components/InputWithLabel/LabelledElement.st.css.js +2 -2
- package/dist/cjs/Themes/brand/components/Text/Text.st.css.js +2 -2
- package/dist/cjs/Thumbnail/Thumbnail.st.css.js +2 -2
- package/dist/cjs/TimeInput/TimeInput.st.css.js +2 -2
- package/dist/cjs/TimeTable/TimeTable.st.css.js +2 -2
- package/dist/cjs/TimeTable/components/Item.st.css.js +2 -2
- package/dist/cjs/Timeline/Timeline.st.css.js +2 -2
- package/dist/cjs/Timeline/TimelineItem.st.css.js +3 -3
- package/dist/cjs/Toast/Toast.st.css.js +2 -2
- package/dist/cjs/ToastContainer/ToastContainer.st.css.js +2 -2
- package/dist/cjs/ToggleButton/ToggleButton.st.css.js +2 -2
- package/dist/cjs/ToggleSwitch/ToggleSwitch.st.css.js +2 -2
- package/dist/cjs/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCore.st.css.js +2 -2
- package/dist/cjs/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreColor.st.css.js +2 -2
- package/dist/cjs/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreLayout.st.css.js +2 -2
- package/dist/cjs/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreStyle.st.css.js +2 -2
- package/dist/cjs/Tooltip/Tooltip.st.css.js +2 -2
- package/dist/cjs/TopBanner/TopBanner.st.css.js +2 -2
- package/dist/cjs/TrendIndicator/TrendIndicator.st.css.js +2 -2
- package/dist/cjs/VariableInput/VariableInput.st.css.js +3 -3
- package/dist/cjs/VerticalTabsIconItem/VerticalTabsIconItem.st.css.js +3 -3
- package/dist/cjs/VerticalTabsItem/VerticalTabsItem.st.css.js +3 -3
- package/dist/cjs/WixDesignSystemProvider/WixDesignSystemProvider.st.css.js +2 -2
- package/dist/cjs/WixDesignSystemProvider/madefor.st.css.js +2 -2
- package/dist/cjs/WixDesignSystemProvider/newColorsBranding.st.css.js +2 -2
- package/dist/cjs/common/AdaptiveHeading/AdaptiveHeading.st.css.js +2 -2
- package/dist/cjs/common/Ellipsis/Ellipsis.st.css.js +3 -3
- package/dist/cjs/common/Ellipsis/components/TextComponent/TextComponent.st.css.js +3 -3
- package/dist/cjs/common/FluidColumns/FluidColumns.st.css.js +3 -3
- package/dist/cjs/common/Focusable/Focusable.st.css.js +2 -2
- package/dist/cjs/common/styles/visuallyHidden.st.css.js +2 -2
- package/dist/cjs/dnd-styles/dnd-styles.st.css.js +2 -2
- package/dist/cjs/providers/useOverlayScrollbar/useOverlayScrollbar.initialization.st.css.js +3 -3
- package/dist/cjs/providers/useOverlayScrollbar/useOverlayScrollbar.st.css.js +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/docs/components/AccordionExamples.md +1146 -0
- package/dist/docs/components/AddItemExamples.md +362 -0
- package/dist/docs/components/AddressInputExamples.md +252 -0
- package/dist/docs/components/AddressInputItemExamples.md +59 -0
- package/dist/docs/components/AnalyticsLayoutExamples.md +17 -0
- package/dist/docs/components/AnalyticsSummaryCardExamples.md +507 -0
- package/dist/docs/components/AngleInputExamples.md +186 -0
- package/dist/docs/components/AnnouncementModalLayoutExamples.md +17 -0
- package/dist/docs/components/AreaChartExamples.md +17 -0
- package/dist/docs/components/AtlasAddressInputExamples.md +164 -0
- package/dist/docs/components/AudioPlayerExamples.md +172 -0
- package/dist/docs/components/AutoCompleteExamples.md +562 -0
- package/dist/docs/components/AutoCompleteWithLabelExamples.md +71 -0
- package/dist/docs/components/AvatarExamples.md +427 -0
- package/dist/docs/components/AvatarGroupExamples.md +59 -0
- package/dist/docs/components/BadgeExamples.md +315 -0
- package/dist/docs/components/BadgeSelectExamples.md +17 -0
- package/dist/docs/components/BadgeSelectItemExamples.md +17 -0
- package/dist/docs/components/BarChartExamples.md +17 -0
- package/dist/docs/components/BounceAnimationExamples.md +17 -0
- package/dist/docs/components/BoxExamples.md +349 -0
- package/dist/docs/components/BreadcrumbsExamples.md +249 -0
- package/dist/docs/components/BrowserPreviewWidgetExamples.md +259 -0
- package/dist/docs/components/ButtonExamples.md +262 -0
- package/dist/docs/components/CalendarExamples.md +80 -0
- package/dist/docs/components/CalendarPanelExamples.md +84 -0
- package/dist/docs/components/CalendarPanelFooterExamples.md +45 -0
- package/dist/docs/components/CardExamples.md +440 -0
- package/dist/docs/components/CardFolderTabsExamples.md +61 -0
- package/dist/docs/components/CardGalleryItemExamples.md +322 -0
- package/dist/docs/components/CarouselExamples.md +17 -0
- package/dist/docs/components/CarouselWIPExamples.md +17 -0
- package/dist/docs/components/CheckToggleExamples.md +56 -0
- package/dist/docs/components/CheckboxExamples.md +392 -0
- package/dist/docs/components/CircularProgressBarExamples.md +196 -0
- package/dist/docs/components/ClickableCardExamples.md +17 -0
- package/dist/docs/components/CloseButtonExamples.md +145 -0
- package/dist/docs/components/CollapseExamples.md +17 -0
- package/dist/docs/components/ColorInputExamples.md +207 -0
- package/dist/docs/components/ColorPickerExamples.md +75 -0
- package/dist/docs/components/ComposerButtonExamples.md +17 -0
- package/dist/docs/components/ComposerHeaderExamples.md +842 -0
- package/dist/docs/components/ComposerSidebarExamples.md +626 -0
- package/dist/docs/components/CopyClipboardExamples.md +17 -0
- package/dist/docs/components/CornerRadiusInputExamples.md +860 -0
- package/dist/docs/components/CounterBadgeExamples.md +17 -0
- package/dist/docs/components/CustomModalLayoutExamples.md +830 -0
- package/dist/docs/components/DatePickerExamples.md +401 -0
- package/dist/docs/components/DividerExamples.md +131 -0
- package/dist/docs/components/DropdownBaseExamples.md +99 -0
- package/dist/docs/components/DropdownExamples.md +774 -0
- package/dist/docs/components/DropdownLayoutExamples.md +17 -0
- package/dist/docs/components/DropzoneExamples.md +130 -0
- package/dist/docs/components/EditableSelectorExamples.md +17 -0
- package/dist/docs/components/EditableTitleExamples.md +107 -0
- package/dist/docs/components/EmptyStateExamples.md +396 -0
- package/dist/docs/components/FacesRatingBarExamples.md +129 -0
- package/dist/docs/components/FeatureListExamples.md +47 -0
- package/dist/docs/components/FieldSetExamples.md +498 -0
- package/dist/docs/components/FilePickerExamples.md +45 -0
- package/dist/docs/components/FileUploadExamples.md +191 -0
- package/dist/docs/components/FillButtonExamples.md +66 -0
- package/dist/docs/components/FillPreviewExamples.md +271 -0
- package/dist/docs/components/FloatingHelperExamples.md +17 -0
- package/dist/docs/components/FloatingNotificationExamples.md +219 -0
- package/dist/docs/components/FormFieldExamples.md +360 -0
- package/dist/docs/components/FunnelChartExamples.md +17 -0
- package/dist/docs/components/GoogleAddressInputExamples.md +17 -0
- package/dist/docs/components/GooglePreviewExamples.md +196 -0
- package/dist/docs/components/HeadingExamples.md +266 -0
- package/dist/docs/components/HighlighterExamples.md +17 -0
- package/dist/docs/components/HorizontalScrollExamples.md +17 -0
- package/dist/docs/components/HorizontalTimelineExamples.md +75 -0
- package/dist/docs/components/IconButtonExamples.md +357 -0
- package/dist/docs/components/ImageExamples.md +244 -0
- package/dist/docs/components/ImageViewerExamples.md +125 -0
- package/dist/docs/components/InfoIconExamples.md +84 -0
- package/dist/docs/components/InputAreaExamples.md +282 -0
- package/dist/docs/components/InputExamples.md +224 -0
- package/dist/docs/components/InputShellExamples.md +17 -0
- package/dist/docs/components/InputWithLabelExamples.md +78 -0
- package/dist/docs/components/InputWithOptionsExamples.md +17 -0
- package/dist/docs/components/LayoutExamples.md +436 -0
- package/dist/docs/components/LinearProgressBarExamples.md +17 -0
- package/dist/docs/components/ListItemActionExamples.md +300 -0
- package/dist/docs/components/ListItemEditableExamples.md +17 -0
- package/dist/docs/components/ListItemSectionExamples.md +83 -0
- package/dist/docs/components/ListItemSelectExamples.md +237 -0
- package/dist/docs/components/ListItemSelectIconExamples.md +17 -0
- package/dist/docs/components/LiveRegionExamples.md +299 -0
- package/dist/docs/components/LoaderExamples.md +218 -0
- package/dist/docs/components/MarketingLayoutExamples.md +313 -0
- package/dist/docs/components/MarketingPageLayoutContentExamples.md +49 -0
- package/dist/docs/components/MarketingPageLayoutExamples.md +69 -0
- package/dist/docs/components/MediaOverlayExamples.md +121 -0
- package/dist/docs/components/MessageBoxFunctionalLayoutExamples.md +17 -0
- package/dist/docs/components/MessageBoxMarketerialLayoutExamples.md +17 -0
- package/dist/docs/components/MessageModalLayoutExamples.md +252 -0
- package/dist/docs/components/MobilePreviewWidgetExamples.md +17 -0
- package/dist/docs/components/ModalExamples.md +237 -0
- package/dist/docs/components/ModalMobileLayoutExamples.md +70 -0
- package/dist/docs/components/ModalPreviewLayoutExamples.md +17 -0
- package/dist/docs/components/ModalSelectorLayoutExamples.md +17 -0
- package/dist/docs/components/MultiSelectCheckboxExamples.md +958 -0
- package/dist/docs/components/MultiSelectExamples.md +425 -0
- package/dist/docs/components/NavigationToastExamples.md +17 -0
- package/dist/docs/components/NestableListBaseExamples.md +17 -0
- package/dist/docs/components/NestableListExamples.md +763 -0
- package/dist/docs/components/NotificationExamples.md +17 -0
- package/dist/docs/components/NumberInputExamples.md +448 -0
- package/dist/docs/components/PageExamples.md +943 -0
- package/dist/docs/components/PageFooterExamples.md +17 -0
- package/dist/docs/components/PageSectionExamples.md +17 -0
- package/dist/docs/components/PaginationExamples.md +31 -0
- package/dist/docs/components/PaletteExamples.md +60 -0
- package/dist/docs/components/PopoverExamples.md +17 -0
- package/dist/docs/components/PopoverMenuExamples.md +588 -0
- package/dist/docs/components/PreviewWidgetExamples.md +17 -0
- package/dist/docs/components/ProportionExamples.md +17 -0
- package/dist/docs/components/PulseAnimationExamples.md +17 -0
- package/dist/docs/components/RadarChartExamples.md +71 -0
- package/dist/docs/components/RadioExamples.md +159 -0
- package/dist/docs/components/RadioGroupExamples.md +351 -0
- package/dist/docs/components/RangeExamples.md +45 -0
- package/dist/docs/components/RichTextInputAreaExamples.md +115 -0
- package/dist/docs/components/SearchExamples.md +366 -0
- package/dist/docs/components/SectionHeaderExamples.md +251 -0
- package/dist/docs/components/SectionHelperExamples.md +332 -0
- package/dist/docs/components/SegmentedToggleExamples.md +391 -0
- package/dist/docs/components/SelectableAccordionExamples.md +409 -0
- package/dist/docs/components/SelectorButtonExamples.md +234 -0
- package/dist/docs/components/SelectorExamples.md +17 -0
- package/dist/docs/components/SelectorListExamples.md +1215 -0
- package/dist/docs/components/SidePanelExamples.md +908 -0
- package/dist/docs/components/SidebarBackButtonExamples.md +17 -0
- package/dist/docs/components/SidebarDividerExamples.md +17 -0
- package/dist/docs/components/SidebarDividerNextExamples.md +53 -0
- package/dist/docs/components/SidebarExamples.md +17 -0
- package/dist/docs/components/SidebarHeaderExamples.md +17 -0
- package/dist/docs/components/SidebarHeaderNextExamples.md +84 -0
- package/dist/docs/components/SidebarItemNextExamples.md +82 -0
- package/dist/docs/components/SidebarNextExamples.md +266 -0
- package/dist/docs/components/SidebarSectionItemExamples.md +17 -0
- package/dist/docs/components/SidebarSectionTitleExamples.md +17 -0
- package/dist/docs/components/SidebarSubMenuNextExamples.md +172 -0
- package/dist/docs/components/SidebarTitleItemNextExamples.md +57 -0
- package/dist/docs/components/SkeletonCircleExamples.md +17 -0
- package/dist/docs/components/SkeletonExamples.md +17 -0
- package/dist/docs/components/SkeletonGroupExamples.md +17 -0
- package/dist/docs/components/SkeletonLineExamples.md +17 -0
- package/dist/docs/components/SkeletonRectangleExamples.md +17 -0
- package/dist/docs/components/SliderExamples.md +465 -0
- package/dist/docs/components/SocialButtonExamples.md +93 -0
- package/dist/docs/components/SocialPostPreviewExamples.md +17 -0
- package/dist/docs/components/SocialPreviewExamples.md +46 -0
- package/dist/docs/components/SortableGridBaseExamples.md +17 -0
- package/dist/docs/components/SortableListBaseExamples.md +17 -0
- package/dist/docs/components/SparklineChartExamples.md +17 -0
- package/dist/docs/components/StackedBarChartExamples.md +17 -0
- package/dist/docs/components/StarsRatingBarExamples.md +156 -0
- package/dist/docs/components/StatisticsWidgetExamples.md +17 -0
- package/dist/docs/components/StatusIndicatorExamples.md +105 -0
- package/dist/docs/components/StatusToastExamples.md +540 -0
- package/dist/docs/components/StepperExamples.md +465 -0
- package/dist/docs/components/SwatchesExamples.md +62 -0
- package/dist/docs/components/TableActionCellExamples.md +657 -0
- package/dist/docs/components/TableExamples.md +2891 -0
- package/dist/docs/components/TableListHeaderExamples.md +422 -0
- package/dist/docs/components/TableListItemExamples.md +656 -0
- package/dist/docs/components/TableToolbarExamples.md +556 -0
- package/dist/docs/components/TabsExamples.md +605 -0
- package/dist/docs/components/TagExamples.md +77 -0
- package/dist/docs/components/TagListExamples.md +495 -0
- package/dist/docs/components/TestimonialListExamples.md +48 -0
- package/dist/docs/components/TextButtonExamples.md +226 -0
- package/dist/docs/components/TextExamples.md +264 -0
- package/dist/docs/components/ThemeProviderExamples.md +17 -0
- package/dist/docs/components/ThumbnailExamples.md +471 -0
- package/dist/docs/components/TimeInputExamples.md +287 -0
- package/dist/docs/components/TimeTableExamples.md +17 -0
- package/dist/docs/components/TimelineExamples.md +85 -0
- package/dist/docs/components/ToastExamples.md +17 -0
- package/dist/docs/components/ToggleButtonExamples.md +441 -0
- package/dist/docs/components/ToggleSwitchExamples.md +313 -0
- package/dist/docs/components/TooltipExamples.md +201 -0
- package/dist/docs/components/TopBannerExamples.md +367 -0
- package/dist/docs/components/TransitionExamples.md +488 -0
- package/dist/docs/components/TrendIndicatorExamples.md +17 -0
- package/dist/docs/components/VariableInputExamples.md +272 -0
- package/dist/docs/components/VerticalTabsExamples.md +132 -0
- package/dist/docs/components/VerticalTabsIconItemExamples.md +17 -0
- package/dist/docs/components/VerticalTabsItemExamples.md +40 -0
- package/dist/docs/components/WixDesignSystemProviderExamples.md +17 -0
- package/dist/docs/components/WixDesignSystemProviderProps.md +6 -0
- package/dist/docs/components/WixStyleReactEnvironmentProviderExamples.md +17 -0
- package/dist/docs/components/WixStyleReactMaskingProviderExamples.md +17 -0
- package/dist/docs/components/WixStyleReactMaskingProviderProps.md +6 -0
- package/dist/docs/components.md +983 -0
- package/dist/esm/Accordion/Accordion.st.css.js +2 -2
- package/dist/esm/Accordion/components/AccordionItem/AccordionItem.st.css.js +2 -2
- package/dist/esm/Accordion/components/AccordionItemCaret/AccordionItemCaret.st.css.js +2 -2
- package/dist/esm/AddItem/AddItem.st.css.js +2 -2
- package/dist/esm/AddressInputItem/AddressInputItem.st.css.js +2 -2
- package/dist/esm/AnalyticsLayout/AnalyticsLayout.st.css.js +2 -2
- package/dist/esm/AnalyticsLayout/Cell/Cell.st.css.js +2 -2
- package/dist/esm/AnalyticsSummaryCard/AnalyticsSummaryCard.st.css.js +2 -2
- package/dist/esm/AngleInput/AngleInput.st.css.js +2 -2
- package/dist/esm/AnnouncementModalLayout/AnnouncementModalLayout.st.css.js +2 -2
- package/dist/esm/AreaChart/AreaChart.st.css.js +2 -2
- package/dist/esm/AudioPlayer/AudioPlayer.st.css.js +3 -3
- package/dist/esm/AutoCompleteWithLabel/AutoCompleteWithLabel.st.css.js +2 -2
- package/dist/esm/Avatar/Avatar.st.css.js +2 -2
- package/dist/esm/Avatar/AvatarCore/AvatarCore.st.css.js +2 -2
- package/dist/esm/AvatarGroup/AvatarGroup.st.css.js +2 -2
- package/dist/esm/Badge/Badge.st.css.js +2 -2
- package/dist/esm/BadgeSelect/BadgeSelect.st.css.js +2 -2
- package/dist/esm/BadgeSelectItem/BadgeSelectItem.st.css.js +2 -2
- package/dist/esm/BarChart/BarChart.st.css.js +3 -3
- package/dist/esm/BaseModalLayout/BaseModalLayout.st.css.js +2 -2
- package/dist/esm/BaseModalLayout/LayoutBlocks/Content/Content.st.css.js +2 -2
- package/dist/esm/BaseModalLayout/LayoutBlocks/Footer/Footer.st.css.js +2 -2
- package/dist/esm/BaseModalLayout/LayoutBlocks/Footnote/Footnote.st.css.js +2 -2
- package/dist/esm/BaseModalLayout/LayoutBlocks/Header/Header.st.css.js +2 -2
- package/dist/esm/BaseModalLayout/LayoutBlocks/Illustration/Illustration.st.css.js +2 -2
- package/dist/esm/BounceAnimation/BounceAnimation.st.css.js +3 -3
- package/dist/esm/Box/Box.st.css.js +3 -3
- package/dist/esm/Breadcrumbs/Breadcrumbs.st.css.js +2 -2
- package/dist/esm/BrowserPreviewWidget/BrowserPreviewWidget.st.css.js +2 -2
- package/dist/esm/Button/Button.st.css.js +2 -2
- package/dist/esm/Button/ButtonCore/ButtonCore.st.css.js +2 -2
- package/dist/esm/Calendar/BaseCalendar/BaseCalendar.st.css.js +2 -2
- package/dist/esm/Calendar/Calendar.st.css.js +2 -2
- package/dist/esm/Calendar/DatePickerDropdown/DatePickerDropdown.st.css.js +2 -2
- package/dist/esm/Calendar/DatePickerHead/DatePickerHead.st.css.js +2 -2
- package/dist/esm/Calendar/DatePickerHead/MonthDropdown/MonthDropdown.st.css.js +2 -2
- package/dist/esm/Calendar/DatePickerHead/YearDropdown/YearDropdown.st.css.js +2 -2
- package/dist/esm/CalendarPanel/CalendarPanel.st.css.js +2 -2
- package/dist/esm/Card/Card.st.css.js +2 -2
- package/dist/esm/Card/components/Content/Content.st.css.js +2 -2
- package/dist/esm/Card/components/Header/Header.st.css.js +2 -2
- package/dist/esm/Card/components/Subheader/Subheader.st.css.js +2 -2
- package/dist/esm/CardFolderTabs/CardFolderTabs.st.css.js +3 -3
- package/dist/esm/CardGalleryItem/CardGalleryItem.st.css.js +2 -2
- package/dist/esm/Carousel/Carousel.st.css.js +3 -3
- package/dist/esm/Carousel/Pagination/Pagination.st.css.js +2 -2
- package/dist/esm/CarouselWIP/CarouselWIP.st.css.js +3 -3
- package/dist/esm/CheckToggle/CheckToggle.st.css.js +2 -2
- package/dist/esm/Checkbox/Checkbox.st.css.js +2 -2
- package/dist/esm/CircularProgressBar/CircularProgressBar.st.css.js +2 -2
- package/dist/esm/CircularProgressBar/CircularProgressBarCore/CircularProgressBarCore.st.css.js +2 -2
- package/dist/esm/ClickableCard/ClickableCard.st.css.js +2 -2
- package/dist/esm/CloseButton/CloseButton.st.css.js +2 -2
- package/dist/esm/Collapse/Collapse.st.css.js +2 -2
- package/dist/esm/ColorInput/components/ColorViewer.st.css.js +2 -2
- package/dist/esm/ColorInput/components/Hash.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPicker.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPickerActions.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPickerConverter.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPickerHistory.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPickerHsb.st.css.js +2 -2
- package/dist/esm/ColorPicker/ColorPickerHue.st.css.js +2 -2
- package/dist/esm/ComposerButton/ComposerButton.st.css.js +2 -2
- package/dist/esm/ComposerHeader/ComposerHeader.st.css.js +2 -2
- package/dist/esm/ComposerSidebar/ComposerSidebar.st.css.js +2 -2
- package/dist/esm/CornerRadiusInput/CornerRadiusInput.st.css.js +2 -2
- package/dist/esm/CounterBadge/CounterBadge.st.css.js +2 -2
- package/dist/esm/CustomModalLayout/CustomModalLayout.st.css.js +2 -2
- package/dist/esm/DatePicker/DatePicker.st.css.js +2 -2
- package/dist/esm/Divider/Divider.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/Introduction/IntroductionExample.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableGridBase/SingleAreaGrid/SingleAreaGrid.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/ListWithDelay/ListWithDelay.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/MultiAreaList/MultiAreaList.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/MultiAreaListPreventOfDropping/MultiAreaListPreventDropping.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/MultiAreaListWithInsertionRules/MultiAreaListWithInsertionRules.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/MultiAreaListWithSortableColumns/MultiAreaListWithSortableColumns.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/MultiAreaListWithSortableColumnsWithAnimations/MultiAreaListWithSortableColumnsWithAnimations.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/NestableListBaseExample/NestableListBase.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/SingleAreaList/SingleAreaList.st.css.js +2 -2
- package/dist/esm/DragAndDrop/docs/SortableListBase/SingleAreaListWithAnimation/SingleAreaListWithAnimation.st.css.js +2 -2
- package/dist/esm/DragHandle/DragHandle.st.css.js +2 -2
- package/dist/esm/DraggableContainer/DraggableContainer.st.css.js +2 -2
- package/dist/esm/Dropdown/Dropdown.st.css.js +2 -2
- package/dist/esm/DropdownBase/DropdownBase.st.css.js +2 -2
- package/dist/esm/DropdownLayout/DropdownLayout.st.css.js +2 -2
- package/dist/esm/Dropzone/Dropzone.st.css.js +2 -2
- package/dist/esm/EditableSelector/EditableSelector.st.css.js +2 -2
- package/dist/esm/EditableTitle/EditableTitle.st.css.js +2 -2
- package/dist/esm/EmptyState/EmptyState.st.css.js +2 -2
- package/dist/esm/FacesRatingBar/FacesRatingBar.st.css.js +2 -2
- package/dist/esm/FeatureList/FeatureList.st.css.js +2 -2
- package/dist/esm/FieldSet/FieldSet.st.css.js +2 -2
- package/dist/esm/FieldSet/components/Asterisk/Asterisk.st.css.js +2 -2
- package/dist/esm/FieldSet/components/InfoContentIcon/InfoContentIcon.st.css.js +2 -2
- package/dist/esm/FieldSet/components/InlineLabelWrapper/InlineLabelWrapper.st.css.js +2 -2
- package/dist/esm/FieldSet/components/Label/Label.st.css.js +2 -2
- package/dist/esm/FieldSet/components/StatusMessage/StatusMessage.st.css.js +2 -2
- package/dist/esm/FieldSet/components/Suffix/Suffix.st.css.js +2 -2
- package/dist/esm/FilePicker/FilePicker.st.css.js +2 -2
- package/dist/esm/FillButton/FillButton.st.css.js +2 -2
- package/dist/esm/FillPreview/FillPreview.st.css.js +2 -2
- package/dist/esm/FloatingHelper/FloatingHelper.st.css.js +2 -2
- package/dist/esm/FloatingHelper/FloatingHelperContent/FloatingHelperContent.st.css.js +2 -2
- package/dist/esm/FloatingNotification/FloatingNotification.st.css.js +2 -2
- package/dist/esm/FormField/FormField.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/border.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/breakpoints.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/colors.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/default-scroll-bar.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/easing.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/gradients.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/opacity.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/shadows.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/spacing.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/typography.st.css.js +2 -2
- package/dist/esm/Foundation/stylable/z-index.st.css.js +2 -2
- package/dist/esm/FunnelChart/FunnelBadge/FunnelBadge.st.css.js +2 -2
- package/dist/esm/FunnelChart/FunnelBar/FunnelBar.st.css.js +2 -2
- package/dist/esm/FunnelChart/FunnelChart.st.css.js +2 -2
- package/dist/esm/FunnelChart/FunnelLabel/FunnelLabel.st.css.js +2 -2
- package/dist/esm/FunnelChart/FunnelStep/FunnelStep.st.css.js +2 -2
- package/dist/esm/GoogleAddressInput/GoogleAddressInput.st.css.js +2 -2
- package/dist/esm/GooglePreview/GooglePreview.st.css.js +2 -2
- package/dist/esm/Heading/Heading.st.css.js +2 -2
- package/dist/esm/Highlighter/Highlighter.st.css.js +2 -2
- package/dist/esm/HorizontalScroll/HorizontalScroll.st.css.js +2 -2
- package/dist/esm/HorizontalTimeline/HorizontalTimeline.st.css.js +2 -2
- package/dist/esm/HorizontalTimeline/HorizontalTimelineIcons.st.css.js +3 -3
- package/dist/esm/IconButton/IconButton.st.css.js +2 -2
- package/dist/esm/Image/Image.js +10 -2
- package/dist/esm/Image/Image.js.map +1 -1
- package/dist/esm/Image/Image.st.css.js +4 -3
- package/dist/esm/ImageViewer/ImageViewer.st.css.js +2 -2
- package/dist/esm/InfoIcon/InfoIcon.st.css.js +2 -2
- package/dist/esm/Input/Input.st.css.js +3 -3
- package/dist/esm/Input/components/Affix/Affix.st.css.js +2 -2
- package/dist/esm/Input/components/Group/Group.st.css.js +2 -2
- package/dist/esm/Input/components/IconAffix/IconAffix.st.css.js +2 -2
- package/dist/esm/Input/components/Ticker/Ticker.st.css.js +2 -2
- package/dist/esm/InputArea/InputArea.st.css.js +3 -3
- package/dist/esm/InputShell/InputShell.st.css.js +3 -3
- package/dist/esm/InputWithLabel/InputWithLabel.st.css.js +2 -2
- package/dist/esm/InputWithOptions/InputWithOptions.st.css.js +2 -2
- package/dist/esm/LabelledElement/LabelledElement.st.css.js +2 -2
- package/dist/esm/Layout/Cell/Cell.st.css.js +2 -2
- package/dist/esm/Layout/Layout.st.css.js +2 -2
- package/dist/esm/LinearProgressBar/LinearProgressBar.st.css.js +2 -2
- package/dist/esm/LinearProgressBar/LinearProgressBarCore/LinearProgressBarCore.st.css.js +2 -2
- package/dist/esm/ListItemAction/ListItemAction.st.css.js +2 -2
- package/dist/esm/ListItemEditable/ListItemEditable.st.css.js +2 -2
- package/dist/esm/ListItemSection/ListItemSection.st.css.js +2 -2
- package/dist/esm/ListItemSelect/ListItemSelect.st.css.js +2 -2
- package/dist/esm/ListItemSelectIcon/ListItemSelectIcon.st.css.js +2 -2
- package/dist/esm/LiveRegion/LiveRegion.st.css.js +2 -2
- package/dist/esm/Loader/Loader.st.css.js +3 -3
- package/dist/esm/MarketingLayout/MarketingLayout.st.css.js +3 -3
- package/dist/esm/MarketingPageLayout/MarketingPageLayout.st.css.js +2 -2
- package/dist/esm/MarketingPageLayoutContent/MarketingPageLayoutContent.st.css.js +2 -2
- package/dist/esm/MediaOverlay/MediaOverlay.st.css.js +2 -2
- package/dist/esm/MessageBoxFunctionalLayout/MessageBoxFunctionalLayout.st.css.js +2 -2
- package/dist/esm/MessageBoxMarketerialLayout/MessageBoxMarketerialLayout.st.css.js +2 -2
- package/dist/esm/MessageModalLayout/MessageModalLayout.st.css.js +2 -2
- package/dist/esm/MobilePreviewWidget/MobilePreviewWidget.st.css.js +2 -2
- package/dist/esm/Modal/Modal.st.css.js +2 -2
- package/dist/esm/ModalMobileLayout/ModalMobileLayout.st.css.js +2 -2
- package/dist/esm/ModalMobileLayout/components/Footer/Footer.st.css.js +2 -2
- package/dist/esm/ModalMobileLayout/components/Title/Title.st.css.js +2 -2
- package/dist/esm/ModalPreviewLayout/ModalPreviewLayout.st.css.js +2 -2
- package/dist/esm/ModalSelectorLayout/ModalSelectorLayout.st.css.js +2 -2
- package/dist/esm/MultiSelect/InputWithTags.st.css.js +2 -2
- package/dist/esm/MultiSelect/MultiSelect.st.css.js +2 -2
- package/dist/esm/MultiSelectCheckbox/MultiSelectCheckbox.st.css.js +2 -2
- package/dist/esm/NavigationToast/NavigationToast.st.css.js +2 -2
- package/dist/esm/NestableList/NestableList.st.css.js +2 -2
- package/dist/esm/NestableList/NestableListTheme.st.css.js +2 -2
- package/dist/esm/Notification/Notification.st.css.js +2 -2
- package/dist/esm/Page/Page.st.css.js +4 -4
- package/dist/esm/Page/components/Footer/Footer.st.css.js +2 -2
- package/dist/esm/Page/components/Footer/components/Center/Center.st.css.js +2 -2
- package/dist/esm/Page/components/Footer/components/End/End.st.css.js +2 -2
- package/dist/esm/Page/components/Footer/components/Start/Start.st.css.js +2 -2
- package/dist/esm/Page/components/Header/Header.st.css.js +2 -2
- package/dist/esm/Page/components/Section/Section.st.css.js +2 -2
- package/dist/esm/Page/test/examples/BMPageContainer.st.css.js +2 -2
- package/dist/esm/Page/test/examples/PageStory.st.css.js +2 -2
- package/dist/esm/Page/test/examples/testExamples.st.css.js +2 -2
- package/dist/esm/Pagination/Pagination.st.css.js +2 -2
- package/dist/esm/Pagination/PaginationCore/PaginationCore.st.css.js +2 -2
- package/dist/esm/Pagination/PaginationCore/PaginationCoreTest.st.css.js +2 -2
- package/dist/esm/Palette/Palette.st.css.js +2 -2
- package/dist/esm/Popover/Popover.st.css.js +2 -2
- package/dist/esm/PopoverMenu/PopoverMenu.st.css.js +2 -2
- package/dist/esm/PopoverNext/PopoverNext.st.css.js +2 -2
- package/dist/esm/PopoverNext/components/Content/Content.st.css.js +2 -2
- package/dist/esm/PreviewWidget/PreviewWidget.st.css.js +2 -2
- package/dist/esm/Proportion/Proportion.st.css.js +2 -2
- package/dist/esm/PulseAnimation/PulseAnimation.st.css.js +3 -3
- package/dist/esm/RadarChart/RadarChart.st.css.js +2 -2
- package/dist/esm/Radio/Radio.st.css.js +2 -2
- package/dist/esm/RadioGroup/RadioGroup.st.css.js +2 -2
- package/dist/esm/Range/Range.st.css.js +2 -2
- package/dist/esm/RichTextInputArea/Form/RichTextInputAreaForm.st.css.js +2 -2
- package/dist/esm/RichTextInputArea/RichTextInputArea.st.css.js +3 -3
- package/dist/esm/RichTextInputArea/Toolbar/RichTextToolbarButton.st.css.js +2 -2
- package/dist/esm/Search/Search.st.css.js +2 -2
- package/dist/esm/SectionHeader/SectionHeader.st.css.js +3 -3
- package/dist/esm/SectionHelper/SectionHelper.st.css.js +2 -2
- package/dist/esm/SegmentedToggle/SegmentedToggle.st.css.js +2 -2
- package/dist/esm/SegmentedToggle/ToggleButton/ToggleButton.st.css.js +2 -2
- package/dist/esm/SegmentedToggle/ToggleIcon/ToggleIcon.st.css.js +2 -2
- package/dist/esm/SelectableAccordion/Item/Item.st.css.js +2 -2
- package/dist/esm/SelectableAccordion/SelectableAccordion.st.css.js +2 -2
- package/dist/esm/Selector/ProgressBar/ProgressBar.st.css.js +2 -2
- package/dist/esm/Selector/Selector.st.css.js +2 -2
- package/dist/esm/SelectorButton/SelectorButton.st.css.js +2 -2
- package/dist/esm/SelectorList/Content/Content.st.css.js +2 -2
- package/dist/esm/SelectorList/SelectorList.st.css.js +2 -2
- package/dist/esm/SidePanel/SidePanel.st.css.js +2 -2
- package/dist/esm/SidePanel/components/Content/Content.st.css.js +2 -2
- package/dist/esm/SidePanel/components/Divider/Divider.st.css.js +2 -2
- package/dist/esm/SidePanel/components/Field/Field.st.css.js +3 -3
- package/dist/esm/SidePanel/components/Footer/Footer.st.css.js +2 -2
- package/dist/esm/SidePanel/components/Header/Header.st.css.js +2 -2
- package/dist/esm/SidePanel/components/Section/Section.st.css.js +2 -2
- package/dist/esm/Sidebar/Sidebar.st.css.js +3 -3
- package/dist/esm/Sidebar/colors.st.css.js +2 -2
- package/dist/esm/SidebarBackButton/SidebarBackButton.st.css.js +3 -3
- package/dist/esm/SidebarDivider/SidebarDivider.st.css.js +2 -2
- package/dist/esm/SidebarDividerNext/SidebarDividerNext.st.css.js +2 -2
- package/dist/esm/SidebarHeader/SidebarHeader.st.css.js +2 -2
- package/dist/esm/SidebarHeaderNext/SidebarHeaderNext.st.css.js +2 -2
- package/dist/esm/SidebarItemNext/SidebarItemNext.st.css.js +2 -2
- package/dist/esm/SidebarNext/SidebarNext.st.css.js +2 -2
- package/dist/esm/SidebarNext/components/SidebarSkeleton.st.css.js +3 -3
- package/dist/esm/SidebarNext/components/ToggleButton.st.css.js +2 -2
- package/dist/esm/SidebarSectionItem/SidebarSectionItem.st.css.js +2 -2
- package/dist/esm/SidebarSectionTitle/SidebarSectionTitle.st.css.js +2 -2
- package/dist/esm/SidebarSubMenuNext/SidebarSubMenuNext.st.css.js +3 -3
- package/dist/esm/SidebarTitleItemNext/SidebarTitleItemNext.st.css.js +2 -2
- package/dist/esm/Skeleton/Skeleton.st.css.js +3 -3
- package/dist/esm/SkeletonCircle/SkeletonCircle.st.css.js +2 -2
- package/dist/esm/SkeletonGroup/SkeletonGroup.st.css.js +4 -4
- package/dist/esm/SkeletonLine/SkeletonLine.st.css.js +2 -2
- package/dist/esm/SkeletonRectangle/SkeletonRectangle.st.css.js +2 -2
- package/dist/esm/Slider/Slider.st.css.js +2 -2
- package/dist/esm/SocialButton/SocialButton.st.css.js +2 -2
- package/dist/esm/SocialPostPreview/SocialPostPreview.st.css.js +2 -2
- package/dist/esm/SocialPostPreview/components/FacebookPost.st.css.js +2 -2
- package/dist/esm/SocialPostPreview/components/InstagramPost.st.css.js +2 -2
- package/dist/esm/SocialPreview/SocialPreview.st.css.js +2 -2
- package/dist/esm/SortableGridBase/SortableGridBase.st.css.js +2 -2
- package/dist/esm/SparklineChart/ChartTooltip.st.css.js +2 -2
- package/dist/esm/SparklineChart/SparklineChart.st.css.js +2 -2
- package/dist/esm/StackedBarChart/StackedBarChart.st.css.js +2 -2
- package/dist/esm/StarsRatingBar/components/StarsRatingBar.st.css.js +2 -2
- package/dist/esm/StatisticsWidget/StatisticsItem/StatisticsItem.st.css.js +2 -2
- package/dist/esm/StatisticsWidget/StatisticsWidget.st.css.js +2 -2
- package/dist/esm/StatusIndicator/StatusIndicator.st.css.js +4 -3
- package/dist/esm/StatusToast/StatusToast.st.css.js +2 -2
- package/dist/esm/Stepper/Stepper.st.css.js +2 -2
- package/dist/esm/Stepper/components/Step.st.css.js +2 -2
- package/dist/esm/Stepper/components/StepMarker.st.css.js +2 -2
- package/dist/esm/Table/DataTable/DataTable.st.css.js +2 -2
- package/dist/esm/Table/DataTable/components/DataTableRow.st.css.js +2 -2
- package/dist/esm/Table/DataTable/components/DataTableRowVirtual.st.css.js +2 -2
- package/dist/esm/Table/DataTable/docs/Example.st.css.js +2 -2
- package/dist/esm/Table/FloatingScrollBar/FloatingScrollBar.st.css.js +2 -2
- package/dist/esm/Table/Table.st.css.js +2 -2
- package/dist/esm/TableActionCell/TableActionCell.st.css.js +2 -2
- package/dist/esm/TableListHeader/TableListHeader.st.css.js +2 -2
- package/dist/esm/TableListItem/TableListItem.st.css.js +3 -3
- package/dist/esm/TableToolbar/TableToolbar.st.css.js +2 -2
- package/dist/esm/Tabs/Tabs.st.css.js +2 -2
- package/dist/esm/Tag/Tag.st.css.js +2 -2
- package/dist/esm/TagList/TagList.st.css.js +2 -2
- package/dist/esm/TestimonialList/TestimonialList.st.css.js +2 -2
- package/dist/esm/Text/Caption.st.css.js +2 -2
- package/dist/esm/Text/Text.st.css.js +2 -2
- package/dist/esm/TextButton/TextButton.st.css.js +2 -2
- package/dist/esm/Themes/brand/Brand.st.css.js +2 -2
- package/dist/esm/Themes/brand/Foundations/colors.st.css.js +2 -2
- package/dist/esm/Themes/brand/components/Button/Button.st.css.js +2 -2
- package/dist/esm/Themes/brand/components/Heading/Heading.st.css.js +2 -2
- package/dist/esm/Themes/brand/components/InputWithLabel/InputWithLabel.st.css.js +2 -2
- package/dist/esm/Themes/brand/components/InputWithLabel/LabelledElement.st.css.js +2 -2
- package/dist/esm/Themes/brand/components/Text/Text.st.css.js +2 -2
- package/dist/esm/Thumbnail/Thumbnail.st.css.js +2 -2
- package/dist/esm/TimeInput/TimeInput.st.css.js +2 -2
- package/dist/esm/TimeTable/TimeTable.st.css.js +2 -2
- package/dist/esm/TimeTable/components/Item.st.css.js +2 -2
- package/dist/esm/Timeline/Timeline.st.css.js +2 -2
- package/dist/esm/Timeline/TimelineItem.st.css.js +3 -3
- package/dist/esm/Toast/Toast.st.css.js +2 -2
- package/dist/esm/ToastContainer/ToastContainer.st.css.js +2 -2
- package/dist/esm/ToggleButton/ToggleButton.st.css.js +2 -2
- package/dist/esm/ToggleSwitch/ToggleSwitch.st.css.js +2 -2
- package/dist/esm/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCore.st.css.js +2 -2
- package/dist/esm/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreColor.st.css.js +2 -2
- package/dist/esm/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreLayout.st.css.js +2 -2
- package/dist/esm/ToggleSwitch/ToggleSwitchCore/ToggleSwitchCoreStyle.st.css.js +2 -2
- package/dist/esm/Tooltip/Tooltip.st.css.js +2 -2
- package/dist/esm/TopBanner/TopBanner.st.css.js +2 -2
- package/dist/esm/TrendIndicator/TrendIndicator.st.css.js +2 -2
- package/dist/esm/VariableInput/VariableInput.st.css.js +3 -3
- package/dist/esm/VerticalTabsIconItem/VerticalTabsIconItem.st.css.js +3 -3
- package/dist/esm/VerticalTabsItem/VerticalTabsItem.st.css.js +3 -3
- package/dist/esm/WixDesignSystemProvider/WixDesignSystemProvider.st.css.js +2 -2
- package/dist/esm/WixDesignSystemProvider/madefor.st.css.js +2 -2
- package/dist/esm/WixDesignSystemProvider/newColorsBranding.st.css.js +2 -2
- package/dist/esm/common/AdaptiveHeading/AdaptiveHeading.st.css.js +2 -2
- package/dist/esm/common/Ellipsis/Ellipsis.st.css.js +3 -3
- package/dist/esm/common/Ellipsis/components/TextComponent/TextComponent.st.css.js +3 -3
- package/dist/esm/common/FluidColumns/FluidColumns.st.css.js +3 -3
- package/dist/esm/common/Focusable/Focusable.st.css.js +2 -2
- package/dist/esm/common/styles/visuallyHidden.st.css.js +2 -2
- package/dist/esm/dnd-styles/dnd-styles.st.css.js +2 -2
- package/dist/esm/providers/useOverlayScrollbar/useOverlayScrollbar.initialization.st.css.js +3 -3
- package/dist/esm/providers/useOverlayScrollbar/useOverlayScrollbar.st.css.js +2 -2
- package/dist/esm/version.js +1 -1
- package/dist/statics/design-system.cjs.min.js +31 -31
- package/dist/statics/design-system.esm.min.js +28 -28
- package/dist/statics/design-system.umd.js +640 -630
- package/dist/statics/design-system.umd.min.js +17 -17
- package/dist/statics/styles-default.global.css +1 -1
- package/dist/statics/styles-studio.global.css +1 -1
- package/dist/statics/styles-wixel.global.css +1 -1
- package/dist/statics/styles.global.css +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/CDN_URLS.d.ts +5 -5
- package/dist/types/Image/Image.d.ts +1 -1
- package/dist/types/Image/Image.d.ts.map +1 -1
- package/dist/types/StarsRatingBar/index.d.ts +5 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
- package/styles-default.global.css +1 -1
- package/styles-studio.global.css +1 -1
- package/styles-wixel.global.css +1 -1
- package/styles.global.css +1 -1
|
@@ -0,0 +1,2891 @@
|
|
|
1
|
+
|
|
2
|
+
## Feature Examples
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Structure
|
|
6
|
+
- description: <p>Table structures can vary, but they can include up to four elements:</p><li><code><TableToolbar/></code> that displays table titles, filters and actions. </li><li><code><Table.SubToolbar/></code> that displays content related to toolbar actions (optional).</li><li><code><Table.Titlebar/></code> that displays titles in data columns (optional).</li><li><code><Table.Content/></code> that shows rows of data.</li>
|
|
7
|
+
- example:
|
|
8
|
+
```jsx
|
|
9
|
+
() => {
|
|
10
|
+
const data = Array(5).fill({
|
|
11
|
+
item: 'Data',
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const columns = Array(1).fill({
|
|
15
|
+
title: 'Titlebar',
|
|
16
|
+
render: row => row.item,
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<Card hideOverflow>
|
|
21
|
+
<Table data={data} columns={columns}>
|
|
22
|
+
<TableToolbar>
|
|
23
|
+
<TableToolbar.Title>Toolbar</TableToolbar.Title>
|
|
24
|
+
</TableToolbar>
|
|
25
|
+
<Table.SubToolbar>
|
|
26
|
+
<TableToolbar.Label>Subtoolbar</TableToolbar.Label>
|
|
27
|
+
</Table.SubToolbar>
|
|
28
|
+
<Table.Content />
|
|
29
|
+
</Table>
|
|
30
|
+
</Card>
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Skin
|
|
36
|
+
- description: <p>Choose between two colors for column title bars by using the <code>skin</code> prop. </p><li><code>standard</code> is used for common cases (default). </li><li><code>neutral</code> is used to minimize the emphasis on column titles. It's also common for tables that don't support sorting.</li>
|
|
37
|
+
- example:
|
|
38
|
+
```jsx
|
|
39
|
+
() => {
|
|
40
|
+
const records = [
|
|
41
|
+
{
|
|
42
|
+
name: `Light grey hoodie`,
|
|
43
|
+
SKU: '00224239',
|
|
44
|
+
price: '$59.00',
|
|
45
|
+
inventory: 'In stock',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: `Black watch`,
|
|
49
|
+
SKU: '00352464',
|
|
50
|
+
price: '$229.00',
|
|
51
|
+
inventory: 'In stock',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
name: 'Reading glasses',
|
|
55
|
+
SKU: '00486430',
|
|
56
|
+
price: '$69.00',
|
|
57
|
+
inventory: 'In stock',
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: 'Leather shoes',
|
|
61
|
+
SKU: '00515642',
|
|
62
|
+
price: '$129.00',
|
|
63
|
+
inventory: 'Out of stock',
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
const columns = [
|
|
67
|
+
{
|
|
68
|
+
title: 'Name',
|
|
69
|
+
render: row => row.name,
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
title: 'SKU',
|
|
73
|
+
render: row => row.SKU,
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
title: 'Inventory',
|
|
77
|
+
render: row => row.inventory,
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
title: 'Price',
|
|
81
|
+
render: row => row.price,
|
|
82
|
+
},
|
|
83
|
+
];
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
87
|
+
<Table skin="standard" data={records} columns={columns}>
|
|
88
|
+
<Table.Content />
|
|
89
|
+
</Table>
|
|
90
|
+
<Table skin="neutral" data={records} columns={columns}>
|
|
91
|
+
<Table.Content />
|
|
92
|
+
</Table>
|
|
93
|
+
</StorybookComponents.Stack>
|
|
94
|
+
);
|
|
95
|
+
};
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Row vertical padding
|
|
99
|
+
- description: <p>Use <code>rowVerticalPadding</code> to control the whitespace above and below row data. Choose one of the following options: </p><li><code>xxTiny</code> - Adds 3px padding. Use it to create very compact tables that contain text only. </li><li><code>xTiny</code> - Adds 6px padding. Use it to create dense tables with short content.</li><li><code>tiny</code> - Adds 12px padding. Use it to create dense tables or for rows that contain media elements, such as images or avatars.</li><li><code>small</code> (default) - Adds 15px padding. Use this for common cases.</li><li><code>medium</code> - Adds 18px padding. Use this for short data lists.</li><li><code>large</code> - Adds 24px padding. Use sparingly for short data lists with a few items only.</li>
|
|
100
|
+
- example:
|
|
101
|
+
```jsx
|
|
102
|
+
() => {
|
|
103
|
+
const generateRecords = (item) => [
|
|
104
|
+
{ item: item },
|
|
105
|
+
{ item: item },
|
|
106
|
+
{ item: item },
|
|
107
|
+
];
|
|
108
|
+
const columns = [{ title: 'Vertical padding', render: (row) => row.item }];
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
112
|
+
<Table
|
|
113
|
+
rowVerticalPadding="xxTiny"
|
|
114
|
+
data={generateRecords('xxTiny')}
|
|
115
|
+
columns={columns}
|
|
116
|
+
>
|
|
117
|
+
<Table.Content />
|
|
118
|
+
</Table>
|
|
119
|
+
<Table
|
|
120
|
+
rowVerticalPadding="xTiny"
|
|
121
|
+
data={generateRecords('xTiny')}
|
|
122
|
+
columns={columns}
|
|
123
|
+
>
|
|
124
|
+
<Table.Content />
|
|
125
|
+
</Table>
|
|
126
|
+
<Table
|
|
127
|
+
rowVerticalPadding="tiny"
|
|
128
|
+
data={generateRecords('Tiny')}
|
|
129
|
+
columns={columns}
|
|
130
|
+
>
|
|
131
|
+
<Table.Content />
|
|
132
|
+
</Table>
|
|
133
|
+
<Table
|
|
134
|
+
rowVerticalPadding="small"
|
|
135
|
+
data={generateRecords('Small (default)')}
|
|
136
|
+
columns={columns}
|
|
137
|
+
>
|
|
138
|
+
<Table.Content />
|
|
139
|
+
</Table>
|
|
140
|
+
<Table
|
|
141
|
+
rowVerticalPadding="medium"
|
|
142
|
+
data={generateRecords('Medium')}
|
|
143
|
+
columns={columns}
|
|
144
|
+
>
|
|
145
|
+
<Table.Content />
|
|
146
|
+
</Table>
|
|
147
|
+
<Table
|
|
148
|
+
rowVerticalPadding="large"
|
|
149
|
+
data={generateRecords('Large')}
|
|
150
|
+
columns={columns}
|
|
151
|
+
>
|
|
152
|
+
<Table.Content />
|
|
153
|
+
</Table>
|
|
154
|
+
</StorybookComponents.Stack>
|
|
155
|
+
);
|
|
156
|
+
};
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Width
|
|
160
|
+
- description: <p>Specify table width in pixels or percentage with the <code>width</code> property. If not set, table will have the same width as its parent container.</p>
|
|
161
|
+
- example:
|
|
162
|
+
```jsx
|
|
163
|
+
() => {
|
|
164
|
+
const records = [
|
|
165
|
+
{
|
|
166
|
+
name: `Light grey hoodie`,
|
|
167
|
+
SKU: '00224239',
|
|
168
|
+
price: '$59.00',
|
|
169
|
+
inventory: 'In stock',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: `Black watch`,
|
|
173
|
+
SKU: '00352464',
|
|
174
|
+
price: '$229.00',
|
|
175
|
+
inventory: 'In stock',
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: 'Reading glasses',
|
|
179
|
+
SKU: '00486430',
|
|
180
|
+
price: '$69.00',
|
|
181
|
+
inventory: 'In stock',
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'Leather shoes',
|
|
185
|
+
SKU: '00515642',
|
|
186
|
+
price: '$129.00',
|
|
187
|
+
inventory: 'Out of stock',
|
|
188
|
+
},
|
|
189
|
+
];
|
|
190
|
+
const columns = [
|
|
191
|
+
{
|
|
192
|
+
title: 'Name',
|
|
193
|
+
render: row => row.name,
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
title: 'SKU',
|
|
197
|
+
render: row => row.SKU,
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
title: 'Inventory',
|
|
201
|
+
render: row => row.inventory,
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
title: 'Price',
|
|
205
|
+
render: row => row.price,
|
|
206
|
+
},
|
|
207
|
+
];
|
|
208
|
+
|
|
209
|
+
return (
|
|
210
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
211
|
+
<Table data={records} columns={columns} width="100%">
|
|
212
|
+
<Table.Content />
|
|
213
|
+
</Table>
|
|
214
|
+
<Table data={records} columns={columns} width="80%">
|
|
215
|
+
<Table.Content />
|
|
216
|
+
</Table>
|
|
217
|
+
</StorybookComponents.Stack>
|
|
218
|
+
);
|
|
219
|
+
};
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
### Number of columns
|
|
223
|
+
- description: <p>Define data columns via the <code>columns</code> array. Table can have any number of columns.</p>
|
|
224
|
+
- example:
|
|
225
|
+
```jsx
|
|
226
|
+
() => {
|
|
227
|
+
const records = [
|
|
228
|
+
{
|
|
229
|
+
name: `Light grey hoodie`,
|
|
230
|
+
SKU: '00224239',
|
|
231
|
+
price: '$59.00',
|
|
232
|
+
inventory: 'In stock',
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
name: `Black watch`,
|
|
236
|
+
SKU: '00352464',
|
|
237
|
+
price: '$229.00',
|
|
238
|
+
inventory: 'In stock',
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
name: 'Reading glasses',
|
|
242
|
+
SKU: '00486430',
|
|
243
|
+
price: '$69.00',
|
|
244
|
+
inventory: 'In stock',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
name: 'Leather shoes',
|
|
248
|
+
SKU: '00515642',
|
|
249
|
+
price: '$129.00',
|
|
250
|
+
inventory: 'Out of stock',
|
|
251
|
+
},
|
|
252
|
+
];
|
|
253
|
+
|
|
254
|
+
const twocolumns = [
|
|
255
|
+
{
|
|
256
|
+
title: 'Name',
|
|
257
|
+
render: row => row.name,
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
title: 'Price',
|
|
261
|
+
render: row => row.price,
|
|
262
|
+
},
|
|
263
|
+
];
|
|
264
|
+
|
|
265
|
+
const fourcolumns = [
|
|
266
|
+
{
|
|
267
|
+
title: 'Name',
|
|
268
|
+
render: row => row.name,
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
title: 'SKU',
|
|
272
|
+
render: row => row.SKU,
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
title: 'Inventory',
|
|
276
|
+
render: row => row.inventory,
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
title: 'Price',
|
|
280
|
+
render: row => row.price,
|
|
281
|
+
},
|
|
282
|
+
];
|
|
283
|
+
|
|
284
|
+
return (
|
|
285
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
286
|
+
<Table data={records} columns={twocolumns}>
|
|
287
|
+
<Table.Content />
|
|
288
|
+
</Table>
|
|
289
|
+
<Table data={records} columns={fourcolumns}>
|
|
290
|
+
<Table.Content />
|
|
291
|
+
</Table>
|
|
292
|
+
</StorybookComponents.Stack>
|
|
293
|
+
);
|
|
294
|
+
};
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
### Column alignment
|
|
298
|
+
- description: <p>Control content alignment in a column with the <code>align</code> prop. It supports 3 options:</p><li><code>start</code> (default)</li><li><code>center</code> </li><li><code>end</code> </li>
|
|
299
|
+
- example:
|
|
300
|
+
```jsx
|
|
301
|
+
() => {
|
|
302
|
+
const data = [
|
|
303
|
+
{
|
|
304
|
+
column1: 'Start aligned column',
|
|
305
|
+
column2: 'Center',
|
|
306
|
+
column3: 'End',
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
column1: 'Start',
|
|
310
|
+
column2: 'Center aligned column',
|
|
311
|
+
column3: 'End',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
column1: 'Start',
|
|
315
|
+
column2: 'Center',
|
|
316
|
+
column3: 'End aligned column',
|
|
317
|
+
},
|
|
318
|
+
];
|
|
319
|
+
|
|
320
|
+
const columns = [
|
|
321
|
+
{ title: 'Align', align: 'start', render: row => row.column1 },
|
|
322
|
+
{ title: 'Align', align: 'center', render: row => row.column2 },
|
|
323
|
+
{ title: 'Align', align: 'end', render: row => row.column3 },
|
|
324
|
+
];
|
|
325
|
+
|
|
326
|
+
return (
|
|
327
|
+
<Card>
|
|
328
|
+
<Table data={data} columns={columns} rowVerticalPadding="medium">
|
|
329
|
+
<Table.Content />
|
|
330
|
+
</Table>
|
|
331
|
+
</Card>
|
|
332
|
+
);
|
|
333
|
+
};
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Column width
|
|
337
|
+
- description: <p>Specify width of each column with <code>width</code> prop. If not specified, columns will be sized equally.</p>
|
|
338
|
+
- example:
|
|
339
|
+
```jsx
|
|
340
|
+
() => {
|
|
341
|
+
const data = [
|
|
342
|
+
{
|
|
343
|
+
column1: '60%',
|
|
344
|
+
column2: '25%',
|
|
345
|
+
column3: '15%',
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
column1: '60%',
|
|
349
|
+
column2: '25%',
|
|
350
|
+
column3: '15%',
|
|
351
|
+
},
|
|
352
|
+
{
|
|
353
|
+
column1: '60%',
|
|
354
|
+
column2: '25%',
|
|
355
|
+
column3: '15%',
|
|
356
|
+
},
|
|
357
|
+
];
|
|
358
|
+
|
|
359
|
+
const columns = [
|
|
360
|
+
{ title: 'Column width', width: '60%', render: row => row.column1 },
|
|
361
|
+
{ title: 'Column width', width: '25%', render: row => row.column2 },
|
|
362
|
+
{ title: 'Column width', width: '15%', render: row => row.column3 },
|
|
363
|
+
];
|
|
364
|
+
|
|
365
|
+
return (
|
|
366
|
+
<Card>
|
|
367
|
+
<Table data={data} columns={columns} rowVerticalPadding="medium">
|
|
368
|
+
<Table.Content />
|
|
369
|
+
</Table>
|
|
370
|
+
</Card>
|
|
371
|
+
);
|
|
372
|
+
};
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Column info
|
|
376
|
+
- description: <p>Add a tooltip to give additional information about a specific column using <code>infoTooltipProps</code>. Style the tooltip message with all common <code><Tooltip/></code> properties.</p>
|
|
377
|
+
- example:
|
|
378
|
+
```jsx
|
|
379
|
+
() => {
|
|
380
|
+
const data = [
|
|
381
|
+
{
|
|
382
|
+
name: `Light grey hoodie`,
|
|
383
|
+
SKU: '00224239',
|
|
384
|
+
price: '$59.00',
|
|
385
|
+
inventory: 'In stock',
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
name: `Black watch`,
|
|
389
|
+
SKU: '00352464',
|
|
390
|
+
price: '$229.00',
|
|
391
|
+
inventory: 'In stock',
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
name: 'Reading glasses',
|
|
395
|
+
SKU: '00486430',
|
|
396
|
+
price: '$69.00',
|
|
397
|
+
inventory: 'In stock',
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
name: 'Leather shoes',
|
|
401
|
+
SKU: '00515642',
|
|
402
|
+
price: '$129.00',
|
|
403
|
+
inventory: 'Out of stock',
|
|
404
|
+
},
|
|
405
|
+
];
|
|
406
|
+
|
|
407
|
+
const columns = [
|
|
408
|
+
{
|
|
409
|
+
title: 'Name',
|
|
410
|
+
infoTooltipProps: {
|
|
411
|
+
content: 'Info explaining what this column data is about',
|
|
412
|
+
},
|
|
413
|
+
render: row => row.name,
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
title: 'SKU',
|
|
417
|
+
infoTooltipProps: {
|
|
418
|
+
content: 'Info explaining what this column data is about',
|
|
419
|
+
},
|
|
420
|
+
render: row => row.SKU,
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
title: 'Inventory',
|
|
424
|
+
infoTooltipProps: {
|
|
425
|
+
content: 'Info explaining what this column data is about',
|
|
426
|
+
},
|
|
427
|
+
render: row => row.inventory,
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
title: 'Price',
|
|
431
|
+
render: row => row.price,
|
|
432
|
+
},
|
|
433
|
+
];
|
|
434
|
+
|
|
435
|
+
return (
|
|
436
|
+
<Table data={data} columns={columns} rowVerticalPadding="medium">
|
|
437
|
+
<Table.Content />
|
|
438
|
+
</Table>
|
|
439
|
+
);
|
|
440
|
+
};
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
### Row content
|
|
444
|
+
- description: <p>Add any required content to the table cells. It accepts any component or a composition of multiple elements.</p>
|
|
445
|
+
- example:
|
|
446
|
+
```jsx
|
|
447
|
+
() => {
|
|
448
|
+
const recordsExample1 = [
|
|
449
|
+
{
|
|
450
|
+
name: <StorybookComponents.Placeholder height="36px" />,
|
|
451
|
+
SKU: <StorybookComponents.Placeholder height="36px" />,
|
|
452
|
+
price: <StorybookComponents.Placeholder height="36px" />,
|
|
453
|
+
inventory: <StorybookComponents.Placeholder height="36px" />,
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
name: <StorybookComponents.Placeholder height="36px" />,
|
|
457
|
+
SKU: <StorybookComponents.Placeholder height="36px" />,
|
|
458
|
+
price: <StorybookComponents.Placeholder height="36px" />,
|
|
459
|
+
inventory: <StorybookComponents.Placeholder height="36px" />,
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
name: <StorybookComponents.Placeholder height="36px" />,
|
|
463
|
+
SKU: <StorybookComponents.Placeholder height="36px" />,
|
|
464
|
+
price: <StorybookComponents.Placeholder height="36px" />,
|
|
465
|
+
inventory: <StorybookComponents.Placeholder height="36px" />,
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
name: <StorybookComponents.Placeholder height="36px" />,
|
|
469
|
+
SKU: <StorybookComponents.Placeholder height="36px" />,
|
|
470
|
+
price: <StorybookComponents.Placeholder height="36px" />,
|
|
471
|
+
inventory: <StorybookComponents.Placeholder height="36px" />,
|
|
472
|
+
},
|
|
473
|
+
];
|
|
474
|
+
|
|
475
|
+
const recordsExample2 = [
|
|
476
|
+
{
|
|
477
|
+
name: `Light grey hoodie`,
|
|
478
|
+
SKU: '00224239',
|
|
479
|
+
price: '$59.00',
|
|
480
|
+
inventory: 'In stock',
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
name: `Black watch`,
|
|
484
|
+
SKU: '00352464',
|
|
485
|
+
price: '$229.00',
|
|
486
|
+
inventory: 'In stock',
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
name: 'Reading glasses',
|
|
490
|
+
SKU: '00486430',
|
|
491
|
+
price: '$69.00',
|
|
492
|
+
inventory: 'In stock',
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
name: 'Leather shoes',
|
|
496
|
+
SKU: '00515642',
|
|
497
|
+
price: '$129.00',
|
|
498
|
+
inventory: 'Out of stock',
|
|
499
|
+
},
|
|
500
|
+
];
|
|
501
|
+
|
|
502
|
+
const recordsExample3 = [
|
|
503
|
+
{
|
|
504
|
+
image: <Image src="ProductExample1.jpg" />,
|
|
505
|
+
name: `Light grey hoodie`,
|
|
506
|
+
SKU: '00224239',
|
|
507
|
+
price: '$59.00',
|
|
508
|
+
visible: (
|
|
509
|
+
<Box verticalAlign="middle" gap="SP2">
|
|
510
|
+
<ToggleSwitch checked />
|
|
511
|
+
<Text size="small" secondary>
|
|
512
|
+
Visible
|
|
513
|
+
</Text>
|
|
514
|
+
</Box>
|
|
515
|
+
),
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
image: <Image src="ProductExample2.jpg" />,
|
|
519
|
+
name: `Black watch`,
|
|
520
|
+
SKU: '00352464',
|
|
521
|
+
price: '$229.00',
|
|
522
|
+
visible: (
|
|
523
|
+
<Box verticalAlign="middle" gap="SP2">
|
|
524
|
+
<ToggleSwitch checked />
|
|
525
|
+
<Text size="small" secondary>
|
|
526
|
+
Visible
|
|
527
|
+
</Text>
|
|
528
|
+
</Box>
|
|
529
|
+
),
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
image: <Image src="ProductExample3.jpg" />,
|
|
533
|
+
name: 'Reading glasses',
|
|
534
|
+
SKU: '00486430',
|
|
535
|
+
price: '$69.00',
|
|
536
|
+
visible: (
|
|
537
|
+
<Box verticalAlign="middle" gap="SP2">
|
|
538
|
+
<ToggleSwitch />
|
|
539
|
+
<Text size="small" secondary>
|
|
540
|
+
Hidden
|
|
541
|
+
</Text>
|
|
542
|
+
</Box>
|
|
543
|
+
),
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
image: <Image src="ProductExample4.jpg" />,
|
|
547
|
+
name: 'Leather shoes',
|
|
548
|
+
SKU: '00515642',
|
|
549
|
+
price: '$129.00',
|
|
550
|
+
visible: (
|
|
551
|
+
<Box verticalAlign="middle" gap="SP2">
|
|
552
|
+
<ToggleSwitch checked />
|
|
553
|
+
<Text size="small" secondary>
|
|
554
|
+
Visible
|
|
555
|
+
</Text>
|
|
556
|
+
</Box>
|
|
557
|
+
),
|
|
558
|
+
},
|
|
559
|
+
];
|
|
560
|
+
|
|
561
|
+
const recordsExample4 = [
|
|
562
|
+
{
|
|
563
|
+
role: (
|
|
564
|
+
<Box direction="vertical" gap="3px">
|
|
565
|
+
<Text weight="normal">Account owner</Text>
|
|
566
|
+
<Text size="small" secondary>
|
|
567
|
+
Has full administrative access to the account and can manage all
|
|
568
|
+
sites.
|
|
569
|
+
</Text>
|
|
570
|
+
</Box>
|
|
571
|
+
),
|
|
572
|
+
members: (
|
|
573
|
+
<AvatarGroup type="condensed" items={[{ name: 'Matt Thompson' }]} />
|
|
574
|
+
),
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
role: (
|
|
578
|
+
<Box direction="vertical" gap="3px">
|
|
579
|
+
<Text weight="normal">Site admin</Text>
|
|
580
|
+
<Text size="small" secondary>
|
|
581
|
+
Has full access to the site but cannot edit the payment info, delete
|
|
582
|
+
or duplicate the site.
|
|
583
|
+
</Text>
|
|
584
|
+
</Box>
|
|
585
|
+
),
|
|
586
|
+
members: (
|
|
587
|
+
<AvatarGroup
|
|
588
|
+
type="condensed"
|
|
589
|
+
items={[{ name: 'Matt Thompson' }, { name: 'Luke Wheeler' }]}
|
|
590
|
+
/>
|
|
591
|
+
),
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
role: (
|
|
595
|
+
<Box direction="vertical" gap="3px">
|
|
596
|
+
<Text weight="normal">Website manager</Text>
|
|
597
|
+
<Text size="small" secondary>
|
|
598
|
+
Can edit the site, manage settings and apps but cannot access Inbox,
|
|
599
|
+
contacts and other sensitive info.
|
|
600
|
+
</Text>
|
|
601
|
+
</Box>
|
|
602
|
+
),
|
|
603
|
+
members: (
|
|
604
|
+
<AvatarGroup
|
|
605
|
+
type="condensed"
|
|
606
|
+
items={[
|
|
607
|
+
{ name: 'Matt Thompson' },
|
|
608
|
+
{ name: 'Emma Pike' },
|
|
609
|
+
{ name: 'Julia Maria Rogers' },
|
|
610
|
+
{ name: 'Margareth Simmons' },
|
|
611
|
+
]}
|
|
612
|
+
/>
|
|
613
|
+
),
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
role: (
|
|
617
|
+
<Box direction="vertical" gap="3px">
|
|
618
|
+
<Text weight="normal">Back-office manager</Text>
|
|
619
|
+
<Text size="small" secondary>
|
|
620
|
+
Can access the Wix Dashboard to manage site settings and apps but
|
|
621
|
+
cannot edit the site.
|
|
622
|
+
</Text>
|
|
623
|
+
</Box>
|
|
624
|
+
),
|
|
625
|
+
members: <AvatarGroup type="condensed" items={[{ name: 'Emma Pike' }]} />,
|
|
626
|
+
},
|
|
627
|
+
];
|
|
628
|
+
|
|
629
|
+
const columns = [
|
|
630
|
+
{ title: 'Name', render: row => row.name },
|
|
631
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
632
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
633
|
+
{ title: 'Price', render: row => row.price },
|
|
634
|
+
];
|
|
635
|
+
|
|
636
|
+
const columns2 = [
|
|
637
|
+
{ title: '', render: row => row.image, width: '60px' },
|
|
638
|
+
{ title: 'Name', render: row => row.name },
|
|
639
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
640
|
+
{ title: 'Visibility', render: row => row.visible },
|
|
641
|
+
{ title: 'Price', render: row => row.price },
|
|
642
|
+
];
|
|
643
|
+
|
|
644
|
+
const columns3 = [
|
|
645
|
+
{ title: 'Role', render: row => row.role, width: '65%' },
|
|
646
|
+
{ title: 'Members', render: row => row.members },
|
|
647
|
+
];
|
|
648
|
+
|
|
649
|
+
return (
|
|
650
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
651
|
+
<Table skin="standard" data={recordsExample1} columns={columns}>
|
|
652
|
+
<Table.Content />
|
|
653
|
+
</Table>
|
|
654
|
+
<Table
|
|
655
|
+
skin="standard"
|
|
656
|
+
data={recordsExample2}
|
|
657
|
+
columns={columns}
|
|
658
|
+
rowVerticalPadding="medium"
|
|
659
|
+
>
|
|
660
|
+
<Table.Content />
|
|
661
|
+
</Table>
|
|
662
|
+
<Table skin="standard" data={recordsExample3} columns={columns2}>
|
|
663
|
+
<Table.Content />
|
|
664
|
+
</Table>
|
|
665
|
+
<Table
|
|
666
|
+
skin="standard"
|
|
667
|
+
data={recordsExample4}
|
|
668
|
+
columns={columns3}
|
|
669
|
+
rowVerticalPadding="medium"
|
|
670
|
+
>
|
|
671
|
+
<Table.Content />
|
|
672
|
+
</Table>
|
|
673
|
+
</StorybookComponents.Stack>
|
|
674
|
+
);
|
|
675
|
+
};
|
|
676
|
+
```
|
|
677
|
+
|
|
678
|
+
### Row highlight
|
|
679
|
+
- description: <p>Emphasize specific rows that require user attention by highlighting them. Define a condition which must be matched via <code>isRowHighlight</code> function.</p><p>Highlight affects row background color and a font weight. </p>
|
|
680
|
+
- example:
|
|
681
|
+
```jsx
|
|
682
|
+
() => {
|
|
683
|
+
const records = [
|
|
684
|
+
{
|
|
685
|
+
name: `Light grey hoodie`,
|
|
686
|
+
SKU: '00224239',
|
|
687
|
+
price: '$59.00',
|
|
688
|
+
inventory: 'In stock',
|
|
689
|
+
highlight: true,
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
name: `Black watch`,
|
|
693
|
+
SKU: '00352464',
|
|
694
|
+
price: '$229.00',
|
|
695
|
+
inventory: 'In stock',
|
|
696
|
+
highlight: true,
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
name: 'Reading glasses',
|
|
700
|
+
SKU: '00486430',
|
|
701
|
+
price: '$69.00',
|
|
702
|
+
inventory: 'In stock',
|
|
703
|
+
highlight: false,
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
name: 'Leather shoes',
|
|
707
|
+
SKU: '00515642',
|
|
708
|
+
price: '$129.00',
|
|
709
|
+
inventory: 'Out of stock',
|
|
710
|
+
highlight: false,
|
|
711
|
+
},
|
|
712
|
+
];
|
|
713
|
+
|
|
714
|
+
const columns = [
|
|
715
|
+
{ title: 'Name', render: row => row.name },
|
|
716
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
717
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
718
|
+
{ title: 'Price', render: row => row.price },
|
|
719
|
+
];
|
|
720
|
+
|
|
721
|
+
return (
|
|
722
|
+
<Table
|
|
723
|
+
isRowHighlight={rowData => rowData.highlight}
|
|
724
|
+
data={records}
|
|
725
|
+
columns={columns}
|
|
726
|
+
>
|
|
727
|
+
<Table.Content />
|
|
728
|
+
</Table>
|
|
729
|
+
);
|
|
730
|
+
};
|
|
731
|
+
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
### Sorting
|
|
735
|
+
- description: <p>Allow users to find relevant data quicker by enabling column sorting.</p><p>Specify which column is sortable in columns array using the <code>sortable</code> prop.</p>
|
|
736
|
+
- example:
|
|
737
|
+
```jsx
|
|
738
|
+
() => {
|
|
739
|
+
const records = [
|
|
740
|
+
{
|
|
741
|
+
name: `Light grey hoodie`,
|
|
742
|
+
SKU: '00224239',
|
|
743
|
+
price: '$59.00',
|
|
744
|
+
inventory: 'In stock',
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: `Black watch`,
|
|
748
|
+
SKU: '00352464',
|
|
749
|
+
price: '$229.00',
|
|
750
|
+
inventory: 'In stock',
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
name: 'Reading glasses',
|
|
754
|
+
SKU: '00486430',
|
|
755
|
+
price: '$69.00',
|
|
756
|
+
inventory: 'In stock',
|
|
757
|
+
},
|
|
758
|
+
{
|
|
759
|
+
name: 'Leather shoes',
|
|
760
|
+
SKU: '00515642',
|
|
761
|
+
price: '$129.00',
|
|
762
|
+
inventory: 'Out of stock',
|
|
763
|
+
},
|
|
764
|
+
];
|
|
765
|
+
|
|
766
|
+
const columns = [
|
|
767
|
+
{ title: 'Name', render: row => row.name, sortable: true },
|
|
768
|
+
{ title: 'SKU', render: row => row.SKU, sortable: true },
|
|
769
|
+
{
|
|
770
|
+
title: 'Inventory',
|
|
771
|
+
render: row => row.inventory,
|
|
772
|
+
sortable: true,
|
|
773
|
+
sortDescending: false,
|
|
774
|
+
},
|
|
775
|
+
{ title: 'Price', render: row => row.price, sortable: true },
|
|
776
|
+
];
|
|
777
|
+
|
|
778
|
+
return (
|
|
779
|
+
<Table data={records} columns={columns} rowVerticalPadding="medium">
|
|
780
|
+
<Table.Content />
|
|
781
|
+
</Table>
|
|
782
|
+
);
|
|
783
|
+
};
|
|
784
|
+
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### Expand rows
|
|
788
|
+
- description: <p>Reveal more details about each row by allowing rows to expand. Define whether a specific row can be expanded or not with the <code>expandable</code> prop in <code>data</code> array. </p><p>By default one row can be expanded at a time only. Allow users to expand multiple rows simultaneously with the <code>allowMultiDetailsExpansion</code> prop. </p><p>Use the <code>rowDetails</code> prop to pass content to display once row is expanded. Control whether content has paddings or not with the <code>removeRowDetailsPadding</code> prop. Remove paddings when you want to display another table inside row details.</p>
|
|
789
|
+
- example:
|
|
790
|
+
```jsx
|
|
791
|
+
() => {
|
|
792
|
+
const records = [
|
|
793
|
+
{
|
|
794
|
+
name: 'Light grey hoodie',
|
|
795
|
+
expandable: true,
|
|
796
|
+
expanded: true,
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
name: 'Black watch',
|
|
800
|
+
expandable: true,
|
|
801
|
+
expanded: true,
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
name: 'Reading glasses',
|
|
805
|
+
expandable: true,
|
|
806
|
+
expanded: true,
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
name: 'Leather shoes',
|
|
810
|
+
expandable: true,
|
|
811
|
+
expanded: true,
|
|
812
|
+
},
|
|
813
|
+
];
|
|
814
|
+
|
|
815
|
+
const renderRowDetails = row => {
|
|
816
|
+
if (row.expandable) {
|
|
817
|
+
return <StorybookComponents.Placeholder height="120px" />;
|
|
818
|
+
}
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
const columns = [
|
|
822
|
+
{ title: 'Name', render: row => row.name },
|
|
823
|
+
{
|
|
824
|
+
render: row =>
|
|
825
|
+
row.expandable ? (
|
|
826
|
+
<TableActionCell
|
|
827
|
+
size="small"
|
|
828
|
+
primaryAction={{
|
|
829
|
+
text: !row.expanded ? 'Expand' : 'Collapse',
|
|
830
|
+
onClick: (row.expanded = !row.expanded),
|
|
831
|
+
}}
|
|
832
|
+
/>
|
|
833
|
+
) : (
|
|
834
|
+
''
|
|
835
|
+
),
|
|
836
|
+
},
|
|
837
|
+
];
|
|
838
|
+
|
|
839
|
+
return (
|
|
840
|
+
<StorybookComponents.Stack>
|
|
841
|
+
<Table
|
|
842
|
+
rowDetails={row => renderRowDetails(row)}
|
|
843
|
+
data={records}
|
|
844
|
+
columns={columns}
|
|
845
|
+
>
|
|
846
|
+
<Table.Content />
|
|
847
|
+
</Table>
|
|
848
|
+
<Table
|
|
849
|
+
rowDetails={row => renderRowDetails(row)}
|
|
850
|
+
removeRowDetailsPadding={true}
|
|
851
|
+
allowMultiDetailsExpansion={true}
|
|
852
|
+
data={records}
|
|
853
|
+
columns={columns}
|
|
854
|
+
>
|
|
855
|
+
<Table.Content />
|
|
856
|
+
</Table>
|
|
857
|
+
</StorybookComponents.Stack>
|
|
858
|
+
);
|
|
859
|
+
};
|
|
860
|
+
```
|
|
861
|
+
|
|
862
|
+
### Column title visibility
|
|
863
|
+
- description: <p>Specify whether column titles are visible with the <code>titleBarDisplay</code> prop.</p><p>Hide the titlebar only when column values are self explanatory.</p><p><em>Note: </em>Column titles should be announced for assistive technology users even when titlebar is visually hidden.</p>
|
|
864
|
+
- example:
|
|
865
|
+
```jsx
|
|
866
|
+
() => {
|
|
867
|
+
const records = [
|
|
868
|
+
{
|
|
869
|
+
name: `Light grey hoodie`,
|
|
870
|
+
SKU: '00224239',
|
|
871
|
+
price: '$59.00',
|
|
872
|
+
inventory: 'In stock',
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
name: `Black watch`,
|
|
876
|
+
SKU: '00352464',
|
|
877
|
+
price: '$229.00',
|
|
878
|
+
inventory: 'In stock',
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
name: 'Reading glasses',
|
|
882
|
+
SKU: '00486430',
|
|
883
|
+
price: '$69.00',
|
|
884
|
+
inventory: 'In stock',
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
name: 'Leather shoes',
|
|
888
|
+
SKU: '00515642',
|
|
889
|
+
price: '$129.00',
|
|
890
|
+
inventory: 'Out of stock',
|
|
891
|
+
},
|
|
892
|
+
];
|
|
893
|
+
|
|
894
|
+
const columns = [
|
|
895
|
+
{ title: 'Name', render: row => row.name },
|
|
896
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
897
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
898
|
+
{ title: 'Price', render: row => row.price },
|
|
899
|
+
];
|
|
900
|
+
|
|
901
|
+
return (
|
|
902
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
903
|
+
<Card hideOverflow>
|
|
904
|
+
<Table data={records} columns={columns} rowVerticalPadding="medium">
|
|
905
|
+
<TableToolbar>
|
|
906
|
+
<TableToolbar.ItemGroup position="start">
|
|
907
|
+
<TableToolbar.Item>
|
|
908
|
+
<TableToolbar.Title>Products</TableToolbar.Title>
|
|
909
|
+
</TableToolbar.Item>
|
|
910
|
+
</TableToolbar.ItemGroup>
|
|
911
|
+
</TableToolbar>
|
|
912
|
+
<Table.Content titleBarVisible={true} />
|
|
913
|
+
</Table>
|
|
914
|
+
</Card>
|
|
915
|
+
<Card hideOverflow>
|
|
916
|
+
<Table data={records} columns={columns} rowVerticalPadding="medium">
|
|
917
|
+
<TableToolbar>
|
|
918
|
+
<TableToolbar.ItemGroup position="start">
|
|
919
|
+
<TableToolbar.Item>
|
|
920
|
+
<TableToolbar.Title>Products</TableToolbar.Title>
|
|
921
|
+
</TableToolbar.Item>
|
|
922
|
+
</TableToolbar.ItemGroup>
|
|
923
|
+
</TableToolbar>
|
|
924
|
+
<Table.Content titleBarVisible={false} />
|
|
925
|
+
</Table>
|
|
926
|
+
</Card>
|
|
927
|
+
</StorybookComponents.Stack>
|
|
928
|
+
);
|
|
929
|
+
};
|
|
930
|
+
```
|
|
931
|
+
|
|
932
|
+
### Horizontal scroll
|
|
933
|
+
- description: <p>Allow table content to exceed the width of a table itself by enabling <code>horizontalScroll</code>. Use it to support any number of data columns.</p>
|
|
934
|
+
- example:
|
|
935
|
+
```jsx
|
|
936
|
+
() => {
|
|
937
|
+
const records = [
|
|
938
|
+
{
|
|
939
|
+
name: `Light grey hoodie`,
|
|
940
|
+
SKU: '00224239',
|
|
941
|
+
price: '$59.00',
|
|
942
|
+
inventory: 'In stock',
|
|
943
|
+
items: 24,
|
|
944
|
+
collection: '2021 Winter',
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
name: `Black watch`,
|
|
948
|
+
SKU: '00352464',
|
|
949
|
+
price: '$229.00',
|
|
950
|
+
inventory: 'In stock',
|
|
951
|
+
items: 190,
|
|
952
|
+
collection: '2021 Winter',
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
name: 'Reading glasses',
|
|
956
|
+
SKU: '00486430',
|
|
957
|
+
price: '$69.00',
|
|
958
|
+
inventory: 'In stock',
|
|
959
|
+
items: 12,
|
|
960
|
+
collection: '2021 Winter',
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
name: 'Leather shoes',
|
|
964
|
+
SKU: '00515642',
|
|
965
|
+
price: '$129.00',
|
|
966
|
+
inventory: 'Out of stock',
|
|
967
|
+
items: 0,
|
|
968
|
+
collection: '2021 Winter',
|
|
969
|
+
},
|
|
970
|
+
];
|
|
971
|
+
|
|
972
|
+
const columnWidth = 240;
|
|
973
|
+
|
|
974
|
+
const primaryAction = { text: 'Edit', onClick: () => {} };
|
|
975
|
+
|
|
976
|
+
const secondaryActions = [
|
|
977
|
+
{
|
|
978
|
+
icon: <Icons.FavoriteSmall />,
|
|
979
|
+
text: 'Mark as favourite',
|
|
980
|
+
onClick: () => {},
|
|
981
|
+
},
|
|
982
|
+
];
|
|
983
|
+
|
|
984
|
+
const columns = [
|
|
985
|
+
{
|
|
986
|
+
title: 'Name',
|
|
987
|
+
render: row => row.name,
|
|
988
|
+
width: columnWidth,
|
|
989
|
+
},
|
|
990
|
+
{
|
|
991
|
+
title: 'SKU',
|
|
992
|
+
render: row => row.SKU,
|
|
993
|
+
width: columnWidth,
|
|
994
|
+
},
|
|
995
|
+
{
|
|
996
|
+
title: 'Inventory',
|
|
997
|
+
render: row => row.inventory,
|
|
998
|
+
width: columnWidth,
|
|
999
|
+
},
|
|
1000
|
+
{
|
|
1001
|
+
title: 'Items left',
|
|
1002
|
+
render: row => row.items,
|
|
1003
|
+
width: columnWidth,
|
|
1004
|
+
},
|
|
1005
|
+
{
|
|
1006
|
+
title: 'Collection',
|
|
1007
|
+
render: row => row.collection,
|
|
1008
|
+
width: columnWidth,
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
title: 'Price',
|
|
1012
|
+
render: row => row.price,
|
|
1013
|
+
width: columnWidth,
|
|
1014
|
+
},
|
|
1015
|
+
{
|
|
1016
|
+
render: () => (
|
|
1017
|
+
<TableActionCell
|
|
1018
|
+
size="small"
|
|
1019
|
+
primaryAction={primaryAction}
|
|
1020
|
+
secondaryActions={secondaryActions}
|
|
1021
|
+
moreActionsTooltipText="More actions"
|
|
1022
|
+
/>
|
|
1023
|
+
),
|
|
1024
|
+
stickyActionCell: true,
|
|
1025
|
+
width: 30,
|
|
1026
|
+
},
|
|
1027
|
+
];
|
|
1028
|
+
|
|
1029
|
+
return (
|
|
1030
|
+
<Card hideOverflow>
|
|
1031
|
+
<Table
|
|
1032
|
+
horizontalScroll
|
|
1033
|
+
stickyColumns={1}
|
|
1034
|
+
data={records}
|
|
1035
|
+
columns={columns}
|
|
1036
|
+
>
|
|
1037
|
+
<TableToolbar>
|
|
1038
|
+
<TableToolbar.ItemGroup position="start">
|
|
1039
|
+
<TableToolbar.Item>
|
|
1040
|
+
<Text size="small">4 products</Text>
|
|
1041
|
+
</TableToolbar.Item>
|
|
1042
|
+
</TableToolbar.ItemGroup>
|
|
1043
|
+
</TableToolbar>
|
|
1044
|
+
<Table.Content />
|
|
1045
|
+
</Table>
|
|
1046
|
+
</Card>
|
|
1047
|
+
);
|
|
1048
|
+
};
|
|
1049
|
+
```
|
|
1050
|
+
|
|
1051
|
+
### Bulk actions
|
|
1052
|
+
- description: <p>Allow users to act upon multiple items at once by enabling row selection with the <code>showSelection</code> prop.</p><p>Control ‘Select all’ checkbox visibility with the <code>hideBulkSelectionCheckbox</code> prop.</p>
|
|
1053
|
+
- example:
|
|
1054
|
+
```jsx
|
|
1055
|
+
() => {
|
|
1056
|
+
const records = [
|
|
1057
|
+
{
|
|
1058
|
+
name: `Light grey hoodie`,
|
|
1059
|
+
SKU: '00224239',
|
|
1060
|
+
price: '$59.00',
|
|
1061
|
+
inventory: 'In stock',
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
name: `Black watch`,
|
|
1065
|
+
SKU: '00352464',
|
|
1066
|
+
price: '$229.00',
|
|
1067
|
+
inventory: 'In stock',
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
name: 'Reading glasses',
|
|
1071
|
+
SKU: '00486430',
|
|
1072
|
+
price: '$69.00',
|
|
1073
|
+
inventory: 'In stock',
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
name: 'Leather shoes',
|
|
1077
|
+
SKU: '00515642',
|
|
1078
|
+
price: '$129.00',
|
|
1079
|
+
inventory: 'Out of stock',
|
|
1080
|
+
},
|
|
1081
|
+
];
|
|
1082
|
+
|
|
1083
|
+
const columns = [
|
|
1084
|
+
{ title: 'Name', render: row => row.name },
|
|
1085
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1086
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1087
|
+
{ title: 'Price', render: row => row.price },
|
|
1088
|
+
];
|
|
1089
|
+
|
|
1090
|
+
const MainToolbar = () => {
|
|
1091
|
+
return (
|
|
1092
|
+
<TableToolbar>
|
|
1093
|
+
<TableToolbar.ItemGroup position="start">
|
|
1094
|
+
<TableToolbar.Item>
|
|
1095
|
+
<TableToolbar.Label>4 products</TableToolbar.Label>
|
|
1096
|
+
</TableToolbar.Item>
|
|
1097
|
+
</TableToolbar.ItemGroup>
|
|
1098
|
+
</TableToolbar>
|
|
1099
|
+
);
|
|
1100
|
+
};
|
|
1101
|
+
|
|
1102
|
+
const ActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1103
|
+
<TableToolbar>
|
|
1104
|
+
<TableToolbar.ItemGroup position="start">
|
|
1105
|
+
<TableToolbar.Item>
|
|
1106
|
+
<TableToolbar.Label>{`${selectedCount} selected`}</TableToolbar.Label>
|
|
1107
|
+
</TableToolbar.Item>
|
|
1108
|
+
<TableToolbar.Item>
|
|
1109
|
+
<Box height="18px">
|
|
1110
|
+
<Divider direction="vertical" />
|
|
1111
|
+
</Box>
|
|
1112
|
+
</TableToolbar.Item>
|
|
1113
|
+
<TableToolbar.Item layout="button">
|
|
1114
|
+
<Button
|
|
1115
|
+
skin="inverted"
|
|
1116
|
+
size="small"
|
|
1117
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1118
|
+
>
|
|
1119
|
+
Export
|
|
1120
|
+
</Button>
|
|
1121
|
+
</TableToolbar.Item>
|
|
1122
|
+
</TableToolbar.ItemGroup>
|
|
1123
|
+
</TableToolbar>
|
|
1124
|
+
);
|
|
1125
|
+
|
|
1126
|
+
return (
|
|
1127
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
1128
|
+
<Card>
|
|
1129
|
+
<Table data={records} columns={columns} showSelection>
|
|
1130
|
+
<Table.ToolbarContainer>
|
|
1131
|
+
{selectionContext =>
|
|
1132
|
+
selectionContext.selectedCount === 0
|
|
1133
|
+
? MainToolbar()
|
|
1134
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1135
|
+
}
|
|
1136
|
+
</Table.ToolbarContainer>
|
|
1137
|
+
<Table.Content />
|
|
1138
|
+
</Table>
|
|
1139
|
+
</Card>
|
|
1140
|
+
<Card>
|
|
1141
|
+
<Table
|
|
1142
|
+
data={records}
|
|
1143
|
+
columns={columns}
|
|
1144
|
+
showSelection
|
|
1145
|
+
hideBulkSelectionCheckbox
|
|
1146
|
+
>
|
|
1147
|
+
<Table.ToolbarContainer>
|
|
1148
|
+
{selectionContext =>
|
|
1149
|
+
selectionContext.selectedCount === 0
|
|
1150
|
+
? MainToolbar()
|
|
1151
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1152
|
+
}
|
|
1153
|
+
</Table.ToolbarContainer>
|
|
1154
|
+
<Table.Content />
|
|
1155
|
+
</Table>
|
|
1156
|
+
</Card>
|
|
1157
|
+
</StorybookComponents.Stack>
|
|
1158
|
+
);
|
|
1159
|
+
};
|
|
1160
|
+
```
|
|
1161
|
+
|
|
1162
|
+
### Multiple bulk actions
|
|
1163
|
+
- description: <p>Display available bulk actions in the toolbar with following components:</p><li> <code><Button/></code> for main actions </li><li> <code><PopoverMenu/></code> for secondary actions</li><p></p><p><em>Note:</em> There should be no more than 3 actions visible in the toolbar at once.</p><p></p>
|
|
1164
|
+
- example:
|
|
1165
|
+
```jsx
|
|
1166
|
+
() => {
|
|
1167
|
+
const records = [
|
|
1168
|
+
{
|
|
1169
|
+
name: `Light grey hoodie`,
|
|
1170
|
+
SKU: '00224239',
|
|
1171
|
+
price: '$59.00',
|
|
1172
|
+
inventory: 'In stock',
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
name: `Black watch`,
|
|
1176
|
+
SKU: '00352464',
|
|
1177
|
+
price: '$229.00',
|
|
1178
|
+
inventory: 'In stock',
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
name: 'Reading glasses',
|
|
1182
|
+
SKU: '00486430',
|
|
1183
|
+
price: '$69.00',
|
|
1184
|
+
inventory: 'In stock',
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
name: 'Leather shoes',
|
|
1188
|
+
SKU: '00515642',
|
|
1189
|
+
price: '$129.00',
|
|
1190
|
+
inventory: 'Out of stock',
|
|
1191
|
+
},
|
|
1192
|
+
];
|
|
1193
|
+
|
|
1194
|
+
const columns = [
|
|
1195
|
+
{ title: 'Name', render: row => row.name },
|
|
1196
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1197
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1198
|
+
{ title: 'Price', render: row => row.price },
|
|
1199
|
+
];
|
|
1200
|
+
|
|
1201
|
+
const MainToolbar = () => {
|
|
1202
|
+
return (
|
|
1203
|
+
<TableToolbar>
|
|
1204
|
+
<TableToolbar.ItemGroup position="start">
|
|
1205
|
+
<TableToolbar.Item>
|
|
1206
|
+
<TableToolbar.Label>4 products</TableToolbar.Label>
|
|
1207
|
+
</TableToolbar.Item>
|
|
1208
|
+
</TableToolbar.ItemGroup>
|
|
1209
|
+
</TableToolbar>
|
|
1210
|
+
);
|
|
1211
|
+
};
|
|
1212
|
+
|
|
1213
|
+
const ActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1214
|
+
<TableToolbar>
|
|
1215
|
+
<TableToolbar.ItemGroup position="start">
|
|
1216
|
+
<TableToolbar.Item>
|
|
1217
|
+
<TableToolbar.Label>{`${selectedCount} selected`}</TableToolbar.Label>
|
|
1218
|
+
</TableToolbar.Item>
|
|
1219
|
+
<TableToolbar.Item>
|
|
1220
|
+
<Box height="18px">
|
|
1221
|
+
<Divider direction="vertical" />
|
|
1222
|
+
</Box>
|
|
1223
|
+
</TableToolbar.Item>
|
|
1224
|
+
<TableToolbar.Item layout="button">
|
|
1225
|
+
<Button
|
|
1226
|
+
skin="inverted"
|
|
1227
|
+
size="small"
|
|
1228
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1229
|
+
>
|
|
1230
|
+
Export
|
|
1231
|
+
</Button>
|
|
1232
|
+
</TableToolbar.Item>
|
|
1233
|
+
<TableToolbar.Item layout="button">
|
|
1234
|
+
<Button
|
|
1235
|
+
skin="inverted"
|
|
1236
|
+
size="small"
|
|
1237
|
+
prefixIcon={<Icons.DuplicateSmall />}
|
|
1238
|
+
>
|
|
1239
|
+
Duplicate
|
|
1240
|
+
</Button>
|
|
1241
|
+
</TableToolbar.Item>
|
|
1242
|
+
<TableToolbar.Item layout="button">
|
|
1243
|
+
<PopoverMenu
|
|
1244
|
+
textSize="small"
|
|
1245
|
+
triggerElement={
|
|
1246
|
+
<Button
|
|
1247
|
+
skin="inverted"
|
|
1248
|
+
size="small"
|
|
1249
|
+
suffixIcon={<Icons.ChevronDownSmall />}
|
|
1250
|
+
>
|
|
1251
|
+
More Actions
|
|
1252
|
+
</Button>
|
|
1253
|
+
}
|
|
1254
|
+
>
|
|
1255
|
+
<PopoverMenu.MenuItem
|
|
1256
|
+
text="Archive"
|
|
1257
|
+
prefixIcon={<Icons.ArchiveSmall />}
|
|
1258
|
+
/>
|
|
1259
|
+
<PopoverMenu.MenuItem
|
|
1260
|
+
text="Delete"
|
|
1261
|
+
prefixIcon={<Icons.DeleteSmall />}
|
|
1262
|
+
skin="destructive"
|
|
1263
|
+
/>
|
|
1264
|
+
</PopoverMenu>
|
|
1265
|
+
</TableToolbar.Item>
|
|
1266
|
+
</TableToolbar.ItemGroup>
|
|
1267
|
+
</TableToolbar>
|
|
1268
|
+
);
|
|
1269
|
+
|
|
1270
|
+
return (
|
|
1271
|
+
<Card hideOverflow>
|
|
1272
|
+
<Table data={records} columns={columns} showSelection>
|
|
1273
|
+
<Table.ToolbarContainer>
|
|
1274
|
+
{selectionContext =>
|
|
1275
|
+
selectionContext.selectedCount === 0
|
|
1276
|
+
? MainToolbar()
|
|
1277
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1278
|
+
}
|
|
1279
|
+
</Table.ToolbarContainer>
|
|
1280
|
+
<Table.Content />
|
|
1281
|
+
</Table>
|
|
1282
|
+
</Card>
|
|
1283
|
+
);
|
|
1284
|
+
};
|
|
1285
|
+
```
|
|
1286
|
+
|
|
1287
|
+
### Select all checkbox behaviour
|
|
1288
|
+
- description: <p>Control what happens when user clicks on ‘Select all’ checkbox when one or few items are already selected.</p><p>By default, the first click on indeterminate state selects all remaining items in the list. Change it to deselecting all items first with the <code>deselectRowsByDefault</code> prop.</p>
|
|
1289
|
+
- example:
|
|
1290
|
+
```jsx
|
|
1291
|
+
() => {
|
|
1292
|
+
const records = [
|
|
1293
|
+
{
|
|
1294
|
+
name: `Light grey hoodie`,
|
|
1295
|
+
SKU: '00224239',
|
|
1296
|
+
price: '$59.00',
|
|
1297
|
+
inventory: 'In stock',
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
name: `Black watch`,
|
|
1301
|
+
SKU: '00352464',
|
|
1302
|
+
price: '$229.00',
|
|
1303
|
+
inventory: 'In stock',
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: 'Reading glasses',
|
|
1307
|
+
SKU: '00486430',
|
|
1308
|
+
price: '$69.00',
|
|
1309
|
+
inventory: 'In stock',
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: 'Leather shoes',
|
|
1313
|
+
SKU: '00515642',
|
|
1314
|
+
price: '$129.00',
|
|
1315
|
+
inventory: 'Out of stock',
|
|
1316
|
+
},
|
|
1317
|
+
];
|
|
1318
|
+
|
|
1319
|
+
const columns = [
|
|
1320
|
+
{ title: 'Name', render: row => row.name },
|
|
1321
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1322
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1323
|
+
{ title: 'Price', render: row => row.price },
|
|
1324
|
+
];
|
|
1325
|
+
|
|
1326
|
+
const MainToolbar = () => {
|
|
1327
|
+
return (
|
|
1328
|
+
<TableToolbar>
|
|
1329
|
+
<TableToolbar.ItemGroup position="start">
|
|
1330
|
+
<TableToolbar.Item>
|
|
1331
|
+
<TableToolbar.Label>4 products</TableToolbar.Label>
|
|
1332
|
+
</TableToolbar.Item>
|
|
1333
|
+
</TableToolbar.ItemGroup>
|
|
1334
|
+
</TableToolbar>
|
|
1335
|
+
);
|
|
1336
|
+
};
|
|
1337
|
+
|
|
1338
|
+
const ActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1339
|
+
<TableToolbar>
|
|
1340
|
+
<TableToolbar.ItemGroup position="start">
|
|
1341
|
+
<TableToolbar.Item>
|
|
1342
|
+
<TableToolbar.Label>{`${selectedCount} selected`}</TableToolbar.Label>
|
|
1343
|
+
</TableToolbar.Item>
|
|
1344
|
+
<TableToolbar.Item>
|
|
1345
|
+
<Box height="18px">
|
|
1346
|
+
<Divider direction="vertical" />
|
|
1347
|
+
</Box>
|
|
1348
|
+
</TableToolbar.Item>
|
|
1349
|
+
<TableToolbar.Item layout="button">
|
|
1350
|
+
<Button
|
|
1351
|
+
skin="inverted"
|
|
1352
|
+
size="small"
|
|
1353
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1354
|
+
>
|
|
1355
|
+
Export
|
|
1356
|
+
</Button>
|
|
1357
|
+
</TableToolbar.Item>
|
|
1358
|
+
</TableToolbar.ItemGroup>
|
|
1359
|
+
</TableToolbar>
|
|
1360
|
+
);
|
|
1361
|
+
|
|
1362
|
+
return (
|
|
1363
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
1364
|
+
<Card>
|
|
1365
|
+
<Table
|
|
1366
|
+
showSelection
|
|
1367
|
+
data={records}
|
|
1368
|
+
columns={columns}
|
|
1369
|
+
deselectRowsByDefault={false}
|
|
1370
|
+
selectedIds={[0, 1]}
|
|
1371
|
+
>
|
|
1372
|
+
<Table.ToolbarContainer>
|
|
1373
|
+
{selectionContext =>
|
|
1374
|
+
selectionContext.selectedCount === 0
|
|
1375
|
+
? MainToolbar()
|
|
1376
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1377
|
+
}
|
|
1378
|
+
</Table.ToolbarContainer>
|
|
1379
|
+
<Table.Content />
|
|
1380
|
+
</Table>
|
|
1381
|
+
</Card>
|
|
1382
|
+
<Card>
|
|
1383
|
+
<Table
|
|
1384
|
+
showSelection
|
|
1385
|
+
data={records}
|
|
1386
|
+
columns={columns}
|
|
1387
|
+
deselectRowsByDefault={true}
|
|
1388
|
+
selectedIds={[0, 1]}
|
|
1389
|
+
>
|
|
1390
|
+
<Table.ToolbarContainer>
|
|
1391
|
+
{selectionContext =>
|
|
1392
|
+
selectionContext.selectedCount === 0
|
|
1393
|
+
? MainToolbar()
|
|
1394
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1395
|
+
}
|
|
1396
|
+
</Table.ToolbarContainer>
|
|
1397
|
+
<Table.Content />
|
|
1398
|
+
</Table>
|
|
1399
|
+
</Card>
|
|
1400
|
+
</StorybookComponents.Stack>
|
|
1401
|
+
);
|
|
1402
|
+
};
|
|
1403
|
+
```
|
|
1404
|
+
|
|
1405
|
+
### Disable selection
|
|
1406
|
+
- description: <p>Restrict users from selecting a specific row by:</p><li>Hiding a checkbox for a row when row cannot be selected in any case with the <code>unselectable</code> prop.</li><li>Disabling a checkbox for a row on a certain condition. Define this condition using the <code>selectionDisabled</code> function. Use the <code>checkboxTooltipContent</code> prop to pass a tooltip message that explains why the row is disabled .</li><p></p><p><em>Note: </em>Tooltip message will not be reachable by assistive technologies and should be used as an additional explanation only. Make sure you explain the reason why item selection is not available in alternative ways, for example by using a subtitle or a different item status. </p>
|
|
1407
|
+
- example:
|
|
1408
|
+
```jsx
|
|
1409
|
+
() => {
|
|
1410
|
+
const records = [
|
|
1411
|
+
{
|
|
1412
|
+
name: `Light grey hoodie`,
|
|
1413
|
+
SKU: '00224239',
|
|
1414
|
+
price: '$59.00',
|
|
1415
|
+
inventory: 'In stock',
|
|
1416
|
+
unselectable: true,
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
name: `Black watch`,
|
|
1420
|
+
SKU: '00352464',
|
|
1421
|
+
price: '$229.00',
|
|
1422
|
+
inventory: 'In stock',
|
|
1423
|
+
unselectable: true,
|
|
1424
|
+
},
|
|
1425
|
+
{
|
|
1426
|
+
name: 'Reading glasses',
|
|
1427
|
+
SKU: '00486430',
|
|
1428
|
+
price: '$69.00',
|
|
1429
|
+
inventory: 'In stock',
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
name: (
|
|
1433
|
+
<Box direction="vertical">
|
|
1434
|
+
<Text size="small">Leather shoes</Text>
|
|
1435
|
+
<Text size="tiny" secondary light>
|
|
1436
|
+
This item is out of stock
|
|
1437
|
+
</Text>
|
|
1438
|
+
</Box>
|
|
1439
|
+
),
|
|
1440
|
+
SKU: '00515642',
|
|
1441
|
+
price: '$129.00',
|
|
1442
|
+
inventory: 'Out of stock',
|
|
1443
|
+
checkboxTooltipContent: 'This item is out of stock',
|
|
1444
|
+
},
|
|
1445
|
+
];
|
|
1446
|
+
|
|
1447
|
+
const columns = [
|
|
1448
|
+
{ title: 'Name', render: row => row.name },
|
|
1449
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1450
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1451
|
+
{ title: 'Price', render: row => row.price },
|
|
1452
|
+
];
|
|
1453
|
+
|
|
1454
|
+
const MainToolbar = () => {
|
|
1455
|
+
return (
|
|
1456
|
+
<TableToolbar>
|
|
1457
|
+
<TableToolbar.ItemGroup position="start">
|
|
1458
|
+
<TableToolbar.Item>
|
|
1459
|
+
<TableToolbar.Label>4 products</TableToolbar.Label>
|
|
1460
|
+
</TableToolbar.Item>
|
|
1461
|
+
</TableToolbar.ItemGroup>
|
|
1462
|
+
</TableToolbar>
|
|
1463
|
+
);
|
|
1464
|
+
};
|
|
1465
|
+
|
|
1466
|
+
const ActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1467
|
+
<TableToolbar>
|
|
1468
|
+
<TableToolbar.ItemGroup position="start">
|
|
1469
|
+
<TableToolbar.Item>
|
|
1470
|
+
<TableToolbar.Label>{`${selectedCount} selected`}</TableToolbar.Label>
|
|
1471
|
+
</TableToolbar.Item>
|
|
1472
|
+
<TableToolbar.Item>
|
|
1473
|
+
<Box height="18px">
|
|
1474
|
+
<Divider direction="vertical" />
|
|
1475
|
+
</Box>
|
|
1476
|
+
</TableToolbar.Item>
|
|
1477
|
+
<TableToolbar.Item layout="button">
|
|
1478
|
+
<Button
|
|
1479
|
+
skin="inverted"
|
|
1480
|
+
size="small"
|
|
1481
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1482
|
+
>
|
|
1483
|
+
Export
|
|
1484
|
+
</Button>
|
|
1485
|
+
</TableToolbar.Item>
|
|
1486
|
+
</TableToolbar.ItemGroup>
|
|
1487
|
+
</TableToolbar>
|
|
1488
|
+
);
|
|
1489
|
+
|
|
1490
|
+
return (
|
|
1491
|
+
<Card hideOverflow>
|
|
1492
|
+
<Table
|
|
1493
|
+
showSelection
|
|
1494
|
+
data={records}
|
|
1495
|
+
columns={columns}
|
|
1496
|
+
selectionDisabled={rowData => rowData.inventory === 'Out of stock'}
|
|
1497
|
+
rowVerticalPadding="medium"
|
|
1498
|
+
>
|
|
1499
|
+
<Table.ToolbarContainer>
|
|
1500
|
+
{selectionContext =>
|
|
1501
|
+
selectionContext.selectedCount === 0
|
|
1502
|
+
? MainToolbar()
|
|
1503
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1504
|
+
}
|
|
1505
|
+
</Table.ToolbarContainer>
|
|
1506
|
+
<Table.Content />
|
|
1507
|
+
</Table>
|
|
1508
|
+
</Card>
|
|
1509
|
+
);
|
|
1510
|
+
};
|
|
1511
|
+
```
|
|
1512
|
+
|
|
1513
|
+
### Infinite scroll
|
|
1514
|
+
- description: <p>Load data to the table progressively with <code>infiniteScroll</code>.</p><p>Specify a number of items to load at once with the <code>itemsPerPage</code> prop. The rest will load on demand when the user scrolls down the list.</p><p></p><p>Define how many items will be selected in infinite scroll table when user clicks on ‘Select All’ checkbox with the <code>totalSelectableCount</code> prop. Newly loaded items that fall into a specified range will be selected automatically once loaded.</p>
|
|
1515
|
+
- example:
|
|
1516
|
+
```jsx
|
|
1517
|
+
() => {
|
|
1518
|
+
const totalProductCount = 50;
|
|
1519
|
+
const firstContainerRef = React.useRef(null);
|
|
1520
|
+
const [firstContainer, setFirstContainer] = React.useState(null);
|
|
1521
|
+
const secondContainerRef = React.useRef(null);
|
|
1522
|
+
const [secondContainer, setSecondContainer] = React.useState(null);
|
|
1523
|
+
const data = [
|
|
1524
|
+
{
|
|
1525
|
+
name: `Light grey hoodie`,
|
|
1526
|
+
SKU: '00224239',
|
|
1527
|
+
price: '$59.00',
|
|
1528
|
+
inventory: 'In stock',
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
name: `Black watch`,
|
|
1532
|
+
SKU: '00352464',
|
|
1533
|
+
price: '$229.00',
|
|
1534
|
+
inventory: 'In stock',
|
|
1535
|
+
},
|
|
1536
|
+
{
|
|
1537
|
+
name: 'Reading glasses',
|
|
1538
|
+
SKU: '00486430',
|
|
1539
|
+
price: '$69.00',
|
|
1540
|
+
inventory: 'In stock',
|
|
1541
|
+
},
|
|
1542
|
+
{
|
|
1543
|
+
name: 'Leather shoes',
|
|
1544
|
+
SKU: '00515642',
|
|
1545
|
+
price: '$129.00',
|
|
1546
|
+
inventory: 'Out of stock',
|
|
1547
|
+
},
|
|
1548
|
+
{
|
|
1549
|
+
name: `Ceramic plant pots`,
|
|
1550
|
+
SKU: '00224239',
|
|
1551
|
+
price: '$19.00',
|
|
1552
|
+
inventory: 'In stock',
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
name: `Black table lamp`,
|
|
1556
|
+
SKU: '00352464',
|
|
1557
|
+
price: '$119.00',
|
|
1558
|
+
inventory: 'In stock',
|
|
1559
|
+
},
|
|
1560
|
+
{
|
|
1561
|
+
name: 'Knitted scarf',
|
|
1562
|
+
SKU: '00486430',
|
|
1563
|
+
price: '$19.00',
|
|
1564
|
+
inventory: 'In stock',
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
name: 'Home fragrance',
|
|
1568
|
+
SKU: '00515642',
|
|
1569
|
+
price: '$89.00',
|
|
1570
|
+
inventory: 'In stock',
|
|
1571
|
+
},
|
|
1572
|
+
{
|
|
1573
|
+
name: `Light grey hoodie`,
|
|
1574
|
+
SKU: '00224239',
|
|
1575
|
+
price: '$59.00',
|
|
1576
|
+
inventory: 'In stock',
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
name: `Black table lamp`,
|
|
1580
|
+
SKU: '00352464',
|
|
1581
|
+
price: '$119.00',
|
|
1582
|
+
inventory: 'In stock',
|
|
1583
|
+
},
|
|
1584
|
+
];
|
|
1585
|
+
|
|
1586
|
+
const [firstExampleRecords, setFirstExampleRecords] = React.useState(data);
|
|
1587
|
+
const [secondExampleRecords, setSecondExampleRecords] = React.useState(data);
|
|
1588
|
+
|
|
1589
|
+
const columns = [
|
|
1590
|
+
{ title: 'Name', render: row => row.name },
|
|
1591
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1592
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1593
|
+
{ title: 'Price', render: row => row.price },
|
|
1594
|
+
];
|
|
1595
|
+
|
|
1596
|
+
const fetchMoreFirstTableData = () =>
|
|
1597
|
+
new Promise(resolve => {
|
|
1598
|
+
setTimeout(
|
|
1599
|
+
() => setFirstExampleRecords([...firstExampleRecords, ...data]),
|
|
1600
|
+
2000,
|
|
1601
|
+
);
|
|
1602
|
+
});
|
|
1603
|
+
|
|
1604
|
+
const fetchMoreSecondTableData = () =>
|
|
1605
|
+
new Promise(resolve => {
|
|
1606
|
+
setTimeout(
|
|
1607
|
+
() => setSecondExampleRecords([...secondExampleRecords, ...data]),
|
|
1608
|
+
2000,
|
|
1609
|
+
);
|
|
1610
|
+
});
|
|
1611
|
+
|
|
1612
|
+
React.useEffect(() => {
|
|
1613
|
+
setFirstContainer(firstContainerRef);
|
|
1614
|
+
setSecondContainer(secondContainerRef);
|
|
1615
|
+
}, []);
|
|
1616
|
+
|
|
1617
|
+
const MainToolbar = () => {
|
|
1618
|
+
return (
|
|
1619
|
+
<TableToolbar>
|
|
1620
|
+
<TableToolbar.ItemGroup position="start">
|
|
1621
|
+
<TableToolbar.Item>
|
|
1622
|
+
<TableToolbar.Label>
|
|
1623
|
+
{totalProductCount} products
|
|
1624
|
+
</TableToolbar.Label>
|
|
1625
|
+
</TableToolbar.Item>
|
|
1626
|
+
</TableToolbar.ItemGroup>
|
|
1627
|
+
</TableToolbar>
|
|
1628
|
+
);
|
|
1629
|
+
};
|
|
1630
|
+
|
|
1631
|
+
const ActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1632
|
+
<TableToolbar>
|
|
1633
|
+
<TableToolbar.ItemGroup position="start">
|
|
1634
|
+
<TableToolbar.Item>
|
|
1635
|
+
<TableToolbar.Label>{`${selectedCount} selected`}</TableToolbar.Label>
|
|
1636
|
+
</TableToolbar.Item>
|
|
1637
|
+
<TableToolbar.Item>
|
|
1638
|
+
<Box height="18px">
|
|
1639
|
+
<Divider direction="vertical" />
|
|
1640
|
+
</Box>
|
|
1641
|
+
</TableToolbar.Item>
|
|
1642
|
+
<TableToolbar.Item layout="button">
|
|
1643
|
+
<Button
|
|
1644
|
+
skin="inverted"
|
|
1645
|
+
size="small"
|
|
1646
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1647
|
+
>
|
|
1648
|
+
Export
|
|
1649
|
+
</Button>
|
|
1650
|
+
</TableToolbar.Item>
|
|
1651
|
+
</TableToolbar.ItemGroup>
|
|
1652
|
+
</TableToolbar>
|
|
1653
|
+
);
|
|
1654
|
+
|
|
1655
|
+
return (
|
|
1656
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
1657
|
+
<div
|
|
1658
|
+
style={{ maxHeight: '360px', overflowY: 'scroll' }}
|
|
1659
|
+
ref={firstContainer}
|
|
1660
|
+
>
|
|
1661
|
+
<Card stretchVertically={true} hideOverflow>
|
|
1662
|
+
<Table
|
|
1663
|
+
data={firstExampleRecords}
|
|
1664
|
+
columns={columns}
|
|
1665
|
+
rowVerticalPadding="medium"
|
|
1666
|
+
loadMore={fetchMoreFirstTableData}
|
|
1667
|
+
infiniteScroll
|
|
1668
|
+
hasMore={firstExampleRecords.length < totalProductCount}
|
|
1669
|
+
itemsPerPage={10}
|
|
1670
|
+
scrollElement={firstContainer && firstContainer.current}
|
|
1671
|
+
loader={
|
|
1672
|
+
<Box align="center" padding="24px 0px">
|
|
1673
|
+
<Loader size="small" />
|
|
1674
|
+
</Box>
|
|
1675
|
+
}
|
|
1676
|
+
>
|
|
1677
|
+
<TableToolbar>
|
|
1678
|
+
<TableToolbar.ItemGroup position="start">
|
|
1679
|
+
<TableToolbar.Item>
|
|
1680
|
+
<Text size="small">{totalProductCount} products</Text>
|
|
1681
|
+
</TableToolbar.Item>
|
|
1682
|
+
</TableToolbar.ItemGroup>
|
|
1683
|
+
</TableToolbar>
|
|
1684
|
+
<Table.Content />
|
|
1685
|
+
</Table>
|
|
1686
|
+
</Card>
|
|
1687
|
+
</div>
|
|
1688
|
+
<div
|
|
1689
|
+
style={{ maxHeight: '360px', overflowY: 'scroll' }}
|
|
1690
|
+
ref={secondContainer}
|
|
1691
|
+
>
|
|
1692
|
+
<Card stretchVertically={true}>
|
|
1693
|
+
<Table
|
|
1694
|
+
showSelection
|
|
1695
|
+
data={secondExampleRecords}
|
|
1696
|
+
columns={columns}
|
|
1697
|
+
loadMore={fetchMoreSecondTableData}
|
|
1698
|
+
infiniteScroll
|
|
1699
|
+
hasMore={secondExampleRecords.length < totalProductCount}
|
|
1700
|
+
itemsPerPage={10}
|
|
1701
|
+
totalSelectableCount={totalProductCount}
|
|
1702
|
+
scrollElement={secondContainer && secondContainer.current}
|
|
1703
|
+
loader={
|
|
1704
|
+
<Box align="center" padding="24px 0px">
|
|
1705
|
+
<Loader size="small" />
|
|
1706
|
+
</Box>
|
|
1707
|
+
}
|
|
1708
|
+
>
|
|
1709
|
+
<Table.ToolbarContainer>
|
|
1710
|
+
{selectionContext =>
|
|
1711
|
+
selectionContext.selectedCount === 0
|
|
1712
|
+
? MainToolbar()
|
|
1713
|
+
: ActionsToolbar({ ...selectionContext })
|
|
1714
|
+
}
|
|
1715
|
+
</Table.ToolbarContainer>
|
|
1716
|
+
<Table.Content />
|
|
1717
|
+
</Table>
|
|
1718
|
+
</Card>
|
|
1719
|
+
</div>
|
|
1720
|
+
</StorybookComponents.Stack>
|
|
1721
|
+
);
|
|
1722
|
+
};
|
|
1723
|
+
|
|
1724
|
+
```
|
|
1725
|
+
|
|
1726
|
+
### Pagination
|
|
1727
|
+
- description: <p>Split up large amounts of data across multiple pages using <code><Pagination/></code>. Use it to give users control to manually navigate between pages. It's beneficial when users operate with data chunks instead of a full list.</p><p></p><p>In tables that have selection enabled, make sure to provide an option to ‘Select All’ items in a toolbar container next to selected items count.</p>
|
|
1728
|
+
- example:
|
|
1729
|
+
```jsx
|
|
1730
|
+
() => {
|
|
1731
|
+
const [selectedFirstTablePage, setSelectedFirstTablePage] = React.useState(1);
|
|
1732
|
+
const [selectedSecondTablePage, setSelectedSecondTablePage] = React.useState(
|
|
1733
|
+
1,
|
|
1734
|
+
);
|
|
1735
|
+
|
|
1736
|
+
const [selected, setSelected] = React.useState({});
|
|
1737
|
+
|
|
1738
|
+
const data = [
|
|
1739
|
+
{
|
|
1740
|
+
name: `Light grey hoodie`,
|
|
1741
|
+
SKU: '00224239',
|
|
1742
|
+
price: '$59.00',
|
|
1743
|
+
inventory: 'In stock',
|
|
1744
|
+
},
|
|
1745
|
+
{
|
|
1746
|
+
name: `Black watch`,
|
|
1747
|
+
SKU: '00352464',
|
|
1748
|
+
price: '$229.00',
|
|
1749
|
+
inventory: 'In stock',
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: 'Reading glasses',
|
|
1753
|
+
SKU: '00486430',
|
|
1754
|
+
price: '$69.00',
|
|
1755
|
+
inventory: 'In stock',
|
|
1756
|
+
},
|
|
1757
|
+
{
|
|
1758
|
+
name: 'Leather shoes',
|
|
1759
|
+
SKU: '00515642',
|
|
1760
|
+
price: '$129.00',
|
|
1761
|
+
inventory: 'Out of stock',
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
name: `Ceramic plant pots`,
|
|
1765
|
+
SKU: '00224239',
|
|
1766
|
+
price: '$19.00',
|
|
1767
|
+
inventory: 'In stock',
|
|
1768
|
+
},
|
|
1769
|
+
{
|
|
1770
|
+
name: `Black table lamp`,
|
|
1771
|
+
SKU: '00352464',
|
|
1772
|
+
price: '$119.00',
|
|
1773
|
+
inventory: 'In stock',
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
name: 'Knitted scarf',
|
|
1777
|
+
SKU: '00486430',
|
|
1778
|
+
price: '$19.00',
|
|
1779
|
+
inventory: 'In stock',
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
name: 'Home fragrance',
|
|
1783
|
+
SKU: '00515642',
|
|
1784
|
+
price: '$89.00',
|
|
1785
|
+
inventory: 'In stock',
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
name: `Ceramic plant pots`,
|
|
1789
|
+
SKU: '00224239',
|
|
1790
|
+
price: '$19.00',
|
|
1791
|
+
inventory: 'In stock',
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: `Black table lamp`,
|
|
1795
|
+
SKU: '00352464',
|
|
1796
|
+
price: '$119.00',
|
|
1797
|
+
inventory: 'In stock',
|
|
1798
|
+
},
|
|
1799
|
+
{
|
|
1800
|
+
name: 'Knitted scarf',
|
|
1801
|
+
SKU: '00486430',
|
|
1802
|
+
price: '$19.00',
|
|
1803
|
+
inventory: 'In stock',
|
|
1804
|
+
},
|
|
1805
|
+
{
|
|
1806
|
+
name: 'Home fragrance',
|
|
1807
|
+
SKU: '00515642',
|
|
1808
|
+
price: '$89.00',
|
|
1809
|
+
inventory: 'In stock',
|
|
1810
|
+
},
|
|
1811
|
+
];
|
|
1812
|
+
|
|
1813
|
+
const records = Array.from(Array(12).keys())
|
|
1814
|
+
.map(page => Array.from(Array(8).keys()).map(() => data[page]))
|
|
1815
|
+
.flat()
|
|
1816
|
+
.map((item, index) => ({
|
|
1817
|
+
...item,
|
|
1818
|
+
id: `record-${index}`,
|
|
1819
|
+
}));
|
|
1820
|
+
|
|
1821
|
+
const [firstTableRecords, setFirstTableRecords] = React.useState(
|
|
1822
|
+
records.slice(0, 8),
|
|
1823
|
+
);
|
|
1824
|
+
|
|
1825
|
+
const [secondTableRecords, setSecondTableRecords] = React.useState(
|
|
1826
|
+
records.slice(0, 8),
|
|
1827
|
+
);
|
|
1828
|
+
|
|
1829
|
+
const columns = [
|
|
1830
|
+
{ title: 'Name', render: row => row.name },
|
|
1831
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
1832
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
1833
|
+
{ title: 'Price', render: row => row.price },
|
|
1834
|
+
];
|
|
1835
|
+
|
|
1836
|
+
const _handleFirstTablePageChange = ({ page, event }) => {
|
|
1837
|
+
event.preventDefault();
|
|
1838
|
+
setSelectedFirstTablePage(page);
|
|
1839
|
+
setFirstTableRecords(records.slice((page - 1) * 8, (page - 1) * 8 + 8));
|
|
1840
|
+
};
|
|
1841
|
+
|
|
1842
|
+
const _handleSecondTablePageChange = ({ page, event }) => {
|
|
1843
|
+
event.preventDefault();
|
|
1844
|
+
setSelectedSecondTablePage(page);
|
|
1845
|
+
setSecondTableRecords(records.slice((page - 1) * 8, (page - 1) * 8 + 8));
|
|
1846
|
+
};
|
|
1847
|
+
|
|
1848
|
+
const updateSelectedRecords = props =>
|
|
1849
|
+
setSelected({
|
|
1850
|
+
...selected,
|
|
1851
|
+
[`${selectedSecondTablePage}`]: props.filter(p =>
|
|
1852
|
+
secondTableRecords.map(({ id }) => id).includes(p),
|
|
1853
|
+
),
|
|
1854
|
+
});
|
|
1855
|
+
|
|
1856
|
+
const _renderMainToolbar = () => {
|
|
1857
|
+
return (
|
|
1858
|
+
<TableToolbar>
|
|
1859
|
+
<TableToolbar.ItemGroup position="start">
|
|
1860
|
+
<TableToolbar.Item>
|
|
1861
|
+
<Text size="small">
|
|
1862
|
+
<b>
|
|
1863
|
+
{(selectedSecondTablePage - 1) * 8 + 1} -
|
|
1864
|
+
{(selectedSecondTablePage - 1) * 8 + 8}
|
|
1865
|
+
</b>{' '}
|
|
1866
|
+
out of {records.length} products
|
|
1867
|
+
</Text>
|
|
1868
|
+
</TableToolbar.Item>
|
|
1869
|
+
</TableToolbar.ItemGroup>
|
|
1870
|
+
</TableToolbar>
|
|
1871
|
+
);
|
|
1872
|
+
};
|
|
1873
|
+
|
|
1874
|
+
const _renderActionsToolbar = ({ selectedCount, getSelectedIds }) => (
|
|
1875
|
+
<TableToolbar>
|
|
1876
|
+
<TableToolbar.ItemGroup position="start">
|
|
1877
|
+
<TableToolbar.Item>
|
|
1878
|
+
<Box gap="12px">
|
|
1879
|
+
<Box gap="3px">
|
|
1880
|
+
<Text size="small" weight="bold">{`${
|
|
1881
|
+
Object.values(selected).flat().length
|
|
1882
|
+
}`}</Text>
|
|
1883
|
+
<Text size="small">{`out of ${records.length} selected`}</Text>
|
|
1884
|
+
</Box>
|
|
1885
|
+
<TextButton size="small" weight="normal">
|
|
1886
|
+
Select All
|
|
1887
|
+
</TextButton>
|
|
1888
|
+
</Box>
|
|
1889
|
+
</TableToolbar.Item>
|
|
1890
|
+
<TableToolbar.Item>
|
|
1891
|
+
<Box height="18px">
|
|
1892
|
+
<Divider direction="vertical" />
|
|
1893
|
+
</Box>
|
|
1894
|
+
</TableToolbar.Item>
|
|
1895
|
+
<TableToolbar.Item layout="button">
|
|
1896
|
+
<Button
|
|
1897
|
+
skin="inverted"
|
|
1898
|
+
size="small"
|
|
1899
|
+
prefixIcon={<Icons.UploadExportSmall />}
|
|
1900
|
+
>
|
|
1901
|
+
Export
|
|
1902
|
+
</Button>
|
|
1903
|
+
</TableToolbar.Item>
|
|
1904
|
+
</TableToolbar.ItemGroup>
|
|
1905
|
+
</TableToolbar>
|
|
1906
|
+
);
|
|
1907
|
+
|
|
1908
|
+
return (
|
|
1909
|
+
<StorybookComponents.Stack flexDirection="column">
|
|
1910
|
+
<Layout justifyItems="center">
|
|
1911
|
+
<Cell>
|
|
1912
|
+
<Card hideOverflow>
|
|
1913
|
+
<Table
|
|
1914
|
+
data={firstTableRecords}
|
|
1915
|
+
columns={columns}
|
|
1916
|
+
rowVerticalPadding="medium"
|
|
1917
|
+
>
|
|
1918
|
+
<TableToolbar>
|
|
1919
|
+
<TableToolbar.ItemGroup position="start">
|
|
1920
|
+
<TableToolbar.Item>
|
|
1921
|
+
<Text size="small">
|
|
1922
|
+
<b>
|
|
1923
|
+
{(selectedFirstTablePage - 1) * 8 + 1} -
|
|
1924
|
+
{(selectedFirstTablePage - 1) * 8 + 8}
|
|
1925
|
+
</b>{' '}
|
|
1926
|
+
out of {records.length} products
|
|
1927
|
+
</Text>
|
|
1928
|
+
</TableToolbar.Item>
|
|
1929
|
+
</TableToolbar.ItemGroup>
|
|
1930
|
+
</TableToolbar>
|
|
1931
|
+
<Table.Content />
|
|
1932
|
+
</Table>
|
|
1933
|
+
</Card>
|
|
1934
|
+
</Cell>
|
|
1935
|
+
<Cell>
|
|
1936
|
+
<Pagination
|
|
1937
|
+
currentPage={selectedFirstTablePage}
|
|
1938
|
+
totalPages={12}
|
|
1939
|
+
onChange={_handleFirstTablePageChange}
|
|
1940
|
+
/>
|
|
1941
|
+
</Cell>
|
|
1942
|
+
</Layout>
|
|
1943
|
+
<Layout justifyItems="center">
|
|
1944
|
+
<Cell>
|
|
1945
|
+
<Card hideOverflow>
|
|
1946
|
+
<Table
|
|
1947
|
+
data={secondTableRecords}
|
|
1948
|
+
columns={columns}
|
|
1949
|
+
showSelection
|
|
1950
|
+
infiniteScroll={false}
|
|
1951
|
+
onSelectionChanged={updateSelectedRecords}
|
|
1952
|
+
selectedIds={selected[selectedSecondTablePage]}
|
|
1953
|
+
>
|
|
1954
|
+
<Table.ToolbarContainer>
|
|
1955
|
+
{selectionContext =>
|
|
1956
|
+
Object.values(selected).flat().length === 0
|
|
1957
|
+
? _renderMainToolbar()
|
|
1958
|
+
: _renderActionsToolbar({ ...selectionContext })
|
|
1959
|
+
}
|
|
1960
|
+
</Table.ToolbarContainer>
|
|
1961
|
+
<Table.Content />
|
|
1962
|
+
</Table>
|
|
1963
|
+
</Card>
|
|
1964
|
+
</Cell>
|
|
1965
|
+
<Cell>
|
|
1966
|
+
<Pagination
|
|
1967
|
+
currentPage={selectedSecondTablePage}
|
|
1968
|
+
totalPages={12}
|
|
1969
|
+
onChange={_handleSecondTablePageChange}
|
|
1970
|
+
/>
|
|
1971
|
+
</Cell>
|
|
1972
|
+
</Layout>
|
|
1973
|
+
</StorybookComponents.Stack>
|
|
1974
|
+
);
|
|
1975
|
+
};
|
|
1976
|
+
```
|
|
1977
|
+
|
|
1978
|
+
### No data empty state
|
|
1979
|
+
- description: <p>Use <code><Table.EmptyState/></code> to indicate that there are no existing entries that could be shown in a table. Make sure the illustration you show reflects the type of items the table will contain.</p>
|
|
1980
|
+
- example:
|
|
1981
|
+
```jsx
|
|
1982
|
+
() => {
|
|
1983
|
+
const renderTableToolbar = () => (
|
|
1984
|
+
<TableToolbar>
|
|
1985
|
+
<TableToolbar.Title>Products</TableToolbar.Title>
|
|
1986
|
+
</TableToolbar>
|
|
1987
|
+
);
|
|
1988
|
+
|
|
1989
|
+
const renderEmptyState = () => (
|
|
1990
|
+
<Table.EmptyState
|
|
1991
|
+
title="Add your first product"
|
|
1992
|
+
subtitle="Once you add products, you'll be able to see and manage them here."
|
|
1993
|
+
image={
|
|
1994
|
+
<Image
|
|
1995
|
+
height={120}
|
|
1996
|
+
width={120}
|
|
1997
|
+
src="EmptyState_Generic1.svg"
|
|
1998
|
+
transparent
|
|
1999
|
+
/>
|
|
2000
|
+
}
|
|
2001
|
+
>
|
|
2002
|
+
<TextButton prefixIcon={<Icons.Add />}>Add Product</TextButton>
|
|
2003
|
+
</Table.EmptyState>
|
|
2004
|
+
);
|
|
2005
|
+
|
|
2006
|
+
return (
|
|
2007
|
+
<Card>
|
|
2008
|
+
<Table>
|
|
2009
|
+
{renderTableToolbar()}
|
|
2010
|
+
{renderEmptyState()}
|
|
2011
|
+
</Table>
|
|
2012
|
+
</Card>
|
|
2013
|
+
);
|
|
2014
|
+
};
|
|
2015
|
+
```
|
|
2016
|
+
|
|
2017
|
+
### No search results empty state
|
|
2018
|
+
- description: <p>Make sure to provide an empty state when the user looks for content via search query or tries to narrow down the data list via filters and no items match the criterias.</p>
|
|
2019
|
+
- example:
|
|
2020
|
+
```jsx
|
|
2021
|
+
() => {
|
|
2022
|
+
const [searchTerm, setSearchTerm] = React.useState('');
|
|
2023
|
+
const [right, setRight] = React.useState(-440);
|
|
2024
|
+
const [display, setDisplay] = React.useState('none');
|
|
2025
|
+
const [records, setRecords] = React.useState([
|
|
2026
|
+
{
|
|
2027
|
+
name: `Light grey hoodie`,
|
|
2028
|
+
SKU: '00224239',
|
|
2029
|
+
price: '$59.00',
|
|
2030
|
+
inventory: 'In stock',
|
|
2031
|
+
},
|
|
2032
|
+
{
|
|
2033
|
+
name: `Black watch`,
|
|
2034
|
+
SKU: '00352464',
|
|
2035
|
+
price: '$229.00',
|
|
2036
|
+
inventory: 'In stock',
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
name: 'Reading glasses',
|
|
2040
|
+
SKU: '00486430',
|
|
2041
|
+
price: '$69.00',
|
|
2042
|
+
inventory: 'In stock',
|
|
2043
|
+
},
|
|
2044
|
+
{
|
|
2045
|
+
name: 'Leather shoes',
|
|
2046
|
+
SKU: '00515642',
|
|
2047
|
+
price: '$129.00',
|
|
2048
|
+
inventory: 'Out of stock',
|
|
2049
|
+
},
|
|
2050
|
+
]);
|
|
2051
|
+
|
|
2052
|
+
const columns = [
|
|
2053
|
+
{ title: 'Name', render: row => row.name },
|
|
2054
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
2055
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
2056
|
+
{ title: 'Price', render: row => row.price },
|
|
2057
|
+
];
|
|
2058
|
+
|
|
2059
|
+
const _clearSearch = () => {
|
|
2060
|
+
setSearchTerm('');
|
|
2061
|
+
};
|
|
2062
|
+
|
|
2063
|
+
const _renderSearch = expandable => {
|
|
2064
|
+
return (
|
|
2065
|
+
<Search
|
|
2066
|
+
size="small"
|
|
2067
|
+
expandable={expandable}
|
|
2068
|
+
onChange={e => {
|
|
2069
|
+
setSearchTerm(e.target.value);
|
|
2070
|
+
}}
|
|
2071
|
+
value={searchTerm}
|
|
2072
|
+
onClear={_clearSearch}
|
|
2073
|
+
/>
|
|
2074
|
+
);
|
|
2075
|
+
};
|
|
2076
|
+
|
|
2077
|
+
const _getFilteredData = () => {
|
|
2078
|
+
let data = records;
|
|
2079
|
+
|
|
2080
|
+
if (searchTerm !== '') {
|
|
2081
|
+
data = data.filter(row =>
|
|
2082
|
+
row.name.toUpperCase().includes(searchTerm.toUpperCase()),
|
|
2083
|
+
);
|
|
2084
|
+
}
|
|
2085
|
+
|
|
2086
|
+
return data;
|
|
2087
|
+
};
|
|
2088
|
+
|
|
2089
|
+
const filteredData = _getFilteredData();
|
|
2090
|
+
|
|
2091
|
+
const _renderEmptyState = () => (
|
|
2092
|
+
<Table.EmptyState
|
|
2093
|
+
title="No results found"
|
|
2094
|
+
subtitle="No items match your search criteria. Try to search by another keyword."
|
|
2095
|
+
image={
|
|
2096
|
+
<Image
|
|
2097
|
+
width="120px"
|
|
2098
|
+
height="120px"
|
|
2099
|
+
transparent={true}
|
|
2100
|
+
src="https://api.lingoapp.com/v4/assets/6F4EC24D-ED41-4136-8050-837D05883F22/preview?size=480&asset_token=SIFGewyrciPVMNHqk6Nw3TI45qyWdJGJ2NOTGxR9FRA&hash=9d772b37ac8c805e780945a422a353b980b28e45&p=complete"
|
|
2101
|
+
/>
|
|
2102
|
+
}
|
|
2103
|
+
>
|
|
2104
|
+
<TextButton>Clear Search</TextButton>
|
|
2105
|
+
</Table.EmptyState>
|
|
2106
|
+
);
|
|
2107
|
+
|
|
2108
|
+
return (
|
|
2109
|
+
<Card hideOverflow>
|
|
2110
|
+
<Table data={filteredData} columns={columns} rowVerticalPadding="medium">
|
|
2111
|
+
<TableToolbar>
|
|
2112
|
+
<TableToolbar.ItemGroup position="start">
|
|
2113
|
+
<TableToolbar.Item>
|
|
2114
|
+
<TableToolbar.Label>4 products</TableToolbar.Label>
|
|
2115
|
+
</TableToolbar.Item>
|
|
2116
|
+
</TableToolbar.ItemGroup>
|
|
2117
|
+
<TableToolbar.ItemGroup position="end">
|
|
2118
|
+
<TableToolbar.Item>{_renderSearch(false)}</TableToolbar.Item>
|
|
2119
|
+
</TableToolbar.ItemGroup>
|
|
2120
|
+
</TableToolbar>
|
|
2121
|
+
{filteredData.length ? <Table.Titlebar /> : _renderEmptyState()}
|
|
2122
|
+
<Table.Content titleBarVisible={false} />
|
|
2123
|
+
</Table>
|
|
2124
|
+
</Card>
|
|
2125
|
+
);
|
|
2126
|
+
};
|
|
2127
|
+
```
|
|
2128
|
+
|
|
2129
|
+
|
|
2130
|
+
|
|
2131
|
+
|
|
2132
|
+
|
|
2133
|
+
|
|
2134
|
+
|
|
2135
|
+
## Common Use Case Examples
|
|
2136
|
+
|
|
2137
|
+
|
|
2138
|
+
### Table in a modal
|
|
2139
|
+
- description: <p>Render table without a toolbar when it is displayed in an overlay component, such as a <code><CustomModalLayout/></code> or a <code><SidePanel/></code>. Make sure content paddings in a selected layout is turned off.</p>
|
|
2140
|
+
- example:
|
|
2141
|
+
```jsx
|
|
2142
|
+
() => {
|
|
2143
|
+
const data = [
|
|
2144
|
+
{
|
|
2145
|
+
name: `Light grey hoodie`,
|
|
2146
|
+
SKU: '00224239',
|
|
2147
|
+
price: '$59.00',
|
|
2148
|
+
inventory: 'In stock',
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
name: `Black watch`,
|
|
2152
|
+
SKU: '00352464',
|
|
2153
|
+
price: '$229.00',
|
|
2154
|
+
inventory: 'In stock',
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
name: 'Reading glasses',
|
|
2158
|
+
SKU: '00486430',
|
|
2159
|
+
price: '$69.00',
|
|
2160
|
+
inventory: 'In stock',
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
name: 'Leather shoes',
|
|
2164
|
+
SKU: '00515642',
|
|
2165
|
+
price: '$129.00',
|
|
2166
|
+
inventory: 'Out of stock',
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
name: `Ceramic plant pots`,
|
|
2170
|
+
SKU: '00224239',
|
|
2171
|
+
price: '$19.00',
|
|
2172
|
+
inventory: 'In stock',
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
name: `Black table lamp`,
|
|
2176
|
+
SKU: '00352464',
|
|
2177
|
+
price: '$119.00',
|
|
2178
|
+
inventory: 'In stock',
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
name: 'Knitted scarf',
|
|
2182
|
+
SKU: '00486430',
|
|
2183
|
+
price: '$19.00',
|
|
2184
|
+
inventory: 'In stock',
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
name: 'Home fragrance',
|
|
2188
|
+
SKU: '00515642',
|
|
2189
|
+
price: '$89.00',
|
|
2190
|
+
inventory: 'In stock',
|
|
2191
|
+
},
|
|
2192
|
+
];
|
|
2193
|
+
const columns = [
|
|
2194
|
+
{ title: 'Name', render: row => row.name },
|
|
2195
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
2196
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
2197
|
+
{ title: 'Price', render: row => row.price },
|
|
2198
|
+
];
|
|
2199
|
+
return (
|
|
2200
|
+
<Box maxHeight={480}>
|
|
2201
|
+
<CustomModalLayout
|
|
2202
|
+
removeContentPadding
|
|
2203
|
+
primaryButtonText="Add"
|
|
2204
|
+
secondaryButtonText="Cancel"
|
|
2205
|
+
onCloseButtonClick={() => {}}
|
|
2206
|
+
title="Add products"
|
|
2207
|
+
showFooterDivider
|
|
2208
|
+
>
|
|
2209
|
+
<Table
|
|
2210
|
+
data={data}
|
|
2211
|
+
columns={columns}
|
|
2212
|
+
showSelection
|
|
2213
|
+
rowVerticalPadding="medium"
|
|
2214
|
+
>
|
|
2215
|
+
<Table.Content />
|
|
2216
|
+
</Table>
|
|
2217
|
+
</CustomModalLayout>
|
|
2218
|
+
</Box>
|
|
2219
|
+
);
|
|
2220
|
+
};
|
|
2221
|
+
|
|
2222
|
+
```
|
|
2223
|
+
|
|
2224
|
+
### Filters
|
|
2225
|
+
- description: <p>Enable users to find relevant data quicker by providing them with data filters and search.</p><p>We recommend to store up to 3 filters at once in a toolbar container. Check <code><Table.Toolbar/></code> page for all available toolbar arrangement options.</p>
|
|
2226
|
+
- example:
|
|
2227
|
+
```jsx
|
|
2228
|
+
() => {
|
|
2229
|
+
const [filter, setFilter] = React.useState({
|
|
2230
|
+
collection: { id: '0', value: 'All Collections' },
|
|
2231
|
+
status: { id: '0', value: 'All Statuses' },
|
|
2232
|
+
name: '',
|
|
2233
|
+
});
|
|
2234
|
+
|
|
2235
|
+
const data = [
|
|
2236
|
+
{
|
|
2237
|
+
name: `Light grey hoodie`,
|
|
2238
|
+
SKU: '00224239',
|
|
2239
|
+
price: '$59.00',
|
|
2240
|
+
inventory: 'In stock',
|
|
2241
|
+
collection: '2021 Winter',
|
|
2242
|
+
},
|
|
2243
|
+
{
|
|
2244
|
+
name: `Black watch`,
|
|
2245
|
+
SKU: '00352464',
|
|
2246
|
+
price: '$229.00',
|
|
2247
|
+
inventory: 'In stock',
|
|
2248
|
+
collection: '2021 Summer',
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
name: 'Reading glasses',
|
|
2252
|
+
SKU: '00486430',
|
|
2253
|
+
price: '$69.00',
|
|
2254
|
+
inventory: 'In stock',
|
|
2255
|
+
collection: '2021 Autumn',
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: 'Leather shoes',
|
|
2259
|
+
SKU: '00515642',
|
|
2260
|
+
price: '$129.00',
|
|
2261
|
+
inventory: 'Out of stock',
|
|
2262
|
+
collection: '2021 Winter',
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
name: 'Leather shoes',
|
|
2266
|
+
SKU: '00515642',
|
|
2267
|
+
price: '$129.00',
|
|
2268
|
+
inventory: 'Out of stock',
|
|
2269
|
+
collection: '2021 Spring',
|
|
2270
|
+
},
|
|
2271
|
+
];
|
|
2272
|
+
|
|
2273
|
+
const [records, setRecords] = React.useState(data);
|
|
2274
|
+
|
|
2275
|
+
React.useEffect(() => {
|
|
2276
|
+
const dataFilteredByCollection =
|
|
2277
|
+
filter.collection.value === 'All Collections'
|
|
2278
|
+
? data
|
|
2279
|
+
: data.filter(record => record.collection === filter.collection.value);
|
|
2280
|
+
|
|
2281
|
+
const dataFilteredByCollectionAndStatus =
|
|
2282
|
+
filter.status.value === 'All Statuses'
|
|
2283
|
+
? dataFilteredByCollection
|
|
2284
|
+
: dataFilteredByCollection.filter(
|
|
2285
|
+
record => record.inventory === filter.status.value,
|
|
2286
|
+
);
|
|
2287
|
+
|
|
2288
|
+
setRecords(
|
|
2289
|
+
dataFilteredByCollectionAndStatus.filter(({ name }) =>
|
|
2290
|
+
name.includes(filter.name),
|
|
2291
|
+
),
|
|
2292
|
+
);
|
|
2293
|
+
}, [filter]);
|
|
2294
|
+
|
|
2295
|
+
const columns = [
|
|
2296
|
+
{ title: 'Name', render: row => row.name },
|
|
2297
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
2298
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
2299
|
+
{ title: 'Collection', render: row => row.collection },
|
|
2300
|
+
{ title: 'Price', render: row => row.price },
|
|
2301
|
+
];
|
|
2302
|
+
|
|
2303
|
+
return (
|
|
2304
|
+
<Card hideOverflow>
|
|
2305
|
+
<Table data={records} columns={columns} rowVerticalPadding="medium">
|
|
2306
|
+
<TableToolbar>
|
|
2307
|
+
<TableToolbar.ItemGroup position="start">
|
|
2308
|
+
<TableToolbar.Item>
|
|
2309
|
+
<Dropdown
|
|
2310
|
+
options={[
|
|
2311
|
+
{ id: '0', value: 'All Collections' },
|
|
2312
|
+
{ id: '1', value: '2021 Winter' },
|
|
2313
|
+
{ id: '2', value: '2021 Autumn' },
|
|
2314
|
+
{ id: '3', value: '2021 Summer' },
|
|
2315
|
+
{ id: '4', value: '2021 Spring' },
|
|
2316
|
+
]}
|
|
2317
|
+
selectedId={filter.collection.id}
|
|
2318
|
+
border="round"
|
|
2319
|
+
size="small"
|
|
2320
|
+
popoverProps={{ appendTo: 'window' }}
|
|
2321
|
+
onSelect={collection => setFilter({ ...filter, collection })}
|
|
2322
|
+
valueParser={({ value }) => value}
|
|
2323
|
+
/>
|
|
2324
|
+
</TableToolbar.Item>
|
|
2325
|
+
<TableToolbar.Item>
|
|
2326
|
+
<Dropdown
|
|
2327
|
+
options={[
|
|
2328
|
+
{ id: '0', value: 'All Statuses' },
|
|
2329
|
+
{ id: '1', value: 'In stock' },
|
|
2330
|
+
{ id: '2', value: 'Out of stock' },
|
|
2331
|
+
]}
|
|
2332
|
+
selectedId={filter.status.id}
|
|
2333
|
+
border="round"
|
|
2334
|
+
size="small"
|
|
2335
|
+
onSelect={status => setFilter({ ...filter, status })}
|
|
2336
|
+
popoverProps={{ appendTo: 'window' }}
|
|
2337
|
+
/>
|
|
2338
|
+
</TableToolbar.Item>
|
|
2339
|
+
</TableToolbar.ItemGroup>
|
|
2340
|
+
<TableToolbar.ItemGroup position="end">
|
|
2341
|
+
<TableToolbar.Item>
|
|
2342
|
+
<Search
|
|
2343
|
+
size="small"
|
|
2344
|
+
onChange={event =>
|
|
2345
|
+
setFilter({ ...filter, name: event.target.value })
|
|
2346
|
+
}
|
|
2347
|
+
onClear={() => setFilter({ ...filter, name: '' })}
|
|
2348
|
+
/>
|
|
2349
|
+
</TableToolbar.Item>
|
|
2350
|
+
</TableToolbar.ItemGroup>
|
|
2351
|
+
</TableToolbar>
|
|
2352
|
+
<Table.Content />
|
|
2353
|
+
</Table>
|
|
2354
|
+
</Card>
|
|
2355
|
+
);
|
|
2356
|
+
};
|
|
2357
|
+
|
|
2358
|
+
```
|
|
2359
|
+
|
|
2360
|
+
### Advanced filters
|
|
2361
|
+
- description: <p>If there are more than 3 filters, transfer them outside of a table to a side panel. Add a button to a toolbar to call out this panel.</p><p><em>Note:</em> Make sure to inform users about currently active filters. Display them as a list of tags in a <code><Table.Subtoolbar/></code> container.</p>
|
|
2362
|
+
- example:
|
|
2363
|
+
```jsx
|
|
2364
|
+
() => {
|
|
2365
|
+
const price = {
|
|
2366
|
+
0: '0',
|
|
2367
|
+
1: '40',
|
|
2368
|
+
2: '80',
|
|
2369
|
+
3: '300',
|
|
2370
|
+
};
|
|
2371
|
+
|
|
2372
|
+
const getPriceTagUserFriendlyValue = value =>
|
|
2373
|
+
value[0] === value[1]
|
|
2374
|
+
? `$${price[value[0]]}`
|
|
2375
|
+
: `$${price[value[0]]} - $${price[value[1]]}`;
|
|
2376
|
+
|
|
2377
|
+
const initialTags = [
|
|
2378
|
+
{
|
|
2379
|
+
type: 'collection',
|
|
2380
|
+
value: 'All Collections',
|
|
2381
|
+
id: Date.now() + Math.random(),
|
|
2382
|
+
children: 'All Collections',
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
type: 'inventory',
|
|
2386
|
+
value: 'All Statuses',
|
|
2387
|
+
id: Date.now() + Math.random(),
|
|
2388
|
+
children: 'All Statuses',
|
|
2389
|
+
removable: false,
|
|
2390
|
+
},
|
|
2391
|
+
{
|
|
2392
|
+
type: 'price',
|
|
2393
|
+
value: [0, 3],
|
|
2394
|
+
id: Date.now() + Math.random(),
|
|
2395
|
+
children: getPriceTagUserFriendlyValue([0, 3]),
|
|
2396
|
+
removable: false,
|
|
2397
|
+
},
|
|
2398
|
+
];
|
|
2399
|
+
|
|
2400
|
+
const collections = [
|
|
2401
|
+
'All Collections',
|
|
2402
|
+
'2021 Winter',
|
|
2403
|
+
'2021 Spring',
|
|
2404
|
+
'2021 Summer',
|
|
2405
|
+
'2021 Fall',
|
|
2406
|
+
];
|
|
2407
|
+
|
|
2408
|
+
const data = [
|
|
2409
|
+
{
|
|
2410
|
+
name: `Light grey hoodie`,
|
|
2411
|
+
SKU: '00224239',
|
|
2412
|
+
price: 59.0,
|
|
2413
|
+
inventory: 'In Stock',
|
|
2414
|
+
items: 24,
|
|
2415
|
+
collection: '2021 Winter',
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
name: `Black watch`,
|
|
2419
|
+
SKU: '00352464',
|
|
2420
|
+
price: 229.0,
|
|
2421
|
+
inventory: 'In Stock',
|
|
2422
|
+
items: 190,
|
|
2423
|
+
collection: '2021 Fall',
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
name: 'Reading glasses',
|
|
2427
|
+
SKU: '00486430',
|
|
2428
|
+
price: 69.0,
|
|
2429
|
+
inventory: 'In Stock',
|
|
2430
|
+
items: 12,
|
|
2431
|
+
collection: '2021 Spring',
|
|
2432
|
+
},
|
|
2433
|
+
{
|
|
2434
|
+
name: 'Leather shoes',
|
|
2435
|
+
SKU: '00515642',
|
|
2436
|
+
price: 129.0,
|
|
2437
|
+
inventory: 'Out of Stock',
|
|
2438
|
+
items: 0,
|
|
2439
|
+
collection: '2021 Summer',
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
name: `Ceramic plant pots`,
|
|
2443
|
+
SKU: '00224239',
|
|
2444
|
+
price: 19.0,
|
|
2445
|
+
inventory: 'In Stock',
|
|
2446
|
+
items: 34,
|
|
2447
|
+
collection: '2021 Winter',
|
|
2448
|
+
},
|
|
2449
|
+
{
|
|
2450
|
+
name: `Black table lamp`,
|
|
2451
|
+
SKU: '00352464',
|
|
2452
|
+
price: 119.0,
|
|
2453
|
+
inventory: 'Out of Stock',
|
|
2454
|
+
items: 0,
|
|
2455
|
+
collection: '2021 Winter',
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
name: 'Knitted scarf',
|
|
2459
|
+
SKU: '00486430',
|
|
2460
|
+
price: 19.0,
|
|
2461
|
+
inventory: 'In Stock',
|
|
2462
|
+
items: 233,
|
|
2463
|
+
collection: '2021 Fall',
|
|
2464
|
+
},
|
|
2465
|
+
{
|
|
2466
|
+
name: 'Home fragrance',
|
|
2467
|
+
SKU: '00515642',
|
|
2468
|
+
price: 89.0,
|
|
2469
|
+
inventory: 'In Stock',
|
|
2470
|
+
items: 56,
|
|
2471
|
+
collection: '2021 Winter',
|
|
2472
|
+
},
|
|
2473
|
+
];
|
|
2474
|
+
|
|
2475
|
+
const [tags, setTags] = React.useState(initialTags);
|
|
2476
|
+
const [right, setRight] = React.useState(-440);
|
|
2477
|
+
const [display, setDisplay] = React.useState('none');
|
|
2478
|
+
const [records, setRecords] = React.useState(data);
|
|
2479
|
+
|
|
2480
|
+
const columns = [
|
|
2481
|
+
{ title: 'Name', render: row => row.name },
|
|
2482
|
+
{ title: 'SKU', render: row => row.SKU },
|
|
2483
|
+
{ title: 'Inventory', render: row => row.inventory },
|
|
2484
|
+
{ title: 'Items left', render: row => row.items },
|
|
2485
|
+
{ title: 'Collection', render: row => row.collection },
|
|
2486
|
+
{ title: 'Price', render: row => row.price },
|
|
2487
|
+
];
|
|
2488
|
+
|
|
2489
|
+
const tagExists = ({ type, value }) =>
|
|
2490
|
+
tags.some(tag => tag.type === type && tag.value === value);
|
|
2491
|
+
|
|
2492
|
+
React.useEffect(() => {
|
|
2493
|
+
const recordsFilteredByCollection =
|
|
2494
|
+
tagExists({
|
|
2495
|
+
type: 'collection',
|
|
2496
|
+
value: 'All Collections',
|
|
2497
|
+
}) || tags.filter(({ type }) => type === 'collection').length === 0
|
|
2498
|
+
? data
|
|
2499
|
+
: data.filter(({ collection }) =>
|
|
2500
|
+
tagExists({ type: 'collection', value: collection }),
|
|
2501
|
+
);
|
|
2502
|
+
|
|
2503
|
+
const recordsFilteredByInventory = tagExists({
|
|
2504
|
+
type: 'inventory',
|
|
2505
|
+
value: 'All Statuses',
|
|
2506
|
+
})
|
|
2507
|
+
? recordsFilteredByCollection
|
|
2508
|
+
: recordsFilteredByCollection.filter(({ inventory }) =>
|
|
2509
|
+
tagExists({ type: 'inventory', value: inventory }),
|
|
2510
|
+
);
|
|
2511
|
+
|
|
2512
|
+
const priceTag = tags.find(({ type }) => type === 'price');
|
|
2513
|
+
|
|
2514
|
+
const recordsFilteredByPrice = recordsFilteredByInventory.filter(
|
|
2515
|
+
tag =>
|
|
2516
|
+
tag.price >= price[priceTag.value[0]] &&
|
|
2517
|
+
tag.price <= price[priceTag.value[1]],
|
|
2518
|
+
);
|
|
2519
|
+
|
|
2520
|
+
setRecords(recordsFilteredByPrice);
|
|
2521
|
+
}, [tags]);
|
|
2522
|
+
|
|
2523
|
+
const removeTag = tagId => {
|
|
2524
|
+
const newTags = tags.filter(({ id }) => id !== tagId);
|
|
2525
|
+
|
|
2526
|
+
setTags(newTags);
|
|
2527
|
+
};
|
|
2528
|
+
|
|
2529
|
+
const toggleTag = ({ type, value }) => {
|
|
2530
|
+
if (tagExists({ type, value })) {
|
|
2531
|
+
setTags(tags.filter(tag => tag.type !== type || tag.value !== value));
|
|
2532
|
+
} else {
|
|
2533
|
+
setTags([...tags, { type, value, children: value, id: Date.now() }]);
|
|
2534
|
+
}
|
|
2535
|
+
};
|
|
2536
|
+
|
|
2537
|
+
const handleInventoryTag = value => {
|
|
2538
|
+
const tagsWithNoInventory = tags.filter(({ type }) => type !== 'inventory');
|
|
2539
|
+
setTags([
|
|
2540
|
+
...tagsWithNoInventory,
|
|
2541
|
+
{
|
|
2542
|
+
type: 'inventory',
|
|
2543
|
+
value,
|
|
2544
|
+
children: value,
|
|
2545
|
+
id: Date.now(),
|
|
2546
|
+
removable: false,
|
|
2547
|
+
},
|
|
2548
|
+
]);
|
|
2549
|
+
};
|
|
2550
|
+
|
|
2551
|
+
const openPanel = () => {
|
|
2552
|
+
setRight(0);
|
|
2553
|
+
setDisplay('block');
|
|
2554
|
+
};
|
|
2555
|
+
|
|
2556
|
+
const closePanel = () => {
|
|
2557
|
+
setRight(-440);
|
|
2558
|
+
setDisplay('none');
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2561
|
+
const getInventoryTagValue = () =>
|
|
2562
|
+
tags.find(({ type }) => type === 'inventory').value;
|
|
2563
|
+
|
|
2564
|
+
const handlePriceTag = value => {
|
|
2565
|
+
const tagsWithNoPrice = tags.filter(({ type }) => type !== 'price');
|
|
2566
|
+
setTags([
|
|
2567
|
+
...tagsWithNoPrice,
|
|
2568
|
+
{
|
|
2569
|
+
type: 'price',
|
|
2570
|
+
value,
|
|
2571
|
+
children: getPriceTagUserFriendlyValue(value),
|
|
2572
|
+
id: Date.now(),
|
|
2573
|
+
removable: false,
|
|
2574
|
+
},
|
|
2575
|
+
]);
|
|
2576
|
+
};
|
|
2577
|
+
|
|
2578
|
+
const getPriceTagValue = () =>
|
|
2579
|
+
tags.find(({ type }) => type === 'price').value;
|
|
2580
|
+
|
|
2581
|
+
return (
|
|
2582
|
+
<Page height="660px">
|
|
2583
|
+
<Page.Header title="Products" />
|
|
2584
|
+
<Page.Content>
|
|
2585
|
+
<Card hideOverflow>
|
|
2586
|
+
<Table data={records} columns={columns} rowVerticalPadding="medium">
|
|
2587
|
+
<TableToolbar>
|
|
2588
|
+
<TableToolbar.ItemGroup position="start">
|
|
2589
|
+
<TableToolbar.Item>
|
|
2590
|
+
<TableToolbar.Label>8 products</TableToolbar.Label>
|
|
2591
|
+
</TableToolbar.Item>
|
|
2592
|
+
</TableToolbar.ItemGroup>
|
|
2593
|
+
<TableToolbar.ItemGroup position="end">
|
|
2594
|
+
<TableToolbar.Item>
|
|
2595
|
+
<Button
|
|
2596
|
+
size="small"
|
|
2597
|
+
priority="secondary"
|
|
2598
|
+
prefixIcon={<Icons.ContentFilterSmall />}
|
|
2599
|
+
onClick={openPanel}
|
|
2600
|
+
>
|
|
2601
|
+
Filter (3)
|
|
2602
|
+
</Button>
|
|
2603
|
+
</TableToolbar.Item>
|
|
2604
|
+
<TableToolbar.Item>
|
|
2605
|
+
<Search size="small" />
|
|
2606
|
+
</TableToolbar.Item>
|
|
2607
|
+
</TableToolbar.ItemGroup>
|
|
2608
|
+
</TableToolbar>
|
|
2609
|
+
<Table.SubToolbar>
|
|
2610
|
+
<Box verticalAlign="middle" width="100%" align="space-between">
|
|
2611
|
+
<Box gap="12px" verticalAlign="middle">
|
|
2612
|
+
<Text size="small">Filtered by:</Text>
|
|
2613
|
+
<TagList
|
|
2614
|
+
tags={tags}
|
|
2615
|
+
actionButton={{ label: 'Clear All', onClick: () => setTags(initialTags) }}
|
|
2616
|
+
onTagRemove={removeTag}
|
|
2617
|
+
/>
|
|
2618
|
+
</Box>
|
|
2619
|
+
<Button
|
|
2620
|
+
skin="inverted"
|
|
2621
|
+
size="tiny"
|
|
2622
|
+
prefixIcon={<Icons.FavoriteSmall />}
|
|
2623
|
+
>
|
|
2624
|
+
Save Filter
|
|
2625
|
+
</Button>
|
|
2626
|
+
</Box>
|
|
2627
|
+
</Table.SubToolbar>
|
|
2628
|
+
|
|
2629
|
+
<Table.Content />
|
|
2630
|
+
</Table>
|
|
2631
|
+
</Card>
|
|
2632
|
+
<Box>
|
|
2633
|
+
<div
|
|
2634
|
+
style={{
|
|
2635
|
+
position: 'fixed',
|
|
2636
|
+
top: 0,
|
|
2637
|
+
right: `${right}px`,
|
|
2638
|
+
display: display,
|
|
2639
|
+
height: '100%',
|
|
2640
|
+
boxShadow:
|
|
2641
|
+
'0 3px 24px 0 rgba(22, 45, 61, 0.18), 0 8px 8px 0 rgba(22, 45, 61, 0.12)',
|
|
2642
|
+
zIndex: 9999,
|
|
2643
|
+
transition: 'right 0.4s ease 0s',
|
|
2644
|
+
overflow: 'hidden',
|
|
2645
|
+
}}
|
|
2646
|
+
>
|
|
2647
|
+
<SidePanel title="Filter" onCloseButtonClick={closePanel}>
|
|
2648
|
+
<SidePanel.Header title="Filter" />
|
|
2649
|
+
<Accordion
|
|
2650
|
+
skin="light"
|
|
2651
|
+
hideShadow
|
|
2652
|
+
size="small"
|
|
2653
|
+
items={[
|
|
2654
|
+
accordionItemBuilder({
|
|
2655
|
+
title: 'Collection',
|
|
2656
|
+
children: (
|
|
2657
|
+
<Box direction="vertical" gap="12px">
|
|
2658
|
+
{collections.map(collection => (
|
|
2659
|
+
<Checkbox
|
|
2660
|
+
checked={tagExists({
|
|
2661
|
+
type: 'collection',
|
|
2662
|
+
value: collection,
|
|
2663
|
+
})}
|
|
2664
|
+
onChange={() =>
|
|
2665
|
+
toggleTag({
|
|
2666
|
+
type: 'collection',
|
|
2667
|
+
value: collection,
|
|
2668
|
+
})
|
|
2669
|
+
}
|
|
2670
|
+
>
|
|
2671
|
+
{collection}
|
|
2672
|
+
</Checkbox>
|
|
2673
|
+
))}
|
|
2674
|
+
</Box>
|
|
2675
|
+
),
|
|
2676
|
+
}),
|
|
2677
|
+
accordionItemBuilder({
|
|
2678
|
+
title: 'Inventory',
|
|
2679
|
+
children: (
|
|
2680
|
+
<RadioGroup
|
|
2681
|
+
value={getInventoryTagValue()}
|
|
2682
|
+
onChange={handleInventoryTag}
|
|
2683
|
+
>
|
|
2684
|
+
<RadioGroup.Radio value="All Statuses">
|
|
2685
|
+
All Statuses
|
|
2686
|
+
</RadioGroup.Radio>
|
|
2687
|
+
<RadioGroup.Radio value="In Stock">
|
|
2688
|
+
In Stock
|
|
2689
|
+
</RadioGroup.Radio>
|
|
2690
|
+
<RadioGroup.Radio value="Out of Stock">
|
|
2691
|
+
Out of Stock
|
|
2692
|
+
</RadioGroup.Radio>
|
|
2693
|
+
</RadioGroup>
|
|
2694
|
+
),
|
|
2695
|
+
}),
|
|
2696
|
+
accordionItemBuilder({
|
|
2697
|
+
title: 'Price',
|
|
2698
|
+
children: (
|
|
2699
|
+
<Slider
|
|
2700
|
+
marks={{
|
|
2701
|
+
0: `$${price[0]}`,
|
|
2702
|
+
1: `$${price[1]}`,
|
|
2703
|
+
2: `$${price[2]}`,
|
|
2704
|
+
3: `$${price[3]}`,
|
|
2705
|
+
}}
|
|
2706
|
+
min={0}
|
|
2707
|
+
max={3}
|
|
2708
|
+
value={[0, 3]}
|
|
2709
|
+
onChange={handlePriceTag}
|
|
2710
|
+
value={getPriceTagValue()}
|
|
2711
|
+
/>
|
|
2712
|
+
),
|
|
2713
|
+
}),
|
|
2714
|
+
]}
|
|
2715
|
+
/>
|
|
2716
|
+
<SidePanel.Footer>
|
|
2717
|
+
<Box gap="12px" paddingBottom="SP4">
|
|
2718
|
+
<Text size="small">3 filters applied</Text>
|
|
2719
|
+
<TextButton size="small">Clear</TextButton>
|
|
2720
|
+
</Box>
|
|
2721
|
+
<Button priority="secondary" onClick={closePanel} fullWidth>
|
|
2722
|
+
Close
|
|
2723
|
+
</Button>
|
|
2724
|
+
</SidePanel.Footer>
|
|
2725
|
+
</SidePanel>
|
|
2726
|
+
</div>
|
|
2727
|
+
</Box>
|
|
2728
|
+
</Page.Content>
|
|
2729
|
+
</Page>
|
|
2730
|
+
);
|
|
2731
|
+
};
|
|
2732
|
+
|
|
2733
|
+
```
|
|
2734
|
+
|
|
2735
|
+
### Sticky table toolbar
|
|
2736
|
+
- description: <p>Wrap table toolbar to a<code><Page.Sticky/></code> element to keep it always visible to users. Use it for infinite scroll tables.</p>
|
|
2737
|
+
- example:
|
|
2738
|
+
```jsx
|
|
2739
|
+
() => {
|
|
2740
|
+
const records = [
|
|
2741
|
+
{
|
|
2742
|
+
image: <Image width="72px" height="48px" src="FoodExample1.jpg" />,
|
|
2743
|
+
title: 'Hot to make French toast',
|
|
2744
|
+
published: 'Sep 25, 2022',
|
|
2745
|
+
category: 'Food · ',
|
|
2746
|
+
length: '8 min',
|
|
2747
|
+
status: <Badge skin="neutralSuccess">Published</Badge>,
|
|
2748
|
+
},
|
|
2749
|
+
{
|
|
2750
|
+
image: <Image width="72px" height="48px" src="FoodExample2.jpg" />,
|
|
2751
|
+
title: 'Homemade pasta',
|
|
2752
|
+
published: 'Sep 12, 2022',
|
|
2753
|
+
category: 'Food · ',
|
|
2754
|
+
length: '11 min',
|
|
2755
|
+
status: <Badge skin="neutralSuccess">Published</Badge>,
|
|
2756
|
+
},
|
|
2757
|
+
{
|
|
2758
|
+
image: <Image width="72px" height="48px" src="FoodExample3.jpg" />,
|
|
2759
|
+
title: '56 last minute Christmas dinner ideas',
|
|
2760
|
+
published: '',
|
|
2761
|
+
category: 'Food · ',
|
|
2762
|
+
length: '5 min',
|
|
2763
|
+
status: <Badge skin="neutralLight">Draft</Badge>,
|
|
2764
|
+
},
|
|
2765
|
+
{
|
|
2766
|
+
image: <Image width="72px" height="48px" src="FoodExample4.jpg" />,
|
|
2767
|
+
title: 'Breakfast in 5 minutes',
|
|
2768
|
+
published: '',
|
|
2769
|
+
category: 'Food · ',
|
|
2770
|
+
length: '5 min',
|
|
2771
|
+
status: <Badge skin="neutralLight">Draft</Badge>,
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
image: <Image width="72px" height="48px" src="FoodExample5.jpg" />,
|
|
2775
|
+
title: 'Homemade soup',
|
|
2776
|
+
published: '',
|
|
2777
|
+
category: 'Food · ',
|
|
2778
|
+
length: '2 min',
|
|
2779
|
+
status: <Badge skin="neutralLight">Draft</Badge>,
|
|
2780
|
+
},
|
|
2781
|
+
{
|
|
2782
|
+
image: <Image width="72px" height="48px" src="FoodExample1.jpg" />,
|
|
2783
|
+
title: 'Hot to make French toast',
|
|
2784
|
+
published: 'Sep 25, 2022',
|
|
2785
|
+
category: 'Food · ',
|
|
2786
|
+
length: '8 min',
|
|
2787
|
+
status: <Badge skin="neutralLight">Draft</Badge>,
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
image: <Image width="72px" height="48px" src="FoodExample2.jpg" />,
|
|
2791
|
+
title: 'Homemade pasta',
|
|
2792
|
+
published: 'Sep 12, 2022',
|
|
2793
|
+
category: 'Food · ',
|
|
2794
|
+
length: '11 min',
|
|
2795
|
+
status: <Badge skin="neutralSuccess">Published</Badge>,
|
|
2796
|
+
},
|
|
2797
|
+
{
|
|
2798
|
+
image: <Image width="72px" height="48px" src="FoodExample3.jpg" />,
|
|
2799
|
+
title: '56 last minute Christmas dinner ideas',
|
|
2800
|
+
published: '',
|
|
2801
|
+
category: 'Food · ',
|
|
2802
|
+
length: '5 min',
|
|
2803
|
+
status: <Badge skin="neutralLight">Draft</Badge>,
|
|
2804
|
+
},
|
|
2805
|
+
];
|
|
2806
|
+
|
|
2807
|
+
const primaryAction = {
|
|
2808
|
+
text: 'Edit',
|
|
2809
|
+
skin: 'standard',
|
|
2810
|
+
onClick: () => {},
|
|
2811
|
+
};
|
|
2812
|
+
|
|
2813
|
+
const secondaryActions = [
|
|
2814
|
+
{
|
|
2815
|
+
text: 'Share',
|
|
2816
|
+
icon: <Icons.ShareSmall />,
|
|
2817
|
+
onClick: () => {},
|
|
2818
|
+
},
|
|
2819
|
+
{
|
|
2820
|
+
text: 'Duplicate',
|
|
2821
|
+
icon: <Icons.DuplicateSmall />,
|
|
2822
|
+
onClick: () => {},
|
|
2823
|
+
},
|
|
2824
|
+
{
|
|
2825
|
+
text: 'Delete',
|
|
2826
|
+
icon: <Icons.DeleteSmall />,
|
|
2827
|
+
onClick: () => {},
|
|
2828
|
+
},
|
|
2829
|
+
];
|
|
2830
|
+
|
|
2831
|
+
const columns = [
|
|
2832
|
+
{ title: '', width: '72px', render: row => row.image },
|
|
2833
|
+
{
|
|
2834
|
+
title: 'Title',
|
|
2835
|
+
render: row => (
|
|
2836
|
+
<Box direction="vertical" gap="3px">
|
|
2837
|
+
<Text size="medium" weight="normal">
|
|
2838
|
+
{row.title}
|
|
2839
|
+
</Text>
|
|
2840
|
+
<Text size="tiny" weight="thin" secondary>
|
|
2841
|
+
{row.category}
|
|
2842
|
+
{row.length}
|
|
2843
|
+
</Text>
|
|
2844
|
+
</Box>
|
|
2845
|
+
),
|
|
2846
|
+
width: '40%',
|
|
2847
|
+
},
|
|
2848
|
+
{ title: 'Publish Date', render: row => row.published, width: '15%' },
|
|
2849
|
+
{ title: 'Status', render: row => row.status, width: '15%' },
|
|
2850
|
+
{
|
|
2851
|
+
render: rowData => (
|
|
2852
|
+
<TableActionCell
|
|
2853
|
+
size="small"
|
|
2854
|
+
primaryAction={primaryAction}
|
|
2855
|
+
secondaryActions={secondaryActions}
|
|
2856
|
+
numOfVisibleSecondaryActions={1}
|
|
2857
|
+
popoverMenuProps={{ appendTo: 'window' }}
|
|
2858
|
+
moreActionsTooltipText="More actions"
|
|
2859
|
+
/>
|
|
2860
|
+
),
|
|
2861
|
+
},
|
|
2862
|
+
];
|
|
2863
|
+
|
|
2864
|
+
return (
|
|
2865
|
+
<Page height="540px">
|
|
2866
|
+
<Page.Header title="Blog posts" />
|
|
2867
|
+
<Page.Content>
|
|
2868
|
+
<Table data={records} columns={columns}>
|
|
2869
|
+
<Page.Sticky>
|
|
2870
|
+
<Card>
|
|
2871
|
+
<TableToolbar>
|
|
2872
|
+
<TableToolbar.ItemGroup position="start">
|
|
2873
|
+
<TableToolbar.Item>
|
|
2874
|
+
<Text size="small">5 items</Text>
|
|
2875
|
+
</TableToolbar.Item>
|
|
2876
|
+
</TableToolbar.ItemGroup>
|
|
2877
|
+
</TableToolbar>
|
|
2878
|
+
<Table.Titlebar />
|
|
2879
|
+
</Card>
|
|
2880
|
+
</Page.Sticky>
|
|
2881
|
+
<Card>
|
|
2882
|
+
<Table.Content titleBarVisible={false} />
|
|
2883
|
+
</Card>
|
|
2884
|
+
</Table>
|
|
2885
|
+
</Page.Content>
|
|
2886
|
+
</Page>
|
|
2887
|
+
);
|
|
2888
|
+
};
|
|
2889
|
+
```
|
|
2890
|
+
|
|
2891
|
+
|