@channel.io/bezier-react 1.6.2 → 1.7.1
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/dist/cjs/_virtual/_rollupPluginBabelHelpers.js +35 -0
- package/dist/cjs/_virtual/_rollupPluginBabelHelpers.js.map +1 -0
- package/dist/cjs/components/Banner/Banner.const.js +4 -2
- package/dist/cjs/components/Banner/Banner.const.js.map +1 -1
- package/dist/cjs/components/Forms/Inputs/mixins.js +41 -22
- package/dist/cjs/components/Forms/Inputs/mixins.js.map +1 -1
- package/dist/cjs/components/Forms/Slider/Slider.js +73 -51
- package/dist/cjs/components/Forms/Slider/Slider.js.map +1 -1
- package/dist/cjs/components/Forms/Slider/Slider.styled.js +24 -83
- package/dist/cjs/components/Forms/Slider/Slider.styled.js.map +1 -1
- package/dist/cjs/components/Help/Help.js +10 -7
- package/dist/cjs/components/Help/Help.js.map +1 -1
- package/dist/cjs/components/Help/Help.styled.js +4 -5
- package/dist/cjs/components/Help/Help.styled.js.map +1 -1
- package/dist/cjs/components/KeyValueListItem/common/ItemActions/ItemAction.js +2 -9
- package/dist/cjs/components/KeyValueListItem/common/ItemActions/ItemAction.js.map +1 -1
- package/dist/cjs/components/KeyValueListItem/common/ItemActions/ItemAction.styled.js +3 -20
- package/dist/cjs/components/KeyValueListItem/common/ItemActions/ItemAction.styled.js.map +1 -1
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.js +101 -0
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.js.map +1 -0
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.styled.js +41 -0
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.styled.js.map +1 -0
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.types.js +20 -0
- package/dist/cjs/components/LegacyTooltip/LegacyTooltip.types.js.map +1 -0
- package/dist/cjs/components/{Tooltip/TooltipContent.js → LegacyTooltip/LegacyTooltipContent.js} +9 -12
- package/dist/cjs/components/LegacyTooltip/LegacyTooltipContent.js.map +1 -0
- package/dist/cjs/components/{Tooltip → LegacyTooltip}/utils.js +33 -33
- package/dist/cjs/components/LegacyTooltip/utils.js.map +1 -0
- package/dist/cjs/components/ListItem/ListItem.styled.js +1 -1
- package/dist/cjs/components/ListItem/utils.js +20 -8
- package/dist/cjs/components/ListItem/utils.js.map +1 -1
- package/dist/cjs/components/ListMenuTitle/ListMenuTitle.js +11 -10
- package/dist/cjs/components/ListMenuTitle/ListMenuTitle.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.types.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalAnimation.styled.js +57 -11
- package/dist/cjs/components/Modals/Modal/ModalAnimation.styled.js.map +1 -1
- package/dist/cjs/components/Navigator/NavGroup/NavGroup.js +10 -11
- package/dist/cjs/components/Navigator/NavGroup/NavGroup.js.map +1 -1
- package/dist/cjs/components/Navigator/NavItem/NavItem.js +10 -10
- package/dist/cjs/components/Navigator/NavItem/NavItem.js.map +1 -1
- package/dist/cjs/components/Overlay/utils.js +6 -2
- package/dist/cjs/components/Overlay/utils.js.map +1 -1
- package/dist/cjs/components/SectionLabel/SectionLabel.js +10 -17
- package/dist/cjs/components/SectionLabel/SectionLabel.js.map +1 -1
- package/dist/cjs/components/SectionLabel/SectionLabel.styled.js +4 -4
- package/dist/cjs/components/SectionLabel/SectionLabel.styled.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.js +10 -7
- package/dist/cjs/components/Spinner/Spinner.js.map +1 -1
- package/dist/cjs/components/Spinner/Spinner.styled.js +1 -1
- package/dist/cjs/components/Spinner/Spinner.types.js.map +1 -1
- package/dist/cjs/components/Stack/Stack/Stack.styled.js +1 -1
- package/dist/cjs/components/TagBadge/Badge/Badge.js +9 -8
- package/dist/cjs/components/TagBadge/Badge/Badge.js.map +1 -1
- package/dist/cjs/components/TagBadge/Tag/Tag.js +4 -3
- package/dist/cjs/components/TagBadge/Tag/Tag.js.map +1 -1
- package/dist/cjs/components/Text/Text.styled.js +1 -1
- package/dist/cjs/components/Toast/Toast.types.js +2 -1
- package/dist/cjs/components/Toast/Toast.types.js.map +1 -1
- package/dist/cjs/components/Toast/ToastElement.js +5 -6
- package/dist/cjs/components/Toast/ToastElement.js.map +1 -1
- package/dist/cjs/components/Toast/ToastProvider.js +3 -3
- package/dist/cjs/components/Toast/ToastProvider.js.map +1 -1
- package/dist/cjs/components/Toast/ToastService.js +9 -9
- package/dist/cjs/components/Toast/ToastService.js.map +1 -1
- package/dist/cjs/components/Toast/utils.js +17 -10
- package/dist/cjs/components/Toast/utils.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.js +211 -83
- package/dist/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.styled.js +96 -25
- package/dist/cjs/components/Tooltip/Tooltip.styled.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.types.js +3 -0
- package/dist/cjs/components/Tooltip/Tooltip.types.js.map +1 -1
- package/dist/cjs/features/SmoothCornersFeature/SmoothCornersFeature.js +2 -2
- package/dist/cjs/features/SmoothCornersFeature/SmoothCornersFeature.js.map +1 -1
- package/dist/cjs/index.js +15 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +21 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.js +886 -0
- package/dist/cjs/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +691 -0
- package/dist/cjs/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +296 -0
- package/dist/cjs/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.js +4 -4
- package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/index.js +12 -12
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js +265 -0
- package/dist/cjs/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-radio-group/dist/index.js +7 -7
- package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/index.js +4 -4
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.js +2 -2
- package/dist/cjs/node_modules/@radix-ui/react-slider/dist/index.js +27 -27
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.js +4 -4
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.js +7 -7
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.js +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/index.js +7 -7
- package/dist/cjs/node_modules/@radix-ui/react-tooltip/dist/index.js +521 -0
- package/dist/cjs/node_modules/@radix-ui/react-tooltip/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.js +2 -2
- package/dist/cjs/node_modules/react-textarea-autosize/dist/react-textarea-autosize.esm.js +4 -4
- package/dist/cjs/node_modules/react-textarea-autosize/dist/react-textarea-autosize.esm.js.map +1 -1
- package/dist/cjs/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/extends.js +21 -0
- package/dist/cjs/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/cjs/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +19 -0
- package/dist/cjs/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js.map +1 -0
- package/dist/cjs/providers/BezierProvider.js +3 -2
- package/dist/cjs/providers/BezierProvider.js.map +1 -1
- package/dist/cjs/utils/styleUtils.js +26 -2
- package/dist/cjs/utils/styleUtils.js.map +1 -1
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.mjs +31 -0
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.mjs.map +1 -0
- package/dist/esm/components/Banner/Banner.const.mjs +4 -2
- package/dist/esm/components/Banner/Banner.const.mjs.map +1 -1
- package/dist/esm/components/Forms/Inputs/mixins.mjs +41 -22
- package/dist/esm/components/Forms/Inputs/mixins.mjs.map +1 -1
- package/dist/esm/components/Forms/Slider/Slider.mjs +76 -53
- package/dist/esm/components/Forms/Slider/Slider.mjs.map +1 -1
- package/dist/esm/components/Forms/Slider/Slider.styled.mjs +22 -82
- package/dist/esm/components/Forms/Slider/Slider.styled.mjs.map +1 -1
- package/dist/esm/components/Help/Help.mjs +11 -8
- package/dist/esm/components/Help/Help.mjs.map +1 -1
- package/dist/esm/components/Help/Help.styled.mjs +4 -5
- package/dist/esm/components/Help/Help.styled.mjs.map +1 -1
- package/dist/esm/components/KeyValueListItem/common/ItemActions/ItemAction.mjs +3 -10
- package/dist/esm/components/KeyValueListItem/common/ItemActions/ItemAction.mjs.map +1 -1
- package/dist/esm/components/KeyValueListItem/common/ItemActions/ItemAction.styled.mjs +4 -19
- package/dist/esm/components/KeyValueListItem/common/ItemActions/ItemAction.styled.mjs.map +1 -1
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.mjs +97 -0
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.mjs.map +1 -0
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.styled.mjs +36 -0
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.styled.mjs.map +1 -0
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.types.mjs +18 -0
- package/dist/esm/components/LegacyTooltip/LegacyTooltip.types.mjs.map +1 -0
- package/dist/esm/components/{Tooltip/TooltipContent.mjs → LegacyTooltip/LegacyTooltipContent.mjs} +8 -9
- package/dist/esm/components/LegacyTooltip/LegacyTooltipContent.mjs.map +1 -0
- package/dist/esm/components/{Tooltip → LegacyTooltip}/utils.mjs +33 -33
- package/dist/esm/components/LegacyTooltip/utils.mjs.map +1 -0
- package/dist/esm/components/ListItem/ListItem.styled.mjs +1 -1
- package/dist/esm/components/ListItem/utils.mjs +20 -8
- package/dist/esm/components/ListItem/utils.mjs.map +1 -1
- package/dist/esm/components/ListMenuTitle/ListMenuTitle.mjs +12 -11
- package/dist/esm/components/ListMenuTitle/ListMenuTitle.mjs.map +1 -1
- package/dist/esm/components/Modals/Modal/Modal.types.mjs.map +1 -1
- package/dist/esm/components/Modals/Modal/ModalAnimation.styled.mjs +57 -11
- package/dist/esm/components/Modals/Modal/ModalAnimation.styled.mjs.map +1 -1
- package/dist/esm/components/Navigator/NavGroup/NavGroup.mjs +11 -12
- package/dist/esm/components/Navigator/NavGroup/NavGroup.mjs.map +1 -1
- package/dist/esm/components/Navigator/NavItem/NavItem.mjs +11 -11
- package/dist/esm/components/Navigator/NavItem/NavItem.mjs.map +1 -1
- package/dist/esm/components/Overlay/Overlay.mjs +2 -2
- package/dist/esm/components/Overlay/Overlay.mjs.map +1 -1
- package/dist/esm/components/Overlay/utils.mjs +6 -2
- package/dist/esm/components/Overlay/utils.mjs.map +1 -1
- package/dist/esm/components/SectionLabel/SectionLabel.mjs +11 -17
- package/dist/esm/components/SectionLabel/SectionLabel.mjs.map +1 -1
- package/dist/esm/components/SectionLabel/SectionLabel.styled.mjs +4 -4
- package/dist/esm/components/SectionLabel/SectionLabel.styled.mjs.map +1 -1
- package/dist/esm/components/Spinner/Spinner.mjs +11 -8
- package/dist/esm/components/Spinner/Spinner.mjs.map +1 -1
- package/dist/esm/components/Spinner/Spinner.styled.mjs +1 -1
- package/dist/esm/components/Spinner/Spinner.types.mjs.map +1 -1
- package/dist/esm/components/Stack/Stack/Stack.styled.mjs +1 -1
- package/dist/esm/components/TagBadge/Badge/Badge.mjs +10 -9
- package/dist/esm/components/TagBadge/Badge/Badge.mjs.map +1 -1
- package/dist/esm/components/TagBadge/Tag/Tag.mjs +5 -4
- package/dist/esm/components/TagBadge/Tag/Tag.mjs.map +1 -1
- package/dist/esm/components/Text/Text.styled.mjs +1 -1
- package/dist/esm/components/Toast/Toast.types.mjs +2 -1
- package/dist/esm/components/Toast/Toast.types.mjs.map +1 -1
- package/dist/esm/components/Toast/ToastElement.mjs +5 -6
- package/dist/esm/components/Toast/ToastElement.mjs.map +1 -1
- package/dist/esm/components/Toast/ToastProvider.mjs +3 -3
- package/dist/esm/components/Toast/ToastProvider.mjs.map +1 -1
- package/dist/esm/components/Toast/ToastService.mjs +1 -1
- package/dist/esm/components/Toast/utils.mjs +17 -10
- package/dist/esm/components/Toast/utils.mjs.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.mjs +213 -82
- package/dist/esm/components/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.styled.mjs +93 -23
- package/dist/esm/components/Tooltip/Tooltip.styled.mjs.map +1 -1
- package/dist/esm/components/Tooltip/Tooltip.types.mjs +3 -0
- package/dist/esm/components/Tooltip/Tooltip.types.mjs.map +1 -1
- package/dist/esm/features/SmoothCornersFeature/SmoothCornersFeature.mjs +1 -1
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.mjs +17 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.mjs.map +1 -0
- package/dist/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +875 -0
- package/dist/esm/node_modules/@floating-ui/core/dist/floating-ui.core.mjs.map +1 -0
- package/dist/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +679 -0
- package/dist/esm/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs.map +1 -0
- package/dist/esm/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.mjs +265 -0
- package/dist/esm/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.mjs +4 -4
- package/dist/esm/node_modules/@radix-ui/react-dialog/dist/index.mjs +12 -12
- package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +2 -2
- package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +2 -2
- package/dist/esm/node_modules/@radix-ui/react-popper/dist/index.mjs +257 -0
- package/dist/esm/node_modules/@radix-ui/react-popper/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.mjs +3 -3
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.mjs +2 -2
- package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/index.mjs +7 -7
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +4 -4
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.mjs +2 -2
- package/dist/esm/node_modules/@radix-ui/react-slider/dist/index.mjs +11 -11
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.mjs +3 -3
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.mjs +4 -4
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.mjs +7 -7
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.mjs +0 -1
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map +1 -1
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/index.mjs +7 -7
- package/dist/esm/node_modules/@radix-ui/react-tooltip/dist/index.mjs +509 -0
- package/dist/esm/node_modules/@radix-ui/react-tooltip/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +2 -2
- package/dist/esm/node_modules/react-textarea-autosize/dist/react-textarea-autosize.esm.mjs +3 -3
- package/dist/esm/node_modules/react-textarea-autosize/dist/react-textarea-autosize.esm.mjs.map +1 -1
- package/dist/esm/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/extends.mjs +17 -0
- package/dist/esm/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/extends.mjs.map +1 -0
- package/dist/esm/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.mjs +15 -0
- package/dist/esm/node_modules/react-textarea-autosize/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.mjs.map +1 -0
- package/dist/esm/providers/BezierProvider.mjs +3 -2
- package/dist/esm/providers/BezierProvider.mjs.map +1 -1
- package/dist/esm/utils/styleUtils.mjs +26 -2
- package/dist/esm/utils/styleUtils.mjs.map +1 -1
- package/dist/types/components/Forms/Slider/Slider.d.ts +18 -2
- package/dist/types/components/Forms/Slider/Slider.d.ts.map +1 -1
- package/dist/types/components/Forms/Slider/Slider.styled.d.ts +14 -24
- package/dist/types/components/Forms/Slider/Slider.styled.d.ts.map +1 -1
- package/dist/types/components/Forms/Slider/Slider.types.d.ts +52 -13
- package/dist/types/components/Forms/Slider/Slider.types.d.ts.map +1 -1
- package/dist/types/components/Help/Help.d.ts +1 -4
- package/dist/types/components/Help/Help.d.ts.map +1 -1
- package/dist/types/components/Help/Help.styled.d.ts +1 -1
- package/dist/types/components/Help/Help.styled.d.ts.map +1 -1
- package/dist/types/components/Help/Help.types.d.ts +1 -1
- package/dist/types/components/Help/Help.types.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.styled.d.ts +1 -7
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.styled.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.types.d.ts +3 -3
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.types.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/KeyItem/KeyItem.types.d.ts +2 -2
- package/dist/types/components/KeyValueListItem/common/KeyItem/KeyItem.types.d.ts.map +1 -1
- package/dist/types/components/LegacyTooltip/LegacyTooltip.d.ts +6 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltip.d.ts.map +1 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltip.styled.d.ts +18 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltip.styled.d.ts.map +1 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltip.types.d.ts +40 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltip.types.d.ts.map +1 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltipContent.d.ts +4 -0
- package/dist/types/components/LegacyTooltip/LegacyTooltipContent.d.ts.map +1 -0
- package/dist/types/components/LegacyTooltip/index.d.ts +4 -0
- package/dist/types/components/LegacyTooltip/index.d.ts.map +1 -0
- package/dist/types/components/{Tooltip → LegacyTooltip}/utils.d.ts +2 -2
- package/dist/types/components/LegacyTooltip/utils.d.ts.map +1 -0
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts +1 -1
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts.map +1 -1
- package/dist/types/components/ListMenuTitle/ListMenuTitle.types.d.ts +1 -2
- package/dist/types/components/ListMenuTitle/ListMenuTitle.types.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/Modal.types.d.ts +2 -2
- package/dist/types/components/Modals/Modal/Modal.types.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts +1 -2
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.types.d.ts +3 -3
- package/dist/types/components/Navigator/NavGroup/NavGroup.types.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts +1 -2
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.types.d.ts +3 -3
- package/dist/types/components/Navigator/NavItem/NavItem.types.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.d.ts +1 -2
- package/dist/types/components/SectionLabel/SectionLabel.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.styled.d.ts +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.styled.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.types.d.ts +2 -7
- package/dist/types/components/SectionLabel/SectionLabel.types.d.ts.map +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/types/components/Spinner/Spinner.types.d.ts +2 -1
- package/dist/types/components/Spinner/Spinner.types.d.ts.map +1 -1
- package/dist/types/components/TagBadge/Badge/Badge.d.ts +1 -1
- package/dist/types/components/TagBadge/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/TagBadge/Badge/Badge.types.d.ts +2 -2
- package/dist/types/components/TagBadge/Badge/Badge.types.d.ts.map +1 -1
- package/dist/types/components/TagBadge/Tag/Tag.d.ts +1 -1
- package/dist/types/components/TagBadge/Tag/Tag.d.ts.map +1 -1
- package/dist/types/components/Toast/Toast.types.d.ts +4 -4
- package/dist/types/components/Toast/Toast.types.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastElement.d.ts.map +1 -1
- package/dist/types/components/Toast/utils.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.d.ts +31 -5
- package/dist/types/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.styled.d.ts +22 -12
- package/dist/types/components/Tooltip/Tooltip.styled.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts +105 -24
- package/dist/types/components/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/types/components/Tooltip/index.d.ts +3 -5
- package/dist/types/components/Tooltip/index.d.ts.map +1 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.types.d.ts +2 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/providers/BezierProvider.d.ts.map +1 -1
- package/package.json +3 -5
- package/src/components/Avatars/AvatarGroup/__snapshots__/AvatarGroup.test.tsx.snap +17 -17
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +15 -15
- package/src/components/Forms/FormControl/__snapshots__/FormControl.test.tsx.snap +119 -119
- package/src/components/Forms/Slider/Slider.stories.tsx +10 -63
- package/src/components/Forms/Slider/Slider.styled.ts +46 -95
- package/src/components/Forms/Slider/Slider.test.tsx +130 -97
- package/src/components/Forms/Slider/Slider.tsx +117 -96
- package/src/components/Forms/Slider/Slider.types.ts +55 -17
- package/src/components/Forms/Slider/__snapshots__/Slider.test.tsx.snap +156 -0
- package/src/components/Help/Help.styled.ts +4 -7
- package/src/components/Help/Help.tsx +19 -12
- package/src/components/Help/Help.types.ts +1 -1
- package/src/components/KeyValueListItem/KeyValueListItem.test.tsx +10 -6
- package/src/components/KeyValueListItem/__snapshots__/KeyValueListItem.test.tsx.snap +13 -13
- package/src/components/KeyValueListItem/common/ItemActions/ItemAction.styled.ts +5 -15
- package/src/components/KeyValueListItem/common/ItemActions/ItemAction.tsx +6 -13
- package/src/components/KeyValueListItem/common/ItemActions/ItemAction.types.ts +3 -6
- package/src/components/KeyValueListItem/common/KeyItem/KeyItem.types.ts +2 -5
- package/src/components/LegacyTooltip/LegacyTooltip.stories.tsx +105 -0
- package/src/components/LegacyTooltip/LegacyTooltip.styled.ts +46 -0
- package/src/components/LegacyTooltip/LegacyTooltip.test.tsx +100 -0
- package/src/components/LegacyTooltip/LegacyTooltip.tsx +152 -0
- package/src/components/LegacyTooltip/LegacyTooltip.types.ts +69 -0
- package/src/components/{Tooltip/TooltipContent.test.tsx → LegacyTooltip/LegacyTooltipContent.test.tsx} +9 -8
- package/src/components/{Tooltip/TooltipContent.tsx → LegacyTooltip/LegacyTooltipContent.tsx} +6 -7
- package/src/components/LegacyTooltip/index.ts +5 -0
- package/src/components/{Tooltip → LegacyTooltip}/utils.ts +35 -35
- package/src/components/ListMenuTitle/ListMenuTitle.tsx +10 -6
- package/src/components/ListMenuTitle/ListMenuTitle.types.ts +1 -1
- package/src/components/Modals/Modal/Modal.types.ts +2 -2
- package/src/components/Navigator/NavGroup/NavGroup.stories.tsx +5 -2
- package/src/components/Navigator/NavGroup/NavGroup.test.tsx +1 -1
- package/src/components/Navigator/NavGroup/NavGroup.tsx +13 -16
- package/src/components/Navigator/NavGroup/NavGroup.types.ts +3 -2
- package/src/components/Navigator/NavItem/NavItem.test.tsx +3 -1
- package/src/components/Navigator/NavItem/NavItem.tsx +13 -12
- package/src/components/Navigator/NavItem/NavItem.types.ts +3 -2
- package/src/components/SectionLabel/SectionLabel.stories.tsx +1 -1
- package/src/components/SectionLabel/SectionLabel.styled.ts +2 -4
- package/src/components/SectionLabel/SectionLabel.test.tsx +5 -25
- package/src/components/SectionLabel/SectionLabel.tsx +11 -17
- package/src/components/SectionLabel/SectionLabel.types.ts +2 -8
- package/src/components/Spinner/Spinner.tsx +7 -4
- package/src/components/Spinner/Spinner.types.ts +2 -1
- package/src/components/TagBadge/Badge/Badge.stories.tsx +2 -1
- package/src/components/TagBadge/Badge/Badge.tsx +15 -10
- package/src/components/TagBadge/Badge/Badge.types.ts +2 -2
- package/src/components/TagBadge/Tag/Tag.tsx +9 -4
- package/src/components/TagBadge/TagBadge.mdx +1 -1
- package/src/components/TagBadge/TagBadge.stories.tsx +48 -33
- package/src/components/Toast/Toast.stories.tsx +9 -8
- package/src/components/Toast/Toast.types.ts +8 -5
- package/src/components/Toast/ToastElement.tsx +4 -5
- package/src/components/Toast/ToastProvider.tsx +2 -2
- package/src/components/Toast/ToastService.test.ts +3 -1
- package/src/components/Toast/useToastContextValues.test.tsx +5 -4
- package/src/components/Toast/utils.ts +13 -5
- package/src/components/Tooltip/Tooltip.stories.tsx +28 -67
- package/src/components/Tooltip/Tooltip.styled.ts +109 -19
- package/src/components/Tooltip/Tooltip.test.tsx +136 -63
- package/src/components/Tooltip/Tooltip.tsx +262 -120
- package/src/components/Tooltip/Tooltip.types.ts +111 -47
- package/src/components/Tooltip/index.ts +8 -8
- package/src/components/VisuallyHidden/VisuallyHidden.types.ts +1 -1
- package/src/index.ts +1 -0
- package/src/providers/BezierProvider.tsx +10 -6
- package/dist/cjs/components/Tooltip/TooltipContent.js.map +0 -1
- package/dist/cjs/components/Tooltip/utils.js.map +0 -1
- package/dist/esm/components/Tooltip/TooltipContent.mjs.map +0 -1
- package/dist/esm/components/Tooltip/utils.mjs.map +0 -1
- package/dist/types/components/Tooltip/TooltipContent.d.ts +0 -5
- package/dist/types/components/Tooltip/TooltipContent.d.ts.map +0 -1
- package/dist/types/components/Tooltip/utils.d.ts.map +0 -1
- /package/src/components/{Tooltip/__snapshots__/Tooltip.test.tsx.snap → LegacyTooltip/__snapshots__/LegacyTooltip.test.tsx.snap} +0 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function _defineProperty(obj, key, value) {
|
|
4
|
+
key = _toPropertyKey(key);
|
|
5
|
+
if (key in obj) {
|
|
6
|
+
Object.defineProperty(obj, key, {
|
|
7
|
+
value: value,
|
|
8
|
+
enumerable: true,
|
|
9
|
+
configurable: true,
|
|
10
|
+
writable: true
|
|
11
|
+
});
|
|
12
|
+
} else {
|
|
13
|
+
obj[key] = value;
|
|
14
|
+
}
|
|
15
|
+
return obj;
|
|
16
|
+
}
|
|
17
|
+
function _toPrimitive(input, hint) {
|
|
18
|
+
if (typeof input !== "object" || input === null) return input;
|
|
19
|
+
var prim = input[Symbol.toPrimitive];
|
|
20
|
+
if (prim !== undefined) {
|
|
21
|
+
var res = prim.call(input, hint || "default");
|
|
22
|
+
if (typeof res !== "object") return res;
|
|
23
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
24
|
+
}
|
|
25
|
+
return (hint === "string" ? String : Number)(input);
|
|
26
|
+
}
|
|
27
|
+
function _toPropertyKey(arg) {
|
|
28
|
+
var key = _toPrimitive(arg, "string");
|
|
29
|
+
return typeof key === "symbol" ? key : String(key);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
exports.defineProperty = _defineProperty;
|
|
33
|
+
exports.toPrimitive = _toPrimitive;
|
|
34
|
+
exports.toPropertyKey = _toPropertyKey;
|
|
35
|
+
//# sourceMappingURL=_rollupPluginBabelHelpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"_rollupPluginBabelHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -41,9 +41,11 @@ const TEXT_COLORS = {
|
|
|
41
41
|
[Banner_types.BannerVariant.Alt]: 'txt-black-darker'
|
|
42
42
|
};
|
|
43
43
|
const ELEVATIONS = {
|
|
44
|
-
[Banner_types.BannerVariant.Alt]: FoundationStyledComponent.css
|
|
44
|
+
[Banner_types.BannerVariant.Alt]: FoundationStyledComponent.css`
|
|
45
|
+
${({
|
|
45
46
|
foundation
|
|
46
|
-
}) => foundation?.elevation?.ev2()
|
|
47
|
+
}) => foundation?.elevation?.ev2()}
|
|
48
|
+
`
|
|
47
49
|
};
|
|
48
50
|
|
|
49
51
|
exports.ACTION_BUTTON_COLOR_VARIANTS = ACTION_BUTTON_COLOR_VARIANTS;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Banner.const.js","sources":["../../../../src/components/Banner/Banner.const.ts"],"sourcesContent":["import {\n type SemanticNames,\n css,\n} from '~/src/foundation'\n\nimport type { InjectedInterpolation } from '~/src/types/Foundation'\n\nimport { ButtonColorVariant } from '~/src/components/Button'\n\nimport { BannerVariant } from './Banner.types'\n\nexport const BACKGROUND_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'bg-black-lighter',\n [BannerVariant.Blue]: 'bgtxt-blue-lightest',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-lightest',\n [BannerVariant.Green]: 'bgtxt-green-lightest',\n [BannerVariant.Orange]: 'bgtxt-orange-lightest',\n [BannerVariant.Red]: 'bgtxt-red-lightest',\n [BannerVariant.Alt]: 'bg-grey-lighter',\n}\n\nexport const DEFAULT_ICON_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'txt-black-darker',\n [BannerVariant.Blue]: 'bgtxt-blue-normal',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-normal',\n [BannerVariant.Green]: 'bgtxt-green-normal',\n [BannerVariant.Orange]: 'bgtxt-orange-normal',\n [BannerVariant.Red]: 'bgtxt-red-normal',\n [BannerVariant.Alt]: 'bgtxt-red-normal',\n}\n\nexport const ACTION_BUTTON_COLOR_VARIANTS: Record<BannerVariant, ButtonColorVariant> = {\n [BannerVariant.Default]: ButtonColorVariant.MonochromeDark,\n [BannerVariant.Blue]: ButtonColorVariant.Blue,\n [BannerVariant.Cobalt]: ButtonColorVariant.Cobalt,\n [BannerVariant.Green]: ButtonColorVariant.Green,\n [BannerVariant.Orange]: ButtonColorVariant.Orange,\n [BannerVariant.Red]: ButtonColorVariant.Red,\n [BannerVariant.Alt]: ButtonColorVariant.MonochromeDark,\n}\n\nexport const TEXT_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'txt-black-darker',\n [BannerVariant.Blue]: 'bgtxt-blue-normal',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-normal',\n [BannerVariant.Green]: 'bgtxt-green-normal',\n [BannerVariant.Orange]: 'bgtxt-orange-normal',\n [BannerVariant.Red]: 'bgtxt-red-normal',\n [BannerVariant.Alt]: 'txt-black-darker',\n}\n\nexport const ELEVATIONS: { [key in BannerVariant]?: InjectedInterpolation } = {\n [BannerVariant.Alt]: css`\n ${({ foundation }) => foundation?.elevation?.ev2()}\n `,\n}\n"],"names":["BACKGROUND_COLORS","BannerVariant","Default","Blue","Cobalt","Green","Orange","Red","Alt","DEFAULT_ICON_COLORS","ACTION_BUTTON_COLOR_VARIANTS","ButtonColorVariant","MonochromeDark","TEXT_COLORS","ELEVATIONS","css","foundation","elevation","ev2"],"mappings":";;;;;;AAWO,MAAMA,iBAAuD,GAAG;AACrE,EAAA,CAACC,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,qBAAqB;AAC3C,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,uBAAuB;AAC/C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,sBAAsB;AAC7C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,uBAAuB;AAC/C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,oBAAoB;EACzC,CAACN,0BAAa,CAACO,GAAG,GAAG,iBAAA;AACvB,EAAC;AAEM,MAAMC,mBAAyD,GAAG;AACvE,EAAA,CAACR,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,mBAAmB;AACzC,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,oBAAoB;AAC3C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,kBAAkB;EACvC,CAACN,0BAAa,CAACO,GAAG,GAAG,kBAAA;AACvB,EAAC;AAEM,MAAME,4BAAuE,GAAG;AACrF,EAAA,CAACT,0BAAa,CAACC,OAAO,GAAGS,+BAAkB,CAACC,cAAc;AAC1D,EAAA,CAACX,0BAAa,CAACE,IAAI,GAAGQ,+BAAkB,CAACR,IAAI;AAC7C,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAGO,+BAAkB,CAACP,MAAM;AACjD,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAGM,+BAAkB,CAACN,KAAK;AAC/C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAGK,+BAAkB,CAACL,MAAM;AACjD,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAGI,+BAAkB,CAACJ,GAAG;AAC3C,EAAA,CAACN,0BAAa,CAACO,GAAG,GAAGG,+BAAkB,CAACC,cAAAA;AAC1C,EAAC;AAEM,MAAMC,WAAiD,GAAG;AAC/D,EAAA,CAACZ,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,mBAAmB;AACzC,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,oBAAoB;AAC3C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,kBAAkB;EACvC,CAACN,0BAAa,CAACO,GAAG,GAAG,kBAAA;AACvB,EAAC;AAEM,MAAMM,UAA8D,GAAG;AAC5E,EAAA,CAACb,0BAAa,CAACO,GAAG,GAAGO,
|
|
1
|
+
{"version":3,"file":"Banner.const.js","sources":["../../../../src/components/Banner/Banner.const.ts"],"sourcesContent":["import {\n type SemanticNames,\n css,\n} from '~/src/foundation'\n\nimport type { InjectedInterpolation } from '~/src/types/Foundation'\n\nimport { ButtonColorVariant } from '~/src/components/Button'\n\nimport { BannerVariant } from './Banner.types'\n\nexport const BACKGROUND_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'bg-black-lighter',\n [BannerVariant.Blue]: 'bgtxt-blue-lightest',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-lightest',\n [BannerVariant.Green]: 'bgtxt-green-lightest',\n [BannerVariant.Orange]: 'bgtxt-orange-lightest',\n [BannerVariant.Red]: 'bgtxt-red-lightest',\n [BannerVariant.Alt]: 'bg-grey-lighter',\n}\n\nexport const DEFAULT_ICON_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'txt-black-darker',\n [BannerVariant.Blue]: 'bgtxt-blue-normal',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-normal',\n [BannerVariant.Green]: 'bgtxt-green-normal',\n [BannerVariant.Orange]: 'bgtxt-orange-normal',\n [BannerVariant.Red]: 'bgtxt-red-normal',\n [BannerVariant.Alt]: 'bgtxt-red-normal',\n}\n\nexport const ACTION_BUTTON_COLOR_VARIANTS: Record<BannerVariant, ButtonColorVariant> = {\n [BannerVariant.Default]: ButtonColorVariant.MonochromeDark,\n [BannerVariant.Blue]: ButtonColorVariant.Blue,\n [BannerVariant.Cobalt]: ButtonColorVariant.Cobalt,\n [BannerVariant.Green]: ButtonColorVariant.Green,\n [BannerVariant.Orange]: ButtonColorVariant.Orange,\n [BannerVariant.Red]: ButtonColorVariant.Red,\n [BannerVariant.Alt]: ButtonColorVariant.MonochromeDark,\n}\n\nexport const TEXT_COLORS: Record<BannerVariant, SemanticNames> = {\n [BannerVariant.Default]: 'txt-black-darker',\n [BannerVariant.Blue]: 'bgtxt-blue-normal',\n [BannerVariant.Cobalt]: 'bgtxt-cobalt-normal',\n [BannerVariant.Green]: 'bgtxt-green-normal',\n [BannerVariant.Orange]: 'bgtxt-orange-normal',\n [BannerVariant.Red]: 'bgtxt-red-normal',\n [BannerVariant.Alt]: 'txt-black-darker',\n}\n\nexport const ELEVATIONS: { [key in BannerVariant]?: InjectedInterpolation } = {\n [BannerVariant.Alt]: css`\n ${({ foundation }) => foundation?.elevation?.ev2()}\n `,\n}\n"],"names":["BACKGROUND_COLORS","BannerVariant","Default","Blue","Cobalt","Green","Orange","Red","Alt","DEFAULT_ICON_COLORS","ACTION_BUTTON_COLOR_VARIANTS","ButtonColorVariant","MonochromeDark","TEXT_COLORS","ELEVATIONS","css","foundation","elevation","ev2"],"mappings":";;;;;;AAWO,MAAMA,iBAAuD,GAAG;AACrE,EAAA,CAACC,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,qBAAqB;AAC3C,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,uBAAuB;AAC/C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,sBAAsB;AAC7C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,uBAAuB;AAC/C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,oBAAoB;EACzC,CAACN,0BAAa,CAACO,GAAG,GAAG,iBAAA;AACvB,EAAC;AAEM,MAAMC,mBAAyD,GAAG;AACvE,EAAA,CAACR,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,mBAAmB;AACzC,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,oBAAoB;AAC3C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,kBAAkB;EACvC,CAACN,0BAAa,CAACO,GAAG,GAAG,kBAAA;AACvB,EAAC;AAEM,MAAME,4BAAuE,GAAG;AACrF,EAAA,CAACT,0BAAa,CAACC,OAAO,GAAGS,+BAAkB,CAACC,cAAc;AAC1D,EAAA,CAACX,0BAAa,CAACE,IAAI,GAAGQ,+BAAkB,CAACR,IAAI;AAC7C,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAGO,+BAAkB,CAACP,MAAM;AACjD,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAGM,+BAAkB,CAACN,KAAK;AAC/C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAGK,+BAAkB,CAACL,MAAM;AACjD,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAGI,+BAAkB,CAACJ,GAAG;AAC3C,EAAA,CAACN,0BAAa,CAACO,GAAG,GAAGG,+BAAkB,CAACC,cAAAA;AAC1C,EAAC;AAEM,MAAMC,WAAiD,GAAG;AAC/D,EAAA,CAACZ,0BAAa,CAACC,OAAO,GAAG,kBAAkB;AAC3C,EAAA,CAACD,0BAAa,CAACE,IAAI,GAAG,mBAAmB;AACzC,EAAA,CAACF,0BAAa,CAACG,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACH,0BAAa,CAACI,KAAK,GAAG,oBAAoB;AAC3C,EAAA,CAACJ,0BAAa,CAACK,MAAM,GAAG,qBAAqB;AAC7C,EAAA,CAACL,0BAAa,CAACM,GAAG,GAAG,kBAAkB;EACvC,CAACN,0BAAa,CAACO,GAAG,GAAG,kBAAA;AACvB,EAAC;AAEM,MAAMM,UAA8D,GAAG;AAC5E,EAAA,CAACb,0BAAa,CAACO,GAAG,GAAGO,6BAAI,CAAA;AAC3B,IAAA,EAAM,CAAC;AAAEC,IAAAA,UAAAA;AAAW,GAAC,KAAKA,UAAU,EAAEC,SAAS,EAAEC,GAAG,EAAG,CAAA;AACvD,EAAA,CAAA;AACA;;;;;;;;"}
|
|
@@ -2,29 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
var FoundationStyledComponent = require('../../../foundation/FoundationStyledComponent.js');
|
|
4
4
|
|
|
5
|
-
const inputTextStyle =
|
|
5
|
+
const inputTextStyle = FoundationStyledComponent.css`
|
|
6
|
+
color: ${({
|
|
6
7
|
foundation
|
|
7
|
-
}) => foundation?.theme?.['txt-black-darkest']
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
foundation
|
|
12
|
-
}) => foundation?.theme?.['txt-black-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
foundation
|
|
25
|
-
}) => foundation?.theme?.['
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
}) => foundation?.theme?.['txt-black-darkest']};
|
|
9
|
+
|
|
10
|
+
${props => props?.readOnly && FoundationStyledComponent.css`
|
|
11
|
+
color: ${({
|
|
12
|
+
foundation
|
|
13
|
+
}) => foundation?.theme?.['txt-black-darker']};
|
|
14
|
+
`}
|
|
15
|
+
`;
|
|
16
|
+
const inputPlaceholderStyle = FoundationStyledComponent.css`
|
|
17
|
+
&::placeholder {
|
|
18
|
+
color: ${({
|
|
19
|
+
foundation
|
|
20
|
+
}) => foundation?.theme?.['txt-black-dark']};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
const inputWrapperStyle = FoundationStyledComponent.css`
|
|
24
|
+
box-shadow: 0 1px 2px ${({
|
|
25
|
+
foundation
|
|
26
|
+
}) => foundation?.theme?.['bg-black-lighter']},
|
|
27
|
+
inset 0 0 0 1px ${({
|
|
28
|
+
foundation
|
|
29
|
+
}) => foundation?.theme?.['bg-black-dark']};
|
|
30
|
+
`;
|
|
31
|
+
const focusedInputWrapperStyle = FoundationStyledComponent.css`
|
|
32
|
+
box-shadow: 0 0 0 3px ${({
|
|
33
|
+
foundation
|
|
34
|
+
}) => foundation?.theme?.['bgtxt-blue-light']},
|
|
35
|
+
inset 0 0 0 1px ${({
|
|
36
|
+
foundation
|
|
37
|
+
}) => foundation?.theme?.['bgtxt-blue-normal']};
|
|
38
|
+
`;
|
|
39
|
+
const erroredInputWrapperStyle = FoundationStyledComponent.css`
|
|
40
|
+
box-shadow: 0 0 0 3px ${({
|
|
41
|
+
foundation
|
|
42
|
+
}) => foundation?.theme?.['bgtxt-orange-light']},
|
|
43
|
+
inset 0 0 0 1px ${({
|
|
44
|
+
foundation
|
|
45
|
+
}) => foundation?.theme?.['bgtxt-orange-normal']};
|
|
46
|
+
`;
|
|
28
47
|
|
|
29
48
|
exports.erroredInputWrapperStyle = erroredInputWrapperStyle;
|
|
30
49
|
exports.focusedInputWrapperStyle = focusedInputWrapperStyle;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mixins.js","sources":["../../../../../src/components/Forms/Inputs/mixins.ts"],"sourcesContent":["import { css } from '~/src/foundation'\n\nimport { type FormComponentProps } from '~/src/components/Forms/Form.types'\n\nexport const inputTextStyle = css`\n color: ${({ foundation }) => foundation?.theme?.['txt-black-darkest']};\n\n ${(props: FormComponentProps) => props?.readOnly && css`\n color: ${({ foundation }) => foundation?.theme?.['txt-black-darker']};\n `}\n`\n\nexport const inputPlaceholderStyle = css`\n &::placeholder {\n color: ${({ foundation }) => foundation?.theme?.['txt-black-dark']};\n }\n`\n\nexport const inputWrapperStyle = css`\n box-shadow: 0 1px 2px ${({ foundation }) => foundation?.theme?.['bg-black-lighter']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bg-black-dark']};\n`\n\nexport const focusedInputWrapperStyle = css`\n box-shadow: 0 0 0 3px ${({ foundation }) => foundation?.theme?.['bgtxt-blue-light']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bgtxt-blue-normal']};\n`\n\nexport const erroredInputWrapperStyle = css`\n box-shadow: 0 0 0 3px ${({ foundation }) => foundation?.theme?.['bgtxt-orange-light']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bgtxt-orange-normal']};\n`\n"],"names":["inputTextStyle","css","foundation","theme","props","readOnly","inputPlaceholderStyle","inputWrapperStyle","focusedInputWrapperStyle","erroredInputWrapperStyle"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"mixins.js","sources":["../../../../../src/components/Forms/Inputs/mixins.ts"],"sourcesContent":["import { css } from '~/src/foundation'\n\nimport { type FormComponentProps } from '~/src/components/Forms/Form.types'\n\nexport const inputTextStyle = css`\n color: ${({ foundation }) => foundation?.theme?.['txt-black-darkest']};\n\n ${(props: FormComponentProps) => props?.readOnly && css`\n color: ${({ foundation }) => foundation?.theme?.['txt-black-darker']};\n `}\n`\n\nexport const inputPlaceholderStyle = css`\n &::placeholder {\n color: ${({ foundation }) => foundation?.theme?.['txt-black-dark']};\n }\n`\n\nexport const inputWrapperStyle = css`\n box-shadow: 0 1px 2px ${({ foundation }) => foundation?.theme?.['bg-black-lighter']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bg-black-dark']};\n`\n\nexport const focusedInputWrapperStyle = css`\n box-shadow: 0 0 0 3px ${({ foundation }) => foundation?.theme?.['bgtxt-blue-light']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bgtxt-blue-normal']};\n`\n\nexport const erroredInputWrapperStyle = css`\n box-shadow: 0 0 0 3px ${({ foundation }) => foundation?.theme?.['bgtxt-orange-light']},\n inset 0 0 0 1px ${({ foundation }) => foundation?.theme?.['bgtxt-orange-normal']};\n`\n"],"names":["inputTextStyle","css","foundation","theme","props","readOnly","inputPlaceholderStyle","inputWrapperStyle","focusedInputWrapperStyle","erroredInputWrapperStyle"],"mappings":";;;;AAIO,MAAMA,cAAc,GAAGC,6BAAI,CAAA;AAClC,SAAA,EAAW,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,mBAAmB,CAAE,CAAA;AACxE;AACA,EAAA,EAAKC,KAAyB,IAAKA,KAAK,EAAEC,QAAQ,IAAIJ,6BAAI,CAAA;AAC1D,WAAA,EAAa,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,kBAAkB,CAAE,CAAA;AACzE,EAAI,CAAA,CAAA;AACJ,EAAC;AAEM,MAAMG,qBAAqB,GAAGL,6BAAI,CAAA;AACzC;AACA,WAAA,EAAa,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,gBAAgB,CAAE,CAAA;AACvE;AACA,EAAC;AAEM,MAAMI,iBAAiB,GAAGN,6BAAI,CAAA;AACrC,wBAAA,EAA0B,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,kBAAkB,CAAE,CAAA;AACtF,oBAAA,EAAsB,CAAC;AAAED,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,eAAe,CAAE,CAAA;AAC/E,EAAC;AAEM,MAAMK,wBAAwB,GAAGP,6BAAI,CAAA;AAC5C,wBAAA,EAA0B,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,kBAAkB,CAAE,CAAA;AACtF,oBAAA,EAAsB,CAAC;AAAED,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,mBAAmB,CAAE,CAAA;AACnF,EAAC;AAEM,MAAMM,wBAAwB,GAAGR,6BAAI,CAAA;AAC5C,wBAAA,EAA0B,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,oBAAoB,CAAE,CAAA;AACxF,oBAAA,EAAsB,CAAC;AAAED,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,KAAK,GAAG,qBAAqB,CAAE,CAAA;AACrF;;;;;;;;"}
|
|
@@ -2,84 +2,106 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var index = require('../../../node_modules/@radix-ui/react-slider/dist/index.js');
|
|
5
|
-
var
|
|
5
|
+
var typeUtils = require('../../../utils/typeUtils.js');
|
|
6
6
|
var Slider_styled = require('./Slider.styled.js');
|
|
7
|
+
var Tooltip = require('../../Tooltip/Tooltip.js');
|
|
8
|
+
var Tooltip_types = require('../../Tooltip/Tooltip.types.js');
|
|
7
9
|
|
|
8
10
|
const SLIDER_TEST_ID = 'bezier-react-slider';
|
|
9
|
-
const
|
|
11
|
+
const SliderGuide = /*#__PURE__*/React.memo(function SliderGuide({
|
|
12
|
+
min,
|
|
13
|
+
max,
|
|
14
|
+
value
|
|
15
|
+
}) {
|
|
16
|
+
return /*#__PURE__*/React.createElement(Slider_styled.SliderGuide, {
|
|
17
|
+
style: {
|
|
18
|
+
'--bezier-slider-guide-left': `${value / (max - min) * 100}%`
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/* NOTE: Props are injected at runtime by `SliderPrimitive.Thumb`. */
|
|
24
|
+
const SliderThumb = /*#__PURE__*/React.forwardRef(function SliderThumb({
|
|
25
|
+
disableTooltip,
|
|
26
|
+
...rest
|
|
27
|
+
}, forwardedRef) {
|
|
28
|
+
const value = rest?.['aria-valuenow'];
|
|
29
|
+
if (disableTooltip) {
|
|
30
|
+
return /*#__PURE__*/React.createElement(Slider_styled.SliderThumb, Object.assign({
|
|
31
|
+
ref: forwardedRef
|
|
32
|
+
}, rest));
|
|
33
|
+
}
|
|
34
|
+
return /*#__PURE__*/React.createElement(Tooltip.Tooltip, {
|
|
35
|
+
content: value,
|
|
36
|
+
offset: 6,
|
|
37
|
+
placement: Tooltip_types.TooltipPosition.TopCenter,
|
|
38
|
+
onPointerDownOutside: e => e.preventDefault()
|
|
39
|
+
}, /*#__PURE__*/React.createElement(Slider_styled.SliderThumb, Object.assign({
|
|
40
|
+
ref: forwardedRef
|
|
41
|
+
}, rest)));
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* An input component where the user selects a value from within a given range.
|
|
46
|
+
* The value of the slider is shown in a tooltip, and in some cases you can add a guide scale.
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
*
|
|
50
|
+
* ```tsx
|
|
51
|
+
* const [value, setValue] = useState([1])
|
|
52
|
+
* // Controlled
|
|
53
|
+
* <Slider
|
|
54
|
+
* value={value}
|
|
55
|
+
* onValueChange={setValue}
|
|
56
|
+
* />
|
|
57
|
+
* // Uncontrolled
|
|
58
|
+
* <Slider defaultValue={[1]} />
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
10
61
|
const Slider = /*#__PURE__*/React.forwardRef(function Slider({
|
|
62
|
+
style,
|
|
11
63
|
width = 36,
|
|
12
64
|
guide,
|
|
13
|
-
|
|
14
|
-
onThumbPointerUp = functionUtils.noop,
|
|
15
|
-
defaultValue = [5],
|
|
65
|
+
defaultValue = [0],
|
|
16
66
|
value,
|
|
17
67
|
disabled = false,
|
|
18
68
|
min = 0,
|
|
19
69
|
max = 10,
|
|
20
70
|
step = 1,
|
|
21
|
-
onValueChange = functionUtils.noop,
|
|
22
71
|
minStepsBetweenThumbs = 0,
|
|
72
|
+
disableTooltip = false,
|
|
23
73
|
...rest
|
|
24
74
|
}, forwardedRef) {
|
|
25
|
-
const
|
|
26
|
-
React.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
onValueChange(_value);
|
|
35
|
-
}, [onValueChange]);
|
|
36
|
-
const handlePointerDown = React.useCallback(() => {
|
|
37
|
-
if (!disabled) {
|
|
38
|
-
onThumbPointerDown(currentValue);
|
|
39
|
-
}
|
|
40
|
-
}, [disabled, onThumbPointerDown, currentValue]);
|
|
41
|
-
const handlePointerUp = React.useCallback(() => {
|
|
42
|
-
if (!disabled) {
|
|
43
|
-
onThumbPointerUp(currentValue);
|
|
44
|
-
}
|
|
45
|
-
}, [disabled, onThumbPointerUp, currentValue]);
|
|
46
|
-
return /*#__PURE__*/React.createElement(index.Root, {
|
|
47
|
-
asChild: true,
|
|
75
|
+
const targetValue = value || defaultValue;
|
|
76
|
+
return /*#__PURE__*/React.createElement(Slider_styled.SliderPrimitiveRoot, Object.assign({
|
|
77
|
+
style: {
|
|
78
|
+
...style,
|
|
79
|
+
'--bezier-slider-width': typeUtils.isNumber(width) ? `${width}px` : width
|
|
80
|
+
},
|
|
81
|
+
"data-testid": SLIDER_TEST_ID,
|
|
82
|
+
ref: forwardedRef,
|
|
83
|
+
orientation: "horizontal",
|
|
48
84
|
defaultValue: defaultValue,
|
|
49
|
-
value:
|
|
85
|
+
value: value,
|
|
50
86
|
disabled: disabled,
|
|
51
87
|
min: min,
|
|
52
88
|
max: max,
|
|
53
89
|
step: step,
|
|
54
|
-
onValueChange: handleValueChange,
|
|
55
90
|
minStepsBetweenThumbs: minStepsBetweenThumbs
|
|
56
|
-
}, /*#__PURE__*/React.createElement(Slider_styled.
|
|
57
|
-
width: width,
|
|
58
|
-
disabled: disabled,
|
|
59
|
-
ref: forwardedRef,
|
|
60
|
-
"data-testid": SLIDER_TEST_ID
|
|
61
|
-
}, rest), /*#__PURE__*/React.createElement(index.Track, {
|
|
62
|
-
asChild: true
|
|
63
|
-
}, /*#__PURE__*/React.createElement(Slider_styled.SliderTrack, null, /*#__PURE__*/React.createElement(index.Range, {
|
|
64
|
-
asChild: true
|
|
65
|
-
}, /*#__PURE__*/React.createElement(Slider_styled.SliderRange, null)))), guide?.map(guideValue => /*#__PURE__*/React.createElement(Slider_styled.SliderGuide, {
|
|
91
|
+
}, rest), /*#__PURE__*/React.createElement(Slider_styled.SliderPrimitiveTrack, null, /*#__PURE__*/React.createElement(Slider_styled.SliderPrimitiveRange, null), guide && /*#__PURE__*/React.createElement(Slider_styled.GuideContainer, null, guide.map(guideValue => /*#__PURE__*/React.createElement(SliderGuide, {
|
|
66
92
|
key: `slider-guide-${guideValue}`,
|
|
67
93
|
min: min,
|
|
68
94
|
max: max,
|
|
69
|
-
|
|
70
|
-
})),
|
|
71
|
-
asChild: true
|
|
95
|
+
value: guideValue
|
|
96
|
+
})))), targetValue.map((_, i) => /*#__PURE__*/React.createElement(index.Thumb, {
|
|
72
97
|
// eslint-disable-next-line react/no-array-index-key
|
|
73
|
-
,
|
|
74
98
|
key: `slider-thumb-${i}`,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
})))));
|
|
99
|
+
asChild: true
|
|
100
|
+
}, /*#__PURE__*/React.createElement(SliderThumb, {
|
|
101
|
+
disableTooltip: disableTooltip
|
|
102
|
+
}))));
|
|
80
103
|
});
|
|
81
104
|
|
|
82
105
|
exports.SLIDER_TEST_ID = SLIDER_TEST_ID;
|
|
83
|
-
exports.SLIDER_THUMB_TEST_ID = SLIDER_THUMB_TEST_ID;
|
|
84
106
|
exports.Slider = Slider;
|
|
85
107
|
//# sourceMappingURL=Slider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../../../src/components/Forms/Slider/Slider.tsx"],"sourcesContent":["import React, {\n forwardRef,\n
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../../../src/components/Forms/Slider/Slider.tsx"],"sourcesContent":["import React, {\n forwardRef,\n memo,\n} from 'react'\n\nimport * as SliderPrimitive from '@radix-ui/react-slider'\n\nimport { isNumber } from '~/src/utils/typeUtils'\n\nimport {\n Tooltip,\n TooltipPosition,\n} from '~/src/components/Tooltip'\n\nimport type SliderProps from './Slider.types'\n\nimport * as Styled from './Slider.styled'\n\nexport const SLIDER_TEST_ID = 'bezier-react-slider'\n\nconst SliderGuide = memo<Record<'min' | 'max' | 'value', number>>(function SliderGuide({\n min,\n max,\n value,\n}) {\n return (\n <Styled.SliderGuide\n style={{\n '--bezier-slider-guide-left': `${(value / (max - min)) * 100}%`,\n } as React.CSSProperties}\n />\n )\n})\n\n/* NOTE: Props are injected at runtime by `SliderPrimitive.Thumb`. */\nconst SliderThumb = forwardRef<HTMLDivElement, Pick<SliderProps, 'disableTooltip'> & React.HTMLAttributes<HTMLDivElement>>(function SliderThumb({\n disableTooltip,\n ...rest\n}, forwardedRef) {\n const value = rest?.['aria-valuenow']\n\n if (disableTooltip) {\n return (\n <Styled.SliderThumb\n ref={forwardedRef}\n {...rest}\n />\n )\n }\n\n return (\n <Tooltip\n content={value}\n offset={6}\n placement={TooltipPosition.TopCenter}\n onPointerDownOutside={e => e.preventDefault()}\n >\n <Styled.SliderThumb\n ref={forwardedRef}\n {...rest}\n />\n </Tooltip>\n )\n})\n\n/**\n * An input component where the user selects a value from within a given range.\n * The value of the slider is shown in a tooltip, and in some cases you can add a guide scale.\n *\n * @example\n *\n * ```tsx\n * const [value, setValue] = useState([1])\n * // Controlled\n * <Slider\n * value={value}\n * onValueChange={setValue}\n * />\n * // Uncontrolled\n * <Slider defaultValue={[1]} />\n * ```\n */\nexport const Slider = forwardRef<HTMLSpanElement, SliderProps>(function Slider({\n style,\n width = 36,\n guide,\n defaultValue = [0],\n value,\n disabled = false,\n min = 0,\n max = 10,\n step = 1,\n minStepsBetweenThumbs = 0,\n disableTooltip = false,\n ...rest\n}, forwardedRef) {\n const targetValue = value || defaultValue\n\n return (\n <Styled.SliderPrimitiveRoot\n style={{\n ...style,\n '--bezier-slider-width': isNumber(width) ? `${width}px` : width,\n }}\n data-testid={SLIDER_TEST_ID}\n ref={forwardedRef}\n orientation=\"horizontal\"\n defaultValue={defaultValue}\n value={value}\n disabled={disabled}\n min={min}\n max={max}\n step={step}\n minStepsBetweenThumbs={minStepsBetweenThumbs}\n {...rest}\n >\n <Styled.SliderPrimitiveTrack>\n <Styled.SliderPrimitiveRange />\n\n { guide && (\n <Styled.GuideContainer>\n { guide.map((guideValue) => (\n <SliderGuide\n key={`slider-guide-${guideValue}`}\n min={min}\n max={max}\n value={guideValue}\n />\n )) }\n </Styled.GuideContainer>\n ) }\n </Styled.SliderPrimitiveTrack>\n\n { targetValue.map((_, i) => (\n <SliderPrimitive.Thumb\n // eslint-disable-next-line react/no-array-index-key\n key={`slider-thumb-${i}`}\n asChild\n >\n <SliderThumb disableTooltip={disableTooltip} />\n </SliderPrimitive.Thumb>\n )) }\n </Styled.SliderPrimitiveRoot>\n )\n})\n"],"names":["SLIDER_TEST_ID","SliderGuide","memo","min","max","value","React","createElement","Styled","style","SliderThumb","forwardRef","disableTooltip","rest","forwardedRef","Object","assign","ref","Tooltip","content","offset","placement","TooltipPosition","TopCenter","onPointerDownOutside","e","preventDefault","Slider","width","guide","defaultValue","disabled","step","minStepsBetweenThumbs","targetValue","isNumber","orientation","map","guideValue","key","_","i","SliderPrimitive","asChild"],"mappings":";;;;;;;;;AAkBO,MAAMA,cAAc,GAAG,sBAAqB;AAEnD,MAAMC,WAAW,gBAAGC,UAAI,CAA0C,SAASD,WAAWA,CAAC;EACrFE,GAAG;EACHC,GAAG;AACHC,EAAAA,KAAAA;AACF,CAAC,EAAE;AACD,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAACC,yBAAkB,EAAA;AACjBC,IAAAA,KAAK,EAAE;MACL,4BAA4B,EAAG,GAAGJ,KAAK,IAAID,GAAG,GAAGD,GAAG,CAAC,GAAI,GAAI,CAAA,CAAA,CAAA;AAC/D,KAAA;AAAyB,GAC1B,CAAC,CAAA;AAEN,CAAC,CAAC,CAAA;;AAEF;AACA,MAAMO,WAAW,gBAAGC,gBAAU,CAA6F,SAASD,WAAWA,CAAC;EAC9IE,cAAc;EACd,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;AACf,EAAA,MAAMT,KAAK,GAAGQ,IAAI,GAAG,eAAe,CAAC,CAAA;AAErC,EAAA,IAAID,cAAc,EAAE;IAClB,oBACEN,KAAA,CAAAC,aAAA,CAACC,yBAAkB,EAAAO,MAAA,CAAAC,MAAA,CAAA;AACjBC,MAAAA,GAAG,EAAEH,YAAAA;KACDD,EAAAA,IAAI,CACT,CAAC,CAAA;AAEN,GAAA;AAEA,EAAA,oBACEP,KAAA,CAAAC,aAAA,CAACW,eAAO,EAAA;AACNC,IAAAA,OAAO,EAAEd,KAAM;AACfe,IAAAA,MAAM,EAAE,CAAE;IACVC,SAAS,EAAEC,6BAAe,CAACC,SAAU;AACrCC,IAAAA,oBAAoB,EAAEC,CAAC,IAAIA,CAAC,CAACC,cAAc,EAAC;GAE5CpB,eAAAA,KAAA,CAAAC,aAAA,CAACC,yBAAkB,EAAAO,MAAA,CAAAC,MAAA,CAAA;AACjBC,IAAAA,GAAG,EAAEH,YAAAA;GACDD,EAAAA,IAAI,CACT,CACM,CAAC,CAAA;AAEd,CAAC,CAAC,CAAA;;AAEF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACac,MAAM,gBAAGhB,gBAAU,CAA+B,SAASgB,MAAMA,CAAC;EAC7ElB,KAAK;AACLmB,EAAAA,KAAK,GAAG,EAAE;EACVC,KAAK;EACLC,YAAY,GAAG,CAAC,CAAC,CAAC;EAClBzB,KAAK;AACL0B,EAAAA,QAAQ,GAAG,KAAK;AAChB5B,EAAAA,GAAG,GAAG,CAAC;AACPC,EAAAA,GAAG,GAAG,EAAE;AACR4B,EAAAA,IAAI,GAAG,CAAC;AACRC,EAAAA,qBAAqB,GAAG,CAAC;AACzBrB,EAAAA,cAAc,GAAG,KAAK;EACtB,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;AACf,EAAA,MAAMoB,WAAW,GAAG7B,KAAK,IAAIyB,YAAY,CAAA;EAEzC,oBACExB,KAAA,CAAAC,aAAA,CAACC,iCAA0B,EAAAO,MAAA,CAAAC,MAAA,CAAA;AACzBP,IAAAA,KAAK,EAAE;AACL,MAAA,GAAGA,KAAK;MACR,uBAAuB,EAAE0B,kBAAQ,CAACP,KAAK,CAAC,GAAI,CAAA,EAAEA,KAAM,CAAA,EAAA,CAAG,GAAGA,KAAAA;KAC1D;AACF,IAAA,aAAA,EAAa5B,cAAe;AAC5BiB,IAAAA,GAAG,EAAEH,YAAa;AAClBsB,IAAAA,WAAW,EAAC,YAAY;AACxBN,IAAAA,YAAY,EAAEA,YAAa;AAC3BzB,IAAAA,KAAK,EAAEA,KAAM;AACb0B,IAAAA,QAAQ,EAAEA,QAAS;AACnB5B,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACT4B,IAAAA,IAAI,EAAEA,IAAK;AACXC,IAAAA,qBAAqB,EAAEA,qBAAAA;AAAsB,GAAA,EACzCpB,IAAI,CAERP,eAAAA,KAAA,CAAAC,aAAA,CAACC,kCAA2B,EAC1BF,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACC,kCAA2B,MAAE,CAAC,EAE7BqB,KAAK,iBACLvB,KAAA,CAAAC,aAAA,CAACC,4BAAqB,EAClBqB,IAAAA,EAAAA,KAAK,CAACQ,GAAG,CAAEC,UAAU,iBACrBhC,KAAA,CAAAC,aAAA,CAACN,WAAW,EAAA;IACVsC,GAAG,EAAG,CAAeD,aAAAA,EAAAA,UAAW,CAAE,CAAA;AAClCnC,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,GAAG,EAAEA,GAAI;AACTC,IAAAA,KAAK,EAAEiC,UAAAA;GACR,CACF,CACoB,CAEE,CAAC,EAE5BJ,WAAW,CAACG,GAAG,CAAC,CAACG,CAAC,EAAEC,CAAC,kBACrBnC,KAAA,CAAAC,aAAA,CAACmC,WAAqB,EAAA;AACpB;IACAH,GAAG,EAAG,CAAeE,aAAAA,EAAAA,CAAE,CAAE,CAAA;IACzBE,OAAO,EAAA,IAAA;AAAA,GAAA,eAEPrC,KAAA,CAAAC,aAAA,CAACG,WAAW,EAAA;AAACE,IAAAA,cAAc,EAAEA,cAAAA;GAAiB,CACzB,CACxB,CACyB,CAAC,CAAA;AAEjC,CAAC;;;;;"}
|
|
@@ -1,108 +1,49 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var index = require('../../../node_modules/@radix-ui/react-slider/dist/index.js');
|
|
3
4
|
var DisabledOpacity = require('../../../constants/DisabledOpacity.js');
|
|
4
|
-
var styleUtils = require('../../../utils/styleUtils.js');
|
|
5
5
|
var mixins = require('../Inputs/mixins.js');
|
|
6
6
|
var FoundationStyledComponent = require('../../../foundation/FoundationStyledComponent.js');
|
|
7
7
|
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const SLIDER_GUIDE_WIDTH = 2;
|
|
11
|
-
const SLIDER_GUIDE_HEIGHT = 8;
|
|
12
|
-
function calculateGuideBottomPosition({
|
|
13
|
-
gap
|
|
14
|
-
}) {
|
|
15
|
-
return FoundationStyledComponent.css`
|
|
16
|
-
bottom: calc(${SLIDER_GUIDE_HEIGHT}px + ${SLIDER_GUIDE_HEIGHT / 2}px + ${gap}px);
|
|
17
|
-
`;
|
|
18
|
-
}
|
|
19
|
-
function calculateGuideLeftPosition({
|
|
20
|
-
min,
|
|
21
|
-
max,
|
|
22
|
-
guideValue
|
|
23
|
-
}) {
|
|
24
|
-
const relativePositionPercentage = guideValue / (max - min) * 100;
|
|
25
|
-
const thumbOffsetPx = ((max + min) / 2 - guideValue) * (SLIDER_THUMB_SIZE / (max - min));
|
|
26
|
-
return FoundationStyledComponent.css`
|
|
27
|
-
left: calc(${relativePositionPercentage}% - ${SLIDER_GUIDE_WIDTH / 2}px + ${thumbOffsetPx}px);
|
|
28
|
-
`;
|
|
29
|
-
}
|
|
30
|
-
const SliderRoot = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
31
|
-
displayName: "Sliderstyled__SliderRoot",
|
|
8
|
+
const SliderPrimitiveRoot = /*#__PURE__*/FoundationStyledComponent.styled(index.Root).withConfig({
|
|
9
|
+
displayName: "Sliderstyled__SliderPrimitiveRoot",
|
|
32
10
|
componentId: "sc-k2r47n-0"
|
|
33
|
-
})(["position:relative;display:flex;align-items:center;width:
|
|
34
|
-
width
|
|
35
|
-
}) => styleUtils.toLength(width, '36px'), SLIDER_THUMB_SIZE, ({
|
|
36
|
-
disabled
|
|
37
|
-
}) => disabled ? 'not-allowed' : 'pointer', ({
|
|
38
|
-
disabled
|
|
39
|
-
}) => disabled ? DisabledOpacity.default : 'initial', ({
|
|
11
|
+
})(["--bezier-slider-width:auto;--bezier-slider-thumb-size:20px;position:relative;display:flex;align-items:center;width:var(--bezier-slider-width);height:var(--bezier-slider-thumb-size);touch-action:none;cursor:pointer;user-select:none;&[data-disabled]{cursor:not-allowed;opacity:", ";}", ";", ""], DisabledOpacity.default, ({
|
|
40
12
|
foundation
|
|
41
13
|
}) => foundation?.transition?.getTransitionsCSS(['opacity']), ({
|
|
42
14
|
interpolation
|
|
43
15
|
}) => interpolation);
|
|
44
|
-
const
|
|
45
|
-
displayName: "
|
|
16
|
+
const SliderPrimitiveTrack = /*#__PURE__*/FoundationStyledComponent.styled(index.Track).withConfig({
|
|
17
|
+
displayName: "Sliderstyled__SliderPrimitiveTrack",
|
|
46
18
|
componentId: "sc-k2r47n-1"
|
|
47
|
-
})(["position:relative;flex:1;height:
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
foundation
|
|
51
|
-
}) => foundation?.theme?.['bg-black-dark'], ({
|
|
52
|
-
interpolation
|
|
53
|
-
}) => interpolation);
|
|
54
|
-
const SliderRange = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
55
|
-
displayName: "Sliderstyled__SliderRange",
|
|
19
|
+
})(["position:relative;flex:1;height:6px;background-color:var(--bg-black-dark);border-radius:3px;"]);
|
|
20
|
+
const SliderPrimitiveRange = /*#__PURE__*/FoundationStyledComponent.styled(index.Range).withConfig({
|
|
21
|
+
displayName: "Sliderstyled__SliderPrimitiveRange",
|
|
56
22
|
componentId: "sc-k2r47n-2"
|
|
57
|
-
})(["position:absolute;height:100%;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
})
|
|
62
|
-
interpolation
|
|
63
|
-
}) => interpolation);
|
|
23
|
+
})(["position:absolute;height:100%;background-color:var(--bgtxt-green-normal);border-radius:3px;"]);
|
|
24
|
+
const GuideContainer = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
25
|
+
displayName: "Sliderstyled__GuideContainer",
|
|
26
|
+
componentId: "sc-k2r47n-3"
|
|
27
|
+
})(["--bezier-slider-guide-height:8px;position:absolute;top:calc(-1 * (var(--bezier-slider-guide-height) + 3px));left:calc(var(--bezier-slider-thumb-size) / 2);width:calc(100% - var(--bezier-slider-thumb-size));"]);
|
|
64
28
|
const SliderGuide = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
65
29
|
displayName: "Sliderstyled__SliderGuide",
|
|
66
|
-
componentId: "sc-k2r47n-
|
|
67
|
-
})(["position:absolute;
|
|
68
|
-
gap: 3
|
|
69
|
-
}), ({
|
|
70
|
-
min,
|
|
71
|
-
max,
|
|
72
|
-
guideValue
|
|
73
|
-
}) => calculateGuideLeftPosition({
|
|
74
|
-
min,
|
|
75
|
-
max,
|
|
76
|
-
guideValue
|
|
77
|
-
}), SLIDER_GUIDE_WIDTH, SLIDER_GUIDE_HEIGHT, ({
|
|
78
|
-
foundation
|
|
79
|
-
}) => foundation?.rounding?.round1, ({
|
|
80
|
-
foundation
|
|
81
|
-
}) => foundation?.theme?.['bg-black-light'], ({
|
|
82
|
-
interpolation
|
|
83
|
-
}) => interpolation);
|
|
30
|
+
componentId: "sc-k2r47n-4"
|
|
31
|
+
})(["--bezier-slider-guide-left:0;position:absolute;top:0;left:var(--bezier-slider-guide-left);width:2px;height:var(--bezier-slider-guide-height);background-color:var(--bg-black-light);border-radius:1px;transform:translateX(-50%);"]);
|
|
84
32
|
const SliderThumb = /*#__PURE__*/FoundationStyledComponent.styled.div.withConfig({
|
|
85
33
|
displayName: "Sliderstyled__SliderThumb",
|
|
86
|
-
componentId: "sc-k2r47n-
|
|
87
|
-
})(["all:unset;display:block;width:
|
|
88
|
-
foundation
|
|
89
|
-
}) => foundation?.rounding?.round12, ({
|
|
34
|
+
componentId: "sc-k2r47n-5"
|
|
35
|
+
})(["all:unset;display:block;width:var(--bezier-slider-thumb-size);height:var(--bezier-slider-thumb-size);border-radius:12px;", " background-color:var(--bgtxt-absolute-white-dark);&:hover{", " background-color:var(--bgtxt-absolute-white-dark);}&:focus-visible{", "}", ""], ({
|
|
90
36
|
foundation
|
|
91
37
|
}) => foundation?.elevation?.ev2(), ({
|
|
92
38
|
foundation
|
|
93
|
-
}) => foundation?.
|
|
94
|
-
foundation
|
|
95
|
-
}) => foundation?.elevation?.ev3(), ({
|
|
96
|
-
foundation
|
|
97
|
-
}) => foundation?.theme?.['bgtxt-absolute-white-dark'], mixins.focusedInputWrapperStyle, ({
|
|
39
|
+
}) => foundation?.elevation?.ev3(), mixins.focusedInputWrapperStyle, ({
|
|
98
40
|
foundation
|
|
99
|
-
}) => foundation?.transition?.getTransitionsCSS(['box-shadow'])
|
|
100
|
-
interpolation
|
|
101
|
-
}) => interpolation);
|
|
41
|
+
}) => foundation?.transition?.getTransitionsCSS(['box-shadow']));
|
|
102
42
|
|
|
43
|
+
exports.GuideContainer = GuideContainer;
|
|
103
44
|
exports.SliderGuide = SliderGuide;
|
|
104
|
-
exports.
|
|
105
|
-
exports.
|
|
45
|
+
exports.SliderPrimitiveRange = SliderPrimitiveRange;
|
|
46
|
+
exports.SliderPrimitiveRoot = SliderPrimitiveRoot;
|
|
47
|
+
exports.SliderPrimitiveTrack = SliderPrimitiveTrack;
|
|
106
48
|
exports.SliderThumb = SliderThumb;
|
|
107
|
-
exports.SliderTrack = SliderTrack;
|
|
108
49
|
//# sourceMappingURL=Slider.styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.styled.js","sources":["../../../../../src/components/Forms/Slider/Slider.styled.ts"],"sourcesContent":["import
|
|
1
|
+
{"version":3,"file":"Slider.styled.js","sources":["../../../../../src/components/Forms/Slider/Slider.styled.ts"],"sourcesContent":["import * as SliderPrimitive from '@radix-ui/react-slider'\n\nimport { styled } from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport type { InterpolationProps } from '~/src/types/Foundation'\n\nimport { focusedInputWrapperStyle } from '~/src/components/Forms/Inputs/mixins'\n\nexport const SliderPrimitiveRoot = styled(SliderPrimitive.Root)<InterpolationProps>`\n --bezier-slider-width: auto;\n --bezier-slider-thumb-size: 20px;\n\n position: relative;\n display: flex;\n align-items: center;\n width: var(--bezier-slider-width);\n height: var(--bezier-slider-thumb-size);\n touch-action: none;\n cursor: pointer;\n user-select: none;\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: ${DisabledOpacity};\n }\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS(['opacity'])};\n ${({ interpolation }) => interpolation}\n`\n\nexport const SliderPrimitiveTrack = styled(SliderPrimitive.Track)`\n position: relative;\n flex: 1;\n height: 6px;\n background-color: var(--bg-black-dark);\n border-radius: 3px;\n`\n\nexport const SliderPrimitiveRange = styled(SliderPrimitive.Range)`\n position: absolute;\n height: 100%;\n background-color: var(--bgtxt-green-normal);\n border-radius: 3px;\n`\n\nexport const GuideContainer = styled.div`\n --bezier-slider-guide-height: 8px;\n\n position: absolute;\n top: calc(-1 * (var(--bezier-slider-guide-height) + 3px));\n left: calc(var(--bezier-slider-thumb-size) / 2);\n width: calc(100% - var(--bezier-slider-thumb-size));\n`\n\nexport const SliderGuide = styled.div`\n --bezier-slider-guide-left: 0;\n\n position: absolute;\n top: 0;\n left: var(--bezier-slider-guide-left);\n width: 2px;\n height: var(--bezier-slider-guide-height);\n background-color: var(--bg-black-light);\n border-radius: 1px;\n transform: translateX(-50%);\n`\n\nexport const SliderThumb = styled.div`\n all: unset;\n display: block;\n width: var(--bezier-slider-thumb-size);\n height: var(--bezier-slider-thumb-size);\n border-radius: 12px;\n\n ${({ foundation }) => foundation?.elevation?.ev2()}\n /* stylelint-disable order/properties-order */\n /* NOTE: Override the background-color property inside ev mixin */\n background-color: var(--bgtxt-absolute-white-dark);\n\n &:hover {\n ${({ foundation }) => foundation?.elevation?.ev3()}\n background-color: var(--bgtxt-absolute-white-dark);\n }\n\n &:focus-visible {\n ${focusedInputWrapperStyle}\n }\n\n ${({ foundation }) => foundation?.transition?.getTransitionsCSS(['box-shadow'])}\n`\n"],"names":["SliderPrimitiveRoot","styled","SliderPrimitive","withConfig","displayName","componentId","DisabledOpacity","foundation","transition","getTransitionsCSS","interpolation","SliderPrimitiveTrack","SliderPrimitiveRange","GuideContainer","div","SliderGuide","SliderThumb","elevation","ev2","ev3","focusedInputWrapperStyle"],"mappings":";;;;;;;AASO,MAAMA,mBAAmB,gBAAGC,gCAAM,CAACC,UAAoB,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,mCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAehDC,CAAAA,CAAAA,CAAAA,qRAAAA,EAAAA,IAAAA,EAAAA,GAAAA,EAAAA,EAAAA,CAAAA,EAAAA,uBAAe,EAG1B,CAAC;AAAEC,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,EAC1E,CAAC;AAAEC,EAAAA,aAAAA;AAAc,CAAC,KAAKA,aAAa,EACvC;AAEM,MAAMC,oBAAoB,gBAAGV,gCAAM,CAACC,WAAqB,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAMhE,CAAA,CAAA,CAAA,8FAAA,CAAA,EAAA;AAEM,MAAMO,oBAAoB,gBAAGX,gCAAM,CAACC,WAAqB,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,oCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAKhE,CAAA,CAAA,CAAA,6FAAA,CAAA,EAAA;MAEYQ,cAAc,gBAAGZ,gCAAM,CAACa,GAAG,CAAAX,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAOvC,CAAA,CAAA,CAAA,gNAAA,CAAA,EAAA;MAEYU,WAAW,gBAAGd,gCAAM,CAACa,GAAG,CAAAX,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAWpC,CAAA,CAAA,CAAA,mOAAA,CAAA,EAAA;MAEYW,WAAW,gBAAGf,gCAAM,CAACa,GAAG,CAAAX,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAA,CAAA,CAAA,CAAA,0HAAA,EAAA,6DAAA,EAAA,sEAAA,EAAA,GAAA,EAAA,EAAA,CAAA,EAOjC,CAAC;AAAEE,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEU,SAAS,EAAEC,GAAG,EAAE,EAM9C,CAAC;AAAEX,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEU,SAAS,EAAEE,GAAG,EAAE,EAKhDC,+BAAwB,EAG1B,CAAC;AAAEb,EAAAA,UAAAA;AAAW,CAAC,KAAKA,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,CAAC,CAAC,YAAY,CAAC,CAAC;;;;;;;;;"}
|
|
@@ -6,29 +6,32 @@ var React = require('react');
|
|
|
6
6
|
var bezierIcons = require('@channel.io/bezier-icons');
|
|
7
7
|
var typeUtils = require('../../utils/typeUtils.js');
|
|
8
8
|
var Help_styled = require('./Help.styled.js');
|
|
9
|
+
var Tooltip = require('../Tooltip/Tooltip.js');
|
|
9
10
|
var Icon_types = require('../Icon/Icon.types.js');
|
|
10
11
|
|
|
11
12
|
const HELP_TEST_ID = 'bezier-react-help';
|
|
12
13
|
const HELP_DISPLAY_NAME = 'Help';
|
|
13
|
-
function Help({
|
|
14
|
+
const Help = /*#__PURE__*/React.forwardRef(function Help({
|
|
14
15
|
children,
|
|
15
16
|
...rest
|
|
16
|
-
}) {
|
|
17
|
+
}, forwardedRef) {
|
|
17
18
|
if (typeUtils.isEmpty(children)) {
|
|
18
19
|
return null;
|
|
19
20
|
}
|
|
20
|
-
return /*#__PURE__*/React.createElement(
|
|
21
|
+
return /*#__PURE__*/React.createElement(Tooltip.Tooltip, Object.assign({}, rest, {
|
|
22
|
+
ref: forwardedRef,
|
|
21
23
|
content: children
|
|
22
|
-
}), /*#__PURE__*/React.createElement(Help_styled.Icon, {
|
|
24
|
+
}), /*#__PURE__*/React.createElement(Help_styled.Trigger, null, /*#__PURE__*/React.createElement(Help_styled.Icon, {
|
|
23
25
|
testId: HELP_TEST_ID,
|
|
24
26
|
source: bezierIcons.HelpFilledIcon,
|
|
25
27
|
size: Icon_types.IconSize.XS,
|
|
26
28
|
color: "txt-black-dark"
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
+
})));
|
|
30
|
+
});
|
|
29
31
|
Help.displayName = HELP_DISPLAY_NAME;
|
|
32
|
+
var Help$1 = Help;
|
|
30
33
|
|
|
31
34
|
exports.HELP_DISPLAY_NAME = HELP_DISPLAY_NAME;
|
|
32
35
|
exports.HELP_TEST_ID = HELP_TEST_ID;
|
|
33
|
-
exports.default = Help;
|
|
36
|
+
exports.default = Help$1;
|
|
34
37
|
//# sourceMappingURL=Help.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Help.js","sources":["../../../../src/components/Help/Help.tsx"],"sourcesContent":["import React from 'react'\n\nimport { HelpFilledIcon } from '@channel.io/bezier-icons'\n\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { IconSize } from '~/src/components/Icon'\n\nimport type HelpProps from './Help.types'\n\nimport * as Styled from './Help.styled'\n\nexport const HELP_TEST_ID = 'bezier-react-help'\nexport const HELP_DISPLAY_NAME = 'Help'\n\
|
|
1
|
+
{"version":3,"file":"Help.js","sources":["../../../../src/components/Help/Help.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport { HelpFilledIcon } from '@channel.io/bezier-icons'\n\nimport { isEmpty } from '~/src/utils/typeUtils'\n\nimport { IconSize } from '~/src/components/Icon'\nimport { Tooltip } from '~/src/components/Tooltip'\n\nimport type HelpProps from './Help.types'\n\nimport * as Styled from './Help.styled'\n\nexport const HELP_TEST_ID = 'bezier-react-help'\nexport const HELP_DISPLAY_NAME = 'Help'\n\nconst Help = forwardRef<HTMLDivElement, HelpProps>(function Help({\n children,\n ...rest\n}, forwardedRef) {\n if (isEmpty(children)) { return null }\n\n return (\n <Tooltip\n {...rest}\n ref={forwardedRef}\n content={children}\n >\n <Styled.Trigger>\n <Styled.Icon\n testId={HELP_TEST_ID}\n source={HelpFilledIcon}\n size={IconSize.XS}\n color=\"txt-black-dark\"\n />\n </Styled.Trigger>\n </Tooltip>\n )\n})\n\nHelp.displayName = HELP_DISPLAY_NAME\n\nexport default Help\n"],"names":["HELP_TEST_ID","HELP_DISPLAY_NAME","Help","forwardRef","children","rest","forwardedRef","isEmpty","React","createElement","Tooltip","Object","assign","ref","content","Styled","testId","source","HelpFilledIcon","size","IconSize","XS","color","displayName"],"mappings":";;;;;;;;;;;AAaO,MAAMA,YAAY,GAAG,oBAAmB;AACxC,MAAMC,iBAAiB,GAAG,OAAM;AAEvC,MAAMC,IAAI,gBAAGC,gBAAU,CAA4B,SAASD,IAAIA,CAAC;EAC/DE,QAAQ;EACR,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;AACf,EAAA,IAAIC,iBAAO,CAACH,QAAQ,CAAC,EAAE;AAAE,IAAA,OAAO,IAAI,CAAA;AAAC,GAAA;EAErC,oBACEI,KAAA,CAAAC,aAAA,CAACC,eAAO,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EACFP,IAAI,EAAA;AACRQ,IAAAA,GAAG,EAAEP,YAAa;AAClBQ,IAAAA,OAAO,EAAEV,QAAAA;AAAS,GAAA,CAAA,eAElBI,KAAA,CAAAC,aAAA,CAACM,mBAAc,EACbP,IAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACM,gBAAW,EAAA;AACVC,IAAAA,MAAM,EAAEhB,YAAa;AACrBiB,IAAAA,MAAM,EAAEC,0BAAe;IACvBC,IAAI,EAAEC,mBAAQ,CAACC,EAAG;AAClBC,IAAAA,KAAK,EAAC,gBAAA;GACP,CACa,CACT,CAAC,CAAA;AAEd,CAAC,CAAC,CAAA;AAEFpB,IAAI,CAACqB,WAAW,GAAGtB,iBAAiB,CAAA;AAEpC,aAAeC,IAAI;;;;;;"}
|