@qualtrics/ui-react 2.79.1 → 2.81.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 +25 -0
- package/dist/__node_modules/@radix-ui/primitive/dist/index.js +5 -6
- package/dist/__node_modules/@radix-ui/react-arrow/dist/index.js +8 -7
- package/dist/__node_modules/@radix-ui/react-collection/dist/index.js +71 -63
- package/dist/__node_modules/@radix-ui/react-context/dist/index.js +10 -14
- package/dist/__node_modules/@radix-ui/react-direction/dist/index.js +2 -4
- package/dist/__node_modules/@radix-ui/react-dismissable-layer/dist/index.js +22 -15
- package/dist/__node_modules/@radix-ui/react-dropdown-menu/dist/index.js +89 -89
- package/dist/__node_modules/@radix-ui/react-focus-scope/dist/index.js +26 -19
- package/dist/__node_modules/@radix-ui/react-id/dist/index.js +5 -2
- package/dist/__node_modules/@radix-ui/react-menu/dist/index.js +165 -129
- package/dist/__node_modules/@radix-ui/react-popper/dist/index.js +139 -106
- package/dist/__node_modules/@radix-ui/react-portal/dist/index.js +9 -5
- package/dist/__node_modules/@radix-ui/react-presence/dist/index.js +27 -20
- package/dist/__node_modules/@radix-ui/react-primitive/dist/index.js +4 -5
- package/dist/__node_modules/@radix-ui/react-roving-focus/dist/index.js +61 -38
- package/dist/__node_modules/@radix-ui/react-slot/dist/index.js +8 -12
- package/dist/__node_modules/@radix-ui/react-use-controllable-state/dist/index.js +40 -35
- package/dist/__node_modules/@radix-ui/react-use-size/dist/index.js +5 -2
- package/dist/__shared/cjs/{index-91d2f6f8.js → index-2272eaad.js} +15 -9
- package/dist/__shared/cjs/{index-d4ec6b6f.js → index-7fd3ddfe.js} +2829 -2634
- package/dist/components/Accordion/Accordion.js +27 -21
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionContext.js +6 -8
- package/dist/components/Accordion/AccordionHeader.js +13 -17
- package/dist/components/Accordion/AccordionPanel.js +7 -11
- package/dist/components/Accordion/AccordionSection.js +14 -11
- package/dist/components/Banner/Banner.js +10 -11
- package/dist/components/Banner/BannerBody.js +1 -3
- package/dist/components/Banner/BannerFooter.js +1 -3
- package/dist/components/Banner/BannerTitle.js +1 -3
- package/dist/components/BreakpointSwitch/Breakpoint.js +2 -5
- package/dist/components/BreakpointSwitch/BreakpointContext.js +3 -4
- package/dist/components/BreakpointSwitch/BreakpointSwitch.js +1 -3
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/Button/Button2.js +19 -13
- package/dist/components/ButtonGroup/ButtonGroup.js +7 -7
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Check.js +8 -6
- package/dist/components/Checkbox/Checkbox.js +31 -28
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/Checkbox/CheckboxField.js +14 -13
- package/dist/components/ColorPicker/Alpha.js +8 -12
- package/dist/components/ColorPicker/ColorPicker.js +67 -48
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/ColorPicker/ColorPickerFlyout.js +23 -24
- package/dist/components/ColorPicker/ColorPickerFlyoutInputs.js +27 -22
- package/dist/components/ColorPicker/ColorPickerWIthNoColor.js +11 -7
- package/dist/components/ColorPicker/Hue.js +9 -13
- package/dist/components/ColorPicker/Palette.js +23 -21
- package/dist/components/ColorPicker/Saturation.js +11 -15
- package/dist/components/ColorPicker/utils/hexToHsv.js +4 -5
- package/dist/components/ColorPicker/utils/hsvToHex.js +3 -5
- package/dist/components/ColorPicker/utils/rgbToHex.js +3 -5
- package/dist/components/Combobox/Combobox.js +166 -133
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/Combobox/ComboboxContext.js +3 -4
- package/dist/components/Combobox/ComboboxHeader.js +6 -6
- package/dist/components/Combobox/ComboboxIcon.js +14 -14
- package/dist/components/Combobox/ComboboxInput.js +41 -43
- package/dist/components/Combobox/ComboboxList.js +20 -20
- package/dist/components/Combobox/ComboboxOption.js +9 -10
- package/dist/components/ConfigPane/ConfigPane.js +52 -36
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/ChildIndexContext/index.js +7 -9
- package/dist/components/Dropdown/ChildIndexContext/reach-descendants.js +18 -21
- package/dist/components/Dropdown/Dropdown.js +68 -43
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownButton.js +53 -47
- package/dist/components/Dropdown/DropdownContext.js +3 -4
- package/dist/components/Dropdown/DropdownHeader.js +12 -9
- package/dist/components/Dropdown/DropdownHeaderContext.js +3 -4
- package/dist/components/Dropdown/DropdownList.js +32 -32
- package/dist/components/Dropdown/DropdownOption.js +32 -30
- package/dist/components/Dropdown/DropdownSearch.js +12 -14
- package/dist/components/FilePicker/FilePicker.js +30 -25
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/ErrorText.js +5 -5
- package/dist/components/FormField/FormField.js +27 -14
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FormField/FormFieldContext.js +6 -13
- package/dist/components/FormField/HelperText.js +5 -5
- package/dist/components/FormField/ReadOnlyText.js +4 -6
- package/dist/components/FullScreenTakeover/FullScreenTakeover.js +22 -15
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/Icon.js +6 -5
- package/dist/components/Icon/IconTypes.js +1 -0
- package/dist/components/IconButton/IconButton.js +25 -16
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput.js +25 -14
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +42 -29
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/Input/InputField.js +26 -21
- package/dist/components/InputGroup/InputGroup.js +7 -7
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/InputGroup/InputGroupAddon.js +7 -6
- package/dist/components/InputGroup/InputGroupProvider.js +5 -8
- package/dist/components/Label/Label.js +8 -9
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link.js +9 -7
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/ConditionContainer.js +8 -10
- package/dist/components/LogicEditor/ConditionSet.js +16 -21
- package/dist/components/LogicEditor/Controls.js +17 -20
- package/dist/components/LogicEditor/LogicEditor.js +33 -24
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/LogicEditor/LogicEditorContext.js +3 -4
- package/dist/components/LogicEditor/utils.js +5 -9
- package/dist/components/Modal/Modal.js +63 -49
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/Modal/ModalBody.js +5 -5
- package/dist/components/Modal/ModalContext.js +3 -4
- package/dist/components/Modal/ModalFooter.js +5 -5
- package/dist/components/Modal/ModalHeader.js +10 -12
- package/dist/components/NewMenu/BaseMenu.js +83 -54
- package/dist/components/NewMenu/Menu/Menu.js +10 -12
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/SelectMenu/SelectMenu.js +6 -7
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +35 -30
- package/dist/components/NewMenu/parts/MenuAnchor.js +15 -16
- package/dist/components/NewMenu/parts/MenuContext.js +3 -4
- package/dist/components/NewMenu/parts/MenuItem.js +23 -17
- package/dist/components/NewMenu/parts/MenuSearchBox.js +4 -6
- package/dist/components/NewMenu/parts/SubmenuAnchor.js +5 -5
- package/dist/components/NumberStepper/NumberStepper.js +42 -37
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/NumberStepper/NumberStepperDecrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperIncrement.js +13 -15
- package/dist/components/NumberStepper/NumberStepperInput.js +28 -30
- package/dist/components/PageLayout/MainContent.js +4 -4
- package/dist/components/PageLayout/PageContainer.js +4 -4
- package/dist/components/PageLayout/PageHeader.js +4 -4
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination.js +20 -16
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationContext.js +3 -4
- package/dist/components/Pagination/PaginationNextButton.js +15 -17
- package/dist/components/Pagination/PaginationPageInput.js +24 -24
- package/dist/components/Pagination/PaginationPreviousButton.js +14 -16
- package/dist/components/Popover/Popover.js +27 -18
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch.js +23 -16
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/QuickSearch/QuickSearchInput.js +33 -23
- package/dist/components/Radio/Radio.js +26 -28
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/Radio/RadioGroup.js +15 -16
- package/dist/components/Radio/RadioGroupContext.js +3 -4
- package/dist/components/Radio/RadioOption.js +11 -10
- package/dist/components/SearchInput/SearchInput.js +32 -25
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/ExpandCollapseButton.js +4 -6
- package/dist/components/SidebarNav/SidebarNav.js +19 -13
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/SidebarNav/SidebarNavContext.js +3 -4
- package/dist/components/SidebarNav/SidebarNavLink.js +7 -10
- package/dist/components/Slider/RangeSlider.js +36 -24
- package/dist/components/Slider/Slider.js +29 -20
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Slider/SliderButton.js +26 -17
- package/dist/components/Switch/Switch.js +19 -19
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Switch/SwitchField.js +13 -13
- package/dist/components/Table/Table.js +5 -5
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Table/TableBody.js +5 -5
- package/dist/components/Table/TableCell.js +5 -5
- package/dist/components/Table/TableHead.js +5 -5
- package/dist/components/Table/TableHeaderCell.js +5 -5
- package/dist/components/Table/TableRow.js +5 -5
- package/dist/components/Tabs/Tab.js +12 -13
- package/dist/components/Tabs/TabContextProvider.js +10 -13
- package/dist/components/Tabs/TabList.js +17 -13
- package/dist/components/Tabs/TabPanel.js +10 -11
- package/dist/components/Tabs/TabPanels.js +1 -3
- package/dist/components/Tabs/Tabs.js +20 -12
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +51 -29
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/UIProvider/A11yHelpersContext.js +3 -9
- package/dist/components/UIProvider/PortalTargetContext.js +6 -8
- package/dist/components/UIProvider/UIProvider.js +4 -5
- package/dist/components/deprecated_ColorPicker/Alpha.js +7 -7
- package/dist/components/deprecated_ColorPicker/ColorPicker.js +24 -13
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_ColorPicker/HexInput.js +16 -9
- package/dist/components/deprecated_ColorPicker/Hue.js +6 -6
- package/dist/components/deprecated_ColorPicker/Saturation.js +14 -16
- package/dist/components/deprecated_ColorPicker/Swatch.js +7 -6
- package/dist/components/deprecated_ColorPicker/useMouseDrag.js +5 -1
- package/dist/components/deprecated_NumberStepper/NumberStepper.js +34 -25
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepperContext.js +3 -4
- package/dist/components/deprecated_NumberStepper/NumberStepperDecrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperIncrement.js +14 -16
- package/dist/components/deprecated_NumberStepper/NumberStepperInput.js +32 -34
- package/dist/components/deprecated_Tabs/Tab.js +8 -9
- package/dist/components/deprecated_Tabs/TabContextProvider.js +3 -4
- package/dist/components/deprecated_Tabs/Tabs.js +13 -9
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/IconButtonWithLabel.js +6 -6
- package/dist/components/deprecated_Toolbar/Toolbar.js +16 -11
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/components/deprecated_Toolbar/ToolbarContext.js +3 -4
- package/dist/components/deprecated_Toolbar/ToolbarPanel.js +16 -16
- package/dist/components/deprecated_Toolbar/ToolbarPanels.js +44 -29
- package/dist/components/deprecated_Toolbar/ToolbarTab.js +19 -20
- package/dist/components/deprecated_Toolbar/ToolbarTabs.js +34 -24
- package/dist/design-tokens/less/typography.js +3 -3
- package/dist/hooks/useBreakpoints/useBreakpoints.js +12 -4
- package/dist/hooks/useClickOutside/useClickOutside.js +1 -3
- package/dist/hooks/useClickOutsidePortals/useClickOutsidePortals.js +3 -3
- package/dist/hooks/useControllableState/useControllableState.js +5 -2
- package/dist/hooks/useEventListener/useEventListener.js +6 -5
- package/dist/hooks/useFocusSequence/useFocusSequence.js +12 -12
- package/dist/hooks/useId/useId.js +4 -1
- package/dist/hooks/useIsFocused/useIsFocused.js +5 -1
- package/dist/hooks/useIsHovered/useIsHovered.js +5 -1
- package/dist/hooks/useIsTruncated/useIsTruncated.js +11 -16
- package/dist/hooks/useMouseDrag/useMouseDrag.js +5 -1
- package/dist/hooks/useOverlay/useOverlay.js +10 -10
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement.js +9 -2
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/FrontlineEmployeeVoiceIcon.js +6 -0
- package/dist/icons/createIconComponent.js +7 -6
- package/dist/icons/index.d.ts +2 -0
- package/dist/icons/index.es.js +1 -0
- package/dist/icons/index.js +3 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +7 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +192 -173
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTableCell.js +30 -25
- package/dist/next/AdvancedTable/AdvancedTableCheckbox.js +12 -15
- package/dist/next/AdvancedTable/AdvancedTableColumnHeader.js +83 -65
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaderMenu.js +25 -30
- package/dist/next/AdvancedTable/AdvancedTableColumnHeaders.js +10 -9
- package/dist/next/AdvancedTable/AdvancedTableDnDContext.js +12 -10
- package/dist/next/AdvancedTable/AdvancedTableDragPreview.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTableHiddenDescription.js +4 -7
- package/dist/next/AdvancedTable/AdvancedTablePagination.js +9 -13
- package/dist/next/AdvancedTable/AdvancedTableRow.js +16 -16
- package/dist/next/AdvancedTable/AdvancedTableRowExpandButton.js +7 -11
- package/dist/next/AdvancedTable/useAdvancedTableDragAndDrop.js +32 -36
- package/dist/next/AdvancedTable/useDragAndDropConfig.js +44 -53
- package/dist/next/Chat/Chat.js +5 -6
- package/dist/next/Chat/ChatContext.js +3 -4
- package/dist/next/Chat/ChatInput.js +24 -20
- package/dist/next/Chat/ChatMessage.js +16 -20
- package/dist/next/Chat/ChatMessageList.js +11 -10
- package/dist/next/Chat/ChatMessageText.js +1 -3
- package/dist/next/Chat/Loader.js +6 -9
- package/dist/next/Chat/MessageContext.js +3 -4
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput.js +28 -18
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInputIconButton.js +8 -8
- package/dist/next/CollectionGrid/CollectionGrid.js +14 -12
- package/dist/next/CollectionGrid/CollectionGridItem.js +4 -5
- package/dist/next/Combobox/Combobox.js +48 -37
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Combobox/ComboboxContext.js +3 -4
- package/dist/next/Combobox/ComboboxFlyout.js +12 -15
- package/dist/next/Combobox/ComboboxGroup.js +10 -14
- package/dist/next/Combobox/ComboboxGroupContext.js +9 -10
- package/dist/next/Combobox/ComboboxInput.js +37 -39
- package/dist/next/Combobox/ComboboxOption.js +15 -19
- package/dist/next/Combobox/hooks/useComboboxFocusSequence/useComboboxFocusSequence.js +9 -4
- package/dist/next/Combobox/hooks/useComboboxLoadingState/useComboboxLoadingState.js +2 -3
- package/dist/next/Combobox/hooks/useComboboxValue/useComboboxValue.js +10 -5
- package/dist/next/Combobox/hooks/useListboxFlyoutDimensions/useListboxFlyoutDimensions.js +12 -5
- package/dist/next/Combobox/hooks/useShouldRenderGroupHeader/useShouldRenderGroupHeader.js +5 -1
- package/dist/next/Drawer/Drawer.js +52 -27
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor.js +21 -19
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/FormFieldWrapper.js +11 -11
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Form/useForm.js +25 -30
- package/dist/next/Form/useFormField.js +3 -4
- package/dist/next/Form/utils/createFormInstance.js +7 -9
- package/dist/next/Form/utils/useFormContext.js +3 -4
- package/dist/next/Indicator/Indicator.js +12 -8
- package/dist/next/Indicator/Indicator2.js +3 -3
- package/dist/next/Input/Input.js +49 -35
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/LayoutGrid/LayoutGrid.js +11 -12
- package/dist/next/LayoutGrid/LayoutGridItem.js +5 -6
- package/dist/next/LoadingSpinner/LoadingSpinner.js +22 -17
- package/dist/next/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/next/Menu/Hooks/useFocusVirtualBoundary.js +7 -4
- package/dist/next/Menu/Hooks/useMaskDimensions.js +6 -7
- package/dist/next/Menu/Hooks/usePaneSearch.js +50 -39
- package/dist/next/Menu/Menu.js +28 -15
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuButton.js +17 -18
- package/dist/next/Menu/MenuContext.js +13 -18
- package/dist/next/Menu/MenuItem.js +28 -29
- package/dist/next/Menu/MenuPane.js +74 -61
- package/dist/next/Menu/MenuSearch.js +10 -10
- package/dist/next/Menu/PaneChildren.js +10 -15
- package/dist/next/Menu/SubMenu.js +91 -76
- package/dist/next/Pagination/Pagination.js +40 -31
- package/dist/next/Pagination/RowDisplayCount.js +6 -7
- package/dist/next/PhoneNumberInput/PhoneNumberInput.js +49 -47
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select.js +27 -30
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/Select/SelectButton.js +16 -15
- package/dist/next/Select/SelectContext.js +3 -4
- package/dist/next/Select/SelectItem.js +12 -13
- package/dist/next/Select/SelectPane.js +13 -14
- package/dist/next/Select/SelectedItems.js +16 -10
- package/dist/next/Select/SubSelect.js +21 -18
- package/dist/next/SplitButton/SplitButton.js +30 -22
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/SplitButton/SplitButtonOption.js +6 -6
- package/dist/next/Stack/Stack.js +26 -26
- package/dist/next/Stack/StackItem.js +12 -14
- package/dist/next/TimePicker/TimeDropdown.js +18 -18
- package/dist/next/TimePicker/TimeInput.js +38 -42
- package/dist/next/TimePicker/TimePicker.js +46 -25
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/TimePicker/TimePickerIcon.js +5 -7
- package/dist/next/TimePicker/utils.js +34 -13
- package/dist/next/ToggleButton/ToggleButton.js +14 -13
- package/dist/next/ToggleButton/ToggleButtonGroup.js +8 -10
- package/dist/next/ToggleButton/ToggleButtonGroupContext.js +3 -4
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/Tooltip/Tooltip.js +5 -4
- package/dist/next/Typography/Typography.js +8 -7
- package/dist/next/index.d.ts +12 -2
- package/dist/next/index.js +2395 -2199
- package/dist/utils/Flyout/Flyout.js +14 -13
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/dist/utils/Flyout/FlyoutHeader.js +6 -6
- package/dist/utils/Flyout/FlyoutOption.js +11 -8
- package/dist/utils/GridChildrenWrapper/GridChildrenWrapper.js +4 -6
- package/dist/utils/Popper/Popper.js +71 -61
- package/dist/utils/Popper/PopperContext.js +5 -6
- package/dist/utils/Portal/Portal.js +7 -5
- package/dist/utils/Text/Text.js +10 -8
- package/dist/utils/TextOverflowTooltip/TextOverflowTooltip.js +10 -6
- package/dist/utils/Translation/Translate.js +4 -7
- package/dist/utils/Translation/TranslationProvider.js +10 -14
- package/dist/utils/Translation/containsComponentOrElement.js +3 -1
- package/dist/utils/Translation/useTranslation.js +2 -3
- package/dist/utils/VirtuosoTestWrapper/VirtuosoTestWrapper.js +1 -3
- package/dist/utils/filterChildren/filterChildren.js +4 -4
- package/icons/package.json +1 -1
- package/next/package.json +2 -2
- package/package.json +4 -4
|
@@ -9,26 +9,24 @@ import Input from '../Input/Input.js';
|
|
|
9
9
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
10
10
|
|
|
11
11
|
const TimeInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
12
|
-
let
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
isOptionHovered
|
|
31
|
-
} = _ref;
|
|
12
|
+
let onChange = _ref.onChange,
|
|
13
|
+
ariaExpanded = _ref.ariaExpanded,
|
|
14
|
+
userInput = _ref.userInput,
|
|
15
|
+
handleKeyDown = _ref.handleKeyDown,
|
|
16
|
+
setIsFlyoutOpen = _ref.setIsFlyoutOpen,
|
|
17
|
+
setShouldMoveSelectionToEnd = _ref.setShouldMoveSelectionToEnd,
|
|
18
|
+
shouldMoveSelectionToEnd = _ref.shouldMoveSelectionToEnd,
|
|
19
|
+
isInvalid = _ref.isInvalid,
|
|
20
|
+
isDisabled = _ref.isDisabled,
|
|
21
|
+
is24HourClock = _ref.is24HourClock,
|
|
22
|
+
id = _ref.id,
|
|
23
|
+
dataTestId = _ref.dataTestId,
|
|
24
|
+
ariaControls = _ref.ariaControls,
|
|
25
|
+
ariaActiveDescendant = _ref.ariaActiveDescendant,
|
|
26
|
+
ariaLabel = _ref.ariaLabel,
|
|
27
|
+
ariaLabelledBy = _ref.ariaLabelledBy,
|
|
28
|
+
ariaDescribedBy = _ref.ariaDescribedBy,
|
|
29
|
+
isOptionHovered = _ref.isOptionHovered;
|
|
32
30
|
const mask24 = '00:00';
|
|
33
31
|
const mask12 = '00:00 `am';
|
|
34
32
|
const mask = is24HourClock ? mask24 : mask12;
|
|
@@ -59,9 +57,8 @@ const TimeInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
59
57
|
if (isDisabled || value === lastProgrammaticValue.current) {
|
|
60
58
|
return;
|
|
61
59
|
}
|
|
62
|
-
const
|
|
63
|
-
correctedTime
|
|
64
|
-
} = correctTime(value, is24HourClock, false);
|
|
60
|
+
const _correctTime = correctTime(value, is24HourClock, false),
|
|
61
|
+
correctedTime = _correctTime.correctedTime;
|
|
65
62
|
if (correctedTime !== value) {
|
|
66
63
|
// Update the mask value with the corrected time
|
|
67
64
|
// eslint-disable-next-line no-param-reassign
|
|
@@ -70,27 +67,26 @@ const TimeInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
70
67
|
onChange(correctedTime);
|
|
71
68
|
setShouldMoveSelectionToEnd(false);
|
|
72
69
|
}, [is24HourClock, isDisabled, onChange, setShouldMoveSelectionToEnd]);
|
|
73
|
-
const {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
a: /[AaPp]/,
|
|
86
|
-
m: /[Mm]/
|
|
70
|
+
const _useIMask = useIMask({
|
|
71
|
+
mask,
|
|
72
|
+
lazy: false,
|
|
73
|
+
placeholderChar: '-',
|
|
74
|
+
blocks: {
|
|
75
|
+
am: {
|
|
76
|
+
mask: 'am',
|
|
77
|
+
placeholderChar: '-',
|
|
78
|
+
definitions: {
|
|
79
|
+
a: /[AaPp]/,
|
|
80
|
+
m: /[Mm]/
|
|
81
|
+
}
|
|
87
82
|
}
|
|
88
83
|
}
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
84
|
+
}, {
|
|
85
|
+
defaultValue: userInput ? undefined : emptyDisplayValue,
|
|
86
|
+
onAccept: handleAccept
|
|
87
|
+
}),
|
|
88
|
+
imaskRef = _useIMask.ref,
|
|
89
|
+
maskRef = _useIMask.maskRef;
|
|
94
90
|
|
|
95
91
|
// Sync userInput value with the input (e.g. when parent sets time from dropdown)
|
|
96
92
|
useEffect(() => {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
1
2
|
import React__default, { useState, useMemo, useCallback, useEffect, useRef } from 'react';
|
|
2
3
|
import { TimeDropdown } from './TimeDropdown.js';
|
|
3
4
|
import { TimeInput } from './TimeInput.js';
|
|
@@ -21,34 +22,46 @@ const DEFAULT_TIME = (() => {
|
|
|
21
22
|
};
|
|
22
23
|
})();
|
|
23
24
|
const TimePicker = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
24
|
-
let
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
is24HourClock = false,
|
|
28
|
-
isDisabled =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
'
|
|
34
|
-
'aria-
|
|
35
|
-
|
|
25
|
+
let externalValue = _ref.value,
|
|
26
|
+
externalOnChange = _ref.onChange,
|
|
27
|
+
_ref$is24HourClock = _ref.is24HourClock,
|
|
28
|
+
is24HourClock = _ref$is24HourClock === void 0 ? false : _ref$is24HourClock,
|
|
29
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
30
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
31
|
+
_ref$isInvalid = _ref.isInvalid,
|
|
32
|
+
isInvalid = _ref$isInvalid === void 0 ? false : _ref$isInvalid,
|
|
33
|
+
externalId = _ref.id,
|
|
34
|
+
dataTestId = _ref['data-testid'],
|
|
35
|
+
ariaLabel = _ref['aria-label'],
|
|
36
|
+
ariaLabelledBy = _ref['aria-labelledby'],
|
|
37
|
+
ariaDescribedBy = _ref['aria-describedby'];
|
|
36
38
|
const timePickerId = useId(externalId);
|
|
37
39
|
const inputId = "".concat(timePickerId, "-input");
|
|
38
40
|
const dropdownId = "".concat(timePickerId, "-dropdown");
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
+
const _useState = useState(false),
|
|
42
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
43
|
+
isOptionHovered = _useState2[0],
|
|
44
|
+
setIsOptionHovered = _useState2[1];
|
|
45
|
+
const _useControllableState = useControllableState(DEFAULT_TIME, externalOnChange, externalValue),
|
|
46
|
+
_useControllableState2 = _slicedToArray(_useControllableState, 2),
|
|
47
|
+
timeObject = _useControllableState2[0],
|
|
48
|
+
setTimeObject = _useControllableState2[1];
|
|
41
49
|
const defaultTimeString = convertTimeObjectToTimeString(timeObject, is24HourClock);
|
|
42
50
|
|
|
43
51
|
// timeString needs its own state instead of always being derived from timeObject, since typing doesn't "commit" a new time.
|
|
44
|
-
const
|
|
45
|
-
|
|
52
|
+
const _useState3 = useState(defaultTimeString),
|
|
53
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
54
|
+
timeString = _useState4[0],
|
|
55
|
+
setTimeString = _useState4[1];
|
|
56
|
+
const _useState5 = useState(false),
|
|
57
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
58
|
+
isTimeStringDirty = _useState6[0],
|
|
59
|
+
setIsTimeStringDirty = _useState6[1];
|
|
46
60
|
const step = 60 * 30;
|
|
47
61
|
const dropdownItems = useMemo(() => generateTimes(step, is24HourClock), [is24HourClock, step]);
|
|
48
62
|
const getScrolledToItemFromTimeString = useCallback(typedTime => {
|
|
49
|
-
const
|
|
50
|
-
correctedTime
|
|
51
|
-
} = correctTime(typedTime, is24HourClock, true);
|
|
63
|
+
const _correctTime = correctTime(typedTime, is24HourClock, true),
|
|
64
|
+
correctedTime = _correctTime.correctedTime;
|
|
52
65
|
const correctedTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
53
66
|
const correctedTimeValue = correctedTimeObject.hour * 60 * 60 + correctedTimeObject.minute * 60;
|
|
54
67
|
let minDistance = correctedTimeValue - dropdownItems[0].value;
|
|
@@ -70,8 +83,14 @@ const TimePicker = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
70
83
|
isExactMatch: minDistance === 0
|
|
71
84
|
};
|
|
72
85
|
}, [is24HourClock, dropdownItems]);
|
|
73
|
-
const
|
|
74
|
-
|
|
86
|
+
const _useState7 = useState(() => getScrolledToItemFromTimeString(timeString)),
|
|
87
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
88
|
+
scrolledToItem = _useState8[0],
|
|
89
|
+
setScrolledToItem = _useState8[1];
|
|
90
|
+
const _useState9 = useState(true),
|
|
91
|
+
_useState0 = _slicedToArray(_useState9, 2),
|
|
92
|
+
shouldMoveSelectionToEnd = _useState0[0],
|
|
93
|
+
setShouldMoveSelectionToEnd = _useState0[1];
|
|
75
94
|
|
|
76
95
|
// timeObject may be controlled and may change at any time, so we need to update timeString and the focused item whenever it changes.
|
|
77
96
|
useEffect(() => {
|
|
@@ -81,14 +100,16 @@ const TimePicker = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
|
81
100
|
setShouldMoveSelectionToEnd(true);
|
|
82
101
|
setScrolledToItem(getScrolledToItemFromTimeString(newTimeString));
|
|
83
102
|
}, [timeObject, is24HourClock, getScrolledToItemFromTimeString]);
|
|
84
|
-
const
|
|
103
|
+
const _useState1 = useState(false),
|
|
104
|
+
_useState10 = _slicedToArray(_useState1, 2),
|
|
105
|
+
isFlyoutOpen = _useState10[0],
|
|
106
|
+
setIsFlyoutOpen = _useState10[1];
|
|
85
107
|
|
|
86
108
|
// Sets the actual time object and updates the flyout and focus state
|
|
87
109
|
const commitTimeString = function () {
|
|
88
110
|
let newTime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : timeString;
|
|
89
|
-
const
|
|
90
|
-
correctedTime
|
|
91
|
-
} = correctTime(newTime, is24HourClock, true);
|
|
111
|
+
const _correctTime2 = correctTime(newTime, is24HourClock, true),
|
|
112
|
+
correctedTime = _correctTime2.correctedTime;
|
|
92
113
|
const newTimeObject = convertTimeStringToTimeObject(correctedTime);
|
|
93
114
|
setTimeObject(newTimeObject);
|
|
94
115
|
setIsFlyoutOpen(false);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"timePickerContainer":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._5UhBq{display:inline-block;position:relative}._5UhBq ._8VXg5{width:120px}._5UhBq ._8VXg5 ._zubqn._9AyK4{transform:rotate(-180deg)}._5UhBq ._8VXg5 ._zubqn._sYRTl{fill:#9d9fa1;opacity:.4}._5UhBq ._slVGu>input:focus{box-shadow:none!important;border:1px solid #898989!important}._5UhBq ._zubqn{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._5UhBq ._zubqn._9AyK4{transform:rotate(-180deg)}._X0cmr{width:120px}._X0cmr ._nc8Wy._fQNXg{background-color:#efefef;border-radius:6px}";
|
|
4
|
+
var styles = {"timePickerContainer":"_5UhBq","input":"_8VXg5","icon":"_zubqn","open":"_9AyK4","disabled":"_sYRTl","ignoreFocusStyle":"_slVGu","timePickerFlyout":"_X0cmr","option":"_nc8Wy","exactMatch":"_fQNXg"};
|
|
5
|
+
var stylesheet="._5UhBq{display:inline-block;position:relative}._5UhBq ._8VXg5{width:120px}._5UhBq ._8VXg5 ._zubqn._9AyK4{transform:rotate(-180deg)}._5UhBq ._8VXg5 ._zubqn._sYRTl{fill:#9d9fa1;opacity:.4}._5UhBq ._slVGu>input:focus{box-shadow:none!important;border:1px solid #898989!important}._5UhBq ._zubqn{position:absolute;right:4px;bottom:4px;height:28px;width:28px}._5UhBq ._zubqn._9AyK4{transform:rotate(-180deg)}._X0cmr{width:120px}._X0cmr ._nc8Wy._fQNXg{background-color:#efefef;border-radius:6px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -7,13 +7,11 @@ import IconButton from '../../components/IconButton/IconButton.js';
|
|
|
7
7
|
import ChevronDownIcon from '../../icons/components/ChevronDownIcon.js';
|
|
8
8
|
|
|
9
9
|
const TimePickerIcon = _ref => {
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
inputRef
|
|
16
|
-
} = _ref;
|
|
10
|
+
let isOpen = _ref.isOpen,
|
|
11
|
+
isDisabled = _ref.isDisabled,
|
|
12
|
+
setIsFlyoutOpen = _ref.setIsFlyoutOpen,
|
|
13
|
+
iconRef = _ref.iconRef,
|
|
14
|
+
inputRef = _ref.inputRef;
|
|
17
15
|
return /*#__PURE__*/React__default.createElement(IconButton, {
|
|
18
16
|
"aria-hidden": "true",
|
|
19
17
|
tabIndex: -1,
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
|
|
2
|
+
import _includesInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/includes';
|
|
3
|
+
|
|
1
4
|
const formatUtcDate = (utcDate, is24HourClock) => {
|
|
2
|
-
const {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
});
|
|
5
|
+
const _Intl$DateTimeFormat = Intl.DateTimeFormat(undefined, {
|
|
6
|
+
timeStyle: 'short',
|
|
7
|
+
timeZone: 'UTC',
|
|
8
|
+
hourCycle: is24HourClock ? 'h23' : 'h12'
|
|
9
|
+
}),
|
|
10
|
+
format = _Intl$DateTimeFormat.format;
|
|
9
11
|
const dateWithoutLeadingZeros = format(utcDate);
|
|
10
12
|
let dateWithLeadingZeros = dateWithoutLeadingZeros;
|
|
11
13
|
if (dateWithLeadingZeros.split(':')[0].length === 1) {
|
|
@@ -18,7 +20,11 @@ const convertTimeObjectToTimeString = (time, is24HourClock) => {
|
|
|
18
20
|
return formatUtcDate(date, is24HourClock);
|
|
19
21
|
};
|
|
20
22
|
const convertTimeStringToTimeObject = completeTimeString => {
|
|
21
|
-
const
|
|
23
|
+
const _completeTimeString$s = completeTimeString.split(/:| /),
|
|
24
|
+
_completeTimeString$s2 = _slicedToArray(_completeTimeString$s, 3),
|
|
25
|
+
hourPart = _completeTimeString$s2[0],
|
|
26
|
+
minutePart = _completeTimeString$s2[1],
|
|
27
|
+
amPmPart = _completeTimeString$s2[2];
|
|
22
28
|
let hour = +hourPart;
|
|
23
29
|
const minute = +minutePart;
|
|
24
30
|
if (amPmPart === 'am' && hour === 12) {
|
|
@@ -44,7 +50,10 @@ const generateTimes = (step, is24HourClock) => {
|
|
|
44
50
|
};
|
|
45
51
|
function getTimeStringCorrector(str, is24HourClock) {
|
|
46
52
|
var _letterString;
|
|
47
|
-
let
|
|
53
|
+
let _str$replace$split = str.replace(':', '').split(' '),
|
|
54
|
+
_str$replace$split2 = _slicedToArray(_str$replace$split, 2),
|
|
55
|
+
numberString = _str$replace$split2[0],
|
|
56
|
+
letterString = _str$replace$split2[1];
|
|
48
57
|
letterString = (_letterString = letterString) === null || _letterString === void 0 ? void 0 : _letterString.toLowerCase();
|
|
49
58
|
let selectionModifier = 0;
|
|
50
59
|
const getTimeString = () => {
|
|
@@ -78,10 +87,22 @@ function getTimeStringCorrector(str, is24HourClock) {
|
|
|
78
87
|
numberString = "".concat(numberString.slice(0, 1), "0").concat(numberString.slice(2));
|
|
79
88
|
};
|
|
80
89
|
const hoursAre00 = () => numberString[0] === '0' && numberString[1] === '0';
|
|
81
|
-
const firstHourGreaterThan1 = () =>
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
const firstHourGreaterThan1 = () => {
|
|
91
|
+
var _context;
|
|
92
|
+
return !_includesInstanceProperty(_context = '01-').call(_context, numberString[0]);
|
|
93
|
+
};
|
|
94
|
+
const firstHourGreaterThan2 = () => {
|
|
95
|
+
var _context2;
|
|
96
|
+
return !_includesInstanceProperty(_context2 = '012-').call(_context2, numberString[0]);
|
|
97
|
+
};
|
|
98
|
+
const hoursGreaterThan12 = () => {
|
|
99
|
+
var _context3;
|
|
100
|
+
return numberString[0] === '1' && !_includesInstanceProperty(_context3 = '012-').call(_context3, numberString[1]);
|
|
101
|
+
};
|
|
102
|
+
const hoursGreaterThan23 = () => {
|
|
103
|
+
var _context4;
|
|
104
|
+
return numberString[0] === '2' && !_includesInstanceProperty(_context4 = '0123-').call(_context4, numberString[1]);
|
|
105
|
+
};
|
|
85
106
|
const firstMinuteGreaterThan5 = () => numberString[2] !== '-' && +numberString[2] > 5;
|
|
86
107
|
const hasTypedMinutes = () => numberString[2] !== '-' && numberString[3] !== '-';
|
|
87
108
|
return {
|
|
@@ -10,19 +10,20 @@ import useId from '../../hooks/useId/useId.js';
|
|
|
10
10
|
import getSubDataTestId from '../../utils/getSubDataTestId/getSubDataTestId.js';
|
|
11
11
|
|
|
12
12
|
const ToggleButton = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
isActivated = false,
|
|
16
|
-
onChange,
|
|
17
|
-
value,
|
|
18
|
-
isDisabled =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
'
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
13
|
+
let children = _ref.children,
|
|
14
|
+
_ref$isActivated = _ref.isActivated,
|
|
15
|
+
isActivated = _ref$isActivated === void 0 ? false : _ref$isActivated,
|
|
16
|
+
onChange = _ref.onChange,
|
|
17
|
+
value = _ref.value,
|
|
18
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
19
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
20
|
+
_ref$kind = _ref.kind,
|
|
21
|
+
kind = _ref$kind === void 0 ? 'icon-text' : _ref$kind,
|
|
22
|
+
ariaLabel = _ref['aria-label'],
|
|
23
|
+
ariaLabelledby = _ref['aria-labelledby'],
|
|
24
|
+
inputName = _ref.name,
|
|
25
|
+
dataTestId = _ref.dataTestId,
|
|
26
|
+
inputProps = _ref.inputProps;
|
|
26
27
|
const id = useId();
|
|
27
28
|
const groupContext = useToggleButtonGroupContext();
|
|
28
29
|
const inGroup = groupContext !== null;
|
|
@@ -5,16 +5,14 @@ import styles from './styles.js';
|
|
|
5
5
|
import useId from '../../hooks/useId/useId.js';
|
|
6
6
|
|
|
7
7
|
const ToggleButtonGroup = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
'aria-
|
|
16
|
-
'aria-labelledby': ariaLabelledby
|
|
17
|
-
} = _ref;
|
|
8
|
+
let children = _ref.children,
|
|
9
|
+
value = _ref.value,
|
|
10
|
+
onChange = _ref.onChange,
|
|
11
|
+
name = _ref.name,
|
|
12
|
+
label = _ref.label,
|
|
13
|
+
isDisabled = _ref.isDisabled,
|
|
14
|
+
ariaLabel = _ref['aria-label'],
|
|
15
|
+
ariaLabelledby = _ref['aria-labelledby'];
|
|
18
16
|
const backupName = useId();
|
|
19
17
|
return /*#__PURE__*/React__default.createElement(ToggleButtonGroupContextProvider, {
|
|
20
18
|
value: {
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import '../../utils/index.js';
|
|
2
2
|
import createContextUtilities from '../../utils/createContextUtilities/createContextUtilities.js';
|
|
3
3
|
|
|
4
|
-
const
|
|
5
|
-
useContext
|
|
6
|
-
Provider
|
|
7
|
-
} = createContextUtilities(null);
|
|
4
|
+
const _createContextUtiliti = createContextUtilities(null),
|
|
5
|
+
useToggleButtonGroupContext = _createContextUtiliti.useContext,
|
|
6
|
+
ToggleButtonGroupContextProvider = _createContextUtiliti.Provider;
|
|
8
7
|
|
|
9
8
|
export { ToggleButtonGroupContextProvider, useToggleButtonGroupContext };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"default":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._ifjem{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._K5s3J{background-color:rgba(50,54,58,.08)}._WiikV{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._3oPLC{color:rgba(81,85,89,.4);cursor:not-allowed}._YCWU2{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._ODRhD{color:#085caf;border-color:#085caf}._-ApPV,._ODRhD{background:rgba(11,110,208,.11)}._-ApPV{color:#0854a1;border-color:#0854a1}._2a-hS{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._uOqlA{position:relative;display:inline-grid}._uOqlA svg{fill:currentColor}._uOqlA ._i-3o1{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._uOqlA ._i-3o1+._Be-O7{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._uOqlA ._i-3o1+._Be-O7._-B-Kg{padding:5px;max-width:36px;min-width:36px}._uOqlA ._i-3o1+._Be-O7._sh8E4{padding:0 16px}._uOqlA ._i-3o1+._Be-O7._rBDRK{padding:0 16px 0 12px}._uOqlA ._i-3o1:hover+._Be-O7{background-color:rgba(50,54,58,.08)}._uOqlA ._i-3o1:disabled+._Be-O7{color:rgba(81,85,89,.4);cursor:not-allowed}._uOqlA ._i-3o1:active+._Be-O7,._uOqlA ._i-3o1:focus:active+._Be-O7{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._uOqlA ._i-3o1:checked+._Be-O7{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._uOqlA ._i-3o1:checked:hover+._Be-O7{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._uOqlA ._i-3o1:checked:disabled+._Be-O7{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._uOqlA ._i-3o1:checked:active+._Be-O7,._uOqlA ._i-3o1:checked:focus:active+._Be-O7{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._8oGxV{display:inline-flex;position:relative}._8oGxV:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._8oGxV>*{flex-shrink:0;flex-grow:0}._zjn4Y{border:none;margin:0;padding:0}._zjn4Y legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._uOqlA ._i-3o1.focus-visible,._uOqlA ._i-3o1:focus-visible{outline:none}._uOqlA ._i-3o1.focus-visible+._Be-O7,._uOqlA ._i-3o1:focus-visible+._Be-O7{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
4
|
+
var styles = {"default":"_ifjem","hovered":"_K5s3J","pressed":"_WiikV","disabled":"_3oPLC","selectedDefault":"_YCWU2","selectedHovered":"_ODRhD","selectedPressed":"_-ApPV","selectedDisabled":"_2a-hS","toggleContainer":"_uOqlA","toggleInput":"_i-3o1","toggleButton":"_Be-O7","iconOnly":"_-B-Kg","text":"_sh8E4","iconText":"_rBDRK","toggleButtonGroup":"_8oGxV","toggleButtonGroupFieldset":"_zjn4Y"};
|
|
5
|
+
var stylesheet="._ifjem{border-color:transparent;background-color:transparent;color:#515559;cursor:pointer}._K5s3J{background-color:rgba(50,54,58,.08)}._WiikV{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._3oPLC{color:rgba(81,85,89,.4);cursor:not-allowed}._YCWU2{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._ODRhD{color:#085caf;border-color:#085caf}._-ApPV,._ODRhD{background:rgba(11,110,208,.11)}._-ApPV{color:#0854a1;border-color:#0854a1}._2a-hS{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._uOqlA{position:relative;display:inline-grid}._uOqlA svg{fill:currentColor}._uOqlA ._i-3o1{-webkit-appearance:none;-moz-appearance:none;appearance:none;grid-column:1;grid-row:1}._uOqlA ._i-3o1+._Be-O7{background-color:transparent;color:#515559;cursor:pointer;border:1px solid transparent;border-radius:4px;grid-column:1;grid-row:1;padding:0;min-width:76px;-webkit-user-select:none;-moz-user-select:none;user-select:none}._uOqlA ._i-3o1+._Be-O7._-B-Kg{padding:5px;max-width:36px;min-width:36px}._uOqlA ._i-3o1+._Be-O7._sh8E4{padding:0 16px}._uOqlA ._i-3o1+._Be-O7._rBDRK{padding:0 16px 0 12px}._uOqlA ._i-3o1:hover+._Be-O7{background-color:rgba(50,54,58,.08)}._uOqlA ._i-3o1:disabled+._Be-O7{color:rgba(81,85,89,.4);cursor:not-allowed}._uOqlA ._i-3o1:active+._Be-O7,._uOqlA ._i-3o1:focus:active+._Be-O7{color:#0b6ed0;background-color:rgba(11,110,208,.08)}._uOqlA ._i-3o1:checked+._Be-O7{background:rgba(11,110,208,.08);color:#0b6ed0;border-color:#0b6ed0}._uOqlA ._i-3o1:checked:hover+._Be-O7{background:rgba(11,110,208,.11);color:#085caf;border-color:#085caf}._uOqlA ._i-3o1:checked:disabled+._Be-O7{background:rgba(11,110,208,.032);color:rgba(11,110,208,.4);border-color:rgba(11,110,208,.4)}._uOqlA ._i-3o1:checked:active+._Be-O7,._uOqlA ._i-3o1:checked:focus:active+._Be-O7{background:rgba(11,110,208,.11);color:#0854a1;border-color:#0854a1}._8oGxV{display:inline-flex;position:relative}._8oGxV:before{content:\"\";border:1px solid #d9d9d9;border-radius:4px;position:absolute;top:0;bottom:0;right:0;left:0}._8oGxV>*{flex-shrink:0;flex-grow:0}._zjn4Y{border:none;margin:0;padding:0}._zjn4Y legend{padding:0;display:block;font-size:14px;margin-bottom:6px;color:#515559}._uOqlA ._i-3o1.focus-visible,._uOqlA ._i-3o1:focus-visible{outline:none}._uOqlA ._i-3o1.focus-visible+._Be-O7,._uOqlA ._i-3o1:focus-visible+._Be-O7{z-index:20;outline:none;box-shadow:0 0 0 2px #fff,0 0 0 4px #0a3f88}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default from 'react';
|
|
3
4
|
import Tooltip$1 from '../../components/Tooltip/Tooltip.js';
|
|
4
5
|
|
|
6
|
+
const _excluded = ["persistentInDom"];
|
|
5
7
|
const Tooltip = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
6
|
-
let
|
|
7
|
-
persistentInDom = true,
|
|
8
|
-
|
|
9
|
-
} = _ref;
|
|
8
|
+
let _ref$persistentInDom = _ref.persistentInDom,
|
|
9
|
+
persistentInDom = _ref$persistentInDom === void 0 ? true : _ref$persistentInDom,
|
|
10
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
10
11
|
return /*#__PURE__*/React__default.createElement(Tooltip$1, _extends({}, props, {
|
|
11
12
|
ref: ref,
|
|
12
13
|
lightTheme: true,
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import _extends from '@babel/runtime-corejs3/helpers/extends';
|
|
2
|
+
import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
|
|
2
3
|
import React__default, { useMemo } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import styles from '../../design-tokens/less/typography.js';
|
|
5
6
|
import { TypographyTypesMapper } from './TypographyTypesMapper.js';
|
|
6
7
|
|
|
8
|
+
const _excluded = ["children", "variant", "fontWeight", "baseStyle"];
|
|
7
9
|
const Typography = /*#__PURE__*/React__default.forwardRef((_ref, ref) => {
|
|
8
|
-
let
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
fontWeight = 'regular',
|
|
12
|
-
baseStyle,
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
10
|
+
let children = _ref.children,
|
|
11
|
+
variant = _ref.variant,
|
|
12
|
+
_ref$fontWeight = _ref.fontWeight,
|
|
13
|
+
fontWeight = _ref$fontWeight === void 0 ? 'regular' : _ref$fontWeight,
|
|
14
|
+
baseStyle = _ref.baseStyle,
|
|
15
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
15
16
|
const Element = useMemo(() => {
|
|
16
17
|
if (TypographyTypesMapper[variant]) {
|
|
17
18
|
return TypographyTypesMapper[variant].target || variant;
|
package/dist/next/index.d.ts
CHANGED
|
@@ -543,7 +543,7 @@ declare interface CustomRegisterProps<V extends Values> {
|
|
|
543
543
|
}
|
|
544
544
|
|
|
545
545
|
export declare const Drawer: {
|
|
546
|
-
({ id, isOpen: externalIsOpen, onIsOpenChange, title, width, zIndex, elementRefToFocusOnClose, containerRef, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestId, children, }: DrawerProps): React_2.ReactPortal | null;
|
|
546
|
+
({ id, isOpen: externalIsOpen, onIsOpenChange, title, hideHeader, width, zIndex, elementRefToFocusOnClose, containerRef, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestId, children, }: DrawerProps): React_2.ReactPortal | null;
|
|
547
547
|
displayName: string;
|
|
548
548
|
};
|
|
549
549
|
|
|
@@ -553,9 +553,13 @@ export declare interface DrawerProps {
|
|
|
553
553
|
/** Handler to be called when component expands or collapses */
|
|
554
554
|
onIsOpenChange: (newIsOpen: boolean) => void;
|
|
555
555
|
/** Header content displayed inside expanded Drawer */
|
|
556
|
-
title
|
|
556
|
+
title?: ReactNode;
|
|
557
557
|
/** The contents of the Drawer */
|
|
558
558
|
children: ReactNode;
|
|
559
|
+
/** Hides the header (title and close button) when true
|
|
560
|
+
* @defaultValue false
|
|
561
|
+
*/
|
|
562
|
+
hideHeader?: boolean;
|
|
559
563
|
/** Id applied to outermost Drawer element */
|
|
560
564
|
id?: string;
|
|
561
565
|
/** Sets the width of the expanded Drawer
|
|
@@ -1235,6 +1239,8 @@ export declare interface SplitButtonOptionProps {
|
|
|
1235
1239
|
* @defaultValue false
|
|
1236
1240
|
*/
|
|
1237
1241
|
isDisabled?: boolean;
|
|
1242
|
+
/** Added to the option element. Use to override the default width. */
|
|
1243
|
+
className?: string;
|
|
1238
1244
|
}
|
|
1239
1245
|
|
|
1240
1246
|
export declare interface SplitButtonProps {
|
|
@@ -1271,6 +1277,10 @@ export declare interface SplitButtonProps {
|
|
|
1271
1277
|
dropdownAriaLabelledBy?: string;
|
|
1272
1278
|
/** The `SplitButtonOption`s. */
|
|
1273
1279
|
children?: React_2.ReactNode;
|
|
1280
|
+
/** Controls the tab order of both buttons. Set to `-1` to remove them from the tab order (useful for grid/roving tabindex patterns).
|
|
1281
|
+
* @defaultValue 0
|
|
1282
|
+
*/
|
|
1283
|
+
tabIndex?: number;
|
|
1274
1284
|
/** Additional props passed to main button.
|
|
1275
1285
|
*
|
|
1276
1286
|
* \* It does not include properties such as `children, kind, disabled, full, small, className, type, onClick`. The usage of these properties may result in undefined behavior. */
|