@forgedevstack/bear 1.1.3 → 1.1.8
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/README.md +19 -0
- package/dist/components/ActionIcon/ActionIcon.cjs +1 -0
- package/dist/components/ActionIcon/ActionIcon.const.cjs +1 -0
- package/dist/components/ActionIcon/ActionIcon.const.d.ts +7 -0
- package/dist/components/ActionIcon/ActionIcon.const.js +68 -0
- package/dist/components/ActionIcon/ActionIcon.d.ts +4 -0
- package/dist/components/ActionIcon/ActionIcon.js +42 -0
- package/dist/components/ActionIcon/ActionIcon.types.d.ts +11 -0
- package/dist/components/ActionIcon/index.d.ts +2 -0
- package/dist/components/Affix/Affix.cjs +1 -0
- package/dist/components/Affix/Affix.const.cjs +1 -0
- package/dist/components/Affix/Affix.const.d.ts +6 -0
- package/dist/components/Affix/Affix.const.js +9 -0
- package/dist/components/Affix/Affix.d.ts +4 -0
- package/dist/components/Affix/Affix.js +69 -0
- package/dist/components/Affix/Affix.types.d.ts +10 -0
- package/dist/components/Affix/index.d.ts +2 -0
- package/dist/components/Anchor/Anchor.cjs +1 -0
- package/dist/components/Anchor/Anchor.const.cjs +1 -0
- package/dist/components/Anchor/Anchor.const.d.ts +9 -0
- package/dist/components/Anchor/Anchor.const.js +11 -0
- package/dist/components/Anchor/Anchor.d.ts +4 -0
- package/dist/components/Anchor/Anchor.js +83 -0
- package/dist/components/Anchor/Anchor.types.d.ts +16 -0
- package/dist/components/Anchor/Anchor.utils.cjs +1 -0
- package/dist/components/Anchor/Anchor.utils.d.ts +2 -0
- package/dist/components/Anchor/Anchor.utils.js +12 -0
- package/dist/components/Anchor/index.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +60 -67
- package/dist/components/Autocomplete/Autocomplete.utils.cjs +1 -0
- package/dist/components/Autocomplete/Autocomplete.utils.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.utils.js +12 -0
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.js +10 -11
- package/dist/components/Blockquote/Blockquote.cjs +1 -0
- package/dist/components/Blockquote/Blockquote.const.cjs +1 -0
- package/dist/components/Blockquote/Blockquote.const.d.ts +5 -0
- package/dist/components/Blockquote/Blockquote.const.js +19 -0
- package/dist/components/Blockquote/Blockquote.d.ts +4 -0
- package/dist/components/Blockquote/Blockquote.js +56 -0
- package/dist/components/Blockquote/Blockquote.types.d.ts +9 -0
- package/dist/components/Blockquote/index.d.ts +2 -0
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +2 -2
- package/dist/components/Button/Button.constants.d.ts +1 -0
- package/dist/components/Button/Button.constants.js +12 -5
- package/dist/components/Button/Button.d.ts +0 -27
- package/dist/components/Button/Button.js +93 -105
- package/dist/components/Button/Button.types.d.ts +1 -0
- package/dist/components/Button/Button.utils.cjs +1 -0
- package/dist/components/Button/Button.utils.d.ts +2 -0
- package/dist/components/Button/Button.utils.js +5 -0
- package/dist/components/Button/useSpotlight.cjs +1 -0
- package/dist/components/Button/useSpotlight.d.ts +21 -0
- package/dist/components/Button/useSpotlight.js +28 -0
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -0
- package/dist/components/Chart/Chart.const.js +21 -0
- package/dist/components/Chart/Chart.js +55 -71
- package/dist/components/Chart/Chart.utils.cjs +1 -0
- package/dist/components/Chart/Chart.utils.js +5 -0
- package/dist/components/CheckboxCard/CheckboxCard.cjs +1 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.cjs +1 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.d.ts +7 -0
- package/dist/components/CheckboxCard/CheckboxCard.const.js +22 -0
- package/dist/components/CheckboxCard/CheckboxCard.d.ts +5 -0
- package/dist/components/CheckboxCard/CheckboxCard.js +132 -0
- package/dist/components/CheckboxCard/CheckboxCard.types.d.ts +21 -0
- package/dist/components/CheckboxCard/index.d.ts +2 -0
- package/dist/components/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/ColorPicker/ColorPicker.const.cjs +1 -0
- package/dist/components/ColorPicker/ColorPicker.const.d.ts +26 -0
- package/dist/components/ColorPicker/ColorPicker.const.js +38 -0
- package/dist/components/ColorPicker/ColorPicker.js +61 -78
- package/dist/components/ColorSwatch/ColorSwatch.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.d.ts +16 -0
- package/dist/components/ColorSwatch/ColorSwatch.const.js +19 -0
- package/dist/components/ColorSwatch/ColorSwatch.d.ts +5 -0
- package/dist/components/ColorSwatch/ColorSwatch.js +92 -0
- package/dist/components/ColorSwatch/ColorSwatch.types.d.ts +23 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.cjs +1 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.d.ts +6 -0
- package/dist/components/ColorSwatch/ColorSwatch.utils.js +14 -0
- package/dist/components/ColorSwatch/index.d.ts +2 -0
- package/dist/components/Confetti/Confetti.cjs +1 -1
- package/dist/components/Confetti/Confetti.js +37 -34
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.const.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.const.d.ts +9 -0
- package/dist/components/ContextMenu/ContextMenu.const.js +12 -0
- package/dist/components/ContextMenu/ContextMenu.d.ts +4 -0
- package/dist/components/ContextMenu/ContextMenu.js +65 -0
- package/dist/components/ContextMenu/ContextMenu.types.d.ts +23 -0
- package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.utils.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenu.utils.js +4 -0
- package/dist/components/ContextMenu/index.d.ts +2 -0
- package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
- package/dist/components/CountdownTimer/CountdownTimer.js +62 -71
- package/dist/components/CountdownTimer/CountdownTimer.utils.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.utils.d.ts +3 -0
- package/dist/components/CountdownTimer/CountdownTimer.utils.js +16 -0
- package/dist/components/DateRangePicker/DateRangePicker.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.d.ts +27 -0
- package/dist/components/DateRangePicker/DateRangePicker.const.js +74 -0
- package/dist/components/DateRangePicker/DateRangePicker.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.js +115 -0
- package/dist/components/DateRangePicker/DateRangePicker.types.d.ts +26 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.cjs +1 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.d.ts +4 -0
- package/dist/components/DateRangePicker/DateRangePicker.utils.js +22 -0
- package/dist/components/DateRangePicker/index.d.ts +2 -0
- package/dist/components/Descriptions/Descriptions.cjs +1 -0
- package/dist/components/Descriptions/Descriptions.const.cjs +1 -0
- package/dist/components/Descriptions/Descriptions.const.d.ts +24 -0
- package/dist/components/Descriptions/Descriptions.const.js +27 -0
- package/dist/components/Descriptions/Descriptions.d.ts +4 -0
- package/dist/components/Descriptions/Descriptions.js +65 -0
- package/dist/components/Descriptions/Descriptions.types.d.ts +16 -0
- package/dist/components/Descriptions/index.d.ts +2 -0
- package/dist/components/Dock/Dock.cjs +1 -1
- package/dist/components/Dock/Dock.js +38 -43
- package/dist/components/Dock/Dock.utils.cjs +1 -0
- package/dist/components/Dock/Dock.utils.d.ts +1 -0
- package/dist/components/Dock/Dock.utils.js +10 -0
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +59 -60
- package/dist/components/Fieldset/Fieldset.cjs +1 -0
- package/dist/components/Fieldset/Fieldset.const.cjs +1 -0
- package/dist/components/Fieldset/Fieldset.const.d.ts +5 -0
- package/dist/components/Fieldset/Fieldset.const.js +16 -0
- package/dist/components/Fieldset/Fieldset.d.ts +4 -0
- package/dist/components/Fieldset/Fieldset.js +47 -0
- package/dist/components/Fieldset/Fieldset.types.d.ts +10 -0
- package/dist/components/Fieldset/index.d.ts +2 -0
- package/dist/components/FileTree/FileTree.cjs +1 -1
- package/dist/components/FileTree/FileTree.js +20 -32
- package/dist/components/FileTree/FileTree.utils.cjs +1 -0
- package/dist/components/FileTree/FileTree.utils.d.ts +4 -0
- package/dist/components/FileTree/FileTree.utils.js +15 -0
- package/dist/components/GradientText/GradientText.cjs +1 -1
- package/dist/components/GradientText/GradientText.js +27 -29
- package/dist/components/Icon/icons/bear.cjs +1 -0
- package/dist/components/Icon/icons/bear.d.ts +12 -0
- package/dist/components/Icon/icons/bear.js +47 -0
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +18 -0
- package/dist/components/Icon/index.js +17 -15
- package/dist/components/ImageGallery/ImageGallery.cjs +1 -0
- package/dist/components/ImageGallery/ImageGallery.const.cjs +1 -0
- package/dist/components/ImageGallery/ImageGallery.const.d.ts +13 -0
- package/dist/components/ImageGallery/ImageGallery.const.js +16 -0
- package/dist/components/ImageGallery/ImageGallery.d.ts +4 -0
- package/dist/components/ImageGallery/ImageGallery.js +61 -0
- package/dist/components/ImageGallery/ImageGallery.types.d.ts +22 -0
- package/dist/components/ImageGallery/index.d.ts +2 -0
- package/dist/components/Indicator/Indicator.cjs +1 -0
- package/dist/components/Indicator/Indicator.const.cjs +1 -0
- package/dist/components/Indicator/Indicator.const.d.ts +15 -0
- package/dist/components/Indicator/Indicator.const.js +26 -0
- package/dist/components/Indicator/Indicator.d.ts +4 -0
- package/dist/components/Indicator/Indicator.js +56 -0
- package/dist/components/Indicator/Indicator.types.d.ts +16 -0
- package/dist/components/Indicator/index.d.ts +2 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.d.ts +7 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.const.js +9 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.d.ts +4 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.js +51 -0
- package/dist/components/InfiniteScroll/InfiniteScroll.types.d.ts +13 -0
- package/dist/components/InfiniteScroll/index.d.ts +2 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +99 -66
- package/dist/components/Input/Input.types.d.ts +10 -0
- package/dist/components/Input/Input.utils.cjs +1 -0
- package/dist/components/Input/Input.utils.d.ts +2 -0
- package/dist/components/Input/Input.utils.js +15 -0
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.cjs +1 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.cjs +1 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.d.ts +6 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.const.js +9 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +4 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.js +42 -0
- package/dist/components/LoadingOverlay/LoadingOverlay.types.d.ts +11 -0
- package/dist/components/LoadingOverlay/index.d.ts +2 -0
- package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
- package/dist/components/MentionsInput/MentionsInput.js +64 -68
- package/dist/components/MentionsInput/MentionsInput.utils.cjs +1 -0
- package/dist/components/MentionsInput/MentionsInput.utils.d.ts +2 -0
- package/dist/components/MentionsInput/MentionsInput.utils.js +9 -0
- package/dist/components/NumberFormatter/NumberFormatter.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.d.ts +5 -0
- package/dist/components/NumberFormatter/NumberFormatter.const.js +8 -0
- package/dist/components/NumberFormatter/NumberFormatter.d.ts +4 -0
- package/dist/components/NumberFormatter/NumberFormatter.js +53 -0
- package/dist/components/NumberFormatter/NumberFormatter.types.d.ts +20 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.cjs +1 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.d.ts +2 -0
- package/dist/components/NumberFormatter/NumberFormatter.utils.js +19 -0
- package/dist/components/NumberFormatter/index.d.ts +2 -0
- package/dist/components/PageNav/PageNav.cjs +1 -0
- package/dist/components/PageNav/PageNav.const.cjs +1 -0
- package/dist/components/PageNav/PageNav.const.d.ts +22 -0
- package/dist/components/PageNav/PageNav.const.js +42 -0
- package/dist/components/PageNav/PageNav.d.ts +3 -0
- package/dist/components/PageNav/PageNav.js +81 -0
- package/dist/components/PageNav/PageNav.types.d.ts +17 -0
- package/dist/components/PageNav/index.d.ts +2 -0
- package/dist/components/Popconfirm/Popconfirm.cjs +1 -0
- package/dist/components/Popconfirm/Popconfirm.const.cjs +1 -0
- package/dist/components/Popconfirm/Popconfirm.const.d.ts +13 -0
- package/dist/components/Popconfirm/Popconfirm.const.js +20 -0
- package/dist/components/Popconfirm/Popconfirm.d.ts +4 -0
- package/dist/components/Popconfirm/Popconfirm.js +65 -0
- package/dist/components/Popconfirm/Popconfirm.types.d.ts +16 -0
- package/dist/components/Popconfirm/index.d.ts +2 -0
- package/dist/components/Progress/Progress.cjs +1 -1
- package/dist/components/Progress/Progress.js +6 -6
- package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.d.ts +11 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.js +23 -0
- package/dist/components/PropsPlayground/PropsPlayground.d.ts +3 -0
- package/dist/components/PropsPlayground/PropsPlayground.js +221 -0
- package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +29 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.d.ts +2 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.js +9 -0
- package/dist/components/PropsPlayground/index.d.ts +2 -0
- package/dist/components/RadioCard/RadioCard.cjs +1 -0
- package/dist/components/RadioCard/RadioCard.const.cjs +1 -0
- package/dist/components/RadioCard/RadioCard.const.d.ts +7 -0
- package/dist/components/RadioCard/RadioCard.const.js +22 -0
- package/dist/components/RadioCard/RadioCard.d.ts +5 -0
- package/dist/components/RadioCard/RadioCard.js +111 -0
- package/dist/components/RadioCard/RadioCard.types.d.ts +22 -0
- package/dist/components/RadioCard/index.d.ts +2 -0
- package/dist/components/Result/Result.cjs +1 -0
- package/dist/components/Result/Result.const.cjs +1 -0
- package/dist/components/Result/Result.const.d.ts +10 -0
- package/dist/components/Result/Result.const.js +20 -0
- package/dist/components/Result/Result.d.ts +4 -0
- package/dist/components/Result/Result.icons.cjs +1 -0
- package/dist/components/Result/Result.icons.d.ts +3 -0
- package/dist/components/Result/Result.icons.js +31 -0
- package/dist/components/Result/Result.js +35 -0
- package/dist/components/Result/Result.types.d.ts +10 -0
- package/dist/components/Result/index.d.ts +2 -0
- package/dist/components/RingProgress/RingProgress.cjs +1 -0
- package/dist/components/RingProgress/RingProgress.const.cjs +1 -0
- package/dist/components/RingProgress/RingProgress.const.d.ts +4 -0
- package/dist/components/RingProgress/RingProgress.const.js +7 -0
- package/dist/components/RingProgress/RingProgress.d.ts +4 -0
- package/dist/components/RingProgress/RingProgress.js +67 -0
- package/dist/components/RingProgress/RingProgress.types.d.ts +15 -0
- package/dist/components/RingProgress/index.d.ts +2 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +28 -30
- package/dist/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/SignPad/SignPad.const.cjs +1 -1
- package/dist/components/SignPad/SignPad.const.js +10 -11
- package/dist/components/SignPad/SignPad.d.ts +4 -6
- package/dist/components/SignPad/SignPad.js +114 -122
- package/dist/components/SignPad/SignPad.types.d.ts +2 -2
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.js +89 -94
- package/dist/components/Skeleton/Skeleton.utils.cjs +1 -0
- package/dist/components/Skeleton/Skeleton.utils.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.utils.js +10 -0
- package/dist/components/SliderRange/SliderRange.cjs +1 -1
- package/dist/components/SliderRange/SliderRange.js +61 -63
- package/dist/components/SliderRange/SliderRange.utils.cjs +1 -0
- package/dist/components/SliderRange/SliderRange.utils.d.ts +1 -0
- package/dist/components/SliderRange/SliderRange.utils.js +7 -0
- package/dist/components/SplitButton/SplitButton.cjs +1 -0
- package/dist/components/SplitButton/SplitButton.const.cjs +1 -0
- package/dist/components/SplitButton/SplitButton.const.d.ts +25 -0
- package/dist/components/SplitButton/SplitButton.const.js +27 -0
- package/dist/components/SplitButton/SplitButton.d.ts +4 -0
- package/dist/components/SplitButton/SplitButton.js +73 -0
- package/dist/components/SplitButton/SplitButton.types.d.ts +21 -0
- package/dist/components/SplitButton/index.d.ts +2 -0
- package/dist/components/Spoiler/Spoiler.cjs +1 -0
- package/dist/components/Spoiler/Spoiler.const.cjs +1 -0
- package/dist/components/Spoiler/Spoiler.const.d.ts +6 -0
- package/dist/components/Spoiler/Spoiler.const.js +9 -0
- package/dist/components/Spoiler/Spoiler.d.ts +4 -0
- package/dist/components/Spoiler/Spoiler.js +59 -0
- package/dist/components/Spoiler/Spoiler.types.d.ts +10 -0
- package/dist/components/Spoiler/index.d.ts +2 -0
- package/dist/components/Spotlight/Spotlight.cjs +1 -1
- package/dist/components/Spotlight/Spotlight.js +62 -73
- package/dist/components/Spotlight/Spotlight.utils.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.utils.d.ts +3 -0
- package/dist/components/Spotlight/Spotlight.utils.js +18 -0
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +39 -38
- package/dist/components/Tabs/Tabs.types.d.ts +3 -1
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.cjs +1 -1
- package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.js +63 -57
- package/dist/components/TimePicker/helpers/ClockFaceSvg.cjs +1 -1
- package/dist/components/TimePicker/helpers/ClockFaceSvg.d.ts +0 -7
- package/dist/components/TimePicker/helpers/ClockFaceSvg.js +32 -31
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +18 -17
- package/dist/components/Toast/Toast.utils.cjs +1 -0
- package/dist/components/Toast/Toast.utils.d.ts +1 -0
- package/dist/components/Toast/Toast.utils.js +4 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +10 -11
- package/dist/components/Tour/Tour.cjs +1 -1
- package/dist/components/Tour/Tour.js +1 -2
- package/dist/components/TreeSelect/TreeSelect.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.const.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.const.d.ts +19 -0
- package/dist/components/TreeSelect/TreeSelect.const.js +22 -0
- package/dist/components/TreeSelect/TreeSelect.d.ts +4 -0
- package/dist/components/TreeSelect/TreeSelect.js +128 -0
- package/dist/components/TreeSelect/TreeSelect.types.d.ts +25 -0
- package/dist/components/TreeSelect/TreeSelect.utils.cjs +1 -0
- package/dist/components/TreeSelect/TreeSelect.utils.d.ts +5 -0
- package/dist/components/TreeSelect/TreeSelect.utils.js +25 -0
- package/dist/components/TreeSelect/index.d.ts +2 -0
- package/dist/components/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.js +38 -43
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +48 -0
- package/dist/components/index.js +351 -300
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +60 -58
- package/dist/hooks/useResizeObserver/index.d.ts +2 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.cjs +1 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +3 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.js +20 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.types.d.ts +8 -0
- package/dist/icons.cjs +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +443 -390
- package/dist/postcss/bear-plugin.cjs +86 -0
- package/dist/styles/_alerts.css +14 -0
- package/dist/styles/_base.css +60 -0
- package/dist/styles/_buttons.css +108 -0
- package/dist/styles/_effects.css +90 -0
- package/dist/styles/_marquee.css +25 -0
- package/dist/styles/main.css +5 -0
- package/dist/styles.css +1 -1
- package/package.json +15 -3
|
@@ -1,100 +1,89 @@
|
|
|
1
|
-
import { jsxs as b, jsx as t
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { DEFAULT_PLACEHOLDER as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const i = s.toLowerCase();
|
|
8
|
-
return !!(l.label.toLowerCase().includes(i) || (o = l.description) != null && o.toLowerCase().includes(i) || (u = l.keywords) != null && u.some((y) => y.toLowerCase().includes(i)));
|
|
9
|
-
}, I = (l, s) => {
|
|
10
|
-
if (!s) return l;
|
|
11
|
-
const i = l.toLowerCase().indexOf(s.toLowerCase());
|
|
12
|
-
return i === -1 ? l : /* @__PURE__ */ b(G, { children: [
|
|
13
|
-
l.slice(0, i),
|
|
14
|
-
/* @__PURE__ */ t("mark", { className: "Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5", children: l.slice(i, i + s.length) }),
|
|
15
|
-
l.slice(i + s.length)
|
|
16
|
-
] });
|
|
17
|
-
}, ee = (l) => {
|
|
1
|
+
import { jsxs as b, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as u, useRef as B, useCallback as E, useEffect as f, useMemo as D } from "react";
|
|
3
|
+
import { cn as h } from "../../utils/cn.js";
|
|
4
|
+
import { DEFAULT_PLACEHOLDER as q, DEFAULT_SHORTCUT_KEY as G, DEFAULT_NOTHING_FOUND as P, DEFAULT_LIMIT as Y, FOCUS_DELAY as z, SPOTLIGHT_Z_INDEX as Q } from "./Spotlight.const.js";
|
|
5
|
+
import { matchAction as V, highlightText as T } from "./Spotlight.utils.js";
|
|
6
|
+
const ee = (I) => {
|
|
18
7
|
const {
|
|
19
|
-
actions:
|
|
20
|
-
open:
|
|
21
|
-
onOpenChange:
|
|
22
|
-
placeholder:
|
|
23
|
-
shortcutKey:
|
|
24
|
-
shortcutMod:
|
|
25
|
-
nothingFoundMessage:
|
|
26
|
-
highlightMatches:
|
|
27
|
-
limit:
|
|
28
|
-
filter:
|
|
8
|
+
actions: c,
|
|
9
|
+
open: L,
|
|
10
|
+
onOpenChange: g,
|
|
11
|
+
placeholder: A = q,
|
|
12
|
+
shortcutKey: k = G,
|
|
13
|
+
shortcutMod: _ = !0,
|
|
14
|
+
nothingFoundMessage: C = P,
|
|
15
|
+
highlightMatches: v = !0,
|
|
16
|
+
limit: p = Y,
|
|
17
|
+
filter: y,
|
|
29
18
|
className: O,
|
|
30
19
|
style: M,
|
|
31
|
-
testId:
|
|
32
|
-
} =
|
|
20
|
+
testId: U
|
|
21
|
+
} = I, [F, K] = u(!1), [l, w] = u(""), [n, d] = u(0), N = B(null), S = B(null), o = L ?? F, s = E(
|
|
33
22
|
(e) => {
|
|
34
|
-
K(e),
|
|
23
|
+
K(e), g == null || g(e), e || (w(""), d(0));
|
|
35
24
|
},
|
|
36
|
-
[
|
|
25
|
+
[g]
|
|
37
26
|
);
|
|
38
|
-
|
|
27
|
+
f(() => {
|
|
39
28
|
const e = (r) => {
|
|
40
|
-
(
|
|
29
|
+
(_ ? r.metaKey || r.ctrlKey : !0) && r.key.toLowerCase() === k.toLowerCase() && (r.preventDefault(), s(!o)), r.key === "Escape" && o && s(!1);
|
|
41
30
|
};
|
|
42
31
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
43
|
-
}, [
|
|
44
|
-
|
|
32
|
+
}, [k, _, o, s]), f(() => {
|
|
33
|
+
o && setTimeout(() => {
|
|
45
34
|
var e;
|
|
46
|
-
return (e =
|
|
47
|
-
},
|
|
48
|
-
}, [
|
|
49
|
-
const
|
|
35
|
+
return (e = N.current) == null ? void 0 : e.focus();
|
|
36
|
+
}, z);
|
|
37
|
+
}, [o]);
|
|
38
|
+
const i = D(() => y ? y(l, c).slice(0, p) : l ? c.filter((e) => V(e, l)).slice(0, p) : c.slice(0, p), [c, l, y, p]), R = D(() => {
|
|
50
39
|
const e = /* @__PURE__ */ new Map();
|
|
51
|
-
return
|
|
40
|
+
return i.forEach((r) => {
|
|
52
41
|
const a = r.group || "";
|
|
53
42
|
e.has(a) || e.set(a, []), e.get(a).push(r);
|
|
54
43
|
}), e;
|
|
55
|
-
}, [
|
|
44
|
+
}, [i]), H = E(
|
|
56
45
|
(e) => {
|
|
57
46
|
if (e.key === "ArrowDown")
|
|
58
|
-
e.preventDefault(),
|
|
47
|
+
e.preventDefault(), d((r) => Math.min(r + 1, i.length - 1));
|
|
59
48
|
else if (e.key === "ArrowUp")
|
|
60
|
-
e.preventDefault(),
|
|
61
|
-
else if (e.key === "Enter" &&
|
|
49
|
+
e.preventDefault(), d((r) => Math.max(r - 1, 0));
|
|
50
|
+
else if (e.key === "Enter" && i[n]) {
|
|
62
51
|
e.preventDefault();
|
|
63
|
-
const r =
|
|
64
|
-
r.disabled || (r.onTrigger(),
|
|
52
|
+
const r = i[n];
|
|
53
|
+
r.disabled || (r.onTrigger(), s(!1));
|
|
65
54
|
}
|
|
66
55
|
},
|
|
67
|
-
[
|
|
56
|
+
[i, n, s]
|
|
68
57
|
);
|
|
69
|
-
if (
|
|
70
|
-
const e =
|
|
58
|
+
if (f(() => {
|
|
59
|
+
const e = S.current;
|
|
71
60
|
if (!e) return;
|
|
72
61
|
const r = e.querySelector('[data-active="true"]');
|
|
73
62
|
r == null || r.scrollIntoView({ block: "nearest" });
|
|
74
|
-
}, [
|
|
75
|
-
let
|
|
63
|
+
}, [n]), !o) return null;
|
|
64
|
+
let x = -1;
|
|
76
65
|
return /* @__PURE__ */ b(
|
|
77
66
|
"div",
|
|
78
67
|
{
|
|
79
|
-
className:
|
|
68
|
+
className: h(
|
|
80
69
|
"Bear-Spotlight",
|
|
81
70
|
"bear-fixed bear-inset-0 bear-flex bear-items-start bear-justify-center bear-pt-[15vh]"
|
|
82
71
|
),
|
|
83
|
-
style: { zIndex:
|
|
84
|
-
"data-testid":
|
|
72
|
+
style: { zIndex: Q },
|
|
73
|
+
"data-testid": U,
|
|
85
74
|
children: [
|
|
86
75
|
/* @__PURE__ */ t(
|
|
87
76
|
"div",
|
|
88
77
|
{
|
|
89
78
|
className: "Bear-Spotlight__backdrop bear-absolute bear-inset-0 bear-bg-black/50 dark:bear-bg-black/70 bear-backdrop-blur-sm",
|
|
90
|
-
onClick: () =>
|
|
79
|
+
onClick: () => s(!1),
|
|
91
80
|
"aria-hidden": "true"
|
|
92
81
|
}
|
|
93
82
|
),
|
|
94
83
|
/* @__PURE__ */ b(
|
|
95
84
|
"div",
|
|
96
85
|
{
|
|
97
|
-
className:
|
|
86
|
+
className: h(
|
|
98
87
|
"Bear-Spotlight__dialog",
|
|
99
88
|
"bear-relative bear-w-full bear-max-w-[560px] bear-mx-4",
|
|
100
89
|
"bear-bg-white dark:bear-bg-gray-900",
|
|
@@ -127,15 +116,15 @@ const X = (l, s) => {
|
|
|
127
116
|
/* @__PURE__ */ t(
|
|
128
117
|
"input",
|
|
129
118
|
{
|
|
130
|
-
ref:
|
|
119
|
+
ref: N,
|
|
131
120
|
type: "text",
|
|
132
|
-
value:
|
|
121
|
+
value: l,
|
|
133
122
|
onChange: (e) => {
|
|
134
|
-
|
|
123
|
+
w(e.target.value), d(0);
|
|
135
124
|
},
|
|
136
125
|
onKeyDown: H,
|
|
137
|
-
placeholder:
|
|
138
|
-
className:
|
|
126
|
+
placeholder: A,
|
|
127
|
+
className: h(
|
|
139
128
|
"Bear-Spotlight__input",
|
|
140
129
|
"bear-flex-1 bear-bg-transparent bear-outline-none bear-text-base",
|
|
141
130
|
"bear-text-gray-900 dark:bear-text-white",
|
|
@@ -150,39 +139,39 @@ const X = (l, s) => {
|
|
|
150
139
|
/* @__PURE__ */ b(
|
|
151
140
|
"div",
|
|
152
141
|
{
|
|
153
|
-
ref:
|
|
142
|
+
ref: S,
|
|
154
143
|
className: "Bear-Spotlight__results bear-max-h-[400px] bear-overflow-y-auto bear-py-2",
|
|
155
144
|
role: "listbox",
|
|
156
145
|
children: [
|
|
157
|
-
|
|
146
|
+
i.length === 0 && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__empty bear-px-4 bear-py-8 bear-text-center bear-text-gray-500 dark:bear-text-gray-400 bear-text-sm", children: C }),
|
|
158
147
|
Array.from(R.entries()).map(([e, r]) => /* @__PURE__ */ b("div", { className: "Bear-Spotlight__group", children: [
|
|
159
148
|
e && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__group-title bear-px-4 bear-py-1.5 bear-text-xs bear-font-semibold bear-uppercase bear-tracking-wider bear-text-gray-400 dark:bear-text-gray-500", children: e }),
|
|
160
149
|
r.map((a) => {
|
|
161
|
-
|
|
162
|
-
const
|
|
150
|
+
x++;
|
|
151
|
+
const m = x === n, j = x;
|
|
163
152
|
return /* @__PURE__ */ b(
|
|
164
153
|
"button",
|
|
165
154
|
{
|
|
166
|
-
className:
|
|
155
|
+
className: h(
|
|
167
156
|
"Bear-Spotlight__action",
|
|
168
157
|
"bear-w-full bear-flex bear-items-center bear-gap-3 bear-px-4 bear-py-2.5 bear-text-left bear-cursor-pointer",
|
|
169
158
|
"bear-transition-colors bear-duration-100",
|
|
170
|
-
|
|
159
|
+
m ? "bear-bg-gray-100 dark:bear-bg-gray-800" : "hover:bear-bg-gray-50 dark:hover:bear-bg-gray-800/50",
|
|
171
160
|
a.disabled && "bear-opacity-50 bear-cursor-not-allowed"
|
|
172
161
|
),
|
|
173
|
-
"data-active":
|
|
174
|
-
onMouseEnter: () =>
|
|
162
|
+
"data-active": m,
|
|
163
|
+
onMouseEnter: () => d(j),
|
|
175
164
|
onClick: () => {
|
|
176
|
-
a.disabled || (a.onTrigger(),
|
|
165
|
+
a.disabled || (a.onTrigger(), s(!1));
|
|
177
166
|
},
|
|
178
167
|
role: "option",
|
|
179
|
-
"aria-selected":
|
|
168
|
+
"aria-selected": m,
|
|
180
169
|
"aria-disabled": a.disabled,
|
|
181
170
|
children: [
|
|
182
171
|
a.icon && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-icon bear-text-gray-500 dark:bear-text-gray-400 bear-shrink-0", children: a.icon }),
|
|
183
172
|
/* @__PURE__ */ b("div", { className: "Bear-Spotlight__action-body bear-flex-1 bear-min-w-0", children: [
|
|
184
|
-
/* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate", children:
|
|
185
|
-
a.description && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate", children:
|
|
173
|
+
/* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-label bear-text-sm bear-font-medium bear-text-gray-900 dark:bear-text-white bear-truncate", children: v ? T(a.label, l) : a.label }),
|
|
174
|
+
a.description && /* @__PURE__ */ t("div", { className: "Bear-Spotlight__action-desc bear-text-xs bear-text-gray-500 dark:bear-text-gray-400 bear-truncate", children: v ? T(a.description, l) : a.description })
|
|
186
175
|
] }),
|
|
187
176
|
a.rightSection && /* @__PURE__ */ t("span", { className: "Bear-Spotlight__action-right bear-shrink-0", children: a.rightSection })
|
|
188
177
|
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),l=(e,t)=>{var s,o;const r=t.toLowerCase();return!!(e.label.toLowerCase().includes(r)||(s=e.description)!=null&&s.toLowerCase().includes(r)||(o=e.keywords)!=null&&o.some(n=>n.toLowerCase().includes(r)))},a=(e,t)=>{if(!t)return e;const r=e.toLowerCase().indexOf(t.toLowerCase());return r===-1?e:i.jsxs(i.Fragment,{children:[e.slice(0,r),i.jsx("mark",{className:"Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5",children:e.slice(r,r+t.length)}),e.slice(r+t.length)]})};exports.highlightText=a;exports.matchAction=l;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsxs as n, Fragment as l, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
const h = (e, s) => {
|
|
3
|
+
var o, i;
|
|
4
|
+
const r = s.toLowerCase();
|
|
5
|
+
return !!(e.label.toLowerCase().includes(r) || (o = e.description) != null && o.toLowerCase().includes(r) || (i = e.keywords) != null && i.some((t) => t.toLowerCase().includes(r)));
|
|
6
|
+
}, d = (e, s) => {
|
|
7
|
+
if (!s) return e;
|
|
8
|
+
const r = e.toLowerCase().indexOf(s.toLowerCase());
|
|
9
|
+
return r === -1 ? e : /* @__PURE__ */ n(l, { children: [
|
|
10
|
+
e.slice(0, r),
|
|
11
|
+
/* @__PURE__ */ a("mark", { className: "Bear-Spotlight__highlight bear-bg-yellow-200 dark:bear-bg-yellow-800 bear-text-inherit bear-rounded-sm bear-px-0.5", children: e.slice(r, r + s.length) }),
|
|
12
|
+
e.slice(r + s.length)
|
|
13
|
+
] });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
d as highlightText,
|
|
17
|
+
h as matchAction
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),i=require("react"),n=require("../../utils/cn.cjs"),d=i.createContext(null),v=({children:a,value:t,defaultTab:r,variant:e="line",onChange:b,className:l,testId:x})=>{const[T,s]=i.useState(r),c=t!==void 0,g=c?t:T,y=u=>{c||s(u),b==null||b(u)};return o.jsx(d.Provider,{value:{activeTab:g,setActiveTab:y,variant:e},children:o.jsx("div",{className:n.cn("Bear-Tabs",l),"data-testid":x,children:a})})},h=({children:a,className:t})=>{const r=i.useContext(d);if(!r)throw new Error("TabList must be used within Tabs");const{variant:e}=r;return o.jsx("div",{role:"tablist",className:n.cn("Bear-Tabs__list",`Bear-Tabs__list--${e}`,"bear-flex bear-gap-1",e==="line"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",e==="pills"&&"bear-bg-gray-100 dark:bear-bg-gray-800 bear-p-1 bear-rounded-lg",e==="enclosed"&&"bear-border-b bear-border-gray-200 dark:bear-border-gray-700",t),children:a})},p=({id:a,children:t,disabled:r=!1,icon:e})=>{const b=i.useContext(d);if(!b)throw new Error("Tab must be used within Tabs");const{activeTab:l,setActiveTab:x,variant:T}=b,s=l===a,c="bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors",g={line:n.cn("bear-border-b-2 bear--mb-px",s?"bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400":"bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"),pills:n.cn("bear-rounded-md",s?"bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"),enclosed:n.cn("bear-rounded-t-lg bear-border bear-border-transparent",s?"bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white":"bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white")};return o.jsxs("button",{role:"tab","aria-selected":s,disabled:r,onClick:()=>!r&&x(a),className:n.cn("Bear-Tabs__tab",s&&"Bear-Tabs__tab--active",c,g[T],r&&"Bear-Tabs__tab--disabled bear-opacity-50 bear-cursor-not-allowed"),children:[e&&o.jsx("span",{className:"Bear-Tabs__tab-icon",children:e}),o.jsx("span",{className:"Bear-Tabs__tab-label",children:t})]})},k=({tabId:a,children:t,className:r})=>{const e=i.useContext(d);if(!e)throw new Error("TabPanel must be used within Tabs");const{activeTab:b}=e;return b!==a?null:o.jsx("div",{role:"tabpanel",className:n.cn("Bear-Tabs__panel bear-py-4",r),children:t})};exports.Tab=p;exports.TabList=h;exports.TabPanel=k;exports.Tabs=v;
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { cn as
|
|
4
|
-
const d =
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as v, useContext as T, useState as h } from "react";
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
|
+
const d = v(null), _ = ({
|
|
5
5
|
children: a,
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
value: t,
|
|
7
|
+
defaultTab: e,
|
|
8
|
+
variant: r = "line",
|
|
9
|
+
onChange: b,
|
|
10
|
+
className: l,
|
|
10
11
|
testId: c
|
|
11
12
|
}) => {
|
|
12
|
-
const [
|
|
13
|
-
|
|
13
|
+
const [x, s] = h(e), i = t !== void 0, g = i ? t : x, p = (y) => {
|
|
14
|
+
i || s(y), b == null || b(y);
|
|
14
15
|
};
|
|
15
|
-
return /* @__PURE__ */ n(d.Provider, { value: { activeTab:
|
|
16
|
-
},
|
|
17
|
-
const e =
|
|
16
|
+
return /* @__PURE__ */ n(d.Provider, { value: { activeTab: g, setActiveTab: p, variant: r }, children: /* @__PURE__ */ n("div", { className: o("Bear-Tabs", l), "data-testid": c, children: a }) });
|
|
17
|
+
}, f = ({ children: a, className: t }) => {
|
|
18
|
+
const e = T(d);
|
|
18
19
|
if (!e) throw new Error("TabList must be used within Tabs");
|
|
19
20
|
const { variant: r } = e;
|
|
20
21
|
return /* @__PURE__ */ n(
|
|
21
22
|
"div",
|
|
22
23
|
{
|
|
23
24
|
role: "tablist",
|
|
24
|
-
className:
|
|
25
|
+
className: o(
|
|
25
26
|
"Bear-Tabs__list",
|
|
26
27
|
`Bear-Tabs__list--${r}`,
|
|
27
28
|
"bear-flex bear-gap-1",
|
|
@@ -33,35 +34,35 @@ const d = p(null), k = ({
|
|
|
33
34
|
children: a
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
|
-
},
|
|
37
|
-
const
|
|
38
|
-
if (!
|
|
39
|
-
const { activeTab:
|
|
40
|
-
line:
|
|
37
|
+
}, B = ({ id: a, children: t, disabled: e = !1, icon: r }) => {
|
|
38
|
+
const b = T(d);
|
|
39
|
+
if (!b) throw new Error("Tab must be used within Tabs");
|
|
40
|
+
const { activeTab: l, setActiveTab: c, variant: x } = b, s = l === a, i = "bear-flex bear-items-center bear-gap-2 bear-px-4 bear-py-2 bear-text-sm bear-font-medium bear-transition-colors", g = {
|
|
41
|
+
line: o(
|
|
41
42
|
"bear-border-b-2 bear--mb-px",
|
|
42
|
-
|
|
43
|
+
s ? "bear-border-pink-500 bear-text-pink-600 dark:bear-text-pink-400" : "bear-border-transparent bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white hover:bear-border-gray-300"
|
|
43
44
|
),
|
|
44
|
-
pills:
|
|
45
|
+
pills: o(
|
|
45
46
|
"bear-rounded-md",
|
|
46
|
-
|
|
47
|
+
s ? "bear-bg-white dark:bear-bg-gray-700 bear-text-gray-900 dark:bear-text-white bear-shadow-sm" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
|
|
47
48
|
),
|
|
48
|
-
enclosed:
|
|
49
|
+
enclosed: o(
|
|
49
50
|
"bear-rounded-t-lg bear-border bear-border-transparent",
|
|
50
|
-
|
|
51
|
+
s ? "bear-bg-white dark:bear-bg-gray-900 bear-border-gray-200 dark:bear-border-gray-700 bear-border-b-white dark:bear-border-b-gray-900 bear--mb-px bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-600 dark:bear-text-gray-400 hover:bear-text-gray-900 dark:hover:bear-text-white"
|
|
51
52
|
)
|
|
52
53
|
};
|
|
53
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ m(
|
|
54
55
|
"button",
|
|
55
56
|
{
|
|
56
57
|
role: "tab",
|
|
57
|
-
"aria-selected":
|
|
58
|
+
"aria-selected": s,
|
|
58
59
|
disabled: e,
|
|
59
|
-
onClick: () => !e &&
|
|
60
|
-
className:
|
|
60
|
+
onClick: () => !e && c(a),
|
|
61
|
+
className: o(
|
|
61
62
|
"Bear-Tabs__tab",
|
|
62
|
-
|
|
63
|
+
s && "Bear-Tabs__tab--active",
|
|
63
64
|
i,
|
|
64
|
-
|
|
65
|
+
g[x],
|
|
65
66
|
e && "Bear-Tabs__tab--disabled bear-opacity-50 bear-cursor-not-allowed"
|
|
66
67
|
),
|
|
67
68
|
children: [
|
|
@@ -70,15 +71,15 @@ const d = p(null), k = ({
|
|
|
70
71
|
]
|
|
71
72
|
}
|
|
72
73
|
);
|
|
73
|
-
},
|
|
74
|
-
const r =
|
|
74
|
+
}, N = ({ tabId: a, children: t, className: e }) => {
|
|
75
|
+
const r = T(d);
|
|
75
76
|
if (!r) throw new Error("TabPanel must be used within Tabs");
|
|
76
|
-
const { activeTab:
|
|
77
|
-
return
|
|
77
|
+
const { activeTab: b } = r;
|
|
78
|
+
return b !== a ? null : /* @__PURE__ */ n("div", { role: "tabpanel", className: o("Bear-Tabs__panel bear-py-4", e), children: t });
|
|
78
79
|
};
|
|
79
80
|
export {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
81
|
+
B as Tab,
|
|
82
|
+
f as TabList,
|
|
83
|
+
N as TabPanel,
|
|
84
|
+
_ as Tabs
|
|
84
85
|
};
|
|
@@ -7,7 +7,9 @@ export interface TabsContextValue {
|
|
|
7
7
|
export interface TabsProps {
|
|
8
8
|
/** Tab panels */
|
|
9
9
|
children: ReactNode;
|
|
10
|
-
/**
|
|
10
|
+
/** Controlled active tab (when set, defaultTab is ignored) */
|
|
11
|
+
value?: string;
|
|
12
|
+
/** Default active tab (uncontrolled) */
|
|
11
13
|
defaultTab: string;
|
|
12
14
|
/** Visual variant */
|
|
13
15
|
variant?: 'line' | 'pills' | 'enclosed';
|
package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),u=require("react"),n=require("../../../../utils/cn.cjs"),i=require("../../TimePicker.constants.cjs"),v=require("../../helpers/ClockFaceSvg.cjs"),m="bear-text-blue-600 dark:bear-text-blue-400 bear-font-bold bear-bg-blue-50 dark:bear-bg-blue-900/30 bear-rounded bear-px-1",_="bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-300 bear-cursor-pointer bear-px-1",D=({selectedHour:c,setSelectedHour:o,selectedMinute:d,setSelectedMinute:x,period:k,setPeriod:T,format:a,hours:S,minutes:h,timeValue:p,clearable:E,onChange:l,onConfirm:C,onClose:N,translations:P})=>{const[I,s]=u.useState("hour"),b={...i.TIMEPICKER_DEFAULT_TRANSLATIONS,...P},j=a==="12h"?c===12?12:c%12:c,y=d,g=j.toString().padStart(2,"0"),A=y.toString().padStart(2,"0"),M=a==="12h"?[...i.CLOCK_HOURS_12]:S,t=I==="hour",O=t?M:h,R=u.useCallback(r=>{t?(o(a==="12h"&&r===0?12:r),s("minute")):x(r)},[t,a,o,x]);return e.jsxs("div",{className:n.cn(i.TIMEPICKER_DROPDOWN_CLASSES,"Bear-TimePicker__dial bear-w-72"),children:[e.jsx("div",{className:"Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2",children:b.selectTime}),e.jsxs("div",{className:"Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-1 bear-mb-4",children:[e.jsx("button",{type:"button",onClick:()=>s("hour"),className:n.cn("Bear-TimePicker__dial-hour-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",t?m:_),"aria-label":b.hour,children:g}),e.jsx("span",{className:"bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white",children:":"}),e.jsx("button",{type:"button",onClick:()=>s("minute"),className:n.cn("Bear-TimePicker__dial-minute-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",t?_:m),"aria-label":b.minute,children:A}),a==="12h"&&e.jsx("div",{className:"Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5 bear-ml-2",children:["AM","PM"].map(r=>e.jsx("button",{onClick:()=>T(r),className:n.cn("Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",k===r?"bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium":"bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"),children:r},r))})]}),e.jsx("div",{className:"Bear-TimePicker__dial-face bear-relative bear-w-48 bear-h-48 bear-mx-auto bear-mb-4",children:e.jsx(v.ClockFaceSvg,{values:O,isHourMode:t,format:a,selectedHour:c,selectedMinute:d,onSelect:R})}),e.jsxs("div",{className:i.TIMEPICKER_FOOTER_CLASSES,children:[E&&p&&e.jsx("button",{onClick:()=>{l==null||l(null),N()},className:i.TIMEPICKER_CLEAR_BUTTON_CLASSES,children:b.cancel}),e.jsx("button",{onClick:C,className:i.TIMEPICKER_CONFIRM_BUTTON_CLASSES,children:b.ok})]})]})};exports.TimePickerDialDropdown=D;
|
package/dist/components/TimePicker/components/TimePickerDialDropdown/TimePickerDialDropdown.js
CHANGED
|
@@ -1,84 +1,90 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { TIMEPICKER_DEFAULT_TRANSLATIONS as
|
|
5
|
-
import { ClockFaceSvg as
|
|
6
|
-
const
|
|
7
|
-
selectedHour:
|
|
8
|
-
setSelectedHour:
|
|
9
|
-
selectedMinute:
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useCallback as v } from "react";
|
|
3
|
+
import { cn as o } from "../../../../utils/cn.js";
|
|
4
|
+
import { TIMEPICKER_DEFAULT_TRANSLATIONS as B, CLOCK_HOURS_12 as L, TIMEPICKER_FOOTER_CLASSES as D, TIMEPICKER_CLEAR_BUTTON_CLASSES as K, TIMEPICKER_CONFIRM_BUTTON_CLASSES as z, TIMEPICKER_DROPDOWN_CLASSES as w } from "../../TimePicker.constants.js";
|
|
5
|
+
import { ClockFaceSvg as F } from "../../helpers/ClockFaceSvg.js";
|
|
6
|
+
const x = "bear-text-blue-600 dark:bear-text-blue-400 bear-font-bold bear-bg-blue-50 dark:bear-bg-blue-900/30 bear-rounded bear-px-1", _ = "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-300 bear-cursor-pointer bear-px-1", G = ({
|
|
7
|
+
selectedHour: i,
|
|
8
|
+
setSelectedHour: s,
|
|
9
|
+
selectedMinute: d,
|
|
10
10
|
setSelectedMinute: m,
|
|
11
|
-
period:
|
|
12
|
-
setPeriod:
|
|
11
|
+
period: u,
|
|
12
|
+
setPeriod: k,
|
|
13
13
|
format: a,
|
|
14
|
-
hours:
|
|
14
|
+
hours: p,
|
|
15
15
|
minutes: h,
|
|
16
|
-
timeValue:
|
|
17
|
-
clearable:
|
|
18
|
-
onChange:
|
|
19
|
-
onConfirm:
|
|
20
|
-
onClose:
|
|
16
|
+
timeValue: T,
|
|
17
|
+
clearable: S,
|
|
18
|
+
onChange: l,
|
|
19
|
+
onConfirm: E,
|
|
20
|
+
onClose: C,
|
|
21
21
|
translations: N
|
|
22
22
|
}) => {
|
|
23
|
-
const [
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
"button",
|
|
30
|
-
{
|
|
31
|
-
onClick: () => _(r),
|
|
32
|
-
className: s(
|
|
33
|
-
"Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",
|
|
34
|
-
k === r ? "bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium" : "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"
|
|
35
|
-
),
|
|
36
|
-
children: r
|
|
37
|
-
},
|
|
38
|
-
r
|
|
39
|
-
)) })
|
|
40
|
-
] }),
|
|
41
|
-
/* @__PURE__ */ i("div", { className: "Bear-TimePicker__dial-mode bear-flex bear-items-center bear-justify-center bear-gap-2 bear-mb-2", children: [
|
|
23
|
+
const [I, c] = R("hour"), b = { ...B, ...N }, P = a === "12h" ? i === 12 ? 12 : i % 12 : i, y = d, A = P.toString().padStart(2, "0"), M = y.toString().padStart(2, "0"), O = a === "12h" ? [...L] : p, t = I === "hour", f = t ? O : h, g = v((r) => {
|
|
24
|
+
t ? (s(a === "12h" && r === 0 ? 12 : r), c("minute")) : m(r);
|
|
25
|
+
}, [t, a, s, m]);
|
|
26
|
+
return /* @__PURE__ */ n("div", { className: o(w, "Bear-TimePicker__dial bear-w-72"), children: [
|
|
27
|
+
/* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-title bear-text-center bear-uppercase bear-text-xs bear-text-gray-500 dark:bear-text-zinc-400 bear-mb-2", children: b.selectTime }),
|
|
28
|
+
/* @__PURE__ */ n("div", { className: "Bear-TimePicker__dial-display bear-flex bear-items-center bear-justify-center bear-gap-1 bear-mb-4", children: [
|
|
42
29
|
/* @__PURE__ */ e(
|
|
43
30
|
"button",
|
|
44
31
|
{
|
|
45
32
|
type: "button",
|
|
46
|
-
onClick: () =>
|
|
47
|
-
className:
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
onClick: () => c("hour"),
|
|
34
|
+
className: o(
|
|
35
|
+
"Bear-TimePicker__dial-hour-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",
|
|
36
|
+
t ? x : _
|
|
37
|
+
),
|
|
38
|
+
"aria-label": b.hour,
|
|
39
|
+
children: A
|
|
50
40
|
}
|
|
51
41
|
),
|
|
42
|
+
/* @__PURE__ */ e("span", { className: "bear-text-2xl bear-font-bold bear-text-gray-900 dark:bear-text-white", children: ":" }),
|
|
52
43
|
/* @__PURE__ */ e(
|
|
53
44
|
"button",
|
|
54
45
|
{
|
|
55
46
|
type: "button",
|
|
56
|
-
onClick: () =>
|
|
57
|
-
className:
|
|
58
|
-
|
|
59
|
-
|
|
47
|
+
onClick: () => c("minute"),
|
|
48
|
+
className: o(
|
|
49
|
+
"Bear-TimePicker__dial-minute-btn bear-text-2xl bear-font-bold bear-transition-colors bear-border-none bear-bg-transparent",
|
|
50
|
+
t ? _ : x
|
|
51
|
+
),
|
|
52
|
+
"aria-label": b.minute,
|
|
53
|
+
children: M
|
|
60
54
|
}
|
|
61
|
-
)
|
|
55
|
+
),
|
|
56
|
+
a === "12h" && /* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-period bear-flex bear-flex-col bear-gap-0.5 bear-ml-2", children: ["AM", "PM"].map((r) => /* @__PURE__ */ e(
|
|
57
|
+
"button",
|
|
58
|
+
{
|
|
59
|
+
onClick: () => k(r),
|
|
60
|
+
className: o(
|
|
61
|
+
"Bear-TimePicker__dial-period-btn bear-px-2 bear-py-0.5 bear-rounded bear-text-sm bear-transition-colors",
|
|
62
|
+
u === r ? "bear-text-blue-600 dark:bear-text-blue-400 bear-font-medium" : "bear-text-gray-400 dark:bear-text-zinc-500 hover:bear-text-gray-600 dark:hover:bear-text-zinc-400"
|
|
63
|
+
),
|
|
64
|
+
children: r
|
|
65
|
+
},
|
|
66
|
+
r
|
|
67
|
+
)) })
|
|
62
68
|
] }),
|
|
63
69
|
/* @__PURE__ */ e("div", { className: "Bear-TimePicker__dial-face bear-relative bear-w-48 bear-h-48 bear-mx-auto bear-mb-4", children: /* @__PURE__ */ e(
|
|
64
|
-
|
|
70
|
+
F,
|
|
65
71
|
{
|
|
66
|
-
values:
|
|
67
|
-
isHourMode:
|
|
72
|
+
values: f,
|
|
73
|
+
isHourMode: t,
|
|
68
74
|
format: a,
|
|
69
|
-
selectedHour:
|
|
70
|
-
selectedMinute:
|
|
71
|
-
onSelect:
|
|
75
|
+
selectedHour: i,
|
|
76
|
+
selectedMinute: d,
|
|
77
|
+
onSelect: g
|
|
72
78
|
}
|
|
73
79
|
) }),
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, className:
|
|
78
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
80
|
+
/* @__PURE__ */ n("div", { className: D, children: [
|
|
81
|
+
S && T && /* @__PURE__ */ e("button", { onClick: () => {
|
|
82
|
+
l == null || l(null), C();
|
|
83
|
+
}, className: K, children: b.cancel }),
|
|
84
|
+
/* @__PURE__ */ e("button", { onClick: E, className: z, children: b.ok })
|
|
79
85
|
] })
|
|
80
86
|
] });
|
|
81
87
|
};
|
|
82
88
|
export {
|
|
83
|
-
|
|
89
|
+
G as TimePickerDialDropdown
|
|
84
90
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),m=require("../../../utils/cn.cjs");require("react");const e=require("../TimePicker.constants.cjs"),x=16,S=14,O=.85,R=.6,b=30,n=90,l=Math.PI/180,f=({values:o,isHourMode:t,format:_,selectedHour:a,selectedMinute:C,onSelect:A,className:L})=>{const N=c=>t?(c*b-n)*l:(c*(360/o.length)-n)*l,E=(t?(_==="12h"?a===12?0:a%12:a)*b-n:C*6-n)*l;return r.jsxs("svg",{viewBox:"0 0 200 200",className:m.cn("Bear-TimePicker__clock-face bear-w-full bear-h-full",L),children:[r.jsx("circle",{cx:e.CLOCK_CENTER,cy:e.CLOCK_CENTER,r:e.CLOCK_RADIUS,className:"Bear-TimePicker__clock-face-circle bear-fill-none bear-stroke-gray-200 dark:bear-stroke-zinc-700 bear-stroke-2"}),o.map((c,h)=>{const T=N(h),s=e.CLOCK_CENTER+e.CLOCK_RADIUS*O*Math.cos(T),i=e.CLOCK_CENTER+e.CLOCK_RADIUS*O*Math.sin(T),k=t?_==="12h"?c===12?a===12:a%12===c:a===c:C===c;return r.jsxs("g",{onClick:()=>A(c),className:"Bear-TimePicker__clock-face-item bear-cursor-pointer",children:[r.jsx("circle",{cx:s,cy:i,r:x,fill:"transparent"}),k&&r.jsx("circle",{cx:s,cy:i,r:S,className:"Bear-TimePicker__clock-face-dot bear-fill-blue-500"}),r.jsx("text",{x:s,y:i,textAnchor:"middle",dominantBaseline:"middle",className:m.cn("Bear-TimePicker__clock-face-text bear-text-sm bear-font-medium bear-pointer-events-none",k?"bear-fill-white":"bear-fill-gray-700 dark:bear-fill-zinc-300"),children:typeof c=="number"?c.toString().padStart(2,"0"):c})]},c)}),r.jsx("line",{x1:e.CLOCK_CENTER,y1:e.CLOCK_CENTER,x2:e.CLOCK_CENTER+e.CLOCK_RADIUS*R*Math.cos(E),y2:e.CLOCK_CENTER+e.CLOCK_RADIUS*R*Math.sin(E),className:"Bear-TimePicker__clock-face-hand bear-stroke-blue-500 bear-stroke-2",strokeLinecap:"round"})]})};exports.ClockFaceSvg=f;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
export interface ClockFaceSvgProps {
|
|
3
|
-
/** Clock face values (hours or minutes) */
|
|
4
3
|
values: readonly number[] | number[];
|
|
5
|
-
/** Whether in hour mode (different angle calc) */
|
|
6
4
|
isHourMode: boolean;
|
|
7
|
-
/** Format: 12h or 24h */
|
|
8
5
|
format: '12h' | '24h';
|
|
9
|
-
/** Current selected hour (for hour mode) */
|
|
10
6
|
selectedHour: number;
|
|
11
|
-
/** Current selected minute (for minute mode) */
|
|
12
7
|
selectedMinute: number;
|
|
13
|
-
/** Callback when value is clicked */
|
|
14
8
|
onSelect: (v: number) => void;
|
|
15
|
-
/** Optional class name */
|
|
16
9
|
className?: string;
|
|
17
10
|
}
|
|
18
11
|
export declare const ClockFaceSvg: FC<ClockFaceSvgProps>;
|