@forgedevstack/bear 1.0.3 → 1.0.4
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 +14 -21
- 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,91 +1,80 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
busy: "bear-bg-red-500"
|
|
20
|
-
}, j = ({
|
|
21
|
-
src: t,
|
|
22
|
-
alt: e = "Avatar",
|
|
23
|
-
initials: s,
|
|
24
|
-
size: o = "md",
|
|
25
|
-
variant: a = "circle",
|
|
26
|
-
status: b,
|
|
27
|
-
bordered: l = !1,
|
|
28
|
-
className: c,
|
|
29
|
-
testId: n,
|
|
30
|
-
...m
|
|
31
|
-
}) => {
|
|
32
|
-
const [h, u] = y(!1), x = !t || h;
|
|
33
|
-
return /* @__PURE__ */ d(
|
|
1
|
+
import { jsxs as A, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p, { useState as _ } from "react";
|
|
3
|
+
import { cn as o } from "../../utils/cn.js";
|
|
4
|
+
import { AVATAR_DEFAULTS as s, AVATAR_STATUS as x, AVATAR_VARIANT as y, AVATAR_SIZE as g } from "./Avatar.const.js";
|
|
5
|
+
const T = (c) => {
|
|
6
|
+
const {
|
|
7
|
+
src: i,
|
|
8
|
+
alt: r = s.ALT,
|
|
9
|
+
initials: b,
|
|
10
|
+
size: d = s.SIZE,
|
|
11
|
+
variant: t = s.VARIANT,
|
|
12
|
+
status: a,
|
|
13
|
+
bordered: l = !1,
|
|
14
|
+
className: m,
|
|
15
|
+
testId: n,
|
|
16
|
+
...v
|
|
17
|
+
} = c, [h, u] = _(!1), f = !i || h;
|
|
18
|
+
return /* @__PURE__ */ A(
|
|
34
19
|
"div",
|
|
35
20
|
{
|
|
36
|
-
className:
|
|
21
|
+
className: o(
|
|
22
|
+
"Bear-Avatar",
|
|
37
23
|
"bear-relative bear-inline-flex bear-items-center bear-justify-center",
|
|
38
24
|
"bear-bg-gray-200 dark:bear-bg-gray-700",
|
|
39
25
|
"bear-overflow-hidden",
|
|
40
|
-
g[
|
|
41
|
-
|
|
42
|
-
l && "bear-ring-2 bear-ring-white dark:bear-ring-gray-900",
|
|
43
|
-
|
|
26
|
+
g[d],
|
|
27
|
+
y[t],
|
|
28
|
+
l && "Bear-Avatar--bordered bear-ring-2 bear-ring-white dark:bear-ring-gray-900",
|
|
29
|
+
m
|
|
44
30
|
),
|
|
45
31
|
"data-testid": n,
|
|
46
32
|
children: [
|
|
47
|
-
|
|
33
|
+
f ? b ? /* @__PURE__ */ e("span", { className: "Bear-Avatar__initials bear-font-medium bear-text-gray-600 dark:bear-text-gray-300 bear-uppercase", children: b.slice(0, s.MAX_INITIALS) }) : /* @__PURE__ */ e("svg", { className: "Bear-Avatar__placeholder bear-w-3/5 bear-h-3/5 bear-text-gray-400", fill: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ e("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" }) }) : /* @__PURE__ */ e(
|
|
48
34
|
"img",
|
|
49
35
|
{
|
|
50
|
-
src:
|
|
51
|
-
alt:
|
|
36
|
+
src: i,
|
|
37
|
+
alt: r,
|
|
52
38
|
onError: () => u(!0),
|
|
53
|
-
className: "bear-w-full bear-h-full bear-object-cover",
|
|
54
|
-
...
|
|
39
|
+
className: "Bear-Avatar__image bear-w-full bear-h-full bear-object-cover",
|
|
40
|
+
...v
|
|
55
41
|
}
|
|
56
42
|
),
|
|
57
|
-
|
|
43
|
+
a && /* @__PURE__ */ e(
|
|
58
44
|
"span",
|
|
59
45
|
{
|
|
60
|
-
className:
|
|
46
|
+
className: o(
|
|
47
|
+
"Bear-Avatar__status",
|
|
48
|
+
`Bear-Avatar__status--${a}`,
|
|
61
49
|
"bear-absolute bear-bottom-0 bear-right-0",
|
|
62
50
|
"bear-w-1/4 bear-h-1/4 bear-min-w-[8px] bear-min-h-[8px]",
|
|
63
51
|
"bear-rounded-full bear-ring-2 bear-ring-white dark:bear-ring-gray-900",
|
|
64
|
-
|
|
52
|
+
x[a]
|
|
65
53
|
)
|
|
66
54
|
}
|
|
67
55
|
)
|
|
68
56
|
]
|
|
69
57
|
}
|
|
70
58
|
);
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
return /* @__PURE__ */
|
|
79
|
-
|
|
80
|
-
l > 0 && /* @__PURE__ */
|
|
59
|
+
}, k = (c) => {
|
|
60
|
+
const {
|
|
61
|
+
children: i,
|
|
62
|
+
max: r,
|
|
63
|
+
size: b = s.SIZE,
|
|
64
|
+
className: d
|
|
65
|
+
} = c, t = p.Children.toArray(i), a = r ? t.slice(0, r) : t, l = r ? t.length - r : 0;
|
|
66
|
+
return /* @__PURE__ */ A("div", { className: o("Bear-AvatarGroup bear-flex bear--space-x-2", d), children: [
|
|
67
|
+
a.map((m, n) => /* @__PURE__ */ e("div", { className: "Bear-AvatarGroup__item bear-relative", style: { zIndex: a.length - n }, children: m }, n)),
|
|
68
|
+
l > 0 && /* @__PURE__ */ A(
|
|
81
69
|
"div",
|
|
82
70
|
{
|
|
83
|
-
className:
|
|
71
|
+
className: o(
|
|
72
|
+
"Bear-AvatarGroup__overflow",
|
|
84
73
|
"bear-relative bear-inline-flex bear-items-center bear-justify-center",
|
|
85
74
|
"bear-bg-gray-200 dark:bear-bg-gray-700 bear-rounded-full",
|
|
86
75
|
"bear-ring-2 bear-ring-white dark:bear-ring-gray-900",
|
|
87
76
|
"bear-text-gray-600 dark:bear-text-gray-300 bear-font-medium",
|
|
88
|
-
g[
|
|
77
|
+
g[b]
|
|
89
78
|
),
|
|
90
79
|
style: { zIndex: 0 },
|
|
91
80
|
children: [
|
|
@@ -97,6 +86,6 @@ const g = {
|
|
|
97
86
|
] });
|
|
98
87
|
};
|
|
99
88
|
export {
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
T as Avatar,
|
|
90
|
+
k as AvatarGroup
|
|
102
91
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../utils/cn.cjs"),e=require("./Badge.constants.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),r=require("../../utils/cn.cjs"),e=require("./Badge.constants.cjs"),u=({variant:s="neutral",size:n="sm",pill:t=!1,dot:d=!1,className:l,children:o,testId:c,...i})=>a.jsxs("span",{className:r.cn("Bear-Badge","bear-inline-flex bear-items-center bear-gap-1.5 bear-font-medium",e.sizeClasses[n],e.variantClasses[s],t?"Bear-Badge--pill bear-rounded-full":"bear-rounded-md",l),"data-testid":c,...i,children:[d&&a.jsx("span",{className:r.cn("Bear-Badge__dot",e.BADGE_DOT_SIZE_CLASSES,"bear-rounded-full",e.dotVariantColors[s])}),a.jsx("span",{className:"Bear-Badge__content",children:o})]});exports.Badge=u;
|
|
@@ -1,42 +1,44 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { cn as
|
|
3
|
-
import { dotVariantColors as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as i, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { cn as r } from "../../utils/cn.js";
|
|
3
|
+
import { dotVariantColors as B, BADGE_DOT_SIZE_CLASSES as f, variantClasses as p, sizeClasses as c } from "./Badge.constants.js";
|
|
4
|
+
const g = ({
|
|
5
5
|
variant: e = "neutral",
|
|
6
|
-
size:
|
|
7
|
-
pill:
|
|
6
|
+
size: s = "sm",
|
|
7
|
+
pill: d = !1,
|
|
8
8
|
dot: l = !1,
|
|
9
9
|
className: n,
|
|
10
|
-
children:
|
|
11
|
-
testId:
|
|
12
|
-
...
|
|
13
|
-
}) => /* @__PURE__ */
|
|
10
|
+
children: t,
|
|
11
|
+
testId: o,
|
|
12
|
+
...m
|
|
13
|
+
}) => /* @__PURE__ */ i(
|
|
14
14
|
"span",
|
|
15
15
|
{
|
|
16
|
-
className:
|
|
16
|
+
className: r(
|
|
17
|
+
"Bear-Badge",
|
|
17
18
|
"bear-inline-flex bear-items-center bear-gap-1.5 bear-font-medium",
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
c[s],
|
|
20
|
+
p[e],
|
|
21
|
+
d ? "Bear-Badge--pill bear-rounded-full" : "bear-rounded-md",
|
|
21
22
|
n
|
|
22
23
|
),
|
|
23
|
-
"data-testid":
|
|
24
|
-
...
|
|
24
|
+
"data-testid": o,
|
|
25
|
+
...m,
|
|
25
26
|
children: [
|
|
26
|
-
l && /* @__PURE__ */
|
|
27
|
+
l && /* @__PURE__ */ a(
|
|
27
28
|
"span",
|
|
28
29
|
{
|
|
29
|
-
className:
|
|
30
|
-
|
|
30
|
+
className: r(
|
|
31
|
+
"Bear-Badge__dot",
|
|
32
|
+
f,
|
|
31
33
|
"bear-rounded-full",
|
|
32
|
-
|
|
34
|
+
B[e]
|
|
33
35
|
)
|
|
34
36
|
}
|
|
35
37
|
),
|
|
36
|
-
|
|
38
|
+
/* @__PURE__ */ a("span", { className: "Bear-Badge__content", children: t })
|
|
37
39
|
]
|
|
38
40
|
}
|
|
39
41
|
);
|
|
40
42
|
export {
|
|
41
|
-
|
|
43
|
+
g as Badge
|
|
42
44
|
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("../../utils/cn.cjs"),t=({size:r=48,className:o,animated:s=!1})=>e.jsxs("svg",{width:r,height:r,viewBox:"0 0 100 100",fill:"none",className:l.cn("bear-logo",s&&"bear-animate-bear-glow",o),children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"emberFlameGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#ea580c"}),e.jsx("stop",{offset:"30%",stopColor:"#f97316"}),e.jsx("stop",{offset:"60%",stopColor:"#fb923c"}),e.jsx("stop",{offset:"100%",stopColor:"#fed7aa"})]}),e.jsxs("linearGradient",{id:"emberCoreGrad",x1:"50%",y1:"100%",x2:"50%",y2:"0%",children:[e.jsx("stop",{offset:"0%",stopColor:"#f97316"}),e.jsx("stop",{offset:"50%",stopColor:"#fbbf24"}),e.jsx("stop",{offset:"100%",stopColor:"#fef3c7"})]}),e.jsxs("filter",{id:"emberGlow",x:"-50%",y:"-50%",width:"200%",height:"200%",children:[e.jsx("feGaussianBlur",{stdDeviation:"3",result:"coloredBlur"}),e.jsxs("feMerge",{children:[e.jsx("feMergeNode",{in:"coloredBlur"}),e.jsx("feMergeNode",{in:"SourceGraphic"})]})]})]}),e.jsx("circle",{cx:"50",cy:"50",r:"45",fill:"#1a1a2e",stroke:"url(#emberFlameGrad)",strokeWidth:"2"}),e.jsx("path",{d:`M50 15
|
|
2
|
+
C35 30 25 45 25 60
|
|
3
|
+
C25 75 35 85 50 85
|
|
4
|
+
C65 85 75 75 75 60
|
|
5
|
+
C75 50 68 40 60 32
|
|
6
|
+
C55 27 50 25 50 35
|
|
7
|
+
C50 42 55 48 55 55
|
|
8
|
+
C55 62 52 67 50 67
|
|
9
|
+
C48 67 45 62 45 55
|
|
10
|
+
C45 45 55 35 55 25
|
|
11
|
+
C55 20 52 17 50 15
|
|
12
|
+
Z`,fill:"url(#emberFlameGrad)",filter:"url(#emberGlow)"}),e.jsx("path",{d:`M50 45
|
|
13
|
+
C45 50 42 55 42 62
|
|
14
|
+
C42 72 46 78 50 78
|
|
15
|
+
C54 78 58 72 58 62
|
|
16
|
+
C58 55 55 50 50 45
|
|
17
|
+
Z`,fill:"url(#emberCoreGrad)",opacity:"0.9"}),e.jsx("circle",{cx:"38",cy:"35",r:"2",fill:"#fed7aa",opacity:"0.8"}),e.jsx("circle",{cx:"62",cy:"38",r:"1.5",fill:"#fef3c7",opacity:"0.7"}),e.jsx("circle",{cx:"45",cy:"28",r:"1",fill:"#ffffff",opacity:"0.6"})]});exports.EmberLogo=t;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { cn as t } from "../../utils/cn.js";
|
|
3
|
+
const c = ({
|
|
4
|
+
size: o = 48,
|
|
5
|
+
className: l,
|
|
6
|
+
animated: f = !1
|
|
7
|
+
}) => /* @__PURE__ */ r(
|
|
8
|
+
"svg",
|
|
9
|
+
{
|
|
10
|
+
width: o,
|
|
11
|
+
height: o,
|
|
12
|
+
viewBox: "0 0 100 100",
|
|
13
|
+
fill: "none",
|
|
14
|
+
className: t(
|
|
15
|
+
"bear-logo",
|
|
16
|
+
f && "bear-animate-bear-glow",
|
|
17
|
+
l
|
|
18
|
+
),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ r("defs", { children: [
|
|
21
|
+
/* @__PURE__ */ r("linearGradient", { id: "emberFlameGrad", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: [
|
|
22
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "#ea580c" }),
|
|
23
|
+
/* @__PURE__ */ e("stop", { offset: "30%", stopColor: "#f97316" }),
|
|
24
|
+
/* @__PURE__ */ e("stop", { offset: "60%", stopColor: "#fb923c" }),
|
|
25
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "#fed7aa" })
|
|
26
|
+
] }),
|
|
27
|
+
/* @__PURE__ */ r("linearGradient", { id: "emberCoreGrad", x1: "50%", y1: "100%", x2: "50%", y2: "0%", children: [
|
|
28
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "#f97316" }),
|
|
29
|
+
/* @__PURE__ */ e("stop", { offset: "50%", stopColor: "#fbbf24" }),
|
|
30
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "#fef3c7" })
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ r("filter", { id: "emberGlow", x: "-50%", y: "-50%", width: "200%", height: "200%", children: [
|
|
33
|
+
/* @__PURE__ */ e("feGaussianBlur", { stdDeviation: "3", result: "coloredBlur" }),
|
|
34
|
+
/* @__PURE__ */ r("feMerge", { children: [
|
|
35
|
+
/* @__PURE__ */ e("feMergeNode", { in: "coloredBlur" }),
|
|
36
|
+
/* @__PURE__ */ e("feMergeNode", { in: "SourceGraphic" })
|
|
37
|
+
] })
|
|
38
|
+
] })
|
|
39
|
+
] }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
"circle",
|
|
42
|
+
{
|
|
43
|
+
cx: "50",
|
|
44
|
+
cy: "50",
|
|
45
|
+
r: "45",
|
|
46
|
+
fill: "#1a1a2e",
|
|
47
|
+
stroke: "url(#emberFlameGrad)",
|
|
48
|
+
strokeWidth: "2"
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
"path",
|
|
53
|
+
{
|
|
54
|
+
d: `M50 15
|
|
55
|
+
C35 30 25 45 25 60
|
|
56
|
+
C25 75 35 85 50 85
|
|
57
|
+
C65 85 75 75 75 60
|
|
58
|
+
C75 50 68 40 60 32
|
|
59
|
+
C55 27 50 25 50 35
|
|
60
|
+
C50 42 55 48 55 55
|
|
61
|
+
C55 62 52 67 50 67
|
|
62
|
+
C48 67 45 62 45 55
|
|
63
|
+
C45 45 55 35 55 25
|
|
64
|
+
C55 20 52 17 50 15
|
|
65
|
+
Z`,
|
|
66
|
+
fill: "url(#emberFlameGrad)",
|
|
67
|
+
filter: "url(#emberGlow)"
|
|
68
|
+
}
|
|
69
|
+
),
|
|
70
|
+
/* @__PURE__ */ e(
|
|
71
|
+
"path",
|
|
72
|
+
{
|
|
73
|
+
d: `M50 45
|
|
74
|
+
C45 50 42 55 42 62
|
|
75
|
+
C42 72 46 78 50 78
|
|
76
|
+
C54 78 58 72 58 62
|
|
77
|
+
C58 55 55 50 50 45
|
|
78
|
+
Z`,
|
|
79
|
+
fill: "url(#emberCoreGrad)",
|
|
80
|
+
opacity: "0.9"
|
|
81
|
+
}
|
|
82
|
+
),
|
|
83
|
+
/* @__PURE__ */ e("circle", { cx: "38", cy: "35", r: "2", fill: "#fed7aa", opacity: "0.8" }),
|
|
84
|
+
/* @__PURE__ */ e("circle", { cx: "62", cy: "38", r: "1.5", fill: "#fef3c7", opacity: "0.7" }),
|
|
85
|
+
/* @__PURE__ */ e("circle", { cx: "45", cy: "28", r: "1", fill: "#ffffff", opacity: "0.6" })
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
);
|
|
89
|
+
export {
|
|
90
|
+
c as EmberLogo
|
|
91
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),_=require("react"),b=require("../../utils/cn.cjs"),s=require("./Breadcrumbs.const.cjs"),k=({className:t})=>e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),A=({className:t})=>e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})}),N=t=>{const{items:n,separator:d,maxItems:i,itemsBeforeCollapse:m=s.BREADCRUMBS_DEFAULTS.ITEMS_BEFORE_COLLAPSE,itemsAfterCollapse:x=s.BREADCRUMBS_DEFAULTS.ITEMS_AFTER_COLLAPSE,className:u,size:c=s.BREADCRUMBS_DEFAULTS.SIZE,showHomeIcon:h=s.BREADCRUMBS_DEFAULTS.SHOW_HOME_ICON,testId:p,id:S,"aria-label":E="Breadcrumb"}=t,[f,B]=_.useState(!1),C=()=>d||e.jsx(A,{className:b.cn(s.BREADCRUMBS_ICON_SIZE[c],"bear-text-zinc-500 bear-mx-2")}),j=(r,a,I)=>{const o=e.jsxs("span",{className:"bear-flex bear-items-center bear-gap-1",children:[a===0&&h&&e.jsx(k,{className:s.BREADCRUMBS_ICON_SIZE[c]}),r.icon,r.label]});return I?e.jsx("span",{className:"bear-text-zinc-300 bear-font-medium","aria-current":"page",children:o}):r.href?e.jsx("a",{href:r.href,className:"bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors",children:o}):r.onClick?e.jsx("button",{type:"button",onClick:r.onClick,className:"bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors",children:o}):e.jsx("span",{className:"bear-text-zinc-400",children:o})},R=i&&n.length>i&&!f;let l=n;if(R){const r=n.slice(0,m),a=n.slice(-x);l=[...r,"ellipsis",...a]}return e.jsx("nav",{id:S,"data-testid":p,className:b.cn("bear-flex bear-items-center bear-flex-wrap",s.BREADCRUMBS_SIZE[c],u),"aria-label":E,children:e.jsx("ol",{className:"bear-flex bear-items-center bear-flex-wrap bear-list-none bear-p-0 bear-m-0",children:l.map((r,a)=>e.jsxs("li",{className:"bear-flex bear-items-center",children:[a>0&&e.jsx("span",{"aria-hidden":"true",children:C()}),r==="ellipsis"?e.jsx("button",{type:"button",onClick:()=>B(!0),className:"bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors bear-px-1","aria-label":"Show more breadcrumbs",children:"..."}):j(r,a,a===l.length-1)]},a))})})};exports.Breadcrumbs=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e={sm:"bear-text-xs",md:"bear-text-sm",lg:"bear-text-base"},E={sm:"bear-w-3 bear-h-3",md:"bear-w-4 bear-h-4",lg:"bear-w-5 bear-h-5"},S={SIZE:"md",ITEMS_BEFORE_COLLAPSE:1,ITEMS_AFTER_COLLAPSE:1,SHOW_HOME_ICON:!1};exports.BREADCRUMBS_DEFAULTS=S;exports.BREADCRUMBS_ICON_SIZE=E;exports.BREADCRUMBS_SIZE=e;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const BREADCRUMBS_SIZE: {
|
|
2
|
+
readonly sm: "bear-text-xs";
|
|
3
|
+
readonly md: "bear-text-sm";
|
|
4
|
+
readonly lg: "bear-text-base";
|
|
5
|
+
};
|
|
6
|
+
export declare const BREADCRUMBS_ICON_SIZE: {
|
|
7
|
+
readonly sm: "bear-w-3 bear-h-3";
|
|
8
|
+
readonly md: "bear-w-4 bear-h-4";
|
|
9
|
+
readonly lg: "bear-w-5 bear-h-5";
|
|
10
|
+
};
|
|
11
|
+
export declare const BREADCRUMBS_DEFAULTS: {
|
|
12
|
+
SIZE: "md";
|
|
13
|
+
ITEMS_BEFORE_COLLAPSE: number;
|
|
14
|
+
ITEMS_AFTER_COLLAPSE: number;
|
|
15
|
+
SHOW_HOME_ICON: boolean;
|
|
16
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
sm: "bear-text-xs",
|
|
3
|
+
md: "bear-text-sm",
|
|
4
|
+
lg: "bear-text-base"
|
|
5
|
+
}, E = {
|
|
6
|
+
sm: "bear-w-3 bear-h-3",
|
|
7
|
+
md: "bear-w-4 bear-h-4",
|
|
8
|
+
lg: "bear-w-5 bear-h-5"
|
|
9
|
+
}, S = {
|
|
10
|
+
SIZE: "md",
|
|
11
|
+
ITEMS_BEFORE_COLLAPSE: 1,
|
|
12
|
+
ITEMS_AFTER_COLLAPSE: 1,
|
|
13
|
+
SHOW_HOME_ICON: !1
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
S as BREADCRUMBS_DEFAULTS,
|
|
17
|
+
E as BREADCRUMBS_ICON_SIZE,
|
|
18
|
+
e as BREADCRUMBS_SIZE
|
|
19
|
+
};
|
|
@@ -1,41 +1,56 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx as e, jsxs as b } from "react/jsx-runtime";
|
|
2
|
+
import { useState as _ } from "react";
|
|
3
|
+
import { cn as m } from "../../utils/cn.js";
|
|
4
|
+
import { BREADCRUMBS_DEFAULTS as o, BREADCRUMBS_SIZE as M, BREADCRUMBS_ICON_SIZE as d } from "./Breadcrumbs.const.js";
|
|
5
|
+
const A = ({ className: t }) => /* @__PURE__ */ e("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6" }) }), R = ({ className: t }) => /* @__PURE__ */ e("svg", { className: t, fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ e("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M9 5l7 7-7 7" }) }), j = (t) => {
|
|
6
|
+
const {
|
|
7
|
+
items: n,
|
|
8
|
+
separator: p,
|
|
9
|
+
maxItems: c,
|
|
10
|
+
itemsBeforeCollapse: h = o.ITEMS_BEFORE_COLLAPSE,
|
|
11
|
+
itemsAfterCollapse: f = o.ITEMS_AFTER_COLLAPSE,
|
|
12
|
+
className: u,
|
|
13
|
+
size: l = o.SIZE,
|
|
14
|
+
showHomeIcon: x = o.SHOW_HOME_ICON,
|
|
15
|
+
testId: C,
|
|
16
|
+
id: E,
|
|
17
|
+
"aria-label": k = "Breadcrumb"
|
|
18
|
+
} = t, [S, I] = _(!1), N = () => p || /* @__PURE__ */ e(R, { className: m(d[l], "bear-text-zinc-500 bear-mx-2") }), v = (r, a, L) => {
|
|
19
|
+
const s = /* @__PURE__ */ b("span", { className: "bear-flex bear-items-center bear-gap-1", children: [
|
|
20
|
+
a === 0 && x && /* @__PURE__ */ e(A, { className: d[l] }),
|
|
17
21
|
r.icon,
|
|
18
22
|
r.label
|
|
19
23
|
] });
|
|
20
|
-
return
|
|
21
|
-
},
|
|
22
|
-
let
|
|
23
|
-
if (
|
|
24
|
-
const r =
|
|
25
|
-
|
|
24
|
+
return L ? /* @__PURE__ */ e("span", { className: "bear-text-zinc-300 bear-font-medium", "aria-current": "page", children: s }) : r.href ? /* @__PURE__ */ e("a", { href: r.href, className: "bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors", children: s }) : r.onClick ? /* @__PURE__ */ e("button", { type: "button", onClick: r.onClick, className: "bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors", children: s }) : /* @__PURE__ */ e("span", { className: "bear-text-zinc-400", children: s });
|
|
25
|
+
}, B = c && n.length > c && !S;
|
|
26
|
+
let i = n;
|
|
27
|
+
if (B) {
|
|
28
|
+
const r = n.slice(0, h), a = n.slice(-f);
|
|
29
|
+
i = [...r, "ellipsis", ...a];
|
|
26
30
|
}
|
|
27
|
-
return /* @__PURE__ */ e(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
return /* @__PURE__ */ e(
|
|
32
|
+
"nav",
|
|
33
|
+
{
|
|
34
|
+
id: E,
|
|
35
|
+
"data-testid": C,
|
|
36
|
+
className: m("bear-flex bear-items-center bear-flex-wrap", M[l], u),
|
|
37
|
+
"aria-label": k,
|
|
38
|
+
children: /* @__PURE__ */ e("ol", { className: "bear-flex bear-items-center bear-flex-wrap bear-list-none bear-p-0 bear-m-0", children: i.map((r, a) => /* @__PURE__ */ b("li", { className: "bear-flex bear-items-center", children: [
|
|
39
|
+
a > 0 && /* @__PURE__ */ e("span", { "aria-hidden": "true", children: N() }),
|
|
40
|
+
r === "ellipsis" ? /* @__PURE__ */ e(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
onClick: () => I(!0),
|
|
45
|
+
className: "bear-text-zinc-400 hover:bear-text-pink-400 bear-transition-colors bear-px-1",
|
|
46
|
+
"aria-label": "Show more breadcrumbs",
|
|
47
|
+
children: "..."
|
|
48
|
+
}
|
|
49
|
+
) : v(r, a, a === i.length - 1)
|
|
50
|
+
] }, a)) })
|
|
51
|
+
}
|
|
52
|
+
);
|
|
38
53
|
};
|
|
39
54
|
export {
|
|
40
|
-
|
|
55
|
+
j as Breadcrumbs
|
|
41
56
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
export type BreadcrumbSize = 'sm' | 'md' | 'lg';
|
|
2
3
|
export interface BreadcrumbItem {
|
|
3
4
|
label: string;
|
|
4
5
|
href?: string;
|
|
@@ -12,6 +13,12 @@ export interface BreadcrumbsProps {
|
|
|
12
13
|
itemsBeforeCollapse?: number;
|
|
13
14
|
itemsAfterCollapse?: number;
|
|
14
15
|
className?: string;
|
|
15
|
-
size?:
|
|
16
|
+
size?: BreadcrumbSize;
|
|
16
17
|
showHomeIcon?: boolean;
|
|
18
|
+
/** Unique identifier for testing */
|
|
19
|
+
testId?: string;
|
|
20
|
+
/** HTML id attribute */
|
|
21
|
+
id?: string;
|
|
22
|
+
/** Accessible label for screen readers */
|
|
23
|
+
'aria-label'?: string;
|
|
17
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),N=require("react"),i=require("../../utils/cn.cjs"),j=require("../Spinner/Spinner.cjs"),g=require("../../hooks/useBearStyles.cjs"),l=require("./Button.constants.cjs"),o=N.forwardRef((c,u)=>{const{variant:b="primary",size:n="md",loading:t=!1,fullWidth:d=!1,leftIcon:r,rightIcon:s,disabled:B,className:m,children:_,testId:f,bis:x,style:h,...p}=c,y=B||t,a=g.useBearStyles(x,h);return e.jsxs("button",{ref:u,disabled:y,style:Object.keys(a).length?a:void 0,className:i.cn("Bear-Button","bear-inline-flex bear-items-center bear-justify-center bear-font-medium bear-rounded-lg bear-transition-all bear-duration-200 bear-outline-none",l.BUTTON_SIZE[n],l.BUTTON_VARIANT[b],d&&"bear-w-full",t&&"bear-cursor-wait",m),"data-testid":f,...p,children:[t&&e.jsx(j.Spinner,{size:n==="xs"?"xs":"sm",className:"Bear-Button__spinner bear-absolute"}),e.jsxs("span",{className:i.cn("Bear-Button__content bear-inline-flex bear-items-center bear-gap-inherit",t&&"bear-invisible"),children:[r&&e.jsx("span",{className:"Bear-Button__icon Bear-Button__icon--left bear-inline-flex bear-shrink-0",children:r}),e.jsx("span",{className:"Bear-Button__text",children:_}),s&&e.jsx("span",{className:"Bear-Button__icon Bear-Button__icon--right bear-inline-flex bear-shrink-0",children:s})]})]})});o.displayName="Button";exports.Button=o;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { EmberSize, EmberVariant } from '../../types';
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
2
|
+
export declare const BUTTON_SIZE: Record<EmberSize, string>;
|
|
3
|
+
export declare const BUTTON_VARIANT: Record<EmberVariant, string>;
|