@forgedevstack/bear 1.1.4 → 1.1.8
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/README.md +19 -0
- package/dist/components/Anchor/Anchor.cjs +1 -1
- package/dist/components/Anchor/Anchor.js +37 -45
- package/dist/components/Anchor/Anchor.utils.cjs +1 -0
- package/dist/components/Anchor/Anchor.utils.d.ts +2 -0
- package/dist/components/Anchor/Anchor.utils.js +12 -0
- package/dist/components/Autocomplete/Autocomplete.cjs +1 -1
- package/dist/components/Autocomplete/Autocomplete.js +60 -67
- package/dist/components/Autocomplete/Autocomplete.utils.cjs +1 -0
- package/dist/components/Autocomplete/Autocomplete.utils.d.ts +2 -0
- package/dist/components/Autocomplete/Autocomplete.utils.js +12 -0
- package/dist/components/BackTop/BackTop.cjs +1 -1
- package/dist/components/BackTop/BackTop.js +10 -11
- package/dist/components/Button/Button.cjs +1 -1
- package/dist/components/Button/Button.constants.cjs +2 -2
- package/dist/components/Button/Button.constants.d.ts +1 -0
- package/dist/components/Button/Button.constants.js +12 -5
- package/dist/components/Button/Button.d.ts +0 -27
- package/dist/components/Button/Button.js +93 -105
- package/dist/components/Button/Button.types.d.ts +1 -0
- package/dist/components/Button/Button.utils.cjs +1 -0
- package/dist/components/Button/Button.utils.d.ts +2 -0
- package/dist/components/Button/Button.utils.js +5 -0
- package/dist/components/Button/useSpotlight.cjs +1 -0
- package/dist/components/Button/useSpotlight.d.ts +21 -0
- package/dist/components/Button/useSpotlight.js +28 -0
- package/dist/components/Chart/Chart.cjs +1 -1
- package/dist/components/Chart/Chart.const.cjs +1 -0
- package/dist/components/Chart/Chart.const.js +21 -0
- package/dist/components/Chart/Chart.js +55 -71
- package/dist/components/Chart/Chart.utils.cjs +1 -0
- package/dist/components/Chart/Chart.utils.js +5 -0
- package/dist/components/Confetti/Confetti.cjs +1 -1
- package/dist/components/Confetti/Confetti.js +37 -34
- package/dist/components/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/ContextMenu/ContextMenu.js +31 -30
- package/dist/components/ContextMenu/ContextMenu.utils.cjs +1 -0
- package/dist/components/ContextMenu/ContextMenu.utils.d.ts +5 -0
- package/dist/components/ContextMenu/ContextMenu.utils.js +4 -0
- package/dist/components/CountdownTimer/CountdownTimer.cjs +1 -1
- package/dist/components/CountdownTimer/CountdownTimer.js +62 -71
- package/dist/components/CountdownTimer/CountdownTimer.utils.cjs +1 -0
- package/dist/components/CountdownTimer/CountdownTimer.utils.d.ts +3 -0
- package/dist/components/CountdownTimer/CountdownTimer.utils.js +16 -0
- package/dist/components/Dock/Dock.cjs +1 -1
- package/dist/components/Dock/Dock.js +38 -43
- package/dist/components/Dock/Dock.utils.cjs +1 -0
- package/dist/components/Dock/Dock.utils.d.ts +1 -0
- package/dist/components/Dock/Dock.utils.js +10 -0
- package/dist/components/Dropdown/Dropdown.cjs +1 -1
- package/dist/components/Dropdown/Dropdown.js +59 -60
- package/dist/components/FileTree/FileTree.cjs +1 -1
- package/dist/components/FileTree/FileTree.js +20 -32
- package/dist/components/FileTree/FileTree.utils.cjs +1 -0
- package/dist/components/FileTree/FileTree.utils.d.ts +4 -0
- package/dist/components/FileTree/FileTree.utils.js +15 -0
- package/dist/components/GradientText/GradientText.cjs +1 -1
- package/dist/components/GradientText/GradientText.js +27 -29
- package/dist/components/Icon/icons/bear.cjs +1 -0
- package/dist/components/Icon/icons/bear.d.ts +12 -0
- package/dist/components/Icon/icons/bear.js +47 -0
- package/dist/components/Icon/index.cjs +1 -1
- package/dist/components/Icon/index.d.ts +18 -0
- package/dist/components/Icon/index.js +17 -15
- package/dist/components/InfiniteScroll/InfiniteScroll.cjs +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.const.cjs +1 -1
- package/dist/components/InfiniteScroll/InfiniteScroll.const.js +6 -7
- package/dist/components/InfiniteScroll/InfiniteScroll.js +41 -41
- package/dist/components/MentionsInput/MentionsInput.cjs +1 -1
- package/dist/components/MentionsInput/MentionsInput.js +64 -68
- package/dist/components/MentionsInput/MentionsInput.utils.cjs +1 -0
- package/dist/components/MentionsInput/MentionsInput.utils.d.ts +2 -0
- package/dist/components/MentionsInput/MentionsInput.utils.js +9 -0
- package/dist/components/PageNav/PageNav.cjs +1 -0
- package/dist/components/PageNav/PageNav.const.cjs +1 -0
- package/dist/components/PageNav/PageNav.const.d.ts +22 -0
- package/dist/components/PageNav/PageNav.const.js +42 -0
- package/dist/components/PageNav/PageNav.d.ts +3 -0
- package/dist/components/PageNav/PageNav.js +81 -0
- package/dist/components/PageNav/PageNav.types.d.ts +17 -0
- package/dist/components/PageNav/index.d.ts +2 -0
- package/dist/components/Progress/Progress.cjs +1 -1
- package/dist/components/Progress/Progress.js +6 -6
- package/dist/components/PropsPlayground/PropsPlayground.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.d.ts +11 -0
- package/dist/components/PropsPlayground/PropsPlayground.const.js +23 -0
- package/dist/components/PropsPlayground/PropsPlayground.d.ts +3 -0
- package/dist/components/PropsPlayground/PropsPlayground.js +221 -0
- package/dist/components/PropsPlayground/PropsPlayground.types.d.ts +29 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.cjs +1 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.d.ts +2 -0
- package/dist/components/PropsPlayground/PropsPlayground.utils.js +9 -0
- package/dist/components/PropsPlayground/index.d.ts +2 -0
- package/dist/components/Select/Select.cjs +1 -1
- package/dist/components/Select/Select.js +28 -30
- package/dist/components/SignPad/SignPad.cjs +1 -1
- package/dist/components/SignPad/SignPad.js +24 -24
- package/dist/components/Skeleton/Skeleton.cjs +1 -1
- package/dist/components/Skeleton/Skeleton.js +89 -94
- package/dist/components/Skeleton/Skeleton.utils.cjs +1 -0
- package/dist/components/Skeleton/Skeleton.utils.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.utils.js +10 -0
- package/dist/components/SliderRange/SliderRange.cjs +1 -1
- package/dist/components/SliderRange/SliderRange.js +61 -63
- package/dist/components/SliderRange/SliderRange.utils.cjs +1 -0
- package/dist/components/SliderRange/SliderRange.utils.d.ts +1 -0
- package/dist/components/SliderRange/SliderRange.utils.js +7 -0
- package/dist/components/Spotlight/Spotlight.cjs +1 -1
- package/dist/components/Spotlight/Spotlight.js +62 -73
- package/dist/components/Spotlight/Spotlight.utils.cjs +1 -0
- package/dist/components/Spotlight/Spotlight.utils.d.ts +3 -0
- package/dist/components/Spotlight/Spotlight.utils.js +18 -0
- package/dist/components/Tabs/Tabs.cjs +1 -1
- package/dist/components/Tabs/Tabs.js +39 -38
- package/dist/components/Tabs/Tabs.types.d.ts +3 -1
- package/dist/components/Toast/Toast.cjs +1 -1
- package/dist/components/Toast/Toast.js +18 -17
- package/dist/components/Toast/Toast.utils.cjs +1 -0
- package/dist/components/Toast/Toast.utils.d.ts +1 -0
- package/dist/components/Toast/Toast.utils.js +4 -0
- package/dist/components/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/Tooltip/Tooltip.js +10 -11
- package/dist/components/Tour/Tour.cjs +1 -1
- package/dist/components/Tour/Tour.js +1 -2
- package/dist/components/VirtualList/VirtualList.cjs +1 -1
- package/dist/components/VirtualList/VirtualList.js +38 -43
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +66 -62
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +60 -58
- package/dist/hooks/useResizeObserver/index.d.ts +2 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.cjs +1 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.d.ts +3 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.js +20 -0
- package/dist/hooks/useResizeObserver/useResizeObserver.types.d.ts +8 -0
- package/dist/icons.cjs +1 -0
- package/dist/icons.d.ts +2 -0
- package/dist/icons.js +6 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +175 -169
- package/dist/styles/_base.css +7 -3
- package/dist/styles.css +1 -1
- package/package.json +6 -1
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as S, useRef as y, useCallback as
|
|
3
|
-
import { cn as
|
|
4
|
-
|
|
1
|
+
import { jsxs as D, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useState as S, useRef as y, useCallback as i, useEffect as C, isValidElement as q, cloneElement as G } from "react";
|
|
3
|
+
import { cn as m } from "../../utils/cn.js";
|
|
4
|
+
import { useClickOutside as H } from "../../hooks/useClickOutside.js";
|
|
5
|
+
import "../../context/BearProvider.js";
|
|
6
|
+
import "../../hooks/useBearComponent/useBearComponent.js";
|
|
7
|
+
const J = {
|
|
5
8
|
xs: "bear-text-xs bear-py-1 bear-px-2",
|
|
6
9
|
sm: "bear-text-sm bear-py-1.5 bear-px-3",
|
|
7
10
|
md: "bear-text-sm bear-py-2 bear-px-3",
|
|
8
11
|
lg: "bear-text-base bear-py-2.5 bear-px-4",
|
|
9
12
|
xl: "bear-text-lg bear-py-3 bear-px-5"
|
|
10
|
-
},
|
|
13
|
+
}, Q = {
|
|
11
14
|
"bottom-start": "bear-top-full bear-left-0 bear-mt-1",
|
|
12
15
|
"bottom-end": "bear-top-full bear-right-0 bear-mt-1",
|
|
13
16
|
bottom: "bear-top-full bear-left-1/2 -bear-translate-x-1/2 bear-mt-1",
|
|
@@ -16,72 +19,68 @@ const G = {
|
|
|
16
19
|
top: "bear-bottom-full bear-left-1/2 -bear-translate-x-1/2 bear-mb-1",
|
|
17
20
|
left: "bear-right-full bear-top-0 bear-mr-1",
|
|
18
21
|
right: "bear-left-full bear-top-0 bear-ml-1"
|
|
19
|
-
},
|
|
22
|
+
}, te = ({
|
|
20
23
|
trigger: p,
|
|
21
24
|
items: c,
|
|
22
|
-
open:
|
|
25
|
+
open: h,
|
|
23
26
|
defaultOpen: A = !1,
|
|
24
|
-
placement:
|
|
25
|
-
offset:
|
|
27
|
+
placement: L = "bottom-start",
|
|
28
|
+
offset: X = 4,
|
|
26
29
|
matchWidth: R = !1,
|
|
27
30
|
minWidth: j = 150,
|
|
28
31
|
maxHeight: W = 300,
|
|
29
32
|
size: z = "md",
|
|
30
|
-
closeOnSelect:
|
|
31
|
-
closeOnClickOutside:
|
|
32
|
-
disabled:
|
|
33
|
-
onOpenChange:
|
|
33
|
+
closeOnSelect: k = !0,
|
|
34
|
+
closeOnClickOutside: v = !0,
|
|
35
|
+
disabled: w = !1,
|
|
36
|
+
onOpenChange: f,
|
|
34
37
|
className: F,
|
|
35
38
|
testId: M,
|
|
36
39
|
..._
|
|
37
40
|
}) => {
|
|
38
|
-
var
|
|
39
|
-
const [B, K] = S(A), [
|
|
40
|
-
|
|
41
|
-
}, [
|
|
42
|
-
|
|
43
|
-
}, [
|
|
44
|
-
|
|
45
|
-
}, [
|
|
46
|
-
var
|
|
47
|
-
e.disabled || e.divider || e.header || ((
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
55
|
-
}, [t, E, o]), h(() => {
|
|
56
|
-
if (!t) return;
|
|
57
|
-
const e = c.filter((r) => !r.disabled && !r.divider && !r.header), a = (r) => {
|
|
41
|
+
var I;
|
|
42
|
+
const [B, K] = S(A), [l, s] = S(-1), E = y(null), P = y(null), N = y(null), x = h !== void 0, a = x ? h : B, u = i((e) => {
|
|
43
|
+
x || K(e), f == null || f(e);
|
|
44
|
+
}, [x, f]), T = i(() => {
|
|
45
|
+
w || u(!a);
|
|
46
|
+
}, [w, a, u]), o = i(() => {
|
|
47
|
+
u(!1), s(-1);
|
|
48
|
+
}, [u]), g = i((e) => {
|
|
49
|
+
var t;
|
|
50
|
+
e.disabled || e.divider || e.header || ((t = e.onClick) == null || t.call(e), k && !e.items && o());
|
|
51
|
+
}, [k, o]), U = i(() => {
|
|
52
|
+
a && v && o();
|
|
53
|
+
}, [a, v, o]);
|
|
54
|
+
H(E, U), C(() => {
|
|
55
|
+
if (!a) return;
|
|
56
|
+
const e = c.filter((r) => !r.disabled && !r.divider && !r.header), t = (r) => {
|
|
58
57
|
switch (r.key) {
|
|
59
58
|
case "Escape":
|
|
60
59
|
r.preventDefault(), o();
|
|
61
60
|
break;
|
|
62
61
|
case "ArrowDown":
|
|
63
|
-
r.preventDefault(),
|
|
62
|
+
r.preventDefault(), s((d) => {
|
|
64
63
|
const b = d + 1;
|
|
65
64
|
return b >= e.length ? 0 : b;
|
|
66
65
|
});
|
|
67
66
|
break;
|
|
68
67
|
case "ArrowUp":
|
|
69
|
-
r.preventDefault(),
|
|
68
|
+
r.preventDefault(), s((d) => {
|
|
70
69
|
const b = d - 1;
|
|
71
70
|
return b < 0 ? e.length - 1 : b;
|
|
72
71
|
});
|
|
73
72
|
break;
|
|
74
73
|
case "Enter":
|
|
75
74
|
case " ":
|
|
76
|
-
r.preventDefault(),
|
|
75
|
+
r.preventDefault(), l >= 0 && l < e.length && g(e[l]);
|
|
77
76
|
break;
|
|
78
77
|
}
|
|
79
78
|
};
|
|
80
|
-
return document.addEventListener("keydown",
|
|
81
|
-
}, [
|
|
82
|
-
|
|
83
|
-
}, [
|
|
84
|
-
const
|
|
79
|
+
return document.addEventListener("keydown", t), () => document.removeEventListener("keydown", t);
|
|
80
|
+
}, [a, c, l, o, g]), C(() => {
|
|
81
|
+
a || s(-1);
|
|
82
|
+
}, [a]);
|
|
83
|
+
const V = (e, t) => {
|
|
85
84
|
if (e.divider)
|
|
86
85
|
return /* @__PURE__ */ n(
|
|
87
86
|
"div",
|
|
@@ -100,18 +99,18 @@ const G = {
|
|
|
100
99
|
},
|
|
101
100
|
e.key
|
|
102
101
|
);
|
|
103
|
-
const r = c.slice(0,
|
|
104
|
-
return /* @__PURE__ */
|
|
102
|
+
const r = c.slice(0, t).filter((b) => !b.disabled && !b.divider && !b.header).length, d = l === r;
|
|
103
|
+
return /* @__PURE__ */ D(
|
|
105
104
|
"button",
|
|
106
105
|
{
|
|
107
106
|
type: "button",
|
|
108
107
|
role: "menuitem",
|
|
109
108
|
disabled: e.disabled,
|
|
110
|
-
onClick: () =>
|
|
111
|
-
onMouseEnter: () =>
|
|
112
|
-
className:
|
|
109
|
+
onClick: () => g(e),
|
|
110
|
+
onMouseEnter: () => s(r),
|
|
111
|
+
className: m(
|
|
113
112
|
"bear-w-full bear-flex bear-items-center bear-gap-2 bear-text-left bear-border-none bear-bg-transparent",
|
|
114
|
-
|
|
113
|
+
J[z],
|
|
115
114
|
"bear-transition-colors bear-cursor-pointer",
|
|
116
115
|
d && "bear-bg-gray-100 dark:bear-bg-gray-800",
|
|
117
116
|
e.danger ? "bear-text-red-600 dark:bear-text-red-400 hover:bear-bg-red-50 dark:hover:bear-bg-red-900/20" : "bear-text-gray-700 dark:bear-text-gray-200 hover:bear-bg-gray-100 dark:hover:bear-bg-gray-800",
|
|
@@ -126,40 +125,40 @@ const G = {
|
|
|
126
125
|
},
|
|
127
126
|
e.key
|
|
128
127
|
);
|
|
129
|
-
},
|
|
128
|
+
}, Z = q(p) ? G(p, {
|
|
130
129
|
onClick: T,
|
|
131
|
-
ref:
|
|
132
|
-
"aria-expanded":
|
|
130
|
+
ref: N,
|
|
131
|
+
"aria-expanded": a,
|
|
133
132
|
"aria-haspopup": !0
|
|
134
133
|
}) : p;
|
|
135
|
-
return /* @__PURE__ */
|
|
134
|
+
return /* @__PURE__ */ D(
|
|
136
135
|
"div",
|
|
137
136
|
{
|
|
138
|
-
ref:
|
|
139
|
-
className:
|
|
137
|
+
ref: E,
|
|
138
|
+
className: m("bear-relative bear-inline-block", F),
|
|
140
139
|
"data-testid": M,
|
|
141
140
|
..._,
|
|
142
141
|
children: [
|
|
143
|
-
|
|
144
|
-
|
|
142
|
+
Z,
|
|
143
|
+
a && /* @__PURE__ */ n(
|
|
145
144
|
"div",
|
|
146
145
|
{
|
|
147
146
|
ref: P,
|
|
148
147
|
role: "menu",
|
|
149
|
-
className:
|
|
148
|
+
className: m(
|
|
150
149
|
"bear-absolute bear-z-50",
|
|
151
150
|
"bear-bg-white dark:bear-bg-gray-900",
|
|
152
151
|
"bear-border bear-border-gray-200 dark:bear-border-gray-700",
|
|
153
152
|
"bear-rounded-lg bear-shadow-lg",
|
|
154
153
|
"bear-py-1 bear-overflow-y-auto",
|
|
155
154
|
"bear-animate-in bear-fade-in-0 bear-zoom-in-95 bear-duration-100",
|
|
156
|
-
|
|
155
|
+
Q[L]
|
|
157
156
|
),
|
|
158
157
|
style: {
|
|
159
|
-
minWidth: R ? (
|
|
158
|
+
minWidth: R ? (I = N.current) == null ? void 0 : I.offsetWidth : j,
|
|
160
159
|
maxHeight: W
|
|
161
160
|
},
|
|
162
|
-
children: c.map((e,
|
|
161
|
+
children: c.map((e, t) => V(e, t))
|
|
163
162
|
}
|
|
164
163
|
)
|
|
165
164
|
]
|
|
@@ -167,5 +166,5 @@ const G = {
|
|
|
167
166
|
);
|
|
168
167
|
};
|
|
169
168
|
export {
|
|
170
|
-
|
|
169
|
+
te as Dropdown
|
|
171
170
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),T=require("react"),x=require("../TreeView/TreeView.cjs"),j=require("../Icon/index.cjs"),m=require("./FileTree.utils.cjs"),q=r.jsx(j.BearIcons.ArticleIcon,{size:"xs",className:"bear-text-gray-400"}),F=({items:t,selectedId:s,defaultExpandedIds:o=[],onSelect:i,onExpand:a,size:c="md",showLines:n=!1,className:d,testId:l})=>{const u=T.useMemo(()=>t.map(e=>m.fileNodeToTreeNode(e,0,q)),[t]);return r.jsx("div",{"data-testid":l,children:r.jsx(x.TreeView,{data:u,selectedId:s,defaultExpandedIds:o,onSelect:i?e=>i(e.data):void 0,onExpand:a,size:c,showLines:n,className:d})})};exports.FileTree=F;
|
|
@@ -1,46 +1,34 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useMemo as
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as l } from "react";
|
|
3
3
|
import { TreeView as p } from "../TreeView/TreeView.js";
|
|
4
|
-
import { BearIcons as
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const l = e.children && e.children.length > 0, r = e.type === "folder" || l;
|
|
9
|
-
return {
|
|
10
|
-
id: e.id,
|
|
11
|
-
label: e.label,
|
|
12
|
-
disabled: e.disabled,
|
|
13
|
-
data: e.data,
|
|
14
|
-
icon: e.icon ?? (r ? void 0 : /* @__PURE__ */ t(u, {})),
|
|
15
|
-
children: (i = e.children) == null ? void 0 : i.map((o) => c(o, a + 1))
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
const I = ({
|
|
19
|
-
items: e,
|
|
4
|
+
import { BearIcons as x } from "../Icon/index.js";
|
|
5
|
+
import { fileNodeToTreeNode as T } from "./FileTree.utils.js";
|
|
6
|
+
const I = /* @__PURE__ */ o(x.ArticleIcon, { size: "xs", className: "bear-text-gray-400" }), g = ({
|
|
7
|
+
items: r,
|
|
20
8
|
selectedId: a,
|
|
21
|
-
defaultExpandedIds:
|
|
22
|
-
onSelect:
|
|
23
|
-
onExpand:
|
|
24
|
-
size:
|
|
9
|
+
defaultExpandedIds: i = [],
|
|
10
|
+
onSelect: t,
|
|
11
|
+
onExpand: m,
|
|
12
|
+
size: s = "md",
|
|
25
13
|
showLines: d = !1,
|
|
26
|
-
className:
|
|
14
|
+
className: c,
|
|
27
15
|
testId: n
|
|
28
16
|
}) => {
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
17
|
+
const f = l(() => r.map((e) => T(e, 0, I)), [r]);
|
|
18
|
+
return /* @__PURE__ */ o("div", { "data-testid": n, children: /* @__PURE__ */ o(
|
|
31
19
|
p,
|
|
32
20
|
{
|
|
33
|
-
data:
|
|
21
|
+
data: f,
|
|
34
22
|
selectedId: a,
|
|
35
|
-
defaultExpandedIds:
|
|
36
|
-
onSelect:
|
|
37
|
-
onExpand:
|
|
38
|
-
size:
|
|
23
|
+
defaultExpandedIds: i,
|
|
24
|
+
onSelect: t ? (e) => t(e.data) : void 0,
|
|
25
|
+
onExpand: m,
|
|
26
|
+
size: s,
|
|
39
27
|
showLines: d,
|
|
40
|
-
className:
|
|
28
|
+
className: c
|
|
41
29
|
}
|
|
42
30
|
) });
|
|
43
31
|
};
|
|
44
32
|
export {
|
|
45
|
-
|
|
33
|
+
g as FileTree
|
|
46
34
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function r(e,d=0,i){var l;const t=e.children&&e.children.length>0,a=e.type==="folder"||t;return{id:e.id,label:e.label,disabled:e.disabled,data:e.data,icon:e.icon??(a?void 0:i),children:(l=e.children)==null?void 0:l.map(c=>r(c,d+1,i))}}exports.fileNodeToTreeNode=r;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function c(i, r = 0, l) {
|
|
2
|
+
var e;
|
|
3
|
+
const a = i.children && i.children.length > 0, d = i.type === "folder" || a;
|
|
4
|
+
return {
|
|
5
|
+
id: i.id,
|
|
6
|
+
label: i.label,
|
|
7
|
+
disabled: i.disabled,
|
|
8
|
+
data: i.data,
|
|
9
|
+
icon: i.icon ?? (d ? void 0 : l),
|
|
10
|
+
children: (e = i.children) == null ? void 0 : e.map((t) => c(t, r + 1, l))
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
c as fileNodeToTreeNode
|
|
15
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),e=require("./GradientText.const.cjs"),I=c=>{const{children:d,preset:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),s=require("react"),b=require("../../utils/cn.cjs"),e=require("./GradientText.const.cjs"),I=c=>{const{children:d,preset:a="primary",colors:t,direction:i="to-r",animate:r=!1,animationSpeed:l=e.DEFAULT_ANIMATION_SPEED,as:T="span",weight:u="bold",className:E,style:g,testId:m}=c,n=s.useMemo(()=>t&&t.length>0?t:e.GRADIENT_PRESETS[a]??e.GRADIENT_PRESETS.primary,[t,a]),A=s.useMemo(()=>{const o=e.DIRECTION_MAP[i]??"to right";if(!r)return`linear-gradient(${o}, ${n.join(", ")})`;const S=Array.from({length:e.COLOR_REPEAT_COUNT},()=>n).flat();return`linear-gradient(${o}, ${S.join(", ")})`},[n,i,r]);return _.jsx(T,{className:b.cn("Bear-GradientText","bear-inline-block","bear-bg-clip-text bear-text-transparent",r&&"Bear-GradientText--animated",E),style:{background:A,fontWeight:e.WEIGHT_MAP[u]??e.DEFAULT_WEIGHT,...r&&{backgroundSize:e.ANIMATED_BG_SIZE,animation:`bear-gradient-shift ${l}s ease infinite`},...g},"data-testid":m,children:d})};exports.GradientText=I;
|
|
@@ -1,52 +1,50 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as I } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as o } from "react";
|
|
3
|
-
import { cn as
|
|
4
|
-
import { DEFAULT_ANIMATION_SPEED as
|
|
5
|
-
const
|
|
3
|
+
import { cn as _ } from "../../utils/cn.js";
|
|
4
|
+
import { DEFAULT_ANIMATION_SPEED as b, GRADIENT_PRESETS as s, DIRECTION_MAP as u, COLOR_REPEAT_COUNT as N, ANIMATED_BG_SIZE as S, WEIGHT_MAP as h, DEFAULT_WEIGHT as x } from "./GradientText.const.js";
|
|
5
|
+
const M = (d) => {
|
|
6
6
|
const {
|
|
7
|
-
children:
|
|
8
|
-
preset:
|
|
7
|
+
children: m,
|
|
8
|
+
preset: a = "primary",
|
|
9
9
|
colors: t,
|
|
10
10
|
direction: n = "to-r",
|
|
11
11
|
animate: e = !1,
|
|
12
|
-
animationSpeed: c =
|
|
13
|
-
as:
|
|
12
|
+
animationSpeed: c = b,
|
|
13
|
+
as: l = "span",
|
|
14
14
|
weight: T = "bold",
|
|
15
|
-
className:
|
|
16
|
-
style:
|
|
17
|
-
testId:
|
|
18
|
-
} =
|
|
19
|
-
const
|
|
20
|
-
if (!e) return `linear-gradient(${
|
|
21
|
-
const
|
|
22
|
-
return `linear-gradient(${
|
|
15
|
+
className: E,
|
|
16
|
+
style: g,
|
|
17
|
+
testId: p
|
|
18
|
+
} = d, r = o(() => t && t.length > 0 ? t : s[a] ?? s.primary, [t, a]), f = o(() => {
|
|
19
|
+
const i = u[n] ?? "to right";
|
|
20
|
+
if (!e) return `linear-gradient(${i}, ${r.join(", ")})`;
|
|
21
|
+
const A = Array.from({ length: N }, () => r).flat();
|
|
22
|
+
return `linear-gradient(${i}, ${A.join(", ")})`;
|
|
23
23
|
}, [r, n, e]);
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
|
|
24
|
+
return /* @__PURE__ */ I(
|
|
25
|
+
l,
|
|
26
26
|
{
|
|
27
|
-
className:
|
|
27
|
+
className: _(
|
|
28
28
|
"Bear-GradientText",
|
|
29
29
|
"bear-inline-block",
|
|
30
|
+
"bear-bg-clip-text bear-text-transparent",
|
|
30
31
|
e && "Bear-GradientText--animated",
|
|
31
|
-
|
|
32
|
+
E
|
|
32
33
|
),
|
|
33
34
|
style: {
|
|
34
35
|
background: f,
|
|
35
|
-
|
|
36
|
-
WebkitBackgroundClip: "text",
|
|
37
|
-
WebkitTextFillColor: "transparent",
|
|
38
|
-
fontWeight: N[T] ?? S,
|
|
36
|
+
fontWeight: h[T] ?? x,
|
|
39
37
|
...e && {
|
|
40
|
-
backgroundSize:
|
|
38
|
+
backgroundSize: S,
|
|
41
39
|
animation: `bear-gradient-shift ${c}s ease infinite`
|
|
42
40
|
},
|
|
43
|
-
...
|
|
41
|
+
...g
|
|
44
42
|
},
|
|
45
|
-
"data-testid":
|
|
46
|
-
children:
|
|
43
|
+
"data-testid": p,
|
|
44
|
+
children: m
|
|
47
45
|
}
|
|
48
46
|
);
|
|
49
47
|
};
|
|
50
48
|
export {
|
|
51
|
-
|
|
49
|
+
M as GradientText
|
|
52
50
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),c=require("../Icon.cjs"),h=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M12 2l2.5 4.3v4.3l2.5 1.5 2.5-1.5V6.3L20 2h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5V6.3L6.5 2H4l2.5 4.3v4.3l2.5 1.5 2.5-1.5V6.3L12 2z"}),s.jsx("path",{d:"M4 11l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L14 11h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L4 11z"}),s.jsx("path",{d:"M20 11l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L10 11h2.5l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L20 11z"}),s.jsx("path",{d:"M12 18l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L20 18h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L12 18z"})]}),o=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M12 5c-1.2 0-2 1.2-2 2.5s.8 2.5 2 2.5 2-1.2 2-2.5S13.2 5 12 5z"}),s.jsx("path",{d:"M6.5 8.5c-.8 0-1.5 1-1.5 2s.7 2 1.5 2 1.5-1 1.5-2-.7-2-1.5-2z"}),s.jsx("path",{d:"M17.5 8.5c.8 0 1.5 1 1.5 2s-.7 2-1.5 2-1.5-1-1.5-2 .7-2 1.5-2z"}),s.jsx("path",{d:"M4 14c-.6 0-1.2.8-1.2 1.6s.6 1.6 1.2 1.6 1.2-.8 1.2-1.6S4.6 14 4 14z"}),s.jsx("path",{d:"M20 14c.6 0 1.2.8 1.2 1.6s-.6 1.6-1.2 1.6-1.2-.8-1.2-1.6.6-1.6 1.2-1.6z"}),s.jsx("path",{d:"M12 14v5M8 12v3M16 12v3M5 17v1.5M19 17v1.5"})]}),l=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M12 3L8 9h2v4H6l4 6 4-6h-4V9h2L12 3z"}),s.jsx("path",{d:"M4 21h16M7 21v-5l2.5 3 2.5-3v5M14.5 21v-3l1.5 2 1.5-2v3"}),s.jsx("path",{d:"M2 21h3l1.5-2 1.5 2h3"})]}),t=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M4 20V10l8-6 8 6v10"}),s.jsx("path",{d:"M4 10h16M9 20V14h6v6"}),s.jsx("path",{d:"M12 10v4"})]}),M=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M4 12c0-3 2-6 6-6s6 3 6 6-2 6-6 6-6-3-6-6z"}),s.jsx("path",{d:"M10 6v12M7 9l2 2.5-2 2.5M17 9l-2 2.5 2 2.5"}),s.jsx("path",{d:"M6 11c1 .5 2 .5 3 0M6 13c1 .5 2 .5 3 0"})]}),a=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M12 3c1.5 1.5 3 4 3 6.5a3 3 0 0 1-6 0C9 7 10.5 4.5 12 3z"}),s.jsx("path",{d:"M12 21c-2.5-1.5-5-4-5-7.5 0-1.5.8-3 2-4 1.2 1 2 2.5 2 4 0 3.5-2.5 6-5 7.5z"}),s.jsx("path",{d:"M12 12v2"})]}),d=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M12 2l1.5 5h-3l1.5 5h-3l1.5 5h-3l1.5-5H8l1.5-5h3L12 2z"}),s.jsx("path",{d:"M12 22v-1.5"})]}),j=n=>s.jsxs(c.Icon,{...n,children:[s.jsx("path",{d:"M4 20L12 4l8 16H4z"}),s.jsx("path",{d:"M8 20l4-8 4 8"})]});exports.CampfireIcon=a;exports.ClawIcon=o;exports.DenIcon=t;exports.ForestIcon=l;exports.HoneycombIcon=h;exports.MountainIcon=j;exports.PineTreeIcon=d;exports.SalmonIcon=M;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconProps } from '../Icon.types';
|
|
3
|
+
type IconComponent = FC<Omit<IconProps, 'children'>>;
|
|
4
|
+
export declare const HoneycombIcon: IconComponent;
|
|
5
|
+
export declare const ClawIcon: IconComponent;
|
|
6
|
+
export declare const ForestIcon: IconComponent;
|
|
7
|
+
export declare const DenIcon: IconComponent;
|
|
8
|
+
export declare const SalmonIcon: IconComponent;
|
|
9
|
+
export declare const CampfireIcon: IconComponent;
|
|
10
|
+
export declare const PineTreeIcon: IconComponent;
|
|
11
|
+
export declare const MountainIcon: IconComponent;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as t, jsx as h } from "react/jsx-runtime";
|
|
2
|
+
import { Icon as M } from "../Icon.js";
|
|
3
|
+
const a = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
4
|
+
/* @__PURE__ */ h("path", { d: "M12 2l2.5 4.3v4.3l2.5 1.5 2.5-1.5V6.3L20 2h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5V6.3L6.5 2H4l2.5 4.3v4.3l2.5 1.5 2.5-1.5V6.3L12 2z" }),
|
|
5
|
+
/* @__PURE__ */ h("path", { d: "M4 11l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L14 11h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L4 11z" }),
|
|
6
|
+
/* @__PURE__ */ h("path", { d: "M20 11l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L10 11h2.5l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L20 11z" }),
|
|
7
|
+
/* @__PURE__ */ h("path", { d: "M12 18l2.5 4.3v4.3l2.5 1.5 2.5-1.5v-4.3L20 18h-2.5l-2.5 4.3v4.3l-2.5 1.5-2.5-1.5v-4.3L12 18z" })
|
|
8
|
+
] }), n = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
9
|
+
/* @__PURE__ */ h("path", { d: "M12 5c-1.2 0-2 1.2-2 2.5s.8 2.5 2 2.5 2-1.2 2-2.5S13.2 5 12 5z" }),
|
|
10
|
+
/* @__PURE__ */ h("path", { d: "M6.5 8.5c-.8 0-1.5 1-1.5 2s.7 2 1.5 2 1.5-1 1.5-2-.7-2-1.5-2z" }),
|
|
11
|
+
/* @__PURE__ */ h("path", { d: "M17.5 8.5c.8 0 1.5 1 1.5 2s-.7 2-1.5 2-1.5-1-1.5-2 .7-2 1.5-2z" }),
|
|
12
|
+
/* @__PURE__ */ h("path", { d: "M4 14c-.6 0-1.2.8-1.2 1.6s.6 1.6 1.2 1.6 1.2-.8 1.2-1.6S4.6 14 4 14z" }),
|
|
13
|
+
/* @__PURE__ */ h("path", { d: "M20 14c.6 0 1.2.8 1.2 1.6s-.6 1.6-1.2 1.6-1.2-.8-1.2-1.6.6-1.6 1.2-1.6z" }),
|
|
14
|
+
/* @__PURE__ */ h("path", { d: "M12 14v5M8 12v3M16 12v3M5 17v1.5M19 17v1.5" })
|
|
15
|
+
] }), v = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
16
|
+
/* @__PURE__ */ h("path", { d: "M12 3L8 9h2v4H6l4 6 4-6h-4V9h2L12 3z" }),
|
|
17
|
+
/* @__PURE__ */ h("path", { d: "M4 21h16M7 21v-5l2.5 3 2.5-3v5M14.5 21v-3l1.5 2 1.5-2v3" }),
|
|
18
|
+
/* @__PURE__ */ h("path", { d: "M2 21h3l1.5-2 1.5 2h3" })
|
|
19
|
+
] }), p = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
20
|
+
/* @__PURE__ */ h("path", { d: "M4 20V10l8-6 8 6v10" }),
|
|
21
|
+
/* @__PURE__ */ h("path", { d: "M4 10h16M9 20V14h6v6" }),
|
|
22
|
+
/* @__PURE__ */ h("path", { d: "M12 10v4" })
|
|
23
|
+
] }), o = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
24
|
+
/* @__PURE__ */ h("path", { d: "M4 12c0-3 2-6 6-6s6 3 6 6-2 6-6 6-6-3-6-6z" }),
|
|
25
|
+
/* @__PURE__ */ h("path", { d: "M10 6v12M7 9l2 2.5-2 2.5M17 9l-2 2.5 2 2.5" }),
|
|
26
|
+
/* @__PURE__ */ h("path", { d: "M6 11c1 .5 2 .5 3 0M6 13c1 .5 2 .5 3 0" })
|
|
27
|
+
] }), s = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
28
|
+
/* @__PURE__ */ h("path", { d: "M12 3c1.5 1.5 3 4 3 6.5a3 3 0 0 1-6 0C9 7 10.5 4.5 12 3z" }),
|
|
29
|
+
/* @__PURE__ */ h("path", { d: "M12 21c-2.5-1.5-5-4-5-7.5 0-1.5.8-3 2-4 1.2 1 2 2.5 2 4 0 3.5-2.5 6-5 7.5z" }),
|
|
30
|
+
/* @__PURE__ */ h("path", { d: "M12 12v2" })
|
|
31
|
+
] }), e = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
32
|
+
/* @__PURE__ */ h("path", { d: "M12 2l1.5 5h-3l1.5 5h-3l1.5 5h-3l1.5-5H8l1.5-5h3L12 2z" }),
|
|
33
|
+
/* @__PURE__ */ h("path", { d: "M12 22v-1.5" })
|
|
34
|
+
] }), r = (l) => /* @__PURE__ */ t(M, { ...l, children: [
|
|
35
|
+
/* @__PURE__ */ h("path", { d: "M4 20L12 4l8 16H4z" }),
|
|
36
|
+
/* @__PURE__ */ h("path", { d: "M8 20l4-8 4 8" })
|
|
37
|
+
] });
|
|
38
|
+
export {
|
|
39
|
+
s as CampfireIcon,
|
|
40
|
+
n as ClawIcon,
|
|
41
|
+
p as DenIcon,
|
|
42
|
+
v as ForestIcon,
|
|
43
|
+
a as HoneycombIcon,
|
|
44
|
+
r as MountainIcon,
|
|
45
|
+
e as PineTreeIcon,
|
|
46
|
+
o as SalmonIcon
|
|
47
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),e=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),c=require("./icons/misc.cjs"),I=e.CheckIcon,
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("react/jsx-runtime");require("react");const n=require("./icons/action.cjs"),o=require("./icons/navigation.cjs"),t=require("./icons/content.cjs"),r=require("./icons/communication.cjs"),e=require("./icons/status.cjs"),i=require("./icons/media.cjs"),s=require("./icons/editor.cjs"),c=require("./icons/misc.cjs"),I=require("./icons/bear.cjs"),h=e.CheckIcon,C=o.CloseIcon,u=n.EditIcon,v=o.ChevronDownIcon,a=o.ChevronRightIcon,q=o.ChevronLeftIcon,g=o.ChevronsLeftIcon,d=o.ChevronsRightIcon,f=c.XIcon,m={...n,...o,...t,...r,...e,...i,...s,...c,...I,Action:n,Navigation:o,Content:t,Communication:r,Status:e,Media:i,Editor:s,Misc:c,Bear:I};exports.BearIcons=m;exports.CheckIcon=h;exports.ChevronDownIcon=v;exports.ChevronLeftIcon=q;exports.ChevronRightIcon=a;exports.ChevronsLeftIcon=g;exports.ChevronsRightIcon=d;exports.CloseIcon=C;exports.EditIcon=u;exports.XIcon=f;
|
|
@@ -14,6 +14,7 @@ import * as StatusIcons from './icons/status';
|
|
|
14
14
|
import * as MediaIcons from './icons/media';
|
|
15
15
|
import * as EditorIcons from './icons/editor';
|
|
16
16
|
import * as MiscIcons from './icons/misc';
|
|
17
|
+
import * as BearCategoryIcons from './icons/bear';
|
|
17
18
|
export declare const CheckIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
18
19
|
export declare const CloseIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
19
20
|
export declare const EditIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
@@ -40,6 +41,14 @@ export declare const UserPlusIcon: import('react').FunctionComponent<Omit<import
|
|
|
40
41
|
export declare const UserMinusIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
41
42
|
export declare const UserCheckIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
42
43
|
export declare const UserXIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
44
|
+
export declare const HoneycombIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
45
|
+
export declare const ClawIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
46
|
+
export declare const ForestIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
47
|
+
export declare const DenIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
48
|
+
export declare const SalmonIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
49
|
+
export declare const CampfireIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
50
|
+
export declare const PineTreeIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
51
|
+
export declare const MountainIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
43
52
|
/**
|
|
44
53
|
* BearIcons - All icons organized by category
|
|
45
54
|
*
|
|
@@ -65,6 +74,15 @@ export declare const BearIcons: {
|
|
|
65
74
|
Media: typeof MediaIcons;
|
|
66
75
|
Editor: typeof EditorIcons;
|
|
67
76
|
Misc: typeof MiscIcons;
|
|
77
|
+
Bear: typeof BearCategoryIcons;
|
|
78
|
+
HoneycombIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
79
|
+
ClawIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
80
|
+
ForestIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
81
|
+
DenIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
82
|
+
SalmonIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
83
|
+
CampfireIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
84
|
+
PineTreeIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
85
|
+
MountainIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
68
86
|
SunIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
69
87
|
MoonIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
70
88
|
CloudIcon: import('react').FunctionComponent<Omit<import('./Icon.types').IconProps, "children">>;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import * as o from "./icons/action.js";
|
|
4
|
-
import { EditIcon as
|
|
4
|
+
import { EditIcon as a } from "./icons/action.js";
|
|
5
5
|
import * as n from "./icons/navigation.js";
|
|
6
|
-
import { CloseIcon as
|
|
6
|
+
import { CloseIcon as I, ChevronDownIcon as h, ChevronRightIcon as C, ChevronLeftIcon as f, ChevronsLeftIcon as v, ChevronsRightIcon as p } from "./icons/navigation.js";
|
|
7
7
|
import * as t from "./icons/content.js";
|
|
8
8
|
import * as c from "./icons/communication.js";
|
|
9
9
|
import * as r from "./icons/status.js";
|
|
10
|
-
import { CheckIcon as
|
|
10
|
+
import { CheckIcon as $ } from "./icons/status.js";
|
|
11
11
|
import * as s from "./icons/media.js";
|
|
12
12
|
import * as i from "./icons/editor.js";
|
|
13
13
|
import * as e from "./icons/misc.js";
|
|
14
|
-
import { XIcon as
|
|
15
|
-
|
|
14
|
+
import { XIcon as g } from "./icons/misc.js";
|
|
15
|
+
import * as m from "./icons/bear.js";
|
|
16
|
+
const l = $, w = I, D = a, X = h, B = C, M = f, b = v, x = p, A = g, N = {
|
|
16
17
|
// Flat access to common icons (shortcuts)
|
|
17
18
|
...o,
|
|
18
19
|
...n,
|
|
@@ -22,7 +23,7 @@ const k = p, l = a, w = m, D = I, X = h, M = C, x = f, A = v, B = $, N = {
|
|
|
22
23
|
...s,
|
|
23
24
|
...i,
|
|
24
25
|
...e,
|
|
25
|
-
|
|
26
|
+
...m,
|
|
26
27
|
Action: o,
|
|
27
28
|
Navigation: n,
|
|
28
29
|
Content: t,
|
|
@@ -30,17 +31,18 @@ const k = p, l = a, w = m, D = I, X = h, M = C, x = f, A = v, B = $, N = {
|
|
|
30
31
|
Status: r,
|
|
31
32
|
Media: s,
|
|
32
33
|
Editor: i,
|
|
33
|
-
Misc: e
|
|
34
|
+
Misc: e,
|
|
35
|
+
Bear: m
|
|
34
36
|
};
|
|
35
37
|
export {
|
|
36
38
|
N as BearIcons,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
l as CheckIcon,
|
|
40
|
+
X as ChevronDownIcon,
|
|
39
41
|
M as ChevronLeftIcon,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
42
|
+
B as ChevronRightIcon,
|
|
43
|
+
b as ChevronsLeftIcon,
|
|
44
|
+
x as ChevronsRightIcon,
|
|
45
|
+
w as CloseIcon,
|
|
46
|
+
D as EditIcon,
|
|
47
|
+
A as XIcon
|
|
46
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),g=require("../../utils/cn.cjs"),n=require("./InfiniteScroll.const.cjs"),_=x=>{const{onLoadMore:i,hasMore:s,loading:r=!1,threshold:d=n.DEFAULT_THRESHOLD,manual:t=!1,loader:u,endMessage:S,loadMoreLabel:b="Load more",inverse:o=!1,children:v,className:E,testId:j,...R}=x,a=c.useRef(null),f=c.useRef(r);f.current=r;const l=c.useCallback(()=>{f.current||!s||i()},[i,s]);c.useEffect(()=>{if(t||!s)return;const L=a.current;if(!L)return;const m=new IntersectionObserver(M=>{var N;(N=M[0])!=null&&N.isIntersecting&&l()},{threshold:0,rootMargin:`${Math.round(d*100)}px`});return m.observe(L),()=>m.disconnect()},[t,s,l,d]);const h=e.jsx("div",{className:n.LOADER_CLASSES,children:e.jsx("div",{className:n.SPINNER_CLASSES})}),A=e.jsxs(e.Fragment,{children:[o&&s&&!t&&e.jsx("div",{ref:a,className:"bear-h-px"}),o&&r&&(u??h),v,!o&&r&&(u??h),!o&&s&&!t&&e.jsx("div",{ref:a,className:"bear-h-px"}),s&&t&&!r&&e.jsx("button",{type:"button",onClick:l,className:n.MANUAL_BTN_CLASSES,children:b}),!s&&S&&e.jsx("div",{className:n.END_CLASSES,children:S})]});return e.jsx("div",{className:g.cn(n.ROOT_CLASSES,E),"data-testid":j,...R,children:A})};exports.InfiniteScroll=_;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=.8,r=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=.8,r="Bear-InfiniteScroll bear-relative",a="bear-flex bear-items-center bear-justify-center bear-py-4",b="bear-text-center bear-py-4 bear-text-sm bear-text-gray-400 dark:bear-text-zinc-500",t="bear-w-full bear-py-2.5 bear-text-sm bear-font-medium bear-text-pink-600 dark:bear-text-pink-400 bear-bg-pink-50 dark:bear-bg-pink-900/20 bear-rounded-lg bear-transition-colors hover:bear-bg-pink-100 dark:hover:bear-bg-pink-900/30 bear-cursor-pointer",S="bear-w-5 bear-h-5 bear-border-2 bear-border-pink-200 bear-border-t-pink-500 bear-rounded-full bear-animate-spin";exports.DEFAULT_THRESHOLD=e;exports.END_CLASSES=b;exports.LOADER_CLASSES=a;exports.MANUAL_BTN_CLASSES=t;exports.ROOT_CLASSES=r;exports.SPINNER_CLASSES=S;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
const e = 0.8, r =
|
|
1
|
+
const e = 0.8, r = "Bear-InfiniteScroll bear-relative", a = "bear-flex bear-items-center bear-justify-center bear-py-4", b = "bear-text-center bear-py-4 bear-text-sm bear-text-gray-400 dark:bear-text-zinc-500", t = "bear-w-full bear-py-2.5 bear-text-sm bear-font-medium bear-text-pink-600 dark:bear-text-pink-400 bear-bg-pink-50 dark:bear-bg-pink-900/20 bear-rounded-lg bear-transition-colors hover:bear-bg-pink-100 dark:hover:bear-bg-pink-900/30 bear-cursor-pointer", n = "bear-w-5 bear-h-5 bear-border-2 bear-border-pink-200 bear-border-t-pink-500 bear-rounded-full bear-animate-spin";
|
|
2
2
|
export {
|
|
3
3
|
e as DEFAULT_THRESHOLD,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
o as SPINNER_CLASSES
|
|
4
|
+
b as END_CLASSES,
|
|
5
|
+
a as LOADER_CLASSES,
|
|
6
|
+
t as MANUAL_BTN_CLASSES,
|
|
7
|
+
r as ROOT_CLASSES,
|
|
8
|
+
n as SPINNER_CLASSES
|
|
10
9
|
};
|