@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
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("../../utils/cn.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),P=require("react"),t=require("../../utils/cn.cjs"),r=require("./Stepper.const.cjs"),p=require("../Button/Button.cjs"),y=()=>e.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:e.jsx("polyline",{points:"20 6 9 17 4 12"})}),k=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",children:[e.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),e.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]}),v=P.forwardRef(({steps:l,activeStep:c,onStepClick:a,orientation:m="horizontal",size:d="md",showNumbers:h=!0,clickable:S=!1,showConnectors:x=!0,connectorStyle:_="solid",alternativeLabel:E=!1,completedIcon:N,errorIcon:f,testId:j,className:A,...I},L)=>{const g=(s,n)=>n.status?n.status:s<c?"completed":s===c?"active":"pending",C=m==="horizontal",B=r.STEP_INDICATOR_SIZES[d],u=r.STEP_LABEL_SIZES[d],R=(s,n,i)=>{const T=r.STEP_STATUS_CLASSES[i];let o=null;return s.icon?o=s.icon:i==="completed"?o=N||e.jsx(y,{}):i==="error"?o=f||e.jsx(k,{}):h&&(o=n+1),e.jsx("div",{className:t.cn(r.STEP_INDICATOR_BASE,B,T.indicator,S&&!s.disabled&&"cursor-pointer hover:scale-105"),onClick:()=>{S&&!s.disabled&&a&&a(n)},children:o})},b=s=>{if(!x||s===l.length-1)return null;const n=s<c;return e.jsx("div",{className:t.cn(r.CONNECTOR_BASE,C?r.CONNECTOR_HORIZONTAL:r.CONNECTOR_VERTICAL,n?r.CONNECTOR_STATUS.completed:r.CONNECTOR_STATUS.pending,_==="dashed"&&"border-t-2 border-dashed bg-transparent")})};return e.jsx("div",{ref:L,className:t.cn(r.STEPPER_BASE_CLASSES,C?r.STEPPER_HORIZONTAL_CLASSES:r.STEPPER_VERTICAL_CLASSES,A),"data-testid":j,...I,children:l.map((s,n)=>{const i=g(n,s),T=r.STEP_STATUS_CLASSES[i];return e.jsxs("div",{className:t.cn("Bear-Stepper__step",C?r.STEP_WRAPPER_HORIZONTAL:r.STEP_WRAPPER_VERTICAL),children:[C?e.jsxs("div",{className:t.cn("flex",E?"flex-col items-center":"items-center gap-3"),children:[R(s,n,i),e.jsxs("div",{className:t.cn(E&&"text-center mt-2"),children:[e.jsx("div",{className:t.cn(r.STEP_LABEL_BASE,u.label,T.label),children:s.label}),s.description&&e.jsx("div",{className:t.cn(r.STEP_DESCRIPTION_CLASSES,u.description),children:s.description})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-shrink-0 mr-4",children:R(s,n,i)}),e.jsxs("div",{className:"flex-1 pt-0.5",children:[e.jsx("div",{className:t.cn(r.STEP_LABEL_BASE,u.label,T.label),children:s.label}),s.description&&e.jsx("div",{className:t.cn(r.STEP_DESCRIPTION_CLASSES,u.description),children:s.description}),s.content&&i==="active"&&e.jsx("div",{className:"mt-4",children:s.content})]})]}),b(n)]},n)})})});v.displayName="Stepper";const O=P.forwardRef(({activeStep:l,totalSteps:c,onPrev:a,onNext:m,onComplete:d,disablePrev:h=!1,disableNext:S=!1,prevLabel:x="Previous",nextLabel:_="Next",completeLabel:E="Complete",showIndicator:N=!0},f)=>{const j=l===0,A=l===c-1;return e.jsxs("div",{ref:f,className:"Bear-StepperControls flex items-center justify-between mt-6",children:[e.jsx(p.Button,{variant:"outline",onClick:a,disabled:j||h,children:x}),N&&e.jsxs("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:["Step ",l+1," of ",c]}),A?e.jsx(p.Button,{variant:"primary",onClick:d,children:E}):e.jsx(p.Button,{variant:"primary",onClick:m,disabled:S,children:_})]})});O.displayName="StepperControls";exports.Stepper=v;exports.StepperControls=O;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="Bear-Stepper",e="flex items-start",S="flex flex-col",E="flex-1 relative",r="relative flex items-start pb-8 last:pb-0",_="Bear-Stepper__indicator flex items-center justify-center rounded-full font-medium transition-all",a={sm:"w-6 h-6 text-xs",md:"w-8 h-8 text-sm",lg:"w-10 h-10 text-base"},T={pending:{indicator:"bg-gray-200 dark:bg-zinc-700 text-gray-500 dark:text-gray-400",label:"text-gray-500 dark:text-gray-400"},active:{indicator:"bg-pink-500 text-white shadow-lg shadow-pink-500/30",label:"text-gray-900 dark:text-white font-medium"},completed:{indicator:"bg-green-500 text-white",label:"text-gray-700 dark:text-gray-300"},error:{indicator:"bg-red-500 text-white",label:"text-red-500 dark:text-red-400"}},n="Bear-Stepper__connector absolute transition-colors",o="top-4 left-1/2 right-0 h-0.5 -translate-y-1/2",l="left-4 top-8 w-0.5 h-full -translate-x-1/2",s={pending:"bg-gray-200 dark:bg-zinc-700",completed:"bg-green-500"},A="Bear-Stepper__label transition-colors",i={sm:{label:"text-xs",description:"text-[10px]"},md:{label:"text-sm",description:"text-xs"},lg:{label:"text-base",description:"text-sm"}},R="text-gray-500 dark:text-gray-400 mt-0.5";exports.CONNECTOR_BASE=n;exports.CONNECTOR_HORIZONTAL=o;exports.CONNECTOR_STATUS=s;exports.CONNECTOR_VERTICAL=l;exports.STEPPER_BASE_CLASSES=t;exports.STEPPER_HORIZONTAL_CLASSES=e;exports.STEPPER_VERTICAL_CLASSES=S;exports.STEP_DESCRIPTION_CLASSES=R;exports.STEP_INDICATOR_BASE=_;exports.STEP_INDICATOR_SIZES=a;exports.STEP_LABEL_BASE=A;exports.STEP_LABEL_SIZES=i;exports.STEP_STATUS_CLASSES=T;exports.STEP_WRAPPER_HORIZONTAL=E;exports.STEP_WRAPPER_VERTICAL=r;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { StepperSize, StepStatus } from './Stepper.types';
|
|
2
|
+
export declare const STEPPER_BASE_CLASSES = "Bear-Stepper";
|
|
3
|
+
export declare const STEPPER_HORIZONTAL_CLASSES = "flex items-start";
|
|
4
|
+
export declare const STEPPER_VERTICAL_CLASSES = "flex flex-col";
|
|
5
|
+
export declare const STEP_WRAPPER_HORIZONTAL = "flex-1 relative";
|
|
6
|
+
export declare const STEP_WRAPPER_VERTICAL = "relative flex items-start pb-8 last:pb-0";
|
|
7
|
+
export declare const STEP_INDICATOR_BASE = "Bear-Stepper__indicator flex items-center justify-center rounded-full font-medium transition-all";
|
|
8
|
+
export declare const STEP_INDICATOR_SIZES: Record<StepperSize, string>;
|
|
9
|
+
export declare const STEP_STATUS_CLASSES: Record<StepStatus, {
|
|
10
|
+
indicator: string;
|
|
11
|
+
label: string;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const CONNECTOR_BASE = "Bear-Stepper__connector absolute transition-colors";
|
|
14
|
+
export declare const CONNECTOR_HORIZONTAL = "top-4 left-1/2 right-0 h-0.5 -translate-y-1/2";
|
|
15
|
+
export declare const CONNECTOR_VERTICAL = "left-4 top-8 w-0.5 h-full -translate-x-1/2";
|
|
16
|
+
export declare const CONNECTOR_STYLES: {
|
|
17
|
+
solid: string;
|
|
18
|
+
dashed: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const CONNECTOR_STATUS: {
|
|
21
|
+
pending: string;
|
|
22
|
+
completed: string;
|
|
23
|
+
};
|
|
24
|
+
export declare const STEP_LABEL_BASE = "Bear-Stepper__label transition-colors";
|
|
25
|
+
export declare const STEP_LABEL_SIZES: Record<StepperSize, {
|
|
26
|
+
label: string;
|
|
27
|
+
description: string;
|
|
28
|
+
}>;
|
|
29
|
+
export declare const STEP_DESCRIPTION_CLASSES = "text-gray-500 dark:text-gray-400 mt-0.5";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
const t = "Bear-Stepper", e = "flex items-start", r = "flex flex-col", a = "flex-1 relative", n = "relative flex items-start pb-8 last:pb-0", o = "Bear-Stepper__indicator flex items-center justify-center rounded-full font-medium transition-all", s = {
|
|
2
|
+
sm: "w-6 h-6 text-xs",
|
|
3
|
+
md: "w-8 h-8 text-sm",
|
|
4
|
+
lg: "w-10 h-10 text-base"
|
|
5
|
+
}, l = {
|
|
6
|
+
pending: {
|
|
7
|
+
indicator: "bg-gray-200 dark:bg-zinc-700 text-gray-500 dark:text-gray-400",
|
|
8
|
+
label: "text-gray-500 dark:text-gray-400"
|
|
9
|
+
},
|
|
10
|
+
active: {
|
|
11
|
+
indicator: "bg-pink-500 text-white shadow-lg shadow-pink-500/30",
|
|
12
|
+
label: "text-gray-900 dark:text-white font-medium"
|
|
13
|
+
},
|
|
14
|
+
completed: {
|
|
15
|
+
indicator: "bg-green-500 text-white",
|
|
16
|
+
label: "text-gray-700 dark:text-gray-300"
|
|
17
|
+
},
|
|
18
|
+
error: {
|
|
19
|
+
indicator: "bg-red-500 text-white",
|
|
20
|
+
label: "text-red-500 dark:text-red-400"
|
|
21
|
+
}
|
|
22
|
+
}, S = "Bear-Stepper__connector absolute transition-colors", i = "top-4 left-1/2 right-0 h-0.5 -translate-y-1/2", E = "left-4 top-8 w-0.5 h-full -translate-x-1/2", x = {
|
|
23
|
+
pending: "bg-gray-200 dark:bg-zinc-700",
|
|
24
|
+
completed: "bg-green-500"
|
|
25
|
+
}, c = "Bear-Stepper__label transition-colors", _ = {
|
|
26
|
+
sm: { label: "text-xs", description: "text-[10px]" },
|
|
27
|
+
md: { label: "text-sm", description: "text-xs" },
|
|
28
|
+
lg: { label: "text-base", description: "text-sm" }
|
|
29
|
+
}, d = "text-gray-500 dark:text-gray-400 mt-0.5";
|
|
30
|
+
export {
|
|
31
|
+
S as CONNECTOR_BASE,
|
|
32
|
+
i as CONNECTOR_HORIZONTAL,
|
|
33
|
+
x as CONNECTOR_STATUS,
|
|
34
|
+
E as CONNECTOR_VERTICAL,
|
|
35
|
+
t as STEPPER_BASE_CLASSES,
|
|
36
|
+
e as STEPPER_HORIZONTAL_CLASSES,
|
|
37
|
+
r as STEPPER_VERTICAL_CLASSES,
|
|
38
|
+
d as STEP_DESCRIPTION_CLASSES,
|
|
39
|
+
o as STEP_INDICATOR_BASE,
|
|
40
|
+
s as STEP_INDICATOR_SIZES,
|
|
41
|
+
c as STEP_LABEL_BASE,
|
|
42
|
+
_ as STEP_LABEL_SIZES,
|
|
43
|
+
l as STEP_STATUS_CLASSES,
|
|
44
|
+
a as STEP_WRAPPER_HORIZONTAL,
|
|
45
|
+
n as STEP_WRAPPER_VERTICAL
|
|
46
|
+
};
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { StepperProps, StepperControlsProps } from './Stepper.types';
|
|
2
|
+
/**
|
|
3
|
+
* Stepper - Multi-step wizard component
|
|
4
|
+
*/
|
|
5
|
+
export declare const Stepper: import('react').ForwardRefExoticComponent<StepperProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
6
|
+
/**
|
|
7
|
+
* StepperControls - Navigation buttons for stepper
|
|
8
|
+
*/
|
|
9
|
+
export declare const StepperControls: import('react').ForwardRefExoticComponent<StepperControlsProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
export default Stepper;
|
|
@@ -1,100 +1,151 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
import { jsx as r, jsxs as l, Fragment as Z } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as b } from "react";
|
|
3
|
+
import { cn as i } from "../../utils/cn.js";
|
|
4
|
+
import { STEP_STATUS_CLASSES as I, STEP_LABEL_SIZES as z, STEP_LABEL_BASE as O, STEP_DESCRIPTION_CLASSES as g, STEP_WRAPPER_HORIZONTAL as H, STEP_WRAPPER_VERTICAL as W, STEPPER_HORIZONTAL_CLASSES as j, STEPPER_VERTICAL_CLASSES as D, STEPPER_BASE_CLASSES as V, STEP_INDICATOR_SIZES as F, STEP_INDICATOR_BASE as U, CONNECTOR_STATUS as L, CONNECTOR_HORIZONTAL as q, CONNECTOR_VERTICAL as G, CONNECTOR_BASE as J } from "./Stepper.const.js";
|
|
5
|
+
import { Button as v } from "../Button/Button.js";
|
|
6
|
+
const K = () => /* @__PURE__ */ r("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: /* @__PURE__ */ r("polyline", { points: "20 6 9 17 4 12" }) }), M = () => /* @__PURE__ */ l("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "3", children: [
|
|
7
|
+
/* @__PURE__ */ r("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
8
|
+
/* @__PURE__ */ r("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
9
|
+
] }), Q = b(
|
|
10
|
+
({
|
|
11
|
+
steps: s,
|
|
12
|
+
activeStep: o,
|
|
13
|
+
onStepClick: a,
|
|
14
|
+
orientation: N = "horizontal",
|
|
15
|
+
size: d = "md",
|
|
16
|
+
showNumbers: f = !0,
|
|
17
|
+
clickable: m = !1,
|
|
18
|
+
showConnectors: T = !0,
|
|
19
|
+
connectorStyle: _ = "solid",
|
|
20
|
+
alternativeLabel: S = !1,
|
|
21
|
+
completedIcon: p,
|
|
22
|
+
errorIcon: u,
|
|
23
|
+
testId: A,
|
|
24
|
+
className: R,
|
|
25
|
+
...x
|
|
26
|
+
}, y) => {
|
|
27
|
+
const B = (e, t) => t.status ? t.status : e < o ? "completed" : e === o ? "active" : "pending", E = N === "horizontal", k = F[d], h = z[d], P = (e, t, n) => {
|
|
28
|
+
const C = I[n];
|
|
29
|
+
let c = null;
|
|
30
|
+
return e.icon ? c = e.icon : n === "completed" ? c = p || /* @__PURE__ */ r(K, {}) : n === "error" ? c = u || /* @__PURE__ */ r(M, {}) : f && (c = t + 1), /* @__PURE__ */ r(
|
|
31
|
+
"div",
|
|
32
|
+
{
|
|
33
|
+
className: i(
|
|
34
|
+
U,
|
|
35
|
+
k,
|
|
36
|
+
C.indicator,
|
|
37
|
+
m && !e.disabled && "cursor-pointer hover:scale-105"
|
|
38
|
+
),
|
|
39
|
+
onClick: () => {
|
|
40
|
+
m && !e.disabled && a && a(t);
|
|
41
|
+
},
|
|
42
|
+
children: c
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
}, w = (e) => {
|
|
46
|
+
if (!T || e === s.length - 1) return null;
|
|
47
|
+
const t = e < o;
|
|
48
|
+
return /* @__PURE__ */ r(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: i(
|
|
52
|
+
J,
|
|
53
|
+
E ? q : G,
|
|
54
|
+
t ? L.completed : L.pending,
|
|
55
|
+
_ === "dashed" && "border-t-2 border-dashed bg-transparent"
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ r(
|
|
45
61
|
"div",
|
|
46
62
|
{
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
63
|
+
ref: y,
|
|
64
|
+
className: i(
|
|
65
|
+
V,
|
|
66
|
+
E ? j : D,
|
|
67
|
+
R
|
|
50
68
|
),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
"data-testid": A,
|
|
70
|
+
...x,
|
|
71
|
+
children: s.map((e, t) => {
|
|
72
|
+
const n = B(t, e), C = I[n];
|
|
73
|
+
return /* @__PURE__ */ l(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: i(
|
|
77
|
+
"Bear-Stepper__step",
|
|
78
|
+
E ? H : W
|
|
79
|
+
),
|
|
80
|
+
children: [
|
|
81
|
+
E ? (
|
|
82
|
+
// Horizontal layout
|
|
83
|
+
/* @__PURE__ */ l("div", { className: i("flex", S ? "flex-col items-center" : "items-center gap-3"), children: [
|
|
84
|
+
P(e, t, n),
|
|
85
|
+
/* @__PURE__ */ l("div", { className: i(S && "text-center mt-2"), children: [
|
|
86
|
+
/* @__PURE__ */ r("div", { className: i(O, h.label, C.label), children: e.label }),
|
|
87
|
+
e.description && /* @__PURE__ */ r("div", { className: i(g, h.description), children: e.description })
|
|
88
|
+
] })
|
|
89
|
+
] })
|
|
90
|
+
) : (
|
|
91
|
+
// Vertical layout
|
|
92
|
+
/* @__PURE__ */ l(Z, { children: [
|
|
93
|
+
/* @__PURE__ */ r("div", { className: "flex-shrink-0 mr-4", children: P(e, t, n) }),
|
|
94
|
+
/* @__PURE__ */ l("div", { className: "flex-1 pt-0.5", children: [
|
|
95
|
+
/* @__PURE__ */ r("div", { className: i(O, h.label, C.label), children: e.label }),
|
|
96
|
+
e.description && /* @__PURE__ */ r("div", { className: i(g, h.description), children: e.description }),
|
|
97
|
+
e.content && n === "active" && /* @__PURE__ */ r("div", { className: "mt-4", children: e.content })
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
),
|
|
101
|
+
w(t)
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
t
|
|
105
|
+
);
|
|
106
|
+
})
|
|
107
|
+
}
|
|
66
108
|
);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
109
|
+
}
|
|
110
|
+
);
|
|
111
|
+
Q.displayName = "Stepper";
|
|
112
|
+
const X = b(
|
|
113
|
+
({
|
|
114
|
+
activeStep: s,
|
|
115
|
+
totalSteps: o,
|
|
116
|
+
onPrev: a,
|
|
117
|
+
onNext: N,
|
|
118
|
+
onComplete: d,
|
|
119
|
+
disablePrev: f = !1,
|
|
120
|
+
disableNext: m = !1,
|
|
121
|
+
prevLabel: T = "Previous",
|
|
122
|
+
nextLabel: _ = "Next",
|
|
123
|
+
completeLabel: S = "Complete",
|
|
124
|
+
showIndicator: p = !0
|
|
125
|
+
}, u) => {
|
|
126
|
+
const A = s === 0, R = s === o - 1;
|
|
127
|
+
return /* @__PURE__ */ l("div", { ref: u, className: "Bear-StepperControls flex items-center justify-between mt-6", children: [
|
|
128
|
+
/* @__PURE__ */ r(
|
|
129
|
+
v,
|
|
77
130
|
{
|
|
78
|
-
|
|
79
|
-
|
|
131
|
+
variant: "outline",
|
|
132
|
+
onClick: a,
|
|
133
|
+
disabled: A || f,
|
|
134
|
+
children: T
|
|
80
135
|
}
|
|
81
|
-
)
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
), children: l.map((e, r) => /* @__PURE__ */ o("div", { className: t("bear-flex", n ? "bear-flex-1 bear-items-center" : ""), children: [
|
|
94
|
-
k(e, r),
|
|
95
|
-
v(r)
|
|
96
|
-
] }, r)) });
|
|
97
|
-
};
|
|
136
|
+
),
|
|
137
|
+
p && /* @__PURE__ */ l("span", { className: "text-sm text-gray-500 dark:text-gray-400", children: [
|
|
138
|
+
"Step ",
|
|
139
|
+
s + 1,
|
|
140
|
+
" of ",
|
|
141
|
+
o
|
|
142
|
+
] }),
|
|
143
|
+
R ? /* @__PURE__ */ r(v, { variant: "primary", onClick: d, children: S }) : /* @__PURE__ */ r(v, { variant: "primary", onClick: N, disabled: m, children: _ })
|
|
144
|
+
] });
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
X.displayName = "StepperControls";
|
|
98
148
|
export {
|
|
99
|
-
|
|
149
|
+
Q as Stepper,
|
|
150
|
+
X as StepperControls
|
|
100
151
|
};
|
|
@@ -1,20 +1,70 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export
|
|
1
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type StepperOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type StepStatus = 'pending' | 'active' | 'completed' | 'error';
|
|
4
|
+
export type StepperSize = 'sm' | 'md' | 'lg';
|
|
5
|
+
export interface Step {
|
|
6
|
+
/** Step label/title */
|
|
3
7
|
label: string;
|
|
8
|
+
/** Step description */
|
|
4
9
|
description?: string;
|
|
10
|
+
/** Optional icon */
|
|
5
11
|
icon?: ReactNode;
|
|
6
|
-
|
|
7
|
-
|
|
12
|
+
/** Step status (auto-calculated if not provided) */
|
|
13
|
+
status?: StepStatus;
|
|
14
|
+
/** Whether step is disabled */
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
/** Optional content for this step */
|
|
17
|
+
content?: ReactNode;
|
|
8
18
|
}
|
|
9
|
-
export interface StepperProps {
|
|
10
|
-
steps
|
|
19
|
+
export interface StepperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
20
|
+
/** Array of steps */
|
|
21
|
+
steps: Step[];
|
|
22
|
+
/** Current active step (0-indexed) */
|
|
11
23
|
activeStep: number;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
24
|
+
/** Called when step is clicked */
|
|
25
|
+
onStepClick?: (stepIndex: number) => void;
|
|
26
|
+
/** Orientation */
|
|
27
|
+
orientation?: StepperOrientation;
|
|
28
|
+
/** Size */
|
|
29
|
+
size?: StepperSize;
|
|
30
|
+
/** Show step numbers */
|
|
31
|
+
showNumbers?: boolean;
|
|
32
|
+
/** Allow clicking on any step */
|
|
33
|
+
clickable?: boolean;
|
|
34
|
+
/** Show connector lines */
|
|
35
|
+
showConnectors?: boolean;
|
|
36
|
+
/** Connector line style */
|
|
37
|
+
connectorStyle?: 'solid' | 'dashed';
|
|
38
|
+
/** Alternative label position (below for horizontal) */
|
|
39
|
+
alternativeLabel?: boolean;
|
|
40
|
+
/** Custom completed icon */
|
|
17
41
|
completedIcon?: ReactNode;
|
|
18
|
-
|
|
19
|
-
|
|
42
|
+
/** Custom error icon */
|
|
43
|
+
errorIcon?: ReactNode;
|
|
44
|
+
/** Test ID */
|
|
45
|
+
testId?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface StepperControlsProps {
|
|
48
|
+
/** Current step */
|
|
49
|
+
activeStep: number;
|
|
50
|
+
/** Total number of steps */
|
|
51
|
+
totalSteps: number;
|
|
52
|
+
/** Go to previous step */
|
|
53
|
+
onPrev: () => void;
|
|
54
|
+
/** Go to next step */
|
|
55
|
+
onNext: () => void;
|
|
56
|
+
/** On complete all steps */
|
|
57
|
+
onComplete?: () => void;
|
|
58
|
+
/** Disable previous button */
|
|
59
|
+
disablePrev?: boolean;
|
|
60
|
+
/** Disable next button */
|
|
61
|
+
disableNext?: boolean;
|
|
62
|
+
/** Previous button text */
|
|
63
|
+
prevLabel?: string;
|
|
64
|
+
/** Next button text */
|
|
65
|
+
nextLabel?: string;
|
|
66
|
+
/** Complete button text */
|
|
67
|
+
completeLabel?: string;
|
|
68
|
+
/** Show step indicator */
|
|
69
|
+
showIndicator?: boolean;
|
|
20
70
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Stepper } from './Stepper';
|
|
2
|
-
export type { StepperProps,
|
|
1
|
+
export { Stepper, StepperControls } from './Stepper';
|
|
2
|
+
export type { StepperProps, StepperControlsProps, Step, StepStatus, StepperOrientation, StepperSize } from './Stepper.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 a=require("react/jsx-runtime"),e=require("../../utils/cn.cjs"),g="Bear-Switch bear-inline-flex bear-items-center bear-gap-3 bear-cursor-pointer",h="bear-opacity-50 bear-cursor-not-allowed",C="Bear-Switch__track bear-relative bear-inline-flex bear-items-center bear-shrink-0 bear-rounded-full bear-transition-colors bear-duration-200 focus-within:bear-ring-2 focus-within:bear-ring-pink-500 focus-within:bear-ring-offset-2 focus-within:bear-ring-offset-white dark:focus-within:bear-ring-offset-zinc-900",p="bear-bg-pink-500",E="bear-bg-gray-300 dark:bear-bg-gray-600",A="Bear-Switch__thumb bear-absolute bear-top-0.5 bear-left-0.5 bear-rounded-full bear-bg-white bear-shadow bear-transition-transform bear-duration-200 bear-flex bear-items-center bear-justify-center",y="Bear-Switch__label bear-text-sm bear-text-gray-700 dark:bear-text-gray-300",l="Bear-Switch__icon bear-flex bear-items-center bear-justify-center",j={sm:{track:"bear-w-8 bear-h-4",thumb:"bear-w-3 bear-h-3",translate:"bear-translate-x-4",iconSize:8},md:{track:"bear-w-11 bear-h-6",thumb:"bear-w-5 bear-h-5",translate:"bear-translate-x-5",iconSize:12},lg:{track:"bear-w-14 bear-h-7",thumb:"bear-w-6 bear-h-6",translate:"bear-translate-x-7",iconSize:16}},T=({label:o,checked:r=!1,onCheckedChange:t,size:u="md",disabled:s=!1,uncheckedIcon:n,checkedIcon:b,showIconsInThumb:S=!1,className:f,testId:x,id:_,...m})=>{const w=()=>{s||t==null||t(!r)},i=j[u],c=n||b;return a.jsxs("label",{id:_,"data-testid":x,className:e.cn(g,s&&h,f),children:[a.jsx("input",{type:"checkbox",checked:r,onChange:w,disabled:s,className:"bear-sr-only",...m}),a.jsxs("span",{className:e.cn(C,r?p:E,i.track),children:[c&&!S&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:e.cn(l,"bear-absolute bear-left-1",r?"bear-text-white":"bear-text-transparent","bear-transition-colors bear-duration-200"),children:b}),a.jsx("span",{className:e.cn(l,"bear-absolute bear-right-1",r?"bear-text-transparent":"bear-text-gray-600 dark:bear-text-gray-400","bear-transition-colors bear-duration-200"),children:n})]}),a.jsx("span",{className:e.cn(A,r&&i.translate,i.thumb),children:c&&S&&a.jsx("span",{className:e.cn(l,r?"bear-text-pink-500":"bear-text-gray-400"),children:r?b:n})})]}),o&&a.jsx("span",{className:y,children:o})]})};exports.Switch=T;
|
|
@@ -1,81 +1,108 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
const
|
|
1
|
+
import { jsxs as o, jsx as r, Fragment as p } from "react/jsx-runtime";
|
|
2
|
+
import { cn as e } from "../../utils/cn.js";
|
|
3
|
+
const C = "Bear-Switch bear-inline-flex bear-items-center bear-gap-3 bear-cursor-pointer", g = "bear-opacity-50 bear-cursor-not-allowed", E = "Bear-Switch__track bear-relative bear-inline-flex bear-items-center bear-shrink-0 bear-rounded-full bear-transition-colors bear-duration-200 focus-within:bear-ring-2 focus-within:bear-ring-pink-500 focus-within:bear-ring-offset-2 focus-within:bear-ring-offset-white dark:focus-within:bear-ring-offset-zinc-900", A = "bear-bg-pink-500", y = "bear-bg-gray-300 dark:bear-bg-gray-600", T = "Bear-Switch__thumb bear-absolute bear-top-0.5 bear-left-0.5 bear-rounded-full bear-bg-white bear-shadow bear-transition-transform bear-duration-200 bear-flex bear-items-center bear-justify-center", H = "Bear-Switch__label bear-text-sm bear-text-gray-700 dark:bear-text-gray-300", l = "Bear-Switch__icon bear-flex bear-items-center bear-justify-center", L = {
|
|
4
4
|
sm: {
|
|
5
5
|
track: "bear-w-8 bear-h-4",
|
|
6
6
|
thumb: "bear-w-3 bear-h-3",
|
|
7
|
-
translate: "bear-translate-x-4"
|
|
7
|
+
translate: "bear-translate-x-4",
|
|
8
|
+
iconSize: 8
|
|
8
9
|
},
|
|
9
10
|
md: {
|
|
10
11
|
track: "bear-w-11 bear-h-6",
|
|
11
12
|
thumb: "bear-w-5 bear-h-5",
|
|
12
|
-
translate: "bear-translate-x-5"
|
|
13
|
+
translate: "bear-translate-x-5",
|
|
14
|
+
iconSize: 12
|
|
13
15
|
},
|
|
14
16
|
lg: {
|
|
15
17
|
track: "bear-w-14 bear-h-7",
|
|
16
18
|
thumb: "bear-w-6 bear-h-6",
|
|
17
|
-
translate: "bear-translate-x-7"
|
|
19
|
+
translate: "bear-translate-x-7",
|
|
20
|
+
iconSize: 16
|
|
18
21
|
}
|
|
19
|
-
},
|
|
20
|
-
label:
|
|
21
|
-
checked:
|
|
22
|
-
onCheckedChange:
|
|
23
|
-
size:
|
|
24
|
-
disabled:
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
}, d = ({
|
|
23
|
+
label: S,
|
|
24
|
+
checked: a = !1,
|
|
25
|
+
onCheckedChange: t,
|
|
26
|
+
size: _ = "md",
|
|
27
|
+
disabled: s = !1,
|
|
28
|
+
uncheckedIcon: b,
|
|
29
|
+
checkedIcon: n,
|
|
30
|
+
showIconsInThumb: c = !1,
|
|
31
|
+
className: m,
|
|
32
|
+
testId: u,
|
|
33
|
+
id: w,
|
|
34
|
+
...x
|
|
27
35
|
}) => {
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
return /* @__PURE__ */
|
|
36
|
+
const h = () => {
|
|
37
|
+
s || t == null || t(!a);
|
|
38
|
+
}, i = L[_], f = b || n;
|
|
39
|
+
return /* @__PURE__ */ o(
|
|
32
40
|
"label",
|
|
33
41
|
{
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
id: w,
|
|
43
|
+
"data-testid": u,
|
|
44
|
+
className: e(
|
|
45
|
+
C,
|
|
46
|
+
s && g,
|
|
47
|
+
m
|
|
38
48
|
),
|
|
39
49
|
children: [
|
|
40
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ r(
|
|
41
51
|
"input",
|
|
42
52
|
{
|
|
43
53
|
type: "checkbox",
|
|
44
|
-
checked:
|
|
45
|
-
onChange:
|
|
46
|
-
disabled:
|
|
54
|
+
checked: a,
|
|
55
|
+
onChange: h,
|
|
56
|
+
disabled: s,
|
|
47
57
|
className: "bear-sr-only",
|
|
48
|
-
...
|
|
58
|
+
...x
|
|
49
59
|
}
|
|
50
60
|
),
|
|
51
|
-
/* @__PURE__ */
|
|
61
|
+
/* @__PURE__ */ o(
|
|
52
62
|
"span",
|
|
53
63
|
{
|
|
54
|
-
className:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
r ? "bear-bg-bear-500" : "bear-bg-gray-600",
|
|
59
|
-
n[t].track
|
|
64
|
+
className: e(
|
|
65
|
+
E,
|
|
66
|
+
a ? A : y,
|
|
67
|
+
i.track
|
|
60
68
|
),
|
|
61
|
-
children:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"bear-absolute bear-
|
|
66
|
-
"bear-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
children: [
|
|
70
|
+
f && !c && /* @__PURE__ */ o(p, { children: [
|
|
71
|
+
/* @__PURE__ */ r("span", { className: e(
|
|
72
|
+
l,
|
|
73
|
+
"bear-absolute bear-left-1",
|
|
74
|
+
a ? "bear-text-white" : "bear-text-transparent",
|
|
75
|
+
"bear-transition-colors bear-duration-200"
|
|
76
|
+
), children: n }),
|
|
77
|
+
/* @__PURE__ */ r("span", { className: e(
|
|
78
|
+
l,
|
|
79
|
+
"bear-absolute bear-right-1",
|
|
80
|
+
a ? "bear-text-transparent" : "bear-text-gray-600 dark:bear-text-gray-400",
|
|
81
|
+
"bear-transition-colors bear-duration-200"
|
|
82
|
+
), children: b })
|
|
83
|
+
] }),
|
|
84
|
+
/* @__PURE__ */ r(
|
|
85
|
+
"span",
|
|
86
|
+
{
|
|
87
|
+
className: e(
|
|
88
|
+
T,
|
|
89
|
+
a && i.translate,
|
|
90
|
+
i.thumb
|
|
91
|
+
),
|
|
92
|
+
children: f && c && /* @__PURE__ */ r("span", { className: e(
|
|
93
|
+
l,
|
|
94
|
+
a ? "bear-text-pink-500" : "bear-text-gray-400"
|
|
95
|
+
), children: a ? n : b })
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
]
|
|
72
99
|
}
|
|
73
100
|
),
|
|
74
|
-
|
|
101
|
+
S && /* @__PURE__ */ r("span", { className: H, children: S })
|
|
75
102
|
]
|
|
76
103
|
}
|
|
77
104
|
);
|
|
78
105
|
};
|
|
79
106
|
export {
|
|
80
|
-
|
|
107
|
+
d as Switch
|
|
81
108
|
};
|