@orion-ds/react 5.3.0 → 5.3.1

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.
@@ -1,15 +1,15 @@
1
- import { jsxs as k, jsx as i } from "react/jsx-runtime";
2
- import { forwardRef as G, useRef as m, useState as B, useEffect as C } from "react";
3
- import { MissingDependencyError as J } from "../MissingDependencyError.mjs";
1
+ import { jsx as s, jsxs as S } from "react/jsx-runtime";
2
+ import { forwardRef as X, useState as v, useRef as f, useEffect as k } from "react";
3
+ import { MissingDependencyError as Y } from "../MissingDependencyError.mjs";
4
+ import { checkComponent as Z } from "../../utils/optionalDeps.mjs";
4
5
  import a from "./CodeEditor.module.css.mjs";
5
- import { useThemeContext as Q } from "../../contexts/ThemeContext.mjs";
6
- let K, j, F, U = null;
6
+ import { useThemeContext as ee } from "../../contexts/ThemeContext.mjs";
7
+ let F, P, V;
7
8
  try {
8
- K = require("react-syntax-highlighter").Prism;
9
- const c = require("react-syntax-highlighter/dist/esm/styles/prism");
10
- j = c.oneDark, F = c.oneLight;
11
- } catch (r) {
12
- U = r instanceof Error ? r : new Error("react-syntax-highlighter not found");
9
+ F = require("react-syntax-highlighter").Prism;
10
+ const l = require("react-syntax-highlighter/dist/esm/styles/prism");
11
+ P = l.oneDark, V = l.oneLight;
12
+ } catch {
13
13
  }
14
14
  try {
15
15
  const r = require("refractor/all");
@@ -22,128 +22,131 @@ try {
22
22
  });
23
23
  } catch {
24
24
  }
