@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface RadioCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
|
+
value: string;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onChange?: (value: string) => void;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
icon?: ReactNode;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
variant?: 'default' | 'outline' | 'filled';
|
|
11
|
+
size?: 'sm' | 'md' | 'lg';
|
|
12
|
+
testId?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface RadioCardGroupProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
15
|
+
value?: string;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
columns?: number;
|
|
19
|
+
gap?: number;
|
|
20
|
+
name?: string;
|
|
21
|
+
testId?: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),r=require("../../utils/cn.cjs");require("react");const S=require("../Typography/Typography.cjs"),s=require("./Result.const.cjs"),E=require("./Result.icons.cjs"),A=n=>{const{status:t,title:o,subtitle:c,icon:i,extra:a,className:l,testId:u,...T}=n,d=i??E.getStatusIcon(t,s.STATUS_TEXT_CLASSES),_=s.STATUS_ICON_COLORS[t],C=t==="404"||t==="403"||t==="500";return e.jsxs("div",{className:r.cn(s.ROOT_CLASS,s.CONTAINER_CLASSES,l),"data-testid":u,...T,children:[e.jsx("div",{className:r.cn(s.ICON_WRAPPER_CLASSES,!C&&s.ICON_SIZE_CLASSES,_),children:d}),e.jsx(S.Typography,{variant:"h4",className:r.cn(s.TITLE_CLASSES,"bear-text-gray-900 dark:bear-text-zinc-100"),children:o}),c&&e.jsx(S.Typography,{variant:"body1",color:"secondary",className:s.SUBTITLE_CLASSES,children:c}),a&&e.jsx("div",{className:s.EXTRA_CLASSES,children:a})]})};exports.Result=A;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Bear-Result",r="bear-flex bear-flex-col bear-items-center bear-justify-center bear-text-center bear-py-16 bear-px-6",S="bear-mb-4 bear-flex bear-items-center bear-justify-center",t="bear-w-16 bear-h-16",a={success:"bear-text-green-500 dark:bear-text-green-400",error:"bear-text-red-500 dark:bear-text-red-400",info:"bear-text-blue-500 dark:bear-text-blue-400",warning:"bear-text-amber-500 dark:bear-text-amber-400",404:"bear-text-gray-500 dark:bear-text-zinc-400",403:"bear-text-orange-500 dark:bear-text-orange-400",500:"bear-text-red-600 dark:bear-text-red-500"},b="bear-mb-2",n="bear-mb-6 bear-max-w-md",E="bear-flex bear-flex-wrap bear-gap-2 bear-justify-center",T="bear-text-5xl bear-font-bold bear-leading-none";exports.CONTAINER_CLASSES=r;exports.EXTRA_CLASSES=E;exports.ICON_SIZE_CLASSES=t;exports.ICON_WRAPPER_CLASSES=S;exports.ROOT_CLASS=e;exports.STATUS_ICON_COLORS=a;exports.STATUS_TEXT_CLASSES=T;exports.SUBTITLE_CLASSES=n;exports.TITLE_CLASSES=b;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ResultStatus } from './Result.types';
|
|
2
|
+
export declare const ROOT_CLASS = "Bear-Result";
|
|
3
|
+
export declare const CONTAINER_CLASSES = "bear-flex bear-flex-col bear-items-center bear-justify-center bear-text-center bear-py-16 bear-px-6";
|
|
4
|
+
export declare const ICON_WRAPPER_CLASSES = "bear-mb-4 bear-flex bear-items-center bear-justify-center";
|
|
5
|
+
export declare const ICON_SIZE_CLASSES = "bear-w-16 bear-h-16";
|
|
6
|
+
export declare const STATUS_ICON_COLORS: Record<ResultStatus, string>;
|
|
7
|
+
export declare const TITLE_CLASSES = "bear-mb-2";
|
|
8
|
+
export declare const SUBTITLE_CLASSES = "bear-mb-6 bear-max-w-md";
|
|
9
|
+
export declare const EXTRA_CLASSES = "bear-flex bear-flex-wrap bear-gap-2 bear-justify-center";
|
|
10
|
+
export declare const STATUS_TEXT_CLASSES = "bear-text-5xl bear-font-bold bear-leading-none";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const e = "Bear-Result", r = "bear-flex bear-flex-col bear-items-center bear-justify-center bear-text-center bear-py-16 bear-px-6", a = "bear-mb-4 bear-flex bear-items-center bear-justify-center", t = "bear-w-16 bear-h-16", b = {
|
|
2
|
+
success: "bear-text-green-500 dark:bear-text-green-400",
|
|
3
|
+
error: "bear-text-red-500 dark:bear-text-red-400",
|
|
4
|
+
info: "bear-text-blue-500 dark:bear-text-blue-400",
|
|
5
|
+
warning: "bear-text-amber-500 dark:bear-text-amber-400",
|
|
6
|
+
404: "bear-text-gray-500 dark:bear-text-zinc-400",
|
|
7
|
+
403: "bear-text-orange-500 dark:bear-text-orange-400",
|
|
8
|
+
500: "bear-text-red-600 dark:bear-text-red-500"
|
|
9
|
+
}, S = "bear-mb-2", n = "bear-mb-6 bear-max-w-md", x = "bear-flex bear-flex-wrap bear-gap-2 bear-justify-center", c = "bear-text-5xl bear-font-bold bear-leading-none";
|
|
10
|
+
export {
|
|
11
|
+
r as CONTAINER_CLASSES,
|
|
12
|
+
x as EXTRA_CLASSES,
|
|
13
|
+
t as ICON_SIZE_CLASSES,
|
|
14
|
+
a as ICON_WRAPPER_CLASSES,
|
|
15
|
+
e as ROOT_CLASS,
|
|
16
|
+
b as STATUS_ICON_COLORS,
|
|
17
|
+
c as STATUS_TEXT_CLASSES,
|
|
18
|
+
n as SUBTITLE_CLASSES,
|
|
19
|
+
S as TITLE_CLASSES
|
|
20
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t="0 0 24 24",r=64,n={width:r,height:r,viewBox:t,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"},i=()=>s.jsxs("svg",{...n,children:[s.jsx("path",{d:"M9 12l2 2 4-4"}),s.jsx("circle",{cx:"12",cy:"12",r:"10"})]}),l=()=>s.jsxs("svg",{...n,children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("path",{d:"M15 9l-6 6M9 9l6 6"})]}),x=()=>s.jsxs("svg",{...n,children:[s.jsx("circle",{cx:"12",cy:"12",r:"10"}),s.jsx("path",{d:"M12 16v-4M12 8h.01"})]}),a=()=>s.jsx("svg",{...n,children:s.jsx("path",{d:"M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01"})}),h={success:i,error:l,info:x,warning:a},j=(c,e)=>{const o=h[c];return o?s.jsx(o,{}):s.jsx("span",{className:e,children:c.toUpperCase()})};exports.getStatusIcon=j;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as c, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
const i = "0 0 24 24", e = 64, n = {
|
|
3
|
+
width: e,
|
|
4
|
+
height: e,
|
|
5
|
+
viewBox: i,
|
|
6
|
+
fill: "none",
|
|
7
|
+
stroke: "currentColor",
|
|
8
|
+
strokeWidth: 1.5,
|
|
9
|
+
strokeLinecap: "round",
|
|
10
|
+
strokeLinejoin: "round"
|
|
11
|
+
}, h = () => /* @__PURE__ */ o("svg", { ...n, children: [
|
|
12
|
+
/* @__PURE__ */ c("path", { d: "M9 12l2 2 4-4" }),
|
|
13
|
+
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "10" })
|
|
14
|
+
] }), l = () => /* @__PURE__ */ o("svg", { ...n, children: [
|
|
15
|
+
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "10" }),
|
|
16
|
+
/* @__PURE__ */ c("path", { d: "M15 9l-6 6M9 9l6 6" })
|
|
17
|
+
] }), a = () => /* @__PURE__ */ o("svg", { ...n, children: [
|
|
18
|
+
/* @__PURE__ */ c("circle", { cx: "12", cy: "12", r: "10" }),
|
|
19
|
+
/* @__PURE__ */ c("path", { d: "M12 16v-4M12 8h.01" })
|
|
20
|
+
] }), d = () => /* @__PURE__ */ c("svg", { ...n, children: /* @__PURE__ */ c("path", { d: "M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0zM12 9v4M12 17h.01" }) }), p = {
|
|
21
|
+
success: h,
|
|
22
|
+
error: l,
|
|
23
|
+
info: a,
|
|
24
|
+
warning: d
|
|
25
|
+
}, v = (r, t) => {
|
|
26
|
+
const s = p[r];
|
|
27
|
+
return s ? /* @__PURE__ */ c(s, {}) : /* @__PURE__ */ c("span", { className: t, children: r.toUpperCase() });
|
|
28
|
+
};
|
|
29
|
+
export {
|
|
30
|
+
v as getStatusIcon
|
|
31
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as E, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { cn as S } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Typography as e } from "../Typography/Typography.js";
|
|
5
|
+
import { STATUS_ICON_COLORS as A, ICON_SIZE_CLASSES as _, ICON_WRAPPER_CLASSES as L, TITLE_CLASSES as N, SUBTITLE_CLASSES as I, EXTRA_CLASSES as p, CONTAINER_CLASSES as O, ROOT_CLASS as h, STATUS_TEXT_CLASSES as u } from "./Result.const.js";
|
|
6
|
+
import { getStatusIcon as x } from "./Result.icons.js";
|
|
7
|
+
const U = (o) => {
|
|
8
|
+
const {
|
|
9
|
+
status: t,
|
|
10
|
+
title: c,
|
|
11
|
+
subtitle: r,
|
|
12
|
+
icon: i,
|
|
13
|
+
extra: a,
|
|
14
|
+
className: n,
|
|
15
|
+
testId: l,
|
|
16
|
+
...m
|
|
17
|
+
} = o, T = i ?? x(t, u), d = A[t], C = t === "404" || t === "403" || t === "500";
|
|
18
|
+
return /* @__PURE__ */ E(
|
|
19
|
+
"div",
|
|
20
|
+
{
|
|
21
|
+
className: S(h, O, n),
|
|
22
|
+
"data-testid": l,
|
|
23
|
+
...m,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ s("div", { className: S(L, !C && _, d), children: T }),
|
|
26
|
+
/* @__PURE__ */ s(e, { variant: "h4", className: S(N, "bear-text-gray-900 dark:bear-text-zinc-100"), children: c }),
|
|
27
|
+
r && /* @__PURE__ */ s(e, { variant: "body1", color: "secondary", className: I, children: r }),
|
|
28
|
+
a && /* @__PURE__ */ s("div", { className: p, children: a })
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
};
|
|
33
|
+
export {
|
|
34
|
+
U as Result
|
|
35
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export type ResultStatus = 'success' | 'error' | 'info' | 'warning' | '404' | '403' | '500';
|
|
3
|
+
export interface ResultProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
status: ResultStatus;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle?: string;
|
|
7
|
+
icon?: ReactNode;
|
|
8
|
+
extra?: ReactNode;
|
|
9
|
+
testId?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../utils/cn.cjs");require("react");const T=require("../Typography/Typography.cjs"),c=require("./RingProgress.const.cjs"),R=({sections:d,size:t=c.DEFAULT_SIZE,thickness:n=c.DEFAULT_THICKNESS,roundCaps:j=!1,label:s,rootColor:o,className:m,testId:x,...p})=>{const l=d.reduce((r,i)=>r+i.value,0),a=(t-n)/2,u=2*Math.PI*a,g=t/2,h=t/2;let y=0;return e.jsxs("div",{className:b.cn(c.ROOT_CLASS,m),"data-testid":x,...p,children:[e.jsxs("svg",{width:t,height:t,className:"bear-rotate-[-90deg]",children:[e.jsx("circle",{cx:g,cy:h,r:a,fill:"none",strokeWidth:n,className:o?void 0:c.TRACK_COLOR,style:o?{stroke:o}:void 0}),l>0&&d.map((r,i)=>{const f=r.value/l*u,v=-y;return y+=f,e.jsxs("g",{children:[e.jsx("circle",{cx:g,cy:h,r:a,fill:"none",strokeWidth:n,stroke:r.color,strokeDasharray:`${f} ${u}`,strokeDashoffset:v,strokeLinecap:j?"round":"butt"}),r.tooltip&&e.jsx("title",{children:r.tooltip})]},i)})]}),s!==void 0&&e.jsx("div",{className:"bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center",children:typeof s=="string"?e.jsx(T.Typography,{variant:"body2",color:"secondary",children:s}):s})]})};exports.RingProgress=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=120,r=12,t="Bear-RingProgress bear-relative bear-inline-flex",S="bear-stroke-gray-200 dark:bear-stroke-zinc-700";exports.DEFAULT_SIZE=e;exports.DEFAULT_THICKNESS=r;exports.ROOT_CLASS=t;exports.TRACK_COLOR=S;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as T } from "../../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { Typography as k } from "../Typography/Typography.js";
|
|
5
|
+
import { DEFAULT_SIZE as x, TRACK_COLOR as N, DEFAULT_THICKNESS as O, ROOT_CLASS as S } from "./RingProgress.const.js";
|
|
6
|
+
const j = ({
|
|
7
|
+
sections: d,
|
|
8
|
+
size: t = x,
|
|
9
|
+
thickness: a = O,
|
|
10
|
+
roundCaps: g = !1,
|
|
11
|
+
label: o,
|
|
12
|
+
rootColor: s,
|
|
13
|
+
className: v,
|
|
14
|
+
testId: y,
|
|
15
|
+
...b
|
|
16
|
+
}) => {
|
|
17
|
+
const l = d.reduce((r, i) => r + i.value, 0), c = (t - a) / 2, m = 2 * Math.PI * c, f = t / 2, h = t / 2;
|
|
18
|
+
let p = 0;
|
|
19
|
+
return /* @__PURE__ */ n(
|
|
20
|
+
"div",
|
|
21
|
+
{
|
|
22
|
+
className: T(S, v),
|
|
23
|
+
"data-testid": y,
|
|
24
|
+
...b,
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ n("svg", { width: t, height: t, className: "bear-rotate-[-90deg]", children: [
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
"circle",
|
|
29
|
+
{
|
|
30
|
+
cx: f,
|
|
31
|
+
cy: h,
|
|
32
|
+
r: c,
|
|
33
|
+
fill: "none",
|
|
34
|
+
strokeWidth: a,
|
|
35
|
+
className: s ? void 0 : N,
|
|
36
|
+
style: s ? { stroke: s } : void 0
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
l > 0 && d.map((r, i) => {
|
|
40
|
+
const u = r.value / l * m, L = -p;
|
|
41
|
+
return p += u, /* @__PURE__ */ n("g", { children: [
|
|
42
|
+
/* @__PURE__ */ e(
|
|
43
|
+
"circle",
|
|
44
|
+
{
|
|
45
|
+
cx: f,
|
|
46
|
+
cy: h,
|
|
47
|
+
r: c,
|
|
48
|
+
fill: "none",
|
|
49
|
+
strokeWidth: a,
|
|
50
|
+
stroke: r.color,
|
|
51
|
+
strokeDasharray: `${u} ${m}`,
|
|
52
|
+
strokeDashoffset: L,
|
|
53
|
+
strokeLinecap: g ? "round" : "butt"
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
r.tooltip && /* @__PURE__ */ e("title", { children: r.tooltip })
|
|
57
|
+
] }, i);
|
|
58
|
+
})
|
|
59
|
+
] }),
|
|
60
|
+
o !== void 0 && /* @__PURE__ */ e("div", { className: "bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center", children: typeof o == "string" ? /* @__PURE__ */ e(k, { variant: "body2", color: "secondary", children: o }) : o })
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
};
|
|
65
|
+
export {
|
|
66
|
+
j as RingProgress
|
|
67
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode, HTMLAttributes } from 'react';
|
|
2
|
+
export interface RingProgressSection {
|
|
3
|
+
value: number;
|
|
4
|
+
color: string;
|
|
5
|
+
tooltip?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface RingProgressProps extends HTMLAttributes<HTMLDivElement> {
|
|
8
|
+
sections: RingProgressSection[];
|
|
9
|
+
size?: number;
|
|
10
|
+
thickness?: number;
|
|
11
|
+
roundCaps?: boolean;
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
rootColor?: string;
|
|
14
|
+
testId?: string;
|
|
15
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),a=require("../../utils/cn.cjs"),j=require("../../hooks/useClickOutside.cjs");require("../../context/BearProvider.cjs");require("../../hooks/useBearComponent/useBearComponent.cjs");const f=require("../Icon/index.cjs"),N={sm:"bear-h-8 bear-text-sm bear-px-3",md:"bear-h-10 bear-text-base bear-px-4",lg:"bear-h-12 bear-text-lg bear-px-5"},p=({options:i,value:t,onChange:s,placeholder:g="Select an option",label:u,error:l,disabled:c=!1,size:y="md",fullWidth:h=!1,className:m})=>{const[o,d]=n.useState(!1),x=n.useRef(null),k=!!l,b=i.find(e=>e.value===t),w=n.useCallback(()=>d(!1),[]);j.useClickOutside(x,w);const v=e=>{s==null||s(e),d(!1)};return r.jsxs("div",{ref:x,className:a.cn("bear-relative bear-flex bear-flex-col bear-gap-1.5",h&&"bear-w-full"),children:[u&&r.jsx("label",{className:"bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300",children:u}),r.jsxs("button",{type:"button",disabled:c,onClick:()=>!c&&d(!o),className:a.cn("bear-flex bear-items-center bear-justify-between bear-w-full","bear-rounded-lg bear-border bear-text-left bear-outline-none bear-transition-all bear-duration-200","bear-bg-white bear-text-gray-900 bear-border-gray-300","focus:bear-ring-2 focus:bear-ring-offset-2 focus:bear-ring-offset-white","dark:bear-bg-gray-800 dark:bear-text-white dark:bear-border-gray-600 dark:focus:bear-ring-offset-gray-900",k?"bear-border-red-500 focus:bear-ring-red-500":"focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",c&&"bear-opacity-50 bear-cursor-not-allowed",N[y],m),children:[r.jsx("span",{className:b?"bear-text-gray-900 dark:bear-text-white":"bear-text-gray-500 dark:bear-text-gray-500",children:(b==null?void 0:b.label)||g}),r.jsx(f.ChevronDownIcon,{className:a.cn("bear-w-4 bear-h-4 bear-text-gray-500 dark:bear-text-gray-400 bear-transition-transform",o&&"bear-rotate-180")})]}),o&&r.jsx("div",{className:a.cn("bear-absolute bear-z-50 bear-w-full bear-mt-1","bear-rounded-lg bear-border bear-shadow-lg bear-overflow-hidden bear-top-full","bear-bg-white bear-border-gray-200 dark:bear-bg-gray-800 dark:bear-border-gray-600"),children:r.jsx("div",{className:"bear-max-h-60 bear-overflow-y-auto",children:i.map(e=>r.jsxs("button",{type:"button",disabled:e.disabled,onClick:()=>!e.disabled&&v(e.value),className:a.cn("bear-flex bear-items-center bear-justify-between bear-w-full bear-px-4 bear-py-2","bear-text-left bear-transition-colors",e.disabled?"bear-text-gray-500 bear-cursor-not-allowed":"bear-text-gray-700 dark:bear-text-gray-300 hover:bear-bg-gray-100 hover:bear-text-gray-900 dark:hover:bear-bg-gray-700 dark:hover:bear-text-white",e.value===t&&"bear-bg-bear-100 bear-text-bear-700 dark:bear-bg-bear-600/20 dark:bear-text-bear-300"),children:[e.label,e.value===t&&r.jsx(f.CheckIcon,{className:"bear-w-4 bear-h-4 bear-text-bear-600 dark:bear-text-bear-400"})]},e.value))})}),l&&r.jsx("p",{className:"bear-text-sm bear-text-red-500",children:l})]})};exports.Select=p;
|
|
@@ -1,46 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useRef as v, useCallback as N } from "react";
|
|
3
3
|
import { cn as a } from "../../utils/cn.js";
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { useClickOutside as j } from "../../hooks/useClickOutside.js";
|
|
5
|
+
import "../../context/BearProvider.js";
|
|
6
|
+
import "../../hooks/useBearComponent/useBearComponent.js";
|
|
7
|
+
import { ChevronDownIcon as S, CheckIcon as C } from "../Icon/index.js";
|
|
8
|
+
const I = {
|
|
6
9
|
sm: "bear-h-8 bear-text-sm bear-px-3",
|
|
7
10
|
md: "bear-h-10 bear-text-base bear-px-4",
|
|
8
11
|
lg: "bear-h-12 bear-text-lg bear-px-5"
|
|
9
|
-
},
|
|
10
|
-
options:
|
|
12
|
+
}, A = ({
|
|
13
|
+
options: i,
|
|
11
14
|
value: t,
|
|
12
15
|
onChange: s,
|
|
13
|
-
placeholder:
|
|
14
|
-
label:
|
|
16
|
+
placeholder: x = "Select an option",
|
|
17
|
+
label: f,
|
|
15
18
|
error: l,
|
|
16
19
|
disabled: o = !1,
|
|
17
|
-
size:
|
|
20
|
+
size: g = "md",
|
|
18
21
|
fullWidth: m = !1,
|
|
19
22
|
className: y
|
|
20
23
|
}) => {
|
|
21
|
-
const [d,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
};
|
|
26
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
27
|
-
}, []);
|
|
28
|
-
const k = (e) => {
|
|
29
|
-
s == null || s(e), n(!1);
|
|
24
|
+
const [d, c] = p(!1), u = v(null), h = !!l, b = i.find((e) => e.value === t), k = N(() => c(!1), []);
|
|
25
|
+
j(u, k);
|
|
26
|
+
const w = (e) => {
|
|
27
|
+
s == null || s(e), c(!1);
|
|
30
28
|
};
|
|
31
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ n(
|
|
32
30
|
"div",
|
|
33
31
|
{
|
|
34
|
-
ref:
|
|
32
|
+
ref: u,
|
|
35
33
|
className: a("bear-relative bear-flex bear-flex-col bear-gap-1.5", m && "bear-w-full"),
|
|
36
34
|
children: [
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
35
|
+
f && /* @__PURE__ */ r("label", { className: "bear-text-sm bear-font-medium bear-text-gray-700 dark:bear-text-gray-300", children: f }),
|
|
36
|
+
/* @__PURE__ */ n(
|
|
39
37
|
"button",
|
|
40
38
|
{
|
|
41
39
|
type: "button",
|
|
42
40
|
disabled: o,
|
|
43
|
-
onClick: () => !o &&
|
|
41
|
+
onClick: () => !o && c(!d),
|
|
44
42
|
className: a(
|
|
45
43
|
"bear-flex bear-items-center bear-justify-between bear-w-full",
|
|
46
44
|
"bear-rounded-lg bear-border bear-text-left bear-outline-none bear-transition-all bear-duration-200",
|
|
@@ -49,13 +47,13 @@ const S = {
|
|
|
49
47
|
"dark:bear-bg-gray-800 dark:bear-text-white dark:bear-border-gray-600 dark:focus:bear-ring-offset-gray-900",
|
|
50
48
|
h ? "bear-border-red-500 focus:bear-ring-red-500" : "focus:bear-border-bear-500 focus:bear-ring-bear-500 dark:focus:bear-border-bear-500 dark:focus:bear-ring-bear-500",
|
|
51
49
|
o && "bear-opacity-50 bear-cursor-not-allowed",
|
|
52
|
-
|
|
50
|
+
I[g],
|
|
53
51
|
y
|
|
54
52
|
),
|
|
55
53
|
children: [
|
|
56
|
-
/* @__PURE__ */ r("span", { className: b ? "bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-500 dark:bear-text-gray-500", children: (b == null ? void 0 : b.label) ||
|
|
54
|
+
/* @__PURE__ */ r("span", { className: b ? "bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-500 dark:bear-text-gray-500", children: (b == null ? void 0 : b.label) || x }),
|
|
57
55
|
/* @__PURE__ */ r(
|
|
58
|
-
|
|
56
|
+
S,
|
|
59
57
|
{
|
|
60
58
|
className: a(
|
|
61
59
|
"bear-w-4 bear-h-4 bear-text-gray-500 dark:bear-text-gray-400 bear-transition-transform",
|
|
@@ -74,12 +72,12 @@ const S = {
|
|
|
74
72
|
"bear-rounded-lg bear-border bear-shadow-lg bear-overflow-hidden bear-top-full",
|
|
75
73
|
"bear-bg-white bear-border-gray-200 dark:bear-bg-gray-800 dark:bear-border-gray-600"
|
|
76
74
|
),
|
|
77
|
-
children: /* @__PURE__ */ r("div", { className: "bear-max-h-60 bear-overflow-y-auto", children:
|
|
75
|
+
children: /* @__PURE__ */ r("div", { className: "bear-max-h-60 bear-overflow-y-auto", children: i.map((e) => /* @__PURE__ */ n(
|
|
78
76
|
"button",
|
|
79
77
|
{
|
|
80
78
|
type: "button",
|
|
81
79
|
disabled: e.disabled,
|
|
82
|
-
onClick: () => !e.disabled &&
|
|
80
|
+
onClick: () => !e.disabled && w(e.value),
|
|
83
81
|
className: a(
|
|
84
82
|
"bear-flex bear-items-center bear-justify-between bear-w-full bear-px-4 bear-py-2",
|
|
85
83
|
"bear-text-left bear-transition-colors",
|
|
@@ -88,7 +86,7 @@ const S = {
|
|
|
88
86
|
),
|
|
89
87
|
children: [
|
|
90
88
|
e.label,
|
|
91
|
-
e.value === t && /* @__PURE__ */ r(
|
|
89
|
+
e.value === t && /* @__PURE__ */ r(C, { className: "bear-w-4 bear-h-4 bear-text-bear-600 dark:bear-text-bear-400" })
|
|
92
90
|
]
|
|
93
91
|
},
|
|
94
92
|
e.value
|
|
@@ -101,5 +99,5 @@ const S = {
|
|
|
101
99
|
);
|
|
102
100
|
};
|
|
103
101
|
export {
|
|
104
|
-
|
|
102
|
+
A as Select
|
|
105
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),r=require("react"),S=require("../../utils/cn.cjs"),y=require("../Button/Button.cjs"),s=require("./SignPad.const.cjs"),V=B=>{const{onChange:o,width:p,height:D=s.SIGN_PAD_DEFAULT_HEIGHT,strokeColor:O,strokeWidth:T=s.SIGN_PAD_DEFAULT_STROKE_WIDTH,backgroundColor:M,placeholder:U=s.SIGN_PAD_DEFAULT_PLACEHOLDER,disabled:a=!1,readOnly:c=!1,showClear:N=!0,showSave:m=!1,clearText:j="Clear",saveText:F="Save",outputFormat:P=s.SIGN_PAD_DEFAULT_OUTPUT_FORMAT,outputQuality:v=s.SIGN_PAD_DEFAULT_OUTPUT_QUALITY,className:H,testId:K,id:q,...W}=B,i=r.useRef(null),w=r.useRef(null),A=r.useRef(null),g=r.useRef(!1),[h,L]=r.useState(!1),[E,z]=r.useState(!1);r.useEffect(()=>{const e=()=>{z(document.documentElement.classList.contains("dark"))};e();const t=new MutationObserver(e);return t.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),()=>t.disconnect()},[]);const k=O||(E?s.SIGN_PAD_STROKE_DARK:s.SIGN_PAD_STROKE_LIGHT),C=M||(E?s.SIGN_PAD_BG_DARK:s.SIGN_PAD_BG_LIGHT),_=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.fillStyle=C==="transparent"?"rgba(0,0,0,0)":C,t.fillRect(0,0,e.width,e.height))},[C]);r.useEffect(()=>{const e=i.current,t=w.current;if(!e||!t)return;const n=()=>{const d=t.getBoundingClientRect(),f=p??Math.round(d.width),G=D;(e.width!==f||e.height!==G)&&(e.width=f,e.height=G,_())};n();const l=new ResizeObserver(n);return l.observe(t),()=>l.disconnect()},[p,D,_]),r.useEffect(()=>{_()},[_,E]),r.useEffect(()=>{const e=i.current;if(!e||a||c)return;const t=n=>n.preventDefault();return e.addEventListener("touchstart",t,{passive:!1}),e.addEventListener("touchmove",t,{passive:!1}),()=>{e.removeEventListener("touchstart",t),e.removeEventListener("touchmove",t)}},[a,c]);const b=r.useCallback(e=>{const t=i.current;if(!t)return{x:0,y:0};const n=t.getBoundingClientRect(),l=t.width/n.width,d=t.height/n.height;if("touches"in e){const f=e.touches[0];return{x:(f.clientX-n.left)*l,y:(f.clientY-n.top)*d}}return{x:(e.clientX-n.left)*l,y:(e.clientY-n.top)*d}},[]),I=r.useCallback(e=>{if(a||c)return;const t=b(e);g.current=!0,A.current=t},[a,c,b]),x=r.useCallback(e=>{if(!g.current||a||c)return;const t=i.current,n=t==null?void 0:t.getContext("2d"),l=A.current;if(!t||!n||!l)return;const d=b(e);n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(d.x,d.y),n.strokeStyle=k,n.lineWidth=T,n.lineCap="round",n.lineJoin="round",n.stroke(),A.current=d,L(!0)},[a,c,k,T,b]),R=r.useCallback(()=>{if(g.current){const e=i.current;if(e&&o){const t=e.toDataURL(P,v);o(t)}}g.current=!1,A.current=null},[o,P,v]),X=r.useCallback(()=>{const e=i.current,t=e==null?void 0:e.getContext("2d");!e||!t||(t.clearRect(0,0,e.width,e.height),_(),L(!1),o==null||o(null))},[_,o]),Y=r.useCallback(()=>{const e=i.current;if(!e||!h)return;const t=e.toDataURL(P,v);o==null||o(t)},[h,o,P,v]);return u.jsxs("div",{id:q,"data-testid":K,className:S.cn("Bear-SignPad bear-w-full",s.SIGN_PAD_ROOT_CLASSES,a&&"Bear-SignPad--disabled bear-opacity-50",c&&"Bear-SignPad--readonly",H),...W,children:[u.jsxs("div",{ref:w,className:S.cn("Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden","bear-touch-none",s.SIGN_PAD_CANVAS_WRAPPER_CLASSES,!a&&!c&&s.SIGN_PAD_CANVAS_WRAPPER_HOVER,a&&"bear-cursor-not-allowed",!a&&!c&&"bear-cursor-crosshair"),children:[u.jsx("canvas",{ref:i,className:"Bear-SignPad__canvas bear-block bear-rounded-lg bear-w-full bear-touch-none",style:{height:D},onMouseDown:I,onMouseMove:x,onMouseUp:R,onMouseLeave:R,onTouchStart:I,onTouchMove:x,onTouchEnd:R}),!h&&u.jsx("div",{className:S.cn("Bear-SignPad__placeholder",s.SIGN_PAD_PLACEHOLDER_CLASSES),children:U}),u.jsx("div",{className:S.cn("Bear-SignPad__line",s.SIGN_PAD_LINE_CLASSES)}),u.jsx("span",{className:S.cn("Bear-SignPad__x-mark",s.SIGN_PAD_X_MARK_CLASSES),children:"×"})]}),(N||m)&&u.jsxs("div",{className:S.cn("Bear-SignPad__actions",s.SIGN_PAD_ACTIONS_CLASSES),children:[N&&u.jsx(y.Button,{size:"sm",variant:"ghost",onClick:X,disabled:a||!h,children:j}),m&&u.jsx(y.Button,{size:"sm",variant:"primary",onClick:Y,disabled:a||!h,children:F})]})]})};exports.SignPad=V;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=200,e=2,S="Sign here",A="image/png",r=.92,a="#1f2937",b="#f3f4f6",t="#ffffff",D="#18181b",P="bear-inline-flex bear-flex-col bear-gap-2",E="bear-relative bear-rounded-lg bear-border-2 bear-border-dashed bear-border-gray-300 dark:bear-border-zinc-600",I="hover:bear-border-pink-400 dark:hover:bear-border-pink-500",o="bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center bear-text-gray-400 dark:bear-text-zinc-500 bear-text-sm bear-pointer-events-none",G="bear-absolute bear-bottom-8 bear-left-4 bear-right-4 bear-border-b bear-border-gray-300 dark:bear-border-zinc-600",T="bear-absolute bear-bottom-6 bear-left-4 bear-text-gray-400 dark:bear-text-zinc-500 bear-text-lg bear-font-bold",N="bear-flex bear-gap-2 bear-justify-end";exports.SIGN_PAD_ACTIONS_CLASSES=N;exports.SIGN_PAD_BG_DARK=D;exports.SIGN_PAD_BG_LIGHT=t;exports.SIGN_PAD_CANVAS_WRAPPER_CLASSES=E;exports.SIGN_PAD_CANVAS_WRAPPER_HOVER=I;exports.SIGN_PAD_DEFAULT_HEIGHT=_;exports.SIGN_PAD_DEFAULT_OUTPUT_FORMAT=A;exports.SIGN_PAD_DEFAULT_OUTPUT_QUALITY=r;exports.SIGN_PAD_DEFAULT_PLACEHOLDER=S;exports.SIGN_PAD_DEFAULT_STROKE_WIDTH=e;exports.SIGN_PAD_LINE_CLASSES=G;exports.SIGN_PAD_PLACEHOLDER_CLASSES=o;exports.SIGN_PAD_ROOT_CLASSES=P;exports.SIGN_PAD_STROKE_DARK=b;exports.SIGN_PAD_STROKE_LIGHT=a;exports.SIGN_PAD_X_MARK_CLASSES=T;
|
|
@@ -1,20 +1,19 @@
|
|
|
1
|
-
const e =
|
|
1
|
+
const e = 200, r = 2, a = "Sign here", b = "image/png", _ = 0.92, t = "#1f2937", o = "#f3f4f6", A = "#ffffff", S = "#18181b", n = "bear-inline-flex bear-flex-col bear-gap-2", s = "bear-relative bear-rounded-lg bear-border-2 bear-border-dashed bear-border-gray-300 dark:bear-border-zinc-600", D = "hover:bear-border-pink-400 dark:hover:bear-border-pink-500", P = "bear-absolute bear-inset-0 bear-flex bear-items-center bear-justify-center bear-text-gray-400 dark:bear-text-zinc-500 bear-text-sm bear-pointer-events-none", c = "bear-absolute bear-bottom-8 bear-left-4 bear-right-4 bear-border-b bear-border-gray-300 dark:bear-border-zinc-600", E = "bear-absolute bear-bottom-6 bear-left-4 bear-text-gray-400 dark:bear-text-zinc-500 bear-text-lg bear-font-bold", I = "bear-flex bear-gap-2 bear-justify-end";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
I as SIGN_PAD_ACTIONS_CLASSES,
|
|
4
|
+
S as SIGN_PAD_BG_DARK,
|
|
5
|
+
A as SIGN_PAD_BG_LIGHT,
|
|
6
6
|
s as SIGN_PAD_CANVAS_WRAPPER_CLASSES,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
D as SIGN_PAD_CANVAS_WRAPPER_HOVER,
|
|
8
|
+
e as SIGN_PAD_DEFAULT_HEIGHT,
|
|
9
9
|
b as SIGN_PAD_DEFAULT_OUTPUT_FORMAT,
|
|
10
|
-
|
|
10
|
+
_ as SIGN_PAD_DEFAULT_OUTPUT_QUALITY,
|
|
11
11
|
a as SIGN_PAD_DEFAULT_PLACEHOLDER,
|
|
12
|
-
|
|
13
|
-
e as SIGN_PAD_DEFAULT_WIDTH,
|
|
12
|
+
r as SIGN_PAD_DEFAULT_STROKE_WIDTH,
|
|
14
13
|
c as SIGN_PAD_LINE_CLASSES,
|
|
15
14
|
P as SIGN_PAD_PLACEHOLDER_CLASSES,
|
|
16
|
-
|
|
15
|
+
n as SIGN_PAD_ROOT_CLASSES,
|
|
17
16
|
o as SIGN_PAD_STROKE_DARK,
|
|
18
|
-
|
|
17
|
+
t as SIGN_PAD_STROKE_LIGHT,
|
|
19
18
|
E as SIGN_PAD_X_MARK_CLASSES
|
|
20
19
|
};
|
|
@@ -3,14 +3,12 @@ import { SignPadProps } from './SignPad.types';
|
|
|
3
3
|
/**
|
|
4
4
|
* SignPad - Digital signature capture component
|
|
5
5
|
*
|
|
6
|
+
* Canvas fills 100% of its container width. Height is configurable.
|
|
7
|
+
* Uses ResizeObserver so drawing works correctly at any size.
|
|
8
|
+
*
|
|
6
9
|
* @example
|
|
7
10
|
* ```tsx
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* <SignPad
|
|
11
|
-
* onChange={setSignature}
|
|
12
|
-
* placeholder="Sign here"
|
|
13
|
-
* />
|
|
11
|
+
* <SignPad onChange={setSignature} placeholder="Sign here" />
|
|
14
12
|
* ```
|
|
15
13
|
*/
|
|
16
14
|
export declare const SignPad: FC<SignPadProps>;
|