@channel.io/bezier-react 1.6.0 → 1.6.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/dist/cjs/_virtual/_commonjsHelpers.js +3 -0
- package/dist/cjs/_virtual/_commonjsHelpers.js.map +1 -1
- package/dist/cjs/components/AutoFocus/AutoFocus.js +2 -2
- package/dist/cjs/components/AutoFocus/AutoFocus.js.map +1 -1
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.js +2 -2
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.js.map +1 -1
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.styled.js +2 -2
- package/dist/cjs/components/Avatars/CheckableAvatar/CheckableAvatar.styled.js.map +1 -1
- package/dist/cjs/components/Divider/Divider.js +2 -2
- package/dist/cjs/components/Divider/Divider.js.map +1 -1
- package/dist/cjs/components/Forms/Checkbox/Checkbox.js +2 -2
- package/dist/cjs/components/Forms/Checkbox/Checkbox.js.map +1 -1
- package/dist/cjs/components/Forms/Checkbox/Checkbox.styled.js +2 -2
- package/dist/cjs/components/Forms/Checkbox/Checkbox.styled.js.map +1 -1
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.js +2 -2
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.styled.js +2 -2
- package/dist/cjs/components/Forms/RadioGroup/RadioGroup.styled.js.map +1 -1
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControl.js +7 -7
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControlItem.js +3 -3
- package/dist/cjs/components/Forms/SegmentedControl/SegmentedControlItem.js.map +1 -1
- package/dist/cjs/components/Forms/Slider/Slider.js +5 -5
- package/dist/cjs/components/Forms/Slider/Slider.js.map +1 -1
- package/dist/cjs/components/Forms/Switch/Switch.js +3 -3
- package/dist/cjs/components/Forms/Switch/Switch.js.map +1 -1
- package/dist/cjs/components/ListItem/ListItem.styled.js +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.js +2 -2
- package/dist/cjs/components/Modals/Modal/Modal.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/Modal.styled.js +2 -2
- package/dist/cjs/components/Modals/Modal/Modal.styled.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalContent.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalContent.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalHeader.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalHeader.js.map +1 -1
- package/dist/cjs/components/Modals/Modal/ModalHelpers.js +3 -3
- package/dist/cjs/components/Modals/Modal/ModalHelpers.js.map +1 -1
- package/dist/cjs/components/Status/Status.styled.js +1 -1
- package/dist/cjs/components/Tabs/TabAction.styled.js +3 -3
- package/dist/cjs/components/Tabs/TabAction.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/TabActions.styled.js +2 -2
- package/dist/cjs/components/Tabs/TabActions.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/TabContent.js +2 -2
- package/dist/cjs/components/Tabs/TabContent.js.map +1 -1
- package/dist/cjs/components/Tabs/TabItem.js +2 -2
- package/dist/cjs/components/Tabs/TabItem.js.map +1 -1
- package/dist/cjs/components/Tabs/TabItems.styled.js +2 -2
- package/dist/cjs/components/Tabs/TabItems.styled.js.map +1 -1
- package/dist/cjs/components/Tabs/Tabs.styled.js +2 -2
- package/dist/cjs/components/Tabs/Tabs.styled.js.map +1 -1
- package/dist/cjs/components/Tooltip/Tooltip.types.js.map +1 -1
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js +2 -2
- package/dist/cjs/components/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/cjs/foundation/FoundationStyledComponent.js +16 -1
- package/dist/cjs/foundation/FoundationStyledComponent.js.map +1 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/{index.module.js → index.js} +19 -19
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/{index.module.js → index.js} +9 -9
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/{index.module.js → index.js} +52 -46
- package/dist/cjs/node_modules/@radix-ui/react-dialog/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/{index.module.js → index.js} +18 -18
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/{index.module.js → index.js} +37 -9
- package/dist/cjs/node_modules/@radix-ui/react-focus-scope/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/{index.module.js → index.js} +6 -6
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-radio-group/dist/{index.module.js → index.js} +26 -26
- package/dist/cjs/node_modules/@radix-ui/{react-roving-focus/dist/index.module.js.map → react-radio-group/dist/index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/{index.module.js → index.js} +25 -25
- package/dist/cjs/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-slider/dist/{index.module.js → index.js} +36 -35
- package/dist/cjs/node_modules/@radix-ui/react-slider/dist/{index.module.js.map → index.js.map} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/{index.module.js → index.js} +16 -16
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/{index.module.js → index.js} +24 -24
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/{index.module.js → index.js} +5 -5
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/{index.module.js → index.js} +18 -18
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/{index.module.js → index.js} +4 -4
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/{index.module.js → index.js} +1 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/{index.module.js → index.js} +3 -3
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_Symbol.js +12 -0
- package/dist/cjs/node_modules/lodash/_Symbol.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_baseGetTag.js +34 -0
- package/dist/cjs/node_modules/lodash/_baseGetTag.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_baseTrim.js +23 -0
- package/dist/cjs/node_modules/lodash/_baseTrim.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_freeGlobal.js +10 -0
- package/dist/cjs/node_modules/lodash/_freeGlobal.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_getRawTag.js +50 -0
- package/dist/cjs/node_modules/lodash/_getRawTag.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_objectToString.js +26 -0
- package/dist/cjs/node_modules/lodash/_objectToString.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_root.js +15 -0
- package/dist/cjs/node_modules/lodash/_root.js.map +1 -0
- package/dist/cjs/node_modules/lodash/_trimmedEndIndex.js +22 -0
- package/dist/cjs/node_modules/lodash/_trimmedEndIndex.js.map +1 -0
- package/dist/cjs/node_modules/lodash/debounce.js +187 -0
- package/dist/cjs/node_modules/lodash/debounce.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isObject.js +35 -0
- package/dist/cjs/node_modules/lodash/isObject.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isObjectLike.js +33 -0
- package/dist/cjs/node_modules/lodash/isObjectLike.js.map +1 -0
- package/dist/cjs/node_modules/lodash/isSymbol.js +35 -0
- package/dist/cjs/node_modules/lodash/isSymbol.js.map +1 -0
- package/dist/cjs/node_modules/lodash/now.js +29 -0
- package/dist/cjs/node_modules/lodash/now.js.map +1 -0
- package/dist/cjs/node_modules/lodash/throttle.js +79 -0
- package/dist/cjs/node_modules/lodash/throttle.js.map +1 -0
- package/dist/cjs/node_modules/lodash/toNumber.js +70 -0
- package/dist/cjs/node_modules/lodash/toNumber.js.map +1 -0
- package/dist/cjs/node_modules/react-resize-detector/build/index.esm.js +153 -668
- package/dist/cjs/node_modules/react-resize-detector/build/index.esm.js.map +1 -1
- package/dist/cjs/node_modules/ssr-window/ssr-window.esm.js +37 -43
- package/dist/cjs/node_modules/ssr-window/ssr-window.esm.js.map +1 -1
- package/dist/esm/_virtual/_commonjsHelpers.mjs +3 -1
- package/dist/esm/_virtual/_commonjsHelpers.mjs.map +1 -1
- package/dist/esm/components/AutoFocus/AutoFocus.mjs +1 -1
- package/dist/esm/components/Avatars/CheckableAvatar/CheckableAvatar.mjs +1 -1
- package/dist/esm/components/Avatars/CheckableAvatar/CheckableAvatar.styled.mjs +1 -1
- package/dist/esm/components/Divider/Divider.mjs +1 -1
- package/dist/esm/components/Forms/Checkbox/Checkbox.mjs +1 -1
- package/dist/esm/components/Forms/Checkbox/Checkbox.styled.mjs +1 -1
- package/dist/esm/components/Forms/RadioGroup/RadioGroup.mjs +1 -1
- package/dist/esm/components/Forms/RadioGroup/RadioGroup.styled.mjs +1 -1
- package/dist/esm/components/Forms/SegmentedControl/SegmentedControl.mjs +2 -2
- package/dist/esm/components/Forms/SegmentedControl/SegmentedControlItem.mjs +2 -2
- package/dist/esm/components/Forms/Slider/Slider.mjs +1 -1
- package/dist/esm/components/Forms/Switch/Switch.mjs +1 -1
- package/dist/esm/components/ListItem/ListItem.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/Modal.mjs +1 -1
- package/dist/esm/components/Modals/Modal/Modal.styled.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalContent.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalHeader.mjs +1 -1
- package/dist/esm/components/Modals/Modal/ModalHelpers.mjs +1 -1
- package/dist/esm/components/Status/Status.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabAction.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabActions.styled.mjs +1 -1
- package/dist/esm/components/Tabs/TabContent.mjs +1 -1
- package/dist/esm/components/Tabs/TabItem.mjs +1 -1
- package/dist/esm/components/Tabs/TabItems.styled.mjs +1 -1
- package/dist/esm/components/Tabs/Tabs.styled.mjs +1 -1
- package/dist/esm/components/Tooltip/Tooltip.types.mjs.map +1 -1
- package/dist/esm/components/VisuallyHidden/VisuallyHidden.mjs +1 -1
- package/dist/esm/foundation/FoundationStyledComponent.mjs +16 -1
- package/dist/esm/foundation/FoundationStyledComponent.mjs.map +1 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/primitive/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/primitive/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/{index.module.mjs → index.mjs} +9 -9
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/{index.module.mjs → index.mjs} +4 -4
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-context/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-context/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-dialog/dist/{index.module.mjs → index.mjs} +24 -18
- package/dist/esm/node_modules/@radix-ui/react-dialog/dist/{index.module.mjs.map → index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/{index.module.mjs → index.mjs} +6 -6
- package/dist/esm/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/{index.module.mjs → index.mjs} +33 -5
- package/dist/{cjs/node_modules/@radix-ui/react-radio-group/dist/index.module.js.map → esm/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-id/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-id/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/{index.module.mjs → index.mjs} +10 -10
- package/dist/esm/node_modules/@radix-ui/{react-dismissable-layer/dist/index.module.mjs.map → react-radio-group/dist/index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/{index.module.mjs → index.mjs} +10 -10
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-slider/dist/{index.module.mjs → index.mjs} +13 -12
- package/dist/esm/node_modules/@radix-ui/react-slider/dist/{index.module.mjs.map → index.mjs.map} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/{index.module.mjs → index.mjs} +8 -8
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/{index.module.mjs → index.mjs} +9 -9
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/{index.module.mjs → index.mjs} +3 -3
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/{index.module.mjs → index.mjs} +7 -7
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/{index.module.mjs → index.mjs} +1 -1
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/{index.module.mjs → index.mjs} +2 -2
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_Symbol.mjs +10 -0
- package/dist/esm/node_modules/lodash/_Symbol.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_baseGetTag.mjs +32 -0
- package/dist/esm/node_modules/lodash/_baseGetTag.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_baseTrim.mjs +21 -0
- package/dist/esm/node_modules/lodash/_baseTrim.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_freeGlobal.mjs +8 -0
- package/dist/esm/node_modules/lodash/_freeGlobal.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_getRawTag.mjs +48 -0
- package/dist/esm/node_modules/lodash/_getRawTag.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_objectToString.mjs +24 -0
- package/dist/esm/node_modules/lodash/_objectToString.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_root.mjs +13 -0
- package/dist/esm/node_modules/lodash/_root.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/_trimmedEndIndex.mjs +20 -0
- package/dist/esm/node_modules/lodash/_trimmedEndIndex.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/debounce.mjs +182 -0
- package/dist/esm/node_modules/lodash/debounce.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isObject.mjs +33 -0
- package/dist/esm/node_modules/lodash/isObject.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isObjectLike.mjs +31 -0
- package/dist/esm/node_modules/lodash/isObjectLike.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/isSymbol.mjs +33 -0
- package/dist/esm/node_modules/lodash/isSymbol.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/now.mjs +27 -0
- package/dist/esm/node_modules/lodash/now.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/throttle.mjs +75 -0
- package/dist/esm/node_modules/lodash/throttle.mjs.map +1 -0
- package/dist/esm/node_modules/lodash/toNumber.mjs +68 -0
- package/dist/esm/node_modules/lodash/toNumber.mjs.map +1 -0
- package/dist/esm/node_modules/react-resize-detector/build/index.esm.mjs +154 -651
- package/dist/esm/node_modules/react-resize-detector/build/index.esm.mjs.map +1 -1
- package/dist/esm/node_modules/ssr-window/ssr-window.esm.mjs +37 -43
- package/dist/esm/node_modules/ssr-window/ssr-window.esm.mjs.map +1 -1
- package/dist/types/components/Banner/Banner.styled.d.ts +1 -1
- package/dist/types/components/Forms/Checkbox/Checkbox.d.ts +2 -2
- package/dist/types/components/Forms/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/types/components/Forms/FormControl/__mocks__/forms.d.ts +4 -4
- package/dist/types/components/Forms/FormControl/__mocks__/forms.d.ts.map +1 -1
- package/dist/types/components/Forms/RadioGroup/Radio.d.ts +2 -2
- package/dist/types/components/Forms/RadioGroup/Radio.d.ts.map +1 -1
- package/dist/types/components/Forms/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/types/components/Forms/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/types/components/Forms/SegmentedControl/SegmentedControlIndicator.d.ts +2 -2
- package/dist/types/components/Help/Help.d.ts +2 -2
- package/dist/types/components/Help/Help.d.ts.map +1 -1
- package/dist/types/components/KeyValueListItem/common/ItemActions/ItemAction.styled.d.ts +1 -1
- package/dist/types/components/LegacyIcon/LegacyIcon.d.ts +1 -1
- package/dist/types/components/LegacyIcon/LegacyIcon.d.ts.map +1 -1
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts +2 -2
- package/dist/types/components/ListMenuTitle/ListMenuTitle.d.ts.map +1 -1
- package/dist/types/components/Modals/ConfirmModal/ConfirmModal.d.ts +2 -2
- package/dist/types/components/Modals/ConfirmModal/ConfirmModal.d.ts.map +1 -1
- package/dist/types/components/Modals/ConfirmModal/ConfirmModalHelpers.d.ts +3 -3
- package/dist/types/components/Modals/ConfirmModal/ConfirmModalHelpers.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/Modal.d.ts +2 -2
- package/dist/types/components/Modals/Modal/Modal.d.ts.map +1 -1
- package/dist/types/components/Modals/Modal/ModalHelpers.d.ts +3 -3
- package/dist/types/components/Modals/Modal/ModalHelpers.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts +1 -1
- package/dist/types/components/Navigator/NavGroup/NavGroup.d.ts.map +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts +1 -1
- package/dist/types/components/Navigator/NavItem/NavItem.d.ts.map +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.d.ts +2 -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.types.d.ts +1 -1
- package/dist/types/components/SectionLabel/SectionLabel.types.d.ts.map +1 -1
- package/dist/types/components/Spinner/Spinner.d.ts +2 -2
- package/dist/types/components/Spinner/Spinner.d.ts.map +1 -1
- package/dist/types/components/TagBadge/TagBadgeCommon/TagBadgeText/TagBadgeText.d.ts +2 -2
- package/dist/types/components/TagBadge/TagBadgeCommon/TagBadgeText/TagBadgeText.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastContainer.d.ts +1 -1
- package/dist/types/components/Toast/ToastController.d.ts +1 -1
- package/dist/types/components/Toast/ToastController.d.ts.map +1 -1
- package/dist/types/components/Toast/ToastProvider.d.ts +2 -2
- package/dist/types/components/Toast/ToastProvider.d.ts.map +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/types/components/Tooltip/Tooltip.types.d.ts.map +1 -1
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts +2 -2
- package/dist/types/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/dist/types/features/FeatureProvider.d.ts +1 -1
- package/dist/types/features/FeatureProvider.d.ts.map +1 -1
- package/dist/types/foundation/FoundationStyledComponent.d.ts +1 -1
- package/dist/types/foundation/FoundationStyledComponent.d.ts.map +1 -1
- package/dist/types/providers/BezierProvider.d.ts +1 -1
- package/dist/types/providers/BezierProvider.d.ts.map +1 -1
- package/package.json +38 -37
- package/src/components/SectionLabel/SectionLabel.types.ts +1 -1
- package/src/components/Tooltip/Tooltip.types.ts +1 -1
- package/src/foundation/FoundationStyledComponent.tsx +17 -1
- package/dist/cjs/node_modules/@radix-ui/number/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/primitive/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-checkbox/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-collection/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-context/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-direction/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-id/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-portal/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-presence/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-separator/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-slot/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-switch/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-tabs/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-toggle-group/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-toolbar/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-previous/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-use-size/dist/index.module.js.map +0 -1
- package/dist/cjs/node_modules/@radix-ui/react-visually-hidden/dist/index.module.js.map +0 -1
- package/dist/esm/node_modules/@radix-ui/number/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/primitive/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-checkbox/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-collection/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-compose-refs/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-context/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-direction/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-guards/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-focus-scope/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-id/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-portal/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-presence/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-primitive/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-radio-group/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-roving-focus/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-separator/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-slot/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-switch/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-tabs/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-toggle-group/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-toolbar/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-previous/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-use-size/dist/index.module.mjs.map +0 -1
- package/dist/esm/node_modules/@radix-ui/react-visually-hidden/dist/index.module.mjs.map +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
4
|
+
|
|
3
5
|
function getDefaultExportFromCjs (x) {
|
|
4
6
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
7
|
}
|
|
6
8
|
|
|
9
|
+
exports.commonjsGlobal = commonjsGlobal;
|
|
7
10
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
|
8
11
|
//# sourceMappingURL=_commonjsHelpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../node_modules/@radix-ui/react-slot/dist/index.js');
|
|
5
5
|
var useMergeRefs = require('../../hooks/useMergeRefs.js');
|
|
6
6
|
|
|
7
7
|
/**
|
|
@@ -34,7 +34,7 @@ const AutoFocus = /*#__PURE__*/React.forwardRef(function AutoFocus({
|
|
|
34
34
|
}
|
|
35
35
|
}, [target, when]);
|
|
36
36
|
const ref = useMergeRefs.default(setTarget, forwardedRef);
|
|
37
|
-
return /*#__PURE__*/React.createElement(
|
|
37
|
+
return /*#__PURE__*/React.createElement(index.Slot, Object.assign({
|
|
38
38
|
ref: ref
|
|
39
39
|
}, rest), children);
|
|
40
40
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoFocus.js","sources":["../../../../src/components/AutoFocus/AutoFocus.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useLayoutEffect,\n useState,\n} from 'react'\n\nimport { Slot } from '@radix-ui/react-slot'\n\nimport useMergeRefs from '~/src/hooks/useMergeRefs'\n\nimport { type AutoFocusProps } from './AutoFocus.types'\n\n/**\n * `AutoFocus` is a component that automatically focuses its child element when they are added to the document.\n * It is useful when you want to focus on a specific element when the component is mounted.\n * It doesn't render any DOM node.\n *\n * @example\n *\n * ```tsx\n * <AutoFocus>\n * <button>Close</button>\n * </AutoFocus>\n *\n * // You can also use it with the additional condition\n * <AutoFocus when={condition}>\n * <button>Close</button>\n * </AutoFocus>\n * ```\n */\nexport const AutoFocus = forwardRef<HTMLElement, AutoFocusProps>(function AutoFocus({\n children,\n when = true,\n ...rest\n}, forwardedRef) {\n const [target, setTarget] = useState<HTMLElement | null>(null)\n\n useLayoutEffect(function focus() {\n if (target && when) {\n target.focus()\n }\n }, [\n target,\n when,\n ])\n\n const ref = useMergeRefs(\n setTarget,\n forwardedRef,\n )\n\n return (\n <Slot\n ref={ref}\n {...rest}\n >\n { children }\n </Slot>\n )\n})\n"],"names":["AutoFocus","forwardRef","children","when","rest","forwardedRef","target","setTarget","useState","useLayoutEffect","focus","ref","useMergeRefs","React","createElement","Slot","Object","assign"],"mappings":";;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaA,SAAS,gBAAGC,gBAAU,CAA8B,SAASD,SAASA,CAAC;EAClFE,QAAQ;AACRC,EAAAA,IAAI,GAAG,IAAI;EACX,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;EACf,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAQ,CAAqB,IAAI,CAAC,CAAA;AAE9DC,EAAAA,qBAAe,CAAC,SAASC,KAAKA,GAAG;IAC/B,IAAIJ,MAAM,IAAIH,IAAI,EAAE;MAClBG,MAAM,CAACI,KAAK,EAAE,CAAA;AAChB,KAAA;AACF,GAAC,EAAE,CACDJ,MAAM,EACNH,IAAI,CACL,CAAC,CAAA;AAEF,EAAA,MAAMQ,GAAG,GAAGC,oBAAY,CACtBL,SAAS,EACTF,YACF,CAAC,CAAA;EAED,oBACEQ,KAAA,CAAAC,aAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"AutoFocus.js","sources":["../../../../src/components/AutoFocus/AutoFocus.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useLayoutEffect,\n useState,\n} from 'react'\n\nimport { Slot } from '@radix-ui/react-slot'\n\nimport useMergeRefs from '~/src/hooks/useMergeRefs'\n\nimport { type AutoFocusProps } from './AutoFocus.types'\n\n/**\n * `AutoFocus` is a component that automatically focuses its child element when they are added to the document.\n * It is useful when you want to focus on a specific element when the component is mounted.\n * It doesn't render any DOM node.\n *\n * @example\n *\n * ```tsx\n * <AutoFocus>\n * <button>Close</button>\n * </AutoFocus>\n *\n * // You can also use it with the additional condition\n * <AutoFocus when={condition}>\n * <button>Close</button>\n * </AutoFocus>\n * ```\n */\nexport const AutoFocus = forwardRef<HTMLElement, AutoFocusProps>(function AutoFocus({\n children,\n when = true,\n ...rest\n}, forwardedRef) {\n const [target, setTarget] = useState<HTMLElement | null>(null)\n\n useLayoutEffect(function focus() {\n if (target && when) {\n target.focus()\n }\n }, [\n target,\n when,\n ])\n\n const ref = useMergeRefs(\n setTarget,\n forwardedRef,\n )\n\n return (\n <Slot\n ref={ref}\n {...rest}\n >\n { children }\n </Slot>\n )\n})\n"],"names":["AutoFocus","forwardRef","children","when","rest","forwardedRef","target","setTarget","useState","useLayoutEffect","focus","ref","useMergeRefs","React","createElement","Slot","Object","assign"],"mappings":";;;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaA,SAAS,gBAAGC,gBAAU,CAA8B,SAASD,SAASA,CAAC;EAClFE,QAAQ;AACRC,EAAAA,IAAI,GAAG,IAAI;EACX,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;EACf,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAGC,cAAQ,CAAqB,IAAI,CAAC,CAAA;AAE9DC,EAAAA,qBAAe,CAAC,SAASC,KAAKA,GAAG;IAC/B,IAAIJ,MAAM,IAAIH,IAAI,EAAE;MAClBG,MAAM,CAACI,KAAK,EAAE,CAAA;AAChB,KAAA;AACF,GAAC,EAAE,CACDJ,MAAM,EACNH,IAAI,CACL,CAAC,CAAA;AAEF,EAAA,MAAMQ,GAAG,GAAGC,oBAAY,CACtBL,SAAS,EACTF,YACF,CAAC,CAAA;EAED,oBACEQ,KAAA,CAAAC,aAAA,CAACC,UAAI,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACHN,IAAAA,GAAG,EAAEA,GAAAA;GACDP,EAAAA,IAAI,CAENF,EAAAA,QACE,CAAC,CAAA;AAEX,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../../node_modules/@radix-ui/react-checkbox/dist/index.js');
|
|
5
5
|
var useId = require('../../../hooks/useId.js');
|
|
6
6
|
var Avatar_types = require('../Avatar/Avatar.types.js');
|
|
7
7
|
var CheckableAvatar_styled = require('./CheckableAvatar.styled.js');
|
|
@@ -47,7 +47,7 @@ const CheckableAvatar = /*#__PURE__*/React.forwardRef(function CheckableAvatar({
|
|
|
47
47
|
id: id,
|
|
48
48
|
name: name,
|
|
49
49
|
disabled: disabled
|
|
50
|
-
}, props), /*#__PURE__*/React.createElement(
|
|
50
|
+
}, props), /*#__PURE__*/React.createElement(index.Indicator, {
|
|
51
51
|
asChild: true,
|
|
52
52
|
forceMount: true
|
|
53
53
|
}, /*#__PURE__*/React.createElement(CheckableAvatar_styled.CheckIcon, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckableAvatar.js","sources":["../../../../../src/components/Avatars/CheckableAvatar/CheckableAvatar.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport useId from '~/src/hooks/useId'\n\nimport { AvatarSize } from '~/src/components/Avatars/Avatar'\nimport { VisuallyHidden } from '~/src/components/VisuallyHidden'\n\nimport type { CheckableAvatarProps } from './CheckableAvatar.types'\n\nimport * as Styled from './CheckableAvatar.styled'\n\n/**\n * `CheckableAvatar` is a checkbox component that looks like `Avatar`.\n *\n * @example\n *\n * ```tsx\n * const [checked, setChecked] = useState(false)\n * // Controlled\n * <CheckableAvatar\n * name=\"John Doe\"\n * avatarUrl=\"...\"\n * checked={checked}\n * onCheckedChange={setChecked}\n * />\n * // Uncontrolled\n * <CheckableAvatar\n * name=\"John Doe\"\n * avatarUrl=\"...\"\n * defaultChecked\n * />\n * ```\n */\nexport const CheckableAvatar = forwardRef<HTMLButtonElement, CheckableAvatarProps>(function CheckableAvatar({\n children,\n id: idProp,\n name,\n size = AvatarSize.Size24,\n disabled,\n avatarUrl,\n fallbackUrl,\n status,\n showBorder,\n ...props\n}, forwardedRef) {\n const id = useId(idProp, 'bezier-checkable-avatar')\n\n return (\n <Styled.CheckboxPrimitiveRoot\n ref={forwardedRef}\n id={id}\n name={name}\n disabled={disabled}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n asChild\n forceMount\n >\n <Styled.CheckIcon className={`size-${size}`} />\n </CheckboxPrimitive.Indicator>\n\n <Styled.Avatar\n aria-hidden\n size={size}\n name={name}\n disabled={disabled}\n avatarUrl={avatarUrl}\n fallbackUrl={fallbackUrl}\n status={status}\n showBorder={showBorder}\n >\n { children }\n </Styled.Avatar>\n\n <VisuallyHidden>\n <label htmlFor={id}>{ name }</label>\n </VisuallyHidden>\n </Styled.CheckboxPrimitiveRoot>\n )\n})\n"],"names":["CheckableAvatar","forwardRef","children","id","idProp","name","size","AvatarSize","Size24","disabled","avatarUrl","fallbackUrl","status","showBorder","props","forwardedRef","useId","React","createElement","Styled","Object","assign","ref","CheckboxPrimitive","asChild","forceMount","className","VisuallyHidden","htmlFor"],"mappings":";;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaA,eAAe,gBAAGC,gBAAU,CAA0C,SAASD,eAAeA,CAAC;EAC1GE,QAAQ;AACRC,EAAAA,EAAE,EAAEC,MAAM;EACVC,IAAI;EACJC,IAAI,GAAGC,uBAAU,CAACC,MAAM;EACxBC,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,MAAM;EACNC,UAAU;EACV,GAAGC,KAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;AACf,EAAA,MAAMZ,EAAE,GAAGa,aAAK,CAACZ,MAAM,EAAE,yBAAyB,CAAC,CAAA;EAEnD,oBACEa,KAAA,CAAAC,aAAA,CAACC,4CAA4B,EAAAC,MAAA,CAAAC,MAAA,CAAA;AAC3BC,IAAAA,GAAG,EAAEP,YAAa;AAClBZ,IAAAA,EAAE,EAAEA,EAAG;AACPE,IAAAA,IAAI,EAAEA,IAAK;AACXI,IAAAA,QAAQ,EAAEA,QAAAA;GACNK,EAAAA,KAAK,gBAETG,KAAA,CAAAC,aAAA,CAACK,
|
|
1
|
+
{"version":3,"file":"CheckableAvatar.js","sources":["../../../../../src/components/Avatars/CheckableAvatar/CheckableAvatar.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport useId from '~/src/hooks/useId'\n\nimport { AvatarSize } from '~/src/components/Avatars/Avatar'\nimport { VisuallyHidden } from '~/src/components/VisuallyHidden'\n\nimport type { CheckableAvatarProps } from './CheckableAvatar.types'\n\nimport * as Styled from './CheckableAvatar.styled'\n\n/**\n * `CheckableAvatar` is a checkbox component that looks like `Avatar`.\n *\n * @example\n *\n * ```tsx\n * const [checked, setChecked] = useState(false)\n * // Controlled\n * <CheckableAvatar\n * name=\"John Doe\"\n * avatarUrl=\"...\"\n * checked={checked}\n * onCheckedChange={setChecked}\n * />\n * // Uncontrolled\n * <CheckableAvatar\n * name=\"John Doe\"\n * avatarUrl=\"...\"\n * defaultChecked\n * />\n * ```\n */\nexport const CheckableAvatar = forwardRef<HTMLButtonElement, CheckableAvatarProps>(function CheckableAvatar({\n children,\n id: idProp,\n name,\n size = AvatarSize.Size24,\n disabled,\n avatarUrl,\n fallbackUrl,\n status,\n showBorder,\n ...props\n}, forwardedRef) {\n const id = useId(idProp, 'bezier-checkable-avatar')\n\n return (\n <Styled.CheckboxPrimitiveRoot\n ref={forwardedRef}\n id={id}\n name={name}\n disabled={disabled}\n {...props}\n >\n <CheckboxPrimitive.Indicator\n asChild\n forceMount\n >\n <Styled.CheckIcon className={`size-${size}`} />\n </CheckboxPrimitive.Indicator>\n\n <Styled.Avatar\n aria-hidden\n size={size}\n name={name}\n disabled={disabled}\n avatarUrl={avatarUrl}\n fallbackUrl={fallbackUrl}\n status={status}\n showBorder={showBorder}\n >\n { children }\n </Styled.Avatar>\n\n <VisuallyHidden>\n <label htmlFor={id}>{ name }</label>\n </VisuallyHidden>\n </Styled.CheckboxPrimitiveRoot>\n )\n})\n"],"names":["CheckableAvatar","forwardRef","children","id","idProp","name","size","AvatarSize","Size24","disabled","avatarUrl","fallbackUrl","status","showBorder","props","forwardedRef","useId","React","createElement","Styled","Object","assign","ref","CheckboxPrimitive","asChild","forceMount","className","VisuallyHidden","htmlFor"],"mappings":";;;;;;;;;AAaA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaA,eAAe,gBAAGC,gBAAU,CAA0C,SAASD,eAAeA,CAAC;EAC1GE,QAAQ;AACRC,EAAAA,EAAE,EAAEC,MAAM;EACVC,IAAI;EACJC,IAAI,GAAGC,uBAAU,CAACC,MAAM;EACxBC,QAAQ;EACRC,SAAS;EACTC,WAAW;EACXC,MAAM;EACNC,UAAU;EACV,GAAGC,KAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;AACf,EAAA,MAAMZ,EAAE,GAAGa,aAAK,CAACZ,MAAM,EAAE,yBAAyB,CAAC,CAAA;EAEnD,oBACEa,KAAA,CAAAC,aAAA,CAACC,4CAA4B,EAAAC,MAAA,CAAAC,MAAA,CAAA;AAC3BC,IAAAA,GAAG,EAAEP,YAAa;AAClBZ,IAAAA,EAAE,EAAEA,EAAG;AACPE,IAAAA,IAAI,EAAEA,IAAK;AACXI,IAAAA,QAAQ,EAAEA,QAAAA;GACNK,EAAAA,KAAK,gBAETG,KAAA,CAAAC,aAAA,CAACK,eAA2B,EAAA;IAC1BC,OAAO,EAAA,IAAA;IACPC,UAAU,EAAA,IAAA;AAAA,GAAA,eAEVR,KAAA,CAAAC,aAAA,CAACC,gCAAgB,EAAA;IAACO,SAAS,EAAG,QAAOpB,IAAK,CAAA,CAAA;GAAI,CACnB,CAAC,eAE9BW,KAAA,CAAAC,aAAA,CAACC,6BAAa,EAAA;IACZ,aAAW,EAAA,IAAA;AACXb,IAAAA,IAAI,EAAEA,IAAK;AACXD,IAAAA,IAAI,EAAEA,IAAK;AACXI,IAAAA,QAAQ,EAAEA,QAAS;AACnBC,IAAAA,SAAS,EAAEA,SAAU;AACrBC,IAAAA,WAAW,EAAEA,WAAY;AACzBC,IAAAA,MAAM,EAAEA,MAAO;AACfC,IAAAA,UAAU,EAAEA,UAAAA;GAEVX,EAAAA,QACW,CAAC,eAEhBe,KAAA,CAAAC,aAAA,CAACS,6BAAc,EAAA,IAAA,eACbV,KAAA,CAAAC,aAAA,CAAA,OAAA,EAAA;AAAOU,IAAAA,OAAO,EAAEzB,EAAAA;GAAME,EAAAA,IAAa,CACrB,CACY,CAAC,CAAA;AAEnC,CAAC;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var bezierIcons = require('@channel.io/bezier-icons');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../../node_modules/@radix-ui/react-checkbox/dist/index.js');
|
|
5
5
|
var ZIndex = require('../../../constants/ZIndex.js');
|
|
6
6
|
var styleUtils = require('../../../utils/styleUtils.js');
|
|
7
7
|
var Avatar$1 = require('../Avatar/Avatar.js');
|
|
@@ -49,7 +49,7 @@ const focusStyles = {
|
|
|
49
49
|
* NOTE: Using the `!important` keyword to override a local CSS variable of `AlphaSmoothCorners`.
|
|
50
50
|
* Improvements are needed to the styling when using the `AlphaSmoothCorners` component.
|
|
51
51
|
*/
|
|
52
|
-
const CheckboxPrimitiveRoot = /*#__PURE__*/FoundationStyledComponent.styled(
|
|
52
|
+
const CheckboxPrimitiveRoot = /*#__PURE__*/FoundationStyledComponent.styled(index.Root).withConfig({
|
|
53
53
|
displayName: "CheckableAvatarstyled__CheckboxPrimitiveRoot",
|
|
54
54
|
componentId: "sc-1t8b49w-2"
|
|
55
55
|
})(["all:unset;position:relative;z-index:", ";cursor:pointer;outline:none;&[data-disabled]{cursor:not-allowed;}&:not([data-state='unchecked']){", "{visibility:visible;}", " > div{--bezier-alpha-smooth-corners-box-background-image:none !important;--bezier-alpha-smooth-corners-box-background-color:var(--bgtxt-green-normal) !important;}}&:not([data-disabled]){", " &:focus-visible{", "}&[data-state='unchecked']{", " &:focus-visible{", "}}&:not([data-state='unchecked']){", " &:focus-visible{", "}}}"], ZIndex.ZIndex.Base, CheckIcon, Avatar, styleUtils.touchableHover(focusStyles.common), focusStyles.common, styleUtils.touchableHover(focusStyles.unchecked), focusStyles.unchecked, styleUtils.touchableHover(focusStyles.checked), focusStyles.checked);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckableAvatar.styled.js","sources":["../../../../../src/components/Avatars/CheckableAvatar/CheckableAvatar.styled.ts"],"sourcesContent":["import { CheckIcon as CheckIconSource } from '@channel.io/bezier-icons'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport {\n absoluteCenter,\n css,\n styled,\n} from '~/src/foundation'\n\nimport { ZIndex } from '~/src/constants/ZIndex'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport {\n AvatarSize,\n Avatar as BaseAvatar,\n} from '~/src/components/Avatars/Avatar'\nimport { Icon } from '~/src/components/Icon'\n\nexport const Avatar = styled(BaseAvatar)``\n\nexport const CheckIcon = styled(Icon).attrs({\n source: CheckIconSource,\n color: 'bgtxt-absolute-white-normal',\n})`\n position: absolute;\n z-index: ${ZIndex.Float};\n visibility: hidden;\n\n ${absoluteCenter()}\n\n &.size-${AvatarSize.Size20} {\n width: 14px;\n height: 14px;\n }\n\n &.size-${AvatarSize.Size24} {\n width: 16px;\n height: 16px;\n }\n\n &.size-${AvatarSize.Size30} {\n width: 20px;\n height: 20px;\n }\n\n &.size-${AvatarSize.Size36} {\n width: 22px;\n height: 22px;\n }\n\n &.size-${AvatarSize.Size42} {\n width: 24px;\n height: 24px;\n }\n\n &.size-${AvatarSize.Size48} {\n width: 28px;\n height: 28px;\n }\n\n &.size-${AvatarSize.Size72} {\n width: 42px;\n height: 42px;\n }\n\n &.size-${AvatarSize.Size90} {\n width: 52px;\n height: 52px;\n }\n\n &.size-${AvatarSize.Size120} {\n width: 68px;\n height: 68px;\n }\n`\n\nconst focusStyles = {\n common: css`\n ${CheckIcon} {\n visibility: visible;\n }\n\n /* stylelint-disable declaration-block-semicolon-newline-after, rule-empty-line-before */\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-image: none !important;\n }\n `,\n unchecked: css`\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-color: var(--bg-grey-dark) !important;\n }\n `,\n checked: css`\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-color: var(--bgtxt-green-dark) !important;\n }\n /* stylelint-enable declaration-block-semicolon-newline-after, rule-empty-line-before */\n `,\n}\n\n/**\n * NOTE: Using the `!important` keyword to override a local CSS variable of `AlphaSmoothCorners`.\n * Improvements are needed to the styling when using the `AlphaSmoothCorners` component.\n */\nexport const CheckboxPrimitiveRoot = styled(CheckboxPrimitive.Root)`\n all: unset;\n position: relative;\n z-index: ${ZIndex.Base};\n cursor: pointer;\n outline: none;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:not([data-state='unchecked']) {\n ${CheckIcon} {\n visibility: visible;\n }\n\n /* stylelint-disable declaration-block-semicolon-newline-after, rule-empty-line-before */\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-image: none !important;\n --bezier-alpha-smooth-corners-box-background-color: var(--bgtxt-green-normal) !important;\n }\n /* stylelint-enable declaration-block-semicolon-newline-after, rule-empty-line-before */\n }\n\n &:not([data-disabled]) {\n ${touchableHover(focusStyles.common)}\n\n &:focus-visible {\n ${focusStyles.common}\n }\n\n &[data-state='unchecked'] {\n ${touchableHover(focusStyles.unchecked)}\n\n &:focus-visible {\n ${focusStyles.unchecked}\n }\n }\n\n &:not([data-state='unchecked']) {\n ${touchableHover(focusStyles.checked)}\n\n &:focus-visible {\n ${focusStyles.checked}\n }\n }\n }\n`\n"],"names":["Avatar","styled","BaseAvatar","withConfig","displayName","componentId","CheckIcon","Icon","attrs","source","CheckIconSource","color","ZIndex","Float","absoluteCenter","AvatarSize","Size20","Size24","Size30","Size36","Size42","Size48","Size72","Size90","Size120","focusStyles","common","css","unchecked","checked","CheckboxPrimitiveRoot","CheckboxPrimitive","Base","touchableHover"],"mappings":";;;;;;;;;;;;AAkBO,MAAMA,MAAM,gBAAGC,gCAAM,CAACC,eAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAE,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA;AAEnC,MAAMC,SAAS,gBAAGL,gCAAM,CAACM,SAAI,CAAC,CAACC,KAAK,CAAC;AAC1CC,EAAAA,MAAM,EAAEC,qBAAe;AACvBC,EAAAA,KAAK,EAAE,6BAAA;AACT,CAAC,CAAC,CAAAR,UAAA,CAAA;EAAAC,WAAA,EAAA,kCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,4BAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,2BAAA,CAAA,EAEWO,aAAM,CAACC,KAAK,EAGrBC,qBAAc,EAAE,EAETC,uBAAU,CAACC,MAAM,EAKjBD,uBAAU,CAACE,MAAM,EAKjBF,uBAAU,CAACG,MAAM,EAKjBH,uBAAU,CAACI,MAAM,EAKjBJ,uBAAU,CAACK,MAAM,EAKjBL,uBAAU,CAACM,MAAM,EAKjBN,uBAAU,CAACO,MAAM,EAKjBP,uBAAU,CAACQ,MAAM,EAKjBR,uBAAU,CAACS,OAAO,EAI5B;AAED,MAAMC,WAAW,GAAG;AAClBC,EAAAA,MAAM,EAAEC,6BAAI,CAAA;AACd,IAAA,EAAMrB,SAAU,CAAA;AAChB;AACA;AACA;AACA;AACA,IAAA,EAAMN,MAAO,CAAA;AACb;AACA;AACA,EAAG,CAAA;AACD4B,EAAAA,SAAS,EAAED,6BAAI,CAAA;AACjB,IAAA,EAAM3B,MAAO,CAAA;AACb;AACA;AACA,EAAG,CAAA;AACD6B,EAAAA,OAAO,EAAEF,6BAAI,CAAA;AACf,IAAA,EAAM3B,MAAO,CAAA;AACb;AACA;AACA;AACA,EAAA,CAAA;AACA,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACO,MAAM8B,qBAAqB,gBAAG7B,gCAAM,CAAC8B,
|
|
1
|
+
{"version":3,"file":"CheckableAvatar.styled.js","sources":["../../../../../src/components/Avatars/CheckableAvatar/CheckableAvatar.styled.ts"],"sourcesContent":["import { CheckIcon as CheckIconSource } from '@channel.io/bezier-icons'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport {\n absoluteCenter,\n css,\n styled,\n} from '~/src/foundation'\n\nimport { ZIndex } from '~/src/constants/ZIndex'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport {\n AvatarSize,\n Avatar as BaseAvatar,\n} from '~/src/components/Avatars/Avatar'\nimport { Icon } from '~/src/components/Icon'\n\nexport const Avatar = styled(BaseAvatar)``\n\nexport const CheckIcon = styled(Icon).attrs({\n source: CheckIconSource,\n color: 'bgtxt-absolute-white-normal',\n})`\n position: absolute;\n z-index: ${ZIndex.Float};\n visibility: hidden;\n\n ${absoluteCenter()}\n\n &.size-${AvatarSize.Size20} {\n width: 14px;\n height: 14px;\n }\n\n &.size-${AvatarSize.Size24} {\n width: 16px;\n height: 16px;\n }\n\n &.size-${AvatarSize.Size30} {\n width: 20px;\n height: 20px;\n }\n\n &.size-${AvatarSize.Size36} {\n width: 22px;\n height: 22px;\n }\n\n &.size-${AvatarSize.Size42} {\n width: 24px;\n height: 24px;\n }\n\n &.size-${AvatarSize.Size48} {\n width: 28px;\n height: 28px;\n }\n\n &.size-${AvatarSize.Size72} {\n width: 42px;\n height: 42px;\n }\n\n &.size-${AvatarSize.Size90} {\n width: 52px;\n height: 52px;\n }\n\n &.size-${AvatarSize.Size120} {\n width: 68px;\n height: 68px;\n }\n`\n\nconst focusStyles = {\n common: css`\n ${CheckIcon} {\n visibility: visible;\n }\n\n /* stylelint-disable declaration-block-semicolon-newline-after, rule-empty-line-before */\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-image: none !important;\n }\n `,\n unchecked: css`\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-color: var(--bg-grey-dark) !important;\n }\n `,\n checked: css`\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-color: var(--bgtxt-green-dark) !important;\n }\n /* stylelint-enable declaration-block-semicolon-newline-after, rule-empty-line-before */\n `,\n}\n\n/**\n * NOTE: Using the `!important` keyword to override a local CSS variable of `AlphaSmoothCorners`.\n * Improvements are needed to the styling when using the `AlphaSmoothCorners` component.\n */\nexport const CheckboxPrimitiveRoot = styled(CheckboxPrimitive.Root)`\n all: unset;\n position: relative;\n z-index: ${ZIndex.Base};\n cursor: pointer;\n outline: none;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n\n &:not([data-state='unchecked']) {\n ${CheckIcon} {\n visibility: visible;\n }\n\n /* stylelint-disable declaration-block-semicolon-newline-after, rule-empty-line-before */\n ${Avatar} > div {\n --bezier-alpha-smooth-corners-box-background-image: none !important;\n --bezier-alpha-smooth-corners-box-background-color: var(--bgtxt-green-normal) !important;\n }\n /* stylelint-enable declaration-block-semicolon-newline-after, rule-empty-line-before */\n }\n\n &:not([data-disabled]) {\n ${touchableHover(focusStyles.common)}\n\n &:focus-visible {\n ${focusStyles.common}\n }\n\n &[data-state='unchecked'] {\n ${touchableHover(focusStyles.unchecked)}\n\n &:focus-visible {\n ${focusStyles.unchecked}\n }\n }\n\n &:not([data-state='unchecked']) {\n ${touchableHover(focusStyles.checked)}\n\n &:focus-visible {\n ${focusStyles.checked}\n }\n }\n }\n`\n"],"names":["Avatar","styled","BaseAvatar","withConfig","displayName","componentId","CheckIcon","Icon","attrs","source","CheckIconSource","color","ZIndex","Float","absoluteCenter","AvatarSize","Size20","Size24","Size30","Size36","Size42","Size48","Size72","Size90","Size120","focusStyles","common","css","unchecked","checked","CheckboxPrimitiveRoot","CheckboxPrimitive","Base","touchableHover"],"mappings":";;;;;;;;;;;;AAkBO,MAAMA,MAAM,gBAAGC,gCAAM,CAACC,eAAU,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,+BAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAE,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA;AAEnC,MAAMC,SAAS,gBAAGL,gCAAM,CAACM,SAAI,CAAC,CAACC,KAAK,CAAC;AAC1CC,EAAAA,MAAM,EAAEC,qBAAe;AACvBC,EAAAA,KAAK,EAAE,6BAAA;AACT,CAAC,CAAC,CAAAR,UAAA,CAAA;EAAAC,WAAA,EAAA,kCAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,4BAAA,EAAA,qBAAA,EAAA,UAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,kCAAA,EAAA,2BAAA,CAAA,EAEWO,aAAM,CAACC,KAAK,EAGrBC,qBAAc,EAAE,EAETC,uBAAU,CAACC,MAAM,EAKjBD,uBAAU,CAACE,MAAM,EAKjBF,uBAAU,CAACG,MAAM,EAKjBH,uBAAU,CAACI,MAAM,EAKjBJ,uBAAU,CAACK,MAAM,EAKjBL,uBAAU,CAACM,MAAM,EAKjBN,uBAAU,CAACO,MAAM,EAKjBP,uBAAU,CAACQ,MAAM,EAKjBR,uBAAU,CAACS,OAAO,EAI5B;AAED,MAAMC,WAAW,GAAG;AAClBC,EAAAA,MAAM,EAAEC,6BAAI,CAAA;AACd,IAAA,EAAMrB,SAAU,CAAA;AAChB;AACA;AACA;AACA;AACA,IAAA,EAAMN,MAAO,CAAA;AACb;AACA;AACA,EAAG,CAAA;AACD4B,EAAAA,SAAS,EAAED,6BAAI,CAAA;AACjB,IAAA,EAAM3B,MAAO,CAAA;AACb;AACA;AACA,EAAG,CAAA;AACD6B,EAAAA,OAAO,EAAEF,6BAAI,CAAA;AACf,IAAA,EAAM3B,MAAO,CAAA;AACb;AACA;AACA;AACA,EAAA,CAAA;AACA,CAAC,CAAA;;AAED;AACA;AACA;AACA;AACO,MAAM8B,qBAAqB,gBAAG7B,gCAAM,CAAC8B,UAAsB,CAAC,CAAA5B,UAAA,CAAA;EAAAC,WAAA,EAAA,8CAAA;EAAAC,WAAA,EAAA,cAAA;AAAA,CAAA,CAAA,CAAA,CAAA,sCAAA,EAAA,oGAAA,EAAA,uBAAA,EAAA,6LAAA,EAAA,mBAAA,EAAA,6BAAA,EAAA,mBAAA,EAAA,oCAAA,EAAA,mBAAA,EAAA,KAAA,CAAA,EAGtDO,aAAM,CAACoB,IAAI,EASlB1B,SAAS,EAKTN,MAAM,EAQNiC,yBAAc,CAACR,WAAW,CAACC,MAAM,CAAC,EAGhCD,WAAW,CAACC,MAAM,EAIlBO,yBAAc,CAACR,WAAW,CAACG,SAAS,CAAC,EAGnCH,WAAW,CAACG,SAAS,EAKvBK,yBAAc,CAACR,WAAW,CAACI,OAAO,CAAC,EAGjCJ,WAAW,CAACI,OAAO;;;;;;"}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var index = require('../../node_modules/@radix-ui/react-separator/dist/index.js');
|
|
7
7
|
var Divider_styled = require('./Divider.styled.js');
|
|
8
8
|
|
|
9
9
|
const DIVIDER_TEST_ID = 'bezier-react-divider';
|
|
@@ -15,7 +15,7 @@ const Divider = /*#__PURE__*/React.forwardRef(({
|
|
|
15
15
|
withoutParallelIndent = false,
|
|
16
16
|
withoutIndent = false,
|
|
17
17
|
...rest
|
|
18
|
-
}, forwardedRef) => /*#__PURE__*/React.createElement(
|
|
18
|
+
}, forwardedRef) => /*#__PURE__*/React.createElement(index.Root, {
|
|
19
19
|
asChild: true,
|
|
20
20
|
orientation: orientation,
|
|
21
21
|
decorative: decorative
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\n\nimport type DividerProps from './Divider.types'\n\nimport * as Styled from './Divider.styled'\n\nexport const DIVIDER_TEST_ID = 'bezier-react-divider'\n\nconst Divider = forwardRef((\n {\n testId = DIVIDER_TEST_ID,\n orientation = 'horizontal',\n decorative,\n withoutSideIndent = false,\n withoutParallelIndent = false,\n withoutIndent = false,\n ...rest\n }: DividerProps,\n forwardedRef: React.Ref<HTMLElement>,\n) => (\n <SeparatorPrimitive.Root\n asChild\n orientation={orientation}\n decorative={decorative}\n >\n <Styled.Divider\n ref={forwardedRef}\n data-testid={testId}\n orientation={orientation}\n decorative={decorative}\n withoutSideIndent={withoutSideIndent}\n withoutParallelIndent={withoutParallelIndent}\n withoutIndent={withoutIndent}\n {...rest}\n />\n </SeparatorPrimitive.Root>\n))\n\nexport default Divider\n"],"names":["DIVIDER_TEST_ID","Divider","forwardRef","testId","orientation","decorative","withoutSideIndent","withoutParallelIndent","withoutIndent","rest","forwardedRef","React","createElement","SeparatorPrimitive","asChild","Styled","Object","assign","ref"],"mappings":";;;;;;;;AAQO,MAAMA,eAAe,GAAG,uBAAsB;AAErD,MAAMC,OAAO,gBAAGC,gBAAU,CAAC,CACzB;AACEC,EAAAA,MAAM,GAAGH,eAAe;AACxBI,EAAAA,WAAW,GAAG,YAAY;EAC1BC,UAAU;AACVC,EAAAA,iBAAiB,GAAG,KAAK;AACzBC,EAAAA,qBAAqB,GAAG,KAAK;AAC7BC,EAAAA,aAAa,GAAG,KAAK;EACrB,GAAGC,IAAAA;AACS,CAAC,EACfC,YAAoC,kBAEpCC,KAAA,CAAAC,aAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../../src/components/Divider/Divider.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as SeparatorPrimitive from '@radix-ui/react-separator'\n\nimport type DividerProps from './Divider.types'\n\nimport * as Styled from './Divider.styled'\n\nexport const DIVIDER_TEST_ID = 'bezier-react-divider'\n\nconst Divider = forwardRef((\n {\n testId = DIVIDER_TEST_ID,\n orientation = 'horizontal',\n decorative,\n withoutSideIndent = false,\n withoutParallelIndent = false,\n withoutIndent = false,\n ...rest\n }: DividerProps,\n forwardedRef: React.Ref<HTMLElement>,\n) => (\n <SeparatorPrimitive.Root\n asChild\n orientation={orientation}\n decorative={decorative}\n >\n <Styled.Divider\n ref={forwardedRef}\n data-testid={testId}\n orientation={orientation}\n decorative={decorative}\n withoutSideIndent={withoutSideIndent}\n withoutParallelIndent={withoutParallelIndent}\n withoutIndent={withoutIndent}\n {...rest}\n />\n </SeparatorPrimitive.Root>\n))\n\nexport default Divider\n"],"names":["DIVIDER_TEST_ID","Divider","forwardRef","testId","orientation","decorative","withoutSideIndent","withoutParallelIndent","withoutIndent","rest","forwardedRef","React","createElement","SeparatorPrimitive","asChild","Styled","Object","assign","ref"],"mappings":";;;;;;;;AAQO,MAAMA,eAAe,GAAG,uBAAsB;AAErD,MAAMC,OAAO,gBAAGC,gBAAU,CAAC,CACzB;AACEC,EAAAA,MAAM,GAAGH,eAAe;AACxBI,EAAAA,WAAW,GAAG,YAAY;EAC1BC,UAAU;AACVC,EAAAA,iBAAiB,GAAG,KAAK;AACzBC,EAAAA,qBAAqB,GAAG,KAAK;AAC7BC,EAAAA,aAAa,GAAG,KAAK;EACrB,GAAGC,IAAAA;AACS,CAAC,EACfC,YAAoC,kBAEpCC,KAAA,CAAAC,aAAA,CAACC,UAAuB,EAAA;EACtBC,OAAO,EAAA,IAAA;AACPV,EAAAA,WAAW,EAAEA,WAAY;AACzBC,EAAAA,UAAU,EAAEA,UAAAA;AAAW,CAEvBM,eAAAA,KAAA,CAAAC,aAAA,CAACG,sBAAc,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACbC,EAAAA,GAAG,EAAER,YAAa;AAClB,EAAA,aAAA,EAAaP,MAAO;AACpBC,EAAAA,WAAW,EAAEA,WAAY;AACzBC,EAAAA,UAAU,EAAEA,UAAW;AACvBC,EAAAA,iBAAiB,EAAEA,iBAAkB;AACrCC,EAAAA,qBAAqB,EAAEA,qBAAsB;AAC7CC,EAAAA,aAAa,EAAEA,aAAAA;AAAc,CAAA,EACzBC,IAAI,CACT,CACsB,CAC1B,CAAC,CAAA;AAEF,gBAAeR,OAAO;;;;;"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var bezierIcons = require('@channel.io/bezier-icons');
|
|
5
|
-
var
|
|
5
|
+
var index = require('../../../node_modules/@radix-ui/react-checkbox/dist/index.js');
|
|
6
6
|
var useId = require('../../../hooks/useId.js');
|
|
7
7
|
var FormFieldSize = require('../FormFieldSize.js');
|
|
8
8
|
var useFormFieldProps = require('../useFormFieldProps.js');
|
|
@@ -45,7 +45,7 @@ function CheckboxImpl({
|
|
|
45
45
|
id: id,
|
|
46
46
|
checked: checked,
|
|
47
47
|
"data-invalid": formFieldProps['aria-invalid']
|
|
48
|
-
}, formFieldProps), /*#__PURE__*/React.createElement(
|
|
48
|
+
}, formFieldProps), /*#__PURE__*/React.createElement(index.Indicator, {
|
|
49
49
|
asChild: true
|
|
50
50
|
/* NOTE: To allow the icon to be rendered even if unchecked. */,
|
|
51
51
|
forceMount: true
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/Forms/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport {\n CheckBoldIcon,\n HyphenBoldIcon,\n} from '@channel.io/bezier-icons'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport useId from '~/src/hooks/useId'\n\nimport { FormFieldSize } from '~/src/components/Forms'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\nimport { IconSize } from '~/src/components/Icon'\n\nimport {\n type CheckboxProps,\n type CheckedState,\n} from './Checkbox.types'\n\nimport * as Styled from './Checkbox.styled'\n\ntype CheckIconProps = {} | {\n style: React.CSSProperties\n 'data-state': 'checked' | 'unchecked' | 'indeterminate'\n 'data-disabled': boolean | undefined\n}\n\n/* NOTE: Props are injected at runtime by `CheckboxPrimitive.Indicator`. */\nconst CheckIcon = forwardRef<SVGSVGElement, CheckIconProps>(function CheckIcon(\n props,\n forwardedRef,\n) {\n // eslint-disable-next-line react/destructuring-assignment\n const state = props['data-state']\n const isUnchecked = state === 'unchecked'\n const isIndeterminate = state === 'indeterminate'\n\n return (\n <Styled.CheckIcon\n ref={forwardedRef}\n source={!isIndeterminate ? CheckBoldIcon : HyphenBoldIcon}\n size={IconSize.XS}\n color={isUnchecked ? 'bg-black-dark' : 'bgtxt-absolute-white-dark'}\n {...props}\n />\n )\n})\n\nfunction CheckboxImpl<Checked extends CheckedState>({\n children,\n checked,\n id: idProp,\n ...rest\n}: CheckboxProps<Checked>, forwardedRef: React.Ref<HTMLButtonElement>) {\n const {\n id: formFieldId,\n hasError,\n ...formFieldProps\n } = useFormFieldProps(rest)\n\n const id = useId(idProp ?? formFieldId, 'bezier-checkbox')\n\n const containerStyle = {\n '--bezier-checkbox-height': children ? `${FormFieldSize.M}px` : 'auto',\n } as React.CSSProperties\n\n return (\n <Styled.Container\n style={containerStyle}\n data-disabled={formFieldProps['aria-disabled']}\n >\n <Styled.CheckboxPrimitiveRoot\n ref={forwardedRef}\n id={id}\n checked={checked}\n data-invalid={formFieldProps['aria-invalid']}\n {...formFieldProps}\n >\n <CheckboxPrimitive.Indicator\n asChild\n /* NOTE: To allow the icon to be rendered even if unchecked. */\n forceMount\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </Styled.CheckboxPrimitiveRoot>\n { children && (\n <Styled.Label htmlFor={id}>\n { children }\n </Styled.Label>\n ) }\n </Styled.Container>\n )\n}\n\n/**\n * `Checkbox` is a control that allows the user to toggle between checked and not checked.\n * It can be used with labels or standalone.\n *\n * @example\n *\n * ```tsx\n * const [checked, setChecked] = useState(false)\n * // Controlled / With label\n * <Checkbox\n * checked={checked}\n * onCheckedChange={setChecked}\n * >\n * Label\n * </Checkbox>\n * // Controlled / Standalone\n * <Checkbox\n * checked={checked}\n * onCheckedChange={setChecked}\n * />\n * // Uncontrolled\n * <Checkbox\n * defaultChecked={true}\n * >\n * Label\n * </Checkbox>\n * ```\n */\nexport const Checkbox = forwardRef(CheckboxImpl) as <Checked extends CheckedState>(\n props: CheckboxProps<Checked> & { ref?: React.ForwardedRef<HTMLButtonElement> }\n) => ReturnType<typeof CheckboxImpl<Checked>>\n"],"names":["CheckIcon","forwardRef","props","forwardedRef","state","isUnchecked","isIndeterminate","React","createElement","Styled","Object","assign","ref","source","CheckBoldIcon","HyphenBoldIcon","size","IconSize","XS","color","CheckboxImpl","children","checked","id","idProp","rest","formFieldId","hasError","formFieldProps","useFormFieldProps","useId","containerStyle","FormFieldSize","M","style","CheckboxPrimitive","asChild","forceMount","htmlFor","Checkbox"],"mappings":";;;;;;;;;;;AA2BA;AACA,MAAMA,SAAS,gBAAGC,gBAAU,CAAgC,SAASD,SAASA,CAC5EE,KAAK,EACLC,YAAY,EACZ;AACA;AACA,EAAA,MAAMC,KAAK,GAAGF,KAAK,CAAC,YAAY,CAAC,CAAA;AACjC,EAAA,MAAMG,WAAW,GAAGD,KAAK,KAAK,WAAW,CAAA;AACzC,EAAA,MAAME,eAAe,GAAGF,KAAK,KAAK,eAAe,CAAA;EAEjD,oBACEG,KAAA,CAAAC,aAAA,CAACC,yBAAgB,EAAAC,MAAA,CAAAC,MAAA,CAAA;AACfC,IAAAA,GAAG,EAAET,YAAa;AAClBU,IAAAA,MAAM,EAAE,CAACP,eAAe,GAAGQ,yBAAa,GAAGC,0BAAe;IAC1DC,IAAI,EAAEC,mBAAQ,CAACC,EAAG;AAClBC,IAAAA,KAAK,EAAEd,WAAW,GAAG,eAAe,GAAG,2BAAA;GACnCH,EAAAA,KAAK,CACV,CAAC,CAAA;AAEN,CAAC,CAAC,CAAA;AAEF,SAASkB,YAAYA,CAA+B;EAClDC,QAAQ;EACRC,OAAO;AACPC,EAAAA,EAAE,EAAEC,MAAM;EACV,GAAGC,IAAAA;AACmB,CAAC,EAAEtB,YAA0C,EAAE;EACrE,MAAM;AACJoB,IAAAA,EAAE,EAAEG,WAAW;IACfC,QAAQ;IACR,GAAGC,cAAAA;AACL,GAAC,GAAGC,yBAAiB,CAACJ,IAAI,CAAC,CAAA;EAE3B,MAAMF,EAAE,GAAGO,aAAK,CAACN,MAAM,IAAIE,WAAW,EAAE,iBAAiB,CAAC,CAAA;AAE1D,EAAA,MAAMK,cAAc,GAAG;IACrB,0BAA0B,EAAEV,QAAQ,GAAI,CAAA,EAAEW,qBAAa,CAACC,CAAE,IAAG,GAAG,MAAA;GAC1C,CAAA;AAExB,EAAA,oBACE1B,KAAA,CAAAC,aAAA,CAACC,yBAAgB,EAAA;AACfyB,IAAAA,KAAK,EAAEH,cAAe;IACtB,eAAeH,EAAAA,cAAc,CAAC,eAAe,CAAA;GAE7CrB,eAAAA,KAAA,CAAAC,aAAA,CAACC,qCAA4B,EAAAC,MAAA,CAAAC,MAAA,CAAA;AAC3BC,IAAAA,GAAG,EAAET,YAAa;AAClBoB,IAAAA,EAAE,EAAEA,EAAG;AACPD,IAAAA,OAAO,EAAEA,OAAQ;IACjB,cAAcM,EAAAA,cAAc,CAAC,cAAc,CAAA;GACvCA,EAAAA,cAAc,gBAElBrB,KAAA,CAAAC,aAAA,CAAC2B,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../../../../../src/components/Forms/Checkbox/Checkbox.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport {\n CheckBoldIcon,\n HyphenBoldIcon,\n} from '@channel.io/bezier-icons'\nimport * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport useId from '~/src/hooks/useId'\n\nimport { FormFieldSize } from '~/src/components/Forms'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\nimport { IconSize } from '~/src/components/Icon'\n\nimport {\n type CheckboxProps,\n type CheckedState,\n} from './Checkbox.types'\n\nimport * as Styled from './Checkbox.styled'\n\ntype CheckIconProps = {} | {\n style: React.CSSProperties\n 'data-state': 'checked' | 'unchecked' | 'indeterminate'\n 'data-disabled': boolean | undefined\n}\n\n/* NOTE: Props are injected at runtime by `CheckboxPrimitive.Indicator`. */\nconst CheckIcon = forwardRef<SVGSVGElement, CheckIconProps>(function CheckIcon(\n props,\n forwardedRef,\n) {\n // eslint-disable-next-line react/destructuring-assignment\n const state = props['data-state']\n const isUnchecked = state === 'unchecked'\n const isIndeterminate = state === 'indeterminate'\n\n return (\n <Styled.CheckIcon\n ref={forwardedRef}\n source={!isIndeterminate ? CheckBoldIcon : HyphenBoldIcon}\n size={IconSize.XS}\n color={isUnchecked ? 'bg-black-dark' : 'bgtxt-absolute-white-dark'}\n {...props}\n />\n )\n})\n\nfunction CheckboxImpl<Checked extends CheckedState>({\n children,\n checked,\n id: idProp,\n ...rest\n}: CheckboxProps<Checked>, forwardedRef: React.Ref<HTMLButtonElement>) {\n const {\n id: formFieldId,\n hasError,\n ...formFieldProps\n } = useFormFieldProps(rest)\n\n const id = useId(idProp ?? formFieldId, 'bezier-checkbox')\n\n const containerStyle = {\n '--bezier-checkbox-height': children ? `${FormFieldSize.M}px` : 'auto',\n } as React.CSSProperties\n\n return (\n <Styled.Container\n style={containerStyle}\n data-disabled={formFieldProps['aria-disabled']}\n >\n <Styled.CheckboxPrimitiveRoot\n ref={forwardedRef}\n id={id}\n checked={checked}\n data-invalid={formFieldProps['aria-invalid']}\n {...formFieldProps}\n >\n <CheckboxPrimitive.Indicator\n asChild\n /* NOTE: To allow the icon to be rendered even if unchecked. */\n forceMount\n >\n <CheckIcon />\n </CheckboxPrimitive.Indicator>\n </Styled.CheckboxPrimitiveRoot>\n { children && (\n <Styled.Label htmlFor={id}>\n { children }\n </Styled.Label>\n ) }\n </Styled.Container>\n )\n}\n\n/**\n * `Checkbox` is a control that allows the user to toggle between checked and not checked.\n * It can be used with labels or standalone.\n *\n * @example\n *\n * ```tsx\n * const [checked, setChecked] = useState(false)\n * // Controlled / With label\n * <Checkbox\n * checked={checked}\n * onCheckedChange={setChecked}\n * >\n * Label\n * </Checkbox>\n * // Controlled / Standalone\n * <Checkbox\n * checked={checked}\n * onCheckedChange={setChecked}\n * />\n * // Uncontrolled\n * <Checkbox\n * defaultChecked={true}\n * >\n * Label\n * </Checkbox>\n * ```\n */\nexport const Checkbox = forwardRef(CheckboxImpl) as <Checked extends CheckedState>(\n props: CheckboxProps<Checked> & { ref?: React.ForwardedRef<HTMLButtonElement> }\n) => ReturnType<typeof CheckboxImpl<Checked>>\n"],"names":["CheckIcon","forwardRef","props","forwardedRef","state","isUnchecked","isIndeterminate","React","createElement","Styled","Object","assign","ref","source","CheckBoldIcon","HyphenBoldIcon","size","IconSize","XS","color","CheckboxImpl","children","checked","id","idProp","rest","formFieldId","hasError","formFieldProps","useFormFieldProps","useId","containerStyle","FormFieldSize","M","style","CheckboxPrimitive","asChild","forceMount","htmlFor","Checkbox"],"mappings":";;;;;;;;;;;AA2BA;AACA,MAAMA,SAAS,gBAAGC,gBAAU,CAAgC,SAASD,SAASA,CAC5EE,KAAK,EACLC,YAAY,EACZ;AACA;AACA,EAAA,MAAMC,KAAK,GAAGF,KAAK,CAAC,YAAY,CAAC,CAAA;AACjC,EAAA,MAAMG,WAAW,GAAGD,KAAK,KAAK,WAAW,CAAA;AACzC,EAAA,MAAME,eAAe,GAAGF,KAAK,KAAK,eAAe,CAAA;EAEjD,oBACEG,KAAA,CAAAC,aAAA,CAACC,yBAAgB,EAAAC,MAAA,CAAAC,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ACAC,UAAU,EAAA,IAAA;AAAA,GAAA,eAEV9B,KAAA,CAAAC,aAAA,CAACR,SAAS,EAAA,IAAE,CACe,CACD,CAAC,EAC7BqB,QAAQ,iBACRd,KAAA,CAAAC,aAAA,CAACC,qBAAY,EAAA;AAAC6B,IAAAA,OAAO,EAAEf,EAAAA;GACnBF,EAAAA,QACU,CAEA,CAAC,CAAA;AAEvB,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACakB,QAAQ,gBAAGtC,gBAAU,CAACmB,YAAY;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('../../../node_modules/@radix-ui/react-checkbox/dist/index.js');
|
|
4
4
|
var DisabledOpacity = require('../../../constants/DisabledOpacity.js');
|
|
5
5
|
var styleUtils = require('../../../utils/styleUtils.js');
|
|
6
6
|
var mixins = require('../Inputs/mixins.js');
|
|
@@ -30,7 +30,7 @@ const focusStyle = FoundationStyledComponent.css`
|
|
|
30
30
|
${backgroundFocusStyle}
|
|
31
31
|
${checkIconFocusStyle}
|
|
32
32
|
`;
|
|
33
|
-
const CheckboxPrimitiveRoot = /*#__PURE__*/FoundationStyledComponent.styled(
|
|
33
|
+
const CheckboxPrimitiveRoot = /*#__PURE__*/FoundationStyledComponent.styled(index.Root).withConfig({
|
|
34
34
|
displayName: "Checkboxstyled__CheckboxPrimitiveRoot",
|
|
35
35
|
componentId: "sc-9lbfgn-1"
|
|
36
36
|
})(["all:unset;display:flex;align-items:center;justify-content:center;width:", "px;height:", "px;margin:", "px;background-color:var(--bg-white-normal);border-radius:7px;box-shadow:inset 0 0 0 2px var(--bdr-black-dark);&[data-disabled]{background-color:var(--bg-black-dark);box-shadow:none;}&[data-invalid]{", "}&[data-state='checked'],&[data-state='indeterminate']{background-color:var(--bgtxt-green-normal);&:not([data-invalid]){box-shadow:none;}}", " &&{&:focus-visible{", " ", "}}", ""], CHECKBOX_SIZE, CHECKBOX_SIZE, CHECKBOX_MARGIN, mixins.erroredInputWrapperStyle, styleUtils.touchableHover(focusStyle), checkIconFocusStyle, mixins.focusedInputWrapperStyle, ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.styled.js","sources":["../../../../../src/components/Forms/Checkbox/Checkbox.styled.ts"],"sourcesContent":["import * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport {\n Typography,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport {\n erroredInputWrapperStyle,\n focusedInputWrapperStyle,\n} from '~/src/components/Forms/Inputs/mixins'\nimport { Icon } from '~/src/components/Icon'\n\nimport { type CheckboxProps } from './Checkbox.types'\n\nconst CHECKBOX_SIZE = 18\nconst CHECKBOX_MARGIN = 1\n\nexport const CheckIcon = styled(Icon)`\n /* NOTE: Reset Icon's default transition style */\n transition: none;\n\n &[data-state='unchecked'] {\n visibility: hidden;\n }\n`\n\nconst backgroundFocusStyle = css`\n &:not([data-disabled]):not([data-state='unchecked']) {\n background-color: var(--bgtxt-green-dark);\n }\n`\n\nconst checkIconFocusStyle = css`\n &:not([data-disabled])[data-state='unchecked'] {\n ${CheckIcon} {\n visibility: visible;\n }\n }\n`\n\nconst focusStyle = css`\n ${backgroundFocusStyle}\n ${checkIconFocusStyle}\n`\n\nexport const CheckboxPrimitiveRoot = styled(CheckboxPrimitive.Root)<CheckboxProps<any>>`\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${CHECKBOX_SIZE}px;\n height: ${CHECKBOX_SIZE}px;\n margin: ${CHECKBOX_MARGIN}px;\n background-color: var(--bg-white-normal);\n border-radius: 7px;\n box-shadow: inset 0 0 0 2px var(--bdr-black-dark);\n\n &[data-disabled] {\n background-color: var(--bg-black-dark);\n box-shadow: none;\n }\n\n &[data-invalid] {\n ${erroredInputWrapperStyle}\n }\n\n &[data-state='checked'],\n &[data-state='indeterminate'] {\n background-color: var(--bgtxt-green-normal);\n\n &:not([data-invalid]) {\n box-shadow: none;\n }\n }\n\n ${touchableHover(focusStyle)}\n\n && {\n &:focus-visible {\n ${checkIconFocusStyle}\n ${focusedInputWrapperStyle}\n }\n }\n\n ${({ interpolation }) => interpolation}\n`\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n width: fit-content;\n height: var(--bezier-checkbox-height);\n cursor: pointer;\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: ${DisabledOpacity};\n }\n`\n\n/**\n * NOTE: When using the `Text` component in combination with the `as` prop,\n * radix-ui lib does not bind the mouse-enter(hover) and click handler.\n */\nexport const Label = styled.label`\n ${Typography.Size14}\n display: flex;\n align-items: center;\n height: 100%;\n padding-left: 12px;\n color: var(--txt-black-darkest);\n cursor: inherit;\n`\n"],"names":["CHECKBOX_SIZE","CHECKBOX_MARGIN","CheckIcon","styled","Icon","withConfig","displayName","componentId","backgroundFocusStyle","css","checkIconFocusStyle","focusStyle","CheckboxPrimitiveRoot","CheckboxPrimitive","erroredInputWrapperStyle","touchableHover","focusedInputWrapperStyle","interpolation","Container","div","DisabledOpacity","Label","label","Typography","Size14"],"mappings":";;;;;;;;;;AAmBA,MAAMA,aAAa,GAAG,EAAE,CAAA;AACxB,MAAMC,eAAe,GAAG,CAAC,CAAA;AAElB,MAAMC,SAAS,gBAAGC,gCAAM,CAACC,SAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAOpC,CAAA,CAAA,CAAA,+DAAA,CAAA,EAAA;AAED,MAAMC,oBAAoB,GAAGC,6BAAI,CAAA;AACjC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,mBAAmB,GAAGD,6BAAI,CAAA;AAChC;AACA,IAAA,EAAMP,SAAU,CAAA;AAChB;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMS,UAAU,GAAGF,6BAAI,CAAA;AACvB,EAAA,EAAID,oBAAqB,CAAA;AACzB,EAAA,EAAIE,mBAAoB,CAAA;AACxB,CAAC,CAAA;AAEM,MAAME,qBAAqB,gBAAGT,gCAAM,CAACU,
|
|
1
|
+
{"version":3,"file":"Checkbox.styled.js","sources":["../../../../../src/components/Forms/Checkbox/Checkbox.styled.ts"],"sourcesContent":["import * as CheckboxPrimitive from '@radix-ui/react-checkbox'\n\nimport {\n Typography,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport {\n erroredInputWrapperStyle,\n focusedInputWrapperStyle,\n} from '~/src/components/Forms/Inputs/mixins'\nimport { Icon } from '~/src/components/Icon'\n\nimport { type CheckboxProps } from './Checkbox.types'\n\nconst CHECKBOX_SIZE = 18\nconst CHECKBOX_MARGIN = 1\n\nexport const CheckIcon = styled(Icon)`\n /* NOTE: Reset Icon's default transition style */\n transition: none;\n\n &[data-state='unchecked'] {\n visibility: hidden;\n }\n`\n\nconst backgroundFocusStyle = css`\n &:not([data-disabled]):not([data-state='unchecked']) {\n background-color: var(--bgtxt-green-dark);\n }\n`\n\nconst checkIconFocusStyle = css`\n &:not([data-disabled])[data-state='unchecked'] {\n ${CheckIcon} {\n visibility: visible;\n }\n }\n`\n\nconst focusStyle = css`\n ${backgroundFocusStyle}\n ${checkIconFocusStyle}\n`\n\nexport const CheckboxPrimitiveRoot = styled(CheckboxPrimitive.Root)<CheckboxProps<any>>`\n all: unset;\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${CHECKBOX_SIZE}px;\n height: ${CHECKBOX_SIZE}px;\n margin: ${CHECKBOX_MARGIN}px;\n background-color: var(--bg-white-normal);\n border-radius: 7px;\n box-shadow: inset 0 0 0 2px var(--bdr-black-dark);\n\n &[data-disabled] {\n background-color: var(--bg-black-dark);\n box-shadow: none;\n }\n\n &[data-invalid] {\n ${erroredInputWrapperStyle}\n }\n\n &[data-state='checked'],\n &[data-state='indeterminate'] {\n background-color: var(--bgtxt-green-normal);\n\n &:not([data-invalid]) {\n box-shadow: none;\n }\n }\n\n ${touchableHover(focusStyle)}\n\n && {\n &:focus-visible {\n ${checkIconFocusStyle}\n ${focusedInputWrapperStyle}\n }\n }\n\n ${({ interpolation }) => interpolation}\n`\n\nexport const Container = styled.div`\n display: flex;\n align-items: center;\n width: fit-content;\n height: var(--bezier-checkbox-height);\n cursor: pointer;\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: ${DisabledOpacity};\n }\n`\n\n/**\n * NOTE: When using the `Text` component in combination with the `as` prop,\n * radix-ui lib does not bind the mouse-enter(hover) and click handler.\n */\nexport const Label = styled.label`\n ${Typography.Size14}\n display: flex;\n align-items: center;\n height: 100%;\n padding-left: 12px;\n color: var(--txt-black-darkest);\n cursor: inherit;\n`\n"],"names":["CHECKBOX_SIZE","CHECKBOX_MARGIN","CheckIcon","styled","Icon","withConfig","displayName","componentId","backgroundFocusStyle","css","checkIconFocusStyle","focusStyle","CheckboxPrimitiveRoot","CheckboxPrimitive","erroredInputWrapperStyle","touchableHover","focusedInputWrapperStyle","interpolation","Container","div","DisabledOpacity","Label","label","Typography","Size14"],"mappings":";;;;;;;;;;AAmBA,MAAMA,aAAa,GAAG,EAAE,CAAA;AACxB,MAAMC,eAAe,GAAG,CAAC,CAAA;AAElB,MAAMC,SAAS,gBAAGC,gCAAM,CAACC,SAAI,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAOpC,CAAA,CAAA,CAAA,+DAAA,CAAA,EAAA;AAED,MAAMC,oBAAoB,GAAGC,6BAAI,CAAA;AACjC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,mBAAmB,GAAGD,6BAAI,CAAA;AAChC;AACA,IAAA,EAAMP,SAAU,CAAA;AAChB;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMS,UAAU,GAAGF,6BAAI,CAAA;AACvB,EAAA,EAAID,oBAAqB,CAAA;AACzB,EAAA,EAAIE,mBAAoB,CAAA;AACxB,CAAC,CAAA;AAEM,MAAME,qBAAqB,gBAAGT,gCAAM,CAACU,UAAsB,CAAC,CAAAR,UAAA,CAAA;EAAAC,WAAA,EAAA,uCAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAA,CAAA,CAAA,CAAA,yEAAA,EAAA,YAAA,EAAA,YAAA,EAAA,wMAAA,EAAA,4IAAA,EAAA,sBAAA,EAAA,GAAA,EAAA,IAAA,EAAA,EAAA,CAAA,EAKxDP,aAAa,EACZA,aAAa,EACbC,eAAe,EAWrBa,+BAAwB,EAY1BC,yBAAc,CAACJ,UAAU,CAAC,EAItBD,mBAAmB,EACnBM,+BAAwB,EAI5B,CAAC;AAAEC,EAAAA,aAAAA;AAAc,CAAC,KAAKA,aAAa,EACvC;MAEYC,SAAS,gBAAGf,gCAAM,CAACgB,GAAG,CAAAd,UAAA,CAAA;EAAAC,WAAA,EAAA,2BAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAA,CAAA,CAAA,CAAA,oJAAA,EAAA,IAAA,CAAA,EASpBa,uBAAe,EAE7B;;AAED;AACA;AACA;AACA;MACaC,KAAK,gBAAGlB,gCAAM,CAACmB,KAAK,CAAAjB,UAAA,CAAA;EAAAC,WAAA,EAAA,uBAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAC7BgB,CAAAA,CAAAA,CAAAA,EAAAA,EAAAA,+GAAAA,CAAAA,EAAAA,qBAAU,CAACC,MAAM;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../../node_modules/@radix-ui/react-radio-group/dist/index.js');
|
|
5
5
|
var useFormFieldProps = require('../useFormFieldProps.js');
|
|
6
6
|
var AlphaStack = require('../../AlphaStack/AlphaStack.js');
|
|
7
7
|
|
|
@@ -12,7 +12,7 @@ function RadioGroupImpl({
|
|
|
12
12
|
...rest
|
|
13
13
|
}, forwardedRef) {
|
|
14
14
|
const formFieldProps = useFormFieldProps.default(rest);
|
|
15
|
-
return /*#__PURE__*/React.createElement(
|
|
15
|
+
return /*#__PURE__*/React.createElement(index.Root, Object.assign({
|
|
16
16
|
asChild: true
|
|
17
17
|
}, formFieldProps), /*#__PURE__*/React.createElement(AlphaStack.AlphaStack, {
|
|
18
18
|
ref: forwardedRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Forms/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport { AlphaStack } from '~/src/components/AlphaStack'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\n\nimport { type RadioGroupProps } from './RadioGroup.types'\n\nfunction RadioGroupImpl<Value extends string>({\n children,\n spacing = 0,\n direction = 'vertical',\n ...rest\n}: RadioGroupProps<Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const formFieldProps = useFormFieldProps(rest)\n\n return (\n <RadioGroupPrimitive.Root\n asChild\n {...formFieldProps}\n >\n <AlphaStack\n ref={forwardedRef}\n justify=\"start\"\n align=\"stretch\"\n spacing={spacing}\n direction={direction}\n >\n { children }\n </AlphaStack>\n </RadioGroupPrimitive.Root>\n )\n}\n\n/**\n * `RadioGroup` is a set of checkable buttons, known as radio buttons.\n *\n * `RadioGroup` is a context of the `Radio` components. also, it renders an element which has the 'radiogroup' role.\n * It controls all the parts of a radio group.\n *\n * @example\n *\n * ```tsx\n * // Anatomy of the RadioGroup\n * <RadioGroup>\n * <Radio />\n * </RadioGroup>\n * ```\n */\nexport const RadioGroup = forwardRef(RadioGroupImpl) as <Value extends string>(\n props: RadioGroupProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => ReturnType<typeof RadioGroupImpl<Value>>\n"],"names":["RadioGroupImpl","children","spacing","direction","rest","forwardedRef","formFieldProps","useFormFieldProps","React","createElement","RadioGroupPrimitive","Object","assign","asChild","AlphaStack","ref","justify","align","RadioGroup","forwardRef"],"mappings":";;;;;;;AASA,SAASA,cAAcA,CAAuB;EAC5CC,QAAQ;AACRC,EAAAA,OAAO,GAAG,CAAC;AACXC,EAAAA,SAAS,GAAG,UAAU;EACtB,GAAGC,IAAAA;AACmB,CAAC,EAAEC,YAAuC,EAAE;AAClE,EAAA,MAAMC,cAAc,GAAGC,yBAAiB,CAACH,IAAI,CAAC,CAAA;EAE9C,oBACEI,KAAA,CAAAC,aAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Forms/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import React, { forwardRef } from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport { AlphaStack } from '~/src/components/AlphaStack'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\n\nimport { type RadioGroupProps } from './RadioGroup.types'\n\nfunction RadioGroupImpl<Value extends string>({\n children,\n spacing = 0,\n direction = 'vertical',\n ...rest\n}: RadioGroupProps<Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const formFieldProps = useFormFieldProps(rest)\n\n return (\n <RadioGroupPrimitive.Root\n asChild\n {...formFieldProps}\n >\n <AlphaStack\n ref={forwardedRef}\n justify=\"start\"\n align=\"stretch\"\n spacing={spacing}\n direction={direction}\n >\n { children }\n </AlphaStack>\n </RadioGroupPrimitive.Root>\n )\n}\n\n/**\n * `RadioGroup` is a set of checkable buttons, known as radio buttons.\n *\n * `RadioGroup` is a context of the `Radio` components. also, it renders an element which has the 'radiogroup' role.\n * It controls all the parts of a radio group.\n *\n * @example\n *\n * ```tsx\n * // Anatomy of the RadioGroup\n * <RadioGroup>\n * <Radio />\n * </RadioGroup>\n * ```\n */\nexport const RadioGroup = forwardRef(RadioGroupImpl) as <Value extends string>(\n props: RadioGroupProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => ReturnType<typeof RadioGroupImpl<Value>>\n"],"names":["RadioGroupImpl","children","spacing","direction","rest","forwardedRef","formFieldProps","useFormFieldProps","React","createElement","RadioGroupPrimitive","Object","assign","asChild","AlphaStack","ref","justify","align","RadioGroup","forwardRef"],"mappings":";;;;;;;AASA,SAASA,cAAcA,CAAuB;EAC5CC,QAAQ;AACRC,EAAAA,OAAO,GAAG,CAAC;AACXC,EAAAA,SAAS,GAAG,UAAU;EACtB,GAAGC,IAAAA;AACmB,CAAC,EAAEC,YAAuC,EAAE;AAClE,EAAA,MAAMC,cAAc,GAAGC,yBAAiB,CAACH,IAAI,CAAC,CAAA;EAE9C,oBACEI,KAAA,CAAAC,aAAA,CAACC,UAAwB,EAAAC,MAAA,CAAAC,MAAA,CAAA;IACvBC,OAAO,EAAA,IAAA;AAAA,GAAA,EACHP,cAAc,CAElBE,eAAAA,KAAA,CAAAC,aAAA,CAACK,qBAAU,EAAA;AACTC,IAAAA,GAAG,EAAEV,YAAa;AAClBW,IAAAA,OAAO,EAAC,OAAO;AACfC,IAAAA,KAAK,EAAC,SAAS;AACff,IAAAA,OAAO,EAAEA,OAAQ;AACjBC,IAAAA,SAAS,EAAEA,SAAAA;GAETF,EAAAA,QACQ,CACY,CAAC,CAAA;AAE/B,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaiB,UAAU,gBAAGC,gBAAU,CAACnB,cAAc;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var index = require('../../../node_modules/@radix-ui/react-radio-group/dist/index.js');
|
|
4
4
|
var DisabledOpacity = require('../../../constants/DisabledOpacity.js');
|
|
5
5
|
var styleUtils = require('../../../utils/styleUtils.js');
|
|
6
6
|
var FormFieldSize = require('../FormFieldSize.js');
|
|
@@ -26,7 +26,7 @@ const focusStyle = FoundationStyledComponent.css`
|
|
|
26
26
|
${outerIndicatorFocusStyle}
|
|
27
27
|
${innerIndicatorFocusStyle}
|
|
28
28
|
`;
|
|
29
|
-
const RadioGroupPrimitiveItem = /*#__PURE__*/FoundationStyledComponent.styled(
|
|
29
|
+
const RadioGroupPrimitiveItem = /*#__PURE__*/FoundationStyledComponent.styled(index.Item).withConfig({
|
|
30
30
|
displayName: "RadioGroupstyled__RadioGroupPrimitiveItem",
|
|
31
31
|
componentId: "sc-pnfggo-0"
|
|
32
32
|
})(["all:unset;position:relative;display:flex;align-items:center;width:100%;height:", "px;cursor:pointer;&::before{position:relative;box-sizing:border-box;width:", "px;height:", "px;margin:", "px;content:'';background-color:var(--bg-white-normal);border-radius:50%;box-shadow:inset 0 0 0 2px var(--bdr-black-dark);}&::after{position:absolute;top:50%;left:", "px;width:", "px;height:", "px;content:'';border-radius:50%;transform:translate(-50%,-50%);}&[data-disabled]{cursor:not-allowed;opacity:", ";&::before{background-color:var(--bg-black-dark);box-shadow:none;}}&[data-state='checked']{&::before{background-color:var(--bgtxt-green-normal);box-shadow:none;}&::after{background-color:var(--bgtxt-absolute-white-dark);}}", " &:focus-visible{", " &::before{", "}}", ""], FormFieldSize.default.M, OUTER_INDICATOR_SIZE, OUTER_INDICATOR_SIZE, OUTER_INDICATOR_MARGIN, OUTER_INDICATOR_SIZE / 2 + OUTER_INDICATOR_MARGIN, INNER_INDICATOR_SIZE, INNER_INDICATOR_SIZE, DisabledOpacity.default, styleUtils.touchableHover(focusStyle), innerIndicatorFocusStyle, mixins.focusedInputWrapperStyle, ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.styled.js","sources":["../../../../../src/components/Forms/RadioGroup/RadioGroup.styled.ts"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport {\n Typography,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport { FormFieldSize } from '~/src/components/Forms'\nimport { focusedInputWrapperStyle } from '~/src/components/Forms/Inputs/mixins'\nimport { Text } from '~/src/components/Text'\n\nimport { type RadioProps } from './RadioGroup.types'\n\nconst OUTER_INDICATOR_SIZE = 18\nconst OUTER_INDICATOR_MARGIN = 1\nconst INNER_INDICATOR_SIZE = 8\n\nconst outerIndicatorFocusStyle = css`\n &:not([data-disabled])[data-state='checked']::before {\n background-color: var(--bgtxt-green-dark);\n }\n`\n\nconst innerIndicatorFocusStyle = css`\n &:not([data-disabled]):not([data-state='checked'])::after {\n background-color: var(--bg-black-dark);\n }\n`\n\nconst focusStyle = css`\n ${outerIndicatorFocusStyle}\n ${innerIndicatorFocusStyle}\n`\n\nexport const RadioGroupPrimitiveItem = styled(RadioGroupPrimitive.Item)<RadioProps<string>>`\n all: unset;\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n height: ${FormFieldSize.M}px;\n cursor: pointer;\n\n /* Outer Indicator */\n &::before {\n position: relative;\n box-sizing: border-box;\n width: ${OUTER_INDICATOR_SIZE}px;\n height: ${OUTER_INDICATOR_SIZE}px;\n margin: ${OUTER_INDICATOR_MARGIN}px;\n content: '';\n background-color: var(--bg-white-normal);\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px var(--bdr-black-dark);\n }\n\n /* Inner Indicator */\n &::after {\n position: absolute;\n top: 50%;\n left: ${(OUTER_INDICATOR_SIZE / 2) + OUTER_INDICATOR_MARGIN}px;\n width: ${INNER_INDICATOR_SIZE}px;\n height: ${INNER_INDICATOR_SIZE}px;\n content: '';\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: ${DisabledOpacity};\n\n &::before {\n background-color: var(--bg-black-dark);\n box-shadow: none;\n }\n }\n\n &[data-state='checked'] {\n &::before {\n background-color: var(--bgtxt-green-normal);\n box-shadow: none;\n }\n\n &::after {\n background-color: var(--bgtxt-absolute-white-dark);\n }\n }\n\n ${touchableHover(focusStyle)}\n\n &:focus-visible {\n ${innerIndicatorFocusStyle}\n\n &::before {\n ${focusedInputWrapperStyle}\n }\n }\n\n ${({ interpolation }) => interpolation}\n`\n\nexport const Label = styled(Text).attrs({\n forwardedAs: 'label',\n typo: Typography.Size14,\n color: 'txt-black-darkest',\n})`\n padding-left: 12px;\n pointer-events: none;\n`\n"],"names":["OUTER_INDICATOR_SIZE","OUTER_INDICATOR_MARGIN","INNER_INDICATOR_SIZE","outerIndicatorFocusStyle","css","innerIndicatorFocusStyle","focusStyle","RadioGroupPrimitiveItem","styled","RadioGroupPrimitive","withConfig","displayName","componentId","FormFieldSize","M","DisabledOpacity","touchableHover","focusedInputWrapperStyle","interpolation","Label","Text","attrs","forwardedAs","typo","Typography","Size14","color"],"mappings":";;;;;;;;;;;AAiBA,MAAMA,oBAAoB,GAAG,EAAE,CAAA;AAC/B,MAAMC,sBAAsB,GAAG,CAAC,CAAA;AAChC,MAAMC,oBAAoB,GAAG,CAAC,CAAA;AAE9B,MAAMC,wBAAwB,GAAGC,6BAAI,CAAA;AACrC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,wBAAwB,GAAGD,6BAAI,CAAA;AACrC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAME,UAAU,GAAGF,6BAAI,CAAA;AACvB,EAAA,EAAID,wBAAyB,CAAA;AAC7B,EAAA,EAAIE,wBAAyB,CAAA;AAC7B,CAAC,CAAA;AAEM,MAAME,uBAAuB,gBAAGC,gCAAM,CAACC,
|
|
1
|
+
{"version":3,"file":"RadioGroup.styled.js","sources":["../../../../../src/components/Forms/RadioGroup/RadioGroup.styled.ts"],"sourcesContent":["import * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\n\nimport {\n Typography,\n css,\n styled,\n} from '~/src/foundation'\n\nimport DisabledOpacity from '~/src/constants/DisabledOpacity'\nimport { touchableHover } from '~/src/utils/styleUtils'\n\nimport { FormFieldSize } from '~/src/components/Forms'\nimport { focusedInputWrapperStyle } from '~/src/components/Forms/Inputs/mixins'\nimport { Text } from '~/src/components/Text'\n\nimport { type RadioProps } from './RadioGroup.types'\n\nconst OUTER_INDICATOR_SIZE = 18\nconst OUTER_INDICATOR_MARGIN = 1\nconst INNER_INDICATOR_SIZE = 8\n\nconst outerIndicatorFocusStyle = css`\n &:not([data-disabled])[data-state='checked']::before {\n background-color: var(--bgtxt-green-dark);\n }\n`\n\nconst innerIndicatorFocusStyle = css`\n &:not([data-disabled]):not([data-state='checked'])::after {\n background-color: var(--bg-black-dark);\n }\n`\n\nconst focusStyle = css`\n ${outerIndicatorFocusStyle}\n ${innerIndicatorFocusStyle}\n`\n\nexport const RadioGroupPrimitiveItem = styled(RadioGroupPrimitive.Item)<RadioProps<string>>`\n all: unset;\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n height: ${FormFieldSize.M}px;\n cursor: pointer;\n\n /* Outer Indicator */\n &::before {\n position: relative;\n box-sizing: border-box;\n width: ${OUTER_INDICATOR_SIZE}px;\n height: ${OUTER_INDICATOR_SIZE}px;\n margin: ${OUTER_INDICATOR_MARGIN}px;\n content: '';\n background-color: var(--bg-white-normal);\n border-radius: 50%;\n box-shadow: inset 0 0 0 2px var(--bdr-black-dark);\n }\n\n /* Inner Indicator */\n &::after {\n position: absolute;\n top: 50%;\n left: ${(OUTER_INDICATOR_SIZE / 2) + OUTER_INDICATOR_MARGIN}px;\n width: ${INNER_INDICATOR_SIZE}px;\n height: ${INNER_INDICATOR_SIZE}px;\n content: '';\n border-radius: 50%;\n transform: translate(-50%, -50%);\n }\n\n &[data-disabled] {\n cursor: not-allowed;\n opacity: ${DisabledOpacity};\n\n &::before {\n background-color: var(--bg-black-dark);\n box-shadow: none;\n }\n }\n\n &[data-state='checked'] {\n &::before {\n background-color: var(--bgtxt-green-normal);\n box-shadow: none;\n }\n\n &::after {\n background-color: var(--bgtxt-absolute-white-dark);\n }\n }\n\n ${touchableHover(focusStyle)}\n\n &:focus-visible {\n ${innerIndicatorFocusStyle}\n\n &::before {\n ${focusedInputWrapperStyle}\n }\n }\n\n ${({ interpolation }) => interpolation}\n`\n\nexport const Label = styled(Text).attrs({\n forwardedAs: 'label',\n typo: Typography.Size14,\n color: 'txt-black-darkest',\n})`\n padding-left: 12px;\n pointer-events: none;\n`\n"],"names":["OUTER_INDICATOR_SIZE","OUTER_INDICATOR_MARGIN","INNER_INDICATOR_SIZE","outerIndicatorFocusStyle","css","innerIndicatorFocusStyle","focusStyle","RadioGroupPrimitiveItem","styled","RadioGroupPrimitive","withConfig","displayName","componentId","FormFieldSize","M","DisabledOpacity","touchableHover","focusedInputWrapperStyle","interpolation","Label","Text","attrs","forwardedAs","typo","Typography","Size14","color"],"mappings":";;;;;;;;;;;AAiBA,MAAMA,oBAAoB,GAAG,EAAE,CAAA;AAC/B,MAAMC,sBAAsB,GAAG,CAAC,CAAA;AAChC,MAAMC,oBAAoB,GAAG,CAAC,CAAA;AAE9B,MAAMC,wBAAwB,GAAGC,6BAAI,CAAA;AACrC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAMC,wBAAwB,GAAGD,6BAAI,CAAA;AACrC;AACA;AACA;AACA,CAAC,CAAA;AAED,MAAME,UAAU,GAAGF,6BAAI,CAAA;AACvB,EAAA,EAAID,wBAAyB,CAAA;AAC7B,EAAA,EAAIE,wBAAyB,CAAA;AAC7B,CAAC,CAAA;AAEM,MAAME,uBAAuB,gBAAGC,gCAAM,CAACC,UAAwB,CAAC,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,2CAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAAA,CAAA,CAAA,CAAA,gFAAA,EAAA,4EAAA,EAAA,YAAA,EAAA,YAAA,EAAA,oKAAA,EAAA,WAAA,EAAA,YAAA,EAAA,8GAAA,EAAA,gOAAA,EAAA,mBAAA,EAAA,aAAA,EAAA,IAAA,EAAA,EAAA,CAAA,EAM3DC,qBAAa,CAACC,CAAC,EAOdd,oBAAoB,EACnBA,oBAAoB,EACpBC,sBAAsB,EAWvBD,oBAAoB,GAAG,CAAC,GAAIC,sBAAsB,EAClDC,oBAAoB,EACnBA,oBAAoB,EAQnBa,uBAAe,EAmB1BC,yBAAc,CAACV,UAAU,CAAC,EAGxBD,wBAAwB,EAGtBY,+BAAwB,EAI5B,CAAC;AAAEC,EAAAA,aAAAA;AAAc,CAAC,KAAKA,aAAa,EACvC;AAEM,MAAMC,KAAK,gBAAGX,gCAAM,CAACY,YAAI,CAAC,CAACC,KAAK,CAAC;AACtCC,EAAAA,WAAW,EAAE,OAAO;EACpBC,IAAI,EAAEC,qBAAU,CAACC,MAAM;AACvBC,EAAAA,KAAK,EAAE,mBAAA;AACT,CAAC,CAAC,CAAAhB,UAAA,CAAA;EAAAC,WAAA,EAAA,yBAAA;EAAAC,WAAA,EAAA,aAAA;AAAA,CAGD,CAAA,CAAA,CAAA,wCAAA,CAAA;;;;;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var index = require('../../../node_modules/classnames/index.js');
|
|
4
|
+
var index$2 = require('../../../node_modules/@radix-ui/react-radio-group/dist/index.js');
|
|
5
|
+
var index = require('../../../node_modules/@radix-ui/react-tabs/dist/index.js');
|
|
6
|
+
var index$1 = require('../../../node_modules/classnames/index.js');
|
|
7
7
|
var typeUtils = require('../../../utils/typeUtils.js');
|
|
8
8
|
var useFormFieldProps = require('../useFormFieldProps.js');
|
|
9
9
|
var SegmentedControl_types = require('./SegmentedControl.types.js');
|
|
@@ -38,8 +38,8 @@ function SegmentedControlItemListImpl({
|
|
|
38
38
|
...styleProp,
|
|
39
39
|
'--bezier-react-segmented-control-width': typeUtils.isNumber(width) ? `${width}px` : width
|
|
40
40
|
}), [styleProp, width]);
|
|
41
|
-
const className = index.default(classNameProp, size);
|
|
42
|
-
const SegmentedControlItemList = type === 'radiogroup' ?
|
|
41
|
+
const className = index$1.default(classNameProp, size);
|
|
42
|
+
const SegmentedControlItemList = type === 'radiogroup' ? index$2.Root : index.List;
|
|
43
43
|
return /*#__PURE__*/React.createElement(SegmentedControlItemList, Object.assign({
|
|
44
44
|
asChild: true,
|
|
45
45
|
ref: ref,
|
|
@@ -82,8 +82,8 @@ const SegmentedControlTabList = SegmentedControlItemList;
|
|
|
82
82
|
*
|
|
83
83
|
* It must be used as a child of `SegmentedControl`.
|
|
84
84
|
*/
|
|
85
|
-
const SegmentedControlTabContent =
|
|
86
|
-
const SegmentedControlTabs =
|
|
85
|
+
const SegmentedControlTabContent = index.Content;
|
|
86
|
+
const SegmentedControlTabs = index.Root;
|
|
87
87
|
function SegmentedControlImpl({
|
|
88
88
|
type = 'radiogroup',
|
|
89
89
|
size = SegmentedControl_types.SegmentedControlSize.M,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControl.js","sources":["../../../../../src/components/Forms/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useMemo,\n useState,\n} from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport classNames from 'classnames'\n\nimport { isNumber } from '~/src/utils/typeUtils'\n\nimport { Divider } from '~/src/components/Divider'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\n\nimport {\n type SegmentedControlItemListProps,\n type SegmentedControlProps,\n type SegmentedControlRadioGroupProps,\n SegmentedControlSize,\n type SegmentedControlTabContentProps,\n type SegmentedControlTabListProps,\n type SegmentedControlTabsProps,\n type SegmentedControlType,\n} from './SegmentedControl.types'\nimport {\n SegmentedControlContextProvider,\n SegmentedControlItemListContextProvider,\n useSegmentedControlContext,\n} from './SegmentedControlContext'\nimport { useSegmentedControlIndicator } from './SegmentedControlIndicator'\n\nimport * as Styled from './SegmentedControl.styled'\n\nfunction SegmentedControlItemListImpl<\n Type extends SegmentedControlType,\n Value extends string,\n>({\n children,\n style: styleProp,\n className: classNameProp,\n ...rest\n}: SegmentedControlItemListProps<Type, Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const [selectedElement, setSelectedElement] = useState<HTMLButtonElement | null>(null)\n\n const {\n type,\n size,\n width,\n } = useSegmentedControlContext('SegmentedControlItemList')\n\n const {\n containerRef: ref,\n render: renderIndicator,\n } = useSegmentedControlIndicator({\n target: selectedElement,\n refs: [forwardedRef],\n })\n\n const contextValue = useMemo(() => ({\n setSelectedElement,\n }), [])\n\n const style = useMemo(() => ({\n ...styleProp,\n '--bezier-react-segmented-control-width': isNumber(width) ? `${width}px` : width,\n } as React.CSSProperties), [\n styleProp,\n width,\n ])\n\n const className = classNames(\n classNameProp,\n size,\n )\n\n const SegmentedControlItemList = type === 'radiogroup'\n ? RadioGroupPrimitive.Root\n : TabsPrimitive.List\n\n return (\n <SegmentedControlItemList\n asChild\n ref={ref}\n style={style}\n className={className}\n {...rest}\n >\n <Styled.Container>\n <SegmentedControlItemListContextProvider value={contextValue}>\n { renderIndicator() }\n\n { React.Children.map(children, (child, index) => {\n if (index === 0) {\n return child\n }\n\n return (\n <>\n <Divider\n withoutParallelIndent\n orientation=\"vertical\"\n />\n { child }\n </>\n )\n }) }\n </SegmentedControlItemListContextProvider>\n </Styled.Container>\n </SegmentedControlItemList>\n )\n}\n\nconst SegmentedControlItemList = forwardRef(SegmentedControlItemListImpl) as <\n Type extends SegmentedControlType,\n Value extends string,\n>(\n props: SegmentedControlItemListProps<Type, Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nfunction SegmentedControlRadioGroupImpl<Value extends string>({\n children,\n ...rest\n}: SegmentedControlRadioGroupProps<Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n return (\n <SegmentedControlItemList\n ref={forwardedRef}\n {...useFormFieldProps(rest)}\n >\n { children }\n </SegmentedControlItemList>\n )\n}\n\nconst SegmentedControlRadioGroup = forwardRef(SegmentedControlRadioGroupImpl) as <Value extends string>(\n props: SegmentedControlRadioGroupProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\n/**\n * `SegmentedControlTabList` is the component that wraps `SegmentedControlItem`.\n * It can be used only when `SegmentedControl` component is used as the `tabs` type.\n *\n * It must be used as a child of `SegmentedControl`.\n */\nexport const SegmentedControlTabList = SegmentedControlItemList as (\n props: SegmentedControlTabListProps & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\n/**\n * `SegmentedControlTabContent` is the component that wraps the content that corresponds to a specific value of `SegmentedControlItem`.\n * It can be used only when `SegmentedControl` component is used as the `tabs` type.\n *\n * It must be used as a child of `SegmentedControl`.\n */\nexport const SegmentedControlTabContent = TabsPrimitive.Content as <Value extends string>(\n props: SegmentedControlTabContentProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nconst SegmentedControlTabs = TabsPrimitive.Root as <Value extends string>(\n props: SegmentedControlTabsProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nfunction SegmentedControlImpl<\n Type extends SegmentedControlType,\n Value extends string,\n>({\n type = 'radiogroup' as Type,\n size = SegmentedControlSize.M,\n width = '100%',\n onValueChange,\n children,\n ...rest\n}: SegmentedControlProps<Type, Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const SegmentedControlRoot = type === 'radiogroup'\n ? SegmentedControlRadioGroup\n : SegmentedControlTabs\n\n const contextValue = useMemo(() => ({\n type,\n size,\n width,\n }), [\n type,\n size,\n width,\n ])\n\n return (\n <SegmentedControlContextProvider value={contextValue}>\n <SegmentedControlRoot\n ref={forwardedRef}\n onValueChange={onValueChange}\n {...rest}\n >\n { children }\n </SegmentedControlRoot>\n </SegmentedControlContextProvider>\n )\n}\n\n/**\n * `SegmentedControl` is component that looks like a combination of a radio and a button.\n * They can be used in place of tabs and as input elements in modals.\n * If you have more than five items, use a different element, such as a dropdown.\n *\n * `SegmentedControl` can be used as a radio group, tabs element depending on its `type`.\n *\n * @example\n *\n * ```tsx\n * // Anatomy of the SegmentedControl type=\"radiogroup\"\n * <SegmentedControl type=\"radiogroup\">\n * <SegmentedControlItem />\n * </SegmentedControl>\n *\n * // Anatomy of the SegmentedControl type=\"tabs\"\n * <SegmentedControl type=\"tabs\">\n * <SegmentedControlTabList>\n * <SegmentedControlItem />\n * </SegmentedControlTabList>\n *\n * <SegmentedControlTabContent />\n * </SegmentedControl>\n * ```\n */\nexport const SegmentedControl = forwardRef(SegmentedControlImpl) as <\n Type extends SegmentedControlType,\n Value extends string,\n>(\n props: SegmentedControlProps<Type, Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n"],"names":["SegmentedControlItemListImpl","children","style","styleProp","className","classNameProp","rest","forwardedRef","selectedElement","setSelectedElement","useState","type","size","width","useSegmentedControlContext","containerRef","ref","render","renderIndicator","useSegmentedControlIndicator","target","refs","contextValue","useMemo","isNumber","classNames","SegmentedControlItemList","RadioGroupPrimitive","TabsPrimitive","React","createElement","Object","assign","asChild","Styled","SegmentedControlItemListContextProvider","value","Children","map","child","index","Fragment","Divider","withoutParallelIndent","orientation","forwardRef","SegmentedControlRadioGroupImpl","useFormFieldProps","SegmentedControlRadioGroup","SegmentedControlTabList","SegmentedControlTabContent","SegmentedControlTabs","SegmentedControlImpl","SegmentedControlSize","M","onValueChange","SegmentedControlRoot","SegmentedControlContextProvider","SegmentedControl"],"mappings":";;;;;;;;;;;;;;AAkCA,SAASA,4BAA4BA,CAGnC;EACAC,QAAQ;AACRC,EAAAA,KAAK,EAAEC,SAAS;AAChBC,EAAAA,SAAS,EAAEC,aAAa;EACxB,GAAGC,IAAAA;AACuC,CAAC,EAAEC,YAAuC,EAAE;EACtF,MAAM,CAACC,eAAe,EAAEC,kBAAkB,CAAC,GAAGC,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7BzC,EAAAA,KAAK,GAAG,MAAM;EACd0C,aAAa;EACbtD,QAAQ;EACR,GAAGK,IAAAA;AAC+B,CAAC,EAAEC,YAAuC,EAAE;EAC9E,MAAMiD,oBAAoB,GAAG7C,IAAI,KAAK,YAAY,GAC9CqC,0BAA0B,GAC1BG,oBAAoB,CAAA;AAExB,EAAA,MAAM7B,YAAY,GAAGC,aAAO,CAAC,OAAO;IAClCZ,IAAI;IACJC,IAAI;AACJC,IAAAA,KAAAA;GACD,CAAC,EAAE,CACFF,IAAI,EACJC,IAAI,EACJC,KAAK,CACN,CAAC,CAAA;AAEF,EAAA,oBACEgB,KAAA,CAAAC,aAAA,CAAC2B,uDAA+B,EAAA;AAACrB,IAAAA,KAAK,EAAEd,YAAAA;GACtCO,eAAAA,KAAA,CAAAC,aAAA,CAAC0B,oBAAoB,EAAAzB,MAAA,CAAAC,MAAA,CAAA;AACnBhB,IAAAA,GAAG,EAAET,YAAa;AAClBgD,IAAAA,aAAa,EAAEA,aAAAA;AAAc,GAAA,EACzBjD,IAAI,CAAA,EAENL,QACkB,CACS,CAAC,CAAA;AAEtC,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACayD,gBAAgB,gBAAGb,gBAAU,CAACO,oBAAoB;;;;;;"}
|
|
1
|
+
{"version":3,"file":"SegmentedControl.js","sources":["../../../../../src/components/Forms/SegmentedControl/SegmentedControl.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useMemo,\n useState,\n} from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\nimport classNames from 'classnames'\n\nimport { isNumber } from '~/src/utils/typeUtils'\n\nimport { Divider } from '~/src/components/Divider'\nimport useFormFieldProps from '~/src/components/Forms/useFormFieldProps'\n\nimport {\n type SegmentedControlItemListProps,\n type SegmentedControlProps,\n type SegmentedControlRadioGroupProps,\n SegmentedControlSize,\n type SegmentedControlTabContentProps,\n type SegmentedControlTabListProps,\n type SegmentedControlTabsProps,\n type SegmentedControlType,\n} from './SegmentedControl.types'\nimport {\n SegmentedControlContextProvider,\n SegmentedControlItemListContextProvider,\n useSegmentedControlContext,\n} from './SegmentedControlContext'\nimport { useSegmentedControlIndicator } from './SegmentedControlIndicator'\n\nimport * as Styled from './SegmentedControl.styled'\n\nfunction SegmentedControlItemListImpl<\n Type extends SegmentedControlType,\n Value extends string,\n>({\n children,\n style: styleProp,\n className: classNameProp,\n ...rest\n}: SegmentedControlItemListProps<Type, Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const [selectedElement, setSelectedElement] = useState<HTMLButtonElement | null>(null)\n\n const {\n type,\n size,\n width,\n } = useSegmentedControlContext('SegmentedControlItemList')\n\n const {\n containerRef: ref,\n render: renderIndicator,\n } = useSegmentedControlIndicator({\n target: selectedElement,\n refs: [forwardedRef],\n })\n\n const contextValue = useMemo(() => ({\n setSelectedElement,\n }), [])\n\n const style = useMemo(() => ({\n ...styleProp,\n '--bezier-react-segmented-control-width': isNumber(width) ? `${width}px` : width,\n } as React.CSSProperties), [\n styleProp,\n width,\n ])\n\n const className = classNames(\n classNameProp,\n size,\n )\n\n const SegmentedControlItemList = type === 'radiogroup'\n ? RadioGroupPrimitive.Root\n : TabsPrimitive.List\n\n return (\n <SegmentedControlItemList\n asChild\n ref={ref}\n style={style}\n className={className}\n {...rest}\n >\n <Styled.Container>\n <SegmentedControlItemListContextProvider value={contextValue}>\n { renderIndicator() }\n\n { React.Children.map(children, (child, index) => {\n if (index === 0) {\n return child\n }\n\n return (\n <>\n <Divider\n withoutParallelIndent\n orientation=\"vertical\"\n />\n { child }\n </>\n )\n }) }\n </SegmentedControlItemListContextProvider>\n </Styled.Container>\n </SegmentedControlItemList>\n )\n}\n\nconst SegmentedControlItemList = forwardRef(SegmentedControlItemListImpl) as <\n Type extends SegmentedControlType,\n Value extends string,\n>(\n props: SegmentedControlItemListProps<Type, Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nfunction SegmentedControlRadioGroupImpl<Value extends string>({\n children,\n ...rest\n}: SegmentedControlRadioGroupProps<Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n return (\n <SegmentedControlItemList\n ref={forwardedRef}\n {...useFormFieldProps(rest)}\n >\n { children }\n </SegmentedControlItemList>\n )\n}\n\nconst SegmentedControlRadioGroup = forwardRef(SegmentedControlRadioGroupImpl) as <Value extends string>(\n props: SegmentedControlRadioGroupProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\n/**\n * `SegmentedControlTabList` is the component that wraps `SegmentedControlItem`.\n * It can be used only when `SegmentedControl` component is used as the `tabs` type.\n *\n * It must be used as a child of `SegmentedControl`.\n */\nexport const SegmentedControlTabList = SegmentedControlItemList as (\n props: SegmentedControlTabListProps & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\n/**\n * `SegmentedControlTabContent` is the component that wraps the content that corresponds to a specific value of `SegmentedControlItem`.\n * It can be used only when `SegmentedControl` component is used as the `tabs` type.\n *\n * It must be used as a child of `SegmentedControl`.\n */\nexport const SegmentedControlTabContent = TabsPrimitive.Content as <Value extends string>(\n props: SegmentedControlTabContentProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nconst SegmentedControlTabs = TabsPrimitive.Root as <Value extends string>(\n props: SegmentedControlTabsProps<Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n\nfunction SegmentedControlImpl<\n Type extends SegmentedControlType,\n Value extends string,\n>({\n type = 'radiogroup' as Type,\n size = SegmentedControlSize.M,\n width = '100%',\n onValueChange,\n children,\n ...rest\n}: SegmentedControlProps<Type, Value>, forwardedRef: React.Ref<HTMLDivElement>) {\n const SegmentedControlRoot = type === 'radiogroup'\n ? SegmentedControlRadioGroup\n : SegmentedControlTabs\n\n const contextValue = useMemo(() => ({\n type,\n size,\n width,\n }), [\n type,\n size,\n width,\n ])\n\n return (\n <SegmentedControlContextProvider value={contextValue}>\n <SegmentedControlRoot\n ref={forwardedRef}\n onValueChange={onValueChange}\n {...rest}\n >\n { children }\n </SegmentedControlRoot>\n </SegmentedControlContextProvider>\n )\n}\n\n/**\n * `SegmentedControl` is component that looks like a combination of a radio and a button.\n * They can be used in place of tabs and as input elements in modals.\n * If you have more than five items, use a different element, such as a dropdown.\n *\n * `SegmentedControl` can be used as a radio group, tabs element depending on its `type`.\n *\n * @example\n *\n * ```tsx\n * // Anatomy of the SegmentedControl type=\"radiogroup\"\n * <SegmentedControl type=\"radiogroup\">\n * <SegmentedControlItem />\n * </SegmentedControl>\n *\n * // Anatomy of the SegmentedControl type=\"tabs\"\n * <SegmentedControl type=\"tabs\">\n * <SegmentedControlTabList>\n * <SegmentedControlItem />\n * </SegmentedControlTabList>\n *\n * <SegmentedControlTabContent />\n * </SegmentedControl>\n * ```\n */\nexport const SegmentedControl = forwardRef(SegmentedControlImpl) as <\n Type extends SegmentedControlType,\n Value extends string,\n>(\n props: SegmentedControlProps<Type, Value> & { ref?: React.ForwardedRef<HTMLDivElement> }\n) => JSX.Element\n"],"names":["SegmentedControlItemListImpl","children","style","styleProp","className","classNameProp","rest","forwardedRef","selectedElement","setSelectedElement","useState","type","size","width","useSegmentedControlContext","containerRef","ref","render","renderIndicator","useSegmentedControlIndicator","target","refs","contextValue","useMemo","isNumber","classNames","SegmentedControlItemList","RadioGroupPrimitive","TabsPrimitive","React","createElement","Object","assign","asChild","Styled","SegmentedControlItemListContextProvider","value","Children","map","child","index","Fragment","Divider","withoutParallelIndent","orientation","forwardRef","SegmentedControlRadioGroupImpl","useFormFieldProps","SegmentedControlRadioGroup","SegmentedControlTabList","SegmentedControlTabContent","SegmentedControlTabs","SegmentedControlImpl","SegmentedControlSize","M","onValueChange","SegmentedControlRoot","SegmentedControlContextProvider","SegmentedControl"],"mappings":";;;;;;;;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AACA;AACA;AACA;AACA;AACA;AACawB,MAAAA,0BAA0B,GAAGtB,cAE1B;AAEhB,MAAMuB,oBAAoB,GAAGvB,UAEb,CAAA;AAEhB,SAASwB,oBAAoBA,CAG3B;AACAzC,EAAAA,IAAI,GAAG,YAAoB;EAC3BC,IAAI,GAAGyC,2CAAoB,CAACC,CAAC;AAC7BzC,EAAAA,KAAK,GAAG,MAAM;EACd0C,aAAa;EACbtD,QAAQ;EACR,GAAGK,IAAAA;AAC+B,CAAC,EAAEC,YAAuC,EAAE;EAC9E,MAAMiD,oBAAoB,GAAG7C,IAAI,KAAK,YAAY,GAC9CqC,0BAA0B,GAC1BG,oBAAoB,CAAA;AAExB,EAAA,MAAM7B,YAAY,GAAGC,aAAO,CAAC,OAAO;IAClCZ,IAAI;IACJC,IAAI;AACJC,IAAAA,KAAAA;GACD,CAAC,EAAE,CACFF,IAAI,EACJC,IAAI,EACJC,KAAK,CACN,CAAC,CAAA;AAEF,EAAA,oBACEgB,KAAA,CAAAC,aAAA,CAAC2B,uDAA+B,EAAA;AAACrB,IAAAA,KAAK,EAAEd,YAAAA;GACtCO,eAAAA,KAAA,CAAAC,aAAA,CAAC0B,oBAAoB,EAAAzB,MAAA,CAAAC,MAAA,CAAA;AACnBhB,IAAAA,GAAG,EAAET,YAAa;AAClBgD,IAAAA,aAAa,EAAEA,aAAAA;AAAc,GAAA,EACzBjD,IAAI,CAAA,EAENL,QACkB,CACS,CAAC,CAAA;AAEtC,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACayD,gBAAgB,gBAAGb,gBAAU,CAACO,oBAAoB;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var index = require('../../../node_modules/@radix-ui/react-radio-group/dist/index.js');
|
|
5
|
+
var index$1 = require('../../../node_modules/@radix-ui/react-tabs/dist/index.js');
|
|
6
6
|
var useMergeRefs = require('../../../hooks/useMergeRefs.js');
|
|
7
7
|
var domUtils = require('../../../utils/domUtils.js');
|
|
8
8
|
var SegmentedControlContext = require('./SegmentedControlContext.js');
|
|
@@ -41,7 +41,7 @@ function SegmentedControlItemImpl({
|
|
|
41
41
|
const {
|
|
42
42
|
type
|
|
43
43
|
} = SegmentedControlContext.useSegmentedControlContext('SegmentedControlItem');
|
|
44
|
-
const SegmentedControlItem = type === 'radiogroup' ?
|
|
44
|
+
const SegmentedControlItem = type === 'radiogroup' ? index.Item : index$1.Trigger;
|
|
45
45
|
return /*#__PURE__*/React.createElement(SegmentedControlItem, Object.assign({
|
|
46
46
|
asChild: true,
|
|
47
47
|
ref: forwardedRef
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SegmentedControlItem.js","sources":["../../../../../src/components/Forms/SegmentedControl/SegmentedControlItem.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n} from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\n\nimport useMergeRefs from '~/src/hooks/useMergeRefs'\nimport { ariaAttr } from '~/src/utils/domUtils'\n\nimport {\n type SegmentedControlItemProps,\n type SegmentedControlProps,\n type SegmentedControlType,\n} from './SegmentedControl.types'\nimport {\n useSegmentedControlContext,\n useSegmentedControlItemListContext,\n} from './SegmentedControlContext'\n\nimport * as Styled from './SegmentedControl.styled'\n\n/**\n * NOTE: (@ed) A property injected at runtime by the radix-ui lib.\n */\ntype ItemProps<Type extends SegmentedControlType> = (\n Type extends 'radiogroup'\n ? { 'data-state'?: 'unchecked' | 'checked' }\n : { 'data-state'?: 'inactive' | 'active' }\n)\n& React.HTMLAttributes<HTMLButtonElement>\n& Partial<SegmentedControlItemProps<Type>>\n& Required<Pick<SegmentedControlProps<Type, string>, 'type'>>\n\nconst Item = forwardRef<HTMLButtonElement, ItemProps<SegmentedControlType>>(function Item({\n children,\n type,\n leftContent,\n rightContent,\n ...rest\n}, forwardedRef) {\n const { setSelectedElement } = useSegmentedControlItemListContext('SegmentedControlItem')\n\n const checked = type === 'radiogroup'\n ? (rest as ItemProps<typeof type>)?.['data-state'] === 'checked'\n : (rest as ItemProps<typeof type>)?.['data-state'] === 'active'\n\n const ref = useMergeRefs(\n forwardedRef,\n useCallback((node: HTMLButtonElement | null) => {\n if (checked) {\n setSelectedElement(node)\n }\n }, [\n checked,\n setSelectedElement,\n ]),\n )\n\n return (\n <Styled.Item\n {...rest}\n ref={ref}\n type=\"button\"\n data-checked={ariaAttr(checked)}\n >\n <Styled.ItemContainer>\n { leftContent }\n <Styled.ItemLabel>\n { children }\n </Styled.ItemLabel>\n { rightContent }\n </Styled.ItemContainer>\n </Styled.Item>\n )\n})\n\nfunction SegmentedControlItemImpl<Value extends string>({\n children,\n ...rest\n}: SegmentedControlItemProps<Value>, forwardedRef: React.Ref<HTMLButtonElement>) {\n const { type } = useSegmentedControlContext('SegmentedControlItem')\n\n const SegmentedControlItem = type === 'radiogroup'\n ? RadioGroupPrimitive.Item\n : TabsPrimitive.Trigger\n\n return (\n <SegmentedControlItem\n asChild\n ref={forwardedRef}\n {...rest}\n >\n <Item type={type}>\n { children }\n </Item>\n </SegmentedControlItem>\n )\n}\n\n/**\n * `SegmentedControlItem` component is each item in `SegmentedControl`.\n *\n * If the type of `SegmentedControl` is `radiogroup`, this component acts as a radio item.\n * In this case, it must be used as a child of `SegmentedControl`.\n *\n * If the type of `SegmentedControl` is `tabs`, this component acts as a tab item.\n * In this case, it must be used as a child of `SegmentedControlTabList`.\n */\nexport const SegmentedControlItem = forwardRef(SegmentedControlItemImpl) as <Value extends string>(\n props: SegmentedControlItemProps<Value> & { ref?: React.ForwardedRef<HTMLButtonElement> }\n) => JSX.Element\n"],"names":["Item","forwardRef","children","type","leftContent","rightContent","rest","forwardedRef","setSelectedElement","useSegmentedControlItemListContext","checked","ref","useMergeRefs","useCallback","node","React","createElement","Styled","Object","assign","ariaAttr","SegmentedControlItemImpl","useSegmentedControlContext","SegmentedControlItem","RadioGroupPrimitive","TabsPrimitive","asChild"],"mappings":";;;;;;;;;;AAuBA;AACA;AACA;;AAUA,MAAMA,IAAI,gBAAGC,gBAAU,CAAqD,SAASD,IAAIA,CAAC;EACxFE,QAAQ;EACRC,IAAI;EACJC,WAAW;EACXC,YAAY;EACZ,GAAGC,IAAAA;AACL,CAAC,EAAEC,YAAY,EAAE;EACf,MAAM;AAAEC,IAAAA,kBAAAA;AAAmB,GAAC,GAAGC,0DAAkC,CAAC,sBAAsB,CAAC,CAAA;AAEzF,EAAA,MAAMC,OAAO,GAAGP,IAAI,KAAK,YAAY,GAChCG,IAAI,GAA8B,YAAY,CAAC,KAAK,SAAS,GAC7DA,IAAI,GAA8B,YAAY,CAAC,KAAK,QAAQ,CAAA;EAEjE,MAAMK,GAAG,GAAGC,oBAAY,CACtBL,YAAY,EACZM,iBAAW,CAAEC,IAA8B,IAAK;AAC9C,IAAA,IAAIJ,OAAO,EAAE;MACXF,kBAAkB,CAACM,IAAI,CAAC,CAAA;AAC1B,KAAA;AACF,GAAC,EAAE,CACDJ,OAAO,EACPF,kBAAkB,CACnB,CACH,CAAC,CAAA;AAED,EAAA,oBACEO,KAAA,CAAAC,aAAA,CAACC,4BAAW,EAAAC,MAAA,CAAAC,MAAA,CAAA,EAAA,EACNb,IAAI,EAAA;AACRK,IAAAA,GAAG,EAAEA,GAAI;AACTR,IAAAA,IAAI,EAAC,QAAQ;IACb,cAAciB,EAAAA,iBAAQ,CAACV,OAAO,CAAA;GAE9BK,CAAAA,eAAAA,KAAA,CAAAC,aAAA,CAACC,qCAAoB,EACjBb,IAAAA,EAAAA,WAAW,eACbW,KAAA,CAAAC,aAAA,CAACC,iCAAgB,EAAA,IAAA,EACbf,QACc,CAAC,EACjBG,YACkB,CACX,CAAC,CAAA;AAElB,CAAC,CAAC,CAAA;AAEF,SAASgB,wBAAwBA,CAAuB;EACtDnB,QAAQ;EACR,GAAGI,IAAAA;AAC6B,CAAC,EAAEC,YAA0C,EAAE;EAC/E,MAAM;AAAEJ,IAAAA,IAAAA;AAAK,GAAC,GAAGmB,kDAA0B,CAAC,sBAAsB,CAAC,CAAA;AAEnE,EAAA,MAAMC,oBAAoB,GAAGpB,IAAI,KAAK,YAAY,GAC9CqB,
|
|
1
|
+
{"version":3,"file":"SegmentedControlItem.js","sources":["../../../../../src/components/Forms/SegmentedControl/SegmentedControlItem.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n} from 'react'\n\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport * as TabsPrimitive from '@radix-ui/react-tabs'\n\nimport useMergeRefs from '~/src/hooks/useMergeRefs'\nimport { ariaAttr } from '~/src/utils/domUtils'\n\nimport {\n type SegmentedControlItemProps,\n type SegmentedControlProps,\n type SegmentedControlType,\n} from './SegmentedControl.types'\nimport {\n useSegmentedControlContext,\n useSegmentedControlItemListContext,\n} from './SegmentedControlContext'\n\nimport * as Styled from './SegmentedControl.styled'\n\n/**\n * NOTE: (@ed) A property injected at runtime by the radix-ui lib.\n */\ntype ItemProps<Type extends SegmentedControlType> = (\n Type extends 'radiogroup'\n ? { 'data-state'?: 'unchecked' | 'checked' }\n : { 'data-state'?: 'inactive' | 'active' }\n)\n& React.HTMLAttributes<HTMLButtonElement>\n& Partial<SegmentedControlItemProps<Type>>\n& Required<Pick<SegmentedControlProps<Type, string>, 'type'>>\n\nconst Item = forwardRef<HTMLButtonElement, ItemProps<SegmentedControlType>>(function Item({\n children,\n type,\n leftContent,\n rightContent,\n ...rest\n}, forwardedRef) {\n const { setSelectedElement } = useSegmentedControlItemListContext('SegmentedControlItem')\n\n const checked = type === 'radiogroup'\n ? (rest as ItemProps<typeof type>)?.['data-state'] === 'checked'\n : (rest as ItemProps<typeof type>)?.['data-state'] === 'active'\n\n const ref = useMergeRefs(\n forwardedRef,\n useCallback((node: HTMLButtonElement | null) => {\n if (checked) {\n setSelectedElement(node)\n }\n }, [\n checked,\n setSelectedElement,\n ]),\n )\n\n return (\n <Styled.Item\n {...rest}\n ref={ref}\n type=\"button\"\n data-checked={ariaAttr(checked)}\n >\n <Styled.ItemContainer>\n { leftContent }\n <Styled.ItemLabel>\n { children }\n </Styled.ItemLabel>\n { rightContent }\n </Styled.ItemContainer>\n </Styled.Item>\n )\n})\n\nfunction SegmentedControlItemImpl<Value extends string>({\n children,\n ...rest\n}: SegmentedControlItemProps<Value>, forwardedRef: React.Ref<HTMLButtonElement>) {\n const { type } = useSegmentedControlContext('SegmentedControlItem')\n\n const SegmentedControlItem = type === 'radiogroup'\n ? RadioGroupPrimitive.Item\n : TabsPrimitive.Trigger\n\n return (\n <SegmentedControlItem\n asChild\n ref={forwardedRef}\n {...rest}\n >\n <Item type={type}>\n { children }\n </Item>\n </SegmentedControlItem>\n )\n}\n\n/**\n * `SegmentedControlItem` component is each item in `SegmentedControl`.\n *\n * If the type of `SegmentedControl` is `radiogroup`, this component acts as a radio item.\n * In this case, it must be used as a child of `SegmentedControl`.\n *\n * If the type of `SegmentedControl` is `tabs`, this component acts as a tab item.\n * In this case, it must be used as a child of `SegmentedControlTabList`.\n */\nexport const SegmentedControlItem = forwardRef(SegmentedControlItemImpl) as <Value extends string>(\n props: SegmentedControlItemProps<Value> & { ref?: React.ForwardedRef<HTMLButtonElement> }\n) => JSX.Element\n"],"names":["Item","forwardRef","children","type","leftContent","rightContent","rest","forwardedRef","setSelectedElement","useSegmentedControlItemListContext","checked","ref","useMergeRefs","useCallback","node","React","createElement","Styled","Object","assign","ariaAttr","SegmentedControlItemImpl","useSegmentedControlContext","SegmentedControlItem","RadioGroupPrimitive","TabsPrimitive","asChild"],"mappings":";;;;;;;;;;AAuBA;AACA;AACA;;AAUA,MAAMA,IAAI,gBAAGC,gBAAU,CAAqD,SAASD,IAAIA,CAAC;EACxFE,QAAQ;EAC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CqB,UAAwB,GACxBC,eAAqB,CAAA;EAEzB,oBACEV,KAAA,CAAAC,aAAA,CAACO,oBAAoB,EAAAL,MAAA,CAAAC,MAAA,CAAA;IACnBO,OAAO,EAAA,IAAA;AACPf,IAAAA,GAAG,EAAEJ,YAAAA;AAAa,GAAA,EACdD,IAAI,CAERS,eAAAA,KAAA,CAAAC,aAAA,CAAChB,IAAI,EAAA;AAACG,IAAAA,IAAI,EAAEA,IAAAA;GACRD,EAAAA,QACE,CACc,CAAC,CAAA;AAE3B,CAAA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;MACaqB,oBAAoB,gBAAGtB,gBAAU,CAACoB,wBAAwB;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../../node_modules/@radix-ui/react-slider/dist/index.js');
|
|
5
5
|
var functionUtils = require('../../../utils/functionUtils.js');
|
|
6
6
|
var Slider_styled = require('./Slider.styled.js');
|
|
7
7
|
|
|
@@ -43,7 +43,7 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider({
|
|
|
43
43
|
onThumbPointerUp(currentValue);
|
|
44
44
|
}
|
|
45
45
|
}, [disabled, onThumbPointerUp, currentValue]);
|
|
46
|
-
return /*#__PURE__*/React.createElement(
|
|
46
|
+
return /*#__PURE__*/React.createElement(index.Root, {
|
|
47
47
|
asChild: true,
|
|
48
48
|
defaultValue: defaultValue,
|
|
49
49
|
value: currentValue,
|
|
@@ -58,16 +58,16 @@ const Slider = /*#__PURE__*/React.forwardRef(function Slider({
|
|
|
58
58
|
disabled: disabled,
|
|
59
59
|
ref: forwardedRef,
|
|
60
60
|
"data-testid": SLIDER_TEST_ID
|
|
61
|
-
}, rest), /*#__PURE__*/React.createElement(
|
|
61
|
+
}, rest), /*#__PURE__*/React.createElement(index.Track, {
|
|
62
62
|
asChild: true
|
|
63
|
-
}, /*#__PURE__*/React.createElement(Slider_styled.SliderTrack, null, /*#__PURE__*/React.createElement(
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Slider_styled.SliderTrack, null, /*#__PURE__*/React.createElement(index.Range, {
|
|
64
64
|
asChild: true
|
|
65
65
|
}, /*#__PURE__*/React.createElement(Slider_styled.SliderRange, null)))), guide?.map(guideValue => /*#__PURE__*/React.createElement(Slider_styled.SliderGuide, {
|
|
66
66
|
key: `slider-guide-${guideValue}`,
|
|
67
67
|
min: min,
|
|
68
68
|
max: max,
|
|
69
69
|
guideValue: guideValue
|
|
70
|
-
})), currentValue.map((v, i) => /*#__PURE__*/React.createElement(
|
|
70
|
+
})), currentValue.map((v, i) => /*#__PURE__*/React.createElement(index.Thumb, {
|
|
71
71
|
asChild: true
|
|
72
72
|
// eslint-disable-next-line react/no-array-index-key
|
|
73
73
|
,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slider.js","sources":["../../../../../src/components/Forms/Slider/Slider.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useState,\n} from 'react'\n\nimport * as SliderPrimitive from '@radix-ui/react-slider'\n\nimport { noop } from '~/src/utils/functionUtils'\n\nimport type SliderProps from './Slider.types'\n\nimport * as Styled from './Slider.styled'\n\nexport const SLIDER_TEST_ID = 'bezier-react-slider'\nexport const SLIDER_THUMB_TEST_ID = 'bezier-react-slider-thumb'\n\nexport const Slider = forwardRef(function Slider(\n {\n width = 36,\n guide,\n onThumbPointerDown = noop,\n onThumbPointerUp = noop,\n defaultValue = [5],\n value,\n disabled = false,\n min = 0,\n max = 10,\n step = 1,\n onValueChange = noop,\n minStepsBetweenThumbs = 0,\n ...rest\n }: SliderProps,\n forwardedRef: React.Ref<HTMLDivElement>,\n) {\n const [currentValue, setCurrentValue] = useState<number[]>(value ?? defaultValue)\n\n useEffect(function updateCurrentValue() {\n if (value) {\n setCurrentValue(value)\n onValueChange(value)\n }\n }, [\n value,\n onValueChange,\n ])\n\n const handleValueChange: (value: number[]) => void = useCallback((_value) => {\n setCurrentValue(_value)\n onValueChange(_value)\n }, [onValueChange])\n\n const handlePointerDown: React.PointerEventHandler<HTMLElement> = useCallback(() => {\n if (!disabled) {\n onThumbPointerDown(currentValue)\n }\n }, [\n disabled,\n onThumbPointerDown,\n currentValue,\n ])\n\n const handlePointerUp: React.PointerEventHandler<HTMLElement> = useCallback(() => {\n if (!disabled) {\n onThumbPointerUp(currentValue)\n }\n }, [\n disabled,\n onThumbPointerUp,\n currentValue,\n ])\n\n return (\n <SliderPrimitive.Root\n asChild\n defaultValue={defaultValue}\n value={currentValue}\n disabled={disabled}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n minStepsBetweenThumbs={minStepsBetweenThumbs}\n >\n <Styled.SliderRoot\n width={width}\n disabled={disabled}\n ref={forwardedRef}\n data-testid={SLIDER_TEST_ID}\n {...rest}\n >\n <SliderPrimitive.Track asChild>\n <Styled.SliderTrack>\n <SliderPrimitive.Range asChild>\n <Styled.SliderRange />\n </SliderPrimitive.Range>\n </Styled.SliderTrack>\n </SliderPrimitive.Track>\n { guide?.map((guideValue) => (\n <Styled.SliderGuide\n key={`slider-guide-${guideValue}`}\n min={min}\n max={max}\n guideValue={guideValue}\n />\n )) }\n { currentValue.map((v, i) => (\n <SliderPrimitive.Thumb\n asChild\n // eslint-disable-next-line react/no-array-index-key\n key={`slider-thumb-${i}`}\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n >\n <Styled.SliderThumb\n data-testid={SLIDER_THUMB_TEST_ID}\n />\n </SliderPrimitive.Thumb>\n )) }\n </Styled.SliderRoot>\n </SliderPrimitive.Root>\n )\n})\n"],"names":["SLIDER_TEST_ID","SLIDER_THUMB_TEST_ID","Slider","forwardRef","width","guide","onThumbPointerDown","noop","onThumbPointerUp","defaultValue","value","disabled","min","max","step","onValueChange","minStepsBetweenThumbs","rest","forwardedRef","currentValue","setCurrentValue","useState","useEffect","updateCurrentValue","handleValueChange","useCallback","_value","handlePointerDown","handlePointerUp","React","createElement","SliderPrimitive","asChild","Styled","Object","assign","ref","map","guideValue","key","v","i","onPointerDown","onPointerUp"],"mappings":";;;;;;;AAeO,MAAMA,cAAc,GAAG,sBAAqB;AAC5C,MAAMC,oBAAoB,GAAG,4BAA2B;MAElDC,MAAM,gBAAGC,gBAAU,CAAC,SAASD,MAAMA,CAC9C;AACEE,EAAAA,KAAK,GAAG,EAAE;EACVC,KAAK;AACLC,EAAAA,kBAAkB,GAAGC,kBAAI;AACzBC,EAAAA,gBAAgB,GAAGD,kBAAI;EACvBE,YAAY,GAAG,CAAC,CAAC,CAAC;EAClBC,KAAK;AACLC,EAAAA,QAAQ,GAAG,KAAK;AAChBC,EAAAA,GAAG,GAAG,CAAC;AACPC,EAAAA,GAAG,GAAG,EAAE;AACRC,EAAAA,IAAI,GAAG,CAAC;AACRC,EAAAA,aAAa,GAAGR,kBAAI;AACpBS,EAAAA,qBAAqB,GAAG,CAAC;EACzB,GAAGC,IAAAA;AACQ,CAAC,EACdC,YAAuC,EACvC;EACA,MAAM,CAACC,YAAY,EAAEC,eAAe,CAAC,GAAGC,cAAQ,CAAWX,KAAK,IAAID,YAAY,CAAC,CAAA;AAEjFa,EAAAA,eAAS,CAAC,SAASC,kBAAkBA,GAAG;AACtC,IAAA,IAAIb,KAAK,EAAE;MACTU,eAAe,CAACV,KAAK,CAAC,CAAA;MACtBK,aAAa,CAACL,KAAK,CAAC,CAAA;AACtB,KAAA;AACF,GAAC,EAAE,CACDA,KAAK,EACLK,aAAa,CACd,CAAC,CAAA;AAEF,EAAA,MAAMS,iBAA4C,GAAGC,iBAAW,CAAEC,MAAM,IAAK;IAC3EN,eAAe,CAACM,MAAM,CAAC,CAAA;IACvBX,aAAa,CAACW,MAAM,CAAC,CAAA;AACvB,GAAC,EAAE,CAACX,aAAa,CAAC,CAAC,CAAA;AAEnB,EAAA,MAAMY,iBAAyD,GAAGF,iBAAW,CAAC,MAAM;IAClF,IAAI,CAACd,QAAQ,EAAE;MACbL,kBAAkB,CAACa,YAAY,CAAC,CAAA;AAClC,KAAA;GACD,EAAE,CACDR,QAAQ,EACRL,kBAAkB,EAClBa,YAAY,CACb,CAAC,CAAA;AAEF,EAAA,MAAMS,eAAuD,GAAGH,iBAAW,CAAC,MAAM;IAChF,IAAI,CAACd,QAAQ,EAAE;MACbH,gBAAgB,CAACW,YAAY,CAAC,CAAA;AAChC,KAAA;GACD,EAAE,CACDR,QAAQ,EACRH,gBAAgB,EAChBW,YAAY,CACb,CAAC,CAAA;AAEF,EAAA,oBACEU,KAAA,CAAAC,aAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../../../src/components/Forms/Slider/Slider.tsx"],"sourcesContent":["import React, {\n forwardRef,\n useCallback,\n useEffect,\n useState,\n} from 'react'\n\nimport * as SliderPrimitive from '@radix-ui/react-slider'\n\nimport { noop } from '~/src/utils/functionUtils'\n\nimport type SliderProps from './Slider.types'\n\nimport * as Styled from './Slider.styled'\n\nexport const SLIDER_TEST_ID = 'bezier-react-slider'\nexport const SLIDER_THUMB_TEST_ID = 'bezier-react-slider-thumb'\n\nexport const Slider = forwardRef(function Slider(\n {\n width = 36,\n guide,\n onThumbPointerDown = noop,\n onThumbPointerUp = noop,\n defaultValue = [5],\n value,\n disabled = false,\n min = 0,\n max = 10,\n step = 1,\n onValueChange = noop,\n minStepsBetweenThumbs = 0,\n ...rest\n }: SliderProps,\n forwardedRef: React.Ref<HTMLDivElement>,\n) {\n const [currentValue, setCurrentValue] = useState<number[]>(value ?? defaultValue)\n\n useEffect(function updateCurrentValue() {\n if (value) {\n setCurrentValue(value)\n onValueChange(value)\n }\n }, [\n value,\n onValueChange,\n ])\n\n const handleValueChange: (value: number[]) => void = useCallback((_value) => {\n setCurrentValue(_value)\n onValueChange(_value)\n }, [onValueChange])\n\n const handlePointerDown: React.PointerEventHandler<HTMLElement> = useCallback(() => {\n if (!disabled) {\n onThumbPointerDown(currentValue)\n }\n }, [\n disabled,\n onThumbPointerDown,\n currentValue,\n ])\n\n const handlePointerUp: React.PointerEventHandler<HTMLElement> = useCallback(() => {\n if (!disabled) {\n onThumbPointerUp(currentValue)\n }\n }, [\n disabled,\n onThumbPointerUp,\n currentValue,\n ])\n\n return (\n <SliderPrimitive.Root\n asChild\n defaultValue={defaultValue}\n value={currentValue}\n disabled={disabled}\n min={min}\n max={max}\n step={step}\n onValueChange={handleValueChange}\n minStepsBetweenThumbs={minStepsBetweenThumbs}\n >\n <Styled.SliderRoot\n width={width}\n disabled={disabled}\n ref={forwardedRef}\n data-testid={SLIDER_TEST_ID}\n {...rest}\n >\n <SliderPrimitive.Track asChild>\n <Styled.SliderTrack>\n <SliderPrimitive.Range asChild>\n <Styled.SliderRange />\n </SliderPrimitive.Range>\n </Styled.SliderTrack>\n </SliderPrimitive.Track>\n { guide?.map((guideValue) => (\n <Styled.SliderGuide\n key={`slider-guide-${guideValue}`}\n min={min}\n max={max}\n guideValue={guideValue}\n />\n )) }\n { currentValue.map((v, i) => (\n <SliderPrimitive.Thumb\n asChild\n // eslint-disable-next-line react/no-array-index-key\n key={`slider-thumb-${i}`}\n onPointerDown={handlePointerDown}\n onPointerUp={handlePointerUp}\n >\n <Styled.SliderThumb\n data-testid={SLIDER_THUMB_TEST_ID}\n />\n </SliderPrimitive.Thumb>\n )) }\n </Styled.SliderRoot>\n </SliderPrimitive.Root>\n )\n})\n"],"names":["SLIDER_TEST_ID","SLIDER_THUMB_TEST_ID","Slider","forwardRef","width","guide","onThumbPointerDown","noop","onThumbPointerUp","defaultValue","value","disabled","min","max","step","onValueChange","minStepsBetweenThumbs","rest","forwardedRef","currentValue","setCurrentValue","useState","useEffect","updateCurrentValue","handleValueChange","useCallback","_value","handlePointerDown","handlePointerUp","React","createElement","SliderPrimitive","asChild","Styled","Object","assign","ref","map","guideValue","key","v","i","onPointerDown","onPointerUp"],"mappings":";;;;;;;AAeO,MAAMA,cAAc,GAAG,sBAAqB;AAC5C,MAAMC,oBAAoB,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