@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,368 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/*
|
|
4
|
+
Copyright (c) Uber Technologies, Inc.
|
|
5
|
+
|
|
6
|
+
This source code is licensed under the MIT license found in the
|
|
7
|
+
LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
import FocusLock, { MoveFocusInside } from 'react-focus-lock';
|
|
11
|
+
import { getOverride, getOverrideProps } from '../helpers/overrides';
|
|
12
|
+
import { ACCESSIBILITY_TYPE, PLACEMENT, TRIGGER_TYPE, ANIMATE_OUT_TIME, ANIMATE_IN_TIME, POPOVER_MARGIN, } from './constants';
|
|
13
|
+
import { Layer, TetherBehavior } from '../layer';
|
|
14
|
+
import { Arrow as StyledArrow, Body as StyledBody, Inner as StyledInner, Hidden } from './styled-components';
|
|
15
|
+
import { fromPopperPlacement } from './utils';
|
|
16
|
+
import defaultProps from './default-props';
|
|
17
|
+
import { useUID } from 'react-uid';
|
|
18
|
+
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
19
|
+
function getDefaultState(props) {
|
|
20
|
+
return {
|
|
21
|
+
isAnimating: false,
|
|
22
|
+
arrowOffset: { left: 0, top: 0 },
|
|
23
|
+
popoverOffset: { left: 0, top: 0 },
|
|
24
|
+
placement: props.placement,
|
|
25
|
+
isMounted: false,
|
|
26
|
+
isLayerMounted: false,
|
|
27
|
+
autoFocusAfterPositioning: false,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var PopoverInner = /** @class */ (function (_super) {
|
|
31
|
+
__extends(PopoverInner, _super);
|
|
32
|
+
function PopoverInner() {
|
|
33
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
34
|
+
_this.anchorRef = React.createRef();
|
|
35
|
+
_this.popperRef = React.createRef();
|
|
36
|
+
_this.arrowRef = React.createRef();
|
|
37
|
+
/* eslint-enable react/sort-comp */
|
|
38
|
+
/**
|
|
39
|
+
* Yes our "Stateless" popover still has state. This is private state that
|
|
40
|
+
* customers shouldn't have to manage themselves, such as positioning and
|
|
41
|
+
* other internal flags for managing animation states.
|
|
42
|
+
*/
|
|
43
|
+
// @ts-ignore
|
|
44
|
+
_this.state = getDefaultState(_this.props);
|
|
45
|
+
_this.animateIn = function () {
|
|
46
|
+
if (_this.props.isOpen) {
|
|
47
|
+
_this.setState({ isAnimating: true });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
_this.animateOut = function () {
|
|
51
|
+
if (!_this.props.isOpen) {
|
|
52
|
+
_this.setState({ isAnimating: true });
|
|
53
|
+
// Remove the popover from the DOM after animation finishes
|
|
54
|
+
_this.animateOutCompleteTimer = setTimeout(function () {
|
|
55
|
+
_this.setState({
|
|
56
|
+
isAnimating: false,
|
|
57
|
+
// Reset to ideal placement specified in props
|
|
58
|
+
// @ts-ignore
|
|
59
|
+
placement: _this.props.placement,
|
|
60
|
+
});
|
|
61
|
+
}, _this.props.animateOutTime || ANIMATE_OUT_TIME);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
_this.onAnchorClick = function (e) {
|
|
65
|
+
if (_this.props.onClick) {
|
|
66
|
+
_this.props.onClick(e);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
_this.onAnchorMouseEnter = function (e) {
|
|
70
|
+
// First clear any existing close timers, this ensures that the user can
|
|
71
|
+
// move their mouse from the popover back to anchor without it hiding
|
|
72
|
+
if (_this.onMouseLeaveTimer) {
|
|
73
|
+
clearTimeout(_this.onMouseLeaveTimer);
|
|
74
|
+
}
|
|
75
|
+
_this.triggerOnMouseEnterWithDelay(e);
|
|
76
|
+
};
|
|
77
|
+
_this.onAnchorMouseLeave = function (e) {
|
|
78
|
+
// Clear any existing open timer, otherwise popover could be stuck open
|
|
79
|
+
if (_this.onMouseEnterTimer) {
|
|
80
|
+
clearTimeout(_this.onMouseEnterTimer);
|
|
81
|
+
}
|
|
82
|
+
_this.triggerOnMouseLeaveWithDelay(e);
|
|
83
|
+
};
|
|
84
|
+
_this.onPopoverMouseEnter = function () {
|
|
85
|
+
if (_this.onMouseLeaveTimer) {
|
|
86
|
+
clearTimeout(_this.onMouseLeaveTimer);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
_this.onPopoverMouseLeave = function (e) {
|
|
90
|
+
_this.triggerOnMouseLeaveWithDelay(e);
|
|
91
|
+
};
|
|
92
|
+
_this.onPopperUpdate = function (normalizedOffsets, data) {
|
|
93
|
+
var placement = fromPopperPlacement(data.placement) || PLACEMENT.top;
|
|
94
|
+
_this.setState({
|
|
95
|
+
// @ts-ignore
|
|
96
|
+
arrowOffset: normalizedOffsets.arrow,
|
|
97
|
+
popoverOffset: normalizedOffsets.popper,
|
|
98
|
+
placement: placement,
|
|
99
|
+
});
|
|
100
|
+
// Now that element has been positioned, we can animate it in
|
|
101
|
+
_this.animateInTimer = setTimeout(_this.animateIn, ANIMATE_IN_TIME);
|
|
102
|
+
return data;
|
|
103
|
+
};
|
|
104
|
+
_this.triggerOnMouseLeave = function (e) {
|
|
105
|
+
if (_this.props.onMouseLeave) {
|
|
106
|
+
_this.props.onMouseLeave(e);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
_this.triggerOnMouseEnter = function (e) {
|
|
110
|
+
if (_this.props.onMouseEnter) {
|
|
111
|
+
_this.props.onMouseEnter(e);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
_this.onDocumentClick = function (evt) {
|
|
115
|
+
var target = evt.composedPath ? evt.composedPath()[0] : evt.target;
|
|
116
|
+
var popper = _this.popperRef.current;
|
|
117
|
+
var anchor = _this.anchorRef.current;
|
|
118
|
+
// Ignore document click if it came from popover or anchor
|
|
119
|
+
if (!popper || popper === target || (target instanceof Node && popper.contains(target))) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!anchor || anchor === target || (target instanceof Node && anchor.contains(target))) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
if (_this.props.onClickOutside) {
|
|
126
|
+
_this.props.onClickOutside(evt);
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
return _this;
|
|
130
|
+
}
|
|
131
|
+
PopoverInner.prototype.componentDidMount = function () {
|
|
132
|
+
this.setState({ isMounted: true });
|
|
133
|
+
};
|
|
134
|
+
PopoverInner.prototype.componentDidUpdate = function (prevProps, prevState) {
|
|
135
|
+
this.init(prevProps, prevState);
|
|
136
|
+
if (this.props.accessibilityType !== ACCESSIBILITY_TYPE.tooltip &&
|
|
137
|
+
this.props.autoFocus &&
|
|
138
|
+
!this.state.autoFocusAfterPositioning &&
|
|
139
|
+
this.popperRef.current !== null &&
|
|
140
|
+
this.popperRef.current.getBoundingClientRect().top > 0) {
|
|
141
|
+
// eslint-disable-next-line react/no-did-update-set-state -- conditional setState
|
|
142
|
+
this.setState({ autoFocusAfterPositioning: true });
|
|
143
|
+
}
|
|
144
|
+
if (__DEV__) {
|
|
145
|
+
if (!this.anchorRef.current) {
|
|
146
|
+
// eslint-disable-next-line no-console -- logging error in dev mode
|
|
147
|
+
console.warn("[baseui][Popover] ref has not been passed to the Popper's anchor element.\n See how to pass the ref to an anchor element in the Popover example\n https://baseweb.design/components/popover/#anchor-ref-handling-example");
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
PopoverInner.prototype.init = function (prevProps, prevState) {
|
|
152
|
+
if (this.props.isOpen !== prevProps.isOpen ||
|
|
153
|
+
this.state.isMounted !== prevState.isMounted ||
|
|
154
|
+
this.state.isLayerMounted !== prevState.isLayerMounted) {
|
|
155
|
+
// Transition from closed to open.
|
|
156
|
+
if (this.props.isOpen && this.state.isLayerMounted) {
|
|
157
|
+
// Clear any existing timers (like previous animateOutCompleteTimer)
|
|
158
|
+
this.clearTimers();
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
// Transition from open to closed.
|
|
162
|
+
if (!this.props.isOpen && prevProps.isOpen) {
|
|
163
|
+
this.animateOutTimer = setTimeout(this.animateOut, 20);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
PopoverInner.prototype.componentWillUnmount = function () {
|
|
168
|
+
this.clearTimers();
|
|
169
|
+
};
|
|
170
|
+
PopoverInner.prototype.clearTimers = function () {
|
|
171
|
+
[
|
|
172
|
+
this.animateInTimer,
|
|
173
|
+
this.animateOutTimer,
|
|
174
|
+
this.animateOutCompleteTimer,
|
|
175
|
+
this.onMouseEnterTimer,
|
|
176
|
+
this.onMouseLeaveTimer,
|
|
177
|
+
].forEach(function (timerId) {
|
|
178
|
+
if (timerId) {
|
|
179
|
+
clearTimeout(timerId);
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
};
|
|
183
|
+
PopoverInner.prototype.triggerOnMouseLeaveWithDelay = function (e) {
|
|
184
|
+
var _this = this;
|
|
185
|
+
var onMouseLeaveDelay = this.props.onMouseLeaveDelay;
|
|
186
|
+
if (onMouseLeaveDelay) {
|
|
187
|
+
this.onMouseLeaveTimer = setTimeout(function () { return _this.triggerOnMouseLeave(e); }, onMouseLeaveDelay);
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
190
|
+
this.triggerOnMouseLeave(e);
|
|
191
|
+
};
|
|
192
|
+
PopoverInner.prototype.triggerOnMouseEnterWithDelay = function (e) {
|
|
193
|
+
var _this = this;
|
|
194
|
+
var onMouseEnterDelay = this.props.onMouseEnterDelay;
|
|
195
|
+
if (onMouseEnterDelay) {
|
|
196
|
+
this.onMouseEnterTimer = setTimeout(function () { return _this.triggerOnMouseEnter(e); }, onMouseEnterDelay);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
this.triggerOnMouseEnter(e);
|
|
200
|
+
};
|
|
201
|
+
PopoverInner.prototype.isClickTrigger = function () {
|
|
202
|
+
return this.props.triggerType === TRIGGER_TYPE.click;
|
|
203
|
+
};
|
|
204
|
+
PopoverInner.prototype.isHoverTrigger = function () {
|
|
205
|
+
return this.props.triggerType === TRIGGER_TYPE.hover;
|
|
206
|
+
};
|
|
207
|
+
PopoverInner.prototype.isAccessibilityTypeMenu = function () {
|
|
208
|
+
return this.props.accessibilityType === ACCESSIBILITY_TYPE.menu;
|
|
209
|
+
};
|
|
210
|
+
PopoverInner.prototype.isAccessibilityTypeTooltip = function () {
|
|
211
|
+
return this.props.accessibilityType === ACCESSIBILITY_TYPE.tooltip;
|
|
212
|
+
};
|
|
213
|
+
PopoverInner.prototype.getAnchorIdAttr = function () {
|
|
214
|
+
var popoverId = this.getPopoverIdAttr();
|
|
215
|
+
return popoverId ? "".concat(popoverId, "__anchor") : null;
|
|
216
|
+
};
|
|
217
|
+
PopoverInner.prototype.getPopoverIdAttr = function () {
|
|
218
|
+
return this.props.id || null;
|
|
219
|
+
};
|
|
220
|
+
PopoverInner.prototype.getAnchorProps = function () {
|
|
221
|
+
var isOpen = this.props.isOpen;
|
|
222
|
+
var anchorProps = {
|
|
223
|
+
ref: this.anchorRef,
|
|
224
|
+
};
|
|
225
|
+
var popoverId = this.getPopoverIdAttr();
|
|
226
|
+
if (this.isAccessibilityTypeMenu()) {
|
|
227
|
+
var relationAttr = this.isClickTrigger() ? 'aria-controls' : 'aria-owns';
|
|
228
|
+
anchorProps[relationAttr] = isOpen ? popoverId : null;
|
|
229
|
+
anchorProps['aria-haspopup'] = true;
|
|
230
|
+
anchorProps['aria-expanded'] = Boolean(isOpen);
|
|
231
|
+
}
|
|
232
|
+
else if (this.isAccessibilityTypeTooltip()) {
|
|
233
|
+
anchorProps.id = this.getAnchorIdAttr();
|
|
234
|
+
anchorProps['aria-describedby'] = isOpen ? popoverId : null;
|
|
235
|
+
}
|
|
236
|
+
if (this.isHoverTrigger()) {
|
|
237
|
+
anchorProps.onMouseEnter = this.onAnchorMouseEnter;
|
|
238
|
+
anchorProps.onMouseLeave = this.onAnchorMouseLeave;
|
|
239
|
+
// Make it focusable too
|
|
240
|
+
anchorProps.onBlur = this.props.onBlur;
|
|
241
|
+
anchorProps.onFocus = this.props.onFocus;
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
anchorProps.onClick = this.onAnchorClick;
|
|
245
|
+
// Make it focusable too
|
|
246
|
+
if (this.props.onBlur) {
|
|
247
|
+
anchorProps.onBlur = this.props.onBlur;
|
|
248
|
+
}
|
|
249
|
+
if (this.props.onFocus) {
|
|
250
|
+
anchorProps.onFocus = this.props.onFocus;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return anchorProps;
|
|
254
|
+
};
|
|
255
|
+
PopoverInner.prototype.getPopoverBodyProps = function () {
|
|
256
|
+
var bodyProps = {};
|
|
257
|
+
var popoverId = this.getPopoverIdAttr();
|
|
258
|
+
if (this.isAccessibilityTypeMenu()) {
|
|
259
|
+
// @ts-ignore
|
|
260
|
+
bodyProps.id = popoverId;
|
|
261
|
+
}
|
|
262
|
+
else if (this.isAccessibilityTypeTooltip()) {
|
|
263
|
+
// @ts-ignore
|
|
264
|
+
bodyProps.id = popoverId;
|
|
265
|
+
bodyProps.role = 'tooltip';
|
|
266
|
+
}
|
|
267
|
+
if (this.isHoverTrigger()) {
|
|
268
|
+
bodyProps.onMouseEnter = this.onPopoverMouseEnter;
|
|
269
|
+
bodyProps.onMouseLeave = this.onPopoverMouseLeave;
|
|
270
|
+
}
|
|
271
|
+
return bodyProps;
|
|
272
|
+
};
|
|
273
|
+
PopoverInner.prototype.getSharedProps = function () {
|
|
274
|
+
var _a = this.props, isOpen = _a.isOpen, showArrow = _a.showArrow, _b = _a.popoverMargin, popoverMargin = _b === void 0 ? POPOVER_MARGIN : _b;
|
|
275
|
+
var _c = this.state, isAnimating = _c.isAnimating, arrowOffset = _c.arrowOffset, popoverOffset = _c.popoverOffset, placement = _c.placement;
|
|
276
|
+
return {
|
|
277
|
+
$showArrow: !!showArrow,
|
|
278
|
+
$arrowOffset: arrowOffset,
|
|
279
|
+
$popoverOffset: popoverOffset,
|
|
280
|
+
// @ts-ignore
|
|
281
|
+
$placement: placement,
|
|
282
|
+
$isAnimating: isAnimating,
|
|
283
|
+
$animationDuration: this.props.animateOutTime || ANIMATE_OUT_TIME,
|
|
284
|
+
$isOpen: isOpen,
|
|
285
|
+
$popoverMargin: popoverMargin,
|
|
286
|
+
$isHoverTrigger: this.isHoverTrigger(),
|
|
287
|
+
};
|
|
288
|
+
};
|
|
289
|
+
PopoverInner.prototype.getAnchorFromChildren = function () {
|
|
290
|
+
var children = this.props.children;
|
|
291
|
+
var childArray = React.Children.toArray(children);
|
|
292
|
+
if (__DEV__) {
|
|
293
|
+
if (childArray.length !== 1) {
|
|
294
|
+
// eslint-disable-next-line no-console -- logging error in dev mode
|
|
295
|
+
console.error("[baseui] Exactly 1 child must be passed to Popover/Tooltip, found ".concat(childArray.length, " children"));
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return childArray[0];
|
|
299
|
+
};
|
|
300
|
+
PopoverInner.prototype.renderAnchor = function () {
|
|
301
|
+
var anchor = this.getAnchorFromChildren();
|
|
302
|
+
if (!anchor) {
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
var isValidElement = React.isValidElement(anchor);
|
|
306
|
+
var anchorProps = this.getAnchorProps();
|
|
307
|
+
if (typeof anchor === 'object' && isValidElement) {
|
|
308
|
+
return React.cloneElement(anchor, anchorProps);
|
|
309
|
+
}
|
|
310
|
+
return (
|
|
311
|
+
// @ts-ignore
|
|
312
|
+
_jsx("span", __assign({}, anchorProps, { children: anchor }), "popover-anchor"));
|
|
313
|
+
};
|
|
314
|
+
PopoverInner.prototype.renderPopover = function (renderedContent) {
|
|
315
|
+
var _a = this.props, showArrow = _a.showArrow, _b = _a.overrides, overrides = _b === void 0 ? {} : _b;
|
|
316
|
+
var ArrowOverride = overrides.Arrow, BodyOverride = overrides.Body, InnerOverride = overrides.Inner;
|
|
317
|
+
var Arrow = getOverride(ArrowOverride) || StyledArrow;
|
|
318
|
+
var Body = getOverride(BodyOverride) || StyledBody;
|
|
319
|
+
var Inner = getOverride(InnerOverride) || StyledInner;
|
|
320
|
+
var sharedProps = this.getSharedProps();
|
|
321
|
+
var bodyProps = this.getPopoverBodyProps();
|
|
322
|
+
return (_jsxs(Body, __assign({ ref: this.popperRef, "data-baseweb": this.props['data-baseweb'] || 'popover' }, bodyProps, sharedProps, getOverrideProps(BodyOverride), { children: [showArrow ? (_jsx(Arrow, __assign({ ref: this.arrowRef }, sharedProps, getOverrideProps(ArrowOverride)), "popover-arrow")) : null, _jsx(Inner, __assign({}, sharedProps, getOverrideProps(InnerOverride), { children: renderedContent }), void 0)] }), "popover-body"));
|
|
323
|
+
};
|
|
324
|
+
PopoverInner.prototype.renderContent = function () {
|
|
325
|
+
var content = this.props.content;
|
|
326
|
+
return typeof content === 'function' ? content() : content;
|
|
327
|
+
};
|
|
328
|
+
PopoverInner.prototype.render = function () {
|
|
329
|
+
var _this = this;
|
|
330
|
+
var mountedAndOpen = this.state.isMounted && (this.props.isOpen || this.state.isAnimating);
|
|
331
|
+
var rendered = [this.renderAnchor()];
|
|
332
|
+
var renderedContent = mountedAndOpen || this.props.renderAll ? this.renderContent() : null;
|
|
333
|
+
var defaultPopperOptions = {
|
|
334
|
+
modifiers: {
|
|
335
|
+
preventOverflow: { enabled: !this.props.ignoreBoundary, padding: 0 },
|
|
336
|
+
},
|
|
337
|
+
};
|
|
338
|
+
// Only render popover on the browser (portals aren't supported server-side)
|
|
339
|
+
if (renderedContent) {
|
|
340
|
+
if (mountedAndOpen) {
|
|
341
|
+
rendered.push(_jsx(Layer, __assign({ mountNode: this.props.mountNode, onEscape: this.props.onEsc, onDocumentClick: this.isHoverTrigger() ? undefined : this.onDocumentClick, isHoverLayer: this.isHoverTrigger(), onMount: function () { return _this.setState({ isLayerMounted: true }); }, onUnmount: function () { return _this.setState({ isLayerMounted: false }); } }, { children: _jsx(TetherBehavior, __assign({ anchorRef: this.anchorRef.current, arrowRef: this.arrowRef.current, popperRef: this.popperRef.current,
|
|
342
|
+
// Remove the `ignoreBoundary` prop in the next major version
|
|
343
|
+
// and have it replaced with the TetherBehavior props overrides
|
|
344
|
+
popperOptions: __assign(__assign({}, defaultPopperOptions), this.props.popperOptions), onPopperUpdate: this.onPopperUpdate, placement: this.state.placement, repositionOnResize: this.props.repositionOnResize }, { children: this.props.focusLock && this.props.accessibilityType !== ACCESSIBILITY_TYPE.tooltip ? (_jsx(FocusLock, __assign({ disabled: !this.props.focusLock, noFocusGuards: false,
|
|
345
|
+
// see popover-focus-loop.scenario.js for why hover cannot return focus
|
|
346
|
+
returnFocus: !this.isHoverTrigger() && this.props.returnFocus, autoFocus: this.state.autoFocusAfterPositioning,
|
|
347
|
+
// Allow focus to escape when UI is within an iframe
|
|
348
|
+
crossFrame: false, focusOptions: this.props.focusOptions }, { children: this.renderPopover(renderedContent) }), void 0)) : (_jsx(MoveFocusInside, __assign({ disabled: !this.props.autoFocus || !this.state.autoFocusAfterPositioning }, { children: this.renderPopover(renderedContent) }), void 0)) }), void 0) }), "new-layer"));
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
rendered.push(_jsx(Hidden, { children: renderedContent }, "hidden-layer"));
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
return rendered;
|
|
355
|
+
};
|
|
356
|
+
PopoverInner.defaultProps = defaultProps;
|
|
357
|
+
return PopoverInner;
|
|
358
|
+
}(React.PureComponent));
|
|
359
|
+
// Remove when Popover is converted to a functional component.
|
|
360
|
+
var Popover = function (props) {
|
|
361
|
+
var innerRef = props.innerRef;
|
|
362
|
+
var gID = useUID();
|
|
363
|
+
return (_jsx(PopoverInner, __assign({ id: props.id || gID,
|
|
364
|
+
// @ts-expect-error
|
|
365
|
+
ref: innerRef }, props), void 0));
|
|
366
|
+
};
|
|
367
|
+
Popover.defaultProps = defaultProps;
|
|
368
|
+
export default Popover;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { State, StatefulPopoverContainerProps, StateChangeType } from './types';
|
|
3
|
+
declare class StatefulContainer extends React.Component<StatefulPopoverContainerProps, State> {
|
|
4
|
+
static defaultProps: Partial<StatefulPopoverContainerProps>;
|
|
5
|
+
state: {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
};
|
|
8
|
+
onBlur: (e: React.FocusEvent) => void;
|
|
9
|
+
onClick: (e: React.SyntheticEvent) => void;
|
|
10
|
+
onClickOutside: () => void;
|
|
11
|
+
onEsc: () => void;
|
|
12
|
+
onFocus: (e: React.FocusEvent) => void;
|
|
13
|
+
onMouseEnter: (e: React.MouseEvent) => void;
|
|
14
|
+
onMouseLeave: (e: React.MouseEvent) => void;
|
|
15
|
+
onContentClose: () => void;
|
|
16
|
+
open(): void;
|
|
17
|
+
close(): void;
|
|
18
|
+
internalSetState(type: StateChangeType, changes: State): void;
|
|
19
|
+
/**
|
|
20
|
+
* If user passed a content render prop, we want to give them a
|
|
21
|
+
* callback to close the Popover. This is useful in any case where
|
|
22
|
+
* a dev wants to manually close the popover based on some action.
|
|
23
|
+
*
|
|
24
|
+
* One simple example is a Popover with a "Dismiss" button in it:
|
|
25
|
+
* <StatefulPopover content={({close}) => <button onClick={close}>Dismiss</button>}>
|
|
26
|
+
* Click me
|
|
27
|
+
* </StatefulPopover>
|
|
28
|
+
*/
|
|
29
|
+
renderContent: () => React.ReactNode;
|
|
30
|
+
render(): React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
export default StatefulContainer;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { __assign, __extends } from "tslib";
|
|
2
|
+
/*
|
|
3
|
+
Copyright (c) Uber Technologies, Inc.
|
|
4
|
+
|
|
5
|
+
This source code is licensed under the MIT license found in the
|
|
6
|
+
LICENSE file in the root directory of this source tree.
|
|
7
|
+
*/
|
|
8
|
+
import * as React from 'react';
|
|
9
|
+
import { ACCESSIBILITY_TYPE, PLACEMENT, STATE_CHANGE_TYPE, TRIGGER_TYPE, POPOVER_MARGIN } from './constants';
|
|
10
|
+
import { isFocusVisible } from '../utils/focusVisible';
|
|
11
|
+
var defaultStateReducer = function (type, nextState) { return nextState; };
|
|
12
|
+
var StatefulContainer = /** @class */ (function (_super) {
|
|
13
|
+
__extends(StatefulContainer, _super);
|
|
14
|
+
function StatefulContainer() {
|
|
15
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
+
_this.state = __assign({ isOpen: false }, _this.props.initialState);
|
|
17
|
+
_this.onBlur = function (e) {
|
|
18
|
+
if (_this.props.onBlur) {
|
|
19
|
+
_this.props.onBlur(e);
|
|
20
|
+
}
|
|
21
|
+
if (_this.props.focusLock || _this.props.autoFocus) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
_this.close();
|
|
25
|
+
};
|
|
26
|
+
_this.onClick = function (e) {
|
|
27
|
+
if (_this.props.onClick) {
|
|
28
|
+
_this.props.onClick(e);
|
|
29
|
+
}
|
|
30
|
+
if (_this.state.isOpen) {
|
|
31
|
+
_this.close();
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
_this.open();
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
_this.onClickOutside = function () {
|
|
38
|
+
_this.close();
|
|
39
|
+
};
|
|
40
|
+
_this.onEsc = function () {
|
|
41
|
+
_this.close();
|
|
42
|
+
};
|
|
43
|
+
_this.onFocus = function (e) {
|
|
44
|
+
if (_this.props.onFocus) {
|
|
45
|
+
_this.props.onFocus(e);
|
|
46
|
+
}
|
|
47
|
+
if (isFocusVisible(e)) {
|
|
48
|
+
_this.open();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
_this.onMouseEnter = function (e) {
|
|
52
|
+
if (_this.props.onMouseEnter) {
|
|
53
|
+
_this.props.onMouseEnter(e);
|
|
54
|
+
}
|
|
55
|
+
_this.open();
|
|
56
|
+
};
|
|
57
|
+
_this.onMouseLeave = function (e) {
|
|
58
|
+
if (_this.props.onMouseLeave) {
|
|
59
|
+
_this.props.onMouseLeave(e);
|
|
60
|
+
}
|
|
61
|
+
_this.close();
|
|
62
|
+
};
|
|
63
|
+
_this.onContentClose = function () {
|
|
64
|
+
_this.close();
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* If user passed a content render prop, we want to give them a
|
|
68
|
+
* callback to close the Popover. This is useful in any case where
|
|
69
|
+
* a dev wants to manually close the popover based on some action.
|
|
70
|
+
*
|
|
71
|
+
* One simple example is a Popover with a "Dismiss" button in it:
|
|
72
|
+
* <StatefulPopover content={({close}) => <button onClick={close}>Dismiss</button>}>
|
|
73
|
+
* Click me
|
|
74
|
+
* </StatefulPopover>
|
|
75
|
+
*/
|
|
76
|
+
_this.renderContent = function () {
|
|
77
|
+
var content = _this.props.content;
|
|
78
|
+
if (typeof content === 'function') {
|
|
79
|
+
return content({ close: _this.onContentClose });
|
|
80
|
+
}
|
|
81
|
+
return content;
|
|
82
|
+
};
|
|
83
|
+
return _this;
|
|
84
|
+
}
|
|
85
|
+
StatefulContainer.prototype.open = function () {
|
|
86
|
+
this.internalSetState(STATE_CHANGE_TYPE.open, {
|
|
87
|
+
isOpen: true,
|
|
88
|
+
});
|
|
89
|
+
if (this.props.onOpen) {
|
|
90
|
+
this.props.onOpen();
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
StatefulContainer.prototype.close = function () {
|
|
94
|
+
this.internalSetState(STATE_CHANGE_TYPE.close, {
|
|
95
|
+
isOpen: false,
|
|
96
|
+
});
|
|
97
|
+
if (this.props.onClose) {
|
|
98
|
+
this.props.onClose();
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
StatefulContainer.prototype.internalSetState = function (type, changes) {
|
|
102
|
+
var stateReducer = this.props.stateReducer;
|
|
103
|
+
if (typeof stateReducer !== 'function') {
|
|
104
|
+
this.setState(changes);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.setState(function (prevState) { return stateReducer(type, changes, prevState); });
|
|
108
|
+
};
|
|
109
|
+
StatefulContainer.prototype.render = function () {
|
|
110
|
+
var _a = this.props, accessibilityType = _a.accessibilityType, autoFocus = _a.autoFocus, animateOutTime = _a.animateOutTime, dismissOnClickOutside = _a.dismissOnClickOutside, dismissOnEsc = _a.dismissOnEsc, focusLock = _a.focusLock, ignoreBoundary = _a.ignoreBoundary, mountNode = _a.mountNode, onBlur = _a.onBlur, onClick = _a.onClick, onFocus = _a.onFocus, onMouseEnter = _a.onMouseEnter, onMouseLeave = _a.onMouseLeave, onMouseEnterDelay = _a.onMouseEnterDelay, onMouseLeaveDelay = _a.onMouseLeaveDelay, overrides = _a.overrides, placement = _a.placement, popperOptions = _a.popperOptions, renderAll = _a.renderAll, returnFocus = _a.returnFocus, showArrow = _a.showArrow, triggerType = _a.triggerType, popoverMargin = _a.popoverMargin, focusOptions = _a.focusOptions, repositionOnResize = _a.repositionOnResize;
|
|
111
|
+
var popoverProps = {
|
|
112
|
+
accessibilityType: accessibilityType,
|
|
113
|
+
animateOutTime: animateOutTime,
|
|
114
|
+
autoFocus: autoFocus,
|
|
115
|
+
content: this.renderContent,
|
|
116
|
+
focusLock: focusLock,
|
|
117
|
+
ignoreBoundary: ignoreBoundary,
|
|
118
|
+
isOpen: this.state.isOpen,
|
|
119
|
+
mountNode: mountNode,
|
|
120
|
+
onBlur: onBlur,
|
|
121
|
+
onClick: onClick,
|
|
122
|
+
onFocus: onFocus,
|
|
123
|
+
onMouseEnter: onMouseEnter,
|
|
124
|
+
onMouseLeave: onMouseLeave,
|
|
125
|
+
onMouseEnterDelay: onMouseEnterDelay,
|
|
126
|
+
onMouseLeaveDelay: onMouseLeaveDelay,
|
|
127
|
+
overrides: overrides,
|
|
128
|
+
placement: placement,
|
|
129
|
+
popperOptions: popperOptions,
|
|
130
|
+
renderAll: renderAll,
|
|
131
|
+
returnFocus: returnFocus,
|
|
132
|
+
showArrow: showArrow,
|
|
133
|
+
triggerType: triggerType,
|
|
134
|
+
popoverMargin: popoverMargin,
|
|
135
|
+
focusOptions: focusOptions,
|
|
136
|
+
repositionOnResize: repositionOnResize,
|
|
137
|
+
};
|
|
138
|
+
if (dismissOnClickOutside) {
|
|
139
|
+
popoverProps.onClickOutside = this.onClickOutside;
|
|
140
|
+
}
|
|
141
|
+
if (dismissOnEsc) {
|
|
142
|
+
popoverProps.onEsc = this.onEsc;
|
|
143
|
+
}
|
|
144
|
+
if (triggerType === TRIGGER_TYPE.hover) {
|
|
145
|
+
popoverProps.onBlur = this.onBlur;
|
|
146
|
+
popoverProps.onFocus = this.onFocus;
|
|
147
|
+
popoverProps.onMouseEnter = this.onMouseEnter;
|
|
148
|
+
popoverProps.onMouseLeave = this.onMouseLeave;
|
|
149
|
+
}
|
|
150
|
+
else {
|
|
151
|
+
popoverProps.onClick = this.onClick;
|
|
152
|
+
}
|
|
153
|
+
return this.props.children(popoverProps);
|
|
154
|
+
};
|
|
155
|
+
StatefulContainer.defaultProps = {
|
|
156
|
+
accessibilityType: ACCESSIBILITY_TYPE.menu,
|
|
157
|
+
ignoreBoundary: false,
|
|
158
|
+
overrides: {},
|
|
159
|
+
onMouseEnterDelay: 200,
|
|
160
|
+
onMouseLeaveDelay: 200,
|
|
161
|
+
placement: PLACEMENT.auto,
|
|
162
|
+
popperOptions: {},
|
|
163
|
+
showArrow: false,
|
|
164
|
+
triggerType: TRIGGER_TYPE.click,
|
|
165
|
+
dismissOnClickOutside: true,
|
|
166
|
+
dismissOnEsc: true,
|
|
167
|
+
stateReducer: defaultStateReducer,
|
|
168
|
+
popoverMargin: POPOVER_MARGIN,
|
|
169
|
+
};
|
|
170
|
+
return StatefulContainer;
|
|
171
|
+
}(React.Component));
|
|
172
|
+
export default StatefulContainer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { StatefulPopoverProps } from './types';
|
|
2
|
+
declare function StatefulPopover(props: StatefulPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare namespace StatefulPopover {
|
|
4
|
+
var defaultProps: {
|
|
5
|
+
accessibilityType: "menu";
|
|
6
|
+
ignoreBoundary: boolean;
|
|
7
|
+
overrides: {};
|
|
8
|
+
onMouseEnterDelay: number;
|
|
9
|
+
onMouseLeaveDelay: number;
|
|
10
|
+
placement: "auto";
|
|
11
|
+
showArrow: boolean;
|
|
12
|
+
triggerType: "click";
|
|
13
|
+
dismissOnClickOutside: boolean;
|
|
14
|
+
dismissOnEsc: boolean;
|
|
15
|
+
stateReducer: (_: any, nextState: any) => any;
|
|
16
|
+
popoverMargin: number;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export default StatefulPopover;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { __assign, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { ACCESSIBILITY_TYPE, PLACEMENT, TRIGGER_TYPE, POPOVER_MARGIN } from './constants';
|
|
4
|
+
import StatefulContainer from './stateful-container';
|
|
5
|
+
import Popover from './popover';
|
|
6
|
+
function StatefulPopover(props) {
|
|
7
|
+
var children = props.children, restProps = __rest(props, ["children"]);
|
|
8
|
+
return (_jsx(StatefulContainer, __assign({}, restProps, { children: function (popoverProps) { return _jsx(Popover, __assign({}, popoverProps, { children: children }), void 0); } }), void 0));
|
|
9
|
+
}
|
|
10
|
+
StatefulPopover.defaultProps = {
|
|
11
|
+
accessibilityType: ACCESSIBILITY_TYPE.menu,
|
|
12
|
+
ignoreBoundary: false,
|
|
13
|
+
overrides: {},
|
|
14
|
+
onMouseEnterDelay: 200,
|
|
15
|
+
onMouseLeaveDelay: 200,
|
|
16
|
+
placement: PLACEMENT.auto,
|
|
17
|
+
showArrow: false,
|
|
18
|
+
triggerType: TRIGGER_TYPE.click,
|
|
19
|
+
dismissOnClickOutside: true,
|
|
20
|
+
dismissOnEsc: true,
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
stateReducer: function (_, nextState) { return nextState; },
|
|
23
|
+
popoverMargin: POPOVER_MARGIN,
|
|
24
|
+
};
|
|
25
|
+
export default StatefulPopover;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ArrowStylePropsArg, BodyStylePropsArg } from './types';
|
|
2
|
+
import type { StyleObject } from 'styletron-standard';
|
|
3
|
+
/**
|
|
4
|
+
* Main popover container element that gets positioned next to the anchor
|
|
5
|
+
*/
|
|
6
|
+
export declare function getBodyStyles(_: any, props: BodyStylePropsArg): StyleObject;
|
|
7
|
+
export declare const Body: import("../../style/styled").StyledComponent;
|
|
8
|
+
/**
|
|
9
|
+
* Arrow shown between the popover and the anchor element
|
|
10
|
+
*/
|
|
11
|
+
export declare function getArrowStyles(_: any, props: ArrowStylePropsArg): StyleObject;
|
|
12
|
+
export declare const Arrow: import("../../style/styled").StyledComponent;
|
|
13
|
+
/**
|
|
14
|
+
* Extra div that holds the popover content. This extra element
|
|
15
|
+
* is needed for the arrow–the arrow is just a 45deg rotated div,
|
|
16
|
+
* and rendering this extra element on top with a solid background
|
|
17
|
+
* clips the part of the arrow that extends into the popover.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getInnerStyles(): StyleObject;
|
|
20
|
+
export declare const Inner: import("../../style/styled").StyledComponent;
|
|
21
|
+
/**
|
|
22
|
+
* A drop-in component that provides the recommended padding
|
|
23
|
+
* for popovers. Mostly a convenience for users so they don't
|
|
24
|
+
* have to define this themselves.
|
|
25
|
+
*/
|
|
26
|
+
export declare const Padding: import("../../style/styled").StyledComponent;
|
|
27
|
+
export declare const Hidden: import("../../style/styled").StyledComponent;
|