@itwin/itwinui-react 3.0.0-dev.4 → 3.0.0-dev.6
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 +90 -1
- package/cjs/core/Alert/Alert.d.ts +5 -5
- package/cjs/core/Alert/Alert.js +72 -59
- package/cjs/core/Alert/index.js +9 -4
- package/cjs/core/Avatar/Avatar.d.ts +3 -3
- package/cjs/core/Avatar/Avatar.js +60 -44
- package/cjs/core/Avatar/index.js +9 -4
- package/cjs/core/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/cjs/core/AvatarGroup/AvatarGroup.js +69 -53
- package/cjs/core/AvatarGroup/index.js +9 -4
- package/cjs/core/Backdrop/Backdrop.d.ts +1 -1
- package/cjs/core/Backdrop/Backdrop.js +16 -33
- package/cjs/core/Backdrop/index.js +9 -4
- package/cjs/core/Badge/Badge.d.ts +1 -1
- package/cjs/core/Badge/Badge.js +39 -47
- package/cjs/core/Badge/index.js +9 -4
- package/cjs/core/Breadcrumbs/Breadcrumbs.d.ts +16 -24
- package/cjs/core/Breadcrumbs/Breadcrumbs.js +131 -61
- package/cjs/core/Breadcrumbs/index.js +9 -4
- package/cjs/core/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/cjs/core/ButtonGroup/ButtonGroup.js +65 -53
- package/cjs/core/ButtonGroup/index.js +9 -4
- package/cjs/core/Buttons/Button/Button.d.ts +1 -1
- package/cjs/core/Buttons/Button/Button.js +43 -36
- package/cjs/core/Buttons/Button/index.js +9 -4
- package/cjs/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -2
- package/cjs/core/Buttons/DropdownButton/DropdownButton.js +61 -51
- package/cjs/core/Buttons/DropdownButton/index.js +9 -4
- package/cjs/core/Buttons/IconButton/IconButton.d.ts +1 -1
- package/cjs/core/Buttons/IconButton/IconButton.js +59 -38
- package/cjs/core/Buttons/IconButton/index.js +9 -4
- package/cjs/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
- package/cjs/core/Buttons/IdeasButton/IdeasButton.js +20 -30
- package/cjs/core/Buttons/IdeasButton/index.js +9 -4
- package/cjs/core/Buttons/SplitButton/SplitButton.d.ts +1 -1
- package/cjs/core/Buttons/SplitButton/SplitButton.js +68 -49
- package/cjs/core/Buttons/SplitButton/index.js +9 -4
- package/cjs/core/Buttons/index.js +43 -13
- package/cjs/core/Carousel/Carousel.d.ts +3 -3
- package/cjs/core/Carousel/Carousel.js +109 -107
- package/cjs/core/Carousel/CarouselContext.js +4 -26
- package/cjs/core/Carousel/CarouselDot.d.ts +1 -1
- package/cjs/core/Carousel/CarouselDot.js +25 -37
- package/cjs/core/Carousel/CarouselDotsList.d.ts +1 -1
- package/cjs/core/Carousel/CarouselDotsList.js +129 -95
- package/cjs/core/Carousel/CarouselNavigation.d.ts +2 -2
- package/cjs/core/Carousel/CarouselNavigation.js +97 -66
- package/cjs/core/Carousel/CarouselSlide.d.ts +1 -1
- package/cjs/core/Carousel/CarouselSlide.js +39 -46
- package/cjs/core/Carousel/CarouselSlider.js +66 -71
- package/cjs/core/Carousel/index.js +9 -4
- package/cjs/core/Checkbox/Checkbox.d.ts +9 -5
- package/cjs/core/Checkbox/Checkbox.js +88 -60
- package/cjs/core/Checkbox/index.js +9 -4
- package/cjs/core/ColorPicker/ColorBuilder.js +289 -198
- package/cjs/core/ColorPicker/ColorInputPanel.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorInputPanel.js +453 -282
- package/cjs/core/ColorPicker/ColorPalette.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorPalette.js +124 -113
- package/cjs/core/ColorPicker/ColorPicker.d.ts +1 -6
- package/cjs/core/ColorPicker/ColorPicker.js +82 -85
- package/cjs/core/ColorPicker/ColorPickerContext.js +11 -31
- package/cjs/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/cjs/core/ColorPicker/ColorSwatch.js +30 -39
- package/cjs/core/ColorPicker/index.js +43 -13
- package/cjs/core/ComboBox/ComboBox.d.ts +6 -6
- package/cjs/core/ComboBox/ComboBox.js +393 -294
- package/cjs/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxDropdown.js +39 -42
- package/cjs/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxEndIcon.js +46 -43
- package/cjs/core/ComboBox/ComboBoxInput.d.ts +2 -2
- package/cjs/core/ComboBox/ComboBoxInput.js +200 -152
- package/cjs/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxInputContainer.js +35 -34
- package/cjs/core/ComboBox/ComboBoxMenu.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxMenu.js +108 -73
- package/cjs/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxMenuItem.js +71 -42
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
- package/cjs/core/ComboBox/ComboBoxMultipleContainer.js +13 -32
- package/cjs/core/ComboBox/helpers.d.ts +2 -2
- package/cjs/core/ComboBox/helpers.js +47 -65
- package/cjs/core/ComboBox/index.js +9 -4
- package/cjs/core/DatePicker/DatePicker.d.ts +2 -2
- package/cjs/core/DatePicker/DatePicker.js +523 -357
- package/cjs/core/DatePicker/index.js +15 -5
- package/cjs/core/Dialog/Dialog.d.ts +1 -1
- package/cjs/core/Dialog/Dialog.js +72 -68
- package/cjs/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/cjs/core/Dialog/DialogBackdrop.js +47 -52
- package/cjs/core/Dialog/DialogButtonBar.js +3 -3
- package/cjs/core/Dialog/DialogContent.d.ts +2 -1
- package/cjs/core/Dialog/DialogContent.js +28 -4
- package/cjs/core/Dialog/DialogContext.d.ts +1 -1
- package/cjs/core/Dialog/DialogContext.js +5 -27
- package/cjs/core/Dialog/DialogDragContext.d.ts +1 -1
- package/cjs/core/Dialog/DialogDragContext.js +8 -30
- package/cjs/core/Dialog/DialogMain.d.ts +1 -1
- package/cjs/core/Dialog/DialogMain.js +183 -142
- package/cjs/core/Dialog/DialogTitleBar.d.ts +1 -1
- package/cjs/core/Dialog/DialogTitleBar.js +67 -45
- package/cjs/core/Dialog/DialogTitleBarTitle.js +3 -3
- package/cjs/core/Dialog/index.js +9 -4
- package/cjs/core/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/cjs/core/DropdownMenu/DropdownMenu.js +72 -50
- package/cjs/core/DropdownMenu/index.js +9 -4
- package/cjs/core/ExpandableBlock/ExpandableBlock.d.ts +77 -21
- package/cjs/core/ExpandableBlock/ExpandableBlock.js +233 -76
- package/cjs/core/ExpandableBlock/index.js +9 -4
- package/cjs/core/Fieldset/Fieldset.d.ts +1 -1
- package/cjs/core/Fieldset/Fieldset.js +25 -39
- package/cjs/core/Fieldset/index.js +9 -4
- package/cjs/core/FileUpload/FileEmptyCard.js +43 -42
- package/cjs/core/FileUpload/FileUpload.d.ts +1 -1
- package/cjs/core/FileUpload/FileUpload.js +67 -67
- package/cjs/core/FileUpload/FileUploadCard.d.ts +1 -1
- package/cjs/core/FileUpload/FileUploadCard.js +168 -108
- package/cjs/core/FileUpload/FileUploadTemplate.d.ts +1 -1
- package/cjs/core/FileUpload/FileUploadTemplate.js +51 -41
- package/cjs/core/FileUpload/index.js +35 -11
- package/cjs/core/Footer/Footer.d.ts +4 -4
- package/cjs/core/Footer/Footer.js +103 -89
- package/cjs/core/Footer/FooterItem.js +3 -3
- package/cjs/core/Footer/FooterList.js +3 -3
- package/cjs/core/Footer/FooterSeparator.js +8 -5
- package/cjs/core/Footer/index.js +15 -5
- package/cjs/core/Header/Header.d.ts +2 -2
- package/cjs/core/Header/Header.js +67 -47
- package/cjs/core/Header/HeaderBasicButton.js +37 -38
- package/cjs/core/Header/HeaderBreadcrumbs.d.ts +1 -1
- package/cjs/core/Header/HeaderBreadcrumbs.js +38 -39
- package/cjs/core/Header/HeaderButton.d.ts +5 -1
- package/cjs/core/Header/HeaderButton.js +76 -43
- package/cjs/core/Header/HeaderDropdownButton.js +49 -45
- package/cjs/core/Header/HeaderLogo.d.ts +1 -1
- package/cjs/core/Header/HeaderLogo.js +42 -36
- package/cjs/core/Header/HeaderSplitButton.js +68 -46
- package/cjs/core/Header/index.js +35 -11
- package/cjs/core/InformationPanel/InformationPanel.d.ts +1 -1
- package/cjs/core/InformationPanel/InformationPanel.js +77 -67
- package/cjs/core/InformationPanel/InformationPanelBody.js +6 -4
- package/cjs/core/InformationPanel/InformationPanelContent.d.ts +1 -1
- package/cjs/core/InformationPanel/InformationPanelContent.js +20 -33
- package/cjs/core/InformationPanel/InformationPanelHeader.d.ts +1 -1
- package/cjs/core/InformationPanel/InformationPanelHeader.js +34 -39
- package/cjs/core/InformationPanel/InformationPanelWrapper.js +6 -4
- package/cjs/core/InformationPanel/index.js +43 -13
- package/cjs/core/Input/Input.d.ts +6 -6
- package/cjs/core/Input/Input.js +17 -40
- package/cjs/core/Input/index.js +9 -4
- package/cjs/core/InputGroup/InputGroup.d.ts +1 -1
- package/cjs/core/InputGroup/InputGroup.js +46 -41
- package/cjs/core/InputGroup/index.js +9 -4
- package/cjs/core/Label/Label.d.ts +1 -1
- package/cjs/core/Label/Label.js +30 -36
- package/cjs/core/Label/index.js +9 -4
- package/cjs/core/LabeledInput/LabeledInput.d.ts +1 -1
- package/cjs/core/LabeledInput/LabeledInput.js +49 -33
- package/cjs/core/LabeledInput/index.js +9 -4
- package/cjs/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/cjs/core/LabeledSelect/LabeledSelect.js +56 -44
- package/cjs/core/LabeledSelect/index.js +9 -4
- package/cjs/core/LabeledTextarea/LabeledTextarea.d.ts +2 -3
- package/cjs/core/LabeledTextarea/LabeledTextarea.js +49 -33
- package/cjs/core/LabeledTextarea/index.js +9 -4
- package/cjs/core/List/List.js +3 -3
- package/cjs/core/List/ListItem.d.ts +4 -4
- package/cjs/core/List/ListItem.js +55 -60
- package/cjs/core/List/index.js +16 -6
- package/cjs/core/Menu/Menu.d.ts +1 -1
- package/cjs/core/Menu/Menu.js +66 -78
- package/cjs/core/Menu/MenuDivider.js +4 -4
- package/cjs/core/Menu/MenuExtraContent.js +4 -4
- package/cjs/core/Menu/MenuItem.d.ts +1 -1
- package/cjs/core/Menu/MenuItem.js +143 -86
- package/cjs/core/Menu/MenuItemSkeleton.d.ts +1 -1
- package/cjs/core/Menu/MenuItemSkeleton.js +54 -43
- package/cjs/core/Menu/index.js +43 -13
- package/cjs/core/Modal/Modal.d.ts +1 -1
- package/cjs/core/Modal/Modal.js +38 -33
- package/cjs/core/Modal/ModalButtonBar.js +7 -4
- package/cjs/core/Modal/ModalContent.js +3 -3
- package/cjs/core/Modal/index.js +23 -8
- package/cjs/core/NonIdealState/ErrorPage.d.ts +6 -7
- package/cjs/core/NonIdealState/ErrorPage.js +187 -146
- package/cjs/core/NonIdealState/NonIdealState.d.ts +17 -1
- package/cjs/core/NonIdealState/NonIdealState.js +77 -37
- package/cjs/core/NonIdealState/index.js +16 -6
- package/cjs/core/NotificationMarker/NotificationMarker.d.ts +1 -1
- package/cjs/core/NotificationMarker/NotificationMarker.js +29 -33
- package/cjs/core/NotificationMarker/index.js +9 -4
- package/cjs/core/Overlay/Overlay.d.ts +57 -0
- package/cjs/core/Overlay/Overlay.js +96 -0
- package/cjs/core/Overlay/index.d.ts +1 -0
- package/{esm/core/ProgressIndicators/ProgressRadial → cjs/core/Overlay}/index.js +10 -2
- package/cjs/core/ProgressIndicators/{ProgressLinear/ProgressLinear.d.ts → ProgressLinear.d.ts} +6 -6
- package/cjs/core/ProgressIndicators/ProgressLinear.js +64 -0
- package/cjs/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +2 -2
- package/cjs/core/ProgressIndicators/ProgressRadial.js +74 -0
- package/cjs/core/ProgressIndicators/index.d.ts +2 -2
- package/cjs/core/ProgressIndicators/index.js +16 -6
- package/cjs/core/Radio/Radio.d.ts +7 -4
- package/cjs/core/Radio/Radio.js +54 -42
- package/cjs/core/Radio/index.js +9 -4
- package/cjs/core/RadioTiles/RadioTile.d.ts +15 -4
- package/cjs/core/RadioTiles/RadioTile.js +80 -45
- package/cjs/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/cjs/core/RadioTiles/RadioTileGroup.js +16 -31
- package/cjs/core/RadioTiles/index.js +16 -6
- package/cjs/core/SearchBox/SearchBox.d.ts +3 -3
- package/cjs/core/SearchBox/SearchBox.js +220 -128
- package/cjs/core/SearchBox/index.js +9 -4
- package/cjs/core/Select/Select.d.ts +5 -10
- package/cjs/core/Select/Select.js +291 -181
- package/cjs/core/Select/SelectTag.d.ts +1 -1
- package/cjs/core/Select/SelectTag.js +21 -34
- package/cjs/core/Select/SelectTagContainer.d.ts +1 -1
- package/cjs/core/Select/SelectTagContainer.js +30 -39
- package/cjs/core/Select/index.js +9 -4
- package/cjs/core/SideNavigation/SideNavigation.d.ts +1 -1
- package/cjs/core/SideNavigation/SideNavigation.js +105 -54
- package/cjs/core/SideNavigation/SidenavButton.d.ts +1 -1
- package/cjs/core/SideNavigation/SidenavButton.js +30 -33
- package/cjs/core/SideNavigation/SidenavSubmenu.js +23 -34
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -1
- package/cjs/core/SideNavigation/SidenavSubmenuHeader.js +29 -35
- package/cjs/core/SideNavigation/index.js +35 -11
- package/cjs/core/SkipToContentLink/SkipToContentLink.d.ts +1 -1
- package/cjs/core/SkipToContentLink/SkipToContentLink.js +20 -33
- package/cjs/core/SkipToContentLink/index.js +9 -4
- package/cjs/core/Slider/Slider.d.ts +4 -9
- package/cjs/core/Slider/Slider.js +343 -227
- package/cjs/core/Slider/Thumb.d.ts +2 -2
- package/cjs/core/Slider/Thumb.js +111 -84
- package/cjs/core/Slider/Track.d.ts +3 -3
- package/cjs/core/Slider/Track.js +72 -76
- package/cjs/core/Slider/index.js +9 -4
- package/cjs/core/StatusMessage/StatusMessage.d.ts +2 -2
- package/cjs/core/StatusMessage/StatusMessage.js +19 -32
- package/cjs/core/StatusMessage/index.js +9 -4
- package/cjs/core/Stepper/Stepper.d.ts +3 -3
- package/cjs/core/Stepper/Stepper.js +51 -36
- package/cjs/core/Stepper/StepperStep.d.ts +1 -1
- package/cjs/core/Stepper/StepperStep.js +84 -63
- package/cjs/core/Stepper/WorkflowDiagram.d.ts +1 -1
- package/cjs/core/Stepper/WorkflowDiagram.js +25 -33
- package/cjs/core/Stepper/WorkflowDiagramStep.d.ts +3 -3
- package/cjs/core/Stepper/WorkflowDiagramStep.js +32 -36
- package/cjs/core/Stepper/index.js +16 -6
- package/cjs/core/Surface/Surface.d.ts +2 -2
- package/cjs/core/Surface/Surface.js +78 -70
- package/cjs/core/Surface/index.js +9 -4
- package/cjs/core/Table/SubRowExpander.d.ts +2 -2
- package/cjs/core/Table/SubRowExpander.js +35 -37
- package/cjs/core/Table/Table.d.ts +18 -2
- package/cjs/core/Table/Table.js +767 -448
- package/cjs/core/Table/TableCell.d.ts +2 -2
- package/cjs/core/Table/TableCell.js +113 -88
- package/cjs/core/Table/TablePaginator.d.ts +3 -3
- package/cjs/core/Table/TablePaginator.js +312 -159
- package/cjs/core/Table/TableRowMemoized.d.ts +4 -4
- package/cjs/core/Table/TableRowMemoized.js +137 -89
- package/cjs/core/Table/actionHandlers/expandHandler.js +12 -12
- package/cjs/core/Table/actionHandlers/filterHandler.js +25 -17
- package/cjs/core/Table/actionHandlers/index.js +56 -14
- package/cjs/core/Table/actionHandlers/resizeHandler.js +13 -13
- package/cjs/core/Table/actionHandlers/selectHandler.js +123 -96
- package/cjs/core/Table/cells/DefaultCell.d.ts +2 -2
- package/cjs/core/Table/cells/DefaultCell.js +48 -38
- package/cjs/core/Table/cells/EditableCell.d.ts +2 -2
- package/cjs/core/Table/cells/EditableCell.js +75 -68
- package/cjs/core/Table/cells/index.js +16 -6
- package/cjs/core/Table/columns/actionColumn.d.ts +3 -3
- package/cjs/core/Table/columns/actionColumn.js +106 -96
- package/cjs/core/Table/columns/expanderColumn.d.ts +2 -2
- package/cjs/core/Table/columns/expanderColumn.js +45 -54
- package/cjs/core/Table/columns/index.js +41 -11
- package/cjs/core/Table/columns/selectionColumn.d.ts +4 -4
- package/cjs/core/Table/columns/selectionColumn.js +57 -51
- package/cjs/core/Table/filters/BaseFilter.d.ts +2 -2
- package/cjs/core/Table/filters/BaseFilter.js +24 -38
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -2
- package/cjs/core/Table/filters/DateRangeFilter/DatePickerInput.js +92 -72
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +4 -4
- package/cjs/core/Table/filters/DateRangeFilter/DateRangeFilter.js +118 -79
- package/cjs/core/Table/filters/FilterButtonBar.d.ts +3 -3
- package/cjs/core/Table/filters/FilterButtonBar.js +39 -41
- package/cjs/core/Table/filters/FilterToggle.d.ts +3 -3
- package/cjs/core/Table/filters/FilterToggle.js +59 -51
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -4
- package/cjs/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +58 -52
- package/cjs/core/Table/filters/TextFilter/TextFilter.d.ts +3 -3
- package/cjs/core/Table/filters/TextFilter/TextFilter.js +40 -44
- package/cjs/core/Table/filters/customFilterFunctions.js +16 -14
- package/cjs/core/Table/filters/defaultFilterFunctions.js +86 -81
- package/cjs/core/Table/filters/index.js +35 -11
- package/cjs/core/Table/filters/tableFilters.d.ts +5 -5
- package/cjs/core/Table/filters/tableFilters.js +44 -54
- package/cjs/core/Table/filters/types.d.ts +1 -1
- package/cjs/core/Table/filters/types.js +2 -2
- package/cjs/core/Table/hooks/index.js +67 -19
- package/cjs/core/Table/hooks/useColumnDragAndDrop.js +101 -88
- package/cjs/core/Table/hooks/useExpanderCell.d.ts +1 -1
- package/cjs/core/Table/hooks/useExpanderCell.js +33 -47
- package/cjs/core/Table/hooks/useResizeColumns.js +362 -290
- package/cjs/core/Table/hooks/useScrollToRow.d.ts +2 -2
- package/cjs/core/Table/hooks/useScrollToRow.js +46 -60
- package/cjs/core/Table/hooks/useSelectionCell.js +17 -10
- package/cjs/core/Table/hooks/useStickyColumns.js +64 -62
- package/cjs/core/Table/hooks/useSubRowFiltering.js +95 -110
- package/cjs/core/Table/hooks/useSubRowSelection.js +32 -53
- package/cjs/core/Table/index.js +78 -18
- package/cjs/core/Table/utils.js +42 -40
- package/cjs/core/Tabs/Tab.d.ts +2 -2
- package/cjs/core/Tabs/Tab.js +51 -38
- package/cjs/core/Tabs/Tabs.d.ts +6 -6
- package/cjs/core/Tabs/Tabs.js +407 -335
- package/cjs/core/Tabs/index.js +16 -6
- package/cjs/core/Tag/Tag.d.ts +1 -1
- package/cjs/core/Tag/Tag.js +42 -40
- package/cjs/core/Tag/TagContainer.d.ts +1 -1
- package/cjs/core/Tag/TagContainer.js +23 -36
- package/cjs/core/Tag/index.js +16 -6
- package/cjs/core/Textarea/Textarea.d.ts +2 -9
- package/cjs/core/Textarea/Textarea.js +17 -41
- package/cjs/core/Textarea/index.js +9 -4
- package/cjs/core/ThemeProvider/ThemeContext.js +4 -26
- package/cjs/core/ThemeProvider/ThemeProvider.d.ts +4 -4
- package/cjs/core/ThemeProvider/ThemeProvider.js +77 -54
- package/cjs/core/ThemeProvider/index.js +9 -4
- package/cjs/core/Tile/Tile.d.ts +14 -14
- package/cjs/core/Tile/Tile.js +334 -234
- package/cjs/core/Tile/index.js +9 -4
- package/cjs/core/TimePicker/TimePicker.d.ts +3 -3
- package/cjs/core/TimePicker/TimePicker.js +458 -259
- package/cjs/core/TimePicker/index.js +9 -4
- package/cjs/core/Toast/Toast.d.ts +5 -5
- package/cjs/core/Toast/Toast.js +192 -132
- package/cjs/core/Toast/Toaster.d.ts +5 -5
- package/cjs/core/Toast/Toaster.js +103 -100
- package/cjs/core/Toast/index.js +9 -4
- package/cjs/core/ToggleSwitch/ToggleSwitch.d.ts +1 -6
- package/cjs/core/ToggleSwitch/ToggleSwitch.js +66 -53
- package/cjs/core/ToggleSwitch/index.js +9 -4
- package/cjs/core/Tooltip/Tooltip.d.ts +2 -2
- package/cjs/core/Tooltip/Tooltip.js +146 -121
- package/cjs/core/Tooltip/index.js +9 -4
- package/cjs/core/TransferList/TransferList.d.ts +6 -6
- package/cjs/core/TransferList/TransferList.js +184 -103
- package/cjs/core/TransferList/index.js +9 -4
- package/cjs/core/Tree/Tree.d.ts +5 -5
- package/cjs/core/Tree/Tree.js +205 -157
- package/cjs/core/Tree/TreeContext.d.ts +1 -1
- package/cjs/core/Tree/TreeContext.js +9 -31
- package/cjs/core/Tree/TreeNode.d.ts +2 -2
- package/cjs/core/Tree/TreeNode.js +207 -129
- package/cjs/core/Tree/TreeNodeExpander.d.ts +1 -1
- package/cjs/core/Tree/TreeNodeExpander.js +26 -37
- package/cjs/core/Tree/index.js +23 -8
- package/cjs/core/Typography/Anchor/Anchor.js +3 -3
- package/cjs/core/Typography/Anchor/index.js +9 -4
- package/cjs/core/Typography/Blockquote/Blockquote.d.ts +1 -1
- package/cjs/core/Typography/Blockquote/Blockquote.js +18 -35
- package/cjs/core/Typography/Blockquote/index.js +9 -4
- package/cjs/core/Typography/Code/Code.js +3 -3
- package/cjs/core/Typography/Code/index.js +9 -4
- package/cjs/core/Typography/Kbd/Kbd.d.ts +1 -1
- package/cjs/core/Typography/Kbd/Kbd.js +30 -46
- package/cjs/core/Typography/Kbd/index.js +15 -5
- package/cjs/core/Typography/Text/Text.d.ts +1 -1
- package/cjs/core/Typography/Text/Text.js +26 -38
- package/cjs/core/Typography/Text/index.js +9 -4
- package/cjs/core/Typography/index.js +50 -14
- package/cjs/core/index.d.ts +1 -0
- package/cjs/core/index.js +889 -179
- package/cjs/core/utils/color/ColorValue.d.ts +4 -4
- package/cjs/core/utils/color/ColorValue.js +535 -453
- package/cjs/core/utils/color/index.js +4 -17
- package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
- package/cjs/core/utils/components/AutoclearingHiddenLiveRegion.js +20 -35
- package/cjs/core/utils/components/Box.js +3 -3
- package/cjs/core/utils/components/Divider.d.ts +1 -1
- package/cjs/core/utils/components/Divider.js +14 -33
- package/cjs/core/utils/components/Flex.d.ts +4 -4
- package/cjs/core/utils/components/Flex.js +93 -102
- package/cjs/core/utils/components/FocusTrap.d.ts +3 -3
- package/cjs/core/utils/components/FocusTrap.js +47 -60
- package/cjs/core/utils/components/Icon.d.ts +1 -1
- package/cjs/core/utils/components/Icon.js +25 -43
- package/cjs/core/utils/components/InputContainer.d.ts +2 -2
- package/cjs/core/utils/components/InputContainer.js +75 -46
- package/cjs/core/utils/components/InputFlexContainer.d.ts +1 -1
- package/cjs/core/utils/components/InputFlexContainer.js +22 -10
- package/cjs/core/utils/components/LinkAction.js +3 -3
- package/cjs/core/utils/components/MiddleTextTruncation.d.ts +2 -2
- package/cjs/core/utils/components/MiddleTextTruncation.js +32 -44
- package/cjs/core/utils/components/Popover.d.ts +3 -3
- package/cjs/core/utils/components/Popover.js +111 -135
- package/cjs/core/utils/components/Resizer.d.ts +2 -2
- package/cjs/core/utils/components/Resizer.js +254 -211
- package/cjs/core/utils/components/VirtualScroll.d.ts +2 -2
- package/cjs/core/utils/components/VirtualScroll.js +304 -245
- package/cjs/core/utils/components/VisuallyHidden.d.ts +1 -1
- package/cjs/core/utils/components/VisuallyHidden.js +14 -33
- package/cjs/core/utils/components/WithCSSTransition.d.ts +2 -2
- package/cjs/core/utils/components/WithCSSTransition.js +43 -48
- package/cjs/core/utils/components/index.js +18 -31
- package/cjs/core/utils/functions/colors.js +36 -33
- package/cjs/core/utils/functions/date.js +10 -10
- package/cjs/core/utils/functions/dom.js +24 -17
- package/cjs/core/utils/functions/focusable.js +26 -17
- package/cjs/core/utils/functions/import.d.ts +6 -0
- package/cjs/core/utils/functions/import.js +61 -0
- package/cjs/core/utils/functions/index.d.ts +1 -0
- package/cjs/core/utils/functions/index.js +11 -23
- package/cjs/core/utils/functions/numbers.js +9 -9
- package/cjs/core/utils/functions/polymorphic.d.ts +5 -3
- package/cjs/core/utils/functions/polymorphic.js +43 -55
- package/cjs/core/utils/functions/supports.js +5 -4
- package/cjs/core/utils/hooks/index.js +16 -29
- package/cjs/core/utils/hooks/useContainerWidth.js +26 -41
- package/cjs/core/utils/hooks/useDragAndDrop.js +110 -109
- package/cjs/core/utils/hooks/useEventListener.js +22 -44
- package/cjs/core/utils/hooks/useGlobals.js +34 -51
- package/cjs/core/utils/hooks/useId.js +9 -30
- package/cjs/core/utils/hooks/useIntersection.js +30 -46
- package/cjs/core/utils/hooks/useIsClient.js +9 -31
- package/cjs/core/utils/hooks/useIsomorphicLayoutEffect.js +6 -27
- package/cjs/core/utils/hooks/useLatestRef.js +9 -31
- package/cjs/core/utils/hooks/useMediaQuery.js +31 -53
- package/cjs/core/utils/hooks/useMergedRefs.js +15 -38
- package/cjs/core/utils/hooks/useOverflow.js +69 -78
- package/cjs/core/utils/hooks/useResizeObserver.js +22 -39
- package/cjs/core/utils/hooks/useSafeContext.js +9 -31
- package/cjs/core/utils/icons/StatusIconMap.d.ts +5 -5
- package/cjs/core/utils/icons/StatusIconMap.js +28 -34
- package/cjs/core/utils/icons/Svg.js +3 -3
- package/cjs/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCalendar.js +12 -29
- package/cjs/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretDownSmall.js +12 -29
- package/cjs/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretRightSmall.js +12 -29
- package/cjs/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCaretUpSmall.js +12 -29
- package/cjs/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmark.js +10 -29
- package/cjs/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCheckmarkSmall.js +12 -29
- package/cjs/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeft.js +12 -29
- package/cjs/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronLeftDouble.js +12 -29
- package/cjs/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRight.js +12 -29
- package/cjs/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/cjs/core/utils/icons/SvgChevronRightDouble.js +12 -29
- package/cjs/core/utils/icons/SvgClose.d.ts +1 -1
- package/cjs/core/utils/icons/SvgClose.js +12 -29
- package/cjs/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgCloseSmall.js +12 -29
- package/cjs/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/cjs/core/utils/icons/SvgColumnManager.js +12 -29
- package/cjs/core/utils/icons/SvgDocument.d.ts +1 -1
- package/cjs/core/utils/icons/SvgDocument.js +10 -29
- package/cjs/core/utils/icons/SvgFilter.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilter.js +10 -29
- package/cjs/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/cjs/core/utils/icons/SvgFilterHollow.js +12 -29
- package/cjs/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/cjs/core/utils/icons/SvgImportantSmall.js +12 -29
- package/cjs/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/cjs/core/utils/icons/SvgInfoCircular.js +12 -29
- package/cjs/core/utils/icons/SvgMore.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMore.js +12 -29
- package/cjs/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/cjs/core/utils/icons/SvgMoreVertical.js +12 -29
- package/cjs/core/utils/icons/SvgNew.d.ts +1 -1
- package/cjs/core/utils/icons/SvgNew.js +12 -29
- package/cjs/core/utils/icons/SvgSearch.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSearch.js +12 -29
- package/cjs/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSmileyHappy.js +12 -29
- package/cjs/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortDown.js +12 -29
- package/cjs/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSortUp.js +12 -29
- package/cjs/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusError.js +12 -29
- package/cjs/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusSuccess.js +12 -29
- package/cjs/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/cjs/core/utils/icons/SvgStatusWarning.js +12 -29
- package/cjs/core/utils/icons/SvgSwap.d.ts +1 -1
- package/cjs/core/utils/icons/SvgSwap.js +12 -29
- package/cjs/core/utils/icons/SvgUpload.d.ts +1 -1
- package/cjs/core/utils/icons/SvgUpload.js +12 -29
- package/cjs/core/utils/icons/index.js +34 -47
- package/cjs/core/utils/index.js +10 -23
- package/cjs/core/utils/props.d.ts +2 -2
- package/cjs/core/utils/props.js +2 -2
- package/cjs/core/utils/types.d.ts +1 -1
- package/cjs/core/utils/types.js +2 -2
- package/cjs/index.js +5 -18
- package/cjs/package.json +1 -0
- package/cjs/styles.js +452 -441
- package/cjs/types/react-table-config.js +2 -2
- package/esm/core/Alert/Alert.d.ts +5 -5
- package/esm/core/Alert/Alert.js +73 -28
- package/esm/core/Avatar/Avatar.d.ts +3 -3
- package/esm/core/Avatar/Avatar.js +48 -13
- package/esm/core/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/esm/core/AvatarGroup/AvatarGroup.js +63 -22
- package/esm/core/Backdrop/Backdrop.d.ts +1 -1
- package/esm/core/Backdrop/Backdrop.js +10 -2
- package/esm/core/Badge/Badge.d.ts +1 -1
- package/esm/core/Badge/Badge.js +31 -16
- package/esm/core/Breadcrumbs/Breadcrumbs.d.ts +16 -24
- package/esm/core/Breadcrumbs/Breadcrumbs.js +128 -31
- package/esm/core/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/esm/core/ButtonGroup/ButtonGroup.js +59 -22
- package/esm/core/Buttons/Button/Button.d.ts +1 -1
- package/esm/core/Buttons/Button/Button.js +37 -5
- package/esm/core/Buttons/DropdownButton/DropdownButton.d.ts +2 -2
- package/esm/core/Buttons/DropdownButton/DropdownButton.js +54 -19
- package/esm/core/Buttons/IconButton/IconButton.d.ts +1 -1
- package/esm/core/Buttons/IconButton/IconButton.js +51 -7
- package/esm/core/Buttons/IdeasButton/IdeasButton.d.ts +1 -1
- package/esm/core/Buttons/IdeasButton/IdeasButton.js +12 -2
- package/esm/core/Buttons/SplitButton/SplitButton.d.ts +1 -1
- package/esm/core/Buttons/SplitButton/SplitButton.js +59 -15
- package/esm/core/Carousel/Carousel.d.ts +3 -3
- package/esm/core/Carousel/Carousel.js +97 -70
- package/esm/core/Carousel/CarouselDot.d.ts +1 -1
- package/esm/core/Carousel/CarouselDot.js +19 -6
- package/esm/core/Carousel/CarouselDotsList.d.ts +1 -1
- package/esm/core/Carousel/CarouselDotsList.js +123 -63
- package/esm/core/Carousel/CarouselNavigation.d.ts +2 -2
- package/esm/core/Carousel/CarouselNavigation.js +85 -32
- package/esm/core/Carousel/CarouselSlide.d.ts +1 -1
- package/esm/core/Carousel/CarouselSlide.js +29 -14
- package/esm/core/Carousel/CarouselSlider.js +65 -40
- package/esm/core/Checkbox/Checkbox.d.ts +9 -5
- package/esm/core/Checkbox/Checkbox.js +78 -28
- package/esm/core/ColorPicker/ColorBuilder.js +277 -166
- package/esm/core/ColorPicker/ColorInputPanel.d.ts +1 -1
- package/esm/core/ColorPicker/ColorInputPanel.js +437 -248
- package/esm/core/ColorPicker/ColorPalette.d.ts +1 -1
- package/esm/core/ColorPicker/ColorPalette.js +115 -80
- package/esm/core/ColorPicker/ColorPicker.d.ts +1 -6
- package/esm/core/ColorPicker/ColorPicker.js +75 -54
- package/esm/core/ColorPicker/ColorPickerContext.js +7 -5
- package/esm/core/ColorPicker/ColorSwatch.d.ts +1 -1
- package/esm/core/ColorPicker/ColorSwatch.js +19 -7
- package/esm/core/ComboBox/ComboBox.d.ts +6 -6
- package/esm/core/ComboBox/ComboBox.js +385 -256
- package/esm/core/ComboBox/ComboBoxDropdown.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxDropdown.js +32 -15
- package/esm/core/ComboBox/ComboBoxEndIcon.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxEndIcon.js +39 -12
- package/esm/core/ComboBox/ComboBoxInput.d.ts +2 -2
- package/esm/core/ComboBox/ComboBoxInput.js +197 -124
- package/esm/core/ComboBox/ComboBoxInputContainer.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxInputContainer.js +20 -5
- package/esm/core/ComboBox/ComboBoxMenu.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMenu.js +94 -38
- package/esm/core/ComboBox/ComboBoxMenuItem.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMenuItem.js +59 -13
- package/esm/core/ComboBox/ComboBoxMultipleContainer.d.ts +1 -1
- package/esm/core/ComboBox/ComboBoxMultipleContainer.js +6 -2
- package/esm/core/ComboBox/helpers.d.ts +2 -2
- package/esm/core/ComboBox/helpers.js +38 -38
- package/esm/core/DatePicker/DatePicker.d.ts +2 -2
- package/esm/core/DatePicker/DatePicker.js +519 -325
- package/esm/core/Dialog/Dialog.d.ts +1 -1
- package/esm/core/Dialog/Dialog.js +65 -31
- package/esm/core/Dialog/DialogBackdrop.d.ts +1 -1
- package/esm/core/Dialog/DialogBackdrop.js +39 -19
- package/esm/core/Dialog/DialogContent.d.ts +2 -1
- package/esm/core/Dialog/DialogContent.js +25 -2
- package/esm/core/Dialog/DialogContext.d.ts +1 -1
- package/esm/core/Dialog/DialogContext.js +1 -1
- package/esm/core/Dialog/DialogDragContext.d.ts +1 -1
- package/esm/core/Dialog/DialogDragContext.js +4 -4
- package/esm/core/Dialog/DialogMain.d.ts +1 -1
- package/esm/core/Dialog/DialogMain.js +177 -108
- package/esm/core/Dialog/DialogTitleBar.d.ts +1 -1
- package/esm/core/Dialog/DialogTitleBar.js +45 -10
- package/esm/core/DropdownMenu/DropdownMenu.d.ts +4 -4
- package/esm/core/DropdownMenu/DropdownMenu.js +66 -22
- package/esm/core/ExpandableBlock/ExpandableBlock.d.ts +77 -21
- package/esm/core/ExpandableBlock/ExpandableBlock.js +225 -46
- package/esm/core/Fieldset/Fieldset.d.ts +1 -1
- package/esm/core/Fieldset/Fieldset.js +19 -8
- package/esm/core/FileUpload/FileEmptyCard.js +19 -8
- package/esm/core/FileUpload/FileUpload.d.ts +1 -1
- package/esm/core/FileUpload/FileUpload.js +49 -36
- package/esm/core/FileUpload/FileUploadCard.d.ts +1 -1
- package/esm/core/FileUpload/FileUploadCard.js +154 -76
- package/esm/core/FileUpload/FileUploadTemplate.d.ts +1 -1
- package/esm/core/FileUpload/FileUploadTemplate.js +37 -9
- package/esm/core/Footer/Footer.d.ts +4 -4
- package/esm/core/Footer/Footer.js +86 -55
- package/esm/core/Footer/FooterSeparator.js +1 -1
- package/esm/core/Header/Header.d.ts +2 -2
- package/esm/core/Header/Header.js +55 -14
- package/esm/core/Header/HeaderBasicButton.js +28 -7
- package/esm/core/Header/HeaderBreadcrumbs.d.ts +1 -1
- package/esm/core/Header/HeaderBreadcrumbs.js +32 -8
- package/esm/core/Header/HeaderButton.d.ts +5 -1
- package/esm/core/Header/HeaderButton.js +62 -13
- package/esm/core/Header/HeaderDropdownButton.js +43 -13
- package/esm/core/Header/HeaderLogo.d.ts +1 -1
- package/esm/core/Header/HeaderLogo.js +36 -5
- package/esm/core/Header/HeaderSplitButton.js +57 -13
- package/esm/core/InformationPanel/InformationPanel.d.ts +1 -1
- package/esm/core/InformationPanel/InformationPanel.js +71 -36
- package/esm/core/InformationPanel/InformationPanelContent.d.ts +1 -1
- package/esm/core/InformationPanel/InformationPanelContent.js +17 -3
- package/esm/core/InformationPanel/InformationPanelHeader.d.ts +1 -1
- package/esm/core/InformationPanel/InformationPanelHeader.js +32 -8
- package/esm/core/InformationPanel/InformationPanelWrapper.js +3 -1
- package/esm/core/Input/Input.d.ts +6 -6
- package/esm/core/Input/Input.js +11 -9
- package/esm/core/InputGroup/InputGroup.d.ts +1 -1
- package/esm/core/InputGroup/InputGroup.js +37 -14
- package/esm/core/Label/Label.d.ts +1 -1
- package/esm/core/Label/Label.js +24 -5
- package/esm/core/LabeledInput/LabeledInput.d.ts +1 -1
- package/esm/core/LabeledInput/LabeledInput.js +43 -5
- package/esm/core/LabeledSelect/LabeledSelect.d.ts +1 -1
- package/esm/core/LabeledSelect/LabeledSelect.js +50 -16
- package/esm/core/LabeledTextarea/LabeledTextarea.d.ts +2 -3
- package/esm/core/LabeledTextarea/LabeledTextarea.js +43 -5
- package/esm/core/List/ListItem.d.ts +4 -4
- package/esm/core/List/ListItem.js +46 -28
- package/esm/core/Menu/Menu.d.ts +1 -1
- package/esm/core/Menu/Menu.js +58 -47
- package/esm/core/Menu/MenuDivider.js +1 -1
- package/esm/core/Menu/MenuExtraContent.js +1 -1
- package/esm/core/Menu/MenuItem.d.ts +1 -1
- package/esm/core/Menu/MenuItem.js +131 -57
- package/esm/core/Menu/MenuItemSkeleton.d.ts +1 -1
- package/esm/core/Menu/MenuItemSkeleton.js +44 -12
- package/esm/core/Modal/Modal.d.ts +1 -1
- package/esm/core/Modal/Modal.js +33 -6
- package/esm/core/NonIdealState/ErrorPage.d.ts +6 -7
- package/esm/core/NonIdealState/ErrorPage.js +177 -117
- package/esm/core/NonIdealState/NonIdealState.d.ts +17 -1
- package/esm/core/NonIdealState/NonIdealState.js +65 -6
- package/esm/core/NotificationMarker/NotificationMarker.d.ts +1 -1
- package/esm/core/NotificationMarker/NotificationMarker.js +20 -2
- package/esm/core/Overlay/Overlay.d.ts +57 -0
- package/esm/core/Overlay/Overlay.js +88 -0
- package/esm/core/Overlay/index.d.ts +1 -0
- package/esm/core/{ProgressIndicators/ProgressLinear → Overlay}/index.js +1 -2
- package/esm/core/ProgressIndicators/{ProgressLinear/ProgressLinear.d.ts → ProgressLinear.d.ts} +6 -6
- package/esm/core/ProgressIndicators/{ProgressLinear/ProgressLinear.js → ProgressLinear.js} +33 -12
- package/esm/core/ProgressIndicators/{ProgressRadial/ProgressRadial.d.ts → ProgressRadial.d.ts} +2 -2
- package/esm/core/ProgressIndicators/ProgressRadial.js +64 -0
- package/esm/core/ProgressIndicators/index.d.ts +2 -2
- package/esm/core/ProgressIndicators/index.js +2 -2
- package/esm/core/Radio/Radio.d.ts +7 -4
- package/esm/core/Radio/Radio.js +45 -11
- package/esm/core/RadioTiles/RadioTile.d.ts +15 -4
- package/esm/core/RadioTiles/RadioTile.js +62 -14
- package/esm/core/RadioTiles/RadioTileGroup.d.ts +1 -1
- package/esm/core/RadioTiles/RadioTileGroup.js +10 -3
- package/esm/core/SearchBox/SearchBox.d.ts +3 -3
- package/esm/core/SearchBox/SearchBox.js +215 -97
- package/esm/core/Select/Select.d.ts +5 -10
- package/esm/core/Select/Select.js +283 -148
- package/esm/core/Select/SelectTag.d.ts +1 -1
- package/esm/core/Select/SelectTag.js +15 -3
- package/esm/core/Select/SelectTagContainer.d.ts +1 -1
- package/esm/core/Select/SelectTagContainer.js +20 -7
- package/esm/core/SideNavigation/SideNavigation.d.ts +1 -1
- package/esm/core/SideNavigation/SideNavigation.js +94 -21
- package/esm/core/SideNavigation/SidenavButton.d.ts +1 -1
- package/esm/core/SideNavigation/SidenavButton.js +24 -2
- package/esm/core/SideNavigation/SidenavSubmenu.js +14 -3
- package/esm/core/SideNavigation/SidenavSubmenuHeader.d.ts +1 -1
- package/esm/core/SideNavigation/SidenavSubmenuHeader.js +20 -4
- package/esm/core/SkipToContentLink/SkipToContentLink.d.ts +1 -1
- package/esm/core/SkipToContentLink/SkipToContentLink.js +11 -2
- package/esm/core/Slider/Slider.d.ts +4 -9
- package/esm/core/Slider/Slider.js +319 -194
- package/esm/core/Slider/Thumb.d.ts +2 -2
- package/esm/core/Slider/Thumb.js +100 -52
- package/esm/core/Slider/Track.d.ts +3 -3
- package/esm/core/Slider/Track.js +67 -49
- package/esm/core/StatusMessage/StatusMessage.d.ts +2 -2
- package/esm/core/StatusMessage/StatusMessage.js +18 -5
- package/esm/core/Stepper/Stepper.d.ts +3 -3
- package/esm/core/Stepper/Stepper.js +45 -8
- package/esm/core/Stepper/StepperStep.d.ts +1 -1
- package/esm/core/Stepper/StepperStep.js +73 -31
- package/esm/core/Stepper/WorkflowDiagram.d.ts +1 -1
- package/esm/core/Stepper/WorkflowDiagram.js +19 -5
- package/esm/core/Stepper/WorkflowDiagramStep.d.ts +3 -3
- package/esm/core/Stepper/WorkflowDiagramStep.js +18 -4
- package/esm/core/Surface/Surface.d.ts +2 -2
- package/esm/core/Surface/Surface.js +68 -39
- package/esm/core/Table/SubRowExpander.d.ts +2 -2
- package/esm/core/Table/SubRowExpander.js +29 -9
- package/esm/core/Table/Table.d.ts +18 -2
- package/esm/core/Table/Table.js +765 -411
- package/esm/core/Table/TableCell.d.ts +2 -2
- package/esm/core/Table/TableCell.js +87 -53
- package/esm/core/Table/TablePaginator.d.ts +3 -3
- package/esm/core/Table/TablePaginator.js +307 -125
- package/esm/core/Table/TableRowMemoized.d.ts +4 -4
- package/esm/core/Table/TableRowMemoized.js +129 -58
- package/esm/core/Table/actionHandlers/expandHandler.js +10 -10
- package/esm/core/Table/actionHandlers/filterHandler.js +23 -15
- package/esm/core/Table/actionHandlers/index.js +5 -1
- package/esm/core/Table/actionHandlers/resizeHandler.js +11 -11
- package/esm/core/Table/actionHandlers/selectHandler.js +117 -93
- package/esm/core/Table/cells/DefaultCell.d.ts +2 -2
- package/esm/core/Table/cells/DefaultCell.js +42 -7
- package/esm/core/Table/cells/EditableCell.d.ts +2 -2
- package/esm/core/Table/cells/EditableCell.js +70 -41
- package/esm/core/Table/columns/actionColumn.d.ts +3 -3
- package/esm/core/Table/columns/actionColumn.js +90 -58
- package/esm/core/Table/columns/expanderColumn.d.ts +2 -2
- package/esm/core/Table/columns/expanderColumn.js +38 -25
- package/esm/core/Table/columns/selectionColumn.d.ts +4 -4
- package/esm/core/Table/columns/selectionColumn.js +51 -23
- package/esm/core/Table/filters/BaseFilter.d.ts +2 -2
- package/esm/core/Table/filters/BaseFilter.js +15 -7
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.d.ts +3 -2
- package/esm/core/Table/filters/DateRangeFilter/DatePickerInput.js +84 -42
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.d.ts +4 -4
- package/esm/core/Table/filters/DateRangeFilter/DateRangeFilter.js +108 -46
- package/esm/core/Table/filters/FilterButtonBar.d.ts +3 -3
- package/esm/core/Table/filters/FilterButtonBar.js +28 -9
- package/esm/core/Table/filters/FilterToggle.d.ts +3 -3
- package/esm/core/Table/filters/FilterToggle.js +55 -20
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.d.ts +4 -4
- package/esm/core/Table/filters/NumberRangeFilter/NumberRangeFilter.js +50 -22
- package/esm/core/Table/filters/TextFilter/TextFilter.d.ts +3 -3
- package/esm/core/Table/filters/TextFilter/TextFilter.js +32 -14
- package/esm/core/Table/filters/customFilterFunctions.js +14 -12
- package/esm/core/Table/filters/defaultFilterFunctions.js +84 -79
- package/esm/core/Table/filters/tableFilters.d.ts +5 -5
- package/esm/core/Table/filters/tableFilters.js +34 -25
- package/esm/core/Table/filters/types.d.ts +1 -1
- package/esm/core/Table/hooks/useColumnDragAndDrop.js +88 -81
- package/esm/core/Table/hooks/useExpanderCell.d.ts +1 -1
- package/esm/core/Table/hooks/useExpanderCell.js +26 -20
- package/esm/core/Table/hooks/useResizeColumns.js +353 -287
- package/esm/core/Table/hooks/useScrollToRow.d.ts +2 -2
- package/esm/core/Table/hooks/useScrollToRow.js +42 -34
- package/esm/core/Table/hooks/useSelectionCell.js +10 -6
- package/esm/core/Table/hooks/useStickyColumns.js +61 -59
- package/esm/core/Table/hooks/useSubRowFiltering.js +90 -83
- package/esm/core/Table/hooks/useSubRowSelection.js +28 -27
- package/esm/core/Table/index.js +5 -1
- package/esm/core/Table/utils.js +40 -38
- package/esm/core/Tabs/Tab.d.ts +2 -2
- package/esm/core/Tabs/Tab.js +41 -7
- package/esm/core/Tabs/Tabs.d.ts +6 -6
- package/esm/core/Tabs/Tabs.js +391 -303
- package/esm/core/Tag/Tag.d.ts +1 -1
- package/esm/core/Tag/Tag.js +35 -8
- package/esm/core/Tag/TagContainer.d.ts +1 -1
- package/esm/core/Tag/TagContainer.js +17 -5
- package/esm/core/Textarea/Textarea.d.ts +2 -9
- package/esm/core/Textarea/Textarea.js +11 -10
- package/esm/core/ThemeProvider/ThemeProvider.d.ts +4 -4
- package/esm/core/ThemeProvider/ThemeProvider.js +65 -21
- package/esm/core/Tile/Tile.d.ts +14 -14
- package/esm/core/Tile/Tile.js +312 -198
- package/esm/core/TimePicker/TimePicker.d.ts +3 -3
- package/esm/core/TimePicker/TimePicker.js +448 -228
- package/esm/core/Toast/Toast.d.ts +5 -5
- package/esm/core/Toast/Toast.js +180 -99
- package/esm/core/Toast/Toaster.d.ts +5 -5
- package/esm/core/Toast/Toaster.js +83 -67
- package/esm/core/ToggleSwitch/ToggleSwitch.d.ts +1 -6
- package/esm/core/ToggleSwitch/ToggleSwitch.js +60 -22
- package/esm/core/Tooltip/Tooltip.d.ts +2 -2
- package/esm/core/Tooltip/Tooltip.js +154 -90
- package/esm/core/TransferList/TransferList.d.ts +6 -6
- package/esm/core/TransferList/TransferList.js +163 -93
- package/esm/core/Tree/Tree.d.ts +5 -5
- package/esm/core/Tree/Tree.js +197 -125
- package/esm/core/Tree/TreeContext.d.ts +1 -1
- package/esm/core/Tree/TreeContext.js +5 -5
- package/esm/core/Tree/TreeNode.d.ts +2 -2
- package/esm/core/Tree/TreeNode.js +195 -96
- package/esm/core/Tree/TreeNodeExpander.d.ts +1 -1
- package/esm/core/Tree/TreeNodeExpander.js +16 -5
- package/esm/core/Typography/Blockquote/Blockquote.d.ts +1 -1
- package/esm/core/Typography/Blockquote/Blockquote.js +12 -4
- package/esm/core/Typography/Kbd/Kbd.d.ts +1 -1
- package/esm/core/Typography/Kbd/Kbd.js +24 -15
- package/esm/core/Typography/Text/Text.d.ts +1 -1
- package/esm/core/Typography/Text/Text.js +20 -7
- package/esm/core/index.d.ts +1 -0
- package/esm/core/index.js +78 -10
- package/esm/core/utils/color/ColorValue.d.ts +4 -4
- package/esm/core/utils/color/ColorValue.js +524 -449
- package/esm/core/utils/components/AutoclearingHiddenLiveRegion.d.ts +2 -2
- package/esm/core/utils/components/AutoclearingHiddenLiveRegion.js +11 -7
- package/esm/core/utils/components/Divider.d.ts +1 -1
- package/esm/core/utils/components/Divider.js +8 -2
- package/esm/core/utils/components/Flex.d.ts +4 -4
- package/esm/core/utils/components/Flex.js +87 -71
- package/esm/core/utils/components/FocusTrap.d.ts +3 -3
- package/esm/core/utils/components/FocusTrap.js +41 -32
- package/esm/core/utils/components/Icon.d.ts +1 -1
- package/esm/core/utils/components/Icon.js +19 -12
- package/esm/core/utils/components/InputContainer.d.ts +2 -2
- package/esm/core/utils/components/InputContainer.js +65 -15
- package/esm/core/utils/components/InputFlexContainer.d.ts +1 -1
- package/esm/core/utils/components/InputFlexContainer.js +13 -2
- package/esm/core/utils/components/MiddleTextTruncation.d.ts +2 -2
- package/esm/core/utils/components/MiddleTextTruncation.js +27 -17
- package/esm/core/utils/components/Popover.d.ts +3 -3
- package/esm/core/utils/components/Popover.js +103 -102
- package/esm/core/utils/components/Resizer.d.ts +2 -2
- package/esm/core/utils/components/Resizer.js +250 -184
- package/esm/core/utils/components/VirtualScroll.d.ts +2 -2
- package/esm/core/utils/components/VirtualScroll.js +297 -218
- package/esm/core/utils/components/VisuallyHidden.d.ts +1 -1
- package/esm/core/utils/components/VisuallyHidden.js +8 -2
- package/esm/core/utils/components/WithCSSTransition.d.ts +2 -2
- package/esm/core/utils/components/WithCSSTransition.js +38 -21
- package/esm/core/utils/functions/colors.js +30 -30
- package/esm/core/utils/functions/date.js +8 -8
- package/esm/core/utils/functions/dom.js +17 -14
- package/esm/core/utils/functions/focusable.js +24 -15
- package/esm/core/utils/functions/import.d.ts +6 -0
- package/esm/core/utils/functions/import.js +14 -0
- package/esm/core/utils/functions/index.d.ts +1 -0
- package/esm/core/utils/functions/index.js +1 -0
- package/esm/core/utils/functions/numbers.js +7 -7
- package/esm/core/utils/functions/polymorphic.d.ts +5 -3
- package/esm/core/utils/functions/polymorphic.js +32 -23
- package/esm/core/utils/functions/supports.js +2 -1
- package/esm/core/utils/hooks/useContainerWidth.js +16 -13
- package/esm/core/utils/hooks/useDragAndDrop.js +99 -80
- package/esm/core/utils/hooks/useEventListener.js +18 -18
- package/esm/core/utils/hooks/useGlobals.js +29 -24
- package/esm/core/utils/hooks/useId.js +2 -2
- package/esm/core/utils/hooks/useIntersection.js +25 -19
- package/esm/core/utils/hooks/useIsClient.js +5 -5
- package/esm/core/utils/hooks/useIsomorphicLayoutEffect.js +2 -1
- package/esm/core/utils/hooks/useLatestRef.js +5 -5
- package/esm/core/utils/hooks/useMediaQuery.js +23 -25
- package/esm/core/utils/hooks/useMergedRefs.js +11 -12
- package/esm/core/utils/hooks/useOverflow.js +62 -50
- package/esm/core/utils/hooks/useResizeObserver.js +17 -12
- package/esm/core/utils/hooks/useSafeContext.js +5 -5
- package/esm/core/utils/icons/StatusIconMap.d.ts +5 -5
- package/esm/core/utils/icons/StatusIconMap.js +8 -4
- package/esm/core/utils/icons/SvgCalendar.d.ts +1 -1
- package/esm/core/utils/icons/SvgCalendar.js +7 -2
- package/esm/core/utils/icons/SvgCaretDownSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretDownSmall.js +7 -2
- package/esm/core/utils/icons/SvgCaretRightSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretRightSmall.js +7 -2
- package/esm/core/utils/icons/SvgCaretUpSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCaretUpSmall.js +7 -2
- package/esm/core/utils/icons/SvgCheckmark.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmark.js +5 -2
- package/esm/core/utils/icons/SvgCheckmarkSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCheckmarkSmall.js +7 -2
- package/esm/core/utils/icons/SvgChevronLeft.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeft.js +7 -2
- package/esm/core/utils/icons/SvgChevronLeftDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronLeftDouble.js +7 -2
- package/esm/core/utils/icons/SvgChevronRight.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRight.js +7 -2
- package/esm/core/utils/icons/SvgChevronRightDouble.d.ts +1 -1
- package/esm/core/utils/icons/SvgChevronRightDouble.js +7 -2
- package/esm/core/utils/icons/SvgClose.d.ts +1 -1
- package/esm/core/utils/icons/SvgClose.js +7 -2
- package/esm/core/utils/icons/SvgCloseSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgCloseSmall.js +7 -2
- package/esm/core/utils/icons/SvgColumnManager.d.ts +1 -1
- package/esm/core/utils/icons/SvgColumnManager.js +7 -2
- package/esm/core/utils/icons/SvgDocument.d.ts +1 -1
- package/esm/core/utils/icons/SvgDocument.js +5 -2
- package/esm/core/utils/icons/SvgFilter.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilter.js +5 -2
- package/esm/core/utils/icons/SvgFilterHollow.d.ts +1 -1
- package/esm/core/utils/icons/SvgFilterHollow.js +7 -2
- package/esm/core/utils/icons/SvgImportantSmall.d.ts +1 -1
- package/esm/core/utils/icons/SvgImportantSmall.js +7 -2
- package/esm/core/utils/icons/SvgInfoCircular.d.ts +1 -1
- package/esm/core/utils/icons/SvgInfoCircular.js +7 -2
- package/esm/core/utils/icons/SvgMore.d.ts +1 -1
- package/esm/core/utils/icons/SvgMore.js +7 -2
- package/esm/core/utils/icons/SvgMoreVertical.d.ts +1 -1
- package/esm/core/utils/icons/SvgMoreVertical.js +7 -2
- package/esm/core/utils/icons/SvgNew.d.ts +1 -1
- package/esm/core/utils/icons/SvgNew.js +7 -2
- package/esm/core/utils/icons/SvgSearch.d.ts +1 -1
- package/esm/core/utils/icons/SvgSearch.js +7 -2
- package/esm/core/utils/icons/SvgSmileyHappy.d.ts +1 -1
- package/esm/core/utils/icons/SvgSmileyHappy.js +7 -2
- package/esm/core/utils/icons/SvgSortDown.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortDown.js +7 -2
- package/esm/core/utils/icons/SvgSortUp.d.ts +1 -1
- package/esm/core/utils/icons/SvgSortUp.js +7 -2
- package/esm/core/utils/icons/SvgStatusError.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusError.js +7 -2
- package/esm/core/utils/icons/SvgStatusSuccess.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusSuccess.js +7 -2
- package/esm/core/utils/icons/SvgStatusWarning.d.ts +1 -1
- package/esm/core/utils/icons/SvgStatusWarning.js +7 -2
- package/esm/core/utils/icons/SvgSwap.d.ts +1 -1
- package/esm/core/utils/icons/SvgSwap.js +7 -2
- package/esm/core/utils/icons/SvgUpload.d.ts +1 -1
- package/esm/core/utils/icons/SvgUpload.js +7 -2
- package/esm/core/utils/props.d.ts +2 -2
- package/esm/core/utils/types.d.ts +1 -1
- package/esm/styles.js +452 -443
- package/package.json +33 -30
- package/styles.css +726 -1594
- package/cjs/core/ProgressIndicators/ProgressLinear/ProgressLinear.js +0 -65
- package/cjs/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
- package/cjs/core/ProgressIndicators/ProgressLinear/index.js +0 -10
- package/cjs/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -70
- package/cjs/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
- package/cjs/core/ProgressIndicators/ProgressRadial/index.js +0 -10
- package/esm/core/ProgressIndicators/ProgressLinear/index.d.ts +0 -3
- package/esm/core/ProgressIndicators/ProgressRadial/ProgressRadial.js +0 -41
- package/esm/core/ProgressIndicators/ProgressRadial/index.d.ts +0 -3
|
@@ -1,42 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
29
3
|
exports.ColorInputPanel = void 0;
|
|
4
|
+
const tslib_1 = require('tslib');
|
|
30
5
|
/*---------------------------------------------------------------------------------------------
|
|
31
6
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
32
7
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
33
8
|
*--------------------------------------------------------------------------------------------*/
|
|
34
|
-
const React = __importStar(require(
|
|
35
|
-
const classnames_1 = __importDefault(require(
|
|
36
|
-
const index_js_1 = require(
|
|
37
|
-
const index_js_2 = require(
|
|
38
|
-
const index_js_3 = require(
|
|
39
|
-
const ColorPickerContext_js_1 = require(
|
|
9
|
+
const React = tslib_1.__importStar(require('react'));
|
|
10
|
+
const classnames_1 = tslib_1.__importDefault(require('classnames'));
|
|
11
|
+
const index_js_1 = require('../Buttons/index.js');
|
|
12
|
+
const index_js_2 = require('../Input/index.js');
|
|
13
|
+
const index_js_3 = require('../utils/index.js');
|
|
14
|
+
const ColorPickerContext_js_1 = require('./ColorPickerContext.js');
|
|
40
15
|
/**
|
|
41
16
|
* `ColorInputPanel` shows input fields to enter precise color values in the specified format.
|
|
42
17
|
* It also allows switching between the specified formats using a swap button.
|
|
@@ -47,259 +22,455 @@ const ColorPickerContext_js_1 = require("./ColorPickerContext.js");
|
|
|
47
22
|
* </ColorPicker>
|
|
48
23
|
*/
|
|
49
24
|
exports.ColorInputPanel = React.forwardRef((props, ref) => {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
25
|
+
const {
|
|
26
|
+
defaultColorFormat,
|
|
27
|
+
allowedColorFormats = ['hsl', 'rgb', 'hex'],
|
|
28
|
+
className,
|
|
29
|
+
...rest
|
|
30
|
+
} = props;
|
|
31
|
+
const inputsContainerRef = React.useRef(null);
|
|
32
|
+
const { activeColor, applyHsvColorChange, hsvColor, showAlpha } = (0,
|
|
33
|
+
ColorPickerContext_js_1.useColorPickerContext)();
|
|
34
|
+
const [currentFormat, setCurrentFormat] = React.useState(defaultColorFormat);
|
|
35
|
+
React.useEffect(() => {
|
|
36
|
+
setCurrentFormat(defaultColorFormat);
|
|
37
|
+
}, [defaultColorFormat]);
|
|
38
|
+
// need to use state since input may have parsing error
|
|
39
|
+
const [input, setInput] = React.useState(['', '', '', '']);
|
|
40
|
+
React.useEffect(() => {
|
|
41
|
+
if (currentFormat === 'hsl') {
|
|
42
|
+
const hsl = activeColor.toHslColor();
|
|
43
|
+
setInput([
|
|
44
|
+
index_js_3.ColorValue.getFormattedColorNumber(hsvColor.h),
|
|
45
|
+
index_js_3.ColorValue.getFormattedColorNumber(hsl.s),
|
|
46
|
+
index_js_3.ColorValue.getFormattedColorNumber(hsl.l),
|
|
47
|
+
index_js_3.ColorValue.getFormattedColorNumber(
|
|
48
|
+
hsl.a ?? activeColor.getAlpha() / 255,
|
|
49
|
+
2,
|
|
50
|
+
),
|
|
51
|
+
]);
|
|
52
|
+
} else if (currentFormat === 'rgb') {
|
|
53
|
+
const rgb = activeColor.toRgbColor();
|
|
54
|
+
setInput([
|
|
55
|
+
rgb.r.toString(),
|
|
56
|
+
rgb.g.toString(),
|
|
57
|
+
rgb.b.toString(),
|
|
58
|
+
index_js_3.ColorValue.getFormattedColorNumber(
|
|
59
|
+
rgb.a ?? activeColor.getAlpha() / 255,
|
|
60
|
+
2,
|
|
61
|
+
),
|
|
62
|
+
]);
|
|
63
|
+
} else {
|
|
64
|
+
setInput([activeColor.toHexString(showAlpha)]);
|
|
65
|
+
setValidHexInput(true);
|
|
66
|
+
}
|
|
67
|
+
}, [activeColor, hsvColor.h, currentFormat, showAlpha]);
|
|
68
|
+
const [validHexInput, setValidHexInput] = React.useState(true);
|
|
69
|
+
const swapColorFormat = React.useCallback(() => {
|
|
70
|
+
const newFormat =
|
|
71
|
+
allowedColorFormats[
|
|
72
|
+
(allowedColorFormats.indexOf(currentFormat) + 1) %
|
|
73
|
+
allowedColorFormats.length
|
|
74
|
+
] ?? allowedColorFormats[0];
|
|
75
|
+
setCurrentFormat(newFormat);
|
|
76
|
+
}, [currentFormat, allowedColorFormats]);
|
|
77
|
+
const isFocusInside = (focused) =>
|
|
78
|
+
!!(
|
|
79
|
+
focused &&
|
|
80
|
+
inputsContainerRef.current &&
|
|
81
|
+
inputsContainerRef.current.contains(focused)
|
|
82
|
+
);
|
|
83
|
+
const handleColorInputChange = () => {
|
|
84
|
+
let color;
|
|
85
|
+
if (currentFormat === 'hex') {
|
|
86
|
+
try {
|
|
87
|
+
const value = input[0].replace(/ /g, '').toLowerCase(); // remove white space from input
|
|
88
|
+
color = index_js_3.ColorValue.create(value);
|
|
89
|
+
setValidHexInput(true);
|
|
90
|
+
if (activeColor.toHexString(showAlpha).toLowerCase() === value) {
|
|
91
|
+
return;
|
|
81
92
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
} catch (_e) {
|
|
94
|
+
setValidHexInput(false);
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (currentFormat === 'hsl') {
|
|
99
|
+
const [h, s, l, a] = input.map(Number);
|
|
100
|
+
if (
|
|
101
|
+
h < 0 ||
|
|
102
|
+
h > 360 ||
|
|
103
|
+
s < 0 ||
|
|
104
|
+
s > 100 ||
|
|
105
|
+
l < 0 ||
|
|
106
|
+
l > 100 ||
|
|
107
|
+
a < 0 ||
|
|
108
|
+
a > 1
|
|
109
|
+
) {
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
const hsl = activeColor.toHslColor();
|
|
113
|
+
if (hsl.h === h && hsl.s === s && hsl.l === l && hsl.a === a) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
color = index_js_3.ColorValue.create({ h, s, l, a });
|
|
117
|
+
}
|
|
118
|
+
if (currentFormat === 'rgb') {
|
|
119
|
+
const [r, g, b, a] = input.map(Number);
|
|
120
|
+
if (
|
|
121
|
+
r < 0 ||
|
|
122
|
+
r > 255 ||
|
|
123
|
+
g < 0 ||
|
|
124
|
+
g > 255 ||
|
|
125
|
+
b < 0 ||
|
|
126
|
+
b > 255 ||
|
|
127
|
+
a < 0 ||
|
|
128
|
+
a > 1
|
|
129
|
+
) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
const rgb = activeColor.toRgbColor();
|
|
133
|
+
if (rgb.r === r && rgb.g === g && rgb.b === b && rgb.a === a) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
color = index_js_3.ColorValue.create({ r, g, b, a });
|
|
137
|
+
}
|
|
138
|
+
if (color) {
|
|
139
|
+
applyHsvColorChange(color.toHsvColor(), true, color);
|
|
140
|
+
}
|
|
141
|
+
};
|
|
142
|
+
const hexInputField = React.createElement(
|
|
143
|
+
index_js_3.InputContainer,
|
|
144
|
+
{ status: validHexInput ? undefined : 'negative' },
|
|
145
|
+
React.createElement(index_js_2.Input, {
|
|
146
|
+
size: 'small',
|
|
147
|
+
maxLength: showAlpha ? 9 : 7,
|
|
148
|
+
minLength: 1,
|
|
149
|
+
placeholder: 'HEX',
|
|
150
|
+
value: input[0],
|
|
151
|
+
onChange: (event) => {
|
|
152
|
+
const value = event.target.value.startsWith('#')
|
|
153
|
+
? event.target.value
|
|
154
|
+
: `#${event.target.value}`;
|
|
155
|
+
setInput([value]);
|
|
156
|
+
},
|
|
157
|
+
onKeyDown: (event) => {
|
|
158
|
+
if (event.key === 'Enter') {
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
handleColorInputChange();
|
|
107
161
|
}
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
162
|
+
},
|
|
163
|
+
onBlur: (event) => {
|
|
164
|
+
event.preventDefault();
|
|
165
|
+
handleColorInputChange();
|
|
166
|
+
},
|
|
167
|
+
}),
|
|
168
|
+
);
|
|
169
|
+
const hslInputs = React.createElement(
|
|
170
|
+
React.Fragment,
|
|
171
|
+
null,
|
|
172
|
+
React.createElement(
|
|
173
|
+
index_js_3.InputContainer,
|
|
174
|
+
{
|
|
175
|
+
status:
|
|
176
|
+
Number(input[0]) < 0 || Number(input[0]) > 360
|
|
177
|
+
? 'negative'
|
|
178
|
+
: undefined,
|
|
179
|
+
},
|
|
180
|
+
React.createElement(index_js_2.Input, {
|
|
181
|
+
size: 'small',
|
|
182
|
+
type: 'number',
|
|
183
|
+
min: '0',
|
|
184
|
+
max: '359',
|
|
185
|
+
step: '.1',
|
|
186
|
+
placeholder: 'H',
|
|
187
|
+
value: input[0] ?? '',
|
|
188
|
+
onChange: (event) => {
|
|
189
|
+
setInput([event.target.value, input[1], input[2], input[3]]);
|
|
190
|
+
},
|
|
191
|
+
onKeyDown: (event) => {
|
|
192
|
+
if (event.key === 'Enter') {
|
|
193
|
+
event.preventDefault();
|
|
194
|
+
handleColorInputChange();
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
onBlur: (event) => {
|
|
198
|
+
event.preventDefault();
|
|
199
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
200
|
+
handleColorInputChange();
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
}),
|
|
204
|
+
),
|
|
205
|
+
React.createElement(
|
|
206
|
+
index_js_3.InputContainer,
|
|
207
|
+
{
|
|
208
|
+
status:
|
|
209
|
+
Number(input[1]) < 0 || Number(input[1]) > 100
|
|
210
|
+
? 'negative'
|
|
211
|
+
: undefined,
|
|
212
|
+
},
|
|
213
|
+
React.createElement(index_js_2.Input, {
|
|
214
|
+
size: 'small',
|
|
215
|
+
type: 'number',
|
|
216
|
+
min: '0',
|
|
217
|
+
max: '100',
|
|
218
|
+
step: '.1',
|
|
219
|
+
placeholder: 'S',
|
|
220
|
+
value: input[1] ?? '',
|
|
221
|
+
onChange: (event) => {
|
|
222
|
+
setInput([input[0], event.target.value, input[2], input[3]]);
|
|
223
|
+
},
|
|
224
|
+
onKeyDown: (event) => {
|
|
225
|
+
if (event.key === 'Enter') {
|
|
226
|
+
event.preventDefault();
|
|
227
|
+
handleColorInputChange();
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
onBlur: (event) => {
|
|
231
|
+
event.preventDefault();
|
|
232
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
233
|
+
handleColorInputChange();
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
}),
|
|
237
|
+
),
|
|
238
|
+
React.createElement(
|
|
239
|
+
index_js_3.InputContainer,
|
|
240
|
+
{
|
|
241
|
+
status:
|
|
242
|
+
Number(input[2]) < 0 || Number(input[2]) > 100
|
|
243
|
+
? 'negative'
|
|
244
|
+
: undefined,
|
|
245
|
+
},
|
|
246
|
+
React.createElement(index_js_2.Input, {
|
|
247
|
+
size: 'small',
|
|
248
|
+
type: 'number',
|
|
249
|
+
min: '0',
|
|
250
|
+
max: '100',
|
|
251
|
+
step: '.1',
|
|
252
|
+
placeholder: 'L',
|
|
253
|
+
value: input[2] ?? '',
|
|
254
|
+
onChange: (event) => {
|
|
255
|
+
setInput([input[0], input[1], event.target.value, input[3]]);
|
|
256
|
+
},
|
|
257
|
+
onKeyDown: (event) => {
|
|
258
|
+
if (event.key === 'Enter') {
|
|
259
|
+
event.preventDefault();
|
|
260
|
+
handleColorInputChange();
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
onBlur: (event) => {
|
|
264
|
+
event.preventDefault();
|
|
265
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
266
|
+
handleColorInputChange();
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
}),
|
|
270
|
+
),
|
|
271
|
+
showAlpha &&
|
|
272
|
+
React.createElement(
|
|
273
|
+
index_js_3.InputContainer,
|
|
274
|
+
{
|
|
275
|
+
status:
|
|
276
|
+
Number(input[3]) < 0 || Number(input[3]) > 1
|
|
277
|
+
? 'negative'
|
|
278
|
+
: undefined,
|
|
279
|
+
},
|
|
280
|
+
React.createElement(index_js_2.Input, {
|
|
281
|
+
size: 'small',
|
|
282
|
+
type: 'number',
|
|
283
|
+
min: '0',
|
|
284
|
+
max: '1',
|
|
285
|
+
step: '.01',
|
|
286
|
+
placeholder: 'A',
|
|
287
|
+
value: input[3] ?? '',
|
|
288
|
+
onChange: (event) => {
|
|
289
|
+
setInput([input[0], input[1], input[2], event.target.value]);
|
|
290
|
+
},
|
|
291
|
+
onKeyDown: (event) => {
|
|
292
|
+
if (event.key === 'Enter') {
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
handleColorInputChange();
|
|
119
295
|
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
296
|
+
},
|
|
297
|
+
onBlur: (event) => {
|
|
298
|
+
event.preventDefault();
|
|
299
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
300
|
+
handleColorInputChange();
|
|
123
301
|
}
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
302
|
+
},
|
|
303
|
+
}),
|
|
304
|
+
),
|
|
305
|
+
);
|
|
306
|
+
const rgbInputs = React.createElement(
|
|
307
|
+
React.Fragment,
|
|
308
|
+
null,
|
|
309
|
+
React.createElement(
|
|
310
|
+
index_js_3.InputContainer,
|
|
311
|
+
{
|
|
312
|
+
status:
|
|
313
|
+
Number(input[0]) < 0 || Number(input[0]) > 255
|
|
314
|
+
? 'negative'
|
|
315
|
+
: undefined,
|
|
316
|
+
},
|
|
317
|
+
React.createElement(index_js_2.Input, {
|
|
318
|
+
size: 'small',
|
|
319
|
+
type: 'number',
|
|
320
|
+
min: '0',
|
|
321
|
+
max: '255',
|
|
322
|
+
placeholder: 'R',
|
|
323
|
+
value: input[0] ?? '',
|
|
324
|
+
onChange: (event) => {
|
|
325
|
+
setInput([event.target.value, input[1], input[2], input[3]]);
|
|
326
|
+
},
|
|
327
|
+
onKeyDown: (event) => {
|
|
328
|
+
if (event.key === 'Enter') {
|
|
329
|
+
event.preventDefault();
|
|
330
|
+
handleColorInputChange();
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
onBlur: (event) => {
|
|
334
|
+
event.preventDefault();
|
|
335
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
336
|
+
handleColorInputChange();
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
}),
|
|
340
|
+
),
|
|
341
|
+
React.createElement(
|
|
342
|
+
index_js_3.InputContainer,
|
|
343
|
+
{
|
|
344
|
+
status:
|
|
345
|
+
Number(input[1]) < 0 || Number(input[1]) > 255
|
|
346
|
+
? 'negative'
|
|
347
|
+
: undefined,
|
|
348
|
+
},
|
|
349
|
+
React.createElement(index_js_2.Input, {
|
|
350
|
+
size: 'small',
|
|
351
|
+
type: 'number',
|
|
352
|
+
min: '0',
|
|
353
|
+
max: '255',
|
|
354
|
+
placeholder: 'G',
|
|
355
|
+
value: input[1] ?? '',
|
|
356
|
+
onChange: (event) => {
|
|
357
|
+
setInput([input[0], event.target.value, input[2], input[3]]);
|
|
358
|
+
},
|
|
359
|
+
onKeyDown: (event) => {
|
|
360
|
+
if (event.key === 'Enter') {
|
|
361
|
+
event.preventDefault();
|
|
362
|
+
handleColorInputChange();
|
|
363
|
+
}
|
|
364
|
+
},
|
|
365
|
+
onBlur: (event) => {
|
|
366
|
+
event.preventDefault();
|
|
367
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
368
|
+
handleColorInputChange();
|
|
369
|
+
}
|
|
370
|
+
},
|
|
371
|
+
}),
|
|
372
|
+
),
|
|
373
|
+
React.createElement(
|
|
374
|
+
index_js_3.InputContainer,
|
|
375
|
+
{
|
|
376
|
+
status:
|
|
377
|
+
Number(input[2]) < 0 || Number(input[2]) > 255
|
|
378
|
+
? 'negative'
|
|
379
|
+
: undefined,
|
|
380
|
+
},
|
|
381
|
+
React.createElement(index_js_2.Input, {
|
|
382
|
+
size: 'small',
|
|
383
|
+
type: 'number',
|
|
384
|
+
min: '0',
|
|
385
|
+
max: '255',
|
|
386
|
+
placeholder: 'B',
|
|
387
|
+
value: input[2] ?? '',
|
|
388
|
+
onChange: (event) => {
|
|
389
|
+
setInput([input[0], input[1], event.target.value, input[3]]);
|
|
390
|
+
},
|
|
391
|
+
onKeyDown: (event) => {
|
|
392
|
+
if (event.key === 'Enter') {
|
|
393
|
+
event.preventDefault();
|
|
394
|
+
handleColorInputChange();
|
|
395
|
+
}
|
|
396
|
+
},
|
|
397
|
+
onBlur: (event) => {
|
|
398
|
+
event.preventDefault();
|
|
399
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
400
|
+
handleColorInputChange();
|
|
401
|
+
}
|
|
402
|
+
},
|
|
403
|
+
}),
|
|
404
|
+
),
|
|
405
|
+
showAlpha &&
|
|
406
|
+
React.createElement(
|
|
407
|
+
index_js_3.InputContainer,
|
|
408
|
+
{
|
|
409
|
+
status:
|
|
410
|
+
Number(input[3]) < 0 || Number(input[3]) > 1
|
|
411
|
+
? 'negative'
|
|
412
|
+
: undefined,
|
|
413
|
+
},
|
|
414
|
+
React.createElement(index_js_2.Input, {
|
|
415
|
+
size: 'small',
|
|
416
|
+
type: 'number',
|
|
417
|
+
min: '0',
|
|
418
|
+
max: '1',
|
|
419
|
+
step: '.01',
|
|
420
|
+
placeholder: 'A',
|
|
421
|
+
value: input[3] ?? '',
|
|
422
|
+
onChange: (event) => {
|
|
423
|
+
setInput([input[0], input[1], input[2], event.target.value]);
|
|
424
|
+
},
|
|
425
|
+
onKeyDown: (event) => {
|
|
426
|
+
if (event.key === 'Enter') {
|
|
427
|
+
event.preventDefault();
|
|
428
|
+
handleColorInputChange();
|
|
137
429
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
430
|
+
},
|
|
431
|
+
onBlur: (event) => {
|
|
432
|
+
event.preventDefault();
|
|
433
|
+
if (!isFocusInside(event.relatedTarget)) {
|
|
434
|
+
handleColorInputChange();
|
|
141
435
|
}
|
|
142
|
-
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
? 'negative'
|
|
182
|
-
: undefined },
|
|
183
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '100', step: '.1', placeholder: 'S', value: input[1] ?? '', onChange: (event) => {
|
|
184
|
-
setInput([input[0], event.target.value, input[2], input[3]]);
|
|
185
|
-
}, onKeyDown: (event) => {
|
|
186
|
-
if (event.key === 'Enter') {
|
|
187
|
-
event.preventDefault();
|
|
188
|
-
handleColorInputChange();
|
|
189
|
-
}
|
|
190
|
-
}, onBlur: (event) => {
|
|
191
|
-
event.preventDefault();
|
|
192
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
193
|
-
handleColorInputChange();
|
|
194
|
-
}
|
|
195
|
-
} })),
|
|
196
|
-
React.createElement(index_js_3.InputContainer, { status: Number(input[2]) < 0 || Number(input[2]) > 100
|
|
197
|
-
? 'negative'
|
|
198
|
-
: undefined },
|
|
199
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '100', step: '.1', placeholder: 'L', value: input[2] ?? '', onChange: (event) => {
|
|
200
|
-
setInput([input[0], input[1], event.target.value, input[3]]);
|
|
201
|
-
}, onKeyDown: (event) => {
|
|
202
|
-
if (event.key === 'Enter') {
|
|
203
|
-
event.preventDefault();
|
|
204
|
-
handleColorInputChange();
|
|
205
|
-
}
|
|
206
|
-
}, onBlur: (event) => {
|
|
207
|
-
event.preventDefault();
|
|
208
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
209
|
-
handleColorInputChange();
|
|
210
|
-
}
|
|
211
|
-
} })),
|
|
212
|
-
showAlpha && (React.createElement(index_js_3.InputContainer, { status: Number(input[3]) < 0 || Number(input[3]) > 1
|
|
213
|
-
? 'negative'
|
|
214
|
-
: undefined },
|
|
215
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '1', step: '.01', placeholder: 'A', value: input[3] ?? '', onChange: (event) => {
|
|
216
|
-
setInput([input[0], input[1], input[2], event.target.value]);
|
|
217
|
-
}, onKeyDown: (event) => {
|
|
218
|
-
if (event.key === 'Enter') {
|
|
219
|
-
event.preventDefault();
|
|
220
|
-
handleColorInputChange();
|
|
221
|
-
}
|
|
222
|
-
}, onBlur: (event) => {
|
|
223
|
-
event.preventDefault();
|
|
224
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
225
|
-
handleColorInputChange();
|
|
226
|
-
}
|
|
227
|
-
} })))));
|
|
228
|
-
const rgbInputs = (React.createElement(React.Fragment, null,
|
|
229
|
-
React.createElement(index_js_3.InputContainer, { status: Number(input[0]) < 0 || Number(input[0]) > 255
|
|
230
|
-
? 'negative'
|
|
231
|
-
: undefined },
|
|
232
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '255', placeholder: 'R', value: input[0] ?? '', onChange: (event) => {
|
|
233
|
-
setInput([event.target.value, input[1], input[2], input[3]]);
|
|
234
|
-
}, onKeyDown: (event) => {
|
|
235
|
-
if (event.key === 'Enter') {
|
|
236
|
-
event.preventDefault();
|
|
237
|
-
handleColorInputChange();
|
|
238
|
-
}
|
|
239
|
-
}, onBlur: (event) => {
|
|
240
|
-
event.preventDefault();
|
|
241
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
242
|
-
handleColorInputChange();
|
|
243
|
-
}
|
|
244
|
-
} })),
|
|
245
|
-
React.createElement(index_js_3.InputContainer, { status: Number(input[1]) < 0 || Number(input[1]) > 255
|
|
246
|
-
? 'negative'
|
|
247
|
-
: undefined },
|
|
248
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '255', placeholder: 'G', value: input[1] ?? '', onChange: (event) => {
|
|
249
|
-
setInput([input[0], event.target.value, input[2], input[3]]);
|
|
250
|
-
}, onKeyDown: (event) => {
|
|
251
|
-
if (event.key === 'Enter') {
|
|
252
|
-
event.preventDefault();
|
|
253
|
-
handleColorInputChange();
|
|
254
|
-
}
|
|
255
|
-
}, onBlur: (event) => {
|
|
256
|
-
event.preventDefault();
|
|
257
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
258
|
-
handleColorInputChange();
|
|
259
|
-
}
|
|
260
|
-
} })),
|
|
261
|
-
React.createElement(index_js_3.InputContainer, { status: Number(input[2]) < 0 || Number(input[2]) > 255
|
|
262
|
-
? 'negative'
|
|
263
|
-
: undefined },
|
|
264
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '255', placeholder: 'B', value: input[2] ?? '', onChange: (event) => {
|
|
265
|
-
setInput([input[0], input[1], event.target.value, input[3]]);
|
|
266
|
-
}, onKeyDown: (event) => {
|
|
267
|
-
if (event.key === 'Enter') {
|
|
268
|
-
event.preventDefault();
|
|
269
|
-
handleColorInputChange();
|
|
270
|
-
}
|
|
271
|
-
}, onBlur: (event) => {
|
|
272
|
-
event.preventDefault();
|
|
273
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
274
|
-
handleColorInputChange();
|
|
275
|
-
}
|
|
276
|
-
} })),
|
|
277
|
-
showAlpha && (React.createElement(index_js_3.InputContainer, { status: Number(input[3]) < 0 || Number(input[3]) > 1
|
|
278
|
-
? 'negative'
|
|
279
|
-
: undefined },
|
|
280
|
-
React.createElement(index_js_2.Input, { size: 'small', type: 'number', min: '0', max: '1', step: '.01', placeholder: 'A', value: input[3] ?? '', onChange: (event) => {
|
|
281
|
-
setInput([input[0], input[1], input[2], event.target.value]);
|
|
282
|
-
}, onKeyDown: (event) => {
|
|
283
|
-
if (event.key === 'Enter') {
|
|
284
|
-
event.preventDefault();
|
|
285
|
-
handleColorInputChange();
|
|
286
|
-
}
|
|
287
|
-
}, onBlur: (event) => {
|
|
288
|
-
event.preventDefault();
|
|
289
|
-
if (!isFocusInside(event.relatedTarget)) {
|
|
290
|
-
handleColorInputChange();
|
|
291
|
-
}
|
|
292
|
-
} })))));
|
|
293
|
-
return (React.createElement(index_js_3.Box, { className: (0, classnames_1.default)('iui-color-input-wrapper', className), ref: ref, ...rest },
|
|
294
|
-
React.createElement(index_js_3.Box, { className: 'iui-color-picker-section-label' }, showAlpha && currentFormat != 'hex'
|
|
295
|
-
? currentFormat.toUpperCase() + 'A'
|
|
296
|
-
: currentFormat.toUpperCase()),
|
|
297
|
-
React.createElement(index_js_3.Box, { className: 'iui-color-input' },
|
|
298
|
-
allowedColorFormats.length > 1 && (React.createElement(index_js_1.IconButton, { styleType: 'borderless', onClick: swapColorFormat, size: 'small' },
|
|
299
|
-
React.createElement(index_js_3.SvgSwap, null))),
|
|
300
|
-
React.createElement(index_js_3.Box, { ref: inputsContainerRef, className: 'iui-color-input-fields' },
|
|
301
|
-
currentFormat === 'hex' && hexInputField,
|
|
302
|
-
currentFormat === 'rgb' && rgbInputs,
|
|
303
|
-
currentFormat === 'hsl' && hslInputs))));
|
|
436
|
+
},
|
|
437
|
+
}),
|
|
438
|
+
),
|
|
439
|
+
);
|
|
440
|
+
return React.createElement(
|
|
441
|
+
index_js_3.Box,
|
|
442
|
+
{
|
|
443
|
+
className: (0, classnames_1.default)(
|
|
444
|
+
'iui-color-input-wrapper',
|
|
445
|
+
className,
|
|
446
|
+
),
|
|
447
|
+
ref: ref,
|
|
448
|
+
...rest,
|
|
449
|
+
},
|
|
450
|
+
React.createElement(
|
|
451
|
+
index_js_3.Box,
|
|
452
|
+
{ className: 'iui-color-picker-section-label' },
|
|
453
|
+
showAlpha && currentFormat != 'hex'
|
|
454
|
+
? currentFormat.toUpperCase() + 'A'
|
|
455
|
+
: currentFormat.toUpperCase(),
|
|
456
|
+
),
|
|
457
|
+
React.createElement(
|
|
458
|
+
index_js_3.Box,
|
|
459
|
+
{ className: 'iui-color-input' },
|
|
460
|
+
allowedColorFormats.length > 1 &&
|
|
461
|
+
React.createElement(
|
|
462
|
+
index_js_1.IconButton,
|
|
463
|
+
{ styleType: 'borderless', onClick: swapColorFormat, size: 'small' },
|
|
464
|
+
React.createElement(index_js_3.SvgSwap, null),
|
|
465
|
+
),
|
|
466
|
+
React.createElement(
|
|
467
|
+
index_js_3.Box,
|
|
468
|
+
{ ref: inputsContainerRef, className: 'iui-color-input-fields' },
|
|
469
|
+
currentFormat === 'hex' && hexInputField,
|
|
470
|
+
currentFormat === 'rgb' && rgbInputs,
|
|
471
|
+
currentFormat === 'hsl' && hslInputs,
|
|
472
|
+
),
|
|
473
|
+
),
|
|
474
|
+
);
|
|
304
475
|
});
|
|
305
476
|
exports.default = exports.ColorInputPanel;
|