@forgedevstack/bear 1.0.3 → 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/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/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.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 +112 -115
- 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 -2
- package/dist/components/CodeBlock/CodeBlock.js +65 -52
- package/dist/components/CodeBlock/CodeBlock.types.d.ts +12 -1
- package/dist/components/Editable/Editable.cjs +1 -1
- package/dist/components/Editable/Editable.js +115 -115
- 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/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/index.d.ts +22 -0
- package/dist/components/Input/Input.cjs +1 -1
- package/dist/components/Input/Input.js +36 -35
- 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 -10
- 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 +14 -0
- package/dist/components/RichEditor/RichEditor.js +341 -129
- package/dist/components/RichEditor/RichEditor.types.d.ts +38 -1
- 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 -2
- package/dist/components/Sidebar/Sidebar.cjs +1 -1
- 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 +14 -2
- package/dist/components/Sidebar/Sidebar.js +50 -138
- package/dist/components/Sidebar/Sidebar.types.d.ts +7 -3
- 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 -2
- 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/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 +17 -5
- package/dist/components/index.js +216 -195
- 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 +273 -224
- package/dist/styles.css +1 -1
- package/package.json +16 -23
- package/dist/components/RichEditor/RichEditor.icons.cjs +0 -1
- package/dist/components/RichEditor/RichEditor.icons.d.ts +0 -16
- package/dist/components/RichEditor/RichEditor.icons.js +0 -62
- package/dist/components/RichEditor/RichEditor.utils.cjs +0 -1
- package/dist/components/RichEditor/RichEditor.utils.d.ts +0 -3
- package/dist/components/RichEditor/RichEditor.utils.js +0 -22
|
@@ -1,129 +1,130 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DateTimePicker as
|
|
4
|
-
import { cn as
|
|
5
|
-
import { formatTime as
|
|
6
|
-
import { TIMEPICKER_HOURS_12H as
|
|
7
|
-
const
|
|
8
|
-
mode:
|
|
1
|
+
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { useState as E, useRef as z, useEffect as x } from "react";
|
|
3
|
+
import { DateTimePicker as F } from "../DateTimePicker/DateTimePicker.js";
|
|
4
|
+
import { cn as l } from "../../utils/cn.js";
|
|
5
|
+
import { formatTime as W } from "./TimePicker.utils.js";
|
|
6
|
+
import { TIMEPICKER_HOURS_12H as q, TIMEPICKER_HOURS_24H as G, TIMEPICKER_MINUTES_DIVISOR as J, TIMEPICKER_LABEL_CLASSES as Q, variantClasses as X, sizeClasses as Y, TIMEPICKER_BUTTON_CLASSES as Z, TIMEPICKER_ERROR_CLASSES as $, TIMEPICKER_HELPER_CLASSES as g, TIMEPICKER_DROPDOWN_CLASSES as ee, TIMEPICKER_COLUMN_HEADER_CLASSES as u, TIMEPICKER_COLUMN_CLASSES as y, TIMEPICKER_OPTION_ACTIVE_CLASSES as N, TIMEPICKER_OPTION_INACTIVE_CLASSES as f, TIMEPICKER_OPTION_CLASSES as R, TIMEPICKER_FOOTER_CLASSES as te, TIMEPICKER_CLEAR_BUTTON_CLASSES as re, TIMEPICKER_CONFIRM_BUTTON_CLASSES as se, TIMEPICKER_ROOT_CLASSES as ie } from "./TimePicker.constants.js";
|
|
7
|
+
const Ee = ({
|
|
8
|
+
mode: H = "time",
|
|
9
9
|
value: m,
|
|
10
|
-
onChange:
|
|
10
|
+
onChange: s,
|
|
11
11
|
disabled: n = !1,
|
|
12
|
-
placeholder:
|
|
13
|
-
label:
|
|
14
|
-
error:
|
|
15
|
-
helperText:
|
|
16
|
-
format:
|
|
17
|
-
minuteStep:
|
|
18
|
-
clearable:
|
|
19
|
-
className:
|
|
20
|
-
size:
|
|
21
|
-
variant:
|
|
22
|
-
...
|
|
12
|
+
placeholder: T = "Select time",
|
|
13
|
+
label: S,
|
|
14
|
+
error: c,
|
|
15
|
+
helperText: I,
|
|
16
|
+
format: o = "12h",
|
|
17
|
+
minuteStep: _ = 5,
|
|
18
|
+
clearable: M = !0,
|
|
19
|
+
className: P,
|
|
20
|
+
size: b = "md",
|
|
21
|
+
variant: O = "default",
|
|
22
|
+
...U
|
|
23
23
|
}) => {
|
|
24
|
-
if (
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
24
|
+
if (H === "datetime")
|
|
25
|
+
return /* @__PURE__ */ t(
|
|
26
|
+
F,
|
|
27
27
|
{
|
|
28
28
|
value: m instanceof Date ? m : null,
|
|
29
|
-
onChange: (e) =>
|
|
29
|
+
onChange: (e) => s == null ? void 0 : s(e),
|
|
30
30
|
disabled: n,
|
|
31
|
-
placeholder:
|
|
32
|
-
label:
|
|
33
|
-
error:
|
|
34
|
-
helperText:
|
|
35
|
-
timeFormat:
|
|
36
|
-
minuteStep:
|
|
37
|
-
clearable:
|
|
38
|
-
className:
|
|
39
|
-
size:
|
|
40
|
-
variant:
|
|
41
|
-
...
|
|
31
|
+
placeholder: T,
|
|
32
|
+
label: S,
|
|
33
|
+
error: c,
|
|
34
|
+
helperText: I,
|
|
35
|
+
timeFormat: o,
|
|
36
|
+
minuteStep: _,
|
|
37
|
+
clearable: M,
|
|
38
|
+
className: P,
|
|
39
|
+
size: b,
|
|
40
|
+
variant: O,
|
|
41
|
+
...U
|
|
42
42
|
}
|
|
43
43
|
);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
if (
|
|
47
|
-
const [e,
|
|
48
|
-
|
|
44
|
+
const a = m, [A, d] = E(!1), [L, p] = E(12), [h, v] = E(0), [k, K] = E("AM"), C = z(null);
|
|
45
|
+
x(() => {
|
|
46
|
+
if (a && typeof a == "string") {
|
|
47
|
+
const [e, r] = a.split(" "), [V, j] = e.split(":").map(Number);
|
|
48
|
+
p(V), v(j), r && K(r);
|
|
49
49
|
}
|
|
50
|
-
}, [
|
|
51
|
-
const e = (
|
|
52
|
-
|
|
50
|
+
}, [a]), x(() => {
|
|
51
|
+
const e = (r) => {
|
|
52
|
+
C.current && !C.current.contains(r.target) && d(!1);
|
|
53
53
|
};
|
|
54
54
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
55
55
|
}, []);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
},
|
|
59
|
-
{ length:
|
|
60
|
-
(e,
|
|
56
|
+
const w = () => {
|
|
57
|
+
s == null || s(W(L, h, k, o)), d(!1);
|
|
58
|
+
}, D = o === "12h" ? Array.from({ length: q }, (e, r) => r + 1) : Array.from({ length: G }, (e, r) => r), B = Array.from(
|
|
59
|
+
{ length: J / _ },
|
|
60
|
+
(e, r) => r * _
|
|
61
61
|
);
|
|
62
|
-
return /* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */
|
|
62
|
+
return /* @__PURE__ */ i("div", { ref: C, className: l(ie, P), children: [
|
|
63
|
+
S && /* @__PURE__ */ t("label", { className: Q, children: S }),
|
|
64
|
+
/* @__PURE__ */ i(
|
|
65
65
|
"button",
|
|
66
66
|
{
|
|
67
67
|
type: "button",
|
|
68
|
-
onClick: () => !n &&
|
|
68
|
+
onClick: () => !n && d(!A),
|
|
69
69
|
disabled: n,
|
|
70
|
-
className:
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
className: l(
|
|
71
|
+
Z,
|
|
72
|
+
Y[b],
|
|
73
|
+
X[O],
|
|
74
|
+
c ? "bear-border-red-500" : "focus:bear-border-pink-500",
|
|
75
75
|
n && "bear-opacity-50 bear-cursor-not-allowed",
|
|
76
|
-
|
|
76
|
+
a ? "bear-text-gray-900 dark:bear-text-white" : "bear-text-gray-400 dark:bear-text-zinc-500"
|
|
77
77
|
),
|
|
78
78
|
children: [
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
-
/* @__PURE__ */
|
|
79
|
+
/* @__PURE__ */ t("span", { children: a || T }),
|
|
80
|
+
/* @__PURE__ */ t("svg", { className: "bear-w-5 bear-h-5 bear-text-gray-400 dark:bear-text-zinc-400", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z" }) })
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
),
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
/* @__PURE__ */
|
|
88
|
-
/* @__PURE__ */
|
|
89
|
-
/* @__PURE__ */
|
|
90
|
-
/* @__PURE__ */
|
|
84
|
+
c && /* @__PURE__ */ t("p", { className: $, children: c }),
|
|
85
|
+
I && !c && /* @__PURE__ */ t("p", { className: g, children: I }),
|
|
86
|
+
A && /* @__PURE__ */ i("div", { className: ee, children: [
|
|
87
|
+
/* @__PURE__ */ i("div", { className: "bear-flex bear-gap-2 bear-mb-3", children: [
|
|
88
|
+
/* @__PURE__ */ i("div", { className: "bear-flex-1", children: [
|
|
89
|
+
/* @__PURE__ */ t("div", { className: u, children: "Hour" }),
|
|
90
|
+
/* @__PURE__ */ t("div", { className: y, children: D.map((e) => /* @__PURE__ */ t(
|
|
91
91
|
"button",
|
|
92
92
|
{
|
|
93
|
-
onClick: () =>
|
|
94
|
-
className:
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
onClick: () => p(e),
|
|
94
|
+
className: l(
|
|
95
|
+
R,
|
|
96
|
+
L === e ? N : f
|
|
97
97
|
),
|
|
98
98
|
children: e.toString().padStart(2, "0")
|
|
99
99
|
},
|
|
100
100
|
e
|
|
101
101
|
)) })
|
|
102
102
|
] }),
|
|
103
|
-
/* @__PURE__ */
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
/* @__PURE__ */
|
|
103
|
+
/* @__PURE__ */ i("div", { className: "bear-flex-1", children: [
|
|
104
|
+
/* @__PURE__ */ t("div", { className: u, children: "Minute" }),
|
|
105
|
+
/* @__PURE__ */ t("div", { className: y, children: B.map((e) => /* @__PURE__ */ t(
|
|
106
106
|
"button",
|
|
107
107
|
{
|
|
108
|
-
onClick: () =>
|
|
109
|
-
className:
|
|
110
|
-
|
|
111
|
-
|
|
108
|
+
onClick: () => v(e),
|
|
109
|
+
className: l(
|
|
110
|
+
R,
|
|
111
|
+
h === e ? N : f
|
|
112
112
|
),
|
|
113
113
|
children: e.toString().padStart(2, "0")
|
|
114
114
|
},
|
|
115
115
|
e
|
|
116
116
|
)) })
|
|
117
117
|
] }),
|
|
118
|
-
|
|
119
|
-
/* @__PURE__ */
|
|
120
|
-
/* @__PURE__ */
|
|
118
|
+
o === "12h" && /* @__PURE__ */ i("div", { className: "bear-flex-1", children: [
|
|
119
|
+
/* @__PURE__ */ t("div", { className: u, children: "Period" }),
|
|
120
|
+
/* @__PURE__ */ t("div", { className: "bear-space-y-1", children: ["AM", "PM"].map((e) => /* @__PURE__ */ t(
|
|
121
121
|
"button",
|
|
122
122
|
{
|
|
123
|
-
onClick: () =>
|
|
124
|
-
className:
|
|
125
|
-
|
|
126
|
-
|
|
123
|
+
onClick: () => K(e),
|
|
124
|
+
className: l(
|
|
125
|
+
R,
|
|
126
|
+
"bear-py-2",
|
|
127
|
+
k === e ? N : f
|
|
127
128
|
),
|
|
128
129
|
children: e
|
|
129
130
|
},
|
|
@@ -131,15 +132,15 @@ const Y = ({
|
|
|
131
132
|
)) })
|
|
132
133
|
] })
|
|
133
134
|
] }),
|
|
134
|
-
/* @__PURE__ */
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}, className:
|
|
138
|
-
/* @__PURE__ */
|
|
135
|
+
/* @__PURE__ */ i("div", { className: te, children: [
|
|
136
|
+
M && a && /* @__PURE__ */ t("button", { onClick: () => {
|
|
137
|
+
s == null || s(""), d(!1);
|
|
138
|
+
}, className: re, children: "Clear" }),
|
|
139
|
+
/* @__PURE__ */ t("button", { onClick: w, className: se, children: "Confirm" })
|
|
139
140
|
] })
|
|
140
141
|
] })
|
|
141
142
|
] });
|
|
142
143
|
};
|
|
143
144
|
export {
|
|
144
|
-
|
|
145
|
+
Ee as TimePicker
|
|
145
146
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),s=require("../../utils/cn.cjs"),t=require("./Timeline.const.cjs"),d=T.forwardRef(({items:I,position:n="left",size:i="md",showLine:S=!0,pending:a,reverse:o=!1,lineColor:E,testId:N,className:x,...f},L)=>{const _=t.TIMELINE_POSITIONS[n],m=t.TIMELINE_DOT_SIZES[i],u=t.TIMELINE_DOT_ICON_SIZES[i],h=t.TIMELINE_TITLE_SIZES[i],M=t.TIMELINE_DESC_SIZES[i],p=T.useMemo(()=>{let e=[...I];return o&&(e=e.reverse()),a&&e.push({title:typeof a=="string"?a:"Loading...",description:typeof a=="boolean"?void 0:a,color:"gray"}),e},[I,o,a]),O=e=>{const c=e.color||"pink",l=e.active;return e.icon?r.jsx("div",{className:s.cn(t.TIMELINE_DOT_BASE,u,t.TIMELINE_DOT_COLORS[c],"flex items-center justify-center text-white",l&&"ring-4 ring-pink-500/30"),style:{top:"2px",...n==="left"?{left:"-4px"}:{},...n==="right"?{right:"-4px"}:{},...n==="alternate"?{left:"50%",transform:"translateX(-50%)"}:{}},children:e.icon}):r.jsx("div",{className:s.cn(t.TIMELINE_DOT_BASE,m,t.TIMELINE_DOT_COLORS[c],l&&"ring-4 ring-pink-500/30 scale-125"),style:{top:"6px",...n==="left"?{left:"0"}:{},...n==="right"?{right:"0"}:{},...n==="alternate"?{left:"50%",transform:"translateX(-50%)"}:{}}})},g=e=>{if(n!=="alternate")return{};const c=e%2===0;return{wrapper:c?"pr-8 text-right w-1/2":"pl-8 text-left w-1/2 ml-auto",content:c?"text-right":"text-left"}};return r.jsxs("div",{ref:L,className:s.cn(t.TIMELINE_BASE_CLASSES,x),"data-testid":N,...f,children:[S&&r.jsx("div",{className:s.cn(t.TIMELINE_LINE_BASE,_.line,E?"":t.TIMELINE_LINE_COLOR),style:E?{backgroundColor:E}:void 0}),p.map((e,c)=>{const l=g(c);return r.jsxs("div",{className:s.cn(t.TIMELINE_ITEM_BASE,n!=="alternate"&&_.wrapper,l.wrapper),children:[O(e),r.jsxs("div",{className:s.cn(t.TIMELINE_CONTENT_BASE,l.content),children:[e.time&&r.jsx("div",{className:s.cn(t.TIMELINE_TIME_CLASSES,"mb-1"),children:e.time}),r.jsx("h4",{className:s.cn("Bear-Timeline__title font-medium text-gray-900 dark:text-white",h,e.active&&"text-pink-600 dark:text-pink-400"),children:e.title}),e.description&&r.jsx("div",{className:s.cn("Bear-Timeline__description text-gray-600 dark:text-gray-400 mt-1",M),children:e.description}),e.extra&&r.jsx("div",{className:"Bear-Timeline__extra mt-3",children:e.extra})]})]},c)})]})});d.displayName="Timeline";exports.Timeline=d;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E="Bear-Timeline relative",t="Bear-Timeline__item relative pb-8 last:pb-0",e={left:{wrapper:"pl-8",content:"text-left",dot:"left-0",line:"left-3"},right:{wrapper:"pr-8 text-right",content:"text-right",dot:"right-0",line:"right-3"},alternate:{wrapper:"",content:"",dot:"",line:"left-1/2 -translate-x-1/2"}},I="Bear-Timeline__dot absolute rounded-full border-2 border-white dark:border-zinc-900 z-10 transition-all",_={sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"},T={sm:"w-6 h-6",md:"w-8 h-8",lg:"w-10 h-10"},r={pink:"bg-pink-500",green:"bg-green-500",blue:"bg-blue-500",amber:"bg-amber-500",red:"bg-red-500",gray:"bg-gray-400 dark:bg-zinc-600"},S="Bear-Timeline__line absolute top-0 w-0.5 h-full",n="bg-gray-200 dark:bg-zinc-700",L="Bear-Timeline__content",l={sm:"text-sm",md:"text-base",lg:"text-lg"},N={sm:"text-xs",md:"text-sm",lg:"text-base"},a="text-xs text-gray-500 dark:text-gray-400";exports.TIMELINE_BASE_CLASSES=E;exports.TIMELINE_CONTENT_BASE=L;exports.TIMELINE_DESC_SIZES=N;exports.TIMELINE_DOT_BASE=I;exports.TIMELINE_DOT_COLORS=r;exports.TIMELINE_DOT_ICON_SIZES=T;exports.TIMELINE_DOT_SIZES=_;exports.TIMELINE_ITEM_BASE=t;exports.TIMELINE_LINE_BASE=S;exports.TIMELINE_LINE_COLOR=n;exports.TIMELINE_POSITIONS=e;exports.TIMELINE_TIME_CLASSES=a;exports.TIMELINE_TITLE_SIZES=l;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { TimelineSize } from './Timeline.types';
|
|
2
|
+
export declare const TIMELINE_BASE_CLASSES = "Bear-Timeline relative";
|
|
3
|
+
export declare const TIMELINE_ITEM_BASE = "Bear-Timeline__item relative pb-8 last:pb-0";
|
|
4
|
+
export declare const TIMELINE_POSITIONS: {
|
|
5
|
+
left: {
|
|
6
|
+
wrapper: string;
|
|
7
|
+
content: string;
|
|
8
|
+
dot: string;
|
|
9
|
+
line: string;
|
|
10
|
+
};
|
|
11
|
+
right: {
|
|
12
|
+
wrapper: string;
|
|
13
|
+
content: string;
|
|
14
|
+
dot: string;
|
|
15
|
+
line: string;
|
|
16
|
+
};
|
|
17
|
+
alternate: {
|
|
18
|
+
wrapper: string;
|
|
19
|
+
content: string;
|
|
20
|
+
dot: string;
|
|
21
|
+
line: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export declare const TIMELINE_DOT_BASE = "Bear-Timeline__dot absolute rounded-full border-2 border-white dark:border-zinc-900 z-10 transition-all";
|
|
25
|
+
export declare const TIMELINE_DOT_SIZES: Record<TimelineSize, string>;
|
|
26
|
+
export declare const TIMELINE_DOT_ICON_SIZES: Record<TimelineSize, string>;
|
|
27
|
+
export declare const TIMELINE_DOT_COLORS: {
|
|
28
|
+
pink: string;
|
|
29
|
+
green: string;
|
|
30
|
+
blue: string;
|
|
31
|
+
amber: string;
|
|
32
|
+
red: string;
|
|
33
|
+
gray: string;
|
|
34
|
+
};
|
|
35
|
+
export declare const TIMELINE_LINE_BASE = "Bear-Timeline__line absolute top-0 w-0.5 h-full";
|
|
36
|
+
export declare const TIMELINE_LINE_COLOR = "bg-gray-200 dark:bg-zinc-700";
|
|
37
|
+
export declare const TIMELINE_CONTENT_BASE = "Bear-Timeline__content";
|
|
38
|
+
export declare const TIMELINE_TITLE_SIZES: Record<TimelineSize, string>;
|
|
39
|
+
export declare const TIMELINE_DESC_SIZES: Record<TimelineSize, string>;
|
|
40
|
+
export declare const TIMELINE_TIME_CLASSES = "text-xs text-gray-500 dark:text-gray-400";
|
|
@@ -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
|
};
|