@rafal.lemieszewski/tide-ui 0.85.1 → 0.87.0

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.
Files changed (55) hide show
  1. package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -1
  2. package/dist/cjs/components/fundamental/button.cjs +1 -1
  3. package/dist/cjs/components/fundamental/calendar.cjs +1 -1
  4. package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -1
  5. package/dist/cjs/components/fundamental/custom-icons.cjs +1 -1
  6. package/dist/cjs/components/fundamental/dialog.cjs +1 -1
  7. package/dist/cjs/components/fundamental/file-upload.cjs +1 -1
  8. package/dist/cjs/components/fundamental/icon.cjs +1 -1
  9. package/dist/cjs/components/fundamental/month-picker.cjs +1 -1
  10. package/dist/cjs/components/fundamental/pagination.cjs +1 -1
  11. package/dist/cjs/components/fundamental/select.cjs +1 -1
  12. package/dist/cjs/components/fundamental/separator.cjs +1 -1
  13. package/dist/cjs/components/fundamental/sidebar.cjs +1 -1
  14. package/dist/cjs/components/fundamental/toast.cjs +1 -1
  15. package/dist/cjs/components/fundamental/tree.cjs +1 -1
  16. package/dist/cjs/components/product/app-frame.cjs +1 -1
  17. package/dist/cjs/components/product/attributes-list.cjs +1 -1
  18. package/dist/cjs/components/product/bookmarks.cjs +1 -1
  19. package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -1
  20. package/dist/cjs/components/product/data-table.cjs +1 -1
  21. package/dist/cjs/components/product/filters.cjs +1 -1
  22. package/dist/cjs/components/product/fixture-status.cjs +1 -1
  23. package/dist/cjs/components/product/linked-chart.cjs +1 -1
  24. package/dist/cjs/components/product/view-mode-menu.cjs +1 -1
  25. package/dist/es/components/fundamental/button.js +10 -9
  26. package/dist/es/components/fundamental/calendar.js +18 -17
  27. package/dist/es/components/fundamental/custom-icons.js +283 -517
  28. package/dist/es/components/fundamental/dialog.js +25 -24
  29. package/dist/es/components/fundamental/file-upload.js +17 -16
  30. package/dist/es/components/fundamental/icon.js +68 -147
  31. package/dist/es/components/fundamental/month-picker.js +21 -20
  32. package/dist/es/components/fundamental/pagination.js +44 -43
  33. package/dist/es/components/fundamental/select.js +40 -39
  34. package/dist/es/components/fundamental/separator.js +11 -10
  35. package/dist/es/components/fundamental/sidebar.js +85 -84
  36. package/dist/es/components/fundamental/toast.js +8 -7
  37. package/dist/es/components/product/app-frame.js +83 -82
  38. package/dist/es/components/product/attributes-list.js +61 -60
  39. package/dist/es/components/product/bookmarks.js +170 -169
  40. package/dist/es/components/product/data-table-settings-menu.js +38 -37
  41. package/dist/es/components/product/data-table.js +374 -373
  42. package/dist/es/components/product/filters.js +93 -92
  43. package/dist/es/components/product/fixture-status.js +89 -87
  44. package/dist/es/components/product/linked-chart.js +54 -53
  45. package/dist/es/components/product/view-mode-menu.js +176 -175
  46. package/dist/types/components/core-index.d.cts +1 -1
  47. package/dist/types/components/core-index.d.ts +1 -1
  48. package/dist/types/components/fundamental/custom-icons.d.ts +32 -36
  49. package/dist/types/components/fundamental/dropdown-menu.d.ts +2 -1
  50. package/dist/types/components/fundamental/icon.d.ts +1 -3
  51. package/dist/types/components/index.d.ts +2 -1
  52. package/dist/types/components/product/fixture-status.d.ts +2 -2
  53. package/dist/types/lib/index.d.cts +1 -1
  54. package/dist/types/lib/index.d.ts +1 -1
  55. package/package.json +1 -1
@@ -2,20 +2,21 @@ import { jsxs as s, jsx as e, Fragment as O } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
3
  import { cn as X } from "../../lib/utils.js";
4
4
  import { Button as T } from "../fundamental/button.js";
5
- import { ButtonGroup as De } from "../fundamental/button-group.js";
5
+ import { ButtonGroup as ze } from "../fundamental/button-group.js";
6
6
  import { Icon as w } from "../fundamental/icon.js";
