@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,169 +1,161 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
import { Button as
|
|
5
|
-
import {
|
|
6
|
-
const
|
|
1
|
+
import { jsxs as T, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useState as B, useEffect as D, useCallback as l } from "react";
|
|
3
|
+
import { cn as _ } from "../../utils/cn.js";
|
|
4
|
+
import { Button as M } from "../Button/Button.js";
|
|
5
|
+
import { SIGN_PAD_DEFAULT_HEIGHT as Z, SIGN_PAD_DEFAULT_STROKE_WIDTH as $, SIGN_PAD_DEFAULT_PLACEHOLDER as ee, SIGN_PAD_DEFAULT_OUTPUT_FORMAT as te, SIGN_PAD_DEFAULT_OUTPUT_QUALITY as re, SIGN_PAD_BG_DARK as ne, SIGN_PAD_BG_LIGHT as oe, SIGN_PAD_STROKE_DARK as se, SIGN_PAD_STROKE_LIGHT as ae, SIGN_PAD_PLACEHOLDER_CLASSES as ce, SIGN_PAD_LINE_CLASSES as ie, SIGN_PAD_X_MARK_CLASSES as le, SIGN_PAD_CANVAS_WRAPPER_HOVER as ue, SIGN_PAD_CANVAS_WRAPPER_CLASSES as de, SIGN_PAD_ACTIONS_CLASSES as _e, SIGN_PAD_ROOT_CLASSES as he } from "./SignPad.const.js";
|
|
6
|
+
const ge = (U) => {
|
|
7
7
|
const {
|
|
8
8
|
onChange: o,
|
|
9
|
-
width:
|
|
10
|
-
height:
|
|
11
|
-
strokeColor:
|
|
12
|
-
strokeWidth:
|
|
13
|
-
backgroundColor:
|
|
14
|
-
placeholder:
|
|
15
|
-
disabled:
|
|
16
|
-
readOnly:
|
|
17
|
-
showClear:
|
|
18
|
-
showSave:
|
|
19
|
-
clearText:
|
|
20
|
-
saveText:
|
|
9
|
+
width: w,
|
|
10
|
+
height: m = Z,
|
|
11
|
+
strokeColor: F,
|
|
12
|
+
strokeWidth: C = $,
|
|
13
|
+
backgroundColor: H,
|
|
14
|
+
placeholder: K = ee,
|
|
15
|
+
disabled: n = !1,
|
|
16
|
+
readOnly: s = !1,
|
|
17
|
+
showClear: L = !0,
|
|
18
|
+
showSave: R = !1,
|
|
19
|
+
clearText: W = "Clear",
|
|
20
|
+
saveText: z = "Save",
|
|
21
21
|
outputFormat: f = te,
|
|
22
|
-
outputQuality:
|
|
23
|
-
className:
|
|
24
|
-
testId:
|
|
25
|
-
id:
|
|
26
|
-
...
|
|
27
|
-
} = U,
|
|
28
|
-
|
|
22
|
+
outputQuality: v = re,
|
|
23
|
+
className: X,
|
|
24
|
+
testId: Y,
|
|
25
|
+
id: V,
|
|
26
|
+
...j
|
|
27
|
+
} = U, a = p(null), I = p(null), A = p(null), P = p(!1), [h, G] = B(!1), [E, Q] = B(!1);
|
|
28
|
+
D(() => {
|
|
29
29
|
const e = () => {
|
|
30
|
-
|
|
31
|
-
j(n);
|
|
30
|
+
Q(document.documentElement.classList.contains("dark"));
|
|
32
31
|
};
|
|
33
32
|
e();
|
|
34
33
|
const t = new MutationObserver(e);
|
|
35
34
|
return t.observe(document.documentElement, { attributes: !0, attributeFilter: ["class"] }), () => t.disconnect();
|
|
36
35
|
}, []);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
36
|
+
const k = F || (E ? se : ae), b = H || (E ? ne : oe), u = l(() => {
|
|
37
|
+
const e = a.current, t = e == null ? void 0 : e.getContext("2d");
|
|
38
|
+
!e || !t || (t.fillStyle = b === "transparent" ? "rgba(0,0,0,0)" : b, t.fillRect(0, 0, e.width, e.height));
|
|
39
|
+
}, [b]);
|
|
40
|
+
D(() => {
|
|
41
|
+
const e = a.current, t = I.current;
|
|
42
|
+
if (!e || !t) return;
|
|
43
|
+
const r = () => {
|
|
44
|
+
const i = t.getBoundingClientRect(), S = w ?? Math.round(i.width), y = m;
|
|
45
|
+
(e.width !== S || e.height !== y) && (e.width = S, e.height = y, u());
|
|
46
|
+
};
|
|
47
|
+
r();
|
|
48
|
+
const c = new ResizeObserver(r);
|
|
49
|
+
return c.observe(t), () => c.disconnect();
|
|
50
|
+
}, [w, m, u]), D(() => {
|
|
51
|
+
u();
|
|
52
|
+
}, [u, E]), D(() => {
|
|
53
|
+
const e = a.current;
|
|
54
|
+
if (!e || n || s) return;
|
|
55
|
+
const t = (r) => r.preventDefault();
|
|
47
56
|
return e.addEventListener("touchstart", t, { passive: !1 }), e.addEventListener("touchmove", t, { passive: !1 }), () => {
|
|
48
57
|
e.removeEventListener("touchstart", t), e.removeEventListener("touchmove", t);
|
|
49
58
|
};
|
|
50
|
-
}, [
|
|
51
|
-
const
|
|
52
|
-
const t =
|
|
59
|
+
}, [n, s]);
|
|
60
|
+
const g = l((e) => {
|
|
61
|
+
const t = a.current;
|
|
53
62
|
if (!t) return { x: 0, y: 0 };
|
|
54
|
-
const
|
|
63
|
+
const r = t.getBoundingClientRect(), c = t.width / r.width, i = t.height / r.height;
|
|
55
64
|
if ("touches" in e) {
|
|
56
|
-
const
|
|
65
|
+
const S = e.touches[0];
|
|
57
66
|
return {
|
|
58
|
-
x: (
|
|
59
|
-
y: (
|
|
67
|
+
x: (S.clientX - r.left) * c,
|
|
68
|
+
y: (S.clientY - r.top) * i
|
|
60
69
|
};
|
|
61
70
|
}
|
|
62
71
|
return {
|
|
63
|
-
x: (e.clientX -
|
|
64
|
-
y: (e.clientY -
|
|
72
|
+
x: (e.clientX - r.left) * c,
|
|
73
|
+
y: (e.clientY - r.top) * i
|
|
65
74
|
};
|
|
66
|
-
}, []),
|
|
67
|
-
if (
|
|
68
|
-
const t =
|
|
69
|
-
|
|
70
|
-
}, [
|
|
71
|
-
if (!
|
|
72
|
-
const t =
|
|
73
|
-
if (!t || !
|
|
74
|
-
const i =
|
|
75
|
-
|
|
76
|
-
}, [
|
|
77
|
-
if (
|
|
78
|
-
const e =
|
|
75
|
+
}, []), x = l((e) => {
|
|
76
|
+
if (n || s) return;
|
|
77
|
+
const t = g(e);
|
|
78
|
+
P.current = !0, A.current = t;
|
|
79
|
+
}, [n, s, g]), O = l((e) => {
|
|
80
|
+
if (!P.current || n || s) return;
|
|
81
|
+
const t = a.current, r = t == null ? void 0 : t.getContext("2d"), c = A.current;
|
|
82
|
+
if (!t || !r || !c) return;
|
|
83
|
+
const i = g(e);
|
|
84
|
+
r.beginPath(), r.moveTo(c.x, c.y), r.lineTo(i.x, i.y), r.strokeStyle = k, r.lineWidth = C, r.lineCap = "round", r.lineJoin = "round", r.stroke(), A.current = i, G(!0);
|
|
85
|
+
}, [n, s, k, C, g]), N = l(() => {
|
|
86
|
+
if (P.current) {
|
|
87
|
+
const e = a.current;
|
|
79
88
|
if (e && o) {
|
|
80
|
-
const t = e.toDataURL(f,
|
|
89
|
+
const t = e.toDataURL(f, v);
|
|
81
90
|
o(t);
|
|
82
91
|
}
|
|
83
92
|
}
|
|
84
|
-
|
|
85
|
-
}, [
|
|
86
|
-
const e =
|
|
87
|
-
!e || !t || (t.
|
|
88
|
-
}, [
|
|
89
|
-
const e =
|
|
90
|
-
if (!e || !
|
|
91
|
-
const t = e.toDataURL(f,
|
|
93
|
+
P.current = !1, A.current = null;
|
|
94
|
+
}, [o, f, v]), J = l(() => {
|
|
95
|
+
const e = a.current, t = e == null ? void 0 : e.getContext("2d");
|
|
96
|
+
!e || !t || (t.clearRect(0, 0, e.width, e.height), u(), G(!1), o == null || o(null));
|
|
97
|
+
}, [u, o]), q = l(() => {
|
|
98
|
+
const e = a.current;
|
|
99
|
+
if (!e || !h) return;
|
|
100
|
+
const t = e.toDataURL(f, v);
|
|
92
101
|
o == null || o(t);
|
|
93
|
-
}, [
|
|
94
|
-
return /* @__PURE__ */
|
|
102
|
+
}, [h, o, f, v]);
|
|
103
|
+
return /* @__PURE__ */ T(
|
|
95
104
|
"div",
|
|
96
105
|
{
|
|
97
|
-
id:
|
|
98
|
-
"data-testid":
|
|
99
|
-
className:
|
|
100
|
-
"Bear-SignPad bear-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
106
|
+
id: V,
|
|
107
|
+
"data-testid": Y,
|
|
108
|
+
className: _(
|
|
109
|
+
"Bear-SignPad bear-w-full",
|
|
110
|
+
he,
|
|
111
|
+
n && "Bear-SignPad--disabled bear-opacity-50",
|
|
112
|
+
s && "Bear-SignPad--readonly",
|
|
113
|
+
X
|
|
105
114
|
),
|
|
106
|
-
...
|
|
115
|
+
...j,
|
|
107
116
|
children: [
|
|
108
|
-
/* @__PURE__ */
|
|
117
|
+
/* @__PURE__ */ T(
|
|
109
118
|
"div",
|
|
110
119
|
{
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
"
|
|
120
|
+
ref: I,
|
|
121
|
+
className: _(
|
|
122
|
+
"Bear-SignPad__canvas-wrapper bear-w-full bear-overflow-hidden",
|
|
123
|
+
"bear-touch-none",
|
|
114
124
|
de,
|
|
115
|
-
!
|
|
116
|
-
|
|
117
|
-
!
|
|
125
|
+
!n && !s && ue,
|
|
126
|
+
n && "bear-cursor-not-allowed",
|
|
127
|
+
!n && !s && "bear-cursor-crosshair"
|
|
118
128
|
),
|
|
119
129
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
130
|
+
/* @__PURE__ */ d(
|
|
121
131
|
"canvas",
|
|
122
132
|
{
|
|
123
|
-
ref:
|
|
124
|
-
className: "Bear-SignPad__canvas bear-block bear-rounded-lg bear-
|
|
125
|
-
style: {
|
|
126
|
-
onMouseDown:
|
|
127
|
-
onMouseMove:
|
|
128
|
-
onMouseUp:
|
|
129
|
-
onMouseLeave:
|
|
130
|
-
onTouchStart:
|
|
131
|
-
onTouchMove:
|
|
132
|
-
onTouchEnd:
|
|
133
|
+
ref: a,
|
|
134
|
+
className: "Bear-SignPad__canvas bear-block bear-rounded-lg bear-w-full bear-touch-none",
|
|
135
|
+
style: { height: m },
|
|
136
|
+
onMouseDown: x,
|
|
137
|
+
onMouseMove: O,
|
|
138
|
+
onMouseUp: N,
|
|
139
|
+
onMouseLeave: N,
|
|
140
|
+
onTouchStart: x,
|
|
141
|
+
onTouchMove: O,
|
|
142
|
+
onTouchEnd: N
|
|
133
143
|
}
|
|
134
144
|
),
|
|
135
|
-
!
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */
|
|
145
|
+
!h && /* @__PURE__ */ d("div", { className: _("Bear-SignPad__placeholder", ce), children: K }),
|
|
146
|
+
/* @__PURE__ */ d("div", { className: _("Bear-SignPad__line", ie) }),
|
|
147
|
+
/* @__PURE__ */ d("span", { className: _("Bear-SignPad__x-mark", le), children: "×" })
|
|
138
148
|
]
|
|
139
149
|
}
|
|
140
150
|
),
|
|
141
|
-
(
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
{
|
|
145
|
-
size: "sm",
|
|
146
|
-
variant: "ghost",
|
|
147
|
-
onClick: z,
|
|
148
|
-
disabled: r || !c,
|
|
149
|
-
children: H
|
|
150
|
-
}
|
|
151
|
-
),
|
|
152
|
-
b && /* @__PURE__ */ l(
|
|
153
|
-
O,
|
|
154
|
-
{
|
|
155
|
-
size: "sm",
|
|
156
|
-
variant: "primary",
|
|
157
|
-
onClick: Q,
|
|
158
|
-
disabled: r || !c,
|
|
159
|
-
children: K
|
|
160
|
-
}
|
|
161
|
-
)
|
|
151
|
+
(L || R) && /* @__PURE__ */ T("div", { className: _("Bear-SignPad__actions", _e), children: [
|
|
152
|
+
L && /* @__PURE__ */ d(M, { size: "sm", variant: "ghost", onClick: J, disabled: n || !h, children: W }),
|
|
153
|
+
R && /* @__PURE__ */ d(M, { size: "sm", variant: "primary", onClick: q, disabled: n || !h, children: z })
|
|
162
154
|
] })
|
|
163
155
|
]
|
|
164
156
|
}
|
|
165
157
|
);
|
|
166
158
|
};
|
|
167
159
|
export {
|
|
168
|
-
|
|
160
|
+
ge as SignPad
|
|
169
161
|
};
|
|
@@ -2,9 +2,9 @@ import { HTMLAttributes } from 'react';
|
|
|
2
2
|
export interface SignPadProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
3
3
|
/** Callback when signature changes - receives base64 image data */
|
|
4
4
|
onChange?: (signature: string | null) => void;
|
|
5
|
-
/**
|
|
5
|
+
/** Canvas resolution width (internal pixels). CSS width is always 100% of container. */
|
|
6
6
|
width?: number;
|
|
7
|
-
/**
|
|
7
|
+
/** Canvas resolution height (internal pixels). Also sets the CSS height. */
|
|
8
8
|
height?: number;
|
|
9
9
|
/** Stroke color */
|
|
10
10
|
strokeColor?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),S=require("react"),_=require("../../utils/cn.cjs"),d=require("./Skeleton.const.cjs"),j=require("./Skeleton.utils.cjs"),a=S.forwardRef(({variant:e="text",animation:r="pulse",width:l,height:s,borderRadius:o,count:i=1,gap:u=8,className:n,style:f,testId:k,...N},m)=>{S.useEffect(()=>{r==="wave"&&j.injectStyles()},[r]);const x=c=>{if(c!==void 0)return typeof c=="number"?`${c}px`:c},p={width:x(l),height:x(s)||(e==="text"?d.SKELETON_TEXT_HEIGHT:void 0),borderRadius:o?x(o):void 0,...f},y=_.cn(d.SKELETON_BASE_CLASSES,d.SKELETON_VARIANT_CLASSES[e],d.SKELETON_ANIMATION_CLASSES[r],d.SKELETON_BG_CLASSES,n);return i>1?t.jsx("div",{className:"Bear-Skeleton__group flex flex-col",style:{gap:x(u)},"data-testid":k,children:Array.from({length:i}).map((c,g)=>t.jsx("div",{ref:g===0?m:void 0,className:y,style:p,...N},g))}):t.jsx("div",{ref:m,className:y,style:p,"data-testid":k,...N})});a.displayName="Skeleton";const E=S.forwardRef(({lines:e=3,lastLineWidth:r="80%",gap:l=8,animation:s="pulse",...o},i)=>{S.useEffect(()=>{s==="wave"&&j.injectStyles()},[s]);const u=n=>{if(n!==void 0)return typeof n=="number"?`${n}px`:n};return t.jsx("div",{ref:i,className:"Bear-SkeletonText flex flex-col",style:{gap:u(l)},children:Array.from({length:e}).map((n,f)=>t.jsx(a,{variant:"text",animation:s,width:f===e-1?r:"100%",...o},f))})});E.displayName="SkeletonText";const h=S.forwardRef(({size:e="md",animation:r="pulse",...l},s)=>{const o=typeof e=="number"?e:d.SKELETON_AVATAR_SIZES[e];return t.jsx(a,{ref:s,variant:"circular",animation:r,width:o,height:o,...l})});h.displayName="SkeletonAvatar";const A=S.forwardRef(({animation:e="pulse",className:r,...l},s)=>t.jsxs("div",{ref:s,className:_.cn("Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",r),...l,children:[t.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[t.jsx(h,{animation:e}),t.jsxs("div",{className:"flex-1",children:[t.jsx(a,{animation:e,width:"60%",height:16,className:"mb-2"}),t.jsx(a,{animation:e,width:"40%",height:12})]})]}),t.jsx(E,{animation:e,lines:3})]}));A.displayName="SkeletonCard";exports.Skeleton=a;exports.SkeletonAvatar=h;exports.SkeletonCard=A;exports.SkeletonText=E;
|
|
@@ -1,145 +1,140 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t, jsxs as f } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as m, useEffect as _ } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { SKELETON_BG_CLASSES as v, SKELETON_ANIMATION_CLASSES as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
if (typeof document < "u" && !document.getElementById(e)) {
|
|
8
|
-
const t = document.createElement("style");
|
|
9
|
-
t.id = e, t.textContent = K, document.head.appendChild(t);
|
|
10
|
-
}
|
|
11
|
-
}, i = m(
|
|
3
|
+
import { cn as k } from "../../utils/cn.js";
|
|
4
|
+
import { SKELETON_BG_CLASSES as v, SKELETON_ANIMATION_CLASSES as b, SKELETON_VARIANT_CLASSES as L, SKELETON_BASE_CLASSES as w, SKELETON_TEXT_HEIGHT as C, SKELETON_AVATAR_SIZES as O } from "./Skeleton.const.js";
|
|
5
|
+
import { injectStyles as x } from "./Skeleton.utils.js";
|
|
6
|
+
const S = m(
|
|
12
7
|
({
|
|
13
8
|
variant: e = "text",
|
|
14
|
-
animation:
|
|
15
|
-
width:
|
|
16
|
-
height:
|
|
17
|
-
borderRadius:
|
|
18
|
-
count:
|
|
19
|
-
gap:
|
|
20
|
-
className:
|
|
21
|
-
style:
|
|
22
|
-
testId:
|
|
23
|
-
...
|
|
24
|
-
},
|
|
9
|
+
animation: r = "pulse",
|
|
10
|
+
width: s,
|
|
11
|
+
height: l,
|
|
12
|
+
borderRadius: o,
|
|
13
|
+
count: a = 1,
|
|
14
|
+
gap: p = 8,
|
|
15
|
+
className: d,
|
|
16
|
+
style: n,
|
|
17
|
+
testId: h,
|
|
18
|
+
...E
|
|
19
|
+
}, N) => {
|
|
25
20
|
_(() => {
|
|
26
|
-
|
|
27
|
-
}, [
|
|
28
|
-
const c = (
|
|
29
|
-
if (
|
|
30
|
-
return typeof
|
|
31
|
-
},
|
|
32
|
-
width: c(
|
|
33
|
-
height: c(
|
|
34
|
-
borderRadius:
|
|
35
|
-
...
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
21
|
+
r === "wave" && x();
|
|
22
|
+
}, [r]);
|
|
23
|
+
const c = (i) => {
|
|
24
|
+
if (i !== void 0)
|
|
25
|
+
return typeof i == "number" ? `${i}px` : i;
|
|
26
|
+
}, g = {
|
|
27
|
+
width: c(s),
|
|
28
|
+
height: c(l) || (e === "text" ? C : void 0),
|
|
29
|
+
borderRadius: o ? c(o) : void 0,
|
|
30
|
+
...n
|
|
31
|
+
}, y = k(
|
|
32
|
+
w,
|
|
33
|
+
L[e],
|
|
34
|
+
b[r],
|
|
40
35
|
v,
|
|
41
|
-
|
|
36
|
+
d
|
|
42
37
|
);
|
|
43
|
-
return
|
|
38
|
+
return a > 1 ? /* @__PURE__ */ t(
|
|
44
39
|
"div",
|
|
45
40
|
{
|
|
46
41
|
className: "Bear-Skeleton__group flex flex-col",
|
|
47
|
-
style: { gap: c(
|
|
48
|
-
"data-testid":
|
|
49
|
-
children: Array.from({ length:
|
|
42
|
+
style: { gap: c(p) },
|
|
43
|
+
"data-testid": h,
|
|
44
|
+
children: Array.from({ length: a }).map((i, A) => /* @__PURE__ */ t(
|
|
50
45
|
"div",
|
|
51
46
|
{
|
|
52
|
-
ref:
|
|
53
|
-
className:
|
|
54
|
-
style:
|
|
55
|
-
...
|
|
47
|
+
ref: A === 0 ? N : void 0,
|
|
48
|
+
className: y,
|
|
49
|
+
style: g,
|
|
50
|
+
...E
|
|
56
51
|
},
|
|
57
|
-
|
|
52
|
+
A
|
|
58
53
|
))
|
|
59
54
|
}
|
|
60
|
-
) : /* @__PURE__ */
|
|
55
|
+
) : /* @__PURE__ */ t(
|
|
61
56
|
"div",
|
|
62
57
|
{
|
|
63
|
-
ref:
|
|
64
|
-
className:
|
|
65
|
-
style:
|
|
66
|
-
"data-testid":
|
|
67
|
-
...
|
|
58
|
+
ref: N,
|
|
59
|
+
className: y,
|
|
60
|
+
style: g,
|
|
61
|
+
"data-testid": h,
|
|
62
|
+
...E
|
|
68
63
|
}
|
|
69
64
|
);
|
|
70
65
|
}
|
|
71
66
|
);
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
({ lines: e = 3, lastLineWidth:
|
|
75
|
-
|
|
76
|
-
}, [
|
|
67
|
+
S.displayName = "Skeleton";
|
|
68
|
+
const T = m(
|
|
69
|
+
({ lines: e = 3, lastLineWidth: r = "80%", gap: s = 8, animation: l = "pulse", ...o }, a) => (_(() => {
|
|
70
|
+
l === "wave" && x();
|
|
71
|
+
}, [l]), /* @__PURE__ */ t(
|
|
77
72
|
"div",
|
|
78
73
|
{
|
|
79
|
-
ref:
|
|
74
|
+
ref: a,
|
|
80
75
|
className: "Bear-SkeletonText flex flex-col",
|
|
81
|
-
style: { gap: ((
|
|
82
|
-
if (
|
|
83
|
-
return typeof
|
|
84
|
-
})(
|
|
85
|
-
children: Array.from({ length: e }).map((
|
|
86
|
-
|
|
76
|
+
style: { gap: ((d) => {
|
|
77
|
+
if (d !== void 0)
|
|
78
|
+
return typeof d == "number" ? `${d}px` : d;
|
|
79
|
+
})(s) },
|
|
80
|
+
children: Array.from({ length: e }).map((d, n) => /* @__PURE__ */ t(
|
|
81
|
+
S,
|
|
87
82
|
{
|
|
88
83
|
variant: "text",
|
|
89
|
-
animation:
|
|
90
|
-
width:
|
|
91
|
-
...
|
|
84
|
+
animation: l,
|
|
85
|
+
width: n === e - 1 ? r : "100%",
|
|
86
|
+
...o
|
|
92
87
|
},
|
|
93
|
-
|
|
88
|
+
n
|
|
94
89
|
))
|
|
95
90
|
}
|
|
96
91
|
))
|
|
97
92
|
);
|
|
98
|
-
|
|
99
|
-
const
|
|
100
|
-
({ size: e = "md", animation:
|
|
101
|
-
const
|
|
102
|
-
return /* @__PURE__ */
|
|
103
|
-
|
|
93
|
+
T.displayName = "SkeletonText";
|
|
94
|
+
const u = m(
|
|
95
|
+
({ size: e = "md", animation: r = "pulse", ...s }, l) => {
|
|
96
|
+
const o = typeof e == "number" ? e : O[e];
|
|
97
|
+
return /* @__PURE__ */ t(
|
|
98
|
+
S,
|
|
104
99
|
{
|
|
105
|
-
ref:
|
|
100
|
+
ref: l,
|
|
106
101
|
variant: "circular",
|
|
107
|
-
animation:
|
|
108
|
-
width:
|
|
109
|
-
height:
|
|
110
|
-
...
|
|
102
|
+
animation: r,
|
|
103
|
+
width: o,
|
|
104
|
+
height: o,
|
|
105
|
+
...s
|
|
111
106
|
}
|
|
112
107
|
);
|
|
113
108
|
}
|
|
114
109
|
);
|
|
115
|
-
|
|
116
|
-
const
|
|
117
|
-
({ animation: e = "pulse", className:
|
|
110
|
+
u.displayName = "SkeletonAvatar";
|
|
111
|
+
const K = m(
|
|
112
|
+
({ animation: e = "pulse", className: r, ...s }, l) => /* @__PURE__ */ f(
|
|
118
113
|
"div",
|
|
119
114
|
{
|
|
120
|
-
ref:
|
|
121
|
-
className:
|
|
115
|
+
ref: l,
|
|
116
|
+
className: k(
|
|
122
117
|
"Bear-SkeletonCard p-4 rounded-lg border border-gray-200 dark:border-zinc-700 bg-white dark:bg-zinc-900",
|
|
123
|
-
|
|
118
|
+
r
|
|
124
119
|
),
|
|
125
|
-
...
|
|
120
|
+
...s,
|
|
126
121
|
children: [
|
|
127
122
|
/* @__PURE__ */ f("div", { className: "flex items-center gap-3 mb-4", children: [
|
|
128
|
-
/* @__PURE__ */
|
|
123
|
+
/* @__PURE__ */ t(u, { animation: e }),
|
|
129
124
|
/* @__PURE__ */ f("div", { className: "flex-1", children: [
|
|
130
|
-
/* @__PURE__ */
|
|
131
|
-
/* @__PURE__ */
|
|
125
|
+
/* @__PURE__ */ t(S, { animation: e, width: "60%", height: 16, className: "mb-2" }),
|
|
126
|
+
/* @__PURE__ */ t(S, { animation: e, width: "40%", height: 12 })
|
|
132
127
|
] })
|
|
133
128
|
] }),
|
|
134
|
-
/* @__PURE__ */
|
|
129
|
+
/* @__PURE__ */ t(T, { animation: e, lines: 3 })
|
|
135
130
|
]
|
|
136
131
|
}
|
|
137
132
|
)
|
|
138
133
|
);
|
|
139
|
-
|
|
134
|
+
K.displayName = "SkeletonCard";
|
|
140
135
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
136
|
+
S as Skeleton,
|
|
137
|
+
u as SkeletonAvatar,
|
|
138
|
+
K as SkeletonCard,
|
|
139
|
+
T as SkeletonText
|
|
145
140
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./Skeleton.const.cjs"),t="bear-skeleton-styles",o=()=>{if(typeof document<"u"&&!document.getElementById(t)){const e=document.createElement("style");e.id=t,e.textContent=n.SKELETON_WAVE_STYLES,document.head.appendChild(e)}};exports.injectStyles=o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const injectStyles: () => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SKELETON_WAVE_STYLES as n } from "./Skeleton.const.js";
|
|
2
|
+
const t = "bear-skeleton-styles", d = () => {
|
|
3
|
+
if (typeof document < "u" && !document.getElementById(t)) {
|
|
4
|
+
const e = document.createElement("style");
|
|
5
|
+
e.id = t, e.textContent = n, document.head.appendChild(e);
|
|
6
|
+
}
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
d as injectStyles
|
|
10
|
+
};
|
|
@@ -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"),u=require("react"),i=require("../../utils/cn.cjs"),V=require("./SliderRange.utils.cjs"),X={xs:{track:"bear-h-1",thumb:"bear-w-3 bear-h-3",height:"bear-h-6"},sm:{track:"bear-h-1.5",thumb:"bear-w-4 bear-h-4",height:"bear-h-8"},md:{track:"bear-h-2",thumb:"bear-w-5 bear-h-5",height:"bear-h-10"},lg:{track:"bear-h-2.5",thumb:"bear-w-6 bear-h-6",height:"bear-h-12"},xl:{track:"bear-h-3",thumb:"bear-w-7 bear-h-7",height:"bear-h-14"}},Y={primary:{track:"bear-bg-bear-500",thumb:"bear-bg-bear-500 bear-border-bear-600"},secondary:{track:"bear-bg-gray-500",thumb:"bear-bg-gray-500 bear-border-gray-600"},success:{track:"bear-bg-green-500",thumb:"bear-bg-green-500 bear-border-green-600"},warning:{track:"bear-bg-amber-500",thumb:"bear-bg-amber-500 bear-border-amber-600"},error:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},danger:{track:"bear-bg-red-500",thumb:"bear-bg-red-500 bear-border-red-600"},info:{track:"bear-bg-blue-500",thumb:"bear-bg-blue-500 bear-border-blue-600"},ghost:{track:"bear-bg-gray-400",thumb:"bear-bg-gray-400 bear-border-gray-500"},outline:{track:"bear-bg-gray-600",thumb:"bear-bg-white dark:bear-bg-gray-200 bear-border-gray-600 dark:bear-border-gray-400"}},A=({value:h,defaultValue:D=[20,80],min:e=0,max:t=100,step:d=1,size:I="md",color:$="primary",disabled:a=!1,onChange:s,onChangeCommitted:g,valueFormatter:B=f=>String(f),className:z,...O})=>{const[f,R]=u.useState(D),[b,L]=u.useState(null),w=u.useRef(null),y=h??f,[c,l]=y,k=(c-e)/(t-e)*100,E=(l-e)/(t-e)*100,m=X[I],x=Y[$],S=u.useCallback((r,v)=>{if(!w.current||a)return;const N=w.current.getBoundingClientRect(),P=Math.max(0,Math.min(1,(r-N.left)/N.width)),_=e+P*(t-e),T=V.stepValue(_,e,t,d);if(v==="min"){const n=[Math.min(T,l-d),l];h===void 0&&R(n),s==null||s(n)}else{const q=Math.max(T,c+d),n=[c,q];h===void 0&&R(n),s==null||s(n)}},[e,t,d,c,l,a,h,s]),j=(r,v)=>{a||(r.preventDefault(),L(v),S(r.clientX,v))},p=u.useCallback(r=>{b&&S(r.clientX,b)},[b,S]),M=u.useCallback(()=>{b&&(L(null),g==null||g(y))},[b,y,g]);return u.useEffect(()=>{if(b)return document.addEventListener("mousemove",p),document.addEventListener("mouseup",M),()=>{document.removeEventListener("mousemove",p),document.removeEventListener("mouseup",M)}},[b,p,M]),o.jsx("div",{className:i.cn("bear-relative bear-w-full bear-flex bear-items-center",m.height,a&&"bear-opacity-50 bear-cursor-not-allowed",z),"data-testid":"slider-range",...O,children:o.jsxs("div",{ref:w,className:i.cn("bear-relative bear-w-full bear-rounded-full bear-bg-gray-200 dark:bear-bg-gray-700",m.track,!a&&"bear-cursor-pointer"),children:[o.jsx("div",{className:i.cn("bear-absolute bear-inset-y-0 bear-left-0 bear-rounded-full",x.track),style:{left:`${k}%`,width:`${E-k}%`}}),o.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":c,"aria-label":"Range minimum",className:i.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,x.thumb,!a&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",b==="min"&&"bear-scale-125 bear-z-10"),style:{left:`${k}%`},onMouseDown:r=>j(r,"min")}),o.jsx("div",{role:"slider",tabIndex:a?-1:0,"aria-valuemin":e,"aria-valuemax":t,"aria-valuenow":l,"aria-label":"Range maximum",className:i.cn("bear-absolute bear-top-1/2 bear--translate-y-1/2 bear--translate-x-1/2 bear-rounded-full bear-border-2 bear-shadow-md",m.thumb,x.thumb,!a&&"bear-cursor-grab active:bear-cursor-grabbing hover:bear-scale-110",b==="max"&&"bear-scale-125 bear-z-10"),style:{left:`${E}%`},onMouseDown:r=>j(r,"max")})]})})};exports.SliderRange=A;
|