@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,58 @@
|
|
|
1
|
+
const t = "Bear-Timeline relative", e = "Bear-Timeline__item relative pb-8 last:pb-0", r = {
|
|
2
|
+
left: {
|
|
3
|
+
wrapper: "pl-8",
|
|
4
|
+
content: "text-left",
|
|
5
|
+
dot: "left-0",
|
|
6
|
+
line: "left-3"
|
|
7
|
+
},
|
|
8
|
+
right: {
|
|
9
|
+
wrapper: "pr-8 text-right",
|
|
10
|
+
content: "text-right",
|
|
11
|
+
dot: "right-0",
|
|
12
|
+
line: "right-3"
|
|
13
|
+
},
|
|
14
|
+
alternate: {
|
|
15
|
+
wrapper: "",
|
|
16
|
+
content: "",
|
|
17
|
+
dot: "",
|
|
18
|
+
line: "left-1/2 -translate-x-1/2"
|
|
19
|
+
}
|
|
20
|
+
}, E = "Bear-Timeline__dot absolute rounded-full border-2 border-white dark:border-zinc-900 z-10 transition-all", n = {
|
|
21
|
+
sm: "w-3 h-3",
|
|
22
|
+
md: "w-4 h-4",
|
|
23
|
+
lg: "w-5 h-5"
|
|
24
|
+
}, I = {
|
|
25
|
+
sm: "w-6 h-6",
|
|
26
|
+
md: "w-8 h-8",
|
|
27
|
+
lg: "w-10 h-10"
|
|
28
|
+
}, l = {
|
|
29
|
+
pink: "bg-pink-500",
|
|
30
|
+
green: "bg-green-500",
|
|
31
|
+
blue: "bg-blue-500",
|
|
32
|
+
amber: "bg-amber-500",
|
|
33
|
+
red: "bg-red-500",
|
|
34
|
+
gray: "bg-gray-400 dark:bg-zinc-600"
|
|
35
|
+
}, _ = "Bear-Timeline__line absolute top-0 w-0.5 h-full", a = "bg-gray-200 dark:bg-zinc-700", i = "Bear-Timeline__content", o = {
|
|
36
|
+
sm: "text-sm",
|
|
37
|
+
md: "text-base",
|
|
38
|
+
lg: "text-lg"
|
|
39
|
+
}, T = {
|
|
40
|
+
sm: "text-xs",
|
|
41
|
+
md: "text-sm",
|
|
42
|
+
lg: "text-base"
|
|
43
|
+
}, s = "text-xs text-gray-500 dark:text-gray-400";
|
|
44
|
+
export {
|
|
45
|
+
t as TIMELINE_BASE_CLASSES,
|
|
46
|
+
i as TIMELINE_CONTENT_BASE,
|
|
47
|
+
T as TIMELINE_DESC_SIZES,
|
|
48
|
+
E as TIMELINE_DOT_BASE,
|
|
49
|
+
l as TIMELINE_DOT_COLORS,
|
|
50
|
+
I as TIMELINE_DOT_ICON_SIZES,
|
|
51
|
+
n as TIMELINE_DOT_SIZES,
|
|
52
|
+
e as TIMELINE_ITEM_BASE,
|
|
53
|
+
_ as TIMELINE_LINE_BASE,
|
|
54
|
+
a as TIMELINE_LINE_COLOR,
|
|
55
|
+
r as TIMELINE_POSITIONS,
|
|
56
|
+
s as TIMELINE_TIME_CLASSES,
|
|
57
|
+
o as TIMELINE_TITLE_SIZES
|
|
58
|
+
};
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
1
|
import { TimelineProps } from './Timeline.types';
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Timeline - Vertical timeline for events
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```tsx
|
|
7
|
+
* <Timeline
|
|
8
|
+
* items={[
|
|
9
|
+
* { title: 'Step 1', description: 'Description', time: '2024-01-01' },
|
|
10
|
+
* { title: 'Step 2', description: 'Description', time: '2024-01-02', active: true },
|
|
11
|
+
* { title: 'Step 3', description: 'Description', time: '2024-01-03' },
|
|
12
|
+
* ]}
|
|
13
|
+
* />
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare const Timeline: import('react').ForwardRefExoticComponent<TimelineProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export default Timeline;
|
|
@@ -1,71 +1,139 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as o, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as y, useMemo as O } from "react";
|
|
2
3
|
import { cn as r } from "../../utils/cn.js";
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
4
|
+
import { TIMELINE_LINE_COLOR as k, TIMELINE_POSITIONS as A, TIMELINE_LINE_BASE as w, TIMELINE_TIME_CLASSES as B, TIMELINE_TITLE_SIZES as C, TIMELINE_DESC_SIZES as D, TIMELINE_CONTENT_BASE as Z, TIMELINE_ITEM_BASE as b, TIMELINE_BASE_CLASSES as j, TIMELINE_DOT_COLORS as _, TIMELINE_DOT_ICON_SIZES as R, TIMELINE_DOT_BASE as N, TIMELINE_DOT_SIZES as X } from "./Timeline.const.js";
|
|
5
|
+
const z = y(
|
|
6
|
+
({
|
|
7
|
+
items: E,
|
|
8
|
+
position: e = "left",
|
|
9
|
+
size: c = "md",
|
|
10
|
+
showLine: S = !0,
|
|
11
|
+
pending: n,
|
|
12
|
+
reverse: I = !1,
|
|
13
|
+
lineColor: i,
|
|
14
|
+
testId: T,
|
|
15
|
+
className: f,
|
|
16
|
+
...m
|
|
17
|
+
}, p) => {
|
|
18
|
+
const d = A[e], x = X[c], L = R[c], h = C[c], M = D[c], u = O(() => {
|
|
19
|
+
let t = [...E];
|
|
20
|
+
return I && (t = t.reverse()), n && t.push({
|
|
21
|
+
title: typeof n == "string" ? n : "Loading...",
|
|
22
|
+
description: typeof n == "boolean" ? void 0 : n,
|
|
23
|
+
color: "gray"
|
|
24
|
+
}), t;
|
|
25
|
+
}, [E, I, n]), v = (t) => {
|
|
26
|
+
const a = t.color || "pink", s = t.active;
|
|
27
|
+
return t.icon ? /* @__PURE__ */ l(
|
|
28
|
+
"div",
|
|
29
|
+
{
|
|
30
|
+
className: r(
|
|
31
|
+
N,
|
|
32
|
+
L,
|
|
33
|
+
_[a],
|
|
34
|
+
"flex items-center justify-center text-white",
|
|
35
|
+
s && "ring-4 ring-pink-500/30"
|
|
36
|
+
),
|
|
37
|
+
style: {
|
|
38
|
+
top: "2px",
|
|
39
|
+
...e === "left" ? { left: "-4px" } : {},
|
|
40
|
+
...e === "right" ? { right: "-4px" } : {},
|
|
41
|
+
...e === "alternate" ? { left: "50%", transform: "translateX(-50%)" } : {}
|
|
42
|
+
},
|
|
43
|
+
children: t.icon
|
|
44
|
+
}
|
|
45
|
+
) : /* @__PURE__ */ l(
|
|
46
|
+
"div",
|
|
47
|
+
{
|
|
48
|
+
className: r(
|
|
49
|
+
N,
|
|
50
|
+
x,
|
|
51
|
+
_[a],
|
|
52
|
+
s && "ring-4 ring-pink-500/30 scale-125"
|
|
53
|
+
),
|
|
54
|
+
style: {
|
|
55
|
+
top: "6px",
|
|
56
|
+
...e === "left" ? { left: "0" } : {},
|
|
57
|
+
...e === "right" ? { right: "0" } : {},
|
|
58
|
+
...e === "alternate" ? { left: "50%", transform: "translateX(-50%)" } : {}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
);
|
|
62
|
+
}, g = (t) => {
|
|
63
|
+
if (e !== "alternate") return {};
|
|
64
|
+
const a = t % 2 === 0;
|
|
65
|
+
return {
|
|
66
|
+
wrapper: a ? "pr-8 text-right w-1/2" : "pl-8 text-left w-1/2 ml-auto",
|
|
67
|
+
content: a ? "text-right" : "text-left"
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
return /* @__PURE__ */ o(
|
|
30
71
|
"div",
|
|
31
72
|
{
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
),
|
|
73
|
+
ref: p,
|
|
74
|
+
className: r(j, f),
|
|
75
|
+
"data-testid": T,
|
|
76
|
+
...m,
|
|
37
77
|
children: [
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
"
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
78
|
+
S && /* @__PURE__ */ l(
|
|
79
|
+
"div",
|
|
80
|
+
{
|
|
81
|
+
className: r(
|
|
82
|
+
w,
|
|
83
|
+
d.line,
|
|
84
|
+
i ? "" : k
|
|
85
|
+
),
|
|
86
|
+
style: i ? { backgroundColor: i } : void 0
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
u.map((t, a) => {
|
|
90
|
+
const s = g(a);
|
|
91
|
+
return /* @__PURE__ */ o(
|
|
92
|
+
"div",
|
|
93
|
+
{
|
|
94
|
+
className: r(
|
|
95
|
+
b,
|
|
96
|
+
e !== "alternate" && d.wrapper,
|
|
97
|
+
s.wrapper
|
|
98
|
+
),
|
|
99
|
+
children: [
|
|
100
|
+
v(t),
|
|
101
|
+
/* @__PURE__ */ o("div", { className: r(Z, s.content), children: [
|
|
102
|
+
t.time && /* @__PURE__ */ l("div", { className: r(B, "mb-1"), children: t.time }),
|
|
103
|
+
/* @__PURE__ */ l(
|
|
104
|
+
"h4",
|
|
105
|
+
{
|
|
106
|
+
className: r(
|
|
107
|
+
"Bear-Timeline__title font-medium text-gray-900 dark:text-white",
|
|
108
|
+
h,
|
|
109
|
+
t.active && "text-pink-600 dark:text-pink-400"
|
|
110
|
+
),
|
|
111
|
+
children: t.title
|
|
112
|
+
}
|
|
113
|
+
),
|
|
114
|
+
t.description && /* @__PURE__ */ l(
|
|
115
|
+
"div",
|
|
116
|
+
{
|
|
117
|
+
className: r(
|
|
118
|
+
"Bear-Timeline__description text-gray-600 dark:text-gray-400 mt-1",
|
|
119
|
+
M
|
|
120
|
+
),
|
|
121
|
+
children: t.description
|
|
122
|
+
}
|
|
123
|
+
),
|
|
124
|
+
t.extra && /* @__PURE__ */ l("div", { className: "Bear-Timeline__extra mt-3", children: t.extra })
|
|
125
|
+
] })
|
|
126
|
+
]
|
|
127
|
+
},
|
|
128
|
+
a
|
|
129
|
+
);
|
|
130
|
+
})
|
|
63
131
|
]
|
|
64
|
-
}
|
|
65
|
-
e.id
|
|
132
|
+
}
|
|
66
133
|
);
|
|
67
|
-
}
|
|
68
|
-
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
z.displayName = "Timeline";
|
|
69
137
|
export {
|
|
70
|
-
|
|
138
|
+
z as Timeline
|
|
71
139
|
};
|
|
@@ -1,18 +1,37 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type TimelinePosition = 'left' | 'right' | 'alternate';
|
|
3
|
+
export type TimelineSize = 'sm' | 'md' | 'lg';
|
|
2
4
|
export interface TimelineItem {
|
|
3
|
-
|
|
5
|
+
/** Item title */
|
|
4
6
|
title: string;
|
|
7
|
+
/** Item description/content */
|
|
5
8
|
description?: ReactNode;
|
|
6
|
-
date
|
|
9
|
+
/** Time/date label */
|
|
10
|
+
time?: string;
|
|
11
|
+
/** Custom icon */
|
|
7
12
|
icon?: ReactNode;
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
/** Dot color */
|
|
14
|
+
color?: 'pink' | 'green' | 'blue' | 'amber' | 'red' | 'gray';
|
|
15
|
+
/** Is active/current item */
|
|
16
|
+
active?: boolean;
|
|
17
|
+
/** Extra content below description */
|
|
18
|
+
extra?: ReactNode;
|
|
10
19
|
}
|
|
11
|
-
export interface TimelineProps {
|
|
20
|
+
export interface TimelineProps extends HTMLAttributes<HTMLDivElement> {
|
|
21
|
+
/** Array of timeline items */
|
|
12
22
|
items: TimelineItem[];
|
|
13
|
-
|
|
14
|
-
position?:
|
|
15
|
-
|
|
16
|
-
size?:
|
|
17
|
-
|
|
23
|
+
/** Position of content relative to line */
|
|
24
|
+
position?: TimelinePosition;
|
|
25
|
+
/** Size */
|
|
26
|
+
size?: TimelineSize;
|
|
27
|
+
/** Show connecting line */
|
|
28
|
+
showLine?: boolean;
|
|
29
|
+
/** Pending/loading state for last item */
|
|
30
|
+
pending?: boolean | ReactNode;
|
|
31
|
+
/** Reverse order */
|
|
32
|
+
reverse?: boolean;
|
|
33
|
+
/** Custom line color */
|
|
34
|
+
lineColor?: string;
|
|
35
|
+
/** Test ID */
|
|
36
|
+
testId?: string;
|
|
18
37
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Timeline } from './Timeline';
|
|
2
|
-
export type { TimelineProps, TimelineItem } from './Timeline.types';
|
|
2
|
+
export type { TimelineProps, TimelineItem, TimelinePosition, TimelineSize } from './Timeline.types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),r=require("react"),j=require("react-dom"),k=require("../../utils/cn.cjs"),v=({content:m,children:x,position:w,placement:R,delay:y=200,className:T,disabled:M=!1})=>{const c=R||w||"top",[l,h]=r.useState(!1),[b,B]=r.useState({x:0,y:0}),u=r.useRef(null),d=r.useRef(null),n=r.useRef(),f=r.useCallback(()=>{if(!u.current||!d.current)return;const e=u.current.getBoundingClientRect(),t=d.current.getBoundingClientRect(),a=8;let o=0,i=0;switch(c){case"top":o=e.left+(e.width-t.width)/2,i=e.top-t.height-a;break;case"bottom":o=e.left+(e.width-t.width)/2,i=e.bottom+a;break;case"left":o=e.left-t.width-a,i=e.top+(e.height-t.height)/2;break;case"right":o=e.right+a,i=e.top+(e.height-t.height)/2;break}o=Math.max(8,Math.min(o,window.innerWidth-t.width-8)),i=Math.max(8,Math.min(i,window.innerHeight-t.height-8)),B({x:o,y:i})},[c]),g=()=>{M||(n.current=setTimeout(()=>{h(!0)},y))},p=()=>{n.current&&clearTimeout(n.current),h(!1)};return r.useEffect(()=>{l&&f()},[l,f]),r.useEffect(()=>()=>{n.current&&clearTimeout(n.current)},[]),s.jsxs(s.Fragment,{children:[s.jsx("div",{ref:u,onMouseEnter:g,onMouseLeave:p,onFocus:g,onBlur:p,className:"Bear-Tooltip__trigger bear-inline-block",children:x}),l&&j.createPortal(s.jsx("div",{ref:d,role:"tooltip",style:{position:"fixed",left:b.x,top:b.y,zIndex:9999},className:k.cn("Bear-Tooltip",`Bear-Tooltip--${c}`,"bear-px-3 bear-py-2 bear-rounded-lg","bear-bg-gray-800 bear-text-white bear-text-sm","bear-border bear-border-gray-700","bear-shadow-lg","bear-animate-in bear-fade-in bear-duration-150",T),children:s.jsx("span",{className:"Bear-Tooltip__content",children:m})}),document.body)]})};exports.Tooltip=v;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
1
|
+
import { jsxs as C, Fragment as _, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { useState as m, useRef as h, useCallback as E, useEffect as w } from "react";
|
|
3
|
+
import { createPortal as N } from "react-dom";
|
|
4
|
+
import { cn as j } from "../../utils/cn.js";
|
|
5
|
+
const V = ({
|
|
6
6
|
content: x,
|
|
7
7
|
children: y,
|
|
8
8
|
position: M,
|
|
9
9
|
placement: R,
|
|
10
|
-
delay:
|
|
11
|
-
className:
|
|
12
|
-
disabled:
|
|
10
|
+
delay: T = 200,
|
|
11
|
+
className: B,
|
|
12
|
+
disabled: k = !1
|
|
13
13
|
}) => {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
16
|
-
const e =
|
|
14
|
+
const a = R || M || "top", [s, d] = m(!1), [b, v] = m({ x: 0, y: 0 }), c = h(null), l = h(null), i = h(), f = E(() => {
|
|
15
|
+
if (!c.current || !l.current) return;
|
|
16
|
+
const e = c.current.getBoundingClientRect(), t = l.current.getBoundingClientRect(), n = 8;
|
|
17
17
|
let r = 0, o = 0;
|
|
18
|
-
switch (
|
|
18
|
+
switch (a) {
|
|
19
19
|
case "top":
|
|
20
20
|
r = e.left + (e.width - t.width) / 2, o = e.top - t.height - n;
|
|
21
21
|
break;
|
|
@@ -29,52 +29,54 @@ const z = ({
|
|
|
29
29
|
r = e.right + n, o = e.top + (e.height - t.height) / 2;
|
|
30
30
|
break;
|
|
31
31
|
}
|
|
32
|
-
r = Math.max(8, Math.min(r, window.innerWidth - t.width - 8)), o = Math.max(8, Math.min(o, window.innerHeight - t.height - 8)),
|
|
33
|
-
}, [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
32
|
+
r = Math.max(8, Math.min(r, window.innerWidth - t.width - 8)), o = Math.max(8, Math.min(o, window.innerHeight - t.height - 8)), v({ x: r, y: o });
|
|
33
|
+
}, [a]), p = () => {
|
|
34
|
+
k || (i.current = setTimeout(() => {
|
|
35
|
+
d(!0);
|
|
36
|
+
}, T));
|
|
37
37
|
}, g = () => {
|
|
38
|
-
i.current && clearTimeout(i.current),
|
|
38
|
+
i.current && clearTimeout(i.current), d(!1);
|
|
39
39
|
};
|
|
40
40
|
return w(() => {
|
|
41
|
-
|
|
42
|
-
}, [
|
|
41
|
+
s && f();
|
|
42
|
+
}, [s, f]), w(() => () => {
|
|
43
43
|
i.current && clearTimeout(i.current);
|
|
44
|
-
}, []), /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
44
|
+
}, []), /* @__PURE__ */ C(_, { children: [
|
|
45
|
+
/* @__PURE__ */ u(
|
|
46
46
|
"div",
|
|
47
47
|
{
|
|
48
|
-
ref:
|
|
49
|
-
onMouseEnter:
|
|
48
|
+
ref: c,
|
|
49
|
+
onMouseEnter: p,
|
|
50
50
|
onMouseLeave: g,
|
|
51
|
-
onFocus:
|
|
51
|
+
onFocus: p,
|
|
52
52
|
onBlur: g,
|
|
53
|
-
className: "bear-inline-block",
|
|
53
|
+
className: "Bear-Tooltip__trigger bear-inline-block",
|
|
54
54
|
children: y
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
s && N(
|
|
58
|
+
/* @__PURE__ */ u(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
61
|
-
ref:
|
|
61
|
+
ref: l,
|
|
62
62
|
role: "tooltip",
|
|
63
63
|
style: {
|
|
64
64
|
position: "fixed",
|
|
65
|
-
left:
|
|
66
|
-
top:
|
|
65
|
+
left: b.x,
|
|
66
|
+
top: b.y,
|
|
67
67
|
zIndex: 9999
|
|
68
68
|
},
|
|
69
|
-
className:
|
|
69
|
+
className: j(
|
|
70
|
+
"Bear-Tooltip",
|
|
71
|
+
`Bear-Tooltip--${a}`,
|
|
70
72
|
"bear-px-3 bear-py-2 bear-rounded-lg",
|
|
71
73
|
"bear-bg-gray-800 bear-text-white bear-text-sm",
|
|
72
74
|
"bear-border bear-border-gray-700",
|
|
73
75
|
"bear-shadow-lg",
|
|
74
76
|
"bear-animate-in bear-fade-in bear-duration-150",
|
|
75
|
-
|
|
77
|
+
B
|
|
76
78
|
),
|
|
77
|
-
children: x
|
|
79
|
+
children: /* @__PURE__ */ u("span", { className: "Bear-Tooltip__content", children: x })
|
|
78
80
|
}
|
|
79
81
|
),
|
|
80
82
|
document.body
|
|
@@ -82,5 +84,5 @@ const z = ({
|
|
|
82
84
|
] });
|
|
83
85
|
};
|
|
84
86
|
export {
|
|
85
|
-
|
|
87
|
+
V as Tooltip
|
|
86
88
|
};
|
|
@@ -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"),A=require("../../utils/cn.cjs"),C={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",caption:"span",overline:"span",code:"code"},E={h1:"bear-text-5xl bear-font-bold bear-tracking-tight",h2:"bear-text-4xl bear-font-bold bear-tracking-tight",h3:"bear-text-3xl bear-font-semibold",h4:"bear-text-2xl bear-font-semibold",h5:"bear-text-xl bear-font-medium",h6:"bear-text-lg bear-font-medium",subtitle1:"bear-text-lg bear-font-normal",subtitle2:"bear-text-base bear-font-medium",body1:"bear-text-base bear-font-normal",body2:"bear-text-sm bear-font-normal",caption:"bear-text-xs",overline:"bear-text-xs bear-uppercase bear-tracking-wider",code:"bear-text-sm bear-font-mono bear-bg-gray-100 dark:bear-bg-gray-800 bear-px-1.5 bear-py-0.5 bear-rounded"},B={thin:"bear-font-thin",light:"bear-font-light",normal:"bear-font-normal",medium:"bear-font-medium",semibold:"bear-font-semibold",bold:"bear-font-bold",extrabold:"bear-font-extrabold"},_={left:"bear-text-left",center:"bear-text-center",right:"bear-text-right",justify:"bear-text-justify"},i={primary:"bear-text-gray-900 dark:bear-text-gray-100",secondary:"bear-text-gray-600 dark:bear-text-gray-400",muted:"bear-text-gray-400 dark:bear-text-gray-500",success:"bear-text-green-600 dark:bear-text-green-400",danger:"bear-text-red-600 dark:bear-text-red-400",warning:"bear-text-amber-600 dark:bear-text-amber-400"},I={tight:"bear-leading-tight",normal:"bear-leading-normal",relaxed:"bear-leading-relaxed",loose:"bear-leading-loose"},L=({variant:t="body1",component:d,align:b,weight:o,color:e="primary",truncate:a=!1,maxLines:r,italic:s=!1,underline:h=!1,strikethrough:x=!1,noWrap:g=!1,inline:y=!1,paragraph:p=!1,lineHeight:n,children:m,className:f,style:c,testId:u,...S})=>{const k=d||C[t],l=e&&!i[e];return T.jsx(k,{className:A.cn("Bear-Typography",`Bear-Typography--${t}`,E[t],o&&B[o],b&&_[b],!l&&e&&i[e],n&&I[n],s&&"Bear-Typography--italic bear-italic",h&&"Bear-Typography--underline bear-underline",x&&"Bear-Typography--strikethrough bear-line-through",g&&"bear-whitespace-nowrap",y&&"bear-inline",p&&"bear-mb-4",a&&!r&&"Bear-Typography--truncate bear-truncate",a&&r&&"bear-overflow-hidden",f),style:{...c,...l&&{color:e},...a&&r&&{display:"-webkit-box",WebkitLineClamp:r,WebkitBoxOrient:"vertical"}},"data-testid":u,...S,children:m})};exports.Typography=L;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as A } from "react/jsx-runtime";
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
2
|
+
import { cn as T } from "../../utils/cn.js";
|
|
3
|
+
const C = {
|
|
4
4
|
h1: "h1",
|
|
5
5
|
h2: "h2",
|
|
6
6
|
h3: "h3",
|
|
@@ -14,7 +14,7 @@ const E = {
|
|
|
14
14
|
caption: "span",
|
|
15
15
|
overline: "span",
|
|
16
16
|
code: "code"
|
|
17
|
-
},
|
|
17
|
+
}, E = {
|
|
18
18
|
h1: "bear-text-5xl bear-font-bold bear-tracking-tight",
|
|
19
19
|
h2: "bear-text-4xl bear-font-bold bear-tracking-tight",
|
|
20
20
|
h3: "bear-text-3xl bear-font-semibold",
|
|
@@ -28,7 +28,7 @@ const E = {
|
|
|
28
28
|
caption: "bear-text-xs",
|
|
29
29
|
overline: "bear-text-xs bear-uppercase bear-tracking-wider",
|
|
30
30
|
code: "bear-text-sm bear-font-mono bear-bg-gray-100 dark:bear-bg-gray-800 bear-px-1.5 bear-py-0.5 bear-rounded"
|
|
31
|
-
},
|
|
31
|
+
}, B = {
|
|
32
32
|
thin: "bear-font-thin",
|
|
33
33
|
light: "bear-font-light",
|
|
34
34
|
normal: "bear-font-normal",
|
|
@@ -36,7 +36,7 @@ const E = {
|
|
|
36
36
|
semibold: "bear-font-semibold",
|
|
37
37
|
bold: "bear-font-bold",
|
|
38
38
|
extrabold: "bear-font-extrabold"
|
|
39
|
-
},
|
|
39
|
+
}, _ = {
|
|
40
40
|
left: "bear-text-left",
|
|
41
41
|
center: "bear-text-center",
|
|
42
42
|
right: "bear-text-right",
|
|
@@ -48,67 +48,69 @@ const E = {
|
|
|
48
48
|
success: "bear-text-green-600 dark:bear-text-green-400",
|
|
49
49
|
danger: "bear-text-red-600 dark:bear-text-red-400",
|
|
50
50
|
warning: "bear-text-amber-600 dark:bear-text-amber-400"
|
|
51
|
-
},
|
|
51
|
+
}, I = {
|
|
52
52
|
tight: "bear-leading-tight",
|
|
53
53
|
normal: "bear-leading-normal",
|
|
54
54
|
relaxed: "bear-leading-relaxed",
|
|
55
55
|
loose: "bear-leading-loose"
|
|
56
|
-
},
|
|
56
|
+
}, N = ({
|
|
57
57
|
variant: a = "body1",
|
|
58
58
|
component: d,
|
|
59
59
|
align: b,
|
|
60
60
|
weight: o,
|
|
61
61
|
color: e = "primary",
|
|
62
|
-
truncate:
|
|
63
|
-
maxLines:
|
|
62
|
+
truncate: t = !1,
|
|
63
|
+
maxLines: r,
|
|
64
64
|
italic: s = !1,
|
|
65
65
|
underline: x = !1,
|
|
66
|
-
strikethrough:
|
|
67
|
-
noWrap:
|
|
68
|
-
inline:
|
|
69
|
-
paragraph:
|
|
66
|
+
strikethrough: h = !1,
|
|
67
|
+
noWrap: g = !1,
|
|
68
|
+
inline: m = !1,
|
|
69
|
+
paragraph: y = !1,
|
|
70
70
|
lineHeight: n,
|
|
71
|
-
children:
|
|
72
|
-
className:
|
|
73
|
-
style:
|
|
71
|
+
children: p,
|
|
72
|
+
className: f,
|
|
73
|
+
style: c,
|
|
74
74
|
testId: u,
|
|
75
75
|
...S
|
|
76
76
|
}) => {
|
|
77
|
-
const k = d ||
|
|
77
|
+
const k = d || C[a], l = e && !i[e];
|
|
78
78
|
return /* @__PURE__ */ A(
|
|
79
79
|
k,
|
|
80
80
|
{
|
|
81
|
-
className:
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
className: T(
|
|
82
|
+
"Bear-Typography",
|
|
83
|
+
`Bear-Typography--${a}`,
|
|
84
|
+
E[a],
|
|
85
|
+
o && B[o],
|
|
86
|
+
b && _[b],
|
|
85
87
|
!l && e && i[e],
|
|
86
|
-
n &&
|
|
87
|
-
s && "bear-italic",
|
|
88
|
-
x && "bear-underline",
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
n && I[n],
|
|
89
|
+
s && "Bear-Typography--italic bear-italic",
|
|
90
|
+
x && "Bear-Typography--underline bear-underline",
|
|
91
|
+
h && "Bear-Typography--strikethrough bear-line-through",
|
|
92
|
+
g && "bear-whitespace-nowrap",
|
|
93
|
+
m && "bear-inline",
|
|
94
|
+
y && "bear-mb-4",
|
|
95
|
+
t && !r && "Bear-Typography--truncate bear-truncate",
|
|
96
|
+
t && r && "bear-overflow-hidden",
|
|
97
|
+
f
|
|
96
98
|
),
|
|
97
99
|
style: {
|
|
98
|
-
...
|
|
100
|
+
...c,
|
|
99
101
|
...l && { color: e },
|
|
100
|
-
...
|
|
102
|
+
...t && r && {
|
|
101
103
|
display: "-webkit-box",
|
|
102
|
-
WebkitLineClamp:
|
|
104
|
+
WebkitLineClamp: r,
|
|
103
105
|
WebkitBoxOrient: "vertical"
|
|
104
106
|
}
|
|
105
107
|
},
|
|
106
108
|
"data-testid": u,
|
|
107
109
|
...S,
|
|
108
|
-
children:
|
|
110
|
+
children: p
|
|
109
111
|
}
|
|
110
112
|
);
|
|
111
113
|
};
|
|
112
114
|
export {
|
|
113
|
-
|
|
115
|
+
N as Typography
|
|
114
116
|
};
|