7
- import { Separator as ue } from "../fundamental/separator.js";
8
- import { Select as Ne, SelectTrigger as Se, SelectContent as ye, SelectItem as de, SelectSeparator as Be, SelectGroup as ze, SelectLabel as Re } from "../fundamental/select.js";
9
- import { DropdownMenu as se, DropdownMenuTrigger as oe, DropdownMenuContent as le, DropdownMenuItem as L, DropdownMenuSeparator as Me } from "../fundamental/dropdown-menu.js";
10
- import { Popover as Oe, PopoverTrigger as Te, PopoverContent as Ee } from "../fundamental/popover.js";
11
- import { Dialog as Ae, DialogContent as Ue, DialogHeader as Ve, DialogTitle as Pe, DialogBody as We, DialogFooter as Ie } from "../fundamental/dialog.js";
12
- import { Input as Le } from "../fundamental/input.js";
13
- import { Label as Fe } from "../fundamental/label.js";
14
- import { Badge as je } from "../fundamental/badge.js";
15
- import { Skeleton as me } from "../fundamental/skeleton.js";
16
- const ae = r.createContext(null);
7
+ import { Bookmark as re, MoreHorizontal as Re, Pencil as me, Trash2 as he, ChevronDown as pe, Star as fe, Check as Me } from "lucide-react";
8
+ import { Separator as ve } from "../fundamental/separator.js";
9
+ import { Select as Oe, SelectTrigger as Te, SelectContent as Ee, SelectItem as ue, SelectSeparator as Ae, SelectGroup as Pe, SelectLabel as Ue } from "../fundamental/select.js";
10
+ import { DropdownMenu as oe, DropdownMenuTrigger as le, DropdownMenuContent as ie, DropdownMenuItem as L, DropdownMenuSeparator as Ve } from "../fundamental/dropdown-menu.js";
11
+ import { Popover as We, PopoverTrigger as Ie, PopoverContent as Le } from "../fundamental/popover.js";
12
+ import { Dialog as Fe, DialogContent as je, DialogHeader as $e, DialogTitle as He, DialogBody as Ke, DialogFooter as Ge } from "../fundamental/dialog.js";
13
+ import { Input as _e } from "../fundamental/input.js";
14
+ import { Label as qe } from "../fundamental/label.js";
15
+ import { Badge as Je } from "../fundamental/badge.js";
16
+ import { Skeleton as ge } from "../fundamental/skeleton.js";
17
+ const se = r.createContext(null);
17
18
  function J() {
18
- const t = r.useContext(ae);
19
+ const t = r.useContext(se);
19
20
  if (!t)
20
21
  throw new Error("useBookmarksActions must be used within Bookmarks");
21
22
  return t;
@@ -31,34 +32,34 @@ function te({
31
32
  r.useEffect(() => {
32
33
  t && S(c);
33
34
  }, [t, c]);
34
- const k = () => {
35
+ const C = () => {
35
36
  g.trim() && (x(g.trim()), o(!1));
36
37
  };
37
- return /* @__PURE__ */ e(Ae, { open: t, onOpenChange: o, children: /* @__PURE__ */ s(Ue, { children: [
38
- /* @__PURE__ */ e(Ve, { children: /* @__PURE__ */ e(Pe, { children: u === "create" ? "Create bookmark" : "Rename bookmark" }) }),
39
- /* @__PURE__ */ e(We, { children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-[var(--space-s)]", children: [
40
- /* @__PURE__ */ e(Fe, { htmlFor: "bookmark-name", children: "Bookmark name" }),
38
+ return /* @__PURE__ */ e(Fe, { open: t, onOpenChange: o, children: /* @__PURE__ */ s(je, { children: [
39
+ /* @__PURE__ */ e($e, { children: /* @__PURE__ */ e(He, { children: u === "create" ? "Create bookmark" : "Rename bookmark" }) }),
40
+ /* @__PURE__ */ e(Ke, { children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-[var(--space-s)]", children: [
41
+ /* @__PURE__ */ e(qe, { htmlFor: "bookmark-name", children: "Bookmark name" }),
41
42
  /* @__PURE__ */ e(
42
- Le,
43
+ _e,
43
44
  {
44
45
  id: "bookmark-name",
45
46
  value: g,
46
47
  onChange: (b) => S(b.target.value),
47
48
  placeholder: "Enter bookmark name...",
48
49
  onKeyDown: (b) => {
49
- b.key === "Enter" && (b.preventDefault(), k());
50
+ b.key === "Enter" && (b.preventDefault(), C());
50
51
  },
51
52
  autoFocus: !0
52
53
  }
53
54
  )
54
55
  ] }) }),
55
- /* @__PURE__ */ s(Ie, { children: [
56
+ /* @__PURE__ */ s(Ge, { children: [
56
57
  /* @__PURE__ */ e(T, { variant: "default", onClick: () => o(!1), children: "Cancel" }),
57
58
  /* @__PURE__ */ e(
58
59
  T,
59
60
  {
60
61
  variant: "primary",
61
- onClick: k,
62
+ onClick: C,
62
63
  disabled: !g.trim(),
63
64
  children: u === "create" ? "Create" : "Save"
64
65
  }
@@ -66,7 +67,7 @@ function te({
66
67
  ] })
67
68
  ] }) });
68
69
  }
69
- function $e({
70
+ function Qe({
70
71
  bookmarks: t,
71
72
  systemBookmarks: o,
72
73
  activeBookmarkId: u,
@@ -75,46 +76,46 @@ function $e({
75
76
  onDelete: g,
76
77
  onSetDefault: S
77
78
  }) {
78
- const k = r.useMemo(
79
+ const C = r.useMemo(
79
80
  () => [...o, ...t],
80
81
  [o, t]
81
82
  ), b = r.useMemo(
82
- () => k.find((d) => d.id === u),
83
- [k, u]
83
+ () => C.find((d) => d.id === u),
84
+ [C, u]
84
85
  ), h = b?.type === "system";
85
- return /* @__PURE__ */ s(De, { children: [
86
+ return /* @__PURE__ */ s(ze, { children: [
86
87
  /* @__PURE__ */ s(
87
- Ne,
88
+ Oe,
88
89
  {
89
90
  value: u,
90
91
  onValueChange: (d) => {
91
- const B = k.find((v) => v.id === d);
92
+ const B = C.find((v) => v.id === d);
92
93
  B && c(B);
93
94
  },
94
95
  children: [
95
96
  /* @__PURE__ */ s(
96
- Se,
97
+ Te,
97
98
  {
98
99
  className: X(
99
100
  "!text-label-md relative z-0 h-[var(--size-m)] w-auto gap-[var(--space-xs)] border border-[var(--color-border-action-outline)] bg-[var(--color-background-neutral-subtlest)] pr-[var(--space-m)] pl-[var(--space-s)] text-[var(--color-text-primary)] hover:border-[var(--color-border-action-outline-hovered)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:shadow-sm focus:border-[var(--color-border-action-outline)] focus:ring-0 focus:outline-none focus-visible:z-10 focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2 active:translate-y-px active:bg-[var(--grey-alpha-50)] active:shadow-xs data-[state=open]:ring-0",
100
101
  h ? "rounded-m" : "rounded-l-m !rounded-r-none !border-r-0"
101
102
  ),
102
103
  children: [
103
- /* @__PURE__ */ e(w, { name: "bookmark", size: "m", color: "primary" }),
104
+ /* @__PURE__ */ e(w, { name: re, size: "m", color: "primary" }),
104
105
  b?.name || "Bookmarks"
105
106
  ]
106
107
  }
107
108
  ),
108
- /* @__PURE__ */ s(ye, { align: "start", position: "popper", className: "min-w-[200px]", children: [
109
- o.length > 0 && /* @__PURE__ */ e(O, { children: o.map((d) => /* @__PURE__ */ e(de, { value: d.id, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-[var(--space-s)] pr-6", children: /* @__PURE__ */ e("span", { children: d.name }) }) }, d.id)) }),
110
- o.length > 0 && t.length > 0 && /* @__PURE__ */ e(Be, {}),
111
- t.length > 0 && /* @__PURE__ */ s(ze, { children: [
112
- /* @__PURE__ */ e(Re, { children: "Custom Bookmarks" }),
113
- t.map((d) => /* @__PURE__ */ e(de, { value: d.id, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-[var(--space-s)] pr-6", children: [
109
+ /* @__PURE__ */ s(Ee, { align: "start", position: "popper", className: "min-w-[200px]", children: [
110
+ o.length > 0 && /* @__PURE__ */ e(O, { children: o.map((d) => /* @__PURE__ */ e(ue, { value: d.id, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-[var(--space-s)] pr-6", children: /* @__PURE__ */ e("span", { children: d.name }) }) }, d.id)) }),
111
+ o.length > 0 && t.length > 0 && /* @__PURE__ */ e(Ae, {}),
112
+ t.length > 0 && /* @__PURE__ */ s(Pe, { children: [
113
+ /* @__PURE__ */ e(Ue, { children: "Custom Bookmarks" }),
114
+ t.map((d) => /* @__PURE__ */ e(ue, { value: d.id, children: /* @__PURE__ */ s("div", { className: "flex items-center gap-[var(--space-s)] pr-6", children: [
114
115
  /* @__PURE__ */ e(
115
116
  w,
116
117
  {
117
- name: "bookmark",
118
+ name: re,
118
119
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)]"
119
120
  }
120
121
  ),
@@ -122,7 +123,7 @@ function $e({
122
123
  d.isDefault && /* @__PURE__ */ e(
123
124
  w,
124
125
  {
125
- name: "star",
126
+ name: fe,
126
127
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)] flex-shrink-0 text-[var(--color-icon-warning-bold)]"
127
128
  }
128
129
  )
@@ -132,8 +133,8 @@ function $e({
132
133
  ]
133
134
  }
134
135
  ),
135
- !h && /* @__PURE__ */ s(se, { children: [
136
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ e(
136
+ !h && /* @__PURE__ */ s(oe, { children: [
137
+ /* @__PURE__ */ e(le, { asChild: !0, children: /* @__PURE__ */ e(
137
138
  T,
138
139
  {
139
140
  icon: "more-horizontal",
@@ -141,7 +142,7 @@ function $e({
141
142
  className: "!rounded-l-none rounded-r-md !border-l !border-l-[var(--color-border-action-outline)] focus:ring-0 data-[state=open]:ring-0"
142
143
  }
143
144
  ) }),
144
- /* @__PURE__ */ s(le, { align: "end", children: [
145
+ /* @__PURE__ */ s(ie, { align: "end", children: [
145
146
  /* @__PURE__ */ s(
146
147
  L,
147
148
  {
@@ -154,7 +155,7 @@ function $e({
154
155
  },
155
156
  disabled: h,
156
157
  children: [
157
- /* @__PURE__ */ e(w, { name: "pencil", className: "mr-2 h-4 w-4" }),
158
+ /* @__PURE__ */ e(w, { name: me, className: "mr-2 h-4 w-4" }),
158
159
  "Rename"
159
160
  ]
160
161
  }
@@ -172,13 +173,13 @@ function $e({
172
173
  disabled: h,
173
174
  destructive: !0,
174
175
  children: [
175
- /* @__PURE__ */ e(w, { name: "trash-2", className: "mr-2 h-4 w-4" }),
176
+ /* @__PURE__ */ e(w, { name: he, className: "mr-2 h-4 w-4" }),
176
177
  "Delete"
177
178
  ]
178
179
  }
179
180
  ),
180
181
  !h && /* @__PURE__ */ s(O, { children: [
181
- /* @__PURE__ */ e(Me, {}),
182
+ /* @__PURE__ */ e(Ve, {}),
182
183
  /* @__PURE__ */ s(L, { onClick: S, children: [
183
184
  /* @__PURE__ */ e(
184
185
  w,
@@ -197,9 +198,9 @@ function $e({
197
198
  ] })
198
199
  ] });
199
200
  }
200
- function Ke({ onUpdate: t, onCreate: o }) {
201
- return /* @__PURE__ */ s(se, { children: [
202
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ s(
201
+ function Xe({ onUpdate: t, onCreate: o }) {
202
+ return /* @__PURE__ */ s(oe, { children: [
203
+ /* @__PURE__ */ e(le, { asChild: !0, children: /* @__PURE__ */ s(
203
204
  T,
204
205
  {
205
206
  variant: "ghost",
@@ -209,20 +210,20 @@ function Ke({ onUpdate: t, onCreate: o }) {
209
210
  /* @__PURE__ */ e(
210
211
  w,
211
212
  {
212
- name: "chevron-down",
213
+ name: pe,
213
214
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)]"
214
215
  }
215
216
  )
216
217
  ]
217
218
  }
218
219
  ) }),
219
- /* @__PURE__ */ s(le, { align: "end", children: [
220
+ /* @__PURE__ */ s(ie, { align: "end", children: [
220
221
  /* @__PURE__ */ e(L, { onClick: t, children: "Update bookmark" }),
221
222
  /* @__PURE__ */ e(L, { onClick: o, children: "Create new bookmark" })
222
223
  ] })
223
224
  ] });
224
225
  }
225
- const he = /* @__PURE__ */ r.memo(
226
+ const be = /* @__PURE__ */ r.memo(
226
227
  /* @__PURE__ */ r.forwardRef(
227
228
  ({
228
229
  bookmark: t,
@@ -232,7 +233,7 @@ const he = /* @__PURE__ */ r.memo(
232
233
  totalTabs: x,
233
234
  onSelect: g,
234
235
  onRename: S,
235
- onDelete: k,
236
+ onDelete: C,
236
237
  onSetDefault: b,
237
238
  onNavigate: h,
238
239
  onNavigateFirst: d,
@@ -243,11 +244,11 @@ const he = /* @__PURE__ */ r.memo(
243
244
  g(t);
244
245
  }, [g, t]), F = r.useCallback(() => {
245
246
  v?.(t);
246
- }, [v, t]), U = r.useCallback(() => {
247
+ }, [v, t]), P = r.useCallback(() => {
247
248
  S(t.id);
248
- }, [S, t.id]), C = r.useCallback(() => {
249
- k(t.id);
250
- }, [k, t.id]), f = r.useCallback(
249
+ }, [S, t.id]), k = r.useCallback(() => {
250
+ C(t.id);
251
+ }, [C, t.id]), f = r.useCallback(
251
252
  (a) => {
252
253
  switch (a.key) {
253
254
  case "Enter":
@@ -294,7 +295,7 @@ const he = /* @__PURE__ */ r.memo(
294
295
  A && /* @__PURE__ */ e(
295
296
  w,
296
297
  {
297
- name: "bookmark",
298
+ name: re,
298
299
  size: "s",
299
300
  color: "secondary",
300
301
  className: "flex-shrink-0"
@@ -302,8 +303,8 @@ const he = /* @__PURE__ */ r.memo(
302
303
  ),
303
304
  /* @__PURE__ */ e("div", { className: "text-body-md whitespace-nowrap text-[var(--color-text-primary)]", children: t.name })
304
305
  ] }),
305
- A && /* @__PURE__ */ s(se, { children: [
306
- /* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ e(
306
+ A && /* @__PURE__ */ s(oe, { children: [
307
+ /* @__PURE__ */ e(le, { asChild: !0, children: /* @__PURE__ */ e(
307
308
  T,
308
309
  {
309
310
  variant: "ghost",
@@ -315,21 +316,21 @@ const he = /* @__PURE__ */ r.memo(
315
316
  children: /* @__PURE__ */ e(
316
317
  w,
317
318
  {
318
- name: "more-horizontal",
319
+ name: Re,
319
320
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)]"
320
321
  }
321
322
  )
322
323
  }
323
324
  ) }),
324
- /* @__PURE__ */ s(le, { align: "end", children: [
325
+ /* @__PURE__ */ s(ie, { align: "end", children: [
325
326
  /* @__PURE__ */ s(
326
327
  L,
327
328
  {
328
329
  onClick: (a) => {
329
- a.stopPropagation(), U();
330
+ a.stopPropagation(), P();
330
331
  },
331
332
  children: [
332
- /* @__PURE__ */ e(w, { name: "pencil", className: "mr-2 h-4 w-4" }),
333
+ /* @__PURE__ */ e(w, { name: me, className: "mr-2 h-4 w-4" }),
333
334
  "Rename"
334
335
  ]
335
336
  }
@@ -338,11 +339,11 @@ const he = /* @__PURE__ */ r.memo(
338
339
  L,
339
340
  {
340
341
  onClick: (a) => {
341
- a.stopPropagation(), C();
342
+ a.stopPropagation(), k();
342
343
  },
343
344
  destructive: !0,
344
345
  children: [
345
- /* @__PURE__ */ e(w, { name: "trash-2", className: "mr-2 h-4 w-4" }),
346
+ /* @__PURE__ */ e(w, { name: he, className: "mr-2 h-4 w-4" }),
346
347
  "Delete"
347
348
  ]
348
349
  }
@@ -350,15 +351,15 @@ const he = /* @__PURE__ */ r.memo(
350
351
  ] })
351
352
  ] })
352
353
  ] }),
353
- /* @__PURE__ */ e("div", { className: "text-heading-lg text-[var(--color-text-primary)]", children: t.isLoadingCount ? /* @__PURE__ */ e(me, { height: 32, width: 40 }) : t.count ?? " " })
354
+ /* @__PURE__ */ e("div", { className: "text-heading-lg text-[var(--color-text-primary)]", children: t.isLoadingCount ? /* @__PURE__ */ e(ge, { height: 32, width: 40 }) : t.count ?? " " })
354
355
  ]
355
356
  }
356
357
  );
357
358
  }
358
359
  )
359
360
  );
360
- he.displayName = "BookmarkTab";
361
- function Ge({
361
+ be.displayName = "BookmarkTab";
362
+ function Ye({
362
363
  bookmarks: t,
363
364
  systemBookmarks: o,
364
365
  activeBookmarkId: u,
@@ -366,7 +367,7 @@ function Ge({
366
367
  onSelect: x,
367
368
  onRename: g,
368
369
  onDelete: S,
369
- onSetDefault: k,
370
+ onSetDefault: C,
370
371
  onBookmarkHover: b,
371
372
  onOverflowMenuChange: h
372
373
  }) {
@@ -375,43 +376,43 @@ function Ge({
375
376
  B(n), h?.(n);
376
377
  },
377
378
  [h]
378
- ), [y, F] = r.useState(null), U = r.useRef(null), C = r.useRef(/* @__PURE__ */ new Map()), f = r.useMemo(
379
+ ), [y, F] = r.useState(null), P = r.useRef(null), k = r.useRef(/* @__PURE__ */ new Map()), f = r.useMemo(
379
380
  () => [...o, ...t],
380
381
  [o, t]
381
382
  );
382
383
  r.useEffect(() => {
383
384
  v && !f.some((n) => n.id === v) && W(null);
384
385
  }, [f, v]), r.useEffect(() => {
385
- if (!U.current || f.length === 0) return;
386
+ if (!P.current || f.length === 0) return;
386
387
  let n = null;
387
388
  const m = () => {
388
389
  n && clearTimeout(n), n = setTimeout(() => {
389
- const p = U.current;
390
- if (!p || C.current.size < f.length)
390
+ const p = P.current;
391
+ if (!p || k.current.size < f.length)
391
392
  return;
392
393
  const M = p.offsetWidth, D = /* @__PURE__ */ new Map();
393
- f.forEach((P) => {
394
- const ne = C.current.get(P.id);
395
- ne && D.set(P.id, ne.offsetWidth);
394
+ f.forEach((V) => {
395
+ const ne = k.current.get(V.id);
396
+ ne && D.set(V.id, ne.offsetWidth);
396
397
  });
397
- const V = 8, i = 32, z = 52;
398
+ const U = 8, i = 32, z = 52;
398
399
  let q = 0, R = 0, N = !1;
399
- const ie = o.length, ke = t.length > 0, Ce = ie > 0 && ke ? ie : -1;
400
- for (let P = 0; P < f.length; P++) {
401
- const ne = f[P], ce = D.get(ne.id);
402
- if (ce === void 0) continue;
403
- P === Ce && (N = !0, q += i + V);
404
- const re = q + ce + (R > 0 || N ? V : 0);
405
- if ((P < f.length - 1 ? re + V + z : re) > M)
400
+ const ce = o.length, ye = t.length > 0, Be = ce > 0 && ye ? ce : -1;
401
+ for (let V = 0; V < f.length; V++) {
402
+ const ne = f[V], de = D.get(ne.id);
403
+ if (de === void 0) continue;
404
+ V === Be && (N = !0, q += i + U);
405
+ const ae = q + de + (R > 0 || N ? U : 0);
406
+ if ((V < f.length - 1 ? ae + U + z : ae) > M)
406
407
  break;
407
- q = re, R++;
408
+ q = ae, R++;
408
409
  }
409
410
  R === 0 && f.length > 0 && (R = 1), F(R);
410
411
  }, 100);
411
412
  };
412
413
  m();
413
414
  const l = new ResizeObserver(m);
414
- return l.observe(U.current), () => {
415
+ return l.observe(P.current), () => {
415
416
  n && clearTimeout(n), l.disconnect();
416
417
  };
417
418
  }, [f, o.length, t.length]);
@@ -425,7 +426,7 @@ function Ge({
425
426
  l
426
427
  ], D = [
427
428
  p,
428
- ...m.filter((V) => V.id !== v)
429
+ ...m.filter((U) => U.id !== v)
429
430
  ];
430
431
  return { visibleBookmarks: M, overflowBookmarks: D };
431
432
  }
@@ -435,7 +436,7 @@ function Ge({
435
436
  let l = n + m;
436
437
  l < 0 ? l = a.length - 1 : l >= a.length && (l = 0);
437
438
  const p = a[l];
438
- p && C.current.get(p.id)?.focus();
439
+ p && k.current.get(p.id)?.focus();
439
440
  },
440
441
  [a]
441
442
  ), $ = r.useCallback(
@@ -443,13 +444,13 @@ function Ge({
443
444
  x(n);
444
445
  },
445
446
  [x]
446
- ), K = r.useCallback(() => {
447
+ ), H = r.useCallback(() => {
447
448
  const n = a[0];
448
- n && C.current.get(n.id)?.focus();
449
+ n && k.current.get(n.id)?.focus();
449
450
  }, [a]), Q = r.useCallback(() => {
450
451
  const n = a[a.length - 1];
451
- n && C.current.get(n.id)?.focus();
452
- }, [a]), Y = a.length, G = r.useMemo(() => {
452
+ n && k.current.get(n.id)?.focus();
453
+ }, [a]), Y = a.length, K = r.useMemo(() => {
453
454
  for (let n = 0; n < a.length - 1; n++)
454
455
  if (a[n].type === "system" && a[n + 1].type === "user")
455
456
  return n;
@@ -464,23 +465,23 @@ function Ge({
464
465
  W(n.id), x(n), A(!1);
465
466
  },
466
467
  [x, A]
467
- ), H = r.useMemo(() => [...a, ...I], [a, I]), _ = r.useMemo(() => new Set(a.map((n) => n.id)), [a]);
468
+ ), G = r.useMemo(() => [...a, ...I], [a, I]), _ = r.useMemo(() => new Set(a.map((n) => n.id)), [a]);
468
469
  return /* @__PURE__ */ s(
469
470
  "div",
470
471
  {
471
- ref: U,
472
+ ref: P,
472
473
  role: "tablist",
473
474
  "aria-label": c,
474
475
  className: "flex items-center gap-[var(--space-s)]",
475
476
  children: [
476
- H.map((n, m) => {
477
- const l = _.has(n.id), p = l ? a.findIndex((D) => D.id === n.id) : -1, M = l && p === G;
477
+ G.map((n, m) => {
478
+ const l = _.has(n.id), p = l ? a.findIndex((D) => D.id === n.id) : -1, M = l && p === K;
478
479
  return /* @__PURE__ */ s(r.Fragment, { children: [
479
480
  /* @__PURE__ */ e(
480
- he,
481
+ be,
481
482
  {
482
483
  ref: (D) => {
483
- D ? C.current.set(n.id, D) : C.current.delete(n.id);
484
+ D ? k.current.set(n.id, D) : k.current.delete(n.id);
484
485
  },
485
486
  bookmark: n,
486
487
  isActive: u === n.id,
@@ -490,15 +491,15 @@ function Ge({
490
491
  onSelect: l ? Z : $,
491
492
  onRename: g,
492
493
  onDelete: S,
493
- onSetDefault: k,
494
+ onSetDefault: C,
494
495
  onNavigate: j,
495
- onNavigateFirst: K,
496
+ onNavigateFirst: H,
496
497
  onNavigateLast: Q,
497
498
  onHover: b
498
499
  }
499
500
  ),
500
501
  M && /* @__PURE__ */ e(
501
- ue,
502
+ ve,
502
503
  {
503
504
  type: "line",
504
505
  layout: "horizontal",
@@ -508,8 +509,8 @@ function Ge({
508
509
  )
509
510
  ] }, n.id);
510
511
  }),
511
- I.length > 0 && /* @__PURE__ */ s(Oe, { open: d, onOpenChange: A, children: [
512
- /* @__PURE__ */ e(Te, { asChild: !0, children: /* @__PURE__ */ e(
512
+ I.length > 0 && /* @__PURE__ */ s(We, { open: d, onOpenChange: A, children: [
513
+ /* @__PURE__ */ e(Ie, { asChild: !0, children: /* @__PURE__ */ e(
513
514
  "button",
514
515
  {
515
516
  "aria-label": `Show ${I.length} more bookmarks`,
@@ -523,14 +524,14 @@ function Ge({
523
524
  children: /* @__PURE__ */ e(
524
525
  w,
525
526
  {
526
- name: "chevron-down",
527
+ name: pe,
527
528
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)]"
528
529
  }
529
530
  )
530
531
  }
531
532
  ) }),
532
533
  /* @__PURE__ */ e(
533
- Ee,
534
+ Le,
534
535
  {
535
536
  align: "end",
536
537
  side: "bottom",
@@ -554,7 +555,7 @@ function Ge({
554
555
  l && /* @__PURE__ */ e(
555
556
  w,
556
557
  {
557
- name: "bookmark",
558
+ name: re,
558
559
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)]",
559
560
  "aria-hidden": "true"
560
561
  }
@@ -562,12 +563,12 @@ function Ge({
562
563
  !l && /* @__PURE__ */ e("div", { className: "w-[var(--size-2xs)]", "aria-hidden": "true" }),
563
564
  /* @__PURE__ */ s("div", { className: "flex flex-1 items-center gap-[var(--space-xs)]", children: [
564
565
  /* @__PURE__ */ e("span", { className: "truncate", children: n.name }),
565
- (n.count !== void 0 || n.isLoadingCount) && /* @__PURE__ */ e(je, { size: "s", intent: "neutral", appearance: "subtle", children: n.isLoadingCount ? /* @__PURE__ */ e(me, { height: 16, width: 24 }) : n.count })
566
+ (n.count !== void 0 || n.isLoadingCount) && /* @__PURE__ */ e(Je, { size: "s", intent: "neutral", appearance: "subtle", children: n.isLoadingCount ? /* @__PURE__ */ e(ge, { height: 16, width: 24 }) : n.count })
566
567
  ] }),
567
568
  n.isDefault && /* @__PURE__ */ e(
568
569
  w,
569
570
  {
570
- name: "star",
571
+ name: fe,
571
572
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)] text-[var(--color-icon-warning-bold)]",
572
573
  "aria-hidden": "true"
573
574
  }
@@ -575,7 +576,7 @@ function Ge({
575
576
  m && /* @__PURE__ */ e(
576
577
  w,
577
578
  {
578
- name: "check",
579
+ name: Me,
579
580
  className: "h-[var(--size-2xs)] w-[var(--size-2xs)] text-[var(--color-icon-primary)]",
580
581
  "aria-hidden": "true"
581
582
  }
@@ -592,51 +593,51 @@ function Ge({
592
593
  }
593
594
  );
594
595
  }
595
- function pe({ children: t }) {
596
+ function xe({ children: t }) {
596
597
  return /* @__PURE__ */ e(O, { children: t });
597
598
  }
598
- function fe({ children: t }) {
599
+ function we({ children: t }) {
599
600
  return /* @__PURE__ */ e(O, { children: t });
600
601
  }
601
- function ve({ children: t }) {
602
+ function Ce({ children: t }) {
602
603
  return /* @__PURE__ */ e(O, { children: t });
603
604
  }
604
- function ge() {
605
+ function ke() {
605
606
  const { isDirty: t, handleRevert: o } = J();
606
607
  return t ? /* @__PURE__ */ e(T, { variant: "ghost", onClick: o, className: "h-[var(--size-m)]", children: "Revert changes" }) : null;
607
608
  }
608
- function be() {
609
+ function De() {
609
610
  const { isDirty: t, isSystemBookmark: o, openCreateDialog: u } = J();
610
611
  return !t || !o ? null : /* @__PURE__ */ e(T, { variant: "ghost", onClick: u, className: "h-[var(--size-m)]", children: "Create bookmark" });
611
612
  }
612
- function He() {
613
+ function Ze() {
613
614
  const { isDirty: t, isSystemBookmark: o, handleUpdate: u } = J();
614
615
  return !t || o ? null : /* @__PURE__ */ e(T, { variant: "ghost", onClick: u, className: "h-[var(--size-m)]", children: "Update bookmark" });
615
616
  }
616
- function xe() {
617
+ function Ne() {
617
618
  const { isDirty: t, isSystemBookmark: o, handleRevert: u } = J();
618
619
  return !t || !o ? null : /* @__PURE__ */ e(T, { variant: "ghost", onClick: u, className: "h-[var(--size-m)]", children: "Reset" });
619
620
  }
620
- function we() {
621
+ function Se() {
621
622
  const { isDirty: t, isSystemBookmark: o, handleUpdate: u, openCreateDialog: c } = J();
622
623
  return !t || o ? null : /* @__PURE__ */ e(
623
- Ke,
624
+ Xe,
624
625
  {
625
626
  onUpdate: u,
626
627
  onCreate: c
627
628
  }
628
629
  );
629
630
  }
630
- function _e() {
631
+ function en() {
631
632
  const { isDirty: t, isSystemBookmark: o } = J();
632
633
  return t ? /* @__PURE__ */ s(O, { children: [
633
- /* @__PURE__ */ e(ue, { type: "dot", layout: "horizontal" }),
634
+ /* @__PURE__ */ e(ve, { type: "dot", layout: "horizontal" }),
634
635
  o ? /* @__PURE__ */ s(O, { children: [
635
- /* @__PURE__ */ e(xe, {}),
636
- /* @__PURE__ */ e(be, {})
636
+ /* @__PURE__ */ e(Ne, {}),
637
+ /* @__PURE__ */ e(De, {})
637
638
  ] }) : /* @__PURE__ */ s(O, { children: [
638
- /* @__PURE__ */ e(ge, {}),
639
- /* @__PURE__ */ e(we, {})
639
+ /* @__PURE__ */ e(ke, {}),
640
+ /* @__PURE__ */ e(Se, {})
640
641
  ] })
641
642
  ] }) : null;
642
643
  }
@@ -648,7 +649,7 @@ function E({
648
649
  isDirty: x,
649
650
  children: g,
650
651
  "aria-label": S = "Bookmarks",
651
- onSelect: k,
652
+ onSelect: C,
652
653
  onRevert: b,
653
654
  onSave: h,
654
655
  onRename: d,
@@ -658,57 +659,57 @@ function E({
658
659
  onOverflowMenuChange: A,
659
660
  onDialogChange: y
660
661
  }) {
661
- const [F, U] = r.useState(!1), [C, f] = r.useState(!1), [a, I] = r.useState(), j = r.useCallback(
662
+ const [F, P] = r.useState(!1), [k, f] = r.useState(!1), [a, I] = r.useState(), j = r.useCallback(
662
663
  (i) => {
663
664
  f(i), y?.(i ? "create" : null);
664
665
  },
665
666
  [y]
666
667
  ), $ = r.useCallback(
667
668
  (i) => {
668
- U(i), y?.(i ? "rename" : null);
669
+ P(i), y?.(i ? "rename" : null);
669
670
  },
670
671
  [y]
671
- ), K = r.useMemo(
672
+ ), H = r.useMemo(
672
673
  () => [...u, ...o],
673
674
  [u, o]
674
675
  ), Q = r.useMemo(
675
- () => K.find((i) => i.id === c),
676
- [K, c]
677
- ), Y = Q?.type === "system", G = r.useCallback((i) => {
676
+ () => H.find((i) => i.id === c),
677
+ [H, c]
678
+ ), Y = Q?.type === "system", K = r.useCallback((i) => {
678
679
  I(i || c), $(!0);
679
680
  }, [c, $]), Z = r.useCallback(async (i) => {
680
681
  a && await d(a, i);
681
682
  }, [a, d]), ee = r.useCallback(async (i) => {
682
683
  await h("create", i);
683
- }, [h]), H = r.useCallback(async (i) => {
684
+ }, [h]), G = r.useCallback(async (i) => {
684
685
  const z = i || c;
685
686
  z && await B(z);
686
687
  }, [c, B]), _ = r.useCallback(async (i) => {
687
688
  const z = i || c;
688
689
  z && await v(z);
689
690
  }, [c, v]), n = r.useMemo(
690
- () => K.find((i) => i.id === a),
691
- [K, a]
691
+ () => H.find((i) => i.id === a),
692
+ [H, a]
692
693
  ), { contentSlot: m, actionsSlot: l, settingsSlot: p } = r.useMemo(() => {
693
694
  let i = null, z = null, q = null;
694
695
  const R = [];
695
696
  return r.Children.forEach(g, (N) => {
696
- r.isValidElement(N) ? N.type === pe ? i = N.props.children : N.type === fe ? z = N.props.children : N.type === ve ? q = N.props.children : R.push(N) : R.push(N);
697
+ r.isValidElement(N) ? N.type === xe ? i = N.props.children : N.type === we ? z = N.props.children : N.type === Ce ? q = N.props.children : R.push(N) : R.push(N);
697
698
  }), !i && R.length > 0 && (i = R), {
698
699
  contentSlot: i,
699
700
  actionsSlot: z,
700
701
  settingsSlot: q
701
702
  };
702
- }, [g]), M = r.useCallback(() => j(!0), [j]), D = r.useCallback(() => h("update"), [h]), V = r.useMemo(
703
+ }, [g]), M = r.useCallback(() => j(!0), [j]), D = r.useCallback(() => h("update"), [h]), U = r.useMemo(
703
704
  () => ({
704
705
  isDirty: x,
705
706
  isSystemBookmark: Y,
706
707
  activeBookmark: Q,
707
708
  openCreateDialog: M,
708
- openRenameDialog: G,
709
+ openRenameDialog: K,
709
710
  handleRevert: b,
710
711
  handleUpdate: D,
711
- handleDelete: H,
712
+ handleDelete: G,
712
713
  handleSetDefault: _
713
714
  }),
714
715
  [
@@ -716,24 +717,24 @@ function E({
716
717
  Y,
717
718
  Q,
718
719
  M,
719
- G,
720
+ K,
720
721
  b,
721
722
  D,
722
- H,
723
+ G,
723
724
  _
724
725
  ]
725
726
  );
726
- return t === "tabs" ? /* @__PURE__ */ s(ae.Provider, { value: V, children: [
727
+ return t === "tabs" ? /* @__PURE__ */ s(se.Provider, { value: U, children: [
727
728
  /* @__PURE__ */ e(
728
- Ge,
729
+ Ye,
729
730
  {
730
731
  bookmarks: o,
731
732
  systemBookmarks: u,
732
733
  activeBookmarkId: c,
733
734
  "aria-label": S,
734
- onSelect: k,
735
- onRename: G,
736
- onDelete: H,
735
+ onSelect: C,
736
+ onRename: K,
737
+ onDelete: G,
737
738
  onSetDefault: _,
738
739
  onBookmarkHover: W,
739
740
  onOverflowMenuChange: A
@@ -752,7 +753,7 @@ function E({
752
753
  /* @__PURE__ */ e(
753
754
  te,
754
755
  {
755
- open: C,
756
+ open: k,
756
757
  onOpenChange: j,
757
758
  mode: "create",
758
759
  onSave: ee
@@ -768,17 +769,17 @@ function E({
768
769
  onSave: Z
769
770
  }
770
771
  )
771
- ] }) : /* @__PURE__ */ s(ae.Provider, { value: V, children: [
772
+ ] }) : /* @__PURE__ */ s(se.Provider, { value: U, children: [
772
773
  /* @__PURE__ */ s("div", { className: "flex items-center gap-[var(--space-m)]", children: [
773
774
  /* @__PURE__ */ e(
774
- $e,
775
+ Qe,
775
776
  {
776
777
  bookmarks: o,
777
778
  systemBookmarks: u,
778
779
  activeBookmarkId: c,
779
- onSelect: k,
780
- onRename: () => G(),
781
- onDelete: () => H(),
780
+ onSelect: C,
781
+ onRename: () => K(),
782
+ onDelete: () => G(),
782
783
  onSetDefault: () => _()
783
784
  }
784
785
  ),
@@ -791,7 +792,7 @@ function E({
791
792
  /* @__PURE__ */ e(
792
793
  te,
793
794
  {
794
- open: C,
795
+ open: k,
795
796
  onOpenChange: j,
796
797
  mode: "create",
797
798
  onSave: ee
@@ -809,25 +810,25 @@ function E({
809
810
  )
810
811
  ] });
811
812
  }
812
- E.Content = pe;
813
- E.Actions = fe;
814
- E.Settings = ve;
815
- E.DefaultActions = _e;
816
- E.RevertButton = ge;
817
- E.CreateButton = be;
818
- E.SaveButton = He;
819
- E.ResetButton = xe;
820
- E.SaveDropdown = we;
813
+ E.Content = xe;
814
+ E.Actions = we;
815
+ E.Settings = Ce;
816
+ E.DefaultActions = en;
817
+ E.RevertButton = ke;
818
+ E.CreateButton = De;
819
+ E.SaveButton = Ze;
820
+ E.ResetButton = Ne;
821
+ E.SaveDropdown = Se;
821
822
  export {
822
823
  E as Bookmarks,
823
- fe as BookmarksActions,
824
- pe as BookmarksContent,
825
- be as BookmarksCreateButton,
826
- _e as BookmarksDefaultActions,
827
- xe as BookmarksResetButton,
828
- ge as BookmarksRevertButton,
829
- He as BookmarksSaveButton,
830
- we as BookmarksSaveDropdown,
831
- ve as BookmarksSettings,
824
+ we as BookmarksActions,
825
+ xe as BookmarksContent,
826
+ De as BookmarksCreateButton,
827
+ en as BookmarksDefaultActions,
828
+ Ne as BookmarksResetButton,
829
+ ke as BookmarksRevertButton,
830
+ Ze as BookmarksSaveButton,
831
+ Se as BookmarksSaveDropdown,
832
+ Ce as BookmarksSettings,
832
833
  J as useBookmarksActions
833
834
  };