@sprinklrjs/spaceweb 12.14.4 → 12.33.2
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/ClientOnly.d.ts +6 -0
- package/ClientOnly.js +19 -0
- package/allComponentsAndUtilities.d.ts +4 -1
- package/allComponentsAndUtilities.js +6 -2
- package/asyncSelect/asyncSelect.d.ts +1 -1
- package/asyncSelect/asyncSelect.js +5 -3
- package/asyncSelect/groupedAsyncSelect.d.ts +1 -1
- package/asyncSelect/groupedAsyncSelect.js +5 -2
- package/asyncSelect/helpers.d.ts +3 -2
- package/asyncSelect/helpers.js +4 -2
- package/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +3 -2
- package/asyncSelect/hooks/useAsyncOptionHandlers.js +18 -8
- package/asyncSelect/hooks/useAsyncSelect.js +30 -16
- package/asyncSelect/hooks/useResolveSelectedOptions.d.ts +2 -1
- package/asyncSelect/hooks/useResolveSelectedOptions.js +3 -2
- package/asyncSelect/types.d.ts +1 -6
- package/avatar/avatar.js +19 -15
- package/avatar/styled-component.js +22 -10
- package/avatar/types.d.ts +1 -0
- package/badge/types.d.ts +1 -1
- package/banner/banner.js +3 -2
- package/banner/styled-component.js +1 -1
- package/baseui/accordion/accordion.d.ts +14 -0
- package/baseui/accordion/accordion.js +154 -0
- package/baseui/accordion/constants.d.ts +3 -0
- package/baseui/accordion/constants.js +12 -0
- package/baseui/accordion/index.d.ts +12 -0
- package/baseui/accordion/index.js +28 -0
- package/baseui/accordion/locale.d.ts +9 -0
- package/baseui/accordion/locale.js +7 -0
- package/baseui/accordion/panel.d.ts +17 -0
- package/baseui/accordion/panel.js +111 -0
- package/baseui/accordion/stateful-panel-container.d.ts +18 -0
- package/baseui/accordion/stateful-panel-container.js +44 -0
- package/baseui/accordion/stateful-panel.d.ts +2 -0
- package/baseui/accordion/stateful-panel.js +11 -0
- package/baseui/accordion/stateless-accordion.d.ts +3 -0
- package/baseui/accordion/stateless-accordion.js +59 -0
- package/baseui/accordion/styled-components.d.ts +10 -0
- package/baseui/accordion/styled-components.js +57 -0
- package/baseui/accordion/types.d.ts +143 -0
- package/baseui/accordion/types.js +8 -0
- package/baseui/button/button-internals.d.ts +2 -0
- package/baseui/button/button-internals.js +38 -0
- package/baseui/button/button.d.ts +10 -0
- package/baseui/button/button.js +96 -0
- package/baseui/button/constants.d.ts +18 -0
- package/baseui/button/constants.js +27 -0
- package/baseui/button/default-props.d.ts +9 -0
- package/baseui/button/default-props.js +19 -0
- package/baseui/button/index.d.ts +7 -0
- package/baseui/button/index.js +20 -0
- package/baseui/button/styled-components.d.ts +5 -0
- package/baseui/button/styled-components.js +72 -0
- package/baseui/button/types.d.ts +47 -0
- package/baseui/button/types.js +2 -0
- package/baseui/button/utils.d.ts +2 -0
- package/baseui/button/utils.js +16 -0
- package/baseui/card/styled-components.d.ts +0 -0
- package/baseui/card/styled-components.js +0 -0
- package/baseui/checkbox/checkbox.d.ts +23 -0
- package/baseui/checkbox/checkbox.js +144 -0
- package/baseui/checkbox/constants.d.ts +14 -0
- package/baseui/checkbox/constants.js +26 -0
- package/baseui/checkbox/index.d.ts +6 -0
- package/baseui/checkbox/index.js +31 -0
- package/baseui/checkbox/stateful-checkbox-container.d.ts +15 -0
- package/baseui/checkbox/stateful-checkbox-container.js +80 -0
- package/baseui/checkbox/stateful-checkbox.d.ts +6 -0
- package/baseui/checkbox/stateful-checkbox.js +14 -0
- package/baseui/checkbox/styled-components.d.ts +6 -0
- package/baseui/checkbox/styled-components.js +51 -0
- package/baseui/checkbox/types.d.ts +160 -0
- package/baseui/checkbox/types.js +2 -0
- package/baseui/datepicker/calendar-header.d.ts +61 -0
- package/baseui/datepicker/calendar-header.js +368 -0
- package/baseui/datepicker/calendar.d.ts +56 -0
- package/baseui/datepicker/calendar.js +534 -0
- package/baseui/datepicker/constants.d.ts +30 -0
- package/baseui/datepicker/constants.js +39 -0
- package/baseui/datepicker/day.d.ts +87 -0
- package/baseui/datepicker/day.js +348 -0
- package/baseui/datepicker/index.d.ts +10 -0
- package/baseui/datepicker/index.js +26 -0
- package/baseui/datepicker/locale.d.ts +65 -0
- package/baseui/datepicker/locale.js +35 -0
- package/baseui/datepicker/month.d.ts +32 -0
- package/baseui/datepicker/month.js +91 -0
- package/baseui/datepicker/styled-components.d.ts +25 -0
- package/baseui/datepicker/styled-components.js +287 -0
- package/baseui/datepicker/types.d.ts +354 -0
- package/baseui/datepicker/types.js +2 -0
- package/baseui/datepicker/utils/calendar-header-helpers.d.ts +12 -0
- package/baseui/datepicker/utils/calendar-header-helpers.js +35 -0
- package/baseui/datepicker/utils/date-fns-adapter.d.ts +3 -0
- package/baseui/datepicker/utils/date-fns-adapter.js +13 -0
- package/baseui/datepicker/utils/date-helpers.d.ts +98 -0
- package/baseui/datepicker/utils/date-helpers.js +366 -0
- package/baseui/datepicker/utils/day-state.d.ts +20 -0
- package/baseui/datepicker/utils/day-state.js +34 -0
- package/baseui/datepicker/utils/index.d.ts +67 -0
- package/baseui/datepicker/utils/index.js +81 -0
- package/baseui/datepicker/utils/types.d.ts +69 -0
- package/baseui/datepicker/utils/types.js +2 -0
- package/baseui/datepicker/week.d.ts +21 -0
- package/baseui/datepicker/week.js +61 -0
- package/baseui/header-navigation/constants.d.ts +5 -0
- package/baseui/header-navigation/constants.js +14 -0
- package/baseui/header-navigation/examples-icons.d.ts +1 -0
- package/baseui/header-navigation/examples-icons.js +14 -0
- package/baseui/header-navigation/header-navigation.d.ts +9 -0
- package/baseui/header-navigation/header-navigation.js +29 -0
- package/baseui/header-navigation/index.d.ts +4 -0
- package/baseui/header-navigation/index.js +20 -0
- package/baseui/header-navigation/styled-components.d.ts +3 -0
- package/baseui/header-navigation/styled-components.js +33 -0
- package/baseui/header-navigation/types.d.ts +8 -0
- package/baseui/header-navigation/types.js +2 -0
- package/baseui/helpers/i18n-interpolation.d.ts +3 -0
- package/baseui/helpers/i18n-interpolation.js +17 -0
- package/baseui/helpers/index.d.ts +1 -0
- package/baseui/helpers/index.js +4 -0
- package/baseui/helpers/overrides.d.ts +63 -0
- package/baseui/helpers/overrides.js +171 -0
- package/baseui/helpers/types.d.ts +7 -0
- package/baseui/helpers/types.js +2 -0
- package/baseui/index.d.ts +1 -0
- package/baseui/index.js +12 -0
- package/baseui/input/base-input.d.ts +64 -0
- package/baseui/input/base-input.js +249 -0
- package/baseui/input/constants.d.ts +22 -0
- package/baseui/input/constants.js +31 -0
- package/baseui/input/index.d.ts +8 -0
- package/baseui/input/index.js +28 -0
- package/baseui/input/input.d.ts +33 -0
- package/baseui/input/input.js +100 -0
- package/baseui/input/masked-input.d.ts +8 -0
- package/baseui/input/masked-input.js +56 -0
- package/baseui/input/stateful-container.d.ts +16 -0
- package/baseui/input/stateful-container.js +42 -0
- package/baseui/input/stateful-input.d.ts +2 -0
- package/baseui/input/stateful-input.js +10 -0
- package/baseui/input/styled-components.d.ts +15 -0
- package/baseui/input/styled-components.js +47 -0
- package/baseui/input/types.d.ts +170 -0
- package/baseui/input/types.js +2 -0
- package/baseui/input/utils.d.ts +2 -0
- package/baseui/input/utils.js +21 -0
- package/baseui/layer/constants.d.ts +15 -0
- package/baseui/layer/constants.js +24 -0
- package/baseui/layer/index.d.ts +5 -0
- package/baseui/layer/index.js +20 -0
- package/baseui/layer/layer.d.ts +2 -0
- package/baseui/layer/layer.js +162 -0
- package/baseui/layer/layers-manager.d.ts +28 -0
- package/baseui/layer/layers-manager.js +171 -0
- package/baseui/layer/tether.d.ts +30 -0
- package/baseui/layer/tether.js +163 -0
- package/baseui/layer/types.d.ts +148 -0
- package/baseui/layer/types.js +2 -0
- package/baseui/layer/utils.d.ts +6 -0
- package/baseui/layer/utils.js +17 -0
- package/baseui/locale/en_US.d.ts +3 -0
- package/baseui/locale/en_US.js +26 -0
- package/baseui/locale/es_AR.d.ts +3 -0
- package/baseui/locale/es_AR.js +128 -0
- package/baseui/locale/index.d.ts +26 -0
- package/baseui/locale/index.js +26 -0
- package/baseui/locale/tr_TR.d.ts +3 -0
- package/baseui/locale/tr_TR.js +124 -0
- package/baseui/locale/types.d.ts +10 -0
- package/baseui/locale/types.js +2 -0
- package/baseui/menu/constants.d.ts +27 -0
- package/baseui/menu/constants.js +36 -0
- package/baseui/menu/index.d.ts +1 -0
- package/baseui/menu/index.js +10 -0
- package/baseui/menu/styled-components.d.ts +0 -0
- package/baseui/menu/styled-components.js +0 -0
- package/baseui/menu/types.d.ts +284 -0
- package/baseui/menu/types.js +2 -0
- package/baseui/modal/close-icon.d.ts +1 -0
- package/baseui/modal/close-icon.js +10 -0
- package/baseui/modal/constants.d.ts +19 -0
- package/baseui/modal/constants.js +28 -0
- package/baseui/modal/focus-once.d.ts +10 -0
- package/baseui/modal/focus-once.js +21 -0
- package/baseui/modal/index.d.ts +7 -0
- package/baseui/modal/index.js +26 -0
- package/baseui/modal/locale.d.ts +7 -0
- package/baseui/modal/locale.js +6 -0
- package/baseui/modal/modal-button.d.ts +5 -0
- package/baseui/modal/modal-button.js +34 -0
- package/baseui/modal/modal.d.ts +41 -0
- package/baseui/modal/modal.js +239 -0
- package/baseui/modal/styled-components.d.ts +5 -0
- package/baseui/modal/styled-components.js +75 -0
- package/baseui/modal/types.d.ts +74 -0
- package/baseui/modal/types.js +2 -0
- package/baseui/package.json +4 -0
- package/baseui/payment-card/custom-cards.config.d.ts +11 -0
- package/baseui/payment-card/custom-cards.config.js +24 -0
- package/baseui/payment-card/icons/amex.d.ts +4 -0
- package/baseui/payment-card/icons/amex.js +9 -0
- package/baseui/payment-card/icons/dinersclub.d.ts +4 -0
- package/baseui/payment-card/icons/dinersclub.js +9 -0
- package/baseui/payment-card/icons/discover.d.ts +4 -0
- package/baseui/payment-card/icons/discover.js +9 -0
- package/baseui/payment-card/icons/elo.d.ts +4 -0
- package/baseui/payment-card/icons/elo.js +9 -0
- package/baseui/payment-card/icons/generic.d.ts +4 -0
- package/baseui/payment-card/icons/generic.js +9 -0
- package/baseui/payment-card/icons/jcb.d.ts +4 -0
- package/baseui/payment-card/icons/jcb.js +9 -0
- package/baseui/payment-card/icons/maestro.d.ts +4 -0
- package/baseui/payment-card/icons/maestro.js +9 -0
- package/baseui/payment-card/icons/mastercard.d.ts +4 -0
- package/baseui/payment-card/icons/mastercard.js +9 -0
- package/baseui/payment-card/icons/uatp.d.ts +4 -0
- package/baseui/payment-card/icons/uatp.js +9 -0
- package/baseui/payment-card/icons/unionpay.d.ts +4 -0
- package/baseui/payment-card/icons/unionpay.js +9 -0
- package/baseui/payment-card/icons/visa.d.ts +4 -0
- package/baseui/payment-card/icons/visa.js +9 -0
- package/baseui/payment-card/index.d.ts +7 -0
- package/baseui/payment-card/index.js +24 -0
- package/baseui/payment-card/payment-card.d.ts +24 -0
- package/baseui/payment-card/payment-card.js +113 -0
- package/baseui/payment-card/stateful-payment-card.d.ts +2 -0
- package/baseui/payment-card/stateful-payment-card.js +10 -0
- package/baseui/payment-card/styled-components.d.ts +1 -0
- package/baseui/payment-card/styled-components.js +12 -0
- package/baseui/payment-card/types.d.ts +11 -0
- package/baseui/payment-card/types.js +2 -0
- package/baseui/payment-card/utils.d.ts +3 -0
- package/baseui/payment-card/utils.js +50 -0
- package/baseui/popover/constants.d.ts +45 -0
- package/baseui/popover/constants.js +54 -0
- package/baseui/popover/default-props.d.ts +3 -0
- package/baseui/popover/default-props.js +26 -0
- package/baseui/popover/index.d.ts +6 -0
- package/baseui/popover/index.js +32 -0
- package/baseui/popover/popover.d.ts +15 -0
- package/baseui/popover/popover.js +370 -0
- package/baseui/popover/stateful-container.d.ts +32 -0
- package/baseui/popover/stateful-container.js +174 -0
- package/baseui/popover/stateful-popover.d.ts +19 -0
- package/baseui/popover/stateful-popover.js +27 -0
- package/baseui/popover/styled-components.d.ts +27 -0
- package/baseui/popover/styled-components.js +74 -0
- package/baseui/popover/types.d.ts +165 -0
- package/baseui/popover/types.js +2 -0
- package/baseui/popover/utils.d.ts +47 -0
- package/baseui/popover/utils.js +127 -0
- package/baseui/progress-bar/styled-components.d.ts +0 -0
- package/baseui/progress-bar/styled-components.js +0 -0
- package/baseui/radio/constants.d.ts +7 -0
- package/baseui/radio/constants.js +18 -0
- package/baseui/radio/index.d.ts +7 -0
- package/baseui/radio/index.js +30 -0
- package/baseui/radio/radio.d.ts +33 -0
- package/baseui/radio/radio.js +106 -0
- package/baseui/radio/radiogroup.d.ts +14 -0
- package/baseui/radio/radiogroup.js +84 -0
- package/baseui/radio/stateful-radiogroup-container.d.ts +11 -0
- package/baseui/radio/stateful-radiogroup-container.js +58 -0
- package/baseui/radio/stateful-radiogroup.d.ts +6 -0
- package/baseui/radio/stateful-radiogroup.js +15 -0
- package/baseui/radio/styled-components.d.ts +7 -0
- package/baseui/radio/styled-components.js +53 -0
- package/baseui/radio/types.d.ts +169 -0
- package/baseui/radio/types.js +2 -0
- package/baseui/select/autosize-input.d.ts +24 -0
- package/baseui/select/autosize-input.js +67 -0
- package/baseui/select/constants.d.ts +13 -0
- package/baseui/select/constants.js +23 -0
- package/baseui/select/default-props.d.ts +72 -0
- package/baseui/select/default-props.js +66 -0
- package/baseui/select/dropdown.d.ts +21 -0
- package/baseui/select/dropdown.js +138 -0
- package/baseui/select/index.d.ts +19 -0
- package/baseui/select/index.js +47 -0
- package/baseui/select/locale.d.ts +8 -0
- package/baseui/select/locale.js +10 -0
- package/baseui/select/multi-select.d.ts +3 -0
- package/baseui/select/multi-select.js +10 -0
- package/baseui/select/multi-value.d.ts +1 -0
- package/baseui/select/multi-value.js +12 -0
- package/baseui/select/select-component.d.ts +179 -0
- package/baseui/select/select-component.js +849 -0
- package/baseui/select/select.d.ts +4 -0
- package/baseui/select/select.js +11 -0
- package/baseui/select/single-select.d.ts +3 -0
- package/baseui/select/single-select.js +10 -0
- package/baseui/select/stateful-select-container.d.ts +19 -0
- package/baseui/select/stateful-select-container.js +48 -0
- package/baseui/select/stateful-select.d.ts +76 -0
- package/baseui/select/stateful-select.js +12 -0
- package/baseui/select/styled-components.d.ts +16 -0
- package/baseui/select/styled-components.js +98 -0
- package/baseui/select/types.d.ts +290 -0
- package/baseui/select/types.js +2 -0
- package/baseui/select/utils/default-filter-options.d.ts +23 -0
- package/baseui/select/utils/default-filter-options.js +54 -0
- package/baseui/select/utils/index.d.ts +3 -0
- package/baseui/select/utils/index.js +39 -0
- package/baseui/select/value.d.ts +1 -0
- package/baseui/select/value.js +13 -0
- package/baseui/slider/constants.d.ts +4 -0
- package/baseui/slider/constants.js +13 -0
- package/baseui/slider/index.d.ts +8 -0
- package/baseui/slider/index.js +22 -0
- package/baseui/slider/slider.d.ts +3 -0
- package/baseui/slider/slider.js +100 -0
- package/baseui/slider/stateful-slider-container.d.ts +23 -0
- package/baseui/slider/stateful-slider-container.js +59 -0
- package/baseui/slider/stateful-slider.d.ts +2 -0
- package/baseui/slider/stateful-slider.js +10 -0
- package/baseui/slider/styled-components.d.ts +9 -0
- package/baseui/slider/styled-components.js +58 -0
- package/baseui/slider/types.d.ts +74 -0
- package/baseui/slider/types.js +2 -0
- package/baseui/spinner/styled-components.d.ts +0 -0
- package/baseui/spinner/styled-components.js +0 -0
- package/baseui/table-semantic/constants.d.ts +11 -0
- package/baseui/table-semantic/constants.js +20 -0
- package/baseui/table-semantic/index.d.ts +4 -0
- package/baseui/table-semantic/index.js +29 -0
- package/baseui/table-semantic/styled-components.d.ts +11 -0
- package/baseui/table-semantic/styled-components.js +42 -0
- package/baseui/table-semantic/table-builder-column.d.ts +4 -0
- package/baseui/table-semantic/table-builder-column.js +18 -0
- package/baseui/table-semantic/table-builder.d.ts +17 -0
- package/baseui/table-semantic/table-builder.js +81 -0
- package/baseui/table-semantic/table.d.ts +10 -0
- package/baseui/table-semantic/table.js +45 -0
- package/baseui/table-semantic/types.d.ts +66 -0
- package/baseui/table-semantic/types.js +2 -0
- package/baseui/textarea/constants.d.ts +1 -0
- package/baseui/textarea/constants.js +13 -0
- package/baseui/textarea/index.d.ts +6 -0
- package/baseui/textarea/index.js +24 -0
- package/baseui/textarea/stateful-container.d.ts +2 -0
- package/baseui/textarea/stateful-container.js +10 -0
- package/baseui/textarea/stateful-textarea.d.ts +2 -0
- package/baseui/textarea/stateful-textarea.js +12 -0
- package/baseui/textarea/styled-components.d.ts +3 -0
- package/baseui/textarea/styled-components.js +19 -0
- package/baseui/textarea/textarea.d.ts +32 -0
- package/baseui/textarea/textarea.js +63 -0
- package/baseui/textarea/types.d.ts +44 -0
- package/baseui/textarea/types.js +2 -0
- package/baseui/timepicker/index.d.ts +2 -0
- package/baseui/timepicker/index.js +14 -0
- package/baseui/timepicker/timepicker.d.ts +34 -0
- package/baseui/timepicker/timepicker.js +260 -0
- package/baseui/timepicker/types.d.ts +54 -0
- package/baseui/timepicker/types.js +2 -0
- package/baseui/tooltip/constants.d.ts +1 -0
- package/baseui/tooltip/constants.js +14 -0
- package/baseui/tooltip/default-props.d.ts +3 -0
- package/baseui/tooltip/default-props.js +24 -0
- package/baseui/tooltip/index.d.ts +6 -0
- package/baseui/tooltip/index.js +29 -0
- package/baseui/tooltip/stateful-tooltip-container.d.ts +7 -0
- package/baseui/tooltip/stateful-tooltip-container.js +25 -0
- package/baseui/tooltip/stateful-tooltip.d.ts +6 -0
- package/baseui/tooltip/stateful-tooltip.js +12 -0
- package/baseui/tooltip/styled-components.d.ts +14 -0
- package/baseui/tooltip/styled-components.js +33 -0
- package/baseui/tooltip/tooltip.d.ts +7 -0
- package/baseui/tooltip/tooltip.js +33 -0
- package/baseui/tooltip/types.d.ts +8 -0
- package/baseui/tooltip/types.js +2 -0
- package/baseui/tree-view/index.d.ts +11 -0
- package/baseui/tree-view/index.js +20 -0
- package/baseui/tree-view/stateful-container.d.ts +11 -0
- package/baseui/tree-view/stateful-container.js +70 -0
- package/baseui/tree-view/stateful-tree-view.d.ts +2 -0
- package/baseui/tree-view/stateful-tree-view.js +10 -0
- package/baseui/tree-view/styled-components.d.ts +6 -0
- package/baseui/tree-view/styled-components.js +41 -0
- package/baseui/tree-view/tree-label-interactable.d.ts +8 -0
- package/baseui/tree-view/tree-label-interactable.js +20 -0
- package/baseui/tree-view/tree-label.d.ts +4 -0
- package/baseui/tree-view/tree-label.js +28 -0
- package/baseui/tree-view/tree-node.d.ts +11 -0
- package/baseui/tree-view/tree-node.js +54 -0
- package/baseui/tree-view/tree-view.d.ts +2 -0
- package/baseui/tree-view/tree-view.js +129 -0
- package/baseui/tree-view/types.d.ts +67 -0
- package/baseui/tree-view/types.js +2 -0
- package/baseui/tree-view/utils.d.ts +11 -0
- package/baseui/tree-view/utils.js +194 -0
- package/baseui/utils/create-event.d.ts +1 -0
- package/baseui/utils/create-event.js +14 -0
- package/baseui/utils/deep-merge.d.ts +1 -0
- package/baseui/utils/deep-merge.js +40 -0
- package/baseui/utils/focusVisible.d.ts +10 -0
- package/baseui/utils/focusVisible.js +169 -0
- package/baseui/utils/index.d.ts +0 -0
- package/baseui/utils/index.js +0 -0
- package/baseui/utils/react-18.d.ts +1 -0
- package/baseui/utils/react-18.js +14 -0
- package/breadcrumb/breadcrumb-item.d.ts +1 -2
- package/breadcrumb/breadcrumb.d.ts +1 -2
- package/breadcrumb/styled-components.d.ts +1 -2
- package/button/Button.d.ts +4 -3
- package/button/Button.js +25 -15
- package/button/IconButton/IconButton.js +7 -1
- package/button/IconButton/styled-components.d.ts +1 -0
- package/button/IconButton/styled-components.js +46 -13
- package/button/IconTextButton/IconTextButton.d.ts +1 -1
- package/button/IconTextButton/types.d.ts +1 -1
- package/button/basewebAdapter.d.ts +8 -7
- package/button/basewebAdapter.js +1 -1
- package/button/index.d.ts +1 -1
- package/button/index.js +1 -1
- package/button/styled-components.d.ts +27 -2
- package/button/styled-components.js +314 -47
- package/button/types.d.ts +8 -5
- package/button-group/styled-components.js +4 -5
- package/checkbox/basewebAdapters.d.ts +1 -1
- package/checkbox/basewebAdapters.js +31 -27
- package/checkbox/checkbox.js +1 -1
- package/checkbox/index.d.ts +3 -3
- package/checkbox/index.js +2 -2
- package/checkbox/styled-components.js +52 -15
- package/checkbox/types.d.ts +4 -3
- package/color-picker/ColorPalette.d.ts +2 -2
- package/color-picker/ColorPalette.js +7 -6
- package/color-picker/ColorPicker.d.ts +1 -1
- package/color-picker/ColorPicker.js +41 -6
- package/color-picker/ColorSelector.d.ts +6 -0
- package/color-picker/ColorSelector.js +33 -0
- package/color-picker/CustomColorSelector.d.ts +3 -0
- package/color-picker/CustomColorSelector.js +41 -0
- package/color-picker/GradientColorPicker.d.ts +6 -0
- package/color-picker/GradientColorPicker.js +68 -0
- package/color-picker/Swatch.js +3 -5
- package/color-picker/colors.d.ts +2 -0
- package/color-picker/colors.js +26 -1
- package/color-picker/constants.d.ts +13 -0
- package/color-picker/constants.js +12 -0
- package/color-picker/locale.d.ts +4 -0
- package/color-picker/types.d.ts +50 -1
- package/color-picker/utils.d.ts +17 -0
- package/color-picker/utils.js +39 -0
- package/date-input/DateInput.d.ts +1 -1
- package/date-input/DateInput.js +96 -85
- package/date-input/constants.d.ts +28 -0
- package/date-input/constants.js +31 -0
- package/date-input/index.d.ts +1 -0
- package/date-input/index.js +3 -1
- package/date-input/types.d.ts +13 -4
- package/date-input/utils.d.ts +2 -0
- package/date-input/utils.js +77 -0
- package/date-picker/Calendar.d.ts +4 -9
- package/date-picker/Calendar.js +112 -121
- package/date-picker/DateInput.d.ts +2 -2
- package/date-picker/DateInput.js +29 -45
- package/date-picker/DatePickerContent.js +8 -27
- package/date-picker/DateTimeContainer.d.ts +2 -2
- package/date-picker/DateTimeContainer.js +16 -10
- package/date-picker/StatelessDatePicker.js +5 -17
- package/date-picker/TimeInput.d.ts +2 -2
- package/date-picker/TimeInput.js +1 -1
- package/date-picker/index.d.ts +1 -1
- package/date-picker/index.js +1 -1
- package/date-picker/stateful-container.d.ts +1 -1
- package/date-picker/stateful-container.js +1 -1
- package/date-picker/styled-components.js +9 -6
- package/date-picker/types.d.ts +2 -1
- package/date-picker/utils.d.ts +2 -2
- package/date-picker/utils.js +3 -3
- package/esm/ClientOnly.d.ts +6 -0
- package/esm/ClientOnly.js +15 -0
- package/esm/allComponentsAndUtilities.d.ts +4 -1
- package/esm/allComponentsAndUtilities.js +8 -2
- package/esm/asyncSelect/asyncSelect.d.ts +1 -1
- package/esm/asyncSelect/asyncSelect.js +6 -4
- package/esm/asyncSelect/groupedAsyncSelect.d.ts +1 -1
- package/esm/asyncSelect/groupedAsyncSelect.js +5 -2
- package/esm/asyncSelect/helpers.d.ts +3 -2
- package/esm/asyncSelect/helpers.js +4 -2
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.d.ts +3 -2
- package/esm/asyncSelect/hooks/useAsyncOptionHandlers.js +19 -9
- package/esm/asyncSelect/hooks/useAsyncSelect.js +30 -16
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.d.ts +2 -1
- package/esm/asyncSelect/hooks/useResolveSelectedOptions.js +3 -2
- package/esm/asyncSelect/types.d.ts +1 -6
- package/esm/avatar/avatar.js +19 -15
- package/esm/avatar/styled-component.js +22 -10
- package/esm/avatar/types.d.ts +1 -0
- package/esm/badge/types.d.ts +1 -1
- package/esm/banner/banner.js +3 -2
- package/esm/banner/styled-component.js +1 -1
- package/esm/baseui/accordion/accordion.d.ts +14 -0
- package/esm/baseui/accordion/accordion.js +152 -0
- package/esm/baseui/accordion/constants.d.ts +3 -0
- package/esm/baseui/accordion/constants.js +9 -0
- package/esm/baseui/accordion/index.d.ts +12 -0
- package/esm/baseui/accordion/index.js +11 -0
- package/esm/baseui/accordion/locale.d.ts +9 -0
- package/esm/baseui/accordion/locale.js +5 -0
- package/esm/baseui/accordion/panel.d.ts +17 -0
- package/esm/baseui/accordion/panel.js +109 -0
- package/esm/baseui/accordion/stateful-panel-container.d.ts +18 -0
- package/esm/baseui/accordion/stateful-panel-container.js +42 -0
- package/esm/baseui/accordion/stateful-panel.d.ts +2 -0
- package/esm/baseui/accordion/stateful-panel.js +8 -0
- package/esm/baseui/accordion/stateless-accordion.d.ts +3 -0
- package/esm/baseui/accordion/stateless-accordion.js +57 -0
- package/esm/baseui/accordion/styled-components.d.ts +10 -0
- package/esm/baseui/accordion/styled-components.js +54 -0
- package/esm/baseui/accordion/types.d.ts +143 -0
- package/esm/baseui/accordion/types.js +7 -0
- package/esm/baseui/button/button-internals.d.ts +2 -0
- package/esm/baseui/button/button-internals.js +35 -0
- package/esm/baseui/button/button.d.ts +10 -0
- package/esm/baseui/button/button.js +94 -0
- package/esm/baseui/button/constants.d.ts +18 -0
- package/esm/baseui/button/constants.js +24 -0
- package/esm/baseui/button/default-props.d.ts +9 -0
- package/esm/baseui/button/default-props.js +16 -0
- package/esm/baseui/button/index.d.ts +7 -0
- package/esm/baseui/button/index.js +7 -0
- package/esm/baseui/button/styled-components.d.ts +5 -0
- package/esm/baseui/button/styled-components.js +69 -0
- package/esm/baseui/button/types.d.ts +47 -0
- package/esm/baseui/button/types.js +1 -0
- package/esm/baseui/button/utils.d.ts +2 -0
- package/esm/baseui/button/utils.js +12 -0
- package/esm/baseui/card/styled-components.d.ts +0 -0
- package/esm/baseui/card/styled-components.js +0 -0
- package/esm/baseui/checkbox/checkbox.d.ts +23 -0
- package/esm/baseui/checkbox/checkbox.js +142 -0
- package/esm/baseui/checkbox/constants.d.ts +14 -0
- package/esm/baseui/checkbox/constants.js +23 -0
- package/esm/baseui/checkbox/index.d.ts +6 -0
- package/esm/baseui/checkbox/index.js +15 -0
- package/esm/baseui/checkbox/stateful-checkbox-container.d.ts +15 -0
- package/esm/baseui/checkbox/stateful-checkbox-container.js +78 -0
- package/esm/baseui/checkbox/stateful-checkbox.d.ts +6 -0
- package/esm/baseui/checkbox/stateful-checkbox.js +12 -0
- package/esm/baseui/checkbox/styled-components.d.ts +6 -0
- package/esm/baseui/checkbox/styled-components.js +48 -0
- package/esm/baseui/checkbox/types.d.ts +160 -0
- package/esm/baseui/checkbox/types.js +1 -0
- package/esm/baseui/datepicker/calendar-header.d.ts +61 -0
- package/esm/baseui/datepicker/calendar-header.js +366 -0
- package/esm/baseui/datepicker/calendar.d.ts +56 -0
- package/esm/baseui/datepicker/calendar.js +532 -0
- package/esm/baseui/datepicker/constants.d.ts +30 -0
- package/esm/baseui/datepicker/constants.js +36 -0
- package/esm/baseui/datepicker/day.d.ts +87 -0
- package/esm/baseui/datepicker/day.js +346 -0
- package/esm/baseui/datepicker/index.d.ts +10 -0
- package/esm/baseui/datepicker/index.js +16 -0
- package/esm/baseui/datepicker/locale.d.ts +65 -0
- package/esm/baseui/datepicker/locale.js +33 -0
- package/esm/baseui/datepicker/month.d.ts +32 -0
- package/esm/baseui/datepicker/month.js +89 -0
- package/esm/baseui/datepicker/styled-components.d.ts +25 -0
- package/esm/baseui/datepicker/styled-components.js +284 -0
- package/esm/baseui/datepicker/types.d.ts +354 -0
- package/esm/baseui/datepicker/types.js +1 -0
- package/esm/baseui/datepicker/utils/calendar-header-helpers.d.ts +12 -0
- package/esm/baseui/datepicker/utils/calendar-header-helpers.js +30 -0
- package/esm/baseui/datepicker/utils/date-fns-adapter.d.ts +3 -0
- package/esm/baseui/datepicker/utils/date-fns-adapter.js +10 -0
- package/esm/baseui/datepicker/utils/date-helpers.d.ts +98 -0
- package/esm/baseui/datepicker/utils/date-helpers.js +364 -0
- package/esm/baseui/datepicker/utils/day-state.d.ts +20 -0
- package/esm/baseui/datepicker/utils/day-state.js +31 -0
- package/esm/baseui/datepicker/utils/index.d.ts +67 -0
- package/esm/baseui/datepicker/utils/index.js +76 -0
- package/esm/baseui/datepicker/utils/types.d.ts +69 -0
- package/esm/baseui/datepicker/utils/types.js +1 -0
- package/esm/baseui/datepicker/week.d.ts +21 -0
- package/esm/baseui/datepicker/week.js +59 -0
- package/esm/baseui/header-navigation/constants.d.ts +5 -0
- package/esm/baseui/header-navigation/constants.js +11 -0
- package/esm/baseui/header-navigation/examples-icons.d.ts +1 -0
- package/esm/baseui/header-navigation/examples-icons.js +10 -0
- package/esm/baseui/header-navigation/header-navigation.d.ts +9 -0
- package/esm/baseui/header-navigation/header-navigation.js +27 -0
- package/esm/baseui/header-navigation/index.d.ts +4 -0
- package/esm/baseui/header-navigation/index.js +11 -0
- package/esm/baseui/header-navigation/styled-components.d.ts +3 -0
- package/esm/baseui/header-navigation/styled-components.js +30 -0
- package/esm/baseui/header-navigation/types.d.ts +8 -0
- package/esm/baseui/header-navigation/types.js +1 -0
- package/esm/baseui/helpers/i18n-interpolation.d.ts +3 -0
- package/esm/baseui/helpers/i18n-interpolation.js +14 -0
- package/esm/baseui/helpers/index.d.ts +1 -0
- package/esm/baseui/helpers/index.js +1 -0
- package/esm/baseui/helpers/overrides.d.ts +63 -0
- package/esm/baseui/helpers/overrides.js +160 -0
- package/esm/baseui/helpers/types.d.ts +7 -0
- package/esm/baseui/helpers/types.js +1 -0
- package/esm/baseui/index.d.ts +1 -0
- package/esm/baseui/index.js +7 -0
- package/esm/baseui/input/base-input.d.ts +64 -0
- package/esm/baseui/input/base-input.js +247 -0
- package/esm/baseui/input/constants.d.ts +22 -0
- package/esm/baseui/input/constants.js +28 -0
- package/esm/baseui/input/index.d.ts +8 -0
- package/esm/baseui/input/index.js +9 -0
- package/esm/baseui/input/input.d.ts +33 -0
- package/esm/baseui/input/input.js +96 -0
- package/esm/baseui/input/masked-input.d.ts +8 -0
- package/esm/baseui/input/masked-input.js +53 -0
- package/esm/baseui/input/stateful-container.d.ts +16 -0
- package/esm/baseui/input/stateful-container.js +40 -0
- package/esm/baseui/input/stateful-input.d.ts +2 -0
- package/esm/baseui/input/stateful-input.js +7 -0
- package/esm/baseui/input/styled-components.d.ts +15 -0
- package/esm/baseui/input/styled-components.js +41 -0
- package/esm/baseui/input/types.d.ts +170 -0
- package/esm/baseui/input/types.js +1 -0
- package/esm/baseui/input/utils.d.ts +2 -0
- package/esm/baseui/input/utils.js +17 -0
- package/esm/baseui/layer/constants.d.ts +15 -0
- package/esm/baseui/layer/constants.js +21 -0
- package/esm/baseui/layer/index.d.ts +5 -0
- package/esm/baseui/layer/index.js +11 -0
- package/esm/baseui/layer/layer.d.ts +2 -0
- package/esm/baseui/layer/layer.js +159 -0
- package/esm/baseui/layer/layers-manager.d.ts +28 -0
- package/esm/baseui/layer/layers-manager.js +168 -0
- package/esm/baseui/layer/tether.d.ts +30 -0
- package/esm/baseui/layer/tether.js +161 -0
- package/esm/baseui/layer/types.d.ts +148 -0
- package/esm/baseui/layer/types.js +1 -0
- package/esm/baseui/layer/utils.d.ts +6 -0
- package/esm/baseui/layer/utils.js +12 -0
- package/esm/baseui/locale/en_US.d.ts +3 -0
- package/esm/baseui/locale/en_US.js +23 -0
- package/esm/baseui/locale/es_AR.d.ts +3 -0
- package/esm/baseui/locale/es_AR.js +126 -0
- package/esm/baseui/locale/index.d.ts +26 -0
- package/esm/baseui/locale/index.js +23 -0
- package/esm/baseui/locale/tr_TR.d.ts +3 -0
- package/esm/baseui/locale/tr_TR.js +122 -0
- package/esm/baseui/locale/types.d.ts +10 -0
- package/esm/baseui/locale/types.js +1 -0
- package/esm/baseui/menu/constants.d.ts +27 -0
- package/esm/baseui/menu/constants.js +33 -0
- package/esm/baseui/menu/index.d.ts +1 -0
- package/esm/baseui/menu/index.js +7 -0
- package/esm/baseui/menu/styled-components.d.ts +0 -0
- package/esm/baseui/menu/styled-components.js +0 -0
- package/esm/baseui/menu/types.d.ts +284 -0
- package/esm/baseui/menu/types.js +1 -0
- package/esm/baseui/modal/close-icon.d.ts +1 -0
- package/esm/baseui/modal/close-icon.js +6 -0
- package/esm/baseui/modal/constants.d.ts +19 -0
- package/esm/baseui/modal/constants.js +25 -0
- package/esm/baseui/modal/focus-once.d.ts +10 -0
- package/esm/baseui/modal/focus-once.js +18 -0
- package/esm/baseui/modal/index.d.ts +7 -0
- package/esm/baseui/modal/index.js +12 -0
- package/esm/baseui/modal/locale.d.ts +7 -0
- package/esm/baseui/modal/locale.js +4 -0
- package/esm/baseui/modal/modal-button.d.ts +5 -0
- package/esm/baseui/modal/modal-button.js +32 -0
- package/esm/baseui/modal/modal.d.ts +41 -0
- package/esm/baseui/modal/modal.js +237 -0
- package/esm/baseui/modal/styled-components.d.ts +5 -0
- package/esm/baseui/modal/styled-components.js +72 -0
- package/esm/baseui/modal/types.d.ts +74 -0
- package/esm/baseui/modal/types.js +1 -0
- package/esm/baseui/payment-card/custom-cards.config.d.ts +11 -0
- package/esm/baseui/payment-card/custom-cards.config.js +21 -0
- package/esm/baseui/payment-card/icons/amex.d.ts +4 -0
- package/esm/baseui/payment-card/icons/amex.js +7 -0
- package/esm/baseui/payment-card/icons/dinersclub.d.ts +4 -0
- package/esm/baseui/payment-card/icons/dinersclub.js +7 -0
- package/esm/baseui/payment-card/icons/discover.d.ts +4 -0
- package/esm/baseui/payment-card/icons/discover.js +7 -0
- package/esm/baseui/payment-card/icons/elo.d.ts +4 -0
- package/esm/baseui/payment-card/icons/elo.js +7 -0
- package/esm/baseui/payment-card/icons/generic.d.ts +4 -0
- package/esm/baseui/payment-card/icons/generic.js +7 -0
- package/esm/baseui/payment-card/icons/jcb.d.ts +4 -0
- package/esm/baseui/payment-card/icons/jcb.js +7 -0
- package/esm/baseui/payment-card/icons/maestro.d.ts +4 -0
- package/esm/baseui/payment-card/icons/maestro.js +7 -0
- package/esm/baseui/payment-card/icons/mastercard.d.ts +4 -0
- package/esm/baseui/payment-card/icons/mastercard.js +7 -0
- package/esm/baseui/payment-card/icons/uatp.d.ts +4 -0
- package/esm/baseui/payment-card/icons/uatp.js +7 -0
- package/esm/baseui/payment-card/icons/unionpay.d.ts +4 -0
- package/esm/baseui/payment-card/icons/unionpay.js +7 -0
- package/esm/baseui/payment-card/icons/visa.d.ts +4 -0
- package/esm/baseui/payment-card/icons/visa.js +7 -0
- package/esm/baseui/payment-card/index.d.ts +7 -0
- package/esm/baseui/payment-card/index.js +14 -0
- package/esm/baseui/payment-card/payment-card.d.ts +24 -0
- package/esm/baseui/payment-card/payment-card.js +111 -0
- package/esm/baseui/payment-card/stateful-payment-card.d.ts +2 -0
- package/esm/baseui/payment-card/stateful-payment-card.js +7 -0
- package/esm/baseui/payment-card/styled-components.d.ts +1 -0
- package/esm/baseui/payment-card/styled-components.js +9 -0
- package/esm/baseui/payment-card/types.d.ts +11 -0
- package/esm/baseui/payment-card/types.js +1 -0
- package/esm/baseui/payment-card/utils.d.ts +3 -0
- package/esm/baseui/payment-card/utils.js +43 -0
- package/esm/baseui/popover/constants.d.ts +45 -0
- package/esm/baseui/popover/constants.js +51 -0
- package/esm/baseui/popover/default-props.d.ts +3 -0
- package/esm/baseui/popover/default-props.js +24 -0
- package/esm/baseui/popover/index.d.ts +6 -0
- package/esm/baseui/popover/index.js +15 -0
- package/esm/baseui/popover/popover.d.ts +15 -0
- package/esm/baseui/popover/popover.js +368 -0
- package/esm/baseui/popover/stateful-container.d.ts +32 -0
- package/esm/baseui/popover/stateful-container.js +172 -0
- package/esm/baseui/popover/stateful-popover.d.ts +19 -0
- package/esm/baseui/popover/stateful-popover.js +25 -0
- package/esm/baseui/popover/styled-components.d.ts +27 -0
- package/esm/baseui/popover/styled-components.js +68 -0
- package/esm/baseui/popover/types.d.ts +165 -0
- package/esm/baseui/popover/types.js +1 -0
- package/esm/baseui/popover/utils.d.ts +47 -0
- package/esm/baseui/popover/utils.js +115 -0
- package/esm/baseui/progress-bar/styled-components.d.ts +0 -0
- package/esm/baseui/progress-bar/styled-components.js +0 -0
- package/esm/baseui/radio/constants.d.ts +7 -0
- package/esm/baseui/radio/constants.js +15 -0
- package/esm/baseui/radio/index.d.ts +7 -0
- package/esm/baseui/radio/index.js +14 -0
- package/esm/baseui/radio/radio.d.ts +33 -0
- package/esm/baseui/radio/radio.js +104 -0
- package/esm/baseui/radio/radiogroup.d.ts +14 -0
- package/esm/baseui/radio/radiogroup.js +82 -0
- package/esm/baseui/radio/stateful-radiogroup-container.d.ts +11 -0
- package/esm/baseui/radio/stateful-radiogroup-container.js +56 -0
- package/esm/baseui/radio/stateful-radiogroup.d.ts +6 -0
- package/esm/baseui/radio/stateful-radiogroup.js +13 -0
- package/esm/baseui/radio/styled-components.d.ts +7 -0
- package/esm/baseui/radio/styled-components.js +50 -0
- package/esm/baseui/radio/types.d.ts +169 -0
- package/esm/baseui/radio/types.js +1 -0
- package/esm/baseui/select/autosize-input.d.ts +24 -0
- package/esm/baseui/select/autosize-input.js +65 -0
- package/esm/baseui/select/constants.d.ts +13 -0
- package/esm/baseui/select/constants.js +19 -0
- package/esm/baseui/select/default-props.d.ts +72 -0
- package/esm/baseui/select/default-props.js +63 -0
- package/esm/baseui/select/dropdown.d.ts +21 -0
- package/esm/baseui/select/dropdown.js +136 -0
- package/esm/baseui/select/index.d.ts +19 -0
- package/esm/baseui/select/index.js +14 -0
- package/esm/baseui/select/locale.d.ts +8 -0
- package/esm/baseui/select/locale.js +8 -0
- package/esm/baseui/select/multi-select.d.ts +3 -0
- package/esm/baseui/select/multi-select.js +8 -0
- package/esm/baseui/select/multi-value.d.ts +1 -0
- package/esm/baseui/select/multi-value.js +9 -0
- package/esm/baseui/select/select-component.d.ts +179 -0
- package/esm/baseui/select/select-component.js +845 -0
- package/esm/baseui/select/select.d.ts +4 -0
- package/esm/baseui/select/select.js +9 -0
- package/esm/baseui/select/single-select.d.ts +3 -0
- package/esm/baseui/select/single-select.js +8 -0
- package/esm/baseui/select/stateful-select-container.d.ts +19 -0
- package/esm/baseui/select/stateful-select-container.js +46 -0
- package/esm/baseui/select/stateful-select.d.ts +76 -0
- package/esm/baseui/select/stateful-select.js +9 -0
- package/esm/baseui/select/styled-components.d.ts +16 -0
- package/esm/baseui/select/styled-components.js +93 -0
- package/esm/baseui/select/types.d.ts +290 -0
- package/esm/baseui/select/types.js +1 -0
- package/esm/baseui/select/utils/default-filter-options.d.ts +23 -0
- package/esm/baseui/select/utils/default-filter-options.js +52 -0
- package/esm/baseui/select/utils/index.d.ts +3 -0
- package/esm/baseui/select/utils/index.js +34 -0
- package/esm/baseui/select/value.d.ts +1 -0
- package/esm/baseui/select/value.js +10 -0
- package/esm/baseui/slider/constants.d.ts +4 -0
- package/esm/baseui/slider/constants.js +10 -0
- package/esm/baseui/slider/index.d.ts +8 -0
- package/esm/baseui/slider/index.js +6 -0
- package/esm/baseui/slider/slider.d.ts +3 -0
- package/esm/baseui/slider/slider.js +98 -0
- package/esm/baseui/slider/stateful-slider-container.d.ts +23 -0
- package/esm/baseui/slider/stateful-slider-container.js +57 -0
- package/esm/baseui/slider/stateful-slider.d.ts +2 -0
- package/esm/baseui/slider/stateful-slider.js +7 -0
- package/esm/baseui/slider/styled-components.d.ts +9 -0
- package/esm/baseui/slider/styled-components.js +55 -0
- package/esm/baseui/slider/types.d.ts +74 -0
- package/esm/baseui/slider/types.js +1 -0
- package/esm/baseui/spinner/styled-components.d.ts +0 -0
- package/esm/baseui/spinner/styled-components.js +0 -0
- package/esm/baseui/table-semantic/constants.d.ts +11 -0
- package/esm/baseui/table-semantic/constants.js +17 -0
- package/esm/baseui/table-semantic/index.d.ts +4 -0
- package/esm/baseui/table-semantic/index.js +12 -0
- package/esm/baseui/table-semantic/styled-components.d.ts +11 -0
- package/esm/baseui/table-semantic/styled-components.js +39 -0
- package/esm/baseui/table-semantic/table-builder-column.d.ts +4 -0
- package/esm/baseui/table-semantic/table-builder-column.js +16 -0
- package/esm/baseui/table-semantic/table-builder.d.ts +17 -0
- package/esm/baseui/table-semantic/table-builder.js +79 -0
- package/esm/baseui/table-semantic/table.d.ts +10 -0
- package/esm/baseui/table-semantic/table.js +43 -0
- package/esm/baseui/table-semantic/types.d.ts +66 -0
- package/esm/baseui/table-semantic/types.js +1 -0
- package/esm/baseui/textarea/constants.d.ts +1 -0
- package/esm/baseui/textarea/constants.js +7 -0
- package/esm/baseui/textarea/index.d.ts +6 -0
- package/esm/baseui/textarea/index.js +13 -0
- package/esm/baseui/textarea/stateful-container.d.ts +2 -0
- package/esm/baseui/textarea/stateful-container.js +8 -0
- package/esm/baseui/textarea/stateful-textarea.d.ts +2 -0
- package/esm/baseui/textarea/stateful-textarea.js +9 -0
- package/esm/baseui/textarea/styled-components.d.ts +3 -0
- package/esm/baseui/textarea/styled-components.js +16 -0
- package/esm/baseui/textarea/textarea.d.ts +32 -0
- package/esm/baseui/textarea/textarea.js +61 -0
- package/esm/baseui/textarea/types.d.ts +44 -0
- package/esm/baseui/textarea/types.js +1 -0
- package/esm/baseui/timepicker/index.d.ts +2 -0
- package/esm/baseui/timepicker/index.js +9 -0
- package/esm/baseui/timepicker/timepicker.d.ts +34 -0
- package/esm/baseui/timepicker/timepicker.js +258 -0
- package/esm/baseui/timepicker/types.d.ts +54 -0
- package/esm/baseui/timepicker/types.js +1 -0
- package/esm/baseui/tooltip/constants.d.ts +1 -0
- package/esm/baseui/tooltip/constants.js +7 -0
- package/esm/baseui/tooltip/default-props.d.ts +3 -0
- package/esm/baseui/tooltip/default-props.js +22 -0
- package/esm/baseui/tooltip/index.d.ts +6 -0
- package/esm/baseui/tooltip/index.js +15 -0
- package/esm/baseui/tooltip/stateful-tooltip-container.d.ts +7 -0
- package/esm/baseui/tooltip/stateful-tooltip-container.js +23 -0
- package/esm/baseui/tooltip/stateful-tooltip.d.ts +6 -0
- package/esm/baseui/tooltip/stateful-tooltip.js +10 -0
- package/esm/baseui/tooltip/styled-components.d.ts +14 -0
- package/esm/baseui/tooltip/styled-components.js +30 -0
- package/esm/baseui/tooltip/tooltip.d.ts +7 -0
- package/esm/baseui/tooltip/tooltip.js +31 -0
- package/esm/baseui/tooltip/types.d.ts +8 -0
- package/esm/baseui/tooltip/types.js +1 -0
- package/esm/baseui/tree-view/index.d.ts +11 -0
- package/esm/baseui/tree-view/index.js +8 -0
- package/esm/baseui/tree-view/stateful-container.d.ts +11 -0
- package/esm/baseui/tree-view/stateful-container.js +68 -0
- package/esm/baseui/tree-view/stateful-tree-view.d.ts +2 -0
- package/esm/baseui/tree-view/stateful-tree-view.js +7 -0
- package/esm/baseui/tree-view/styled-components.d.ts +6 -0
- package/esm/baseui/tree-view/styled-components.js +38 -0
- package/esm/baseui/tree-view/tree-label-interactable.d.ts +8 -0
- package/esm/baseui/tree-view/tree-label-interactable.js +18 -0
- package/esm/baseui/tree-view/tree-label.d.ts +4 -0
- package/esm/baseui/tree-view/tree-label.js +26 -0
- package/esm/baseui/tree-view/tree-node.d.ts +11 -0
- package/esm/baseui/tree-view/tree-node.js +52 -0
- package/esm/baseui/tree-view/tree-view.d.ts +2 -0
- package/esm/baseui/tree-view/tree-view.js +126 -0
- package/esm/baseui/tree-view/types.d.ts +67 -0
- package/esm/baseui/tree-view/types.js +1 -0
- package/esm/baseui/tree-view/utils.d.ts +11 -0
- package/esm/baseui/tree-view/utils.js +181 -0
- package/esm/baseui/utils/create-event.d.ts +1 -0
- package/esm/baseui/utils/create-event.js +11 -0
- package/esm/baseui/utils/deep-merge.d.ts +1 -0
- package/esm/baseui/utils/deep-merge.js +37 -0
- package/esm/baseui/utils/focusVisible.d.ts +10 -0
- package/esm/baseui/utils/focusVisible.js +160 -0
- package/esm/baseui/utils/index.d.ts +0 -0
- package/esm/baseui/utils/index.js +0 -0
- package/esm/baseui/utils/react-18.d.ts +1 -0
- package/esm/baseui/utils/react-18.js +9 -0
- package/esm/breadcrumb/breadcrumb-item.d.ts +1 -2
- package/esm/breadcrumb/breadcrumb.d.ts +1 -2
- package/esm/breadcrumb/styled-components.d.ts +1 -2
- package/esm/button/Button.d.ts +4 -3
- package/esm/button/Button.js +26 -16
- package/esm/button/IconButton/IconButton.js +7 -1
- package/esm/button/IconButton/styled-components.d.ts +1 -0
- package/esm/button/IconButton/styled-components.js +45 -13
- package/esm/button/IconTextButton/IconTextButton.d.ts +1 -1
- package/esm/button/IconTextButton/types.d.ts +1 -1
- package/esm/button/basewebAdapter.d.ts +8 -7
- package/esm/button/basewebAdapter.js +1 -1
- package/esm/button/index.d.ts +1 -1
- package/esm/button/index.js +1 -1
- package/esm/button/styled-components.d.ts +27 -2
- package/esm/button/styled-components.js +309 -46
- package/esm/button/types.d.ts +8 -5
- package/esm/button-group/styled-components.js +4 -5
- package/esm/checkbox/basewebAdapters.d.ts +1 -1
- package/esm/checkbox/basewebAdapters.js +31 -27
- package/esm/checkbox/checkbox.js +1 -1
- package/esm/checkbox/index.d.ts +3 -3
- package/esm/checkbox/index.js +2 -2
- package/esm/checkbox/styled-components.js +52 -15
- package/esm/checkbox/types.d.ts +4 -3
- package/esm/color-picker/ColorPalette.d.ts +2 -2
- package/esm/color-picker/ColorPalette.js +9 -7
- package/esm/color-picker/ColorPicker.d.ts +1 -1
- package/esm/color-picker/ColorPicker.js +42 -7
- package/esm/color-picker/ColorSelector.d.ts +6 -0
- package/esm/color-picker/ColorSelector.js +30 -0
- package/esm/color-picker/CustomColorSelector.d.ts +3 -0
- package/esm/color-picker/CustomColorSelector.js +38 -0
- package/esm/color-picker/GradientColorPicker.d.ts +6 -0
- package/esm/color-picker/GradientColorPicker.js +66 -0
- package/esm/color-picker/Swatch.js +3 -5
- package/esm/color-picker/colors.d.ts +2 -0
- package/esm/color-picker/colors.js +24 -0
- package/esm/color-picker/constants.d.ts +13 -0
- package/esm/color-picker/constants.js +9 -0
- package/esm/color-picker/locale.d.ts +4 -0
- package/esm/color-picker/types.d.ts +50 -1
- package/esm/color-picker/utils.d.ts +17 -0
- package/esm/color-picker/utils.js +33 -0
- package/esm/date-input/DateInput.d.ts +1 -1
- package/esm/date-input/DateInput.js +98 -87
- package/esm/date-input/constants.d.ts +28 -0
- package/esm/date-input/constants.js +28 -0
- package/esm/date-input/index.d.ts +1 -0
- package/esm/date-input/index.js +1 -0
- package/esm/date-input/types.d.ts +13 -4
- package/esm/date-input/utils.d.ts +2 -0
- package/esm/date-input/utils.js +72 -0
- package/esm/date-picker/Calendar.d.ts +4 -9
- package/esm/date-picker/Calendar.js +110 -119
- package/esm/date-picker/DateInput.d.ts +2 -2
- package/esm/date-picker/DateInput.js +30 -46
- package/esm/date-picker/DatePickerContent.js +9 -28
- package/esm/date-picker/DateTimeContainer.d.ts +2 -2
- package/esm/date-picker/DateTimeContainer.js +16 -10
- package/esm/date-picker/StatelessDatePicker.js +4 -16
- package/esm/date-picker/TimeInput.d.ts +2 -2
- package/esm/date-picker/TimeInput.js +1 -1
- package/esm/date-picker/index.d.ts +1 -1
- package/esm/date-picker/index.js +1 -1
- package/esm/date-picker/stateful-container.d.ts +1 -1
- package/esm/date-picker/stateful-container.js +1 -1
- package/esm/date-picker/styled-components.js +9 -6
- package/esm/date-picker/types.d.ts +2 -1
- package/esm/date-picker/utils.d.ts +2 -2
- package/esm/date-picker/utils.js +3 -3
- package/esm/form-control/form-control.js +7 -6
- package/esm/form-control/types.d.ts +5 -3
- package/esm/grid/Col.js +30 -20
- package/esm/helpers/commonStyles.d.ts +1 -0
- package/esm/helpers/commonStyles.js +13 -0
- package/esm/helpers/styletron.d.ts +0 -23
- package/esm/helpers/styletron.js +0 -13
- package/esm/hooks/useFocusVisible.js +1 -1
- package/esm/hooks/useHasMounted.d.ts +2 -0
- package/esm/hooks/useHasMounted.js +11 -0
- package/esm/hooks/usePreferredReducedMotion.d.ts +2 -0
- package/esm/hooks/usePreferredReducedMotion.js +9 -0
- package/esm/hooks/useTransitionState.d.ts +4 -0
- package/esm/hooks/useTransitionState.js +21 -0
- package/esm/hooks/useUniqueId.d.ts +4 -1
- package/esm/hooks/useUniqueId.js +7 -5
- package/esm/icon/components/noPreview.d.ts +3 -0
- package/esm/icon/components/noPreview.js +8 -0
- package/esm/icon/components/overview.d.ts +3 -0
- package/esm/icon/components/overview.js +8 -0
- package/esm/icon/constants.d.ts +4 -0
- package/esm/icon/constants.js +4 -0
- package/esm/icon/icon.d.ts +1 -1
- package/esm/icon/icon.js +3 -2
- package/esm/icon/types.d.ts +3 -0
- package/esm/input/InputContainer.d.ts +12 -0
- package/esm/input/InputContainer.js +18 -0
- package/esm/input/basewebAdapters.d.ts +2 -2
- package/esm/input/basewebAdapters.js +45 -42
- package/esm/input/index.d.ts +4 -3
- package/esm/input/index.js +3 -2
- package/esm/input/input.js +1 -1
- package/esm/input/styled-components.js +1 -1
- package/esm/input/types.d.ts +1 -1
- package/esm/layer/LayersManager.js +3 -1
- package/esm/layer/useLayersContextValue.d.ts +1 -1
- package/esm/layer/useLayersContextValue.js +48 -3
- package/esm/list/list-item-text.d.ts +1 -2
- package/esm/list/list-item.d.ts +1 -1
- package/esm/list/list-item.js +1 -1
- package/esm/loader/loader.d.ts +3 -1
- package/esm/loader/loader.js +12 -3
- package/esm/loader/styled-component.d.ts +2 -0
- package/esm/loader/styled-component.js +61 -0
- package/esm/loader/types.d.ts +2 -1
- package/esm/locale/context.d.ts +1 -1
- package/esm/locale/en_US.js +5 -0
- package/esm/locale/types.d.ts +7 -7
- package/esm/menu/helpers.d.ts +8 -1
- package/esm/menu/helpers.js +4 -4
- package/esm/menu/menu-item.d.ts +3 -3
- package/esm/menu/menu-item.js +6 -2
- package/esm/modal/adapter.d.ts +1 -1
- package/esm/modal/adapter.js +1 -1
- package/esm/modal/index.d.ts +1 -1
- package/esm/modal/index.js +1 -1
- package/esm/modal/modal-footer.d.ts +1 -1
- package/esm/modal/modal-footer.js +4 -3
- package/esm/modal/modal.js +16 -13
- package/esm/modal/overrides.js +6 -13
- package/esm/modal/styled-components.d.ts +2 -2
- package/esm/modal/styled-components.js +3 -12
- package/esm/modal/types.d.ts +3 -3
- package/esm/modal/types.js +1 -1
- package/esm/overrides/useOverrides.js +1 -1
- package/esm/payment-card/basewebAdapters.d.ts +1 -1
- package/esm/payment-card/basewebAdapters.js +2 -2
- package/esm/payment-card/index.d.ts +1 -1
- package/esm/payment-card/index.js +1 -1
- package/esm/payment-card/paymentCard.js +1 -1
- package/esm/payment-card/types.d.ts +1 -1
- package/esm/phone-input/styled-components.d.ts +1 -1
- package/esm/phone-input/styled-components.js +5 -13
- package/esm/phone-input/types.d.ts +1 -1
- package/esm/popover/PopoverEnahncer.d.ts +1 -1
- package/esm/popover/adapter.d.ts +1 -1
- package/esm/popover/adapter.js +1 -1
- package/esm/popover/hooks.d.ts +1 -1
- package/esm/popover/index.d.ts +1 -1
- package/esm/popover/index.js +1 -1
- package/esm/popover/popover.d.ts +1 -1
- package/esm/popover/popover.js +16 -12
- package/esm/popover/stateful-popover.js +1 -1
- package/esm/popover/styled-components.d.ts +1 -1
- package/esm/popover/styled-components.js +1 -1
- package/esm/popover/types.d.ts +5 -5
- package/esm/popover/types.js +2 -2
- package/esm/radio/basewebAdapters.d.ts +1 -1
- package/esm/radio/basewebAdapters.js +33 -29
- package/esm/radio/index.d.ts +1 -1
- package/esm/radio/index.js +1 -1
- package/esm/radio/radio.js +1 -1
- package/esm/radio/styled-components.js +2 -2
- package/esm/radio/types.d.ts +1 -2
- package/esm/select/adaptor.d.ts +1 -1
- package/esm/select/adaptor.js +1 -1
- package/esm/select/base-select.d.ts +6 -7
- package/esm/select/base-select.js +23 -67
- package/esm/select/constants.d.ts +1 -1
- package/esm/select/constants.js +2 -2
- package/esm/select/index.d.ts +2 -2
- package/esm/select/index.js +1 -1
- package/esm/select/locale.d.ts +1 -0
- package/esm/select/mobileSelect/MobileSelect.js +9 -2
- package/esm/select/mobileSelect/MobileSheet.js +1 -1
- package/esm/select/mobileSelect/overrides.d.ts +1 -1
- package/esm/select/overlaySelect/OverlaySelect.d.ts +2 -1
- package/esm/select/overlaySelect/OverlaySelect.js +38 -8
- package/esm/select/overlaySelect/hooks/useControlRef.d.ts +1 -1
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +1 -4
- package/esm/select/overlaySelect/hooks/useOverlaySelectOverrides.js +2 -8
- package/esm/select/overrides.d.ts +2 -2
- package/esm/select/select.d.ts +4 -4
- package/esm/select/select.js +0 -3
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +14 -13
- package/esm/select/selectMenuAdapter/CollapsibleSelectMenu.js +43 -12
- package/esm/select/selectMenuAdapter/SelectMenuAdapter.js +1 -1
- package/esm/select/selectMenuAdapter/SelectMenuItem.d.ts +3 -3
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +1 -1
- package/esm/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +3 -2
- package/esm/select/selectMenuAdapter/types.d.ts +3 -1
- package/esm/select/stateful-select.d.ts +4 -4
- package/esm/select/stateful-select.js +1 -1
- package/esm/select/styled-component.d.ts +6 -6
- package/esm/select/styled-component.js +21 -16
- package/esm/select/types.d.ts +5 -14
- package/esm/select/types.js +2 -1
- package/esm/select/utils/default-create-option.d.ts +5 -0
- package/esm/select/utils/default-create-option.js +6 -0
- package/esm/select/utils/default-filter-options.d.ts +1 -1
- package/esm/select/utils/default-filter-options.js +1 -1
- package/esm/select/utils/merge-options.js +1 -1
- package/esm/slider/mark.d.ts +3 -3
- package/esm/slider/slider.js +12 -7
- package/esm/slider/stateful-slider-container.js +1 -1
- package/esm/slider/types.d.ts +1 -1
- package/esm/snackbar/Snackbar.js +2 -2
- package/esm/snackbar/constants.d.ts +1 -1
- package/esm/snackbar/useSnackbar.js +16 -7
- package/esm/spacewebProvider/AiIconLinearGradients.d.ts +2 -0
- package/esm/spacewebProvider/AiIconLinearGradients.js +9 -0
- package/esm/spacewebProvider/CustomBaseProvider.d.ts +2 -11
- package/esm/spacewebProvider/CustomBaseProvider.js +4 -12
- package/esm/spacewebProvider/SpacewebProvider.js +8 -6
- package/esm/style/styled.d.ts +1 -1
- package/esm/style/useMemoizedStyletron.d.ts +2 -1
- package/esm/style/useMemoizedStyletron.js +3 -3
- package/esm/switch/index.d.ts +1 -1
- package/esm/switch/index.js +1 -1
- package/esm/switch/styled-components.js +0 -2
- package/esm/switch/switch.js +1 -1
- package/esm/switch/types.d.ts +1 -1
- package/esm/tabs/contexts.d.ts +2 -2
- package/esm/tabs/styled-components.d.ts +1 -1
- package/esm/tabs/tab-list.js +2 -1
- package/esm/tag/intentStyles.d.ts +5 -1
- package/esm/tag/intentStyles.js +31 -5
- package/esm/tag/styled-components.js +5 -4
- package/esm/tag/tag.js +3 -7
- package/esm/tag/types.d.ts +1 -1
- package/esm/textarea/basewebAdapters.js +17 -15
- package/esm/textarea/index.d.ts +1 -1
- package/esm/textarea/index.js +1 -1
- package/esm/textarea/styled-components.d.ts +1 -1
- package/esm/textarea/textarea.js +1 -1
- package/esm/textarea/types.d.ts +1 -1
- package/esm/theme/Provider.js +4 -10
- package/esm/time-picker/TimePicker.js +15 -12
- package/esm/time-picker/types.d.ts +2 -2
- package/esm/time-range-picker/RangeSelector.js +7 -11
- package/esm/time-range-picker/RangeSelectorContainer.js +2 -2
- package/esm/time-range-picker/TimeRangeList.js +1 -1
- package/esm/time-range-picker/TimeRangePicker.js +9 -3
- package/esm/time-range-picker/constants.d.ts +0 -2
- package/esm/time-range-picker/constants.js +0 -2
- package/esm/time-range-picker/types.d.ts +1 -2
- package/esm/time-range-picker/utils.d.ts +2 -6
- package/esm/time-range-picker/utils.js +5 -16
- package/esm/tooltip/disabled-tooltip-container.d.ts +2 -1
- package/esm/tooltip/disabled-tooltip-container.js +1 -1
- package/esm/tooltip/overrides.js +10 -4
- package/esm/tooltip/stateful-tooltip-container.d.ts +2 -1
- package/esm/tooltip/stateful-tooltip-container.js +1 -1
- package/esm/tooltip/stateful-tooltip.d.ts +2 -1
- package/esm/tooltip/stateful-tooltip.js +3 -5
- package/esm/tooltip/styled-component.d.ts +1 -1
- package/esm/tooltip/styled-component.js +1 -1
- package/esm/tooltip/tooltip.d.ts +1 -1
- package/esm/tooltip/tooltip.js +17 -13
- package/esm/tooltip/types.d.ts +8 -4
- package/esm/transitions/collapse/collapse.d.ts +7 -0
- package/esm/transitions/collapse/collapse.js +64 -0
- package/esm/transitions/collapse/index.d.ts +3 -0
- package/esm/transitions/collapse/index.js +1 -0
- package/esm/transitions/collapse/styled-components.d.ts +1 -0
- package/esm/transitions/collapse/styled-components.js +23 -0
- package/esm/transitions/collapse/types.d.ts +19 -0
- package/esm/transitions/collapse/types.js +1 -0
- package/esm/transitions/fade/fade.d.ts +7 -0
- package/esm/transitions/fade/fade.js +27 -0
- package/esm/transitions/fade/index.d.ts +3 -0
- package/esm/transitions/fade/index.js +1 -0
- package/esm/transitions/fade/types.d.ts +10 -0
- package/esm/transitions/fade/types.js +1 -0
- package/esm/transitions/grow/grow.d.ts +7 -0
- package/esm/transitions/grow/grow.js +30 -0
- package/esm/transitions/grow/index.d.ts +3 -0
- package/esm/transitions/grow/index.js +1 -0
- package/esm/transitions/grow/types.d.ts +9 -0
- package/esm/transitions/grow/types.js +1 -0
- package/esm/transitions/transition/constants.d.ts +6 -0
- package/esm/transitions/transition/constants.js +6 -0
- package/esm/transitions/transition/helperFunction.d.ts +1 -0
- package/esm/transitions/transition/helperFunction.js +5 -0
- package/esm/transitions/transition/index.d.ts +4 -0
- package/esm/transitions/transition/index.js +3 -0
- package/esm/transitions/transition/styled-component.d.ts +1 -0
- package/esm/transitions/transition/styled-component.js +24 -0
- package/esm/transitions/transition/transition.d.ts +7 -0
- package/esm/transitions/transition/transition.js +34 -0
- package/esm/transitions/transition/transitionGroup.d.ts +4 -0
- package/esm/transitions/transition/transitionGroup.js +11 -0
- package/esm/transitions/transition/types.d.ts +40 -0
- package/esm/transitions/transition/types.js +1 -0
- package/esm/truncateWithTooltip/TruncateWithTooltip.d.ts +4 -0
- package/esm/truncateWithTooltip/TruncateWithTooltip.js +20 -0
- package/esm/truncateWithTooltip/hooks/useTruncateWithTooltip.d.ts +7 -0
- package/esm/truncateWithTooltip/hooks/useTruncateWithTooltip.js +26 -0
- package/esm/truncateWithTooltip/index.d.ts +2 -0
- package/esm/truncateWithTooltip/index.js +1 -0
- package/esm/truncateWithTooltip/types.d.ts +20 -0
- package/esm/truncateWithTooltip/types.js +1 -0
- package/esm/types.d.ts +2 -5
- package/esm/typography/Typography.d.ts +6 -0
- package/esm/typography/Typography.js +8 -3
- package/esm/typography/types.d.ts +7 -1
- package/esm/utils/intlNumberFormatUtils/index.js +3 -1
- package/esm/video/Video.js +3 -2
- package/esm/video/types.d.ts +1 -0
- package/form-control/form-control.js +7 -6
- package/form-control/types.d.ts +5 -3
- package/grid/Col.js +29 -19
- package/helpers/commonStyles.d.ts +1 -0
- package/helpers/commonStyles.js +14 -1
- package/helpers/styletron.d.ts +0 -23
- package/helpers/styletron.js +0 -16
- package/hooks/useFocusVisible.js +1 -1
- package/hooks/useHasMounted.d.ts +2 -0
- package/hooks/useHasMounted.js +14 -0
- package/hooks/usePreferredReducedMotion.d.ts +2 -0
- package/hooks/usePreferredReducedMotion.js +11 -0
- package/hooks/useTransitionState.d.ts +4 -0
- package/hooks/useTransitionState.js +25 -0
- package/hooks/useUniqueId.d.ts +4 -1
- package/hooks/useUniqueId.js +9 -7
- package/icon/components/noPreview.d.ts +3 -0
- package/icon/components/noPreview.js +11 -0
- package/icon/components/overview.d.ts +3 -0
- package/icon/components/overview.js +11 -0
- package/icon/constants.d.ts +4 -0
- package/icon/constants.js +7 -0
- package/icon/icon.d.ts +1 -1
- package/icon/icon.js +3 -2
- package/icon/types.d.ts +3 -0
- package/input/InputContainer.d.ts +12 -0
- package/input/InputContainer.js +22 -0
- package/input/basewebAdapters.d.ts +2 -2
- package/input/basewebAdapters.js +45 -42
- package/input/index.d.ts +4 -3
- package/input/index.js +5 -3
- package/input/input.js +1 -1
- package/input/styled-components.js +1 -1
- package/input/types.d.ts +1 -1
- package/layer/LayersManager.js +3 -1
- package/layer/useLayersContextValue.d.ts +1 -1
- package/layer/useLayersContextValue.js +48 -3
- package/list/list-item-text.d.ts +1 -2
- package/list/list-item.d.ts +1 -1
- package/list/list-item.js +1 -1
- package/loader/loader.d.ts +3 -1
- package/loader/loader.js +11 -2
- package/loader/styled-component.d.ts +2 -0
- package/loader/styled-component.js +62 -1
- package/loader/types.d.ts +2 -1
- package/locale/context.d.ts +1 -1
- package/locale/en_US.js +5 -0
- package/locale/types.d.ts +7 -7
- package/menu/helpers.d.ts +8 -1
- package/menu/helpers.js +7 -4
- package/menu/menu-item.d.ts +3 -3
- package/menu/menu-item.js +6 -2
- package/modal/adapter.d.ts +1 -1
- package/modal/adapter.js +1 -1
- package/modal/index.d.ts +1 -1
- package/modal/index.js +1 -1
- package/modal/modal-footer.d.ts +1 -1
- package/modal/modal-footer.js +3 -2
- package/modal/modal.js +16 -13
- package/modal/overrides.js +6 -13
- package/modal/styled-components.d.ts +2 -2
- package/modal/styled-components.js +3 -13
- package/modal/types.d.ts +3 -3
- package/modal/types.js +1 -1
- package/overrides/useOverrides.js +1 -1
- package/package.json +31 -15
- package/payment-card/basewebAdapters.d.ts +1 -1
- package/payment-card/basewebAdapters.js +2 -2
- package/payment-card/index.d.ts +1 -1
- package/payment-card/index.js +1 -1
- package/payment-card/paymentCard.js +1 -1
- package/payment-card/types.d.ts +1 -1
- package/phone-input/styled-components.d.ts +1 -1
- package/phone-input/styled-components.js +5 -13
- package/phone-input/types.d.ts +1 -1
- package/popover/PopoverEnahncer.d.ts +1 -1
- package/popover/adapter.d.ts +1 -1
- package/popover/adapter.js +1 -1
- package/popover/hooks.d.ts +1 -1
- package/popover/index.d.ts +1 -1
- package/popover/index.js +1 -1
- package/popover/popover.d.ts +1 -1
- package/popover/popover.js +15 -11
- package/popover/stateful-popover.js +1 -1
- package/popover/styled-components.d.ts +1 -1
- package/popover/styled-components.js +1 -1
- package/popover/types.d.ts +5 -5
- package/popover/types.js +2 -2
- package/radio/basewebAdapters.d.ts +1 -1
- package/radio/basewebAdapters.js +32 -28
- package/radio/index.d.ts +1 -1
- package/radio/index.js +1 -1
- package/radio/radio.js +1 -1
- package/radio/styled-components.js +2 -2
- package/radio/types.d.ts +1 -2
- package/select/adaptor.d.ts +1 -1
- package/select/adaptor.js +1 -1
- package/select/base-select.d.ts +6 -7
- package/select/base-select.js +35 -79
- package/select/constants.d.ts +1 -1
- package/select/constants.js +2 -2
- package/select/index.d.ts +2 -2
- package/select/index.js +1 -1
- package/select/locale.d.ts +1 -0
- package/select/mobileSelect/MobileSelect.js +9 -2
- package/select/mobileSelect/MobileSheet.js +1 -1
- package/select/mobileSelect/overrides.d.ts +1 -1
- package/select/overlaySelect/OverlaySelect.d.ts +2 -1
- package/select/overlaySelect/OverlaySelect.js +35 -5
- package/select/overlaySelect/hooks/useControlRef.d.ts +1 -1
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.d.ts +1 -4
- package/select/overlaySelect/hooks/useOverlaySelectOverrides.js +2 -8
- package/select/overrides.d.ts +2 -2
- package/select/select.d.ts +4 -4
- package/select/select.js +0 -3
- package/select/selectMenuAdapter/CollapsibleSelectMenu.d.ts +14 -13
- package/select/selectMenuAdapter/CollapsibleSelectMenu.js +42 -11
- package/select/selectMenuAdapter/SelectMenuAdapter.js +1 -1
- package/select/selectMenuAdapter/SelectMenuItem.d.ts +3 -3
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.d.ts +1 -1
- package/select/selectMenuAdapter/hooks/useGetExpandedGroup.js +3 -2
- package/select/selectMenuAdapter/types.d.ts +3 -1
- package/select/stateful-select.d.ts +4 -4
- package/select/stateful-select.js +1 -1
- package/select/styled-component.d.ts +6 -6
- package/select/styled-component.js +21 -16
- package/select/types.d.ts +5 -14
- package/select/types.js +3 -2
- package/select/utils/default-create-option.d.ts +5 -0
- package/select/utils/default-create-option.js +11 -0
- package/select/utils/default-filter-options.d.ts +1 -1
- package/select/utils/default-filter-options.js +1 -1
- package/select/utils/merge-options.js +1 -1
- package/slider/mark.d.ts +3 -3
- package/slider/slider.js +12 -7
- package/slider/stateful-slider-container.js +1 -1
- package/slider/types.d.ts +1 -1
- package/snackbar/Snackbar.js +2 -2
- package/snackbar/constants.d.ts +1 -1
- package/snackbar/useSnackbar.js +16 -7
- package/spacewebProvider/AiIconLinearGradients.d.ts +2 -0
- package/spacewebProvider/AiIconLinearGradients.js +11 -0
- package/spacewebProvider/CustomBaseProvider.d.ts +2 -11
- package/spacewebProvider/CustomBaseProvider.js +4 -12
- package/spacewebProvider/SpacewebProvider.js +8 -6
- package/style/styled.d.ts +1 -1
- package/style/useMemoizedStyletron.d.ts +2 -1
- package/style/useMemoizedStyletron.js +3 -3
- package/switch/index.d.ts +1 -1
- package/switch/index.js +1 -1
- package/switch/styled-components.js +0 -2
- package/switch/switch.js +1 -1
- package/switch/types.d.ts +1 -1
- package/tabs/contexts.d.ts +2 -2
- package/tabs/styled-components.d.ts +1 -1
- package/tabs/tab-list.js +2 -1
- package/tag/intentStyles.d.ts +5 -1
- package/tag/intentStyles.js +31 -5
- package/tag/styled-components.js +5 -4
- package/tag/tag.js +3 -7
- package/tag/types.d.ts +1 -1
- package/textarea/basewebAdapters.js +17 -15
- package/textarea/index.d.ts +1 -1
- package/textarea/index.js +1 -1
- package/textarea/styled-components.d.ts +1 -1
- package/textarea/textarea.js +1 -1
- package/textarea/types.d.ts +1 -1
- package/theme/Provider.js +2 -8
- package/time-picker/TimePicker.js +15 -12
- package/time-picker/types.d.ts +2 -2
- package/time-range-picker/RangeSelector.js +5 -9
- package/time-range-picker/RangeSelectorContainer.js +2 -2
- package/time-range-picker/TimeRangeList.js +1 -1
- package/time-range-picker/TimeRangePicker.js +9 -3
- package/time-range-picker/constants.d.ts +0 -2
- package/time-range-picker/constants.js +1 -3
- package/time-range-picker/types.d.ts +1 -2
- package/time-range-picker/utils.d.ts +2 -6
- package/time-range-picker/utils.js +5 -17
- package/tooltip/disabled-tooltip-container.d.ts +2 -1
- package/tooltip/disabled-tooltip-container.js +1 -1
- package/tooltip/overrides.js +10 -4
- package/tooltip/stateful-tooltip-container.d.ts +2 -1
- package/tooltip/stateful-tooltip-container.js +1 -1
- package/tooltip/stateful-tooltip.d.ts +2 -1
- package/tooltip/stateful-tooltip.js +3 -5
- package/tooltip/styled-component.d.ts +1 -1
- package/tooltip/styled-component.js +1 -1
- package/tooltip/tooltip.d.ts +1 -1
- package/tooltip/tooltip.js +16 -12
- package/tooltip/types.d.ts +8 -4
- package/transitions/collapse/collapse.d.ts +7 -0
- package/transitions/collapse/collapse.js +66 -0
- package/transitions/collapse/index.d.ts +3 -0
- package/transitions/collapse/index.js +8 -0
- package/transitions/collapse/styled-components.d.ts +1 -0
- package/transitions/collapse/styled-components.js +26 -0
- package/transitions/collapse/types.d.ts +19 -0
- package/transitions/collapse/types.js +2 -0
- package/transitions/fade/fade.d.ts +7 -0
- package/transitions/fade/fade.js +29 -0
- package/transitions/fade/index.d.ts +3 -0
- package/transitions/fade/index.js +8 -0
- package/transitions/fade/types.d.ts +10 -0
- package/transitions/fade/types.js +2 -0
- package/transitions/grow/grow.d.ts +7 -0
- package/transitions/grow/grow.js +32 -0
- package/transitions/grow/index.d.ts +3 -0
- package/transitions/grow/index.js +8 -0
- package/transitions/grow/types.d.ts +9 -0
- package/transitions/grow/types.js +2 -0
- package/transitions/package.json +4 -0
- package/transitions/transition/constants.d.ts +6 -0
- package/transitions/transition/constants.js +9 -0
- package/transitions/transition/helperFunction.d.ts +1 -0
- package/transitions/transition/helperFunction.js +9 -0
- package/transitions/transition/index.d.ts +4 -0
- package/transitions/transition/index.js +15 -0
- package/transitions/transition/styled-component.d.ts +1 -0
- package/transitions/transition/styled-component.js +27 -0
- package/transitions/transition/transition.d.ts +7 -0
- package/transitions/transition/transition.js +36 -0
- package/transitions/transition/transitionGroup.d.ts +4 -0
- package/transitions/transition/transitionGroup.js +13 -0
- package/transitions/transition/types.d.ts +40 -0
- package/transitions/transition/types.js +2 -0
- package/truncateWithTooltip/TruncateWithTooltip.d.ts +4 -0
- package/truncateWithTooltip/TruncateWithTooltip.js +22 -0
- package/truncateWithTooltip/hooks/useTruncateWithTooltip.d.ts +7 -0
- package/truncateWithTooltip/hooks/useTruncateWithTooltip.js +30 -0
- package/truncateWithTooltip/index.d.ts +2 -0
- package/truncateWithTooltip/index.js +8 -0
- package/truncateWithTooltip/package.json +4 -0
- package/truncateWithTooltip/types.d.ts +20 -0
- package/truncateWithTooltip/types.js +2 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/types.d.ts +2 -5
- package/typography/Typography.d.ts +6 -0
- package/typography/Typography.js +7 -2
- package/typography/types.d.ts +7 -1
- package/utils/intlNumberFormatUtils/index.js +3 -1
- package/video/Video.js +3 -2
- package/video/types.d.ts +1 -0
- package/date-input/Before.d.ts +0 -19
- package/date-input/Before.js +0 -27
- package/date-input/CalendarIconButton.d.ts +0 -3
- package/date-input/CalendarIconButton.js +0 -16
- package/esm/date-input/Before.d.ts +0 -19
- package/esm/date-input/Before.js +0 -23
- package/esm/date-input/CalendarIconButton.d.ts +0 -3
- package/esm/date-input/CalendarIconButton.js +0 -12
- package/esm/helpers/baseui/useConvertOverrides.d.ts +0 -15
- package/esm/helpers/baseui/useConvertOverrides.js +0 -35
- package/esm/helpers/baseui/withThemeOverride.d.ts +0 -9
- package/esm/helpers/baseui/withThemeOverride.js +0 -21
- package/esm/style/__mocks__/CSS.mock.d.ts +0 -10
- package/esm/style/__mocks__/CSS.mock.js +0 -9
- package/esm/style/__mocks__/UseStyle.mock.d.ts +0 -10
- package/esm/style/__mocks__/UseStyle.mock.js +0 -8
- package/esm/themes/dark-theme.d.ts +0 -6
- package/esm/themes/dark-theme.js +0 -9
- package/esm/themes/index.d.ts +0 -10
- package/esm/themes/index.js +0 -18
- package/esm/themes/light-theme.d.ts +0 -6
- package/esm/themes/light-theme.js +0 -9
- package/esm/themes/responsive-theme.d.ts +0 -20
- package/esm/themes/responsive-theme.js +0 -19
- package/esm/themes/shared.d.ts +0 -4
- package/esm/themes/shared.js +0 -4
- package/helpers/baseui/useConvertOverrides.d.ts +0 -15
- package/helpers/baseui/useConvertOverrides.js +0 -40
- package/helpers/baseui/withThemeOverride.d.ts +0 -9
- package/helpers/baseui/withThemeOverride.js +0 -23
- package/style/__mocks__/CSS.mock.d.ts +0 -10
- package/style/__mocks__/CSS.mock.js +0 -11
- package/style/__mocks__/UseStyle.mock.d.ts +0 -10
- package/style/__mocks__/UseStyle.mock.js +0 -11
- package/themes/dark-theme.d.ts +0 -6
- package/themes/dark-theme.js +0 -12
- package/themes/index.d.ts +0 -10
- package/themes/index.js +0 -23
- package/themes/light-theme.d.ts +0 -6
- package/themes/light-theme.js +0 -12
- package/themes/package.json +0 -4
- package/themes/responsive-theme.d.ts +0 -20
- package/themes/responsive-theme.js +0 -23
- package/themes/shared.d.ts +0 -4
- package/themes/shared.js +0 -7
|
@@ -0,0 +1,849 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isInteractive = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
/*
|
|
7
|
+
Copyright (c) Uber Technologies, Inc.
|
|
8
|
+
|
|
9
|
+
This source code is licensed under the MIT license found in the
|
|
10
|
+
LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var React = (0, tslib_1.__importStar)(require("react"));
|
|
13
|
+
var memoize_one_1 = (0, tslib_1.__importDefault)(require("memoize-one"));
|
|
14
|
+
var overrides_1 = require("../helpers/overrides");
|
|
15
|
+
var locale_1 = require("../locale");
|
|
16
|
+
var popover_1 = require("../popover");
|
|
17
|
+
var react_uid_1 = require("react-uid");
|
|
18
|
+
var autosize_input_1 = (0, tslib_1.__importDefault)(require("./autosize-input"));
|
|
19
|
+
var constants_1 = require("./constants");
|
|
20
|
+
var default_props_1 = (0, tslib_1.__importDefault)(require("./default-props"));
|
|
21
|
+
var dropdown_1 = (0, tslib_1.__importDefault)(require("./dropdown"));
|
|
22
|
+
var styled_components_1 = require("./styled-components");
|
|
23
|
+
var utils_1 = require("./utils");
|
|
24
|
+
var spacewebProvider_1 = require("../../spacewebProvider");
|
|
25
|
+
var locale_2 = (0, tslib_1.__importDefault)(require("./locale"));
|
|
26
|
+
var helpers_1 = require("../../helpers");
|
|
27
|
+
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
28
|
+
function Noop() {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
var isClick = function (event) { return event.type === 'click'; };
|
|
32
|
+
var isLeftClick = function (event) { return event.button !== null && event.button !== undefined && event.button === 0; };
|
|
33
|
+
var containsNode = function (parent, child) {
|
|
34
|
+
if (!spacewebProvider_1.isServer) {
|
|
35
|
+
return child && parent && parent.contains(child);
|
|
36
|
+
}
|
|
37
|
+
return undefined;
|
|
38
|
+
};
|
|
39
|
+
function isInteractive(rootTarget, rootElement) {
|
|
40
|
+
if (rootTarget instanceof Element) {
|
|
41
|
+
var target = rootTarget;
|
|
42
|
+
while (target && target !== rootElement) {
|
|
43
|
+
var role = target.getAttribute('role');
|
|
44
|
+
if (role === 'button' || role === 'link') {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
if (target.tagName)
|
|
48
|
+
target = target.parentElement;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
exports.isInteractive = isInteractive;
|
|
54
|
+
var Select = /** @class */ (function (_super) {
|
|
55
|
+
(0, tslib_1.__extends)(Select, _super);
|
|
56
|
+
function Select() {
|
|
57
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
58
|
+
// anchor is a ref that refers to the outermost element rendered when the dropdown menu is not
|
|
59
|
+
// open. This is required so that we can check if clicks are on/off the anchor element.
|
|
60
|
+
_this.anchor = React.createRef();
|
|
61
|
+
// dropdown is a ref that refers to the popover element. This is required so that we can check if
|
|
62
|
+
// clicks are on/off the dropdown element.
|
|
63
|
+
_this.dropdown = React.createRef();
|
|
64
|
+
// the select components can accept an array of options or an object where properties are optgroups
|
|
65
|
+
// and values are arrays of options. this class property is constructed and updated in a normalized
|
|
66
|
+
// shape where optgroup titles are stored on the option in the __optgroup field.
|
|
67
|
+
_this.options = [];
|
|
68
|
+
_this.state = {
|
|
69
|
+
activeDescendant: null,
|
|
70
|
+
inputValue: '',
|
|
71
|
+
isFocused: false,
|
|
72
|
+
isOpen: _this.props.startOpen || false,
|
|
73
|
+
isPseudoFocused: false,
|
|
74
|
+
};
|
|
75
|
+
_this.isItMounted = false;
|
|
76
|
+
// Handle touch outside on mobile to dismiss menu, ensures that the
|
|
77
|
+
// touch target is not within the anchor DOM node.
|
|
78
|
+
_this.handleTouchOutside = function (event) {
|
|
79
|
+
if (containsNode(_this.dropdown.current, event.target))
|
|
80
|
+
return;
|
|
81
|
+
if (!containsNode(_this.anchor.current, event.target)) {
|
|
82
|
+
_this.closeMenu();
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
// Track dragging state to filter false-positive actions where a user
|
|
86
|
+
// intends to drag/scroll the page.
|
|
87
|
+
_this.handleTouchMove = function () {
|
|
88
|
+
_this.dragging = true;
|
|
89
|
+
// to tackle arrow-function-should-not-return-assignment
|
|
90
|
+
return true;
|
|
91
|
+
};
|
|
92
|
+
_this.handleTouchStart = function () {
|
|
93
|
+
_this.dragging = false;
|
|
94
|
+
// to tackle arrow-function-should-not-return-assignment
|
|
95
|
+
return true;
|
|
96
|
+
};
|
|
97
|
+
_this.handleTouchEnd = function (event) {
|
|
98
|
+
if (_this.dragging)
|
|
99
|
+
return;
|
|
100
|
+
_this.handleClick(event);
|
|
101
|
+
};
|
|
102
|
+
_this.handleClick = function (event) {
|
|
103
|
+
if (_this.props.disabled || (!isClick(event) && !isLeftClick(event))) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
// Case comes up when text has been typed into the input field. If no text provided,
|
|
107
|
+
// the 'input' element will have essentially 0 width therefore will not be clickable.
|
|
108
|
+
// When click outside does not reset input, text provided will stay rendered after clicks away
|
|
109
|
+
// from the select component. Upon subsequent clicks on the provided text, open the dropdown
|
|
110
|
+
// menu, in addition to text edit operations.
|
|
111
|
+
if (event.target === _this.input) {
|
|
112
|
+
// CHASE: not sure why this condition is here. I cannot replicate a situation where clicks
|
|
113
|
+
// on provided text break into here.
|
|
114
|
+
if (!_this.state.isFocused) {
|
|
115
|
+
_this.openAfterFocus = _this.props.openOnClick || false;
|
|
116
|
+
_this.focus();
|
|
117
|
+
}
|
|
118
|
+
if (!_this.state.isOpen) {
|
|
119
|
+
_this.setState({
|
|
120
|
+
isOpen: true,
|
|
121
|
+
isFocused: true,
|
|
122
|
+
isPseudoFocused: false,
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
// Ensures that interactive elements within the Select component do not trigger the outer click
|
|
128
|
+
// handler. For example, after an option is selected clicks on the 'clear' icon call here. We
|
|
129
|
+
// should ignore those events. This comes after case where click is on input element, so that
|
|
130
|
+
// those are handled on their own.
|
|
131
|
+
if (_this.input && isInteractive(event.target, _this.input)) {
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
// For the simple case where clicking on the Select does not allow for providing
|
|
135
|
+
// text input to filter the dropdown options.
|
|
136
|
+
if (!_this.props.searchable) {
|
|
137
|
+
_this.focus();
|
|
138
|
+
if (_this.state.isOpen) {
|
|
139
|
+
_this.setState({ isOpen: false, isFocused: false });
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
_this.setState({ isOpen: true, isFocused: true });
|
|
143
|
+
}
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
// Cases below only apply to searchable Select component.
|
|
147
|
+
if (_this.state.isFocused) {
|
|
148
|
+
// iOS ignores programmatic calls to input.focus() that were not triggered by a click event.
|
|
149
|
+
// This component can get into a state where isFocused is true, but the DOM node is not
|
|
150
|
+
// focused. Call focus here again to ensure.
|
|
151
|
+
_this.focus();
|
|
152
|
+
// Case comes up when click outside does not reset input - once text has been provided to
|
|
153
|
+
// the input, and the user closes the dropdown menu the provided text is maintained. After
|
|
154
|
+
// this, if the user focuses back into the select component then clicks on the component,
|
|
155
|
+
// the provided text highlights rather than position's the cursor at the end of the input.
|
|
156
|
+
if (_this.input)
|
|
157
|
+
_this.input.value = '';
|
|
158
|
+
_this.setState(function (prev) { return ({
|
|
159
|
+
isOpen: !_this.focusAfterClear && !prev.isOpen,
|
|
160
|
+
isPseudoFocused: false,
|
|
161
|
+
}); });
|
|
162
|
+
_this.focusAfterClear = false;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
// When clear button is clicked, need to click twice to open control container - https://github.com/uber/baseweb/issues/4285
|
|
166
|
+
// Setting focusAfterClear to false, resolves the issue
|
|
167
|
+
_this.focusAfterClear = false;
|
|
168
|
+
_this.openAfterFocus = _this.props.openOnClick || false;
|
|
169
|
+
_this.focus();
|
|
170
|
+
}
|
|
171
|
+
};
|
|
172
|
+
_this.handleInputFocus = function (event) {
|
|
173
|
+
if (_this.props.disabled)
|
|
174
|
+
return;
|
|
175
|
+
if (_this.props.onFocus)
|
|
176
|
+
_this.props.onFocus(event);
|
|
177
|
+
var toOpen = _this.state.isOpen || _this.openAfterFocus;
|
|
178
|
+
// if focus happens after clear values, don't open dropdown yet.
|
|
179
|
+
toOpen = !_this.focusAfterClear && toOpen;
|
|
180
|
+
_this.setState({
|
|
181
|
+
isFocused: true,
|
|
182
|
+
isOpen: !!toOpen,
|
|
183
|
+
});
|
|
184
|
+
_this.focusAfterClear = false;
|
|
185
|
+
_this.openAfterFocus = false;
|
|
186
|
+
};
|
|
187
|
+
_this.handleBlur = function (event) {
|
|
188
|
+
if (event.relatedTarget) {
|
|
189
|
+
if (containsNode(_this.anchor.current, event.relatedTarget) ||
|
|
190
|
+
containsNode(_this.dropdown.current, event.relatedTarget)) {
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
else if (containsNode(_this.anchor.current, event.target)) {
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
if (_this.props.onBlur) {
|
|
198
|
+
_this.props.onBlur(event);
|
|
199
|
+
}
|
|
200
|
+
if (_this.isItMounted) {
|
|
201
|
+
_this.setState({
|
|
202
|
+
isFocused: false,
|
|
203
|
+
isOpen: false,
|
|
204
|
+
isPseudoFocused: false,
|
|
205
|
+
inputValue: _this.props.onBlurResetsInput ? '' : _this.state.inputValue,
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
_this.handleClickOutside = function (event) {
|
|
210
|
+
if (_this.justSelected) {
|
|
211
|
+
_this.justSelected = false;
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
if (containsNode(_this.dropdown.current, event.target))
|
|
215
|
+
return;
|
|
216
|
+
var isFocused = _this.state.isFocused || _this.state.isPseudoFocused;
|
|
217
|
+
if (isFocused && !containsNode(_this.anchor.current, event.target)) {
|
|
218
|
+
_this.handleBlur(event);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
_this.handleInputChange = function (event) {
|
|
222
|
+
var newInputValue = event.target.value;
|
|
223
|
+
_this.setState({
|
|
224
|
+
inputValue: newInputValue,
|
|
225
|
+
isOpen: true,
|
|
226
|
+
isPseudoFocused: false,
|
|
227
|
+
});
|
|
228
|
+
if (_this.props.onInputChange) {
|
|
229
|
+
_this.props.onInputChange(event);
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
_this.handleKeyDown = function (event) {
|
|
233
|
+
if (_this.props.disabled)
|
|
234
|
+
return;
|
|
235
|
+
switch (event.key) {
|
|
236
|
+
case 'Backspace': // 8
|
|
237
|
+
if (!_this.state.inputValue && _this.props.backspaceRemoves) {
|
|
238
|
+
event.preventDefault();
|
|
239
|
+
_this.backspaceValue();
|
|
240
|
+
}
|
|
241
|
+
break;
|
|
242
|
+
case 'Tab': // 9
|
|
243
|
+
_this.setState(function (prevState) { return ({
|
|
244
|
+
isPseudoFocused: false,
|
|
245
|
+
isFocused: false,
|
|
246
|
+
isOpen: false,
|
|
247
|
+
inputValue: !_this.props.onCloseResetsInput || !_this.props.onBlurResetsInput ? prevState.inputValue : '',
|
|
248
|
+
}); });
|
|
249
|
+
break;
|
|
250
|
+
case 'Escape': // 27
|
|
251
|
+
if (!_this.state.isOpen && _this.props.clearable && _this.props.escapeClearsValue) {
|
|
252
|
+
_this.clearValue(event);
|
|
253
|
+
_this.setState({ isFocused: false, isPseudoFocused: false });
|
|
254
|
+
}
|
|
255
|
+
break;
|
|
256
|
+
case ' ': // space 32
|
|
257
|
+
if (_this.props.searchable) {
|
|
258
|
+
break;
|
|
259
|
+
}
|
|
260
|
+
event.preventDefault();
|
|
261
|
+
if (!_this.state.isOpen) {
|
|
262
|
+
_this.setState({ isOpen: true });
|
|
263
|
+
}
|
|
264
|
+
break;
|
|
265
|
+
case 'ArrowUp': // 38
|
|
266
|
+
event.preventDefault();
|
|
267
|
+
if (!_this.state.isOpen) {
|
|
268
|
+
_this.setState({ isOpen: true });
|
|
269
|
+
}
|
|
270
|
+
break;
|
|
271
|
+
case 'ArrowDown': // 40
|
|
272
|
+
event.preventDefault();
|
|
273
|
+
if (!_this.state.isOpen) {
|
|
274
|
+
_this.setState({ isOpen: true });
|
|
275
|
+
}
|
|
276
|
+
break;
|
|
277
|
+
case 'PageUp': // 33
|
|
278
|
+
event.preventDefault();
|
|
279
|
+
if (!_this.state.isOpen) {
|
|
280
|
+
_this.setState({ isOpen: true });
|
|
281
|
+
}
|
|
282
|
+
break;
|
|
283
|
+
case 'PageDown': // 34
|
|
284
|
+
event.preventDefault();
|
|
285
|
+
if (!_this.state.isOpen) {
|
|
286
|
+
_this.setState({ isOpen: true });
|
|
287
|
+
}
|
|
288
|
+
break;
|
|
289
|
+
case 'End': // 35
|
|
290
|
+
if (event.shiftKey) {
|
|
291
|
+
break;
|
|
292
|
+
}
|
|
293
|
+
event.preventDefault();
|
|
294
|
+
if (!_this.state.isOpen) {
|
|
295
|
+
_this.setState({ isOpen: true });
|
|
296
|
+
}
|
|
297
|
+
break;
|
|
298
|
+
case 'Home': // 36
|
|
299
|
+
if (event.shiftKey) {
|
|
300
|
+
break;
|
|
301
|
+
}
|
|
302
|
+
event.preventDefault();
|
|
303
|
+
if (!_this.state.isOpen) {
|
|
304
|
+
_this.setState({ isOpen: true });
|
|
305
|
+
}
|
|
306
|
+
break;
|
|
307
|
+
case 'Delete': // 46
|
|
308
|
+
if (!_this.state.inputValue && _this.props.deleteRemoves) {
|
|
309
|
+
event.preventDefault();
|
|
310
|
+
_this.popValue();
|
|
311
|
+
}
|
|
312
|
+
break;
|
|
313
|
+
default:
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
_this.getOptionLabel = function (locale, _a) {
|
|
318
|
+
var option = _a.option;
|
|
319
|
+
return option.isCreatable
|
|
320
|
+
? "".concat(locale.select.create, " \u201C").concat(_this.props.labelKey && option[_this.props.labelKey], "\u201D")
|
|
321
|
+
: _this.props.labelKey && option[_this.props.labelKey];
|
|
322
|
+
};
|
|
323
|
+
_this.getValueLabel = function (_a) {
|
|
324
|
+
var option = _a.option;
|
|
325
|
+
return _this.props.labelKey && option[_this.props.labelKey];
|
|
326
|
+
};
|
|
327
|
+
_this.handleActiveDescendantChange = function (id) {
|
|
328
|
+
if (id) {
|
|
329
|
+
_this.setState({ activeDescendant: id });
|
|
330
|
+
}
|
|
331
|
+
else {
|
|
332
|
+
_this.setState({ activeDescendant: null });
|
|
333
|
+
}
|
|
334
|
+
};
|
|
335
|
+
_this.handleInputRef = function (input) {
|
|
336
|
+
_this.input = input;
|
|
337
|
+
if (typeof _this.props.inputRef === 'function') {
|
|
338
|
+
_this.props.inputRef(input);
|
|
339
|
+
}
|
|
340
|
+
else if (_this.props.inputRef) {
|
|
341
|
+
// @ts-expect-error todo(flow->ts) MutableRefObject
|
|
342
|
+
_this.props.inputRef.current = input;
|
|
343
|
+
}
|
|
344
|
+
if (_this.props.controlRef && typeof _this.props.controlRef === 'function') {
|
|
345
|
+
// @ts-expect-error todo(flow->ts) according to types this code is not reachable
|
|
346
|
+
_this.props.controlRef(input);
|
|
347
|
+
}
|
|
348
|
+
};
|
|
349
|
+
_this.selectValue = function (_a) {
|
|
350
|
+
var item = _a.item;
|
|
351
|
+
if (item.disabled) {
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
_this.justSelected = true;
|
|
355
|
+
// NOTE: we add/set the value in a callback to make sure the
|
|
356
|
+
// input value is empty to avoid styling issues in Chrome
|
|
357
|
+
var updatedValue = _this.props.onSelectResetsInput ? '' : _this.state.inputValue;
|
|
358
|
+
if (_this.props.multi) {
|
|
359
|
+
if (item[constants_1.SELECT_ALL_ID]) {
|
|
360
|
+
var filteredOptionsWithoutSelectAllAndCreate_1 = _this.options.filter(function (val) { return !val[constants_1.SELECT_ALL_ID] && !(val === null || val === void 0 ? void 0 : val.isCreatable) && !val.disabled; });
|
|
361
|
+
_this.setState({
|
|
362
|
+
inputValue: updatedValue,
|
|
363
|
+
isOpen: !_this.props.closeOnSelect,
|
|
364
|
+
}, function () {
|
|
365
|
+
var valueArray = _this.props.value || [];
|
|
366
|
+
var valueKey = _this.props.valueKey;
|
|
367
|
+
var selectedValueSet = new Set(valueArray === null || valueArray === void 0 ? void 0 : valueArray.map(function (val) { return val[valueKey]; }));
|
|
368
|
+
var selectAllChecked = _this.props.__selectAllShouldReturnAllOptions
|
|
369
|
+
? _this.props.__selectAllSelected
|
|
370
|
+
: _this.getMemoizedSelectAllChecked(valueArray, filteredOptionsWithoutSelectAllAndCreate_1);
|
|
371
|
+
if (_this.props.__selectAllShouldReturnAllOptions) {
|
|
372
|
+
if (selectAllChecked) {
|
|
373
|
+
_this.setValue([], undefined, constants_1.STATE_CHANGE_TYPE.clear);
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
_this.setValue([], undefined, constants_1.STATE_CHANGE_TYPE.selectAll);
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
else if (selectAllChecked) {
|
|
380
|
+
var optionsIdSet_1 = new Set(filteredOptionsWithoutSelectAllAndCreate_1 === null || filteredOptionsWithoutSelectAllAndCreate_1 === void 0 ? void 0 : filteredOptionsWithoutSelectAllAndCreate_1.map(function (val) { return val[valueKey]; }));
|
|
381
|
+
_this.setValue(valueArray === null || valueArray === void 0 ? void 0 : valueArray.filter(function (val) { return !optionsIdSet_1.has(val[valueKey]); }), undefined, constants_1.STATE_CHANGE_TYPE.selectAll);
|
|
382
|
+
}
|
|
383
|
+
else {
|
|
384
|
+
var newValuesToAdd = filteredOptionsWithoutSelectAllAndCreate_1.filter(function (val) { return !selectedValueSet.has(val[valueKey]); });
|
|
385
|
+
_this.setValue(valueArray === null || valueArray === void 0 ? void 0 : valueArray.concat(newValuesToAdd), undefined, constants_1.STATE_CHANGE_TYPE.selectAll);
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
else {
|
|
390
|
+
_this.setState({
|
|
391
|
+
inputValue: updatedValue,
|
|
392
|
+
isOpen: !_this.props.closeOnSelect,
|
|
393
|
+
}, function () {
|
|
394
|
+
var valueArray = _this.props.value || [];
|
|
395
|
+
if (valueArray.some(function (i) { return _this.props.valueKey && i[_this.props.valueKey] === item[_this.props.valueKey]; })) {
|
|
396
|
+
_this.removeValue(item);
|
|
397
|
+
}
|
|
398
|
+
else {
|
|
399
|
+
_this.addValue(item);
|
|
400
|
+
}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
else {
|
|
405
|
+
_this.focus();
|
|
406
|
+
_this.setState({
|
|
407
|
+
inputValue: updatedValue,
|
|
408
|
+
isOpen: !_this.props.closeOnSelect,
|
|
409
|
+
isFocused: true,
|
|
410
|
+
isPseudoFocused: false,
|
|
411
|
+
}, function () {
|
|
412
|
+
_this.setValue([item], item, constants_1.STATE_CHANGE_TYPE.select);
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
_this.addValue = function (item) {
|
|
417
|
+
var valueArray = (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((_this.props.value || [])), false);
|
|
418
|
+
_this.setValue(valueArray.concat(item), item, constants_1.STATE_CHANGE_TYPE.select);
|
|
419
|
+
};
|
|
420
|
+
_this.backspaceValue = function () {
|
|
421
|
+
var _a;
|
|
422
|
+
var item = _this.popValue();
|
|
423
|
+
if (!item) {
|
|
424
|
+
return;
|
|
425
|
+
}
|
|
426
|
+
var valueLength = ((_a = _this.props.value) === null || _a === void 0 ? void 0 : _a.length) || 0;
|
|
427
|
+
var renderLabel = _this.props.getValueLabel || _this.getValueLabel;
|
|
428
|
+
var labelForInput = renderLabel({ option: item, index: valueLength - 1 });
|
|
429
|
+
// label might not be a string, it might be a Node of another kind.
|
|
430
|
+
if (!_this.props.backspaceClearsInputValue && typeof labelForInput === 'string') {
|
|
431
|
+
var remainingInput = labelForInput.slice(0, -1);
|
|
432
|
+
_this.setState({
|
|
433
|
+
inputValue: remainingInput,
|
|
434
|
+
isOpen: true,
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
};
|
|
438
|
+
_this.popValue = function () {
|
|
439
|
+
var valueArray = (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((_this.props.value || [])), false);
|
|
440
|
+
var valueLength = valueArray.length;
|
|
441
|
+
if (!valueLength)
|
|
442
|
+
return;
|
|
443
|
+
if (valueArray[valueLength - 1].clearableValue === false)
|
|
444
|
+
return;
|
|
445
|
+
var item = valueArray.pop();
|
|
446
|
+
_this.setValue(valueArray, item, constants_1.STATE_CHANGE_TYPE.remove);
|
|
447
|
+
return item;
|
|
448
|
+
};
|
|
449
|
+
_this.removeValue = function (item) {
|
|
450
|
+
var valueArray = (0, tslib_1.__spreadArray)([], (0, tslib_1.__read)((_this.props.value || [])), false);
|
|
451
|
+
var valueArrayFiltered = !Array.isArray(item)
|
|
452
|
+
? valueArray.filter(function (i) { return _this.props.valueKey && i[_this.props.valueKey] !== item[_this.props.valueKey]; })
|
|
453
|
+
: valueArray.filter(function (i) { return !item.some(function (itemObj) { return _this.props.valueKey && itemObj[_this.props.valueKey] === i[_this.props.valueKey]; }); });
|
|
454
|
+
_this.setValue(valueArrayFiltered, item, constants_1.STATE_CHANGE_TYPE.remove);
|
|
455
|
+
_this.focus();
|
|
456
|
+
};
|
|
457
|
+
_this.clearValue = function (event) {
|
|
458
|
+
if (isClick(event) && !isLeftClick(event))
|
|
459
|
+
return;
|
|
460
|
+
if (_this.props.value) {
|
|
461
|
+
var resetValue = _this.props.value.filter(function (item) { return item.clearableValue === false; });
|
|
462
|
+
_this.setValue(resetValue, null, constants_1.STATE_CHANGE_TYPE.clear);
|
|
463
|
+
}
|
|
464
|
+
_this.setState({
|
|
465
|
+
inputValue: '',
|
|
466
|
+
isOpen: false,
|
|
467
|
+
});
|
|
468
|
+
_this.focus();
|
|
469
|
+
_this.focusAfterClear = true;
|
|
470
|
+
};
|
|
471
|
+
_this.shouldShowPlaceholder = function () { return !(_this.state.inputValue || (_this.props.value && _this.props.value.length)); };
|
|
472
|
+
_this.shouldShowValue = function () { return !_this.state.inputValue; };
|
|
473
|
+
_this.isSelectAllChecked = function (valueArray, filteredOptions) {
|
|
474
|
+
var filteredOptionsWithoutSelectAll = filteredOptions.filter(function (val) { return !val[constants_1.SELECT_ALL_ID] && !(val === null || val === void 0 ? void 0 : val.isCreatable) && !val.disabled; });
|
|
475
|
+
var selectedValueSet = new Set(valueArray.map(function (val) { return val[_this.props.valueKey]; }));
|
|
476
|
+
return filteredOptionsWithoutSelectAll.every(function (val) { return selectedValueSet.has(val[_this.props.valueKey]); });
|
|
477
|
+
};
|
|
478
|
+
_this.getMemoizedSelectAllChecked = (0, memoize_one_1.default)(function (valueArray, filteredOptions) {
|
|
479
|
+
return _this.isSelectAllChecked(valueArray, filteredOptions);
|
|
480
|
+
});
|
|
481
|
+
_this.getMemoizedNormalizedOptions = (0, memoize_one_1.default)(function (options) { return (0, utils_1.normalizeOptions)(options); });
|
|
482
|
+
return _this;
|
|
483
|
+
}
|
|
484
|
+
Select.prototype.componentDidMount = function () {
|
|
485
|
+
if (this.props.autoFocus) {
|
|
486
|
+
this.focus();
|
|
487
|
+
}
|
|
488
|
+
this.isItMounted = true;
|
|
489
|
+
var controlRef = this.props.controlRef;
|
|
490
|
+
if (controlRef && typeof controlRef !== 'function') {
|
|
491
|
+
controlRef.current = {
|
|
492
|
+
setDropdownOpen: this.handleDropdownOpen.bind(this),
|
|
493
|
+
setInputValue: this.handleSetInputValue.bind(this),
|
|
494
|
+
setInputFocus: this.handleSetInputFocus.bind(this),
|
|
495
|
+
setInputBlur: this.handleSetInputBlur.bind(this),
|
|
496
|
+
// `focus` & `blur` below are for backwards compatibility and may be removed. Use setInputFocus and setInputBlur instead.
|
|
497
|
+
focus: this.handleSetInputFocus.bind(this),
|
|
498
|
+
blur: this.handleSetInputBlur.bind(this),
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
};
|
|
502
|
+
Select.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
503
|
+
var _this = this;
|
|
504
|
+
if (!spacewebProvider_1.isServer) {
|
|
505
|
+
if (prevState.isOpen !== this.state.isOpen) {
|
|
506
|
+
if (this.state.isOpen) {
|
|
507
|
+
this.props.onOpen && this.props.onOpen();
|
|
508
|
+
document.addEventListener('touchstart', this.handleTouchOutside);
|
|
509
|
+
}
|
|
510
|
+
else {
|
|
511
|
+
this.props.onClose && this.props.onClose();
|
|
512
|
+
document.removeEventListener('touchstart', this.handleTouchOutside);
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
if (!prevState.isFocused && this.state.isFocused) {
|
|
516
|
+
setTimeout(function () { return document.addEventListener('click', _this.handleClickOutside); }, 0);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
};
|
|
520
|
+
Select.prototype.componentWillUnmount = function () {
|
|
521
|
+
if (!spacewebProvider_1.isServer) {
|
|
522
|
+
document.removeEventListener('touchstart', this.handleTouchOutside);
|
|
523
|
+
document.removeEventListener('click', this.handleClickOutside);
|
|
524
|
+
}
|
|
525
|
+
this.isItMounted = false;
|
|
526
|
+
};
|
|
527
|
+
Select.prototype.focus = function () {
|
|
528
|
+
if (!this.input)
|
|
529
|
+
return;
|
|
530
|
+
this.input.focus();
|
|
531
|
+
};
|
|
532
|
+
Select.prototype.handleDropdownOpen = function (nextOpenState) {
|
|
533
|
+
this.setState({
|
|
534
|
+
isOpen: nextOpenState,
|
|
535
|
+
});
|
|
536
|
+
};
|
|
537
|
+
Select.prototype.handleSetInputValue = function (newInputValue) {
|
|
538
|
+
this.setState({
|
|
539
|
+
inputValue: newInputValue,
|
|
540
|
+
});
|
|
541
|
+
};
|
|
542
|
+
Select.prototype.handleSetInputFocus = function () {
|
|
543
|
+
var _a;
|
|
544
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.focus();
|
|
545
|
+
};
|
|
546
|
+
Select.prototype.handleSetInputBlur = function () {
|
|
547
|
+
var _a;
|
|
548
|
+
(_a = this.input) === null || _a === void 0 ? void 0 : _a.blur();
|
|
549
|
+
};
|
|
550
|
+
Select.prototype.closeMenu = function () {
|
|
551
|
+
if (this.props.onCloseResetsInput) {
|
|
552
|
+
this.setState({
|
|
553
|
+
inputValue: '',
|
|
554
|
+
isOpen: false,
|
|
555
|
+
isPseudoFocused: this.state.isFocused && !this.props.multi,
|
|
556
|
+
});
|
|
557
|
+
}
|
|
558
|
+
else {
|
|
559
|
+
this.setState({
|
|
560
|
+
isOpen: false,
|
|
561
|
+
isPseudoFocused: this.state.isFocused && !this.props.multi,
|
|
562
|
+
});
|
|
563
|
+
}
|
|
564
|
+
};
|
|
565
|
+
/**
|
|
566
|
+
* Extends the value into an array from the given options
|
|
567
|
+
*/
|
|
568
|
+
Select.prototype.getValueArray = function (value) {
|
|
569
|
+
var _this = this;
|
|
570
|
+
if (!Array.isArray(value)) {
|
|
571
|
+
if (value === null || value === undefined)
|
|
572
|
+
return [];
|
|
573
|
+
value = [value];
|
|
574
|
+
}
|
|
575
|
+
return value.map(function (value) { return (0, utils_1.expandValue)(value, _this.props); });
|
|
576
|
+
};
|
|
577
|
+
Select.prototype.setValue = function (value, option, type) {
|
|
578
|
+
if (this.props.onChange) {
|
|
579
|
+
this.props.onChange({
|
|
580
|
+
value: value,
|
|
581
|
+
option: option,
|
|
582
|
+
type: type,
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
Select.prototype.renderLoading = function () {
|
|
587
|
+
if (!this.props.isLoading)
|
|
588
|
+
return;
|
|
589
|
+
var _a = this.props.overrides, overrides = _a === void 0 ? {} : _a;
|
|
590
|
+
var _b = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.LoadingIndicator, function () { return null; }), 2), LoadingIndicator = _b[0], loadingIndicatorProps = _b[1];
|
|
591
|
+
return ((0, jsx_runtime_1.jsx)(LoadingIndicator, (0, tslib_1.__assign)({ role: "status" }, loadingIndicatorProps, { children: (0, jsx_runtime_1.jsx)("span", (0, tslib_1.__assign)({ style: {
|
|
592
|
+
position: 'absolute',
|
|
593
|
+
width: '1px',
|
|
594
|
+
height: '1px',
|
|
595
|
+
padding: 0,
|
|
596
|
+
margin: '-1px',
|
|
597
|
+
overflow: 'hidden',
|
|
598
|
+
clip: 'rect(0,0,0,0)',
|
|
599
|
+
whiteSpace: 'nowrap',
|
|
600
|
+
border: 0,
|
|
601
|
+
} }, { children: "Loading" }), void 0) }), void 0));
|
|
602
|
+
};
|
|
603
|
+
Select.prototype.renderValue = function (valueArray) {
|
|
604
|
+
var _this = this;
|
|
605
|
+
var _a = this.props.overrides, overrides = _a === void 0 ? {} : _a;
|
|
606
|
+
var sharedProps = this.getSharedProps();
|
|
607
|
+
var renderLabel = this.props.getValueLabel || this.getValueLabel;
|
|
608
|
+
var Value = this.props.valueComponent || Noop;
|
|
609
|
+
if (!valueArray.length) {
|
|
610
|
+
return null;
|
|
611
|
+
}
|
|
612
|
+
if (this.props.multi) {
|
|
613
|
+
return valueArray.map(function (value, i) {
|
|
614
|
+
var disabled = sharedProps.$disabled || value.clearableValue === false;
|
|
615
|
+
return ((0, jsx_runtime_1.jsx)(Value, (0, tslib_1.__assign)({ value: value, removeValue: function () { return _this.removeValue(value); }, disabled: disabled, overrides: { Tag: overrides.Tag, MultiValue: overrides.MultiValue } }, sharedProps, { "$disabled": disabled }, { children: renderLabel({ option: value, index: i }) }), "value-".concat(i, "-").concat(_this.props.valueKey && value[_this.props.valueKey])));
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
if (this.shouldShowValue()) {
|
|
619
|
+
return ((0, jsx_runtime_1.jsx)(Value, (0, tslib_1.__assign)({ value: this.props.valueKey && valueArray[0][this.props.valueKey], disabled: this.props.disabled, overrides: { SingleValue: overrides.SingleValue } }, sharedProps, { children: renderLabel({ option: valueArray[0] }) }), void 0));
|
|
620
|
+
}
|
|
621
|
+
return null;
|
|
622
|
+
};
|
|
623
|
+
Select.prototype.renderInput = function (listboxId) {
|
|
624
|
+
var _this = this;
|
|
625
|
+
var _a;
|
|
626
|
+
var _b = this.props.overrides, overrides = _b === void 0 ? {} : _b;
|
|
627
|
+
var _c = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.InputContainer, styled_components_1.StyledInputContainer), 2), InputContainer = _c[0], inputContainerProps = _c[1];
|
|
628
|
+
var sharedProps = this.getSharedProps();
|
|
629
|
+
var isOpen = this.state.isOpen;
|
|
630
|
+
var selected = this.getValueArray(this.props.value || [])
|
|
631
|
+
.map(function (v) { return _this.props.labelKey && v[_this.props.labelKey]; })
|
|
632
|
+
.join(', ');
|
|
633
|
+
var selectedLabel = selected.length ? "Selected ".concat(selected, ". ") : '';
|
|
634
|
+
var label = "".concat(selectedLabel).concat(this.props['aria-label'] || '');
|
|
635
|
+
if (!this.props.searchable) {
|
|
636
|
+
return ((0, jsx_runtime_1.jsx)(InputContainer, (0, tslib_1.__assign)({ "aria-activedescendant": this.state.activeDescendant, "aria-describedby": this.props['aria-describedby'], "aria-errormessage": this.props['aria-errormessage'], "aria-disabled": this.props.disabled, "aria-labelledby": this.props['aria-labelledby'], "aria-owns": this.state.isOpen ? listboxId : null, "aria-required": this.props.required || null, onFocus: this.handleInputFocus, tabIndex: 0 }, sharedProps, inputContainerProps, { children: (0, jsx_runtime_1.jsx)("input", (0, tslib_1.__assign)({ "aria-hidden": true, id: this.props.id || undefined, ref: this.handleInputRef, style: {
|
|
637
|
+
opacity: 0,
|
|
638
|
+
width: 0,
|
|
639
|
+
overflow: 'hidden',
|
|
640
|
+
border: 'none',
|
|
641
|
+
padding: 0,
|
|
642
|
+
}, tabIndex: -1 }, (overrides.Input
|
|
643
|
+
? overrides.Input.props
|
|
644
|
+
? // $FlowExpectedError[not-an-object]
|
|
645
|
+
// @ts-ignore
|
|
646
|
+
(0, helpers_1.omit$props)(overrides.Input.props)
|
|
647
|
+
: {}
|
|
648
|
+
: {})), void 0) }), void 0));
|
|
649
|
+
}
|
|
650
|
+
return ((0, jsx_runtime_1.jsx)(InputContainer, (0, tslib_1.__assign)({}, sharedProps, inputContainerProps, { children: (0, jsx_runtime_1.jsx)(autosize_input_1.default, (0, tslib_1.__assign)({ "aria-activedescendant": this.state.activeDescendant, "aria-autocomplete": "list", "aria-controls": this.state.isOpen ? listboxId : null, "aria-describedby": this.props['aria-describedby'], "aria-errormessage": this.props['aria-errormessage'], "aria-disabled": this.props.disabled || null, "aria-expanded": isOpen, "aria-haspopup": "listbox", "aria-label": label, "aria-labelledby": this.props['aria-labelledby'], "aria-required": this.props.required || null, disabled: this.props.disabled || null, id: this.props.id || null, inputRef: this.handleInputRef, onChange: this.handleInputChange, onFocus: this.handleInputFocus, overrides: { Input: overrides.Input }, required: (this.props.required && !((_a = this.props.value) === null || _a === void 0 ? void 0 : _a.length)) || null, role: "combobox", value: this.state.inputValue, tabIndex: 0 }, sharedProps), void 0) }), void 0));
|
|
651
|
+
};
|
|
652
|
+
Select.prototype.renderClear = function () {
|
|
653
|
+
var _a;
|
|
654
|
+
var isValueEntered = Boolean((this.props.value && this.props.value.length) || this.state.inputValue);
|
|
655
|
+
if (!this.props.clearable || this.props.disabled || this.props.isLoading || !isValueEntered) {
|
|
656
|
+
return null;
|
|
657
|
+
}
|
|
658
|
+
var _b = this.getSharedProps(), $size = _b.$size, sharedProps = (0, tslib_1.__rest)(_b, ["$size"]);
|
|
659
|
+
var _c = this.props.overrides, overrides = _c === void 0 ? {} : _c;
|
|
660
|
+
var _d = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.ClearIcon, function () { return null; }), 2), ClearIcon = _d[0], clearIconProps = _d[1];
|
|
661
|
+
var ariaLabel = this.props.multi ? 'Clear all' : 'Clear value';
|
|
662
|
+
var sizes = (_a = {},
|
|
663
|
+
_a[constants_1.SIZE.mini] = 15,
|
|
664
|
+
_a[constants_1.SIZE.compact] = 15,
|
|
665
|
+
_a[constants_1.SIZE.default] = 18,
|
|
666
|
+
_a[constants_1.SIZE.large] = 22,
|
|
667
|
+
_a);
|
|
668
|
+
return ((0, jsx_runtime_1.jsx)(ClearIcon, (0, tslib_1.__assign)({ title: ariaLabel, "aria-label": ariaLabel, onClick: this.clearValue, role: "button", size: sizes[this.props.size] || sizes[constants_1.SIZE.default] }, sharedProps, clearIconProps), void 0));
|
|
669
|
+
};
|
|
670
|
+
Select.prototype.renderArrow = function () {
|
|
671
|
+
var _a;
|
|
672
|
+
if (this.props.type !== constants_1.TYPE.select) {
|
|
673
|
+
return null;
|
|
674
|
+
}
|
|
675
|
+
var _b = this.getSharedProps(), $size = _b.$size, sharedProps = (0, tslib_1.__rest)(_b, ["$size"]);
|
|
676
|
+
var _c = this.props.overrides, overrides = _c === void 0 ? {} : _c;
|
|
677
|
+
var _d = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.SelectArrow, function () { return null; }), 2), SelectArrow = _d[0], selectArrowProps = _d[1];
|
|
678
|
+
selectArrowProps.overrides = (0, overrides_1.mergeOverrides)({
|
|
679
|
+
Svg: {
|
|
680
|
+
style: function (_a) {
|
|
681
|
+
var $theme = _a.$theme, $disabled = _a.$disabled;
|
|
682
|
+
return ({
|
|
683
|
+
color: $disabled ? $theme.colors.inputTextDisabled : $theme.colors.contentPrimary,
|
|
684
|
+
});
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
}, selectArrowProps.overrides);
|
|
688
|
+
var sizes = (_a = {},
|
|
689
|
+
_a[constants_1.SIZE.mini] = 16,
|
|
690
|
+
_a[constants_1.SIZE.compact] = 16,
|
|
691
|
+
_a[constants_1.SIZE.default] = 20,
|
|
692
|
+
_a[constants_1.SIZE.large] = 24,
|
|
693
|
+
_a);
|
|
694
|
+
return ((0, jsx_runtime_1.jsx)(SelectArrow, (0, tslib_1.__assign)({ size: (this.props.size && sizes[this.props.size]) || sizes[constants_1.SIZE.default], title: "open" }, sharedProps, selectArrowProps), void 0));
|
|
695
|
+
};
|
|
696
|
+
Select.prototype.renderSearch = function () {
|
|
697
|
+
if (this.props.type !== constants_1.TYPE.search) {
|
|
698
|
+
return null;
|
|
699
|
+
}
|
|
700
|
+
var _a = this.props.overrides, overrides = _a === void 0 ? {} : _a;
|
|
701
|
+
var _b = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.SearchIconContainer, styled_components_1.StyledSearchIconContainer), 2), SearchIconContainer = _b[0], searchIconContainerProps = _b[1];
|
|
702
|
+
var _c = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.SearchIcon, function () { return null; }), 2), SearchIcon = _c[0], searchIconProps = _c[1];
|
|
703
|
+
var sharedProps = this.getSharedProps();
|
|
704
|
+
return ((0, jsx_runtime_1.jsx)(SearchIconContainer, (0, tslib_1.__assign)({}, sharedProps, searchIconContainerProps, { children: (0, jsx_runtime_1.jsx)(SearchIcon, (0, tslib_1.__assign)({ size: 16, title: "search" }, sharedProps, searchIconProps), void 0) }), void 0));
|
|
705
|
+
};
|
|
706
|
+
Select.prototype.filterOptions = function (excludeOptions, filterValue, options) {
|
|
707
|
+
var _a, _b;
|
|
708
|
+
var _this = this;
|
|
709
|
+
if (filterValue === void 0) { filterValue = this.state.inputValue.trim(); }
|
|
710
|
+
if (options === void 0) { options = this.props.options; }
|
|
711
|
+
var filteredOptions = this.getMemoizedNormalizedOptions(options);
|
|
712
|
+
// apply filter function
|
|
713
|
+
if (this.props.filterOptions) {
|
|
714
|
+
filteredOptions = this.props.filterOptions(filteredOptions, filterValue, excludeOptions, {
|
|
715
|
+
valueKey: this.props.valueKey || '',
|
|
716
|
+
labelKey: this.props.labelKey || '',
|
|
717
|
+
});
|
|
718
|
+
}
|
|
719
|
+
if (this.props.multi) {
|
|
720
|
+
if (!this.props.hideSelectAll && filteredOptions.length > 0) {
|
|
721
|
+
filteredOptions = (0, tslib_1.__spreadArray)([
|
|
722
|
+
(_a = {},
|
|
723
|
+
_a[this.props.valueKey] = constants_1.SELECT_ALL_ID,
|
|
724
|
+
_a[this.props.labelKey] = "".concat(locale_2.default.selectAllLabel, " ").concat(this.props.__selectAllShouldReturnAllOptions ? '' : "(".concat(filteredOptions.length, ")")),
|
|
725
|
+
_a[constants_1.SELECT_ALL_ID] = true,
|
|
726
|
+
_a)
|
|
727
|
+
], (0, tslib_1.__read)(filteredOptions), false);
|
|
728
|
+
}
|
|
729
|
+
}
|
|
730
|
+
// can user create a new option + there's no exact match already
|
|
731
|
+
var filterDoesNotMatchOption = this.props.ignoreCase
|
|
732
|
+
? // @ts-ignore
|
|
733
|
+
function (// @ts-ignore
|
|
734
|
+
opt) { return opt[_this.props.labelKey].toLowerCase() !== filterValue.toLowerCase().trim(); }
|
|
735
|
+
: // @ts-ignore
|
|
736
|
+
function (// @ts-ignore
|
|
737
|
+
opt) { return opt[_this.props.labelKey] !== filterValue.trim(); };
|
|
738
|
+
if (filterValue &&
|
|
739
|
+
this.props.creatable &&
|
|
740
|
+
filteredOptions.concat(this.props.value || []).every(filterDoesNotMatchOption)) {
|
|
741
|
+
return filteredOptions.concat((_b = {
|
|
742
|
+
id: filterValue
|
|
743
|
+
},
|
|
744
|
+
_b[this.props.labelKey || ''] = filterValue,
|
|
745
|
+
_b[this.props.valueKey || ''] = filterValue,
|
|
746
|
+
_b.isCreatable = true,
|
|
747
|
+
_b));
|
|
748
|
+
}
|
|
749
|
+
return filteredOptions;
|
|
750
|
+
};
|
|
751
|
+
Select.prototype.getSharedProps = function () {
|
|
752
|
+
var _a = this.props, clearable = _a.clearable, creatable = _a.creatable, disabled = _a.disabled, error = _a.error, positive = _a.positive, isLoading = _a.isLoading, multi = _a.multi, required = _a.required, size = _a.size, searchable = _a.searchable, type = _a.type, value = _a.value;
|
|
753
|
+
var _b = this.state, isOpen = _b.isOpen, isFocused = _b.isFocused, isPseudoFocused = _b.isPseudoFocused;
|
|
754
|
+
return {
|
|
755
|
+
$clearable: clearable,
|
|
756
|
+
$creatable: creatable,
|
|
757
|
+
$disabled: disabled,
|
|
758
|
+
$error: error,
|
|
759
|
+
$positive: positive,
|
|
760
|
+
$isFocused: isFocused,
|
|
761
|
+
$isLoading: isLoading,
|
|
762
|
+
$isOpen: isOpen,
|
|
763
|
+
$isPseudoFocused: isPseudoFocused,
|
|
764
|
+
$multi: multi,
|
|
765
|
+
$required: required,
|
|
766
|
+
$searchable: searchable,
|
|
767
|
+
$size: size,
|
|
768
|
+
$type: type,
|
|
769
|
+
$isEmpty: !this.getValueArray(value || []).length,
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
Select.prototype.render = function () {
|
|
773
|
+
var _this = this;
|
|
774
|
+
var _a;
|
|
775
|
+
var _b = this.props, _c = _b.overrides, overrides = _c === void 0 ? {} : _c, type = _b.type, multi = _b.multi, noResultsMsg = _b.noResultsMsg, value = _b.value, filterOutSelected = _b.filterOutSelected, __selectAllSelected = _b.__selectAllSelected, __selectAllShouldReturnAllOptions = _b.__selectAllShouldReturnAllOptions;
|
|
776
|
+
if (__DEV__) {
|
|
777
|
+
// value may be nullish, only warn if value is defined
|
|
778
|
+
if (value && !Array.isArray(value)) {
|
|
779
|
+
console.warn('The Select component expects an array as the value prop. For more information, please visit the docs at https://baseweb.design/components/select/');
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
var _d = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.Root, styled_components_1.StyledRoot), 2), Root = _d[0], rootProps = _d[1];
|
|
783
|
+
var _e = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.ControlContainer, styled_components_1.StyledControlContainer), 2), ControlContainer = _e[0], controlContainerProps = _e[1];
|
|
784
|
+
var _f = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.ValueContainer, styled_components_1.StyledValueContainer), 2), ValueContainer = _f[0], valueContainerProps = _f[1];
|
|
785
|
+
var _g = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.IconsContainer, styled_components_1.StyledIconsContainer), 2), IconsContainer = _g[0], iconsContainerProps = _g[1];
|
|
786
|
+
var _h = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.Popover, popover_1.Popover), 2), PopoverOverride = _h[0], popoverProps = _h[1];
|
|
787
|
+
var _j = (0, tslib_1.__read)((0, overrides_1.getOverrides)(overrides.Placeholder, styled_components_1.StyledPlaceholder), 2), Placeholder = _j[0], placeholderProps = _j[1];
|
|
788
|
+
var sharedProps = this.getSharedProps();
|
|
789
|
+
var valueArray = this.getValueArray(value || []);
|
|
790
|
+
this.options = this.filterOptions(multi && filterOutSelected ? valueArray : null, (_a = this.props.__inputValue) !== null && _a !== void 0 ? _a : this.state.inputValue.trim(), this.props.options);
|
|
791
|
+
var options = this.options;
|
|
792
|
+
var selectAllChecked = __selectAllShouldReturnAllOptions
|
|
793
|
+
? __selectAllSelected
|
|
794
|
+
: this.getMemoizedSelectAllChecked(valueArray, options);
|
|
795
|
+
var isOpen = this.state.isOpen;
|
|
796
|
+
sharedProps.$isOpen = isOpen;
|
|
797
|
+
if (__DEV__) {
|
|
798
|
+
if (this.props.error && this.props.positive) {
|
|
799
|
+
console.warn('[Select] `error` and `positive` are both set to `true`. `error` will take precedence but this may not be what you want.');
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
return ((0, jsx_runtime_1.jsx)(react_uid_1.UIDConsumer, { children: function (listboxId) { return ((0, jsx_runtime_1.jsx)(locale_1.LocaleContext.Consumer, { children: function (locale) { return ((0, jsx_runtime_1.jsx)(PopoverOverride
|
|
803
|
+
// Popover does not provide ability to forward refs through, and if we were to simply
|
|
804
|
+
// apply the ref to the Root component below it would be overwritten before the popover
|
|
805
|
+
// renders it. Using this strategy, we will get a ref to the popover, then reuse its
|
|
806
|
+
// anchorRef so we can check if clicks are on the select component or not.
|
|
807
|
+
, (0, tslib_1.__assign)({
|
|
808
|
+
// Popover does not provide ability to forward refs through, and if we were to simply
|
|
809
|
+
// apply the ref to the Root component below it would be overwritten before the popover
|
|
810
|
+
// renders it. Using this strategy, we will get a ref to the popover, then reuse its
|
|
811
|
+
// anchorRef so we can check if clicks are on the select component or not.
|
|
812
|
+
innerRef: function (ref) {
|
|
813
|
+
if (!ref)
|
|
814
|
+
return;
|
|
815
|
+
_this.anchor = ref.anchorRef;
|
|
816
|
+
}, accessibilityType: popover_1.ACCESSIBILITY_TYPE.none, autoFocus: false, focusLock: false, mountNode: _this.props.mountNode, onEsc: function () { return _this.closeMenu(); }, isOpen: isOpen, popoverMargin: 0, content: function () {
|
|
817
|
+
var dropdownProps = {
|
|
818
|
+
error: _this.props.error || false,
|
|
819
|
+
positive: _this.props.positive,
|
|
820
|
+
getOptionLabel: _this.props.getOptionLabel || _this.getOptionLabel.bind(_this, locale),
|
|
821
|
+
id: listboxId,
|
|
822
|
+
isLoading: _this.props.isLoading || false,
|
|
823
|
+
labelKey: _this.props.labelKey || '',
|
|
824
|
+
maxDropdownHeight: _this.props.maxDropdownHeight || '',
|
|
825
|
+
multi: multi || false,
|
|
826
|
+
noResultsMsg: noResultsMsg,
|
|
827
|
+
onActiveDescendantChange: _this.handleActiveDescendantChange,
|
|
828
|
+
onItemSelect: _this.selectValue,
|
|
829
|
+
selectAllChecked: selectAllChecked,
|
|
830
|
+
options: options,
|
|
831
|
+
overrides: overrides,
|
|
832
|
+
required: _this.props.required || false,
|
|
833
|
+
searchable: _this.props.searchable || true,
|
|
834
|
+
size: _this.props.size || 'default',
|
|
835
|
+
type: type || 'select',
|
|
836
|
+
value: valueArray,
|
|
837
|
+
valueKey: _this.props.valueKey || '',
|
|
838
|
+
width: _this.anchor.current ? _this.anchor.current.clientWidth : null,
|
|
839
|
+
keyboardControlNode: _this.anchor,
|
|
840
|
+
};
|
|
841
|
+
return (0, jsx_runtime_1.jsx)(dropdown_1.default, (0, tslib_1.__assign)({ innerRef: _this.dropdown }, dropdownProps), void 0);
|
|
842
|
+
}, placement: popover_1.PLACEMENT.bottom }, popoverProps, { children: (0, jsx_runtime_1.jsx)(Root, (0, tslib_1.__assign)({ onBlur: _this.handleBlur, "data-baseweb": "select" }, sharedProps, rootProps, { children: (0, jsx_runtime_1.jsxs)(ControlContainer, (0, tslib_1.__assign)({ onKeyDown: _this.handleKeyDown, onClick: _this.handleClick, onTouchEnd: _this.handleTouchEnd, onTouchMove: _this.handleTouchMove, onTouchStart: _this.handleTouchStart }, sharedProps, controlContainerProps, { children: [type === constants_1.TYPE.search ? _this.renderSearch() : null, (0, jsx_runtime_1.jsxs)(ValueContainer, (0, tslib_1.__assign)({}, sharedProps, valueContainerProps, { children: [_this.renderValue(valueArray), _this.renderInput(listboxId), _this.shouldShowPlaceholder() ? ((0, jsx_runtime_1.jsx)(Placeholder, (0, tslib_1.__assign)({}, sharedProps, placeholderProps, { children: typeof _this.props.placeholder !== 'undefined'
|
|
843
|
+
? _this.props.placeholder
|
|
844
|
+
: locale.select.placeholder }), void 0)) : null] }), void 0), (0, jsx_runtime_1.jsxs)(IconsContainer, (0, tslib_1.__assign)({}, sharedProps, iconsContainerProps, { children: [_this.renderLoading(), _this.renderClear(), type === constants_1.TYPE.select ? _this.renderArrow() : null] }), void 0)] }), void 0) }), void 0) }), void 0)); } }, void 0)); } }, void 0));
|
|
845
|
+
};
|
|
846
|
+
Select.defaultProps = default_props_1.default;
|
|
847
|
+
return Select;
|
|
848
|
+
}(React.Component));
|
|
849
|
+
exports.default = Select;
|