@forgedevstack/bear 1.0.2 → 1.0.4-alpha
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.cjs +1 -1
- package/dist/components/Accordion/Accordion.const.cjs +1 -0
- package/dist/components/Accordion/Accordion.const.d.ts +10 -0
- package/dist/components/Accordion/Accordion.const.js +8 -0
- package/dist/components/Accordion/Accordion.d.ts +1 -0
- package/dist/components/Accordion/Accordion.js +49 -44
- package/dist/components/Accordion/Accordion.types.d.ts +2 -0
- package/dist/components/Accordion/index.d.ts +3 -2
- package/dist/components/ActiveBar/ActiveBar.cjs +8 -0
- package/dist/components/ActiveBar/ActiveBar.d.ts +2 -0
- package/dist/components/ActiveBar/ActiveBar.js +90 -0
- package/dist/components/ActiveBar/ActiveBar.types.d.ts +16 -0
- package/dist/components/ActiveBar/index.d.ts +2 -0
- package/dist/components/ActivityItem/ActivityItem.cjs +1 -0
- package/dist/components/ActivityItem/ActivityItem.d.ts +7 -0
- package/dist/components/ActivityItem/ActivityItem.js +44 -0
- package/dist/components/ActivityItem/ActivityItem.types.d.ts +17 -0
- package/dist/components/ActivityItem/index.d.ts +2 -0
- package/dist/components/Alert/Alert.cjs +1 -1
- package/dist/components/Alert/Alert.const.cjs +1 -0
- package/dist/components/Alert/Alert.const.d.ts +14 -0
- package/dist/components/Alert/Alert.const.js +27 -0
- package/dist/components/Alert/Alert.js +54 -63
- package/dist/components/Alert/Alert.types.d.ts +3 -1
- package/dist/components/Avatar/Avatar.cjs +1 -1
- package/dist/components/Avatar/Avatar.const.cjs +1 -0
- package/dist/components/Avatar/Avatar.const.d.ts +28 -0
- package/dist/components/Avatar/Avatar.const.js +28 -0
- package/dist/components/Avatar/Avatar.js +49 -60
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.cjs +1 -1
- package/dist/components/Badge/Badge.js +24 -22
- package/dist/components/BearLogo/EmberLogo.cjs +17 -0
- package/dist/components/BearLogo/EmberLogo.js +91 -0
- package/dist/components/BearLogo/index.d.ts +2 -0
- package/dist/components/Box/Box.cjs +1 -0
- package/dist/components/Box/Box.d.ts +2 -0
- package/dist/components/Box/Box.js +64 -0
- package/dist/components/Box/Box.types.d.ts +24 -0
- package/dist/components/Box/Box.utils.cjs +1 -0
- package/dist/components/Box/Box.utils.d.ts +3 -0
- package/dist/components/Box/Box.utils.js +21 -0
- package/dist/components/Box/index.d.ts +2 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.cjs +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.const.cjs +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.const.d.ts +16 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.const.js +19 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +49 -34
- package/dist/components/Breadcrumbs/Breadcrumbs.types.d.ts +8 -1
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +1 -1
- package/dist/components/Button/Button.constants.d.ts +2 -2
- package/dist/components/Button/Button.constants.js +2 -2
- package/dist/components/Button/Button.js +41 -46
- package/dist/components/Calendar/Calendar.cjs +1 -1
- package/dist/components/Calendar/Calendar.const.cjs +1 -0
- package/dist/components/Calendar/Calendar.const.d.ts +18 -0
- package/dist/components/Calendar/Calendar.const.js +27 -0
- package/dist/components/Calendar/Calendar.helpers.cjs +1 -0
- package/dist/components/Calendar/Calendar.helpers.d.ts +10 -0
- package/dist/components/Calendar/Calendar.helpers.js +9 -0
- package/dist/components/Calendar/Calendar.js +132 -149
- package/dist/components/Calendar/Calendar.types.d.ts +4 -0
- package/dist/components/Calendar/Calendar.utils.cjs +1 -0
- package/dist/components/Calendar/Calendar.utils.d.ts +41 -0
- package/dist/components/Calendar/Calendar.utils.js +33 -0
- package/dist/components/Calendar/index.d.ts +2 -0
- package/dist/components/Card/Card.cjs +1 -1
- package/dist/components/Card/Card.const.cjs +1 -0
- package/dist/components/Card/Card.const.d.ts +13 -0
- package/dist/components/Card/Card.const.js +32 -0
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Card/Card.js +101 -105
- package/dist/components/Card/index.d.ts +3 -2
- package/dist/components/Chart/Chart.cjs +1 -0
- package/dist/components/Chart/Chart.const.d.ts +15 -0
- package/dist/components/Chart/Chart.d.ts +18 -0
- package/dist/components/Chart/Chart.js +225 -0
- package/dist/components/Chart/Chart.types.d.ts +51 -0
- package/dist/components/Chart/Chart.utils.d.ts +31 -0
- package/dist/components/Chart/index.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.cjs +2 -0
- package/dist/components/CodeBlock/CodeBlock.d.ts +2 -0
- package/dist/components/CodeBlock/CodeBlock.js +68 -0
- package/dist/components/CodeBlock/CodeBlock.types.d.ts +21 -0
- package/dist/components/CodeBlock/index.d.ts +2 -0
- package/dist/components/Columns/Columns.cjs +1 -0
- package/dist/components/Columns/Columns.d.ts +5 -0
- package/dist/components/Columns/Columns.js +54 -0
- package/dist/components/Columns/Columns.types.d.ts +17 -0
- package/dist/components/Columns/index.d.ts +2 -0
- package/dist/components/DateTimePicker/DateTimePicker.cjs +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js +28 -28
- package/dist/components/Editable/Editable.cjs +1 -0
- package/dist/components/Editable/Editable.d.ts +10 -0
- package/dist/components/Editable/Editable.js +194 -0
- package/dist/components/Editable/Editable.types.d.ts +39 -0
- package/dist/components/Editable/index.d.ts +2 -0
- package/dist/components/Em/Em.cjs +1 -0
- package/dist/components/Em/Em.d.ts +2 -0
- package/dist/components/Em/Em.js +24 -0
- package/dist/components/Em/Em.types.d.ts +5 -0
- package/dist/components/Em/index.d.ts +2 -0
- package/dist/components/Fab/Fab.cjs +1 -1
- package/dist/components/Fab/Fab.js +9 -9
- package/dist/components/Gauge/Gauge.cjs +1 -0
- package/dist/components/Gauge/Gauge.d.ts +3 -0
- package/dist/components/Gauge/Gauge.js +92 -0
- package/dist/components/Gauge/Gauge.types.d.ts +27 -0
- package/dist/components/Gauge/index.d.ts +2 -0
- package/dist/components/Highlight/Highlight.cjs +1 -0
- package/dist/components/Highlight/Highlight.d.ts +2 -0
- package/dist/components/Highlight/Highlight.js +28 -0
- package/dist/components/Highlight/Highlight.types.d.ts +6 -0
- package/dist/components/Highlight/index.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.cjs +6 -0
- package/dist/components/HoverCard/HoverCard.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.js +68 -0
- package/dist/components/HoverCard/HoverCard.types.d.ts +13 -0
- package/dist/components/HoverCard/HoverCard.utils.cjs +1 -0
- package/dist/components/HoverCard/HoverCard.utils.d.ts +2 -0
- package/dist/components/HoverCard/HoverCard.utils.js +23 -0
- package/dist/components/HoverCard/index.d.ts +2 -0
- package/dist/components/Icon/icons/editor.cjs +1 -1
- package/dist/components/Icon/icons/editor.d.ts +1 -0
- package/dist/components/Icon/icons/editor.js +66 -61
- package/dist/components/Icon/icons/misc.cjs +1 -1
- package/dist/components/Icon/icons/misc.d.ts +13 -0
- package/dist/components/Icon/icons/misc.js +157 -88
- package/dist/components/Icon/icons/status.js +1 -1
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +27 -0
- package/dist/components/Icon/index.js +28 -21
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +36 -35
- package/dist/components/Mark/Mark.cjs +1 -0
- package/dist/components/Mark/Mark.d.ts +2 -0
- package/dist/components/Mark/Mark.js +26 -0
- package/dist/components/Mark/Mark.types.d.ts +5 -0
- package/dist/components/Mark/index.d.ts +2 -0
- package/dist/components/Modal/Modal.cjs +1 -1
- package/dist/components/Modal/Modal.const.cjs +1 -0
- package/dist/components/Modal/Modal.const.d.ts +10 -0
- package/dist/components/Modal/Modal.const.js +17 -0
- package/dist/components/Modal/Modal.d.ts +11 -0
- package/dist/components/Modal/Modal.js +80 -77
- package/dist/components/Modal/Modal.types.d.ts +6 -1
- package/dist/components/Modal/index.d.ts +3 -2
- package/dist/components/Rating/Rating.cjs +1 -1
- package/dist/components/Rating/Rating.const.cjs +1 -0
- package/dist/components/Rating/Rating.const.d.ts +14 -0
- package/dist/components/Rating/Rating.const.js +22 -0
- package/dist/components/Rating/Rating.d.ts +5 -10
- package/dist/components/Rating/Rating.js +135 -93
- package/dist/components/Rating/Rating.types.d.ts +27 -25
- package/dist/components/Rating/index.d.ts +2 -2
- package/dist/components/RichEditor/RichEditor.cjs +1 -0
- package/dist/components/RichEditor/RichEditor.const.cjs +141 -0
- package/dist/components/RichEditor/RichEditor.const.d.ts +137 -0
- package/dist/components/RichEditor/RichEditor.const.js +279 -0
- package/dist/components/RichEditor/RichEditor.d.ts +18 -0
- package/dist/components/RichEditor/RichEditor.js +363 -0
- package/dist/components/RichEditor/RichEditor.types.d.ts +57 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarButton/ToolbarButton.js +25 -0
- package/dist/components/RichEditor/components/ToolbarButton/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/ToolbarColorPicker.js +126 -0
- package/dist/components/RichEditor/components/ToolbarColorPicker/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.d.ts +4 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/ToolbarDropdown.js +57 -0
- package/dist/components/RichEditor/components/ToolbarDropdown/index.d.ts +1 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.cjs +1 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.d.ts +7 -0
- package/dist/components/RichEditor/components/ToolbarMore/ToolbarMore.js +45 -0
- package/dist/components/RichEditor/components/ToolbarMore/index.d.ts +2 -0
- package/dist/components/RichEditor/components/index.d.ts +4 -0
- package/dist/components/RichEditor/helpers/formatHelpers.cjs +1 -0
- package/dist/components/RichEditor/helpers/formatHelpers.d.ts +57 -0
- package/dist/components/RichEditor/helpers/formatHelpers.js +26 -0
- package/dist/components/RichEditor/helpers/index.d.ts +1 -0
- package/dist/components/RichEditor/index.d.ts +4 -0
- package/dist/components/Sidebar/Sidebar.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.const.cjs +1 -0
- package/dist/components/Sidebar/Sidebar.const.d.ts +16 -0
- package/dist/components/Sidebar/Sidebar.const.js +22 -0
- package/dist/components/Sidebar/Sidebar.d.ts +17 -0
- package/dist/components/Sidebar/Sidebar.js +70 -0
- package/dist/components/Sidebar/Sidebar.types.d.ts +44 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.cjs +1 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.d.ts +4 -0
- package/dist/components/Sidebar/components/SidebarGroup/SidebarGroup.js +45 -0
- package/dist/components/Sidebar/components/SidebarGroup/index.d.ts +2 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.cjs +1 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.d.ts +4 -0
- package/dist/components/Sidebar/components/SidebarItem/SidebarItem.js +66 -0
- package/dist/components/Sidebar/components/SidebarItem/index.d.ts +2 -0
- package/dist/components/Sidebar/components/index.d.ts +2 -0
- package/dist/components/Sidebar/index.d.ts +5 -0
- package/dist/components/SignPad/SignPad.cjs +1 -0
- package/dist/components/SignPad/SignPad.const.cjs +1 -0
- package/dist/components/SignPad/SignPad.const.d.ts +19 -0
- package/dist/components/SignPad/SignPad.const.js +20 -0
- package/dist/components/SignPad/SignPad.d.ts +17 -0
- package/dist/components/SignPad/SignPad.js +161 -0
- package/dist/components/SignPad/SignPad.types.d.ts +37 -0
- package/dist/components/SignPad/index.d.ts +3 -0
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.const.cjs +36 -0
- package/dist/components/Skeleton/Skeleton.const.d.ts +12 -0
- package/dist/components/Skeleton/Skeleton.const.js +58 -0
- package/dist/components/Skeleton/Skeleton.d.ts +15 -24
- package/dist/components/Skeleton/Skeleton.js +132 -103
- package/dist/components/Skeleton/Skeleton.types.d.ts +18 -8
- package/dist/components/Skeleton/index.d.ts +2 -2
- package/dist/components/Slider/Slider.cjs +1 -1
- package/dist/components/Slider/Slider.js +8 -8
- package/dist/components/Sparkline/Sparkline.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.const.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.const.d.ts +16 -0
- package/dist/components/Sparkline/Sparkline.const.js +16 -0
- package/dist/components/Sparkline/Sparkline.d.ts +3 -0
- package/dist/components/Sparkline/Sparkline.js +80 -0
- package/dist/components/Sparkline/Sparkline.types.d.ts +19 -0
- package/dist/components/Sparkline/Sparkline.utils.cjs +1 -0
- package/dist/components/Sparkline/Sparkline.utils.d.ts +27 -0
- package/dist/components/Sparkline/Sparkline.utils.js +30 -0
- package/dist/components/Sparkline/index.d.ts +5 -0
- package/dist/components/SpeedDial/SpeedDial.cjs +12 -1
- package/dist/components/SpeedDial/SpeedDial.const.cjs +1 -0
- package/dist/components/SpeedDial/SpeedDial.const.d.ts +22 -0
- package/dist/components/SpeedDial/SpeedDial.const.js +26 -0
- package/dist/components/SpeedDial/SpeedDial.d.ts +5 -7
- package/dist/components/SpeedDial/SpeedDial.js +154 -144
- package/dist/components/SpeedDial/SpeedDial.types.d.ts +26 -29
- package/dist/components/SpeedDial/index.d.ts +1 -1
- package/dist/components/Spinner/Spinner.cjs +1 -1
- package/dist/components/Spinner/Spinner.js +17 -15
- package/dist/components/StatCard/StatCard.cjs +1 -0
- package/dist/components/StatCard/StatCard.d.ts +7 -0
- package/dist/components/StatCard/StatCard.js +36 -0
- package/dist/components/StatCard/StatCard.types.d.ts +13 -0
- package/dist/components/StatCard/index.d.ts +2 -0
- package/dist/components/Stepper/Stepper.cjs +1 -1
- package/dist/components/Stepper/Stepper.const.cjs +1 -0
- package/dist/components/Stepper/Stepper.const.d.ts +29 -0
- package/dist/components/Stepper/Stepper.const.js +46 -0
- package/dist/components/Stepper/Stepper.d.ts +10 -3
- package/dist/components/Stepper/Stepper.js +143 -92
- package/dist/components/Stepper/Stepper.types.d.ts +63 -13
- package/dist/components/Stepper/index.d.ts +2 -2
- package/dist/components/Switch/Switch.cjs +1 -1
- package/dist/components/Switch/Switch.js +74 -47
- package/dist/components/Switch/Switch.types.d.ts +11 -1
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +33 -29
- package/dist/components/TimePicker/TimePicker.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.cjs +1 -1
- package/dist/components/TimePicker/TimePicker.constants.d.ts +14 -0
- package/dist/components/TimePicker/TimePicker.constants.js +18 -4
- package/dist/components/TimePicker/TimePicker.js +92 -91
- package/dist/components/Timeline/Timeline.cjs +1 -1
- package/dist/components/Timeline/Timeline.const.cjs +1 -0
- package/dist/components/Timeline/Timeline.const.d.ts +40 -0
- package/dist/components/Timeline/Timeline.const.js +58 -0
- package/dist/components/Timeline/Timeline.d.ts +16 -2
- package/dist/components/Timeline/Timeline.js +131 -63
- package/dist/components/Timeline/Timeline.types.d.ts +30 -11
- package/dist/components/Timeline/index.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +37 -35
- package/dist/components/Typography/Typography.cjs +1 -1
- package/dist/components/Typography/Typography.js +38 -36
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +38 -4
- package/dist/components/index.js +213 -168
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +24 -0
- package/dist/hooks/index.js +42 -14
- package/dist/hooks/useBounce/index.d.ts +2 -0
- package/dist/hooks/useBounce/useBounce.cjs +1 -0
- package/dist/hooks/useBounce/useBounce.d.ts +2 -0
- package/dist/hooks/useBounce/useBounce.js +36 -0
- package/dist/hooks/useBounce/useBounce.types.d.ts +27 -0
- package/dist/hooks/useClickOutside/index.d.ts +2 -0
- package/dist/hooks/useClickOutside/useClickOutside.d.ts +22 -0
- package/dist/hooks/useClickOutside/useClickOutside.types.d.ts +10 -0
- package/dist/hooks/useClipboard/index.d.ts +2 -0
- package/dist/hooks/useClipboard/useClipboard.cjs +1 -0
- package/dist/hooks/useClipboard/useClipboard.d.ts +15 -0
- package/dist/hooks/useClipboard/useClipboard.js +22 -0
- package/dist/hooks/useClipboard/useClipboard.types.d.ts +20 -0
- package/dist/hooks/useDebounce/index.d.ts +2 -0
- package/dist/hooks/useDebounce/useDebounce.cjs +1 -0
- package/dist/hooks/useDebounce/useDebounce.d.ts +32 -0
- package/dist/hooks/useDebounce/useDebounce.js +39 -0
- package/dist/hooks/useDebounce/useDebounce.types.d.ts +20 -0
- package/dist/hooks/useFloat/index.d.ts +2 -0
- package/dist/hooks/useFloat/useFloat.cjs +1 -0
- package/dist/hooks/useFloat/useFloat.d.ts +2 -0
- package/dist/hooks/useFloat/useFloat.js +37 -0
- package/dist/hooks/useFloat/useFloat.types.d.ts +25 -0
- package/dist/hooks/useIntersectionObserver/index.d.ts +2 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.cjs +1 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.d.ts +25 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.js +39 -0
- package/dist/hooks/useIntersectionObserver/useIntersectionObserver.types.d.ts +22 -0
- package/dist/hooks/useKeyPress/index.d.ts +2 -0
- package/dist/hooks/useKeyPress/useKeyPress.cjs +1 -0
- package/dist/hooks/useKeyPress/useKeyPress.d.ts +22 -0
- package/dist/hooks/useKeyPress/useKeyPress.js +39 -0
- package/dist/hooks/useKeyPress/useKeyPress.types.d.ts +19 -0
- package/dist/hooks/useLocalStorage/index.d.ts +2 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.cjs +1 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.d.ts +11 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.js +47 -0
- package/dist/hooks/useLocalStorage/useLocalStorage.types.d.ts +16 -0
- package/dist/hooks/useMediaQuery/index.d.ts +3 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.d.ts +12 -0
- package/dist/hooks/useMediaQuery/useMediaQuery.types.d.ts +21 -0
- package/dist/hooks/useParallax/index.d.ts +2 -0
- package/dist/hooks/useParallax/useParallax.cjs +1 -0
- package/dist/hooks/useParallax/useParallax.d.ts +2 -0
- package/dist/hooks/useParallax/useParallax.js +36 -0
- package/dist/hooks/useParallax/useParallax.types.d.ts +19 -0
- package/dist/hooks/usePulse/index.d.ts +2 -0
- package/dist/hooks/usePulse/usePulse.cjs +1 -0
- package/dist/hooks/usePulse/usePulse.d.ts +2 -0
- package/dist/hooks/usePulse/usePulse.js +38 -0
- package/dist/hooks/usePulse/usePulse.types.d.ts +29 -0
- package/dist/hooks/useShake/index.d.ts +2 -0
- package/dist/hooks/useShake/useShake.cjs +1 -0
- package/dist/hooks/useShake/useShake.d.ts +2 -0
- package/dist/hooks/useShake/useShake.js +14 -0
- package/dist/hooks/useShake/useShake.types.d.ts +19 -0
- package/dist/hooks/useSlide/index.d.ts +2 -0
- package/dist/hooks/useSlide/useSlide.cjs +1 -0
- package/dist/hooks/useSlide/useSlide.d.ts +2 -0
- package/dist/hooks/useSlide/useSlide.js +68 -0
- package/dist/hooks/useSlide/useSlide.types.d.ts +36 -0
- package/dist/hooks/useThrottle/index.d.ts +2 -0
- package/dist/hooks/useThrottle/useThrottle.cjs +1 -0
- package/dist/hooks/useThrottle/useThrottle.d.ts +26 -0
- package/dist/hooks/useThrottle/useThrottle.js +44 -0
- package/dist/hooks/useThrottle/useThrottle.types.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +275 -202
- package/dist/styles.css +1 -1
- package/package.json +15 -22
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SpeedDialDirection, SpeedDialSize } from './SpeedDial.types';
|
|
2
|
+
export declare const SPEED_DIAL_BASE = "Bear-SpeedDial relative inline-flex flex-col items-center";
|
|
3
|
+
export declare const SPEED_DIAL_POSITIONS: {
|
|
4
|
+
'bottom-right': string;
|
|
5
|
+
'bottom-left': string;
|
|
6
|
+
'top-right': string;
|
|
7
|
+
'top-left': string;
|
|
8
|
+
};
|
|
9
|
+
export declare const SPEED_DIAL_DIRECTIONS: Record<SpeedDialDirection, {
|
|
10
|
+
container: string;
|
|
11
|
+
item: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const SPEED_DIAL_MAIN_BUTTON = "Bear-SpeedDial__trigger rounded-full shadow-lg transition-all duration-200";
|
|
14
|
+
export declare const SPEED_DIAL_MAIN_SIZES: Record<SpeedDialSize, string>;
|
|
15
|
+
export declare const SPEED_DIAL_MAIN_COLORS = "bg-pink-500 hover:bg-pink-600 text-white";
|
|
16
|
+
export declare const SPEED_DIAL_ACTION = "Bear-SpeedDial__action rounded-full shadow-md transition-all duration-200";
|
|
17
|
+
export declare const SPEED_DIAL_ACTION_SIZES: Record<SpeedDialSize, string>;
|
|
18
|
+
export declare const SPEED_DIAL_ACTION_COLORS = "bg-white dark:bg-zinc-800 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-zinc-700";
|
|
19
|
+
export declare const SPEED_DIAL_ACTIONS_CONTAINER = "Bear-SpeedDial__actions absolute flex items-center gap-2";
|
|
20
|
+
export declare const SPEED_DIAL_LABEL = "Bear-SpeedDial__label px-2 py-1 text-xs font-medium bg-gray-900 dark:bg-white text-white dark:text-gray-900 rounded shadow-md whitespace-nowrap";
|
|
21
|
+
export declare const SPEED_DIAL_ENTER = "animate-in fade-in zoom-in-95";
|
|
22
|
+
export declare const SPEED_DIAL_EXIT = "animate-out fade-out zoom-out-95";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const t = "Bear-SpeedDial relative inline-flex flex-col items-center", e = {
|
|
2
|
+
"bottom-right": "fixed bottom-6 right-6",
|
|
3
|
+
"bottom-left": "fixed bottom-6 left-6",
|
|
4
|
+
"top-right": "fixed top-6 right-6",
|
|
5
|
+
"top-left": "fixed top-6 left-6"
|
|
6
|
+
}, o = "Bear-SpeedDial__trigger rounded-full shadow-lg transition-all duration-200", a = {
|
|
7
|
+
sm: "w-12 h-12",
|
|
8
|
+
md: "w-14 h-14",
|
|
9
|
+
lg: "w-16 h-16"
|
|
10
|
+
}, i = "bg-pink-500 hover:bg-pink-600 text-white", r = "Bear-SpeedDial__action rounded-full shadow-md transition-all duration-200", _ = {
|
|
11
|
+
sm: "w-9 h-9",
|
|
12
|
+
md: "w-10 h-10",
|
|
13
|
+
lg: "w-12 h-12"
|
|
14
|
+
}, n = "bg-white dark:bg-zinc-800 text-gray-700 dark:text-gray-300 hover:bg-gray-100 dark:hover:bg-zinc-700", d = "Bear-SpeedDial__actions absolute flex items-center gap-2", l = "Bear-SpeedDial__label px-2 py-1 text-xs font-medium bg-gray-900 dark:bg-white text-white dark:text-gray-900 rounded shadow-md whitespace-nowrap";
|
|
15
|
+
export {
|
|
16
|
+
r as SPEED_DIAL_ACTION,
|
|
17
|
+
d as SPEED_DIAL_ACTIONS_CONTAINER,
|
|
18
|
+
n as SPEED_DIAL_ACTION_COLORS,
|
|
19
|
+
_ as SPEED_DIAL_ACTION_SIZES,
|
|
20
|
+
t as SPEED_DIAL_BASE,
|
|
21
|
+
l as SPEED_DIAL_LABEL,
|
|
22
|
+
o as SPEED_DIAL_MAIN_BUTTON,
|
|
23
|
+
i as SPEED_DIAL_MAIN_COLORS,
|
|
24
|
+
a as SPEED_DIAL_MAIN_SIZES,
|
|
25
|
+
e as SPEED_DIAL_POSITIONS
|
|
26
|
+
};
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { SpeedDialProps } from './SpeedDial.types';
|
|
3
2
|
/**
|
|
4
|
-
* SpeedDial - Floating action button
|
|
3
|
+
* SpeedDial - Floating action button with expandable actions
|
|
5
4
|
*
|
|
6
5
|
* @example
|
|
7
6
|
* ```tsx
|
|
8
7
|
* <SpeedDial
|
|
9
8
|
* actions={[
|
|
10
|
-
* {
|
|
11
|
-
* {
|
|
12
|
-
* {
|
|
9
|
+
* { label: 'Copy', icon: <CopyIcon />, onClick: handleCopy },
|
|
10
|
+
* { label: 'Print', icon: <PrintIcon />, onClick: handlePrint },
|
|
11
|
+
* { label: 'Share', icon: <ShareIcon />, onClick: handleShare },
|
|
13
12
|
* ]}
|
|
14
13
|
* position="bottom-right"
|
|
15
|
-
* direction="up"
|
|
16
14
|
* />
|
|
17
15
|
* ```
|
|
18
16
|
*/
|
|
19
|
-
export declare const SpeedDial:
|
|
17
|
+
export declare const SpeedDial: import('react').ForwardRefExoticComponent<SpeedDialProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
20
18
|
export default SpeedDial;
|
|
@@ -1,150 +1,160 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as T, useState as R, useRef as B, useCallback as E, useEffect as I } from "react";
|
|
3
|
+
import { cn as n } from "../../utils/cn.js";
|
|
4
|
+
import { SPEED_DIAL_LABEL as M, SPEED_DIAL_ACTION_COLORS as j, SPEED_DIAL_ACTION_SIZES as U, SPEED_DIAL_ACTION as W, SPEED_DIAL_ACTIONS_CONTAINER as Y, SPEED_DIAL_MAIN_COLORS as Z, SPEED_DIAL_MAIN_SIZES as z, SPEED_DIAL_MAIN_BUTTON as $, SPEED_DIAL_POSITIONS as q, SPEED_DIAL_BASE as F } from "./SpeedDial.const.js";
|
|
5
|
+
const G = ({ className: o }) => /* @__PURE__ */ i("svg", { className: o, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
6
|
+
/* @__PURE__ */ t("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
7
|
+
/* @__PURE__ */ t("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
8
|
+
] }), J = ({ className: o }) => /* @__PURE__ */ i("svg", { className: o, width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
9
|
+
/* @__PURE__ */ t("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
10
|
+
/* @__PURE__ */ t("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
11
|
+
] }), K = T(
|
|
12
|
+
({
|
|
13
|
+
actions: o,
|
|
14
|
+
icon: y,
|
|
15
|
+
openIcon: S,
|
|
16
|
+
direction: c = "up",
|
|
17
|
+
size: f = "md",
|
|
18
|
+
position: u,
|
|
19
|
+
fixed: _ = !0,
|
|
20
|
+
openOnHover: m = !1,
|
|
21
|
+
open: p,
|
|
22
|
+
onOpenChange: a,
|
|
23
|
+
showLabels: h = !0,
|
|
24
|
+
ariaLabel: x = "Speed dial",
|
|
25
|
+
testId: A,
|
|
26
|
+
className: D,
|
|
27
|
+
...b
|
|
28
|
+
}, L) => {
|
|
29
|
+
const [v, w] = R(!1), d = B(null), l = p !== void 0 ? p : v, s = E((e) => {
|
|
30
|
+
w(e), a == null || a(e);
|
|
31
|
+
}, [a]), N = E(() => {
|
|
32
|
+
s(!l);
|
|
33
|
+
}, [l, s]);
|
|
34
|
+
I(() => {
|
|
35
|
+
const e = (r) => {
|
|
36
|
+
d.current && !d.current.contains(r.target) && s(!1);
|
|
37
|
+
};
|
|
38
|
+
if (l)
|
|
39
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
40
|
+
}, [l, s]), I(() => {
|
|
41
|
+
const e = (r) => {
|
|
42
|
+
r.key === "Escape" && s(!1);
|
|
43
|
+
};
|
|
44
|
+
if (l)
|
|
45
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
46
|
+
}, [l, s]);
|
|
47
|
+
const k = z[f], P = U[f], C = () => {
|
|
48
|
+
switch (c) {
|
|
49
|
+
case "up":
|
|
50
|
+
return "bottom-full left-1/2 -translate-x-1/2 pb-3 flex-col-reverse";
|
|
51
|
+
case "down":
|
|
52
|
+
return "top-full left-1/2 -translate-x-1/2 pt-3 flex-col";
|
|
53
|
+
case "left":
|
|
54
|
+
return "right-full top-1/2 -translate-y-1/2 pr-3 flex-row-reverse";
|
|
55
|
+
case "right":
|
|
56
|
+
return "left-full top-1/2 -translate-y-1/2 pl-3 flex-row";
|
|
57
|
+
default:
|
|
58
|
+
return "";
|
|
59
|
+
}
|
|
60
|
+
}, g = (e) => {
|
|
61
|
+
switch (e.tooltipPosition || (c === "up" || c === "down" ? "left" : "top")) {
|
|
62
|
+
case "left":
|
|
63
|
+
return "right-full mr-2";
|
|
64
|
+
case "right":
|
|
65
|
+
return "left-full ml-2";
|
|
66
|
+
case "top":
|
|
67
|
+
return "bottom-full mb-2";
|
|
68
|
+
case "bottom":
|
|
69
|
+
return "top-full mt-2";
|
|
70
|
+
default:
|
|
71
|
+
return "right-full mr-2";
|
|
72
|
+
}
|
|
73
|
+
}, O = (e) => {
|
|
74
|
+
var r;
|
|
75
|
+
e.disabled || ((r = e.onClick) == null || r.call(e), s(!1));
|
|
52
76
|
};
|
|
53
|
-
return
|
|
54
|
-
|
|
55
|
-
const e = (a) => {
|
|
56
|
-
a.key === "Escape" && t && (l || o(!1), r == null || r(!1));
|
|
57
|
-
};
|
|
58
|
-
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
59
|
-
}, [t, l, r]);
|
|
60
|
-
const W = () => {
|
|
61
|
-
if (u !== "auto") return u;
|
|
62
|
-
switch (i) {
|
|
63
|
-
case "up":
|
|
64
|
-
case "down":
|
|
65
|
-
return n.includes("right") ? "left" : "right";
|
|
66
|
-
case "left":
|
|
67
|
-
case "right":
|
|
68
|
-
return "top";
|
|
69
|
-
}
|
|
70
|
-
}, F = (e, a) => {
|
|
71
|
-
const y = /* @__PURE__ */ s(
|
|
72
|
-
p,
|
|
77
|
+
return /* @__PURE__ */ i(
|
|
78
|
+
"div",
|
|
73
79
|
{
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
"bear-rounded-full bear-shadow-lg bear-transition-all bear-duration-200",
|
|
80
|
-
"bear-w-12 bear-h-12 bear-p-0 bear-flex bear-items-center bear-justify-center",
|
|
81
|
-
t ? "bear-opacity-100 bear-scale-100" : "bear-opacity-0 bear-scale-75 bear-pointer-events-none"
|
|
80
|
+
ref: d,
|
|
81
|
+
className: n(
|
|
82
|
+
F,
|
|
83
|
+
_ && u && q[u],
|
|
84
|
+
D
|
|
82
85
|
),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
children:
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
86
|
+
"data-testid": A,
|
|
87
|
+
onMouseEnter: m ? () => s(!0) : void 0,
|
|
88
|
+
onMouseLeave: m ? () => s(!1) : void 0,
|
|
89
|
+
...b,
|
|
90
|
+
children: [
|
|
91
|
+
l && /* @__PURE__ */ t("div", { className: n(Y, C()), children: o.map((e, r) => /* @__PURE__ */ i(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: "relative flex items-center",
|
|
95
|
+
style: {
|
|
96
|
+
animation: `fadeInUp 150ms ease-out ${r * 50}ms forwards`,
|
|
97
|
+
opacity: 0
|
|
98
|
+
},
|
|
99
|
+
children: [
|
|
100
|
+
h && /* @__PURE__ */ t("span", { className: n(M, g(e)), children: e.label }),
|
|
101
|
+
/* @__PURE__ */ t(
|
|
102
|
+
"button",
|
|
103
|
+
{
|
|
104
|
+
type: "button",
|
|
105
|
+
className: n(
|
|
106
|
+
W,
|
|
107
|
+
P,
|
|
108
|
+
e.disabled ? "opacity-50 cursor-not-allowed" : j,
|
|
109
|
+
"flex items-center justify-center"
|
|
110
|
+
),
|
|
111
|
+
style: e.color ? { backgroundColor: e.color, color: "white" } : void 0,
|
|
112
|
+
onClick: () => O(e),
|
|
113
|
+
disabled: e.disabled,
|
|
114
|
+
"aria-label": e.label,
|
|
115
|
+
children: e.icon
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
r
|
|
121
|
+
)) }),
|
|
122
|
+
/* @__PURE__ */ t(
|
|
123
|
+
"button",
|
|
124
|
+
{
|
|
125
|
+
ref: L,
|
|
126
|
+
type: "button",
|
|
127
|
+
className: n(
|
|
128
|
+
$,
|
|
129
|
+
k,
|
|
130
|
+
Z,
|
|
131
|
+
"flex items-center justify-center",
|
|
132
|
+
l && "rotate-45"
|
|
133
|
+
),
|
|
134
|
+
onClick: N,
|
|
135
|
+
"aria-label": x,
|
|
136
|
+
"aria-expanded": l,
|
|
137
|
+
children: l ? S || /* @__PURE__ */ t(J, {}) : y || /* @__PURE__ */ t(G, {})
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ t("style", { children: `
|
|
141
|
+
@keyframes fadeInUp {
|
|
142
|
+
from {
|
|
143
|
+
opacity: 0;
|
|
144
|
+
transform: translateY(8px);
|
|
145
|
+
}
|
|
146
|
+
to {
|
|
147
|
+
opacity: 1;
|
|
148
|
+
transform: translateY(0);
|
|
149
|
+
}
|
|
125
150
|
}
|
|
126
|
-
)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
className: b(
|
|
134
|
-
"bear-rounded-full bear-shadow-xl bear-transition-transform bear-duration-300",
|
|
135
|
-
"bear-w-14 bear-h-14 bear-p-0 bear-flex bear-items-center bear-justify-center",
|
|
136
|
-
t && "bear-rotate-45"
|
|
137
|
-
),
|
|
138
|
-
"aria-label": D,
|
|
139
|
-
"aria-expanded": t,
|
|
140
|
-
"aria-haspopup": "menu",
|
|
141
|
-
children: t ? S : E
|
|
142
|
-
}
|
|
143
|
-
)
|
|
144
|
-
]
|
|
145
|
-
}
|
|
146
|
-
);
|
|
147
|
-
};
|
|
151
|
+
` })
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
K.displayName = "SpeedDial";
|
|
148
158
|
export {
|
|
149
|
-
|
|
159
|
+
K as SpeedDial
|
|
150
160
|
};
|
|
@@ -1,48 +1,45 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
export type SpeedDialDirection = 'up' | 'down' | 'left' | 'right';
|
|
3
|
+
export type SpeedDialSize = 'sm' | 'md' | 'lg';
|
|
3
4
|
export interface SpeedDialAction {
|
|
4
|
-
/**
|
|
5
|
-
|
|
5
|
+
/** Action label (shown as tooltip) */
|
|
6
|
+
label: string;
|
|
6
7
|
/** Action icon */
|
|
7
8
|
icon: ReactNode;
|
|
8
|
-
/** Action tooltip/label */
|
|
9
|
-
label: string;
|
|
10
9
|
/** Click handler */
|
|
11
10
|
onClick?: () => void;
|
|
12
|
-
/**
|
|
11
|
+
/** Disabled state */
|
|
13
12
|
disabled?: boolean;
|
|
13
|
+
/** Custom color */
|
|
14
|
+
color?: string;
|
|
15
|
+
/** Tooltip position */
|
|
16
|
+
tooltipPosition?: 'left' | 'right' | 'top' | 'bottom';
|
|
14
17
|
}
|
|
15
18
|
export interface SpeedDialProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
|
|
16
|
-
/** Array of actions
|
|
19
|
+
/** Array of actions */
|
|
17
20
|
actions: SpeedDialAction[];
|
|
18
|
-
/** Main
|
|
21
|
+
/** Main button icon (when closed) */
|
|
19
22
|
icon?: ReactNode;
|
|
20
|
-
/** Main
|
|
23
|
+
/** Main button icon (when open) */
|
|
21
24
|
openIcon?: ReactNode;
|
|
22
|
-
/**
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
|
|
26
|
-
/** Direction to expand actions */
|
|
27
|
-
direction?: 'up' | 'down' | 'left' | 'right';
|
|
28
|
-
/** FAB variant */
|
|
29
|
-
variant?: BearVariant;
|
|
30
|
-
/** FAB size */
|
|
31
|
-
size?: BearSize;
|
|
32
|
-
/** Whether to show tooltips */
|
|
33
|
-
showTooltips?: boolean;
|
|
34
|
-
/** Tooltip placement relative to direction */
|
|
35
|
-
tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom' | 'auto';
|
|
36
|
-
/** Whether to hide on click action */
|
|
37
|
-
closeOnAction?: boolean;
|
|
25
|
+
/** Direction to expand */
|
|
26
|
+
direction?: SpeedDialDirection;
|
|
27
|
+
/** Size */
|
|
28
|
+
size?: SpeedDialSize;
|
|
38
29
|
/** Position on screen */
|
|
39
30
|
position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left';
|
|
40
|
-
/**
|
|
31
|
+
/** Whether to use fixed positioning */
|
|
41
32
|
fixed?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
|
|
44
|
-
/**
|
|
33
|
+
/** Open on hover */
|
|
34
|
+
openOnHover?: boolean;
|
|
35
|
+
/** Controlled open state */
|
|
36
|
+
open?: boolean;
|
|
37
|
+
/** Called when open state changes */
|
|
45
38
|
onOpenChange?: (open: boolean) => void;
|
|
39
|
+
/** Show labels next to actions */
|
|
40
|
+
showLabels?: boolean;
|
|
41
|
+
/** Hide main button label */
|
|
42
|
+
ariaLabel?: string;
|
|
46
43
|
/** Test ID */
|
|
47
44
|
testId?: string;
|
|
48
45
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { SpeedDial } from './SpeedDial';
|
|
2
|
-
export type { SpeedDialProps, SpeedDialAction } from './SpeedDial.types';
|
|
2
|
+
export type { SpeedDialProps, SpeedDialAction, SpeedDialDirection, SpeedDialSize } from './SpeedDial.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("../../utils/cn.cjs"),t={xs:"bear-w-3 bear-h-3",sm:"bear-w-4 bear-h-4",md:"bear-w-6 bear-h-6",lg:"bear-w-8 bear-h-8",xl:"bear-w-10 bear-h-10"},c=({size:r="md",className:n,color:a="currentColor",label:s="Loading"})=>e.jsxs("svg",{className:i.cn("Bear-Spinner",`Bear-Spinner--${r}`,"bear-animate-spin",t[r],n),viewBox:"0 0 24 24",fill:"none","aria-label":s,role:"status",children:[e.jsx("circle",{className:"Bear-Spinner__track bear-opacity-25",cx:"12",cy:"12",r:"10",stroke:a,strokeWidth:"4"}),e.jsx("path",{className:"Bear-Spinner__arc bear-opacity-75",fill:a,d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]});exports.Spinner=c;
|
|
@@ -1,45 +1,47 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { cn as t } from "../../utils/cn.js";
|
|
3
|
-
const
|
|
3
|
+
const c = {
|
|
4
4
|
xs: "bear-w-3 bear-h-3",
|
|
5
5
|
sm: "bear-w-4 bear-h-4",
|
|
6
6
|
md: "bear-w-6 bear-h-6",
|
|
7
7
|
lg: "bear-w-8 bear-h-8",
|
|
8
8
|
xl: "bear-w-10 bear-h-10"
|
|
9
|
-
},
|
|
9
|
+
}, b = ({
|
|
10
10
|
size: r = "md",
|
|
11
11
|
className: s,
|
|
12
|
-
color:
|
|
13
|
-
label:
|
|
14
|
-
}) => /* @__PURE__ */
|
|
12
|
+
color: e = "currentColor",
|
|
13
|
+
label: n = "Loading"
|
|
14
|
+
}) => /* @__PURE__ */ i(
|
|
15
15
|
"svg",
|
|
16
16
|
{
|
|
17
17
|
className: t(
|
|
18
|
+
"Bear-Spinner",
|
|
19
|
+
`Bear-Spinner--${r}`,
|
|
18
20
|
"bear-animate-spin",
|
|
19
|
-
|
|
21
|
+
c[r],
|
|
20
22
|
s
|
|
21
23
|
),
|
|
22
24
|
viewBox: "0 0 24 24",
|
|
23
25
|
fill: "none",
|
|
24
|
-
"aria-label":
|
|
26
|
+
"aria-label": n,
|
|
25
27
|
role: "status",
|
|
26
28
|
children: [
|
|
27
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ a(
|
|
28
30
|
"circle",
|
|
29
31
|
{
|
|
30
|
-
className: "bear-opacity-25",
|
|
32
|
+
className: "Bear-Spinner__track bear-opacity-25",
|
|
31
33
|
cx: "12",
|
|
32
34
|
cy: "12",
|
|
33
35
|
r: "10",
|
|
34
|
-
stroke:
|
|
36
|
+
stroke: e,
|
|
35
37
|
strokeWidth: "4"
|
|
36
38
|
}
|
|
37
39
|
),
|
|
38
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ a(
|
|
39
41
|
"path",
|
|
40
42
|
{
|
|
41
|
-
className: "bear-opacity-75",
|
|
42
|
-
fill:
|
|
43
|
+
className: "Bear-Spinner__arc bear-opacity-75",
|
|
44
|
+
fill: e,
|
|
43
45
|
d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"
|
|
44
46
|
}
|
|
45
47
|
)
|
|
@@ -47,5 +49,5 @@ const o = {
|
|
|
47
49
|
}
|
|
48
50
|
);
|
|
49
51
|
export {
|
|
50
|
-
|
|
52
|
+
b as Spinner
|
|
51
53
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("../../utils/cn.cjs"),o=({title:s,value:i,color:t="#6366f1",icon:n,onClick:r,className:a,...l})=>e.jsxs("div",{className:d.cn("relative overflow-hidden rounded-2xl p-6 transition-transform hover:scale-105 cursor-pointer",a),style:{background:`linear-gradient(135deg, ${t}dd, ${t}99)`},onClick:r,...l,children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 -mr-8 -mt-8 rounded-full opacity-20 bg-white"}),e.jsxs("div",{className:"relative z-10",children:[e.jsx("p",{className:"text-white/80 text-sm font-medium mb-1",children:s}),e.jsx("p",{className:"text-white text-3xl font-bold mb-4",children:i}),r&&e.jsxs("button",{className:"flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 rounded-full text-white text-sm font-medium transition-colors",children:[n,"View All"]})]})]});exports.StatCard=o;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsxs as e, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { cn as n } from "../../utils/cn.js";
|
|
3
|
+
const h = ({
|
|
4
|
+
title: l,
|
|
5
|
+
value: s,
|
|
6
|
+
color: r = "#6366f1",
|
|
7
|
+
icon: a,
|
|
8
|
+
onClick: i,
|
|
9
|
+
className: o,
|
|
10
|
+
...d
|
|
11
|
+
}) => /* @__PURE__ */ e(
|
|
12
|
+
"div",
|
|
13
|
+
{
|
|
14
|
+
className: n(
|
|
15
|
+
"relative overflow-hidden rounded-2xl p-6 transition-transform hover:scale-105 cursor-pointer",
|
|
16
|
+
o
|
|
17
|
+
),
|
|
18
|
+
style: { background: `linear-gradient(135deg, ${r}dd, ${r}99)` },
|
|
19
|
+
onClick: i,
|
|
20
|
+
...d,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ t("div", { className: "absolute top-0 right-0 w-32 h-32 -mr-8 -mt-8 rounded-full opacity-20 bg-white" }),
|
|
23
|
+
/* @__PURE__ */ e("div", { className: "relative z-10", children: [
|
|
24
|
+
/* @__PURE__ */ t("p", { className: "text-white/80 text-sm font-medium mb-1", children: l }),
|
|
25
|
+
/* @__PURE__ */ t("p", { className: "text-white text-3xl font-bold mb-4", children: s }),
|
|
26
|
+
i && /* @__PURE__ */ e("button", { className: "flex items-center gap-2 px-4 py-1.5 bg-white/20 hover:bg-white/30 rounded-full text-white text-sm font-medium transition-colors", children: [
|
|
27
|
+
a,
|
|
28
|
+
"View All"
|
|
29
|
+
] })
|
|
30
|
+
] })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
export {
|
|
35
|
+
h as StatCard
|
|
36
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export interface StatCardProps extends HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
/** Card title */
|
|
4
|
+
title: string;
|
|
5
|
+
/** Main value to display */
|
|
6
|
+
value: string | number;
|
|
7
|
+
/** Gradient color (hex) */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Icon to show in the button */
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
/** Click handler for View All button */
|
|
12
|
+
onClick?: () => void;
|
|
13
|
+
}
|