25
- const X = G(
25
+ const te = X(
26
26
  ({
27
27
  value: r = "",
28
- onChange: c,
29
- language: T,
30
- readOnly: S = !1,
28
+ onChange: l,
29
+ language: L,
30
+ readOnly: D = !1,
31
31
  showLineNumbers: E = !0,
32
- placeholder: L,
33
- minRows: f = 10,
34
- className: V,
35
- "aria-label": H,
36
- ...M
37
- }, z) => {
38
- if (U)
39
- return /* @__PURE__ */ i(
40
- J,
41
- {
42
- available: !1,
43
- componentName: "CodeEditor",
44
- depName: "react-syntax-highlighter",
45
- installCommand: "npm install react-syntax-highlighter",
46
- pnpmCommand: "pnpm add react-syntax-highlighter",
47
- docsUrl: "https://docs.orion-ds.dev/components/code-editor"
32
+ placeholder: H,
33
+ minRows: m = 10,
34
+ className: z,
35
+ "aria-label": M,
36
+ ...$
37
+ }, I) => {
38
+ const [A, w] = v(), [O, U] = v(!0), [p, W] = v(0), [d, _] = v([]), y = f(null), x = f(null), N = f(null), R = f(null), G = f(null), h = f(null), u = I || G;
39
+ k(() => {
40
+ (async () => {
41
+ try {
42
+ const t = Z("CodeEditor");
43
+ t instanceof Promise ? w(await t) : w(t);
44
+ } catch {
45
+ w(void 0);
46
+ } finally {
47
+ U(!1);
48
48
  }
49
- );
50
- const p = m(null), y = m(null), v = m(null), $ = m(null), O = m(null), h = m(null), g = z || O, [x, P] = B(0), [d, W] = B([]);
51
- let D = "dark";
52
- try {
53
- D = Q().theme;
54
- } catch {
55
- }
56
- const _ = D === "light" ? F : j, R = Math.max(r.split(`
57
- `).length, f);
58
- C(() => {
59
- if (h.current && g.current) {
49
+ })();
50
+ }, []), k(() => {
51
+ if (h.current && u.current) {
60
52
  const { start: e, end: t } = h.current;
61
- g.current.setSelectionRange(e, t), h.current = null;
53
+ u.current.setSelectionRange(e, t), h.current = null;
62
54
  }
63
- }), C(() => {
64
- const e = v.current, t = $.current;
55
+ }), k(() => {
56
+ const e = N.current, t = R.current;
65
57
  if (!e || !t) return;
66
58
  const n = () => {
67
- const o = t.clientWidth;
68
- if (o <= 0) return;
69
- e.style.width = `${o}px`;
70
- const s = r.split(`
71
- `), u = Math.max(s.length, f), b = [];
72
- for (let w = 0; w < u; w++) {
73
- const I = s[w] ?? "";
74
- e.textContent = I || " ", b.push(e.scrollHeight);
59
+ const c = t.clientWidth;
60
+ if (c <= 0) return;
61
+ e.style.width = `${c}px`;
62
+ const i = r.split(`
63
+ `), g = Math.max(i.length, m), b = [];
64
+ for (let T = 0; T < g; T++) {
65
+ const Q = i[T] ?? "";
66
+ e.textContent = Q || " ", b.push(e.scrollHeight);
75
67
  }
76
- W(b);
68
+ _(b);
77
69
  };
78
70
  n();
79
- const l = new ResizeObserver(n);
80
- return l.observe(t), () => l.disconnect();
81
- }, [r, f]), C(() => {
71
+ const o = new ResizeObserver(n);
72
+ return o.observe(t), () => o.disconnect();
73
+ }, [r, m]), k(() => {
82
74
  const e = (n) => {
83
- const l = n.target;
84
- p.current && (p.current.scrollTop = l.scrollTop), y.current && (y.current.scrollTop = l.scrollTop, y.current.scrollLeft = l.scrollLeft);
85
- }, t = g?.current;
75
+ const o = n.target;
76
+ y.current && (y.current.scrollTop = o.scrollTop), x.current && (x.current.scrollTop = o.scrollTop, x.current.scrollLeft = o.scrollLeft);
77
+ }, t = u?.current;
86
78
  if (t)
87
79
  return t.addEventListener("scroll", e), () => {
88
80
  t.removeEventListener("scroll", e);
89
81
  };
90
- }, [g]);
91
- const N = (e) => {
82
+ }, [u]);
83
+ let q = "dark";
84
+ try {
85
+ q = ee().theme;
86
+ } catch {
87
+ }
88
+ const J = q === "light" ? V : P, B = Math.max(r.split(`
89
+ `).length, m);
90
+ if (A)
91
+ return /* @__PURE__ */ s(Y, { ...A });
92
+ if (O)
93
+ return /* @__PURE__ */ s("div", { children: "Loading code editor..." });
94
+ const C = (e) => {
92
95
  const t = e.value.substring(0, e.selectionStart);
93
- P(t.split(`
96
+ W(t.split(`
94
97
  `).length - 1);
95
- }, A = (e) => {
98
+ }, K = (e) => {
96
99
  if (e.key === "Tab") {
97
100
  e.preventDefault();
98
- const t = e.currentTarget, n = t.selectionStart, l = t.selectionEnd, o = " ";
99
- if (n === l) {
100
- const s = r.substring(0, n) + o + r.substring(l);
101
+ const t = e.currentTarget, n = t.selectionStart, o = t.selectionEnd, c = " ";
102
+ if (n === o) {
103
+ const i = r.substring(0, n) + c + r.substring(o);
101
104
  h.current = {
102
- start: n + o.length,
103
- end: n + o.length
104
- }, c?.(s);
105
+ start: n + c.length,
106
+ end: n + c.length
107
+ }, l?.(i);
105
108
  } else if (e.shiftKey) {
106
- const s = r.lastIndexOf(`
107
- `, n - 1) + 1, u = r.substring(s).match(/^ {1,2}/)?.[0] ?? "";
108
- if (u.length > 0) {
109
- const b = r.substring(0, s) + r.substring(s + u.length);
109
+ const i = r.lastIndexOf(`
110
+ `, n - 1) + 1, g = r.substring(i).match(/^ {1,2}/)?.[0] ?? "";
111
+ if (g.length > 0) {
112
+ const b = r.substring(0, i) + r.substring(i + g.length);
110
113
  h.current = {
111
- start: Math.max(s, n - u.length),
112
- end: Math.max(s, l - u.length)
113
- }, c?.(b);
114
+ start: Math.max(i, n - g.length),
115
+ end: Math.max(i, o - g.length)
116
+ }, l?.(b);
114
117
  }
115
118
  } else {
116
- const s = r.substring(0, n) + o + r.substring(l);
119
+ const i = r.substring(0, n) + c + r.substring(o);
117
120
  h.current = {
118
- start: n + o.length,
119
- end: n + o.length
120
- }, c?.(s);
121
+ start: n + c.length,
122
+ end: n + c.length
123
+ }, l?.(i);
121
124
  }
122
125
  }
123
- }, q = [a.wrapper, V].filter(Boolean).join(" ");
124
- return T ? /* @__PURE__ */ k(
126
+ }, j = [a.wrapper, z].filter(Boolean).join(" ");
127
+ return L ? /* @__PURE__ */ S(
125
128
  "div",
126
129
  {
127
- className: q,
130
+ className: j,
128
131
  style: {
129
- minHeight: `calc(${f} * 1.6em + 2 * var(--spacing-4))`
132
+ minHeight: `calc(${m} * 1.6em + 2 * var(--spacing-4))`
130
133
  },
131
134
  children: [
132
- /* @__PURE__ */ i(
135
+ /* @__PURE__ */ s(
133
136
  "div",
134
137
  {
135
- ref: v,
138
+ ref: N,
136
139
  className: a.lineMirror,
137
140
  "aria-hidden": "true"
138
141
  }
139
142
  ),
140
- E && /* @__PURE__ */ i(
143
+ E && /* @__PURE__ */ s(
141
144
  "div",
142
145
  {
143
- ref: p,
146
+ ref: y,
144
147
  className: a.lineNumbers,
145
148
  "aria-hidden": "true",
146
- children: Array.from({ length: R }).map((e, t) => /* @__PURE__ */ i(
149
+ children: Array.from({ length: B }).map((e, t) => /* @__PURE__ */ s(
147
150
  "div",
148
151
  {
149
152
  className: a.lineNumber,
@@ -154,29 +157,29 @@ const X = G(
154
157
  ))
155
158
  }
156
159
  ),
157
- /* @__PURE__ */ k("div", { ref: $, className: a.editorArea, children: [
158
- /* @__PURE__ */ i(
160
+ /* @__PURE__ */ S("div", { ref: R, className: a.editorArea, children: [
161
+ /* @__PURE__ */ s(
159
162
  "div",
160
163
  {
161
164
  className: a.lineHighlight,
162
165
  style: {
163
- top: d.length > 0 ? `calc(var(--spacing-4) + ${d.slice(0, x).reduce((e, t) => e + t, 0)}px)` : `calc(var(--spacing-4) + ${(x * 1.6).toFixed(2)}em)`,
164
- ...d[x] !== void 0 ? { height: `${d[x]}px` } : {}
166
+ top: d.length > 0 ? `calc(var(--spacing-4) + ${d.slice(0, p).reduce((e, t) => e + t, 0)}px)` : `calc(var(--spacing-4) + ${(p * 1.6).toFixed(2)}em)`,
167
+ ...d[p] !== void 0 ? { height: `${d[p]}px` } : {}
165
168
  },
166
169
  "aria-hidden": "true"
167
170
  }
168
171
  ),
169
- /* @__PURE__ */ i(
172
+ /* @__PURE__ */ s(
170
173
  "div",
171
174
  {
172
- ref: y,
175
+ ref: x,
173
176
  className: a.highlightLayer,
174
177
  "aria-hidden": "true",
175
- children: /* @__PURE__ */ i(
176
- K,
178
+ children: /* @__PURE__ */ s(
179
+ F,
177
180
  {
178
- language: T,
179
- style: _,
181
+ language: L,
182
+ style: J,
180
183
  customStyle: {
181
184
  margin: 0,
182
185
  padding: 0,
@@ -203,41 +206,41 @@ const X = G(
203
206
  )
204
207
  }
205
208
  ),
206
- /* @__PURE__ */ i(
209
+ /* @__PURE__ */ s(
207
210
  "textarea",
208
211
  {
209
- ref: g,
212
+ ref: u,
210
213
  className: a.textareaOverlay,
211
214
  value: r,
212
- onChange: (e) => c?.(e.target.value),
213
- onKeyDown: A,
214
- onKeyUp: (e) => N(e.currentTarget),
215
- onMouseUp: (e) => N(e.currentTarget),
216
- onClick: (e) => N(e.currentTarget),
217
- placeholder: L,
218
- readOnly: S,
219
- "aria-label": H || "Code editor",
215
+ onChange: (e) => l?.(e.target.value),
216
+ onKeyDown: K,
217
+ onKeyUp: (e) => C(e.currentTarget),
218
+ onMouseUp: (e) => C(e.currentTarget),
219
+ onClick: (e) => C(e.currentTarget),
220
+ placeholder: H,
221
+ readOnly: D,
222
+ "aria-label": M || "Code editor",
220
223
  spellCheck: "false",
221
- ...M
224
+ ...$
222
225
  }
223
226
  )
224
227
  ] })
225
228
  ]
226
229
  }
227
- ) : /* @__PURE__ */ k(
230
+ ) : /* @__PURE__ */ S(
228
231
  "div",
229
232
  {
230
- className: q,
231
- style: { minHeight: `calc(${f} * 1.6em + 2 * var(--spacing-4))` },
233
+ className: j,
234
+ style: { minHeight: `calc(${m} * 1.6em + 2 * var(--spacing-4))` },
232
235
  children: [
233
- /* @__PURE__ */ i("div", { ref: v, className: a.lineMirror, "aria-hidden": "true" }),
234
- E && /* @__PURE__ */ i(
236
+ /* @__PURE__ */ s("div", { ref: N, className: a.lineMirror, "aria-hidden": "true" }),
237
+ E && /* @__PURE__ */ s(
235
238
  "div",
236
239
  {
237
- ref: p,
240
+ ref: y,
238
241
  className: a.lineNumbers,
239
242
  "aria-hidden": "true",
240
- children: Array.from({ length: R }).map((e, t) => /* @__PURE__ */ i(
243
+ children: Array.from({ length: B }).map((e, t) => /* @__PURE__ */ s(
241
244
  "div",
242
245
  {
243
246
  className: a.lineNumber,
@@ -248,19 +251,19 @@ const X = G(
248
251
  ))
249
252
  }
250
253
  ),
251
- /* @__PURE__ */ i(
254
+ /* @__PURE__ */ s(
252
255
  "textarea",
253
256
  {
254
- ref: g,
257
+ ref: u,
255
258
  className: a.textarea,
256
259
  value: r,
257
- onChange: (e) => c?.(e.target.value),
258
- onKeyDown: A,
259
- placeholder: L,
260
- readOnly: S,
261
- "aria-label": H || "Code editor",
260
+ onChange: (e) => l?.(e.target.value),
261
+ onKeyDown: K,
262
+ placeholder: H,
263
+ readOnly: D,
264
+ "aria-label": M || "Code editor",
262
265
  spellCheck: "false",
263
- ...M
266
+ ...$
264
267
  }
265
268
  )
266
269
  ]
@@ -268,7 +271,7 @@ const X = G(
268
271
  );
269
272
  }
270
273
  );
271
- X.displayName = "CodeEditor";
274
+ te.displayName = "CodeEditor";
272
275
  export {
273
- X as CodeEditor
276
+ te as CodeEditor
274
277
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),i=require("react"),h=require("lucide-react"),re=require("../MissingDependencyError.cjs"),a=require("./CollapsibleFolder.module.css.cjs"),x=require("../Collapsible/Collapsible.cjs"),se=require("../Badge/Badge.cjs"),q=require("../Dropdown/Dropdown.cjs"),F=require("../Button/Button.cjs");let w,R=null;try{w=require("@dnd-kit/core").useDroppable}catch(r){R=r instanceof Error?r:new Error("@dnd-kit/core not found")}function B(r){if(R)return e.jsx(re.MissingDependencyError,{available:!1,componentName:"CollapsibleFolder",depName:["@dnd-kit/core","@dnd-kit/sortable","@dnd-kit/utilities"],installCommand:"npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities",pnpmCommand:"pnpm add @dnd-kit/core @dnd-kit/sortable @dnd-kit/utilities",docsUrl:"https://docs.orion-ds.dev/components/collapsible-folder"});const{id:p,title:z,itemCount:b,items:s,renderItem:O,itemLabel:A="Item",itemLabelPlural:M="Items",emptyText:K="No items in this folder",sortLabel:v="Sort",defaultExpanded:$=!0,sortOptions:d,selectedSort:P,onSortChange:Y,onDrop:D,onFolderEdit:j,onFolderDelete:C,onFolderInvite:N,isDropTarget:H=!1,isDropCompleted:U=!1,onDragEnter:Z,onDragLeaveFolder:y,className:_,...G}=r,[m,J]=i.useState($),[f,c]=i.useState(null),[T,g]=i.useState(!1),k=i.useRef(null),{setNodeRef:Q}=w({id:p}),V=t=>{if(t.preventDefault(),t.dataTransfer.dropEffect="move",T||(g(!0),Z?.()),!m||s.length===0){c(0);return}const n=k.current;if(!n)return;const l=Array.from(n.querySelectorAll("[data-item-id]")),le=t.clientY;let E=l.length;for(let u=0;u<l.length;u++){const L=l[u];if(!L)continue;const S=L.getBoundingClientRect();if(le<S.top+S.height/2){E=u;break}}c(E)},W=t=>{t.currentTarget.contains(t.relatedTarget)||(g(!1),c(null),y?.())},X=t=>{t.preventDefault();const n=t.dataTransfer.getData("text/plain")||t.dataTransfer.getData("itemId");if(n&&D){const l=f??s.length;D(n,p,l)}g(!1),c(null),y?.()},ee=(t,n)=>{t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",n)},te=d?.map(t=>({id:t.value,label:t.label,onClick:()=>Y?.(t.value)})),I=[...j?[{id:"rename",label:"Rename",onClick:j}]:[],...N?[{id:"invite",label:"Invite participants",onClick:N}]:[],...C?[{id:"delete",label:"Delete folder",danger:!0,onClick:C}]:[]],o=H||T,ae=[a.default.folder,o&&a.default.dropTarget,U&&a.default.dropCompleted,_].filter(Boolean).join(" "),ne=b===1?A:M;return e.jsx("div",{ref:Q,className:ae,"data-folder-id":p,"data-drop-active":o,onDragOver:V,onDragLeave:W,onDrop:X,...G,children:e.jsxs(x.Collapsible,{open:m,onOpenChange:J,children:[e.jsxs("div",{className:a.default.header,children:[e.jsxs(x.Collapsible.Trigger,{className:a.default.trigger,children:[e.jsx(h.ChevronDown,{size:20,className:`${a.default.chevron} ${m?a.default.expanded:""}`}),e.jsx("h2",{className:a.default.title,children:z}),e.jsxs(se.Badge,{variant:"secondary",className:a.default.badge,children:[b,e.jsxs("span",{className:a.default.badgeLabel,children:[" ",ne]})]})]}),e.jsxs("div",{className:a.default.actions,children:[d&&d.length>0&&e.jsx("div",{className:a.default.sortDropdown,children:e.jsx(q.Dropdown,{trigger:e.jsx(F.Button,{variant:"ghost",size:"sm",iconRight:e.jsx(h.ChevronDown,{size:16}),"aria-label":`Sort by ${v}`,children:d.find(t=>t.value===P)?.label||v}),items:te,placement:"bottom-end"})}),I.length>0&&e.jsx(q.Dropdown,{trigger:e.jsx(F.Button,{variant:"ghost",size:"sm",iconOnly:!0,icon:e.jsx(h.MoreHorizontal,{size:20}),"aria-label":"Folder actions"}),items:I,placement:"bottom-end"})]})]}),e.jsx(x.Collapsible.Content,{children:e.jsx("div",{className:a.default.content,children:s.length===0?o?e.jsx("div",{className:a.default.emptyDropZone,children:e.jsx("div",{className:a.default.insertionLine,role:"presentation"})}):e.jsx("div",{className:a.default.emptyState,children:e.jsx("p",{className:a.default.emptyText,children:K})}):e.jsxs("div",{className:a.default.grid,ref:k,children:[s.map((t,n)=>e.jsxs(i.Fragment,{children:[o&&f===n&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"}),e.jsx("div",{"data-item-id":t.id,draggable:t.draggable,onDragStart:l=>ee(l,t.id),children:O(t,n)})]},t.id)),o&&f===s.length&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"})]})})})]})})}B.displayName="CollapsibleFolder";exports.CollapsibleFolder=B;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),s=require("react"),x=require("lucide-react"),ie=require("../MissingDependencyError.cjs"),de=require("../../utils/optionalDeps.cjs"),a=require("./CollapsibleFolder.module.css.cjs"),D=require("../Collapsible/Collapsible.cjs"),ce=require("../Badge/Badge.cjs"),w=require("../Dropdown/Dropdown.cjs"),R=require("../Button/Button.cjs");let B;try{B=require("@dnd-kit/core").useDroppable}catch{}function z(u){const{id:p,title:O,itemCount:v,items:l,renderItem:A,itemLabel:M="Item",itemLabelPlural:P="Items",emptyText:$="No items in this folder",sortLabel:b="Sort",defaultExpanded:K=!0,sortOptions:i,selectedSort:Y,onSortChange:H,onDrop:j,onFolderEdit:C,onFolderDelete:N,onFolderInvite:y,isDropTarget:Z=!1,isDropCompleted:_=!1,onDragEnter:G,onDragLeaveFolder:T,className:J,...Q}=u,[I,f]=s.useState(),[U,V]=s.useState(!0),[g,W]=s.useState(K),[m,d]=s.useState(null),[S,h]=s.useState(!1),L=s.useRef(null),{setNodeRef:X}=B({id:p});if(s.useEffect(()=>{(async()=>{try{const r=de.checkComponent("CollapsibleFolder");r instanceof Promise?f(await r):f(r)}catch{f(void 0)}finally{V(!1)}})()},[]),I)return e.jsx(ie.MissingDependencyError,{...I});if(U)return e.jsx("div",{children:"Loading folder..."});const ee=t=>{if(t.preventDefault(),t.dataTransfer.dropEffect="move",S||(h(!0),G?.()),!g||l.length===0){d(0);return}const r=L.current;if(!r)return;const n=Array.from(r.querySelectorAll("[data-item-id]")),oe=t.clientY;let q=n.length;for(let c=0;c<n.length;c++){const F=n[c];if(!F)continue;const k=F.getBoundingClientRect();if(oe<k.top+k.height/2){q=c;break}}d(q)},te=t=>{t.currentTarget.contains(t.relatedTarget)||(h(!1),d(null),T?.())},ae=t=>{t.preventDefault();const r=t.dataTransfer.getData("text/plain")||t.dataTransfer.getData("itemId");if(r&&j){const n=m??l.length;j(r,p,n)}h(!1),d(null),T?.()},re=(t,r)=>{t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text/plain",r)},se=i?.map(t=>({id:t.value,label:t.label,onClick:()=>H?.(t.value)})),E=[...C?[{id:"rename",label:"Rename",onClick:C}]:[],...y?[{id:"invite",label:"Invite participants",onClick:y}]:[],...N?[{id:"delete",label:"Delete folder",danger:!0,onClick:N}]:[]],o=Z||S,ne=[a.default.folder,o&&a.default.dropTarget,_&&a.default.dropCompleted,J].filter(Boolean).join(" "),le=v===1?M:P;return e.jsx("div",{ref:X,className:ne,"data-folder-id":p,"data-drop-active":o,onDragOver:ee,onDragLeave:te,onDrop:ae,...Q,children:e.jsxs(D.Collapsible,{open:g,onOpenChange:W,children:[e.jsxs("div",{className:a.default.header,children:[e.jsxs(D.Collapsible.Trigger,{className:a.default.trigger,children:[e.jsx(x.ChevronDown,{size:20,className:`${a.default.chevron} ${g?a.default.expanded:""}`}),e.jsx("h2",{className:a.default.title,children:O}),e.jsxs(ce.Badge,{variant:"secondary",className:a.default.badge,children:[v,e.jsxs("span",{className:a.default.badgeLabel,children:[" ",le]})]})]}),e.jsxs("div",{className:a.default.actions,children:[i&&i.length>0&&e.jsx("div",{className:a.default.sortDropdown,children:e.jsx(w.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconRight:e.jsx(x.ChevronDown,{size:16}),"aria-label":`Sort by ${b}`,children:i.find(t=>t.value===Y)?.label||b}),items:se,placement:"bottom-end"})}),E.length>0&&e.jsx(w.Dropdown,{trigger:e.jsx(R.Button,{variant:"ghost",size:"sm",iconOnly:!0,icon:e.jsx(x.MoreHorizontal,{size:20}),"aria-label":"Folder actions"}),items:E,placement:"bottom-end"})]})]}),e.jsx(D.Collapsible.Content,{children:e.jsx("div",{className:a.default.content,children:l.length===0?o?e.jsx("div",{className:a.default.emptyDropZone,children:e.jsx("div",{className:a.default.insertionLine,role:"presentation"})}):e.jsx("div",{className:a.default.emptyState,children:e.jsx("p",{className:a.default.emptyText,children:$})}):e.jsxs("div",{className:a.default.grid,ref:L,children:[l.map((t,r)=>e.jsxs(s.Fragment,{children:[o&&m===r&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"}),e.jsx("div",{"data-item-id":t.id,draggable:t.draggable,onDragStart:n=>re(n,t.id),children:A(t,r)})]},t.id)),o&&m===l.length&&e.jsx("div",{className:a.default.insertionLine,role:"presentation"})]})})})]})})}z.displayName="CollapsibleFolder";exports.CollapsibleFolder=z;
@@ -1 +1 @@
1
- {"version":3,"file":"CollapsibleFolder.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsibleFolder/CollapsibleFolder.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAqBxE,wBAAgB,iBAAiB,CAC/B,KAAK,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,2CAoRrC;yBAtRe,iBAAiB"}
1
+ {"version":3,"file":"CollapsibleFolder.d.ts","sourceRoot":"","sources":["../../../src/components/CollapsibleFolder/CollapsibleFolder.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAwBxE,wBAAgB,iBAAiB,CAC/B,KAAK,SAAS;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAE,EACjD,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,2CA0SrC;yBA5Se,iBAAiB"}