@itwin/itwinui-react 3.12.2 → 3.13.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/CHANGELOG.md +38 -0
- package/DEV-cjs/core/Alert/Alert.js +90 -0
- package/DEV-cjs/core/Avatar/Avatar.js +55 -0
- package/DEV-cjs/core/AvatarGroup/AvatarGroup.js +38 -0
- package/DEV-cjs/core/Backdrop/Backdrop.js +26 -0
- package/DEV-cjs/core/Badge/Badge.js +48 -0
- package/DEV-cjs/core/Breadcrumbs/Breadcrumbs.js +96 -0
- package/DEV-cjs/core/ButtonGroup/ButtonGroup.js +91 -0
- package/DEV-cjs/core/Buttons/Button.js +54 -0
- package/DEV-cjs/core/Buttons/DropdownButton.js +43 -0
- package/DEV-cjs/core/Buttons/IconButton.js +46 -0
- package/DEV-cjs/core/Buttons/IdeasButton.js +30 -0
- package/DEV-cjs/core/Buttons/SplitButton.js +71 -0
- package/DEV-cjs/core/Carousel/Carousel.js +74 -0
- package/DEV-cjs/core/Carousel/CarouselContext.js +14 -0
- package/DEV-cjs/core/Carousel/CarouselDot.js +31 -0
- package/DEV-cjs/core/Carousel/CarouselDotsList.js +122 -0
- package/DEV-cjs/core/Carousel/CarouselNavigation.js +79 -0
- package/DEV-cjs/core/Carousel/CarouselSlide.js +46 -0
- package/DEV-cjs/core/Carousel/CarouselSlider.js +65 -0
- package/DEV-cjs/core/Checkbox/Checkbox.js +58 -0
- package/DEV-cjs/core/ColorPicker/ColorBuilder.js +250 -0
- package/DEV-cjs/core/ColorPicker/ColorInputPanel.js +384 -0
- package/DEV-cjs/core/ColorPicker/ColorPalette.js +43 -0
- package/DEV-cjs/core/ColorPicker/ColorPicker.js +79 -0
- package/DEV-cjs/core/ColorPicker/ColorPickerContext.js +26 -0
- package/DEV-cjs/core/ColorPicker/ColorSwatch.js +38 -0
- package/DEV-cjs/core/ComboBox/ComboBox.js +310 -0
- package/DEV-cjs/core/ComboBox/ComboBox.types-test.js +82 -0
- package/DEV-cjs/core/ComboBox/ComboBoxEndIcon.js +31 -0
- package/DEV-cjs/core/ComboBox/ComboBoxInput.js +133 -0
- package/DEV-cjs/core/ComboBox/ComboBoxInputContainer.js +32 -0
- package/DEV-cjs/core/ComboBox/ComboBoxMenu.js +101 -0
- package/DEV-cjs/core/ComboBox/ComboBoxMenuItem.js +48 -0
- package/DEV-cjs/core/ComboBox/ComboBoxMultipleContainer.js +22 -0
- package/DEV-cjs/core/ComboBox/helpers.js +24 -0
- package/DEV-cjs/core/DatePicker/DatePicker.js +382 -0
- package/DEV-cjs/core/Dialog/Dialog.js +65 -0
- package/DEV-cjs/core/Dialog/DialogBackdrop.js +43 -0
- package/DEV-cjs/core/Dialog/DialogButtonBar.js +13 -0
- package/DEV-cjs/core/Dialog/DialogContent.js +13 -0
- package/DEV-cjs/core/Dialog/DialogContext.js +22 -0
- package/DEV-cjs/core/Dialog/DialogDragContext.js +27 -0
- package/DEV-cjs/core/Dialog/DialogMain.js +131 -0
- package/DEV-cjs/core/Dialog/DialogTitleBar.js +41 -0
- package/DEV-cjs/core/Dialog/DialogTitleBarTitle.js +13 -0
- package/DEV-cjs/core/Divider/Divider.js +26 -0
- package/DEV-cjs/core/DropdownMenu/DropdownMenu.js +48 -0
- package/DEV-cjs/core/ExpandableBlock/ExpandableBlock.js +151 -0
- package/DEV-cjs/core/Fieldset/Fieldset.js +27 -0
- package/DEV-cjs/core/FileUpload/FileEmptyCard.js +35 -0
- package/DEV-cjs/core/FileUpload/FileUpload.js +61 -0
- package/DEV-cjs/core/FileUpload/FileUploadCard.js +153 -0
- package/DEV-cjs/core/FileUpload/FileUploadTemplate.js +39 -0
- package/DEV-cjs/core/Flex/Flex.js +88 -0
- package/DEV-cjs/core/Footer/Footer.js +103 -0
- package/DEV-cjs/core/Footer/FooterItem.js +13 -0
- package/DEV-cjs/core/Footer/FooterList.js +13 -0
- package/DEV-cjs/core/Footer/FooterSeparator.js +15 -0
- package/DEV-cjs/core/Header/Header.js +50 -0
- package/DEV-cjs/core/Header/HeaderBasicButton.js +23 -0
- package/DEV-cjs/core/Header/HeaderBreadcrumbs.js +41 -0
- package/DEV-cjs/core/Header/HeaderButton.js +51 -0
- package/DEV-cjs/core/Header/HeaderDropdownButton.js +48 -0
- package/DEV-cjs/core/Header/HeaderLogo.js +34 -0
- package/DEV-cjs/core/Header/HeaderSplitButton.js +53 -0
- package/DEV-cjs/core/Icon/Icon.js +40 -0
- package/DEV-cjs/core/InformationPanel/InformationPanel.js +68 -0
- package/DEV-cjs/core/InformationPanel/InformationPanelBody.js +13 -0
- package/DEV-cjs/core/InformationPanel/InformationPanelContent.js +26 -0
- package/DEV-cjs/core/InformationPanel/InformationPanelHeader.js +36 -0
- package/DEV-cjs/core/InformationPanel/InformationPanelWrapper.js +13 -0
- package/DEV-cjs/core/Input/Input.js +30 -0
- package/DEV-cjs/core/InputGrid/InputGrid.js +125 -0
- package/DEV-cjs/core/InputGroup/InputGroup.js +58 -0
- package/DEV-cjs/core/InputWithDecorations/InputWithDecorations.js +61 -0
- package/DEV-cjs/core/Label/Label.js +29 -0
- package/DEV-cjs/core/LabeledInput/LabeledInput.js +49 -0
- package/DEV-cjs/core/LabeledSelect/LabeledSelect.js +43 -0
- package/DEV-cjs/core/LabeledSelect/LabeledSelect.types-test.js +84 -0
- package/DEV-cjs/core/LabeledTextarea/LabeledTextarea.js +20 -0
- package/DEV-cjs/core/LinkAction/LinkAction.js +36 -0
- package/DEV-cjs/core/List/List.js +15 -0
- package/DEV-cjs/core/List/ListItem.js +45 -0
- package/DEV-cjs/core/Menu/Menu.js +140 -0
- package/DEV-cjs/core/Menu/MenuDivider.js +15 -0
- package/DEV-cjs/core/Menu/MenuExtraContent.js +15 -0
- package/DEV-cjs/core/Menu/MenuItem.js +82 -0
- package/DEV-cjs/core/Menu/MenuItemSkeleton.js +44 -0
- package/DEV-cjs/core/Modal/Modal.js +36 -0
- package/DEV-cjs/core/Modal/ModalButtonBar.js +13 -0
- package/DEV-cjs/core/Modal/ModalContent.js +13 -0
- package/DEV-cjs/core/NonIdealState/ErrorPage.js +133 -0
- package/DEV-cjs/core/NonIdealState/NonIdealState.js +40 -0
- package/DEV-cjs/core/NotificationMarker/NotificationMarker.js +29 -0
- package/DEV-cjs/core/Overlay/Overlay.js +52 -0
- package/DEV-cjs/core/Popover/Popover.js +209 -0
- package/DEV-cjs/core/ProgressIndicators/ProgressLinear.js +38 -0
- package/DEV-cjs/core/ProgressIndicators/ProgressRadial.js +45 -0
- package/DEV-cjs/core/Radio/Radio.js +42 -0
- package/DEV-cjs/core/RadioTiles/RadioTile.js +47 -0
- package/DEV-cjs/core/RadioTiles/RadioTileGroup.js +25 -0
- package/DEV-cjs/core/SearchBox/SearchBox.js +154 -0
- package/DEV-cjs/core/Select/Select.js +300 -0
- package/DEV-cjs/core/Select/Select.types-test.js +90 -0
- package/DEV-cjs/core/Select/SelectTag.js +27 -0
- package/DEV-cjs/core/Select/SelectTagContainer.js +28 -0
- package/DEV-cjs/core/SideNavigation/SideNavigation.js +74 -0
- package/DEV-cjs/core/SideNavigation/SidenavButton.js +37 -0
- package/DEV-cjs/core/SideNavigation/SidenavSubmenu.js +26 -0
- package/DEV-cjs/core/SideNavigation/SidenavSubmenuHeader.js +28 -0
- package/DEV-cjs/core/SkipToContentLink/SkipToContentLink.js +25 -0
- package/DEV-cjs/core/Slider/Slider.js +281 -0
- package/DEV-cjs/core/Slider/Thumb.js +102 -0
- package/DEV-cjs/core/Slider/Track.js +70 -0
- package/DEV-cjs/core/StatusMessage/StatusMessage.js +31 -0
- package/DEV-cjs/core/Stepper/Stepper.js +56 -0
- package/DEV-cjs/core/Stepper/StepperStep.js +64 -0
- package/DEV-cjs/core/Stepper/WorkflowDiagram.js +37 -0
- package/DEV-cjs/core/Stepper/WorkflowDiagramStep.js +32 -0
- package/DEV-cjs/core/Surface/Surface.js +94 -0
- package/DEV-cjs/core/Table/SubRowExpander.js +37 -0
- package/DEV-cjs/core/Table/Table.js +538 -0
- package/DEV-cjs/core/Table/TableCell.js +69 -0
- package/DEV-cjs/core/Table/TablePaginator.js +188 -0
- package/DEV-cjs/core/Table/TableRowMemoized.js +99 -0
- package/DEV-cjs/core/Table/actionHandlers/expandHandler.js +21 -0
- package/DEV-cjs/core/Table/actionHandlers/filterHandler.js +26 -0
- package/DEV-cjs/core/Table/actionHandlers/index.js +37 -0
- package/DEV-cjs/core/Table/actionHandlers/resizeHandler.js +32 -0
- package/DEV-cjs/core/Table/actionHandlers/selectHandler.js +100 -0
- package/DEV-cjs/core/Table/cells/DefaultCell.js +48 -0
- package/DEV-cjs/core/Table/cells/EditableCell.js +67 -0
- package/DEV-cjs/core/Table/cells/index.js +20 -0
- package/DEV-cjs/core/Table/columns/actionColumn.js +81 -0
- package/DEV-cjs/core/Table/columns/expanderColumn.js +57 -0
- package/DEV-cjs/core/Table/columns/index.js +30 -0
- package/DEV-cjs/core/Table/columns/selectionColumn.js +67 -0
- package/DEV-cjs/core/Table/filters/BaseFilter.js +27 -0
- package/DEV-cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +91 -0
- package/DEV-cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +98 -0
- package/DEV-cjs/core/Table/filters/FilterButtonBar.js +38 -0
- package/DEV-cjs/core/Table/filters/FilterToggle.js +60 -0
- package/DEV-cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +65 -0
- package/DEV-cjs/core/Table/filters/TextFilter/TextFilter.js +39 -0
- package/DEV-cjs/core/Table/filters/customFilterFunctions.js +25 -0
- package/DEV-cjs/core/Table/filters/defaultFilterFunctions.js +83 -0
- package/DEV-cjs/core/Table/filters/index.js +28 -0
- package/DEV-cjs/core/Table/filters/tableFilters.js +29 -0
- package/DEV-cjs/core/Table/filters/types.js +4 -0
- package/DEV-cjs/core/Table/hooks/index.js +44 -0
- package/DEV-cjs/core/Table/hooks/useColumnDragAndDrop.js +109 -0
- package/DEV-cjs/core/Table/hooks/useExpanderCell.js +31 -0
- package/DEV-cjs/core/Table/hooks/useResizeColumns.js +269 -0
- package/DEV-cjs/core/Table/hooks/useScrollToRow.js +41 -0
- package/DEV-cjs/core/Table/hooks/useSelectionCell.js +21 -0
- package/DEV-cjs/core/Table/hooks/useStickyColumns.js +57 -0
- package/DEV-cjs/core/Table/hooks/useSubRowFiltering.js +92 -0
- package/DEV-cjs/core/Table/hooks/useSubRowSelection.js +43 -0
- package/DEV-cjs/core/Table/index.js +47 -0
- package/DEV-cjs/core/Table/utils.js +74 -0
- package/DEV-cjs/core/Tabs/Tabs.js +300 -0
- package/DEV-cjs/core/Tag/Tag.js +46 -0
- package/DEV-cjs/core/Tag/TagContainer.js +27 -0
- package/DEV-cjs/core/Textarea/Textarea.js +20 -0
- package/DEV-cjs/core/ThemeProvider/ThemeContext.js +13 -0
- package/DEV-cjs/core/ThemeProvider/ThemeProvider.js +189 -0
- package/DEV-cjs/core/Tile/Tile.js +211 -0
- package/DEV-cjs/core/TimePicker/TimePicker.js +283 -0
- package/DEV-cjs/core/Toast/Toast.js +173 -0
- package/DEV-cjs/core/Toast/Toaster.js +136 -0
- package/DEV-cjs/core/ToggleSwitch/ToggleSwitch.js +46 -0
- package/DEV-cjs/core/Tooltip/Tooltip.js +180 -0
- package/DEV-cjs/core/TransferList/TransferList.js +153 -0
- package/DEV-cjs/core/Tree/Tree.js +198 -0
- package/DEV-cjs/core/Tree/TreeContext.js +26 -0
- package/DEV-cjs/core/Tree/TreeNode.js +153 -0
- package/DEV-cjs/core/Tree/TreeNodeExpander.js +35 -0
- package/DEV-cjs/core/Typography/Anchor.js +31 -0
- package/DEV-cjs/core/Typography/Blockquote.js +25 -0
- package/DEV-cjs/core/Typography/Code.js +13 -0
- package/DEV-cjs/core/Typography/Kbd.js +48 -0
- package/DEV-cjs/core/Typography/Text.js +40 -0
- package/DEV-cjs/core/VisuallyHidden/VisuallyHidden.js +44 -0
- package/DEV-cjs/index.js +481 -0
- package/DEV-cjs/react-table/react-table.js +4 -0
- package/DEV-cjs/react-table/react-table.types-test.js +496 -0
- package/DEV-cjs/styles.js +1 -0
- package/DEV-cjs/utils/color/ColorValue.js +343 -0
- package/DEV-cjs/utils/color/index.js +6 -0
- package/DEV-cjs/utils/components/AutoclearingHiddenLiveRegion.js +29 -0
- package/DEV-cjs/utils/components/Box.js +12 -0
- package/DEV-cjs/utils/components/ButtonBase.js +39 -0
- package/DEV-cjs/utils/components/FieldsetBase.js +12 -0
- package/DEV-cjs/utils/components/FocusTrap.js +48 -0
- package/DEV-cjs/utils/components/InputContainer.js +37 -0
- package/DEV-cjs/utils/components/InputFlexContainer.js +58 -0
- package/DEV-cjs/utils/components/InputWithIcon.js +13 -0
- package/DEV-cjs/utils/components/LineClamp.js +35 -0
- package/DEV-cjs/utils/components/MiddleTextTruncation.js +38 -0
- package/DEV-cjs/utils/components/Portal.js +41 -0
- package/DEV-cjs/utils/components/Resizer.js +226 -0
- package/DEV-cjs/utils/components/ShadowRoot.js +77 -0
- package/DEV-cjs/utils/components/WithCSSTransition.js +53 -0
- package/DEV-cjs/utils/components/index.js +19 -0
- package/DEV-cjs/utils/functions/colors.js +45 -0
- package/DEV-cjs/utils/functions/date.js +18 -0
- package/DEV-cjs/utils/functions/dev.js +31 -0
- package/DEV-cjs/utils/functions/dom.js +47 -0
- package/DEV-cjs/utils/functions/focusable.js +73 -0
- package/DEV-cjs/utils/functions/import.js +27 -0
- package/DEV-cjs/utils/functions/index.js +15 -0
- package/DEV-cjs/utils/functions/numbers.js +32 -0
- package/DEV-cjs/utils/functions/polymorphic.js +48 -0
- package/DEV-cjs/utils/functions/react.js +26 -0
- package/DEV-cjs/utils/functions/supports.js +12 -0
- package/DEV-cjs/utils/hooks/index.js +21 -0
- package/DEV-cjs/utils/hooks/useContainerWidth.js +29 -0
- package/DEV-cjs/utils/hooks/useControlledState.js +30 -0
- package/DEV-cjs/utils/hooks/useDragAndDrop.js +92 -0
- package/DEV-cjs/utils/hooks/useEventListener.js +31 -0
- package/DEV-cjs/utils/hooks/useGlobals.js +51 -0
- package/DEV-cjs/utils/hooks/useId.js +21 -0
- package/DEV-cjs/utils/hooks/useIntersection.js +41 -0
- package/DEV-cjs/utils/hooks/useIsClient.js +19 -0
- package/DEV-cjs/utils/hooks/useIsomorphicLayoutEffect.js +13 -0
- package/DEV-cjs/utils/hooks/useLatestRef.js +21 -0
- package/DEV-cjs/utils/hooks/useMediaQuery.js +26 -0
- package/DEV-cjs/utils/hooks/useMergedRefs.js +29 -0
- package/DEV-cjs/utils/hooks/useOverflow.js +76 -0
- package/DEV-cjs/utils/hooks/useResizeObserver.js +36 -0
- package/DEV-cjs/utils/hooks/useSafeContext.js +17 -0
- package/DEV-cjs/utils/hooks/useSyncExternalStore.js +46 -0
- package/DEV-cjs/utils/hooks/useVirtualScroll.js +38 -0
- package/DEV-cjs/utils/icons/StatusIconMap.js +34 -0
- package/DEV-cjs/utils/icons/Svg.js +16 -0
- package/DEV-cjs/utils/icons/SvgCalendar.js +16 -0
- package/DEV-cjs/utils/icons/SvgCaretDownSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgCaretRightSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgCaretUpSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgCheckmark.js +16 -0
- package/DEV-cjs/utils/icons/SvgCheckmarkSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgChevronLeft.js +16 -0
- package/DEV-cjs/utils/icons/SvgChevronLeftDouble.js +16 -0
- package/DEV-cjs/utils/icons/SvgChevronRight.js +16 -0
- package/DEV-cjs/utils/icons/SvgChevronRightDouble.js +16 -0
- package/DEV-cjs/utils/icons/SvgChevronRightSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgClose.js +16 -0
- package/DEV-cjs/utils/icons/SvgCloseSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgColumnManager.js +16 -0
- package/DEV-cjs/utils/icons/SvgDocument.js +16 -0
- package/DEV-cjs/utils/icons/SvgFilter.js +16 -0
- package/DEV-cjs/utils/icons/SvgFilterHollow.js +16 -0
- package/DEV-cjs/utils/icons/SvgImportantSmall.js +16 -0
- package/DEV-cjs/utils/icons/SvgInfoCircular.js +16 -0
- package/DEV-cjs/utils/icons/SvgMore.js +16 -0
- package/DEV-cjs/utils/icons/SvgMoreVertical.js +16 -0
- package/DEV-cjs/utils/icons/SvgNew.js +16 -0
- package/DEV-cjs/utils/icons/SvgSearch.js +16 -0
- package/DEV-cjs/utils/icons/SvgSmileyHappy.js +16 -0
- package/DEV-cjs/utils/icons/SvgSortDown.js +16 -0
- package/DEV-cjs/utils/icons/SvgSortUp.js +16 -0
- package/DEV-cjs/utils/icons/SvgStatusError.js +16 -0
- package/DEV-cjs/utils/icons/SvgStatusSuccess.js +16 -0
- package/DEV-cjs/utils/icons/SvgStatusWarning.js +16 -0
- package/DEV-cjs/utils/icons/SvgSwap.js +16 -0
- package/DEV-cjs/utils/icons/SvgUpload.js +16 -0
- package/DEV-cjs/utils/icons/index.js +37 -0
- package/DEV-cjs/utils/index.js +13 -0
- package/DEV-cjs/utils/meta.js +16 -0
- package/DEV-cjs/utils/props.js +4 -0
- package/DEV-cjs/utils/providers/HydrationProvider.js +46 -0
- package/DEV-cjs/utils/providers/ScopeProvider.js +64 -0
- package/DEV-cjs/utils/providers/index.js +7 -0
- package/DEV-cjs/utils/types.js +4 -0
- package/DEV-esm/core/Alert/Alert.js +78 -0
- package/DEV-esm/core/Avatar/Avatar.js +35 -0
- package/DEV-esm/core/AvatarGroup/AvatarGroup.js +26 -0
- package/DEV-esm/core/Backdrop/Backdrop.js +14 -0
- package/DEV-esm/core/Badge/Badge.js +36 -0
- package/DEV-esm/core/Breadcrumbs/Breadcrumbs.js +84 -0
- package/DEV-esm/core/ButtonGroup/ButtonGroup.js +71 -0
- package/DEV-esm/core/Buttons/Button.js +42 -0
- package/DEV-esm/core/Buttons/DropdownButton.js +31 -0
- package/DEV-esm/core/Buttons/IconButton.js +34 -0
- package/DEV-esm/core/Buttons/IdeasButton.js +18 -0
- package/DEV-esm/core/Buttons/SplitButton.js +59 -0
- package/DEV-esm/core/Carousel/Carousel.js +62 -0
- package/DEV-esm/core/Carousel/CarouselContext.js +3 -0
- package/DEV-esm/core/Carousel/CarouselDot.js +19 -0
- package/DEV-esm/core/Carousel/CarouselDotsList.js +110 -0
- package/DEV-esm/core/Carousel/CarouselNavigation.js +67 -0
- package/DEV-esm/core/Carousel/CarouselSlide.js +34 -0
- package/DEV-esm/core/Carousel/CarouselSlider.js +53 -0
- package/DEV-esm/core/Checkbox/Checkbox.js +46 -0
- package/DEV-esm/core/ColorPicker/ColorBuilder.js +238 -0
- package/DEV-esm/core/ColorPicker/ColorInputPanel.js +372 -0
- package/DEV-esm/core/ColorPicker/ColorPalette.js +31 -0
- package/DEV-esm/core/ColorPicker/ColorPicker.js +59 -0
- package/DEV-esm/core/ColorPicker/ColorPickerContext.js +7 -0
- package/DEV-esm/core/ColorPicker/ColorSwatch.js +26 -0
- package/DEV-esm/core/ComboBox/ComboBox.js +299 -0
- package/DEV-esm/core/ComboBox/ComboBox.types-test.js +78 -0
- package/DEV-esm/core/ComboBox/ComboBoxEndIcon.js +19 -0
- package/DEV-esm/core/ComboBox/ComboBoxInput.js +122 -0
- package/DEV-esm/core/ComboBox/ComboBoxInputContainer.js +21 -0
- package/DEV-esm/core/ComboBox/ComboBoxMenu.js +89 -0
- package/DEV-esm/core/ComboBox/ComboBoxMenuItem.js +37 -0
- package/DEV-esm/core/ComboBox/ComboBoxMultipleContainer.js +11 -0
- package/DEV-esm/core/ComboBox/helpers.js +5 -0
- package/DEV-esm/core/DatePicker/DatePicker.js +362 -0
- package/DEV-esm/core/Dialog/Dialog.js +53 -0
- package/DEV-esm/core/Dialog/DialogBackdrop.js +31 -0
- package/DEV-esm/core/Dialog/DialogButtonBar.js +3 -0
- package/DEV-esm/core/Dialog/DialogContent.js +3 -0
- package/DEV-esm/core/Dialog/DialogContext.js +3 -0
- package/DEV-esm/core/Dialog/DialogDragContext.js +8 -0
- package/DEV-esm/core/Dialog/DialogMain.js +119 -0
- package/DEV-esm/core/Dialog/DialogTitleBar.js +29 -0
- package/DEV-esm/core/Dialog/DialogTitleBarTitle.js +3 -0
- package/DEV-esm/core/Divider/Divider.js +14 -0
- package/DEV-esm/core/DropdownMenu/DropdownMenu.js +37 -0
- package/DEV-esm/core/ExpandableBlock/ExpandableBlock.js +139 -0
- package/DEV-esm/core/Fieldset/Fieldset.js +15 -0
- package/DEV-esm/core/FileUpload/FileEmptyCard.js +23 -0
- package/DEV-esm/core/FileUpload/FileUpload.js +49 -0
- package/DEV-esm/core/FileUpload/FileUploadCard.js +133 -0
- package/DEV-esm/core/FileUpload/FileUploadTemplate.js +27 -0
- package/DEV-esm/core/Flex/Flex.js +76 -0
- package/DEV-esm/core/Footer/Footer.js +83 -0
- package/DEV-esm/core/Footer/FooterItem.js +3 -0
- package/DEV-esm/core/Footer/FooterList.js +3 -0
- package/DEV-esm/core/Footer/FooterSeparator.js +5 -0
- package/DEV-esm/core/Header/Header.js +38 -0
- package/DEV-esm/core/Header/HeaderBasicButton.js +11 -0
- package/DEV-esm/core/Header/HeaderBreadcrumbs.js +29 -0
- package/DEV-esm/core/Header/HeaderButton.js +40 -0
- package/DEV-esm/core/Header/HeaderDropdownButton.js +36 -0
- package/DEV-esm/core/Header/HeaderLogo.js +22 -0
- package/DEV-esm/core/Header/HeaderSplitButton.js +41 -0
- package/DEV-esm/core/Icon/Icon.js +28 -0
- package/DEV-esm/core/InformationPanel/InformationPanel.js +56 -0
- package/DEV-esm/core/InformationPanel/InformationPanelBody.js +3 -0
- package/DEV-esm/core/InformationPanel/InformationPanelContent.js +14 -0
- package/DEV-esm/core/InformationPanel/InformationPanelHeader.js +24 -0
- package/DEV-esm/core/InformationPanel/InformationPanelWrapper.js +3 -0
- package/DEV-esm/core/Input/Input.js +18 -0
- package/DEV-esm/core/InputGrid/InputGrid.js +113 -0
- package/DEV-esm/core/InputGroup/InputGroup.js +46 -0
- package/DEV-esm/core/InputWithDecorations/InputWithDecorations.js +50 -0
- package/DEV-esm/core/Label/Label.js +17 -0
- package/DEV-esm/core/LabeledInput/LabeledInput.js +37 -0
- package/DEV-esm/core/LabeledSelect/LabeledSelect.js +32 -0
- package/DEV-esm/core/LabeledSelect/LabeledSelect.types-test.js +80 -0
- package/DEV-esm/core/LabeledTextarea/LabeledTextarea.js +9 -0
- package/DEV-esm/core/LinkAction/LinkAction.js +16 -0
- package/DEV-esm/core/List/List.js +5 -0
- package/DEV-esm/core/List/ListItem.js +33 -0
- package/DEV-esm/core/Menu/Menu.js +120 -0
- package/DEV-esm/core/Menu/MenuDivider.js +5 -0
- package/DEV-esm/core/Menu/MenuExtraContent.js +5 -0
- package/DEV-esm/core/Menu/MenuItem.js +70 -0
- package/DEV-esm/core/Menu/MenuItemSkeleton.js +32 -0
- package/DEV-esm/core/Modal/Modal.js +25 -0
- package/DEV-esm/core/Modal/ModalButtonBar.js +3 -0
- package/DEV-esm/core/Modal/ModalContent.js +3 -0
- package/DEV-esm/core/NonIdealState/ErrorPage.js +122 -0
- package/DEV-esm/core/NonIdealState/NonIdealState.js +28 -0
- package/DEV-esm/core/NotificationMarker/NotificationMarker.js +17 -0
- package/DEV-esm/core/Overlay/Overlay.js +41 -0
- package/DEV-esm/core/Popover/Popover.js +186 -0
- package/DEV-esm/core/ProgressIndicators/ProgressLinear.js +26 -0
- package/DEV-esm/core/ProgressIndicators/ProgressRadial.js +33 -0
- package/DEV-esm/core/Radio/Radio.js +30 -0
- package/DEV-esm/core/RadioTiles/RadioTile.js +35 -0
- package/DEV-esm/core/RadioTiles/RadioTileGroup.js +14 -0
- package/DEV-esm/core/SearchBox/SearchBox.js +142 -0
- package/DEV-esm/core/Select/Select.js +288 -0
- package/DEV-esm/core/Select/Select.types-test.js +86 -0
- package/DEV-esm/core/Select/SelectTag.js +15 -0
- package/DEV-esm/core/Select/SelectTagContainer.js +16 -0
- package/DEV-esm/core/SideNavigation/SideNavigation.js +54 -0
- package/DEV-esm/core/SideNavigation/SidenavButton.js +25 -0
- package/DEV-esm/core/SideNavigation/SidenavSubmenu.js +14 -0
- package/DEV-esm/core/SideNavigation/SidenavSubmenuHeader.js +16 -0
- package/DEV-esm/core/SkipToContentLink/SkipToContentLink.js +13 -0
- package/DEV-esm/core/Slider/Slider.js +269 -0
- package/DEV-esm/core/Slider/Thumb.js +90 -0
- package/DEV-esm/core/Slider/Track.js +58 -0
- package/DEV-esm/core/StatusMessage/StatusMessage.js +19 -0
- package/DEV-esm/core/Stepper/Stepper.js +44 -0
- package/DEV-esm/core/Stepper/StepperStep.js +52 -0
- package/DEV-esm/core/Stepper/WorkflowDiagram.js +25 -0
- package/DEV-esm/core/Stepper/WorkflowDiagramStep.js +20 -0
- package/DEV-esm/core/Surface/Surface.js +82 -0
- package/DEV-esm/core/Table/SubRowExpander.js +26 -0
- package/DEV-esm/core/Table/Table.js +518 -0
- package/DEV-esm/core/Table/TableCell.js +57 -0
- package/DEV-esm/core/Table/TablePaginator.js +176 -0
- package/DEV-esm/core/Table/TableRowMemoized.js +79 -0
- package/DEV-esm/core/Table/actionHandlers/expandHandler.js +11 -0
- package/DEV-esm/core/Table/actionHandlers/filterHandler.js +16 -0
- package/DEV-esm/core/Table/actionHandlers/index.js +4 -0
- package/DEV-esm/core/Table/actionHandlers/resizeHandler.js +14 -0
- package/DEV-esm/core/Table/actionHandlers/selectHandler.js +79 -0
- package/DEV-esm/core/Table/cells/DefaultCell.js +36 -0
- package/DEV-esm/core/Table/cells/EditableCell.js +55 -0
- package/DEV-esm/core/Table/cells/index.js +2 -0
- package/DEV-esm/core/Table/columns/actionColumn.js +70 -0
- package/DEV-esm/core/Table/columns/expanderColumn.js +38 -0
- package/DEV-esm/core/Table/columns/index.js +3 -0
- package/DEV-esm/core/Table/columns/selectionColumn.js +48 -0
- package/DEV-esm/core/Table/filters/BaseFilter.js +15 -0
- package/DEV-esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +80 -0
- package/DEV-esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +87 -0
- package/DEV-esm/core/Table/filters/FilterButtonBar.js +26 -0
- package/DEV-esm/core/Table/filters/FilterToggle.js +48 -0
- package/DEV-esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +54 -0
- package/DEV-esm/core/Table/filters/TextFilter/TextFilter.js +28 -0
- package/DEV-esm/core/Table/filters/customFilterFunctions.js +15 -0
- package/DEV-esm/core/Table/filters/defaultFilterFunctions.js +73 -0
- package/DEV-esm/core/Table/filters/index.js +4 -0
- package/DEV-esm/core/Table/filters/tableFilters.js +18 -0
- package/DEV-esm/core/Table/filters/types.js +1 -0
- package/DEV-esm/core/Table/hooks/index.js +8 -0
- package/DEV-esm/core/Table/hooks/useColumnDragAndDrop.js +99 -0
- package/DEV-esm/core/Table/hooks/useExpanderCell.js +20 -0
- package/DEV-esm/core/Table/hooks/useResizeColumns.js +259 -0
- package/DEV-esm/core/Table/hooks/useScrollToRow.js +30 -0
- package/DEV-esm/core/Table/hooks/useSelectionCell.js +11 -0
- package/DEV-esm/core/Table/hooks/useStickyColumns.js +47 -0
- package/DEV-esm/core/Table/hooks/useSubRowFiltering.js +81 -0
- package/DEV-esm/core/Table/hooks/useSubRowSelection.js +32 -0
- package/DEV-esm/core/Table/index.js +5 -0
- package/DEV-esm/core/Table/utils.js +49 -0
- package/DEV-esm/core/Tabs/Tabs.js +281 -0
- package/DEV-esm/core/Tag/Tag.js +34 -0
- package/DEV-esm/core/Tag/TagContainer.js +15 -0
- package/DEV-esm/core/Textarea/Textarea.js +9 -0
- package/DEV-esm/core/ThemeProvider/ThemeContext.js +2 -0
- package/DEV-esm/core/ThemeProvider/ThemeProvider.js +177 -0
- package/DEV-esm/core/Tile/Tile.js +199 -0
- package/DEV-esm/core/TimePicker/TimePicker.js +271 -0
- package/DEV-esm/core/Toast/Toast.js +153 -0
- package/DEV-esm/core/Toast/Toaster.js +110 -0
- package/DEV-esm/core/ToggleSwitch/ToggleSwitch.js +34 -0
- package/DEV-esm/core/Tooltip/Tooltip.js +168 -0
- package/DEV-esm/core/TransferList/TransferList.js +133 -0
- package/DEV-esm/core/Tree/Tree.js +187 -0
- package/DEV-esm/core/Tree/TreeContext.js +7 -0
- package/DEV-esm/core/Tree/TreeNode.js +141 -0
- package/DEV-esm/core/Tree/TreeNodeExpander.js +23 -0
- package/DEV-esm/core/Typography/Anchor.js +19 -0
- package/DEV-esm/core/Typography/Blockquote.js +13 -0
- package/DEV-esm/core/Typography/Code.js +3 -0
- package/DEV-esm/core/Typography/Kbd.js +28 -0
- package/DEV-esm/core/Typography/Text.js +20 -0
- package/DEV-esm/core/VisuallyHidden/VisuallyHidden.js +32 -0
- package/DEV-esm/index.js +106 -0
- package/DEV-esm/react-table/react-table.js +1 -0
- package/DEV-esm/react-table/react-table.types-test.js +491 -0
- package/DEV-esm/styles.js +17 -0
- package/DEV-esm/utils/color/ColorValue.js +319 -0
- package/DEV-esm/utils/color/index.js +1 -0
- package/DEV-esm/utils/components/AutoclearingHiddenLiveRegion.js +18 -0
- package/DEV-esm/utils/components/Box.js +2 -0
- package/DEV-esm/utils/components/ButtonBase.js +27 -0
- package/DEV-esm/utils/components/FieldsetBase.js +2 -0
- package/DEV-esm/utils/components/FocusTrap.js +37 -0
- package/DEV-esm/utils/components/InputContainer.js +25 -0
- package/DEV-esm/utils/components/InputFlexContainer.js +35 -0
- package/DEV-esm/utils/components/InputWithIcon.js +3 -0
- package/DEV-esm/utils/components/LineClamp.js +24 -0
- package/DEV-esm/utils/components/MiddleTextTruncation.js +27 -0
- package/DEV-esm/utils/components/Portal.js +19 -0
- package/DEV-esm/utils/components/Resizer.js +215 -0
- package/DEV-esm/utils/components/ShadowRoot.js +66 -0
- package/DEV-esm/utils/components/WithCSSTransition.js +42 -0
- package/DEV-esm/utils/components/index.js +14 -0
- package/DEV-esm/utils/functions/colors.js +24 -0
- package/DEV-esm/utils/functions/date.js +8 -0
- package/DEV-esm/utils/functions/dev.js +14 -0
- package/DEV-esm/utils/functions/dom.js +20 -0
- package/DEV-esm/utils/functions/focusable.js +51 -0
- package/DEV-esm/utils/functions/import.js +17 -0
- package/DEV-esm/utils/functions/index.js +10 -0
- package/DEV-esm/utils/functions/numbers.js +11 -0
- package/DEV-esm/utils/functions/polymorphic.js +36 -0
- package/DEV-esm/utils/functions/react.js +15 -0
- package/DEV-esm/utils/functions/supports.js +2 -0
- package/DEV-esm/utils/hooks/index.js +16 -0
- package/DEV-esm/utils/hooks/useContainerWidth.js +18 -0
- package/DEV-esm/utils/hooks/useControlledState.js +19 -0
- package/DEV-esm/utils/hooks/useDragAndDrop.js +81 -0
- package/DEV-esm/utils/hooks/useEventListener.js +20 -0
- package/DEV-esm/utils/hooks/useGlobals.js +32 -0
- package/DEV-esm/utils/hooks/useId.js +10 -0
- package/DEV-esm/utils/hooks/useIntersection.js +30 -0
- package/DEV-esm/utils/hooks/useIsClient.js +8 -0
- package/DEV-esm/utils/hooks/useIsomorphicLayoutEffect.js +3 -0
- package/DEV-esm/utils/hooks/useLatestRef.js +10 -0
- package/DEV-esm/utils/hooks/useMediaQuery.js +15 -0
- package/DEV-esm/utils/hooks/useMergedRefs.js +10 -0
- package/DEV-esm/utils/hooks/useOverflow.js +65 -0
- package/DEV-esm/utils/hooks/useResizeObserver.js +25 -0
- package/DEV-esm/utils/hooks/useSafeContext.js +6 -0
- package/DEV-esm/utils/hooks/useSyncExternalStore.js +35 -0
- package/DEV-esm/utils/hooks/useVirtualScroll.js +27 -0
- package/DEV-esm/utils/icons/StatusIconMap.js +23 -0
- package/DEV-esm/utils/icons/Svg.js +6 -0
- package/DEV-esm/utils/icons/SvgCalendar.js +5 -0
- package/DEV-esm/utils/icons/SvgCaretDownSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgCaretRightSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgCaretUpSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgCheckmark.js +5 -0
- package/DEV-esm/utils/icons/SvgCheckmarkSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgChevronLeft.js +5 -0
- package/DEV-esm/utils/icons/SvgChevronLeftDouble.js +5 -0
- package/DEV-esm/utils/icons/SvgChevronRight.js +5 -0
- package/DEV-esm/utils/icons/SvgChevronRightDouble.js +5 -0
- package/DEV-esm/utils/icons/SvgChevronRightSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgClose.js +5 -0
- package/DEV-esm/utils/icons/SvgCloseSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgColumnManager.js +5 -0
- package/DEV-esm/utils/icons/SvgDocument.js +5 -0
- package/DEV-esm/utils/icons/SvgFilter.js +5 -0
- package/DEV-esm/utils/icons/SvgFilterHollow.js +5 -0
- package/DEV-esm/utils/icons/SvgImportantSmall.js +5 -0
- package/DEV-esm/utils/icons/SvgInfoCircular.js +5 -0
- package/DEV-esm/utils/icons/SvgMore.js +5 -0
- package/DEV-esm/utils/icons/SvgMoreVertical.js +5 -0
- package/DEV-esm/utils/icons/SvgNew.js +5 -0
- package/DEV-esm/utils/icons/SvgSearch.js +5 -0
- package/DEV-esm/utils/icons/SvgSmileyHappy.js +5 -0
- package/DEV-esm/utils/icons/SvgSortDown.js +5 -0
- package/DEV-esm/utils/icons/SvgSortUp.js +5 -0
- package/DEV-esm/utils/icons/SvgStatusError.js +5 -0
- package/DEV-esm/utils/icons/SvgStatusSuccess.js +5 -0
- package/DEV-esm/utils/icons/SvgStatusWarning.js +5 -0
- package/DEV-esm/utils/icons/SvgSwap.js +5 -0
- package/DEV-esm/utils/icons/SvgUpload.js +5 -0
- package/DEV-esm/utils/icons/index.js +32 -0
- package/DEV-esm/utils/index.js +8 -0
- package/DEV-esm/utils/meta.js +6 -0
- package/DEV-esm/utils/props.js +1 -0
- package/DEV-esm/utils/providers/HydrationProvider.js +27 -0
- package/DEV-esm/utils/providers/ScopeProvider.js +42 -0
- package/DEV-esm/utils/providers/index.js +2 -0
- package/DEV-esm/utils/types.js +1 -0
- package/cjs/core/Alert/Alert.js +11 -17
- package/cjs/core/Avatar/Avatar.js +5 -7
- package/cjs/core/AvatarGroup/AvatarGroup.js +8 -9
- package/cjs/core/Backdrop/Backdrop.js +1 -1
- package/cjs/core/Badge/Badge.js +8 -10
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +14 -20
- package/cjs/core/ButtonGroup/ButtonGroup.js +18 -24
- package/cjs/core/Buttons/Button.js +7 -7
- package/cjs/core/Buttons/DropdownButton.js +2 -2
- package/cjs/core/Buttons/IconButton.js +7 -7
- package/cjs/core/Buttons/IdeasButton.js +1 -1
- package/cjs/core/Buttons/SplitButton.js +9 -12
- package/cjs/core/Carousel/Carousel.js +10 -10
- package/cjs/core/Carousel/CarouselContext.js +1 -1
- package/cjs/core/Carousel/CarouselDot.js +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +59 -68
- package/cjs/core/Carousel/CarouselNavigation.js +9 -11
- package/cjs/core/Carousel/CarouselSlide.js +11 -15
- package/cjs/core/Carousel/CarouselSlider.js +13 -19
- package/cjs/core/Checkbox/Checkbox.js +13 -14
- package/cjs/core/ColorPicker/ColorBuilder.js +44 -57
- package/cjs/core/ColorPicker/ColorInputPanel.js +65 -92
- package/cjs/core/ColorPicker/ColorPalette.js +3 -3
- package/cjs/core/ColorPicker/ColorPicker.js +11 -19
- package/cjs/core/ColorPicker/ColorPickerContext.js +3 -4
- package/cjs/core/ColorPicker/ColorSwatch.js +5 -5
- package/cjs/core/ComboBox/ComboBox.js +80 -115
- package/cjs/core/ComboBox/ComboBox.types-test.js +14 -17
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +1 -2
- package/cjs/core/ComboBox/ComboBoxInput.js +39 -68
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +3 -4
- package/cjs/core/ComboBox/ComboBoxMenu.js +76 -44
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +7 -9
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
- package/cjs/core/ComboBox/helpers.js +2 -4
- package/cjs/core/DatePicker/DatePicker.js +132 -167
- package/cjs/core/Dialog/Dialog.js +3 -3
- package/cjs/core/Dialog/DialogBackdrop.js +8 -12
- package/cjs/core/Dialog/DialogContext.js +2 -4
- package/cjs/core/Dialog/DialogDragContext.js +2 -2
- package/cjs/core/Dialog/DialogMain.js +26 -40
- package/cjs/core/Dialog/DialogTitleBar.js +3 -3
- package/cjs/core/Dialog/DialogTitleBarTitle.d.ts +3 -1
- package/cjs/core/Divider/Divider.js +2 -2
- package/cjs/core/DropdownMenu/DropdownMenu.js +10 -15
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +21 -37
- package/cjs/core/Fieldset/Fieldset.js +2 -3
- package/cjs/core/FileUpload/FileEmptyCard.js +1 -1
- package/cjs/core/FileUpload/FileUpload.js +8 -10
- package/cjs/core/FileUpload/FileUploadCard.js +25 -40
- package/cjs/core/FileUpload/FileUploadTemplate.js +1 -1
- package/cjs/core/Flex/Flex.js +7 -12
- package/cjs/core/Footer/Footer.js +10 -11
- package/cjs/core/Header/Header.js +3 -3
- package/cjs/core/Header/HeaderBasicButton.js +1 -3
- package/cjs/core/Header/HeaderBreadcrumbs.js +1 -1
- package/cjs/core/Header/HeaderButton.js +7 -7
- package/cjs/core/Header/HeaderDropdownButton.js +6 -8
- package/cjs/core/Header/HeaderLogo.js +3 -3
- package/cjs/core/Header/HeaderSplitButton.js +5 -7
- package/cjs/core/Icon/Icon.js +2 -2
- package/cjs/core/InformationPanel/InformationPanel.js +25 -33
- package/cjs/core/InformationPanel/InformationPanelContent.js +2 -2
- package/cjs/core/InformationPanel/InformationPanelHeader.js +1 -1
- package/cjs/core/Input/Input.js +3 -3
- package/cjs/core/InputGrid/InputGrid.js +40 -71
- package/cjs/core/InputGroup/InputGroup.js +5 -8
- package/cjs/core/InputWithDecorations/InputWithDecorations.js +6 -9
- package/cjs/core/Label/Label.js +3 -3
- package/cjs/core/LabeledInput/LabeledInput.js +4 -4
- package/cjs/core/LabeledSelect/LabeledSelect.js +4 -6
- package/cjs/core/LabeledSelect/LabeledSelect.types-test.js +11 -14
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +4 -4
- package/cjs/core/LinkAction/LinkAction.js +1 -3
- package/cjs/core/List/List.js +0 -1
- package/cjs/core/List/ListItem.js +6 -11
- package/cjs/core/Menu/Menu.js +32 -38
- package/cjs/core/Menu/MenuItem.js +18 -24
- package/cjs/core/Menu/MenuItemSkeleton.js +2 -4
- package/cjs/core/Modal/Modal.js +1 -1
- package/cjs/core/NonIdealState/ErrorPage.js +26 -52
- package/cjs/core/NonIdealState/NonIdealState.js +1 -1
- package/cjs/core/NotificationMarker/NotificationMarker.js +1 -1
- package/cjs/core/Overlay/Overlay.js +10 -12
- package/cjs/core/Popover/Popover.js +35 -41
- package/cjs/core/ProgressIndicators/ProgressLinear.js +6 -6
- package/cjs/core/ProgressIndicators/ProgressRadial.js +7 -9
- package/cjs/core/Radio/Radio.js +8 -8
- package/cjs/core/RadioTiles/RadioTile.js +4 -4
- package/cjs/core/RadioTiles/RadioTileGroup.js +1 -1
- package/cjs/core/SearchBox/SearchBox.js +24 -42
- package/cjs/core/Select/Select.js +130 -142
- package/cjs/core/Select/Select.types-test.js +13 -17
- package/cjs/core/Select/SelectTag.js +1 -1
- package/cjs/core/Select/SelectTagContainer.js +3 -3
- package/cjs/core/SideNavigation/SideNavigation.js +6 -6
- package/cjs/core/SideNavigation/SidenavButton.js +8 -8
- package/cjs/core/SideNavigation/SidenavSubmenu.js +1 -1
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +1 -1
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +1 -1
- package/cjs/core/Slider/Slider.js +58 -83
- package/cjs/core/Slider/Thumb.js +13 -21
- package/cjs/core/Slider/Track.js +10 -14
- package/cjs/core/StatusMessage/StatusMessage.js +3 -3
- package/cjs/core/Stepper/Stepper.js +8 -8
- package/cjs/core/Stepper/StepperStep.js +15 -22
- package/cjs/core/Stepper/WorkflowDiagram.js +2 -2
- package/cjs/core/Stepper/WorkflowDiagramStep.js +2 -2
- package/cjs/core/Surface/Surface.d.ts +1 -0
- package/cjs/core/Surface/Surface.js +15 -24
- package/cjs/core/Table/SubRowExpander.js +3 -3
- package/cjs/core/Table/Table.d.ts +4 -1
- package/cjs/core/Table/Table.js +256 -244
- package/cjs/core/Table/TableCell.js +12 -14
- package/cjs/core/Table/TablePaginator.js +38 -55
- package/cjs/core/Table/TableRowMemoized.d.ts +3 -0
- package/cjs/core/Table/TableRowMemoized.js +43 -35
- package/cjs/core/Table/actionHandlers/expandHandler.js +2 -4
- package/cjs/core/Table/actionHandlers/filterHandler.js +3 -3
- package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -17
- package/cjs/core/Table/actionHandlers/selectHandler.js +20 -29
- package/cjs/core/Table/cells/DefaultCell.d.ts +4 -1
- package/cjs/core/Table/cells/DefaultCell.js +5 -5
- package/cjs/core/Table/cells/EditableCell.d.ts +4 -1
- package/cjs/core/Table/cells/EditableCell.js +7 -13
- package/cjs/core/Table/columns/actionColumn.d.ts +2 -2
- package/cjs/core/Table/columns/actionColumn.js +79 -88
- package/cjs/core/Table/columns/expanderColumn.js +4 -6
- package/cjs/core/Table/columns/selectionColumn.js +8 -10
- package/cjs/core/Table/filters/BaseFilter.js +1 -1
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +16 -25
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +17 -29
- package/cjs/core/Table/filters/FilterButtonBar.js +2 -2
- package/cjs/core/Table/filters/FilterToggle.js +8 -8
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +11 -17
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +7 -13
- package/cjs/core/Table/filters/customFilterFunctions.js +11 -12
- package/cjs/core/Table/filters/defaultFilterFunctions.js +69 -78
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +20 -26
- package/cjs/core/Table/hooks/useExpanderCell.js +4 -8
- package/cjs/core/Table/hooks/useResizeColumns.js +63 -100
- package/cjs/core/Table/hooks/useScrollToRow.js +13 -20
- package/cjs/core/Table/hooks/useSelectionCell.js +2 -4
- package/cjs/core/Table/hooks/useStickyColumns.js +10 -23
- package/cjs/core/Table/hooks/useSubRowFiltering.js +20 -34
- package/cjs/core/Table/hooks/useSubRowSelection.js +4 -5
- package/cjs/core/Table/utils.js +18 -31
- package/cjs/core/Tabs/Tabs.js +70 -102
- package/cjs/core/Tag/Tag.js +8 -8
- package/cjs/core/Tag/TagContainer.js +2 -2
- package/cjs/core/Textarea/Textarea.js +4 -4
- package/cjs/core/ThemeProvider/ThemeContext.js +1 -1
- package/cjs/core/ThemeProvider/ThemeProvider.js +60 -56
- package/cjs/core/Tile/Tile.js +27 -52
- package/cjs/core/TimePicker/TimePicker.js +82 -111
- package/cjs/core/Toast/Toast.js +30 -39
- package/cjs/core/Toast/Toaster.js +19 -25
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +5 -5
- package/cjs/core/Tooltip/Tooltip.js +30 -39
- package/cjs/core/TransferList/TransferList.js +33 -51
- package/cjs/core/Tree/Tree.d.ts +4 -1
- package/cjs/core/Tree/Tree.js +97 -77
- package/cjs/core/Tree/TreeContext.js +3 -4
- package/cjs/core/Tree/TreeNode.d.ts +2 -2
- package/cjs/core/Tree/TreeNode.js +22 -37
- package/cjs/core/Tree/TreeNodeExpander.js +4 -4
- package/cjs/core/Typography/Anchor.js +4 -4
- package/cjs/core/Typography/Blockquote.js +1 -1
- package/cjs/core/Typography/Kbd.js +1 -1
- package/cjs/core/Typography/Text.js +3 -3
- package/cjs/core/VisuallyHidden/VisuallyHidden.js +7 -7
- package/cjs/react-table/react-table.types-test.js +110 -115
- package/cjs/styles.js +5 -5
- package/cjs/utils/color/ColorValue.js +114 -161
- package/cjs/utils/components/AutoclearingHiddenLiveRegion.js +2 -2
- package/cjs/utils/components/ButtonBase.js +10 -13
- package/cjs/utils/components/FieldsetBase.d.ts +6 -0
- package/cjs/utils/components/FieldsetBase.js +12 -0
- package/cjs/utils/components/FocusTrap.js +14 -20
- package/cjs/utils/components/InputContainer.js +3 -3
- package/cjs/utils/components/InputFlexContainer.js +4 -5
- package/cjs/utils/components/InputWithIcon.js +0 -1
- package/cjs/utils/components/LineClamp.js +1 -1
- package/cjs/utils/components/MiddleTextTruncation.d.ts +4 -1
- package/cjs/utils/components/MiddleTextTruncation.js +5 -7
- package/cjs/utils/components/Portal.js +8 -12
- package/cjs/utils/components/Resizer.js +33 -49
- package/cjs/utils/components/ShadowRoot.js +19 -28
- package/cjs/utils/components/WithCSSTransition.js +4 -5
- package/cjs/utils/components/index.d.ts +1 -1
- package/cjs/utils/components/index.js +1 -1
- package/cjs/utils/functions/colors.js +4 -5
- package/cjs/utils/functions/date.js +3 -5
- package/cjs/utils/functions/dev.d.ts +11 -5
- package/cjs/utils/functions/dev.js +6 -23
- package/cjs/utils/functions/dom.js +7 -16
- package/cjs/utils/functions/focusable.js +18 -22
- package/cjs/utils/functions/import.js +1 -1
- package/cjs/utils/functions/numbers.js +5 -8
- package/cjs/utils/functions/polymorphic.js +31 -43
- package/cjs/utils/functions/react.js +4 -8
- package/cjs/utils/hooks/index.d.ts +1 -0
- package/cjs/utils/hooks/index.js +1 -0
- package/cjs/utils/hooks/useContainerWidth.js +8 -12
- package/cjs/utils/hooks/useControlledState.js +4 -5
- package/cjs/utils/hooks/useDragAndDrop.js +31 -42
- package/cjs/utils/hooks/useEventListener.js +3 -5
- package/cjs/utils/hooks/useGlobals.js +3 -22
- package/cjs/utils/hooks/useId.js +1 -1
- package/cjs/utils/hooks/useIntersection.js +6 -10
- package/cjs/utils/hooks/useIsClient.js +1 -1
- package/cjs/utils/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/cjs/utils/hooks/useLatestRef.js +1 -1
- package/cjs/utils/hooks/useMediaQuery.js +10 -8
- package/cjs/utils/hooks/useMergedRefs.js +7 -11
- package/cjs/utils/hooks/useOverflow.js +23 -25
- package/cjs/utils/hooks/useResizeObserver.js +5 -9
- package/cjs/utils/hooks/useSafeContext.js +3 -4
- package/cjs/utils/hooks/useSyncExternalStore.js +5 -7
- package/cjs/utils/hooks/useVirtualScroll.d.ts +14 -0
- package/cjs/utils/hooks/useVirtualScroll.js +39 -0
- package/cjs/utils/icons/SvgCalendar.js +2 -3
- package/cjs/utils/icons/SvgCaretDownSmall.js +2 -3
- package/cjs/utils/icons/SvgCaretRightSmall.js +2 -3
- package/cjs/utils/icons/SvgCaretUpSmall.js +2 -3
- package/cjs/utils/icons/SvgCheckmark.js +2 -3
- package/cjs/utils/icons/SvgCheckmarkSmall.js +2 -3
- package/cjs/utils/icons/SvgChevronLeft.js +2 -3
- package/cjs/utils/icons/SvgChevronLeftDouble.js +2 -3
- package/cjs/utils/icons/SvgChevronRight.js +2 -3
- package/cjs/utils/icons/SvgChevronRightDouble.js +2 -3
- package/cjs/utils/icons/SvgChevronRightSmall.js +2 -3
- package/cjs/utils/icons/SvgClose.js +2 -3
- package/cjs/utils/icons/SvgCloseSmall.js +2 -3
- package/cjs/utils/icons/SvgColumnManager.js +2 -3
- package/cjs/utils/icons/SvgDocument.js +2 -3
- package/cjs/utils/icons/SvgFilter.js +2 -3
- package/cjs/utils/icons/SvgFilterHollow.js +2 -3
- package/cjs/utils/icons/SvgImportantSmall.js +2 -3
- package/cjs/utils/icons/SvgInfoCircular.js +2 -3
- package/cjs/utils/icons/SvgMore.js +2 -3
- package/cjs/utils/icons/SvgMoreVertical.js +2 -3
- package/cjs/utils/icons/SvgNew.js +2 -3
- package/cjs/utils/icons/SvgSearch.js +2 -3
- package/cjs/utils/icons/SvgSmileyHappy.js +2 -3
- package/cjs/utils/icons/SvgSortDown.js +2 -3
- package/cjs/utils/icons/SvgSortUp.js +2 -3
- package/cjs/utils/icons/SvgStatusError.js +2 -3
- package/cjs/utils/icons/SvgStatusSuccess.js +2 -3
- package/cjs/utils/icons/SvgStatusWarning.js +2 -3
- package/cjs/utils/icons/SvgSwap.js +2 -3
- package/cjs/utils/icons/SvgUpload.js +2 -3
- package/cjs/utils/meta.js +1 -1
- package/cjs/utils/providers/HydrationProvider.js +12 -16
- package/cjs/utils/providers/ScopeProvider.js +8 -10
- package/esm/core/Alert/Alert.js +17 -23
- package/esm/core/Avatar/Avatar.js +6 -8
- package/esm/core/AvatarGroup/AvatarGroup.js +8 -9
- package/esm/core/Backdrop/Backdrop.js +1 -1
- package/esm/core/Badge/Badge.js +10 -12
- package/esm/core/Breadcrumbs/Breadcrumbs.js +18 -24
- package/esm/core/ButtonGroup/ButtonGroup.js +20 -26
- package/esm/core/Buttons/Button.js +7 -7
- package/esm/core/Buttons/DropdownButton.js +2 -2
- package/esm/core/Buttons/IconButton.js +7 -7
- package/esm/core/Buttons/IdeasButton.js +1 -1
- package/esm/core/Buttons/SplitButton.js +9 -12
- package/esm/core/Carousel/Carousel.js +11 -11
- package/esm/core/Carousel/CarouselContext.js +1 -1
- package/esm/core/Carousel/CarouselDot.js +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +59 -68
- package/esm/core/Carousel/CarouselNavigation.js +12 -14
- package/esm/core/Carousel/CarouselSlide.js +11 -15
- package/esm/core/Carousel/CarouselSlider.js +13 -20
- package/esm/core/Checkbox/Checkbox.js +13 -14
- package/esm/core/ColorPicker/ColorBuilder.js +46 -59
- package/esm/core/ColorPicker/ColorInputPanel.js +65 -92
- package/esm/core/ColorPicker/ColorPalette.js +3 -3
- package/esm/core/ColorPicker/ColorPicker.js +11 -18
- package/esm/core/ColorPicker/ColorPickerContext.js +3 -4
- package/esm/core/ColorPicker/ColorSwatch.js +5 -7
- package/esm/core/ComboBox/ComboBox.js +80 -115
- package/esm/core/ComboBox/ComboBox.types-test.js +14 -17
- package/esm/core/ComboBox/ComboBoxEndIcon.js +1 -2
- package/esm/core/ComboBox/ComboBoxInput.js +39 -68
- package/esm/core/ComboBox/ComboBoxInputContainer.js +3 -4
- package/esm/core/ComboBox/ComboBoxMenu.js +80 -45
- package/esm/core/ComboBox/ComboBoxMenuItem.js +7 -9
- package/esm/core/ComboBox/ComboBoxMultipleContainer.js +1 -2
- package/esm/core/ComboBox/helpers.js +2 -4
- package/esm/core/DatePicker/DatePicker.js +136 -171
- package/esm/core/Dialog/Dialog.js +4 -4
- package/esm/core/Dialog/DialogBackdrop.js +8 -12
- package/esm/core/Dialog/DialogContext.js +2 -4
- package/esm/core/Dialog/DialogDragContext.js +2 -2
- package/esm/core/Dialog/DialogMain.js +26 -40
- package/esm/core/Dialog/DialogTitleBar.js +3 -3
- package/esm/core/Dialog/DialogTitleBarTitle.d.ts +3 -1
- package/esm/core/Divider/Divider.js +2 -2
- package/esm/core/DropdownMenu/DropdownMenu.js +11 -16
- package/esm/core/ExpandableBlock/ExpandableBlock.js +30 -42
- package/esm/core/Fieldset/Fieldset.js +3 -4
- package/esm/core/FileUpload/FileEmptyCard.js +4 -4
- package/esm/core/FileUpload/FileUpload.js +8 -10
- package/esm/core/FileUpload/FileUploadCard.js +35 -50
- package/esm/core/FileUpload/FileUploadTemplate.js +1 -1
- package/esm/core/Flex/Flex.js +12 -17
- package/esm/core/Footer/Footer.js +11 -12
- package/esm/core/Header/Header.js +4 -4
- package/esm/core/Header/HeaderBasicButton.js +1 -3
- package/esm/core/Header/HeaderBreadcrumbs.js +1 -1
- package/esm/core/Header/HeaderButton.js +7 -7
- package/esm/core/Header/HeaderDropdownButton.js +6 -8
- package/esm/core/Header/HeaderLogo.js +3 -3
- package/esm/core/Header/HeaderSplitButton.js +5 -7
- package/esm/core/Icon/Icon.js +3 -3
- package/esm/core/InformationPanel/InformationPanel.js +25 -33
- package/esm/core/InformationPanel/InformationPanelContent.js +2 -2
- package/esm/core/InformationPanel/InformationPanelHeader.js +1 -1
- package/esm/core/Input/Input.js +3 -3
- package/esm/core/InputGrid/InputGrid.js +43 -75
- package/esm/core/InputGroup/InputGroup.js +6 -9
- package/esm/core/InputWithDecorations/InputWithDecorations.js +10 -13
- package/esm/core/Label/Label.js +3 -3
- package/esm/core/LabeledInput/LabeledInput.js +4 -4
- package/esm/core/LabeledSelect/LabeledSelect.js +4 -6
- package/esm/core/LabeledSelect/LabeledSelect.types-test.js +11 -14
- package/esm/core/LabeledTextarea/LabeledTextarea.js +4 -4
- package/esm/core/LinkAction/LinkAction.js +1 -3
- package/esm/core/List/List.js +0 -1
- package/esm/core/List/ListItem.js +11 -16
- package/esm/core/Menu/Menu.js +40 -48
- package/esm/core/Menu/MenuItem.js +18 -24
- package/esm/core/Menu/MenuItemSkeleton.js +2 -4
- package/esm/core/Modal/Modal.js +1 -1
- package/esm/core/NonIdealState/ErrorPage.js +35 -61
- package/esm/core/NonIdealState/NonIdealState.js +1 -1
- package/esm/core/NotificationMarker/NotificationMarker.js +1 -1
- package/esm/core/Overlay/Overlay.js +16 -16
- package/esm/core/Popover/Popover.js +36 -42
- package/esm/core/ProgressIndicators/ProgressLinear.js +6 -6
- package/esm/core/ProgressIndicators/ProgressRadial.js +7 -9
- package/esm/core/Radio/Radio.js +8 -8
- package/esm/core/RadioTiles/RadioTile.js +4 -4
- package/esm/core/RadioTiles/RadioTileGroup.js +1 -1
- package/esm/core/SearchBox/SearchBox.js +32 -46
- package/esm/core/Select/Select.js +137 -149
- package/esm/core/Select/Select.types-test.js +13 -17
- package/esm/core/Select/SelectTag.js +1 -1
- package/esm/core/Select/SelectTagContainer.js +3 -3
- package/esm/core/SideNavigation/SideNavigation.js +6 -6
- package/esm/core/SideNavigation/SidenavButton.js +7 -7
- package/esm/core/SideNavigation/SidenavSubmenu.js +1 -1
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +1 -1
- package/esm/core/SkipToContentLink/SkipToContentLink.js +1 -1
- package/esm/core/Slider/Slider.js +63 -84
- package/esm/core/Slider/Thumb.js +13 -21
- package/esm/core/Slider/Track.js +10 -14
- package/esm/core/StatusMessage/StatusMessage.js +3 -3
- package/esm/core/Stepper/Stepper.js +9 -9
- package/esm/core/Stepper/StepperStep.js +15 -22
- package/esm/core/Stepper/WorkflowDiagram.js +2 -2
- package/esm/core/Stepper/WorkflowDiagramStep.js +2 -2
- package/esm/core/Surface/Surface.d.ts +1 -0
- package/esm/core/Surface/Surface.js +19 -28
- package/esm/core/Table/SubRowExpander.js +3 -3
- package/esm/core/Table/Table.d.ts +4 -1
- package/esm/core/Table/Table.js +262 -249
- package/esm/core/Table/TableCell.js +12 -14
- package/esm/core/Table/TablePaginator.js +39 -56
- package/esm/core/Table/TableRowMemoized.d.ts +3 -0
- package/esm/core/Table/TableRowMemoized.js +48 -36
- package/esm/core/Table/actionHandlers/expandHandler.js +2 -4
- package/esm/core/Table/actionHandlers/filterHandler.js +3 -3
- package/esm/core/Table/actionHandlers/resizeHandler.js +13 -17
- package/esm/core/Table/actionHandlers/selectHandler.js +22 -31
- package/esm/core/Table/cells/DefaultCell.d.ts +4 -1
- package/esm/core/Table/cells/DefaultCell.js +5 -5
- package/esm/core/Table/cells/EditableCell.d.ts +4 -1
- package/esm/core/Table/cells/EditableCell.js +7 -15
- package/esm/core/Table/columns/actionColumn.d.ts +2 -2
- package/esm/core/Table/columns/actionColumn.js +81 -90
- package/esm/core/Table/columns/expanderColumn.js +4 -6
- package/esm/core/Table/columns/selectionColumn.js +8 -10
- package/esm/core/Table/filters/BaseFilter.js +1 -1
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +16 -25
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +20 -32
- package/esm/core/Table/filters/FilterButtonBar.js +3 -3
- package/esm/core/Table/filters/FilterToggle.js +8 -8
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +12 -18
- package/esm/core/Table/filters/TextFilter/TextFilter.js +7 -13
- package/esm/core/Table/filters/customFilterFunctions.js +13 -14
- package/esm/core/Table/filters/defaultFilterFunctions.js +71 -80
- package/esm/core/Table/hooks/useColumnDragAndDrop.js +24 -30
- package/esm/core/Table/hooks/useExpanderCell.js +4 -8
- package/esm/core/Table/hooks/useResizeColumns.js +74 -111
- package/esm/core/Table/hooks/useScrollToRow.js +13 -20
- package/esm/core/Table/hooks/useSelectionCell.js +2 -4
- package/esm/core/Table/hooks/useStickyColumns.js +12 -25
- package/esm/core/Table/hooks/useSubRowFiltering.js +22 -36
- package/esm/core/Table/hooks/useSubRowSelection.js +5 -6
- package/esm/core/Table/utils.js +18 -31
- package/esm/core/Tabs/Tabs.js +79 -109
- package/esm/core/Tag/Tag.js +8 -8
- package/esm/core/Tag/TagContainer.js +2 -2
- package/esm/core/Textarea/Textarea.js +4 -4
- package/esm/core/ThemeProvider/ThemeContext.js +1 -1
- package/esm/core/ThemeProvider/ThemeProvider.js +61 -63
- package/esm/core/Tile/Tile.js +44 -69
- package/esm/core/TimePicker/TimePicker.js +87 -116
- package/esm/core/Toast/Toast.js +31 -40
- package/esm/core/Toast/Toaster.js +21 -27
- package/esm/core/ToggleSwitch/ToggleSwitch.js +5 -5
- package/esm/core/Tooltip/Tooltip.js +31 -39
- package/esm/core/TransferList/TransferList.js +39 -55
- package/esm/core/Tree/Tree.d.ts +4 -1
- package/esm/core/Tree/Tree.js +100 -79
- package/esm/core/Tree/TreeContext.js +3 -4
- package/esm/core/Tree/TreeNode.d.ts +2 -2
- package/esm/core/Tree/TreeNode.js +22 -37
- package/esm/core/Tree/TreeNodeExpander.js +3 -3
- package/esm/core/Typography/Anchor.js +4 -4
- package/esm/core/Typography/Blockquote.js +1 -1
- package/esm/core/Typography/Kbd.js +1 -1
- package/esm/core/Typography/Text.js +3 -3
- package/esm/core/VisuallyHidden/VisuallyHidden.js +8 -8
- package/esm/react-table/react-table.types-test.js +93 -96
- package/esm/styles.js +2 -2
- package/esm/utils/color/ColorValue.js +116 -163
- package/esm/utils/components/AutoclearingHiddenLiveRegion.js +2 -2
- package/esm/utils/components/ButtonBase.js +10 -13
- package/esm/utils/components/FieldsetBase.d.ts +6 -0
- package/esm/utils/components/FieldsetBase.js +2 -0
- package/esm/utils/components/FocusTrap.js +14 -20
- package/esm/utils/components/InputContainer.js +3 -3
- package/esm/utils/components/InputFlexContainer.js +4 -5
- package/esm/utils/components/InputWithIcon.js +0 -1
- package/esm/utils/components/LineClamp.js +2 -2
- package/esm/utils/components/MiddleTextTruncation.d.ts +4 -1
- package/esm/utils/components/MiddleTextTruncation.js +6 -8
- package/esm/utils/components/Portal.js +8 -12
- package/esm/utils/components/Resizer.js +38 -53
- package/esm/utils/components/ShadowRoot.js +22 -31
- package/esm/utils/components/WithCSSTransition.js +4 -5
- package/esm/utils/components/index.d.ts +1 -1
- package/esm/utils/components/index.js +1 -1
- package/esm/utils/functions/colors.js +5 -6
- package/esm/utils/functions/date.js +3 -5
- package/esm/utils/functions/dev.d.ts +11 -5
- package/esm/utils/functions/dev.js +9 -23
- package/esm/utils/functions/dom.js +8 -16
- package/esm/utils/functions/focusable.js +19 -23
- package/esm/utils/functions/import.js +1 -1
- package/esm/utils/functions/numbers.js +6 -8
- package/esm/utils/functions/polymorphic.js +32 -40
- package/esm/utils/functions/react.js +4 -8
- package/esm/utils/hooks/index.d.ts +1 -0
- package/esm/utils/hooks/index.js +1 -0
- package/esm/utils/hooks/useContainerWidth.js +7 -11
- package/esm/utils/hooks/useControlledState.js +4 -5
- package/esm/utils/hooks/useDragAndDrop.js +32 -43
- package/esm/utils/hooks/useEventListener.js +3 -5
- package/esm/utils/hooks/useGlobals.js +6 -25
- package/esm/utils/hooks/useId.js +3 -3
- package/esm/utils/hooks/useIntersection.js +6 -10
- package/esm/utils/hooks/useIsClient.js +1 -1
- package/esm/utils/hooks/useIsomorphicLayoutEffect.js +2 -2
- package/esm/utils/hooks/useLatestRef.js +1 -1
- package/esm/utils/hooks/useMediaQuery.js +10 -8
- package/esm/utils/hooks/useMergedRefs.js +7 -11
- package/esm/utils/hooks/useOverflow.js +24 -26
- package/esm/utils/hooks/useResizeObserver.js +5 -9
- package/esm/utils/hooks/useSafeContext.js +3 -4
- package/esm/utils/hooks/useSyncExternalStore.js +6 -8
- package/esm/utils/hooks/useVirtualScroll.d.ts +14 -0
- package/esm/utils/hooks/useVirtualScroll.js +28 -0
- package/esm/utils/icons/SvgCalendar.js +2 -3
- package/esm/utils/icons/SvgCaretDownSmall.js +2 -3
- package/esm/utils/icons/SvgCaretRightSmall.js +2 -3
- package/esm/utils/icons/SvgCaretUpSmall.js +2 -3
- package/esm/utils/icons/SvgCheckmark.js +2 -3
- package/esm/utils/icons/SvgCheckmarkSmall.js +2 -3
- package/esm/utils/icons/SvgChevronLeft.js +2 -3
- package/esm/utils/icons/SvgChevronLeftDouble.js +2 -3
- package/esm/utils/icons/SvgChevronRight.js +2 -3
- package/esm/utils/icons/SvgChevronRightDouble.js +2 -3
- package/esm/utils/icons/SvgChevronRightSmall.js +2 -3
- package/esm/utils/icons/SvgClose.js +2 -3
- package/esm/utils/icons/SvgCloseSmall.js +2 -3
- package/esm/utils/icons/SvgColumnManager.js +2 -3
- package/esm/utils/icons/SvgDocument.js +2 -3
- package/esm/utils/icons/SvgFilter.js +2 -3
- package/esm/utils/icons/SvgFilterHollow.js +2 -3
- package/esm/utils/icons/SvgImportantSmall.js +2 -3
- package/esm/utils/icons/SvgInfoCircular.js +2 -3
- package/esm/utils/icons/SvgMore.js +2 -3
- package/esm/utils/icons/SvgMoreVertical.js +2 -3
- package/esm/utils/icons/SvgNew.js +2 -3
- package/esm/utils/icons/SvgSearch.js +2 -3
- package/esm/utils/icons/SvgSmileyHappy.js +2 -3
- package/esm/utils/icons/SvgSortDown.js +2 -3
- package/esm/utils/icons/SvgSortUp.js +2 -3
- package/esm/utils/icons/SvgStatusError.js +2 -3
- package/esm/utils/icons/SvgStatusSuccess.js +2 -3
- package/esm/utils/icons/SvgStatusWarning.js +2 -3
- package/esm/utils/icons/SvgSwap.js +2 -3
- package/esm/utils/icons/SvgUpload.js +2 -3
- package/esm/utils/meta.js +1 -1
- package/esm/utils/providers/HydrationProvider.js +15 -19
- package/esm/utils/providers/ScopeProvider.js +9 -11
- package/package.json +18 -7
- package/styles.css +9 -13
- package/cjs/utils/components/VirtualScroll.d.ts +0 -75
- package/cjs/utils/components/VirtualScroll.js +0 -334
- package/esm/utils/components/VirtualScroll.d.ts +0 -75
- package/esm/utils/components/VirtualScroll.js +0 -318
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { useSafeContext, useMergedRefs, SvgCheckmark } from '../../utils/index.js';
|
|
3
|
+
import { ComboBoxStateContext } from './helpers.js';
|
|
4
|
+
import { ListItem } from '../List/ListItem.js';
|
|
5
|
+
export const ComboBoxMenuItem = React.memo(React.forwardRef((props, forwardedRef)=>{
|
|
6
|
+
let { children, isSelected, disabled, value, onClick, sublabel, size = sublabel ? 'large' : 'default', startIcon, endIcon, role = 'option', index, ...rest } = props;
|
|
7
|
+
let { focusedIndex, enableVirtualization } = useSafeContext(ComboBoxStateContext);
|
|
8
|
+
let focusRef = (el)=>{
|
|
9
|
+
if (!enableVirtualization && focusedIndex === index) el?.scrollIntoView({
|
|
10
|
+
block: 'nearest'
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
let refs = useMergedRefs(forwardedRef, focusRef);
|
|
14
|
+
return React.createElement(ListItem, {
|
|
15
|
+
as: "div",
|
|
16
|
+
actionable: true,
|
|
17
|
+
size: size,
|
|
18
|
+
active: isSelected,
|
|
19
|
+
disabled: disabled,
|
|
20
|
+
focused: focusedIndex === index,
|
|
21
|
+
ref: refs,
|
|
22
|
+
onClick: ()=>onClick?.(value),
|
|
23
|
+
role: role,
|
|
24
|
+
tabIndex: 'presentation' === role ? void 0 : -1,
|
|
25
|
+
"aria-selected": isSelected,
|
|
26
|
+
"aria-disabled": disabled,
|
|
27
|
+
"data-iui-index": index,
|
|
28
|
+
...rest
|
|
29
|
+
}, startIcon && React.createElement(ListItem.Icon, {
|
|
30
|
+
as: "span",
|
|
31
|
+
"aria-hidden": true
|
|
32
|
+
}, startIcon), React.createElement(ListItem.Content, null, children, sublabel && React.createElement(ListItem.Description, null, sublabel)), endIcon || isSelected && React.createElement(ListItem.Icon, {
|
|
33
|
+
as: "span",
|
|
34
|
+
"aria-hidden": true
|
|
35
|
+
}, endIcon ?? React.createElement(SvgCheckmark, null)));
|
|
36
|
+
}));
|
|
37
|
+
ComboBoxMenuItem.displayName = 'ComboBoxMenuItem';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { SelectTagContainer } from '../Select/SelectTagContainer.js';
|
|
3
|
+
export const ComboBoxMultipleContainer = React.forwardRef((props, ref)=>{
|
|
4
|
+
let { selectedItems = [], ...rest } = props;
|
|
5
|
+
return React.createElement(SelectTagContainer, {
|
|
6
|
+
ref: ref,
|
|
7
|
+
tags: selectedItems,
|
|
8
|
+
...rest
|
|
9
|
+
});
|
|
10
|
+
});
|
|
11
|
+
ComboBoxMultipleContainer.displayName = 'ComboBoxMultipleContainer';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export const ComboBoxRefsContext = React.createContext(void 0);
|
|
3
|
+
ComboBoxRefsContext.displayName = 'ComboBoxRefsContext';
|
|
4
|
+
export const ComboBoxStateContext = React.createContext(void 0);
|
|
5
|
+
ComboBoxStateContext.displayName = 'ComboBoxStateContext';
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
import cx from 'classnames';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { SvgChevronLeft, SvgChevronRight, SvgChevronLeftDouble, SvgChevronRightDouble, isBefore, Box, useId } from '../../utils/index.js';
|
|
4
|
+
import { IconButton } from '../Buttons/IconButton.js';
|
|
5
|
+
import { TimePicker } from '../TimePicker/TimePicker.js';
|
|
6
|
+
let isSameDay = (a, b)=>a && b && a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
7
|
+
let isInDateRange = (date, startDate, endDate)=>{
|
|
8
|
+
if (!date || !startDate || !endDate) return false;
|
|
9
|
+
let minDate = new Date(startDate);
|
|
10
|
+
let maxDate = new Date(endDate);
|
|
11
|
+
let testDate = new Date(date);
|
|
12
|
+
testDate && testDate.setHours(0, 0, 0, 0);
|
|
13
|
+
minDate && minDate.setHours(0, 0, 0, 0);
|
|
14
|
+
maxDate && maxDate.setHours(0, 0, 0, 0);
|
|
15
|
+
return testDate > minDate && testDate < maxDate;
|
|
16
|
+
};
|
|
17
|
+
let isSingleOnChange = (onChange, enableRangeSelect)=>!enableRangeSelect;
|
|
18
|
+
let defaultMonths = [
|
|
19
|
+
'January',
|
|
20
|
+
'February',
|
|
21
|
+
'March',
|
|
22
|
+
'April',
|
|
23
|
+
'May',
|
|
24
|
+
'June',
|
|
25
|
+
'July',
|
|
26
|
+
'August',
|
|
27
|
+
'September',
|
|
28
|
+
'October',
|
|
29
|
+
'November',
|
|
30
|
+
'December'
|
|
31
|
+
];
|
|
32
|
+
let defaultShortDays = [
|
|
33
|
+
'Su',
|
|
34
|
+
'Mo',
|
|
35
|
+
'Tu',
|
|
36
|
+
'We',
|
|
37
|
+
'Th',
|
|
38
|
+
'Fr',
|
|
39
|
+
'Sa'
|
|
40
|
+
];
|
|
41
|
+
let defaultLongDays = [
|
|
42
|
+
'Sunday',
|
|
43
|
+
'Monday',
|
|
44
|
+
'Tuesday',
|
|
45
|
+
'Wednesday',
|
|
46
|
+
'Thursday',
|
|
47
|
+
'Friday',
|
|
48
|
+
'Saturday'
|
|
49
|
+
];
|
|
50
|
+
export const generateLocalizedStrings = (locale)=>{
|
|
51
|
+
let shortWeekDayFormatter = new Intl.DateTimeFormat(locale, {
|
|
52
|
+
weekday: 'short'
|
|
53
|
+
});
|
|
54
|
+
let longWeekDayFormatter = new Intl.DateTimeFormat(locale, {
|
|
55
|
+
weekday: 'long'
|
|
56
|
+
});
|
|
57
|
+
let monthFormatter = new Intl.DateTimeFormat(locale, {
|
|
58
|
+
month: 'long'
|
|
59
|
+
});
|
|
60
|
+
let months = [
|
|
61
|
+
monthFormatter.format(new Date(2020, 0, 1)),
|
|
62
|
+
monthFormatter.format(new Date(2020, 1, 1)),
|
|
63
|
+
monthFormatter.format(new Date(2020, 2, 1)),
|
|
64
|
+
monthFormatter.format(new Date(2020, 3, 1)),
|
|
65
|
+
monthFormatter.format(new Date(2020, 4, 1)),
|
|
66
|
+
monthFormatter.format(new Date(2020, 5, 1)),
|
|
67
|
+
monthFormatter.format(new Date(2020, 6, 1)),
|
|
68
|
+
monthFormatter.format(new Date(2020, 7, 1)),
|
|
69
|
+
monthFormatter.format(new Date(2020, 8, 1)),
|
|
70
|
+
monthFormatter.format(new Date(2020, 9, 1)),
|
|
71
|
+
monthFormatter.format(new Date(2020, 10, 1)),
|
|
72
|
+
monthFormatter.format(new Date(2020, 11, 1))
|
|
73
|
+
];
|
|
74
|
+
let days = [
|
|
75
|
+
longWeekDayFormatter.format(new Date(2020, 10, 1)),
|
|
76
|
+
longWeekDayFormatter.format(new Date(2020, 10, 2)),
|
|
77
|
+
longWeekDayFormatter.format(new Date(2020, 10, 3)),
|
|
78
|
+
longWeekDayFormatter.format(new Date(2020, 10, 4)),
|
|
79
|
+
longWeekDayFormatter.format(new Date(2020, 10, 5)),
|
|
80
|
+
longWeekDayFormatter.format(new Date(2020, 10, 6)),
|
|
81
|
+
longWeekDayFormatter.format(new Date(2020, 10, 7))
|
|
82
|
+
];
|
|
83
|
+
let shortDays = [
|
|
84
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 1)).slice(0, 2),
|
|
85
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 2)).slice(0, 2),
|
|
86
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 3)).slice(0, 2),
|
|
87
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 4)).slice(0, 2),
|
|
88
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 5)).slice(0, 2),
|
|
89
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 6)).slice(0, 2),
|
|
90
|
+
shortWeekDayFormatter.format(new Date(2020, 10, 7)).slice(0, 2)
|
|
91
|
+
];
|
|
92
|
+
return {
|
|
93
|
+
months,
|
|
94
|
+
shortDays,
|
|
95
|
+
days
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
export const DatePicker = React.forwardRef((props, forwardedRef)=>{
|
|
99
|
+
let { date, onChange, localizedNames, className, setFocus = false, showTime = false, use12Hours = false, precision, hourStep, minuteStep, secondStep, useCombinedRenderer, combinedRenderer, hourRenderer, minuteRenderer, secondRenderer, meridiemRenderer, showYearSelection = false, enableRangeSelect = false, startDate, endDate, monthYearProps, calendarProps, monthProps, weekDayProps, dayProps, weekProps, isDateDisabled, applyBackground = true, showDatesOutsideMonth = true, ...rest } = props;
|
|
100
|
+
let monthNames = localizedNames?.months ?? defaultMonths;
|
|
101
|
+
let shortDays = localizedNames?.shortDays ?? defaultShortDays;
|
|
102
|
+
let longDays = localizedNames?.days ?? defaultLongDays;
|
|
103
|
+
let [selectedDay, setSelectedDay] = React.useState(date);
|
|
104
|
+
let [selectedStartDay, setSelectedStartDay] = React.useState(startDate);
|
|
105
|
+
let [selectedEndDay, setSelectedEndDay] = React.useState(endDate);
|
|
106
|
+
let [focusedDay, setFocusedDay] = React.useState(selectedStartDay ?? selectedDay ?? new Date());
|
|
107
|
+
let [displayedMonthIndex, setDisplayedMonthIndex] = React.useState(selectedStartDay?.getMonth() ?? selectedDay?.getMonth() ?? new Date().getMonth());
|
|
108
|
+
let [displayedYear, setDisplayedYear] = React.useState(selectedStartDay?.getFullYear() ?? selectedDay?.getFullYear() ?? new Date().getFullYear());
|
|
109
|
+
let [isSelectingStartDate, setIsSelectingStartDate] = React.useState(true);
|
|
110
|
+
let needFocus = React.useRef(setFocus);
|
|
111
|
+
React.useEffect(()=>{
|
|
112
|
+
if (needFocus.current) needFocus.current = false;
|
|
113
|
+
});
|
|
114
|
+
let setMonthAndYear = React.useCallback((newMonth, newYear)=>{
|
|
115
|
+
setDisplayedMonthIndex(newMonth);
|
|
116
|
+
setDisplayedYear(newYear);
|
|
117
|
+
}, []);
|
|
118
|
+
React.useEffect(()=>{
|
|
119
|
+
let currentDate = new Date();
|
|
120
|
+
setSelectedDay(date);
|
|
121
|
+
setSelectedStartDay(startDate);
|
|
122
|
+
setSelectedEndDay(endDate);
|
|
123
|
+
if (!enableRangeSelect) setFocusedDay(date ?? currentDate);
|
|
124
|
+
setMonthAndYear(startDate?.getMonth() ?? date?.getMonth() ?? currentDate.getMonth(), startDate?.getFullYear() ?? date?.getFullYear() ?? currentDate.getFullYear());
|
|
125
|
+
}, [
|
|
126
|
+
date,
|
|
127
|
+
setMonthAndYear,
|
|
128
|
+
startDate,
|
|
129
|
+
endDate,
|
|
130
|
+
enableRangeSelect
|
|
131
|
+
]);
|
|
132
|
+
let days = React.useMemo(()=>{
|
|
133
|
+
let offsetToFirst = new Date(displayedYear, displayedMonthIndex, 1).getDay();
|
|
134
|
+
if (0 === offsetToFirst && showDatesOutsideMonth) offsetToFirst = 7;
|
|
135
|
+
let daysInMonth = [];
|
|
136
|
+
for(let i = 1; i <= 42; i++){
|
|
137
|
+
let adjustedDay = i - offsetToFirst;
|
|
138
|
+
daysInMonth.push(new Date(displayedYear, displayedMonthIndex, adjustedDay));
|
|
139
|
+
}
|
|
140
|
+
return daysInMonth;
|
|
141
|
+
}, [
|
|
142
|
+
displayedMonthIndex,
|
|
143
|
+
displayedYear,
|
|
144
|
+
showDatesOutsideMonth
|
|
145
|
+
]);
|
|
146
|
+
let weeks = React.useMemo(()=>{
|
|
147
|
+
let weeksInMonth = [];
|
|
148
|
+
let weekCount = Math.ceil(days.length / 7);
|
|
149
|
+
for(let i = 0; i < weekCount; i++)weeksInMonth.push(days.slice(7 * i, (i + 1) * 7));
|
|
150
|
+
return weeksInMonth;
|
|
151
|
+
}, [
|
|
152
|
+
days
|
|
153
|
+
]);
|
|
154
|
+
let getNewFocusedDate = (newYear, newMonth)=>{
|
|
155
|
+
let currentDate = selectedStartDay ?? selectedDay ?? new Date();
|
|
156
|
+
let newDate = new Date(newYear, newMonth, currentDate.getDate(), currentDate.getHours(), currentDate.getMinutes(), currentDate.getSeconds());
|
|
157
|
+
return newDate;
|
|
158
|
+
};
|
|
159
|
+
let handleMoveToPreviousYear = ()=>{
|
|
160
|
+
let newYear = displayedYear - 1;
|
|
161
|
+
setMonthAndYear(displayedMonthIndex, newYear);
|
|
162
|
+
setFocusedDay(getNewFocusedDate(newYear, displayedMonthIndex));
|
|
163
|
+
};
|
|
164
|
+
let handleMoveToNextYear = ()=>{
|
|
165
|
+
let newYear = displayedYear + 1;
|
|
166
|
+
setMonthAndYear(displayedMonthIndex, newYear);
|
|
167
|
+
setFocusedDay(getNewFocusedDate(newYear, displayedMonthIndex));
|
|
168
|
+
};
|
|
169
|
+
let handleMoveToPreviousMonth = ()=>{
|
|
170
|
+
let newMonth = 0 !== displayedMonthIndex ? displayedMonthIndex - 1 : 11;
|
|
171
|
+
let newYear = 0 !== displayedMonthIndex ? displayedYear : displayedYear - 1;
|
|
172
|
+
setMonthAndYear(newMonth, newYear);
|
|
173
|
+
setFocusedDay(getNewFocusedDate(newYear, newMonth));
|
|
174
|
+
};
|
|
175
|
+
let handleMoveToNextMonth = ()=>{
|
|
176
|
+
let newMonth = 11 !== displayedMonthIndex ? displayedMonthIndex + 1 : 0;
|
|
177
|
+
let newYear = 11 !== displayedMonthIndex ? displayedYear : displayedYear + 1;
|
|
178
|
+
setMonthAndYear(newMonth, newYear);
|
|
179
|
+
setFocusedDay(getNewFocusedDate(newYear, newMonth));
|
|
180
|
+
};
|
|
181
|
+
let onDayClick = (day)=>{
|
|
182
|
+
if (enableRangeSelect) {
|
|
183
|
+
if (isSelectingStartDate) {
|
|
184
|
+
if (day.getMonth() !== selectedStartDay?.getMonth()) setMonthAndYear(day.getMonth(), day.getFullYear());
|
|
185
|
+
let currentStartDate = selectedStartDay ?? new Date();
|
|
186
|
+
let newStartDate = new Date(day.getFullYear(), day.getMonth(), day.getDate(), currentStartDate.getHours(), currentStartDate.getMinutes(), currentStartDate.getSeconds());
|
|
187
|
+
setSelectedStartDay(newStartDate);
|
|
188
|
+
setFocusedDay(newStartDate);
|
|
189
|
+
if (isBefore(newStartDate, selectedEndDay)) selectedEndDay && onChange?.(newStartDate, selectedEndDay);
|
|
190
|
+
else {
|
|
191
|
+
setSelectedEndDay(newStartDate);
|
|
192
|
+
onChange?.(newStartDate, newStartDate);
|
|
193
|
+
}
|
|
194
|
+
setIsSelectingStartDate(false);
|
|
195
|
+
} else {
|
|
196
|
+
if (day.getMonth() !== selectedEndDay?.getMonth()) setMonthAndYear(day.getMonth(), day.getFullYear());
|
|
197
|
+
let currentEndDate = selectedEndDay ?? new Date();
|
|
198
|
+
let newEndDate = new Date(day.getFullYear(), day.getMonth(), day.getDate(), currentEndDate.getHours(), currentEndDate.getMinutes(), currentEndDate.getSeconds());
|
|
199
|
+
setFocusedDay(newEndDate);
|
|
200
|
+
if (isBefore(newEndDate, selectedStartDay)) {
|
|
201
|
+
setSelectedStartDay(newEndDate);
|
|
202
|
+
selectedEndDay && onChange?.(newEndDate, selectedEndDay);
|
|
203
|
+
} else {
|
|
204
|
+
setSelectedEndDay(newEndDate);
|
|
205
|
+
selectedStartDay && onChange?.(selectedStartDay, newEndDate);
|
|
206
|
+
setIsSelectingStartDate(true);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
} else {
|
|
210
|
+
if (day.getMonth() !== selectedDay?.getMonth()) setMonthAndYear(day.getMonth(), day.getFullYear());
|
|
211
|
+
let currentDate = selectedDay ?? new Date();
|
|
212
|
+
let newDate = new Date(day.getFullYear(), day.getMonth(), day.getDate(), currentDate.getHours(), currentDate.getMinutes(), currentDate.getSeconds());
|
|
213
|
+
setSelectedDay(newDate);
|
|
214
|
+
setFocusedDay(newDate);
|
|
215
|
+
isSingleOnChange(onChange, enableRangeSelect) && onChange?.(newDate);
|
|
216
|
+
}
|
|
217
|
+
};
|
|
218
|
+
let handleCalendarKeyDown = (event)=>{
|
|
219
|
+
if (event.altKey) return;
|
|
220
|
+
if (!focusedDay) return;
|
|
221
|
+
let adjustedFocusedDay = new Date(focusedDay);
|
|
222
|
+
switch(event.key){
|
|
223
|
+
case 'ArrowDown':
|
|
224
|
+
adjustedFocusedDay.setDate(focusedDay.getDate() + 7);
|
|
225
|
+
if (adjustedFocusedDay.getMonth() !== displayedMonthIndex) handleMoveToNextMonth();
|
|
226
|
+
setFocusedDay(adjustedFocusedDay);
|
|
227
|
+
needFocus.current = true;
|
|
228
|
+
event.preventDefault();
|
|
229
|
+
break;
|
|
230
|
+
case 'ArrowUp':
|
|
231
|
+
adjustedFocusedDay.setDate(focusedDay.getDate() - 7);
|
|
232
|
+
if (adjustedFocusedDay.getMonth() !== displayedMonthIndex) handleMoveToPreviousMonth();
|
|
233
|
+
setFocusedDay(adjustedFocusedDay);
|
|
234
|
+
needFocus.current = true;
|
|
235
|
+
event.preventDefault();
|
|
236
|
+
break;
|
|
237
|
+
case 'ArrowLeft':
|
|
238
|
+
adjustedFocusedDay.setDate(focusedDay.getDate() - 1);
|
|
239
|
+
if (adjustedFocusedDay.getMonth() !== displayedMonthIndex) handleMoveToPreviousMonth();
|
|
240
|
+
setFocusedDay(adjustedFocusedDay);
|
|
241
|
+
needFocus.current = true;
|
|
242
|
+
event.preventDefault();
|
|
243
|
+
break;
|
|
244
|
+
case 'ArrowRight':
|
|
245
|
+
adjustedFocusedDay.setDate(focusedDay.getDate() + 1);
|
|
246
|
+
if (adjustedFocusedDay.getMonth() !== displayedMonthIndex) handleMoveToNextMonth();
|
|
247
|
+
setFocusedDay(adjustedFocusedDay);
|
|
248
|
+
needFocus.current = true;
|
|
249
|
+
event.preventDefault();
|
|
250
|
+
break;
|
|
251
|
+
case 'Enter':
|
|
252
|
+
case ' ':
|
|
253
|
+
case 'Spacebar':
|
|
254
|
+
if (!isDateDisabled?.(focusedDay)) onDayClick(focusedDay);
|
|
255
|
+
event.preventDefault();
|
|
256
|
+
break;
|
|
257
|
+
}
|
|
258
|
+
};
|
|
259
|
+
let getDayClass = (day)=>{
|
|
260
|
+
if (day.getMonth() !== displayedMonthIndex) return 'iui-calendar-day-outside-month';
|
|
261
|
+
let dayClass = 'iui-calendar-day';
|
|
262
|
+
let isSelectedDay = isSameDay(day, selectedDay) || isSameDay(day, selectedStartDay) && isSameDay(day, selectedEndDay);
|
|
263
|
+
if (isSelectedDay) dayClass += '-selected';
|
|
264
|
+
else if (isSameDay(day, selectedStartDay)) dayClass += '-range-start';
|
|
265
|
+
else if (isSameDay(day, selectedEndDay)) dayClass += '-range-end';
|
|
266
|
+
if (selectedStartDay && selectedEndDay && isInDateRange(day, selectedStartDay, selectedEndDay)) dayClass += '-range';
|
|
267
|
+
if (isSameDay(day, new Date())) dayClass += '-today';
|
|
268
|
+
return dayClass;
|
|
269
|
+
};
|
|
270
|
+
let dateTableId = useId();
|
|
271
|
+
return React.createElement(Box, {
|
|
272
|
+
className: cx('iui-date-picker', {
|
|
273
|
+
'iui-popover-surface': applyBackground
|
|
274
|
+
}, className),
|
|
275
|
+
ref: forwardedRef,
|
|
276
|
+
...rest
|
|
277
|
+
}, React.createElement("div", null, React.createElement(Box, {
|
|
278
|
+
as: "div",
|
|
279
|
+
...monthYearProps,
|
|
280
|
+
className: cx('iui-calendar-month-year', monthYearProps?.className)
|
|
281
|
+
}, showYearSelection && React.createElement(IconButton, {
|
|
282
|
+
styleType: "borderless",
|
|
283
|
+
onClick: handleMoveToPreviousYear,
|
|
284
|
+
"aria-label": "Previous year",
|
|
285
|
+
size: "small"
|
|
286
|
+
}, React.createElement(SvgChevronLeftDouble, null)), React.createElement(IconButton, {
|
|
287
|
+
styleType: "borderless",
|
|
288
|
+
onClick: handleMoveToPreviousMonth,
|
|
289
|
+
"aria-label": "Previous month",
|
|
290
|
+
size: "small"
|
|
291
|
+
}, React.createElement(SvgChevronLeft, null)), React.createElement("span", {
|
|
292
|
+
"aria-live": "polite"
|
|
293
|
+
}, React.createElement(Box, {
|
|
294
|
+
as: "span",
|
|
295
|
+
id: dateTableId,
|
|
296
|
+
title: monthNames[displayedMonthIndex],
|
|
297
|
+
...monthProps,
|
|
298
|
+
className: cx('iui-calendar-month', monthProps?.className)
|
|
299
|
+
}, monthNames[displayedMonthIndex]), " ", displayedYear), React.createElement(IconButton, {
|
|
300
|
+
styleType: "borderless",
|
|
301
|
+
onClick: handleMoveToNextMonth,
|
|
302
|
+
"aria-label": "Next month",
|
|
303
|
+
size: "small"
|
|
304
|
+
}, React.createElement(SvgChevronRight, null)), showYearSelection && React.createElement(IconButton, {
|
|
305
|
+
styleType: "borderless",
|
|
306
|
+
onClick: handleMoveToNextYear,
|
|
307
|
+
"aria-label": "Next year",
|
|
308
|
+
size: "small"
|
|
309
|
+
}, React.createElement(SvgChevronRightDouble, null))), React.createElement(Box, {
|
|
310
|
+
as: "div",
|
|
311
|
+
...weekDayProps,
|
|
312
|
+
className: cx('iui-calendar-weekdays', weekDayProps?.className)
|
|
313
|
+
}, shortDays.map((day, index)=>React.createElement("div", {
|
|
314
|
+
key: day,
|
|
315
|
+
title: longDays[index]
|
|
316
|
+
}, day))), React.createElement("div", {
|
|
317
|
+
onKeyDown: handleCalendarKeyDown,
|
|
318
|
+
role: "listbox",
|
|
319
|
+
"aria-labelledby": dateTableId,
|
|
320
|
+
...calendarProps
|
|
321
|
+
}, weeks.map((weekDays, weekIndex)=>React.createElement(Box, {
|
|
322
|
+
as: "div",
|
|
323
|
+
key: `week-${displayedMonthIndex}-${weekIndex}`,
|
|
324
|
+
...weekProps,
|
|
325
|
+
className: cx('iui-calendar-week', weekProps?.className)
|
|
326
|
+
}, weekDays.map((weekDay, dayIndex)=>{
|
|
327
|
+
let dateValue = weekDay.getDate();
|
|
328
|
+
let isDisabled = isDateDisabled?.(weekDay);
|
|
329
|
+
let isOutsideMonth = weekDay.getMonth() !== displayedMonthIndex;
|
|
330
|
+
if (isOutsideMonth && !showDatesOutsideMonth) return React.createElement(Box, {
|
|
331
|
+
key: `day-${displayedMonthIndex}-${dayIndex}`,
|
|
332
|
+
className: cx(getDayClass(weekDay), dayProps?.className),
|
|
333
|
+
"aria-hidden": true
|
|
334
|
+
});
|
|
335
|
+
return React.createElement(Box, {
|
|
336
|
+
as: "div",
|
|
337
|
+
key: `day-${displayedMonthIndex}-${dayIndex}`,
|
|
338
|
+
onClick: ()=>!isDisabled && onDayClick(weekDay),
|
|
339
|
+
role: "option",
|
|
340
|
+
tabIndex: isSameDay(weekDay, focusedDay) ? 0 : -1,
|
|
341
|
+
"aria-disabled": isDisabled ? 'true' : void 0,
|
|
342
|
+
ref: (element)=>isSameDay(weekDay, focusedDay) && needFocus.current && element?.focus(),
|
|
343
|
+
...dayProps,
|
|
344
|
+
className: cx(getDayClass(weekDay), dayProps?.className)
|
|
345
|
+
}, dateValue);
|
|
346
|
+
}))))), showTime && React.createElement(TimePicker, {
|
|
347
|
+
date: selectedStartDay ?? selectedDay,
|
|
348
|
+
use12Hours: use12Hours,
|
|
349
|
+
precision: precision,
|
|
350
|
+
hourStep: hourStep,
|
|
351
|
+
minuteStep: minuteStep,
|
|
352
|
+
secondStep: secondStep,
|
|
353
|
+
useCombinedRenderer: useCombinedRenderer,
|
|
354
|
+
combinedRenderer: combinedRenderer,
|
|
355
|
+
hourRenderer: hourRenderer,
|
|
356
|
+
minuteRenderer: minuteRenderer,
|
|
357
|
+
secondRenderer: secondRenderer,
|
|
358
|
+
meridiemRenderer: meridiemRenderer,
|
|
359
|
+
onChange: (date)=>isSingleOnChange(onChange, enableRangeSelect) ? onChange?.(date) : onChange?.(new Date(selectedStartDay?.getFullYear() ?? date.getFullYear(), selectedStartDay?.getMonth() ?? date.getMonth(), selectedStartDay?.getDate() ?? date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()), new Date(selectedEndDay?.getFullYear() ?? date.getFullYear(), selectedEndDay?.getMonth() ?? date.getMonth(), selectedEndDay?.getDate() ?? date.getDate(), date.getHours(), date.getMinutes(), date.getSeconds()))
|
|
360
|
+
}));
|
|
361
|
+
});
|
|
362
|
+
DatePicker.displayName = 'DatePicker';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { DialogTitleBar } from './DialogTitleBar.js';
|
|
4
|
+
import { DialogContent } from './DialogContent.js';
|
|
5
|
+
import { DialogBackdrop } from './DialogBackdrop.js';
|
|
6
|
+
import { DialogContext } from './DialogContext.js';
|
|
7
|
+
import { DialogButtonBar } from './DialogButtonBar.js';
|
|
8
|
+
import { DialogMain } from './DialogMain.js';
|
|
9
|
+
import { useMergedRefs, Box, Portal } from '../../utils/index.js';
|
|
10
|
+
import { Transition } from 'react-transition-group';
|
|
11
|
+
let DialogComponent = React.forwardRef((props, ref)=>{
|
|
12
|
+
let { trapFocus = false, setFocus = false, preventDocumentScroll = false, isOpen = false, isDismissible = true, closeOnEsc = true, closeOnExternalClick = false, onClose, isDraggable = false, isResizable = false, relativeTo = 'viewport', placement, className, portal = false, ...rest } = props;
|
|
13
|
+
let dialogRootRef = React.useRef(null);
|
|
14
|
+
return React.createElement(Transition, {
|
|
15
|
+
in: isOpen,
|
|
16
|
+
timeout: {
|
|
17
|
+
exit: 600
|
|
18
|
+
},
|
|
19
|
+
mountOnEnter: true,
|
|
20
|
+
unmountOnExit: true
|
|
21
|
+
}, React.createElement(DialogContext.Provider, {
|
|
22
|
+
value: {
|
|
23
|
+
isOpen,
|
|
24
|
+
onClose,
|
|
25
|
+
closeOnEsc,
|
|
26
|
+
closeOnExternalClick,
|
|
27
|
+
isDismissible,
|
|
28
|
+
preventDocumentScroll,
|
|
29
|
+
trapFocus,
|
|
30
|
+
setFocus,
|
|
31
|
+
isDraggable,
|
|
32
|
+
isResizable,
|
|
33
|
+
relativeTo,
|
|
34
|
+
dialogRootRef,
|
|
35
|
+
placement
|
|
36
|
+
}
|
|
37
|
+
}, React.createElement(Portal, {
|
|
38
|
+
portal: portal
|
|
39
|
+
}, React.createElement(Box, {
|
|
40
|
+
className: cx('iui-dialog-wrapper', className),
|
|
41
|
+
"data-iui-relative": 'container' === relativeTo,
|
|
42
|
+
ref: useMergedRefs(ref, dialogRootRef),
|
|
43
|
+
...rest
|
|
44
|
+
}))));
|
|
45
|
+
});
|
|
46
|
+
DialogComponent.displayName = 'Dialog';
|
|
47
|
+
export const Dialog = Object.assign(DialogComponent, {
|
|
48
|
+
Backdrop: DialogBackdrop,
|
|
49
|
+
Main: DialogMain,
|
|
50
|
+
TitleBar: DialogTitleBar,
|
|
51
|
+
Content: DialogContent,
|
|
52
|
+
ButtonBar: DialogButtonBar
|
|
53
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Backdrop } from '../Backdrop/Backdrop.js';
|
|
3
|
+
import { useMergedRefs } from '../../utils/index.js';
|
|
4
|
+
import { useDialogContext } from './DialogContext.js';
|
|
5
|
+
import cx from 'classnames';
|
|
6
|
+
export const DialogBackdrop = React.forwardRef((props, ref)=>{
|
|
7
|
+
let dialogContext = useDialogContext();
|
|
8
|
+
let { isVisible = dialogContext.isOpen, isDismissible = dialogContext.isDismissible, onClose = dialogContext.onClose, closeOnExternalClick = dialogContext.closeOnExternalClick, relativeTo = dialogContext.relativeTo, onMouseDown, className, style, ...rest } = props;
|
|
9
|
+
let backdropRef = React.useRef(null);
|
|
10
|
+
let refs = useMergedRefs(backdropRef, ref);
|
|
11
|
+
let handleMouseDown = (event)=>{
|
|
12
|
+
event.persist();
|
|
13
|
+
if (event.target !== backdropRef.current) return;
|
|
14
|
+
if (isDismissible && closeOnExternalClick && onClose) onClose(event);
|
|
15
|
+
onMouseDown?.(event);
|
|
16
|
+
};
|
|
17
|
+
return React.createElement(Backdrop, {
|
|
18
|
+
isVisible: isVisible,
|
|
19
|
+
className: cx({
|
|
20
|
+
'iui-backdrop-fixed': 'viewport' === relativeTo
|
|
21
|
+
}, className),
|
|
22
|
+
ref: refs,
|
|
23
|
+
onMouseDown: handleMouseDown,
|
|
24
|
+
style: {
|
|
25
|
+
pointerEvents: 'auto',
|
|
26
|
+
...style
|
|
27
|
+
},
|
|
28
|
+
...rest
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
DialogBackdrop.displayName = 'Dialog.Backdrop';
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import cx from 'classnames';
|
|
3
|
+
import { FocusTrap, getTranslateValuesFromElement, Resizer, useMergedRefs, useLayoutEffect, Box, ShadowRoot } from '../../utils/index.js';
|
|
4
|
+
import { useDialogContext } from './DialogContext.js';
|
|
5
|
+
import { Transition } from 'react-transition-group';
|
|
6
|
+
import { DialogDragContext } from './DialogDragContext.js';
|
|
7
|
+
import { useDragAndDrop } from '../../utils/hooks/useDragAndDrop.js';
|
|
8
|
+
export const DialogMain = React.forwardRef((props, ref)=>{
|
|
9
|
+
let dialogContext = useDialogContext();
|
|
10
|
+
let { className, children, styleType = 'default', isOpen = dialogContext.isOpen, isDismissible = dialogContext.isDismissible, onClose = dialogContext.onClose, closeOnEsc = dialogContext.closeOnEsc, trapFocus = dialogContext.trapFocus, setFocus = dialogContext.setFocus, preventDocumentScroll = dialogContext.preventDocumentScroll, onKeyDown, isDraggable = dialogContext.isDraggable, isResizable = dialogContext.isResizable, style: propStyle, placement = dialogContext.placement, ...rest } = props;
|
|
11
|
+
let [style, setStyle] = React.useState();
|
|
12
|
+
let dialogRef = React.useRef(null);
|
|
13
|
+
let hasBeenResized = React.useRef(false);
|
|
14
|
+
let previousFocusedElement = React.useRef();
|
|
15
|
+
let originalBodyOverflow = React.useRef('');
|
|
16
|
+
React.useEffect(()=>{
|
|
17
|
+
if (isOpen) originalBodyOverflow.current = document.body.style.overflow;
|
|
18
|
+
}, [
|
|
19
|
+
isOpen
|
|
20
|
+
]);
|
|
21
|
+
React.useEffect(()=>{
|
|
22
|
+
let ownerDocument = dialogRef.current?.ownerDocument;
|
|
23
|
+
if (!ownerDocument || !preventDocumentScroll || 'hidden' === originalBodyOverflow.current) return;
|
|
24
|
+
if (isOpen) ownerDocument.body.style.overflow = 'hidden';
|
|
25
|
+
else ownerDocument.body.style.overflow = originalBodyOverflow.current;
|
|
26
|
+
return ()=>{
|
|
27
|
+
ownerDocument.body.style.overflow = originalBodyOverflow.current;
|
|
28
|
+
};
|
|
29
|
+
}, [
|
|
30
|
+
isOpen,
|
|
31
|
+
preventDocumentScroll
|
|
32
|
+
]);
|
|
33
|
+
let handleKeyDown = (event)=>{
|
|
34
|
+
if (event.altKey) return;
|
|
35
|
+
event.persist();
|
|
36
|
+
if (isDismissible && closeOnEsc && 'Escape' === event.key && onClose) onClose(event);
|
|
37
|
+
onKeyDown?.(event);
|
|
38
|
+
};
|
|
39
|
+
let { onPointerDown, transform } = useDragAndDrop(dialogRef, dialogContext.dialogRootRef, isDraggable);
|
|
40
|
+
let handlePointerDown = React.useCallback((event)=>{
|
|
41
|
+
if (isDraggable) onPointerDown(event);
|
|
42
|
+
}, [
|
|
43
|
+
isDraggable,
|
|
44
|
+
onPointerDown
|
|
45
|
+
]);
|
|
46
|
+
useLayoutEffect(()=>{
|
|
47
|
+
if (!isDraggable || !isOpen) return;
|
|
48
|
+
let [translateX, translateY] = getTranslateValuesFromElement(dialogRef.current);
|
|
49
|
+
setStyle((oldStyle)=>({
|
|
50
|
+
...oldStyle,
|
|
51
|
+
insetInlineStart: dialogRef.current?.offsetLeft,
|
|
52
|
+
insetBlockStart: dialogRef.current?.offsetTop,
|
|
53
|
+
transform: `translate(${translateX}px,${translateY}px)`
|
|
54
|
+
}));
|
|
55
|
+
}, [
|
|
56
|
+
isDraggable,
|
|
57
|
+
isOpen
|
|
58
|
+
]);
|
|
59
|
+
let setResizeStyle = React.useCallback((newStyle)=>{
|
|
60
|
+
setStyle((oldStyle)=>({
|
|
61
|
+
...oldStyle,
|
|
62
|
+
...newStyle
|
|
63
|
+
}));
|
|
64
|
+
}, []);
|
|
65
|
+
let content = React.createElement(Box, {
|
|
66
|
+
className: cx('iui-dialog', {
|
|
67
|
+
'iui-dialog-default': 'default' === styleType,
|
|
68
|
+
'iui-dialog-full-page': 'fullPage' === styleType,
|
|
69
|
+
'iui-dialog-visible': isOpen,
|
|
70
|
+
'iui-dialog-draggable': isDraggable
|
|
71
|
+
}, className),
|
|
72
|
+
role: "dialog",
|
|
73
|
+
ref: useMergedRefs(dialogRef, ref),
|
|
74
|
+
onKeyDown: handleKeyDown,
|
|
75
|
+
tabIndex: -1,
|
|
76
|
+
"data-iui-placement": placement,
|
|
77
|
+
style: {
|
|
78
|
+
transform,
|
|
79
|
+
...style,
|
|
80
|
+
...propStyle
|
|
81
|
+
},
|
|
82
|
+
...rest
|
|
83
|
+
}, React.createElement(ShadowRoot, null, React.createElement("slot", null), isResizable && React.createElement(Resizer, {
|
|
84
|
+
elementRef: dialogRef,
|
|
85
|
+
containerRef: dialogContext.dialogRootRef,
|
|
86
|
+
onResizeStart: ()=>{
|
|
87
|
+
if (!hasBeenResized.current) {
|
|
88
|
+
hasBeenResized.current = true;
|
|
89
|
+
setResizeStyle({
|
|
90
|
+
maxInlineSize: '100%'
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
onResizeEnd: setResizeStyle
|
|
95
|
+
})), children);
|
|
96
|
+
return React.createElement(Transition, {
|
|
97
|
+
in: isOpen,
|
|
98
|
+
appear: true,
|
|
99
|
+
timeout: {
|
|
100
|
+
exit: 600
|
|
101
|
+
},
|
|
102
|
+
onEntered: ()=>{
|
|
103
|
+
previousFocusedElement.current = dialogRef.current?.ownerDocument.activeElement;
|
|
104
|
+
setFocus && dialogRef.current?.focus({
|
|
105
|
+
preventScroll: true
|
|
106
|
+
});
|
|
107
|
+
},
|
|
108
|
+
onExit: ()=>{
|
|
109
|
+
if (dialogRef.current?.contains(dialogRef.current?.ownerDocument.activeElement)) previousFocusedElement.current?.focus();
|
|
110
|
+
},
|
|
111
|
+
unmountOnExit: true,
|
|
112
|
+
nodeRef: dialogRef
|
|
113
|
+
}, React.createElement(DialogDragContext.Provider, {
|
|
114
|
+
value: {
|
|
115
|
+
onPointerDown: handlePointerDown
|
|
116
|
+
}
|
|
117
|
+
}, trapFocus && React.createElement(FocusTrap, null, content), !trapFocus && content));
|
|
118
|
+
});
|
|
119
|
+
DialogMain.displayName = 'Dialog.Main';
|