@devalok/shilp-sutra 0.27.2 → 0.29.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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1,9 +1,10 @@
1
1
  "use client";
2
- import { jsx as r, Fragment as v, jsxs as c } from "react/jsx-runtime";
2
+ import { jsx as r, Fragment as k, jsxs as c } from "react/jsx-runtime";
3
3
  import * as u from "react";
4
- import k from "react-markdown";
5
- import w from "remark-gfm";
6
- import { IconCheck as C, IconCopy as S } from "@tabler/icons-react";
4
+ import w from "react-markdown";
5
+ import C from "remark-gfm";
6
+ import { IconCheck as S, IconCopy as z } from "@tabler/icons-react";
7
+ import { Icon as x } from "../ui/icon.js";
7
8
  import { cn as o } from "../ui/lib/utils.js";
8
9
  import { Button as $ } from "../ui/button.js";
9
10
  function g(t) {
@@ -13,11 +14,11 @@ function m(t) {
13
14
  return typeof t == "string" ? t : typeof t == "number" ? String(t) : t ? Array.isArray(t) ? t.map(m).join("") : typeof t == "object" && "props" in t ? m(t.props.children) : "" : "";
14
15
  }
15
16
  function b({ code: t }) {
16
- const [a, d] = u.useState(!1), n = u.useRef();
17
- u.useEffect(() => () => clearTimeout(n.current), []);
18
- function i() {
17
+ const [a, i] = u.useState(!1), l = u.useRef(void 0);
18
+ u.useEffect(() => () => clearTimeout(l.current), []);
19
+ function d() {
19
20
  navigator.clipboard.writeText(t).then(() => {
20
- d(!0), n.current = setTimeout(() => d(!1), 2e3);
21
+ i(!0), l.current = setTimeout(() => i(!1), 2e3);
21
22
  });
22
23
  }
23
24
  return /* @__PURE__ */ r(
@@ -26,37 +27,37 @@ function b({ code: t }) {
26
27
  variant: "ghost",
27
28
  size: "icon-xs",
28
29
  className: "absolute top-ds-02 right-ds-02 opacity-0 group-hover:opacity-100 transition-opacity",
29
- onClick: i,
30
+ onClick: d,
30
31
  "aria-label": a ? "Copied" : "Copy code",
31
- children: a ? /* @__PURE__ */ r(C, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(S, { className: "h-3.5 w-3.5" })
32
+ children: a ? /* @__PURE__ */ r(x, { icon: S, size: "xs" }) : /* @__PURE__ */ r(x, { icon: z, size: "xs" })
32
33
  }
33
34
  );
34
35
  }
35
- function j({ language: t, code: a, mb: d }) {
36
- const [n, i] = u.useState(null);
36
+ function j({ language: t, code: a, mb: i }) {
37
+ const [l, d] = u.useState(null);
37
38
  if (u.useEffect(() => {
38
39
  let f = !1;
39
40
  return Promise.all([
40
41
  import("react-syntax-highlighter"),
41
42
  import("react-syntax-highlighter/dist/esm/styles/prism/one-dark")
42
43
  ]).then(([e, s]) => {
43
- f || i({ Highlighter: e.Prism ?? e.default, style: s.default });
44
+ f || d({ Highlighter: e.Prism ?? e.default, style: s.default });
44
45
  }).catch(() => {
45
46
  }), () => {
46
47
  f = !0;
47
48
  };
48
- }, []), !n)
49
- return /* @__PURE__ */ c("div", { className: o("group relative", d), children: [
49
+ }, []), !l)
50
+ return /* @__PURE__ */ c("div", { className: o("group relative", i), children: [
50
51
  /* @__PURE__ */ r("pre", { className: "bg-surface-sunken rounded-ds-md p-ds-04 overflow-x-auto text-ds-sm font-mono", children: /* @__PURE__ */ r("code", { children: a }) }),
51
52
  /* @__PURE__ */ r(b, { code: a })
52
53
  ] });
53
- const { Highlighter: p, style: l } = n;
54
- return /* @__PURE__ */ c("div", { className: o("group relative", d), children: [
54
+ const { Highlighter: p, style: n } = l;
55
+ return /* @__PURE__ */ c("div", { className: o("group relative", i), children: [
55
56
  /* @__PURE__ */ r(
56
57
  p,
57
58
  {
58
59
  language: t,
59
- style: l,
60
+ style: n,
60
61
  customStyle: {
61
62
  margin: 0,
62
63
  borderRadius: "var(--radius-md)",
@@ -69,66 +70,66 @@ function j({ language: t, code: a, mb: d }) {
69
70
  /* @__PURE__ */ r(b, { code: a })
70
71
  ] });
71
72
  }
72
- function T({
73
+ function q({
73
74
  content: t,
74
75
  compact: a = !1,
75
- allowHtml: d = !1,
76
- linkTarget: n = "_blank",
77
- className: i,
76
+ allowHtml: i = !1,
77
+ linkTarget: l = "_blank",
78
+ className: d,
78
79
  ...p
79
80
  }) {
80
- const l = a ? "mb-ds-02" : "mb-ds-03", f = a ? "mt-ds-03" : "mt-ds-05";
81
- return /* @__PURE__ */ r("div", { className: o("font-sans text-surface-fg", i), ...p, children: /* @__PURE__ */ r(
82
- k,
81
+ const n = a ? "mb-ds-02" : "mb-ds-03", f = a ? "mt-ds-03" : "mt-ds-05";
82
+ return /* @__PURE__ */ r("div", { className: o("font-sans text-surface-fg", d), ...p, children: /* @__PURE__ */ r(
83
+ w,
83
84
  {
84
- remarkPlugins: [w],
85
- skipHtml: !d,
85
+ remarkPlugins: [C],
86
+ skipHtml: !i,
86
87
  components: {
87
88
  h1: ({ children: e }) => {
88
89
  const s = g(m(e));
89
- return /* @__PURE__ */ c("h1", { id: s, className: o("group", a ? "text-ds-md" : "text-ds-lg", "font-semibold text-surface-fg", f, l), children: [
90
+ return /* @__PURE__ */ c("h1", { id: s, className: o("group", a ? "text-ds-md" : "text-ds-lg", "font-semibold text-surface-fg", f, n), children: [
90
91
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
91
92
  e
92
93
  ] });
93
94
  },
94
95
  h2: ({ children: e }) => {
95
96
  const s = g(m(e));
96
- return /* @__PURE__ */ c("h2", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", a ? "mt-ds-03" : "mt-ds-04", l), children: [
97
+ return /* @__PURE__ */ c("h2", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", a ? "mt-ds-03" : "mt-ds-04", n), children: [
97
98
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
98
99
  e
99
100
  ] });
100
101
  },
101
102
  h3: ({ children: e }) => {
102
103
  const s = g(m(e));
103
- return /* @__PURE__ */ c("h3", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", "mt-ds-03", l), children: [
104
+ return /* @__PURE__ */ c("h3", { id: s, className: o("group", "text-ds-md font-semibold text-surface-fg", "mt-ds-03", n), children: [
104
105
  /* @__PURE__ */ r("a", { href: `#${s}`, className: "opacity-0 group-hover:opacity-100 text-surface-fg-subtle mr-ds-02 no-underline", "aria-hidden": "true", children: "#" }),
105
106
  e
106
107
  ] });
107
108
  },
108
- p: ({ children: e }) => /* @__PURE__ */ r("p", { className: o("text-ds-md text-surface-fg leading-ds-relaxed", l), children: e }),
109
+ p: ({ children: e }) => /* @__PURE__ */ r("p", { className: o("text-ds-md text-surface-fg leading-ds-relaxed", n), children: e }),
109
110
  a: ({ href: e, children: s }) => /* @__PURE__ */ r(
110
111
  "a",
111
112
  {
112
113
  href: e,
113
- target: n,
114
- rel: n === "_blank" ? "noopener noreferrer" : void 0,
114
+ target: l,
115
+ rel: l === "_blank" ? "noopener noreferrer" : void 0,
115
116
  className: "text-accent-11 hover:underline",
116
117
  children: s
117
118
  }
118
119
  ),
119
- code: ({ className: e, children: s, ...x }) => {
120
+ code: ({ className: e, children: s, ...y }) => {
120
121
  const h = e ? /language-(\w+)/.exec(e) : null;
121
122
  if (h) {
122
- const y = h[1], N = String(s).replace(/\n$/, "");
123
- return /* @__PURE__ */ r(j, { language: y, code: N, mb: l });
123
+ const N = h[1], v = String(s).replace(/\n$/, "");
124
+ return /* @__PURE__ */ r(j, { language: N, code: v, mb: n });
124
125
  }
125
- return /* @__PURE__ */ r("code", { className: "bg-surface-sunken rounded-ds-sm px-1.5 py-0.5 text-ds-sm font-mono text-surface-fg", ...x, children: s });
126
+ return /* @__PURE__ */ r("code", { className: "bg-surface-sunken rounded-ds-sm px-1.5 py-0.5 text-ds-sm font-mono text-surface-fg", ...y, children: s });
126
127
  },
127
- pre: ({ children: e }) => /* @__PURE__ */ r(v, { children: e }),
128
- blockquote: ({ children: e }) => /* @__PURE__ */ r("blockquote", { className: o("border-l-2 border-surface-border-subtle pl-ds-04 text-surface-fg-muted italic", l), children: e }),
129
- ul: ({ children: e }) => /* @__PURE__ */ r("ul", { className: o("list-disc pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", l), children: e }),
130
- ol: ({ children: e }) => /* @__PURE__ */ r("ol", { className: o("list-decimal pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", l), children: e }),
131
- table: ({ children: e }) => /* @__PURE__ */ r("div", { className: o("overflow-x-auto", l), children: /* @__PURE__ */ r("table", { className: "w-full border-collapse", children: e }) }),
128
+ pre: ({ children: e }) => /* @__PURE__ */ r(k, { children: e }),
129
+ blockquote: ({ children: e }) => /* @__PURE__ */ r("blockquote", { className: o("border-l-2 border-surface-border-subtle pl-ds-04 text-surface-fg-muted italic", n), children: e }),
130
+ ul: ({ children: e }) => /* @__PURE__ */ r("ul", { className: o("list-disc pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", n), children: e }),
131
+ ol: ({ children: e }) => /* @__PURE__ */ r("ol", { className: o("list-decimal pl-ds-06 text-ds-md text-surface-fg space-y-ds-01", n), children: e }),
132
+ table: ({ children: e }) => /* @__PURE__ */ r("div", { className: o("overflow-x-auto", n), children: /* @__PURE__ */ r("table", { className: "w-full border-collapse", children: e }) }),
132
133
  th: ({ children: e }) => /* @__PURE__ */ r("th", { className: "border border-surface-border-subtle px-ds-03 py-ds-02 text-left text-ds-sm font-semibold bg-surface-sunken", children: e }),
133
134
  td: ({ children: e }) => /* @__PURE__ */ r("td", { className: "border border-surface-border-subtle px-ds-03 py-ds-02 text-ds-sm", children: e }),
134
135
  hr: () => /* @__PURE__ */ r("hr", { className: o("border-surface-border-subtle", a ? "my-ds-03" : "my-ds-04") }),
@@ -139,5 +140,5 @@ function T({
139
140
  ) });
140
141
  }
141
142
  export {
142
- T as MarkdownViewer
143
+ q as MarkdownViewer
143
144
  };
@@ -1 +1 @@
1
- {"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../src/composed/master-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAC/B,kEAAkE;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE/E,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjF,UAAU,yBAA0B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAgDD,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,kDA+BjF;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,kDA4BrF;AAED,iBAAS,oBAAoB,CAAC,EAAE,MAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,2CAmBzG;AAMD,iBAAS,gBAAgB,CAAC,EACxB,QAAe,EACf,MAAM,EACN,WAAqB,EACrB,UAAiB,EACjB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAqBnB;AAED,QAAA,MAAM,YAAY;;;;CAIhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
1
+ {"version":3,"file":"master-detail.d.ts","sourceRoot":"","sources":["../../src/composed/master-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAY9B,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gFAAgF;IAChF,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,gDAAgD;IAChD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAA;IACnB,qDAAqD;IACrD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,kEAAkE;IAClE,UAAU,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;IAC/B,kEAAkE;IAClE,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,0EAA0E;IAC1E,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,IAAI,GAAG,MAAM,KAAK,IAAI,CAAA;CAChD;AAED,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE/E,UAAU,uBAAwB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAEjF,UAAU,yBAA0B,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACvF,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAgDD,iBAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,kDA+BjF;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,kDA4BrF;AAED,iBAAS,oBAAoB,CAAC,EAAE,MAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,2CAmBzG;AAMD,iBAAS,gBAAgB,CAAC,EACxB,QAAe,EACf,MAAM,EACN,WAAqB,EACrB,UAAiB,EACjB,UAAU,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,iBAAiB,2CAqBnB;AAED,QAAA,MAAM,YAAY;;;;CAIhB,CAAA;AAEF,OAAO,EAAE,YAAY,EAAE,CAAA;AACvB,YAAY,EAAE,yBAAyB,EAAE,CAAA"}
@@ -3,33 +3,34 @@ import { jsx as i, jsxs as x } from "react/jsx-runtime";
3
3
  import * as c from "react";
4
4
  import { IconArrowLeft as b } from "@tabler/icons-react";
5
5
  import { cn as d } from "../ui/lib/utils.js";
6
- import { Button as h } from "../ui/button.js";
7
- import { springs as v } from "../ui/lib/motion.js";
8
- import { A as w, m as y } from "../_chunks/framer.js";
9
- const D = {
6
+ import { Button as v } from "../ui/button.js";
7
+ import { Icon as h } from "../ui/icon.js";
8
+ import { springs as y } from "../ui/lib/motion.js";
9
+ import { A as w, m as D } from "../_chunks/framer.js";
10
+ const M = {
10
11
  sm: "640px",
11
12
  md: "768px",
12
13
  lg: "1024px"
13
14
  };
14
- function M(e) {
15
- const [n, s] = c.useState(!1);
15
+ function g(e) {
16
+ const [n, r] = c.useState(!1);
16
17
  return c.useEffect(() => {
17
18
  if (typeof window > "u") return;
18
19
  const t = window.matchMedia(e);
19
- s(t.matches);
20
- const o = (r) => s(r.matches);
20
+ r(t.matches);
21
+ const o = (s) => r(s.matches);
21
22
  return t.addEventListener("change", o), () => t.removeEventListener("change", o);
22
23
  }, [e]), n;
23
24
  }
24
- const m = c.createContext({
25
+ const u = c.createContext({
25
26
  selected: null,
26
27
  isMobile: !1
27
28
  });
28
- function g({ children: e, className: n, ...s }) {
29
- const { selected: t, isMobile: o, onNavigate: r } = c.useContext(m);
29
+ function L({ children: e, className: n, ...r }) {
30
+ const { selected: t, isMobile: o, onNavigate: s } = c.useContext(u);
30
31
  if (o && t) return null;
31
32
  function l(a) {
32
- a.key === "ArrowDown" ? (a.preventDefault(), r == null || r("down")) : a.key === "ArrowUp" && (a.preventDefault(), r == null || r("up"));
33
+ a.key === "ArrowDown" ? (a.preventDefault(), s?.("down")) : a.key === "ArrowUp" && (a.preventDefault(), s?.("up"));
33
34
  }
34
35
  return /* @__PURE__ */ i(
35
36
  "div",
@@ -42,29 +43,29 @@ function g({ children: e, className: n, ...s }) {
42
43
  n
43
44
  ),
44
45
  onKeyDown: l,
45
- ...s,
46
+ ...r,
46
47
  children: e
47
48
  }
48
49
  );
49
50
  }
50
- function L({ children: e, className: n, ...s }) {
51
- const { selected: t, isMobile: o, onBack: r, emptyState: l } = c.useContext(m);
52
- return o && !t ? null : /* @__PURE__ */ x("div", { className: d("flex-1 overflow-y-auto", n), ...s, children: [
53
- o && r && /* @__PURE__ */ i("div", { className: "border-b border-surface-border px-ds-04 py-ds-03", children: /* @__PURE__ */ i(h, { variant: "ghost", size: "xs", onClick: r, startIcon: /* @__PURE__ */ i(b, { className: "h-ico-sm w-ico-sm" }), children: "Back" }) }),
51
+ function k({ children: e, className: n, ...r }) {
52
+ const { selected: t, isMobile: o, onBack: s, emptyState: l } = c.useContext(u);
53
+ return o && !t ? null : /* @__PURE__ */ x("div", { className: d("flex-1 overflow-y-auto", n), ...r, children: [
54
+ o && s && /* @__PURE__ */ i("div", { className: "border-b border-surface-border px-ds-04 py-ds-03", children: /* @__PURE__ */ i(v, { variant: "ghost", size: "xs", onClick: s, startIcon: /* @__PURE__ */ i(h, { icon: b }), children: "Back" }) }),
54
55
  /* @__PURE__ */ i(w, { mode: "wait", children: /* @__PURE__ */ i(
55
- y.div,
56
+ D.div,
56
57
  {
57
58
  initial: o ? { x: 20, opacity: 0 } : !1,
58
59
  animate: { x: 0, opacity: 1 },
59
60
  exit: o ? { x: -20, opacity: 0 } : void 0,
60
- transition: v.snappy,
61
+ transition: y.snappy,
61
62
  children: t ? e : l ?? e
62
63
  },
63
64
  t ?? "empty"
64
65
  ) })
65
66
  ] });
66
67
  }
67
- function k({ active: e = !1, children: n, className: s, ...t }) {
68
+ function C({ active: e = !1, children: n, className: r, ...t }) {
68
69
  return /* @__PURE__ */ i(
69
70
  "button",
70
71
  {
@@ -77,27 +78,27 @@ function k({ active: e = !1, children: n, className: s, ...t }) {
77
78
  "transition-colors duration-fast-01 ease-productive-standard",
78
79
  "hover:bg-surface-raised-hover",
79
80
  e && "bg-accent-2 text-accent-11 border-l-2 border-accent-9",
80
- s
81
+ r
81
82
  ),
82
83
  ...t,
83
84
  children: n
84
85
  }
85
86
  );
86
87
  }
87
- function C({
88
+ function I({
88
89
  selected: e = null,
89
90
  onBack: n,
90
- masterWidth: s = "280px",
91
+ masterWidth: r = "280px",
91
92
  breakpoint: t = "md",
92
93
  emptyState: o,
93
- onNavigate: r,
94
+ onNavigate: s,
94
95
  children: l,
95
96
  className: a,
96
- style: u,
97
+ style: m,
97
98
  ...p
98
99
  }) {
99
- const f = M(`(max-width: ${D[t]})`);
100
- return /* @__PURE__ */ i(m.Provider, { value: { selected: e, isMobile: f, onBack: n, emptyState: o, onNavigate: r }, children: /* @__PURE__ */ i(
100
+ const f = g(`(max-width: ${M[t]})`);
101
+ return /* @__PURE__ */ i(u.Provider, { value: { selected: e, isMobile: f, onBack: n, emptyState: o, onNavigate: s }, children: /* @__PURE__ */ i(
101
102
  "div",
102
103
  {
103
104
  className: d(
@@ -106,19 +107,19 @@ function C({
106
107
  a
107
108
  ),
108
109
  style: {
109
- ...u,
110
- ...f ? {} : { gridTemplateColumns: `${s} 1fr` }
110
+ ...m,
111
+ ...f ? {} : { gridTemplateColumns: `${r} 1fr` }
111
112
  },
112
113
  ...p,
113
114
  children: l
114
115
  }
115
116
  ) });
116
117
  }
117
- const K = Object.assign(C, {
118
- List: g,
119
- Detail: L,
120
- ListItem: k
118
+ const R = Object.assign(I, {
119
+ List: L,
120
+ Detail: k,
121
+ ListItem: C
121
122
  });
122
123
  export {
123
- K as MasterDetail
124
+ R as MasterDetail
124
125
  };
@@ -1 +1 @@
1
- {"version":3,"file":"multi-select-popover.d.ts","sourceRoot":"","sources":["../../src/composed/multi-select-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAgB9B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACtG,8DAA8D;IAC9D,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;IACzB,yCAAyC;IACzC,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC3B,kCAAkC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,oCAAoC;IACpC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACtC,2BAA2B;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IACxD,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAA;IAC1E,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,sBAAsB;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAMD,QAAA,MAAM,kBAAkB,gGA6OvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"multi-select-popover.d.ts","sourceRoot":"","sources":["../../src/composed/multi-select-popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAiB9B,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,eAAe,EAAE,CAAA;CACzB;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IACtG,8DAA8D;IAC9D,KAAK,CAAC,EAAE,eAAe,EAAE,CAAA;IACzB,yCAAyC;IACzC,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAA;IAC3B,kCAAkC;IAClC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,oCAAoC;IACpC,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACtC,2BAA2B;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,+DAA+D;IAC/D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,eAAe,EAAE,CAAC,CAAA;IACxD,mDAAmD;IACnD,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,eAAe,EAAE,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAA;IAC1E,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,yCAAyC;IACzC,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;IAClC,oBAAoB;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACvB,sBAAsB;IACtB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAMD,QAAA,MAAM,kBAAkB,gGA6OvB,CAAA;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,106 +1,106 @@
1
1
  "use client";
2
- import { jsxs as l, jsx as n, Fragment as H } from "react/jsx-runtime";
2
+ import { jsxs as l, jsx as n, Fragment as J } from "react/jsx-runtime";
3
3
  import * as r from "react";
4
4
  import { cn as L } from "../ui/lib/utils.js";
5
- import { Popover as J, PopoverTrigger as Q, PopoverContent as W } from "../ui/popover.js";
6
- import { IconSearch as X, IconCheck as Y } from "@tabler/icons-react";
7
- import { springs as P } from "../ui/lib/motion.js";
8
- import { Spinner as Z } from "../ui/spinner.js";
9
- import { m as A } from "../_chunks/framer.js";
10
- const _ = r.forwardRef(
5
+ import { Popover as Q, PopoverTrigger as W, PopoverContent as X } from "../ui/popover.js";
6
+ import { IconSearch as Y, IconCheck as Z } from "@tabler/icons-react";
7
+ import { Icon as P } from "../ui/icon.js";
8
+ import { springs as A } from "../ui/lib/motion.js";
9
+ import { Spinner as _ } from "../ui/spinner.js";
10
+ import { m as T } from "../_chunks/framer.js";
11
+ const V = r.forwardRef(
11
12
  ({
12
13
  items: w,
13
- groups: o,
14
+ groups: c,
14
15
  value: d,
15
16
  onValueChange: h,
16
- searchPlaceholder: T = "Search...",
17
- onSearch: c,
17
+ searchPlaceholder: j = "Search...",
18
+ onSearch: o,
18
19
  searchDebounce: v = 300,
19
20
  renderItem: N,
20
- emptyMessage: j = "No results found",
21
+ emptyMessage: q = "No results found",
21
22
  maxSelections: k,
22
- align: q = "start",
23
+ align: z = "start",
23
24
  width: F,
24
25
  children: O,
25
26
  className: K,
26
27
  ...$
27
- }, z) => {
28
- const [f, G] = r.useState(!1), [i, S] = r.useState(""), [u, m] = r.useState(null), [C, y] = r.useState(!1), [a, p] = r.useState(-1), g = r.useRef(), I = r.useRef(null);
28
+ }, G) => {
29
+ const [f, U] = r.useState(!1), [i, I] = r.useState(""), [u, m] = r.useState(null), [S, y] = r.useState(!1), [a, p] = r.useState(-1), g = r.useRef(void 0), C = r.useRef(null);
29
30
  r.useEffect(() => {
30
- f || (S(""), m(null), p(-1));
31
+ f || (I(""), m(null), p(-1));
31
32
  }, [f]), r.useEffect(() => {
32
- if (!(!c || !f)) {
33
+ if (!(!o || !f)) {
33
34
  if (!i.trim()) {
34
35
  m(null), y(!1);
35
36
  return;
36
37
  }
37
38
  return y(!0), clearTimeout(g.current), g.current = setTimeout(() => {
38
- c(i).then((e) => m(e)).catch(() => m([])).finally(() => y(!1));
39
+ o(i).then((e) => m(e)).catch(() => m([])).finally(() => y(!1));
39
40
  }, v), () => clearTimeout(g.current);
40
41
  }
41
- }, [i, c, v, f]);
42
- const b = r.useMemo(() => u || (o ? o.flatMap((e) => e.items) : w ?? []), [w, o, u]), x = r.useMemo(() => {
43
- if (c) return b;
42
+ }, [i, o, v, f]);
43
+ const b = r.useMemo(() => u || (c ? c.flatMap((e) => e.items) : w ?? []), [w, c, u]), x = r.useMemo(() => {
44
+ if (o) return b;
44
45
  const e = i.toLowerCase();
45
- return e ? b.filter((s) => s.label.toLowerCase().includes(e)) : b;
46
- }, [b, i, c]), R = r.useMemo(() => {
47
- if (!o || c || u) return null;
46
+ return e ? b.filter((t) => t.label.toLowerCase().includes(e)) : b;
47
+ }, [b, i, o]), R = r.useMemo(() => {
48
+ if (!c || o || u) return null;
48
49
  const e = i.toLowerCase();
49
- return o.map((s) => ({
50
- ...s,
51
- items: e ? s.items.filter((t) => t.label.toLowerCase().includes(e)) : s.items
52
- })).filter((s) => s.items.length > 0);
53
- }, [o, i, c, u]);
50
+ return c.map((t) => ({
51
+ ...t,
52
+ items: e ? t.items.filter((s) => s.label.toLowerCase().includes(e)) : t.items
53
+ })).filter((t) => t.items.length > 0);
54
+ }, [c, i, o, u]);
54
55
  function M(e) {
55
- d.includes(e) ? h(d.filter((t) => t !== e)) : k && d.length >= k ? h([...d.slice(1), e]) : h([...d, e]);
56
+ d.includes(e) ? h(d.filter((s) => s !== e)) : k && d.length >= k ? h([...d.slice(1), e]) : h([...d, e]);
56
57
  }
57
58
  r.useEffect(() => {
58
59
  p(-1);
59
60
  }, [i]), r.useEffect(() => {
60
- var t;
61
61
  if (a < 0) return;
62
- const e = I.current;
62
+ const e = C.current;
63
63
  if (!e) return;
64
- (t = e.querySelectorAll("[data-multiselect-item]")[a]) == null || t.scrollIntoView({ block: "nearest" });
64
+ e.querySelectorAll("[data-multiselect-item]")[a]?.scrollIntoView({ block: "nearest" });
65
65
  }, [a]);
66
- function U(e) {
67
- const s = x.length;
68
- if (s !== 0) {
66
+ function B(e) {
67
+ const t = x.length;
68
+ if (t !== 0) {
69
69
  if (e.key === "ArrowDown")
70
- e.preventDefault(), p((t) => t < s - 1 ? t + 1 : 0);
70
+ e.preventDefault(), p((s) => s < t - 1 ? s + 1 : 0);
71
71
  else if (e.key === "ArrowUp")
72
- e.preventDefault(), p((t) => t <= 0 ? s - 1 : t - 1);
72
+ e.preventDefault(), p((s) => s <= 0 ? t - 1 : s - 1);
73
73
  else if (e.key === "Enter" && a >= 0) {
74
74
  e.preventDefault();
75
- const t = x[a];
76
- t && !t.disabled && M(t.id);
75
+ const s = x[a];
76
+ s && !s.disabled && M(s.id);
77
77
  }
78
78
  }
79
79
  }
80
- let B = 0;
80
+ let H = 0;
81
81
  function D(e) {
82
- const s = d.includes(e.id), t = B++, E = t === a;
82
+ const t = d.includes(e.id), s = H++, E = s === a;
83
83
  return /* @__PURE__ */ l(
84
- A.button,
84
+ T.button,
85
85
  {
86
- id: `msp-item-${t}`,
86
+ id: `msp-item-${s}`,
87
87
  type: "button",
88
88
  disabled: e.disabled,
89
89
  "data-multiselect-item": "",
90
90
  "data-focused": E ? "" : void 0,
91
91
  initial: { opacity: 0, x: -8 },
92
92
  animate: { opacity: 1, x: 0 },
93
- transition: { ...P.snappy, delay: t * 0.02 },
93
+ transition: { ...A.snappy, delay: s * 0.02 },
94
94
  onClick: () => M(e.id),
95
95
  className: L(
96
96
  "flex w-full items-center gap-ds-03 px-ds-04 py-ds-02b text-left transition-colors duration-fast-01 ease-productive-standard",
97
97
  "hover:bg-surface-raised-hover",
98
98
  "disabled:opacity-action-disabled disabled:cursor-not-allowed",
99
- s && "bg-accent-2 text-accent-11",
99
+ t && "bg-accent-2 text-accent-11",
100
100
  E && "bg-surface-raised-hover"
101
101
  ),
102
102
  children: [
103
- N ? /* @__PURE__ */ n("span", { className: "flex-1 min-w-0", children: N(e, s) }) : /* @__PURE__ */ l(H, { children: [
103
+ N ? /* @__PURE__ */ n("span", { className: "flex-1 min-w-0", children: N(e, t) }) : /* @__PURE__ */ l(J, { children: [
104
104
  e.image && /* @__PURE__ */ n(
105
105
  "img",
106
106
  {
@@ -114,14 +114,14 @@ const _ = r.forwardRef(
114
114
  e.description && /* @__PURE__ */ n("span", { className: "block truncate text-ds-xs text-surface-fg-subtle", children: e.description })
115
115
  ] })
116
116
  ] }),
117
- s && /* @__PURE__ */ n(
118
- A.span,
117
+ t && /* @__PURE__ */ n(
118
+ T.span,
119
119
  {
120
120
  initial: { scale: 0 },
121
121
  animate: { scale: 1 },
122
- transition: P.bouncy,
122
+ transition: A.bouncy,
123
123
  className: "inline-flex shrink-0",
124
- children: /* @__PURE__ */ n(Y, { className: "h-ico-sm w-ico-sm text-accent-11" })
124
+ children: /* @__PURE__ */ n(P, { icon: Z, size: "sm", className: "text-accent-11" })
125
125
  }
126
126
  )
127
127
  ]
@@ -129,44 +129,44 @@ const _ = r.forwardRef(
129
129
  e.id
130
130
  );
131
131
  }
132
- return /* @__PURE__ */ l(J, { open: f, onOpenChange: G, children: [
133
- /* @__PURE__ */ n(Q, { asChild: !0, children: O }),
132
+ return /* @__PURE__ */ l(Q, { open: f, onOpenChange: U, modal: !1, children: [
133
+ /* @__PURE__ */ n(W, { asChild: !0, children: O }),
134
134
  /* @__PURE__ */ l(
135
- W,
135
+ X,
136
136
  {
137
- ref: z,
137
+ ref: G,
138
138
  ...$,
139
139
  className: L(
140
140
  "border-surface-border-strong bg-surface-overlay p-0",
141
141
  K
142
142
  ),
143
143
  style: { width: F ?? 240 },
144
- align: q,
144
+ align: z,
145
145
  sideOffset: 4,
146
146
  children: [
147
147
  /* @__PURE__ */ l("div", { className: "flex items-center gap-ds-03 border-b border-surface-border-strong px-ds-04 py-ds-03", children: [
148
- /* @__PURE__ */ n(X, { className: "h-ico-sm w-ico-sm shrink-0 text-surface-fg-subtle", stroke: 1.5 }),
148
+ /* @__PURE__ */ n(P, { icon: Y, size: "sm", stroke: "light", className: "shrink-0 text-surface-fg-subtle" }),
149
149
  /* @__PURE__ */ n(
150
150
  "input",
151
151
  {
152
152
  type: "text",
153
- placeholder: T,
153
+ placeholder: j,
154
154
  value: i,
155
- onChange: (e) => S(e.target.value),
156
- onKeyDown: U,
155
+ onChange: (e) => I(e.target.value),
156
+ onKeyDown: B,
157
157
  "aria-label": "Search",
158
158
  "aria-activedescendant": a >= 0 ? `msp-item-${a}` : void 0,
159
159
  className: "w-full bg-transparent text-ds-md font-body text-surface-fg placeholder:text-surface-fg-subtle outline-none"
160
160
  }
161
161
  ),
162
- C && /* @__PURE__ */ n(Z, { size: "sm" })
162
+ S && /* @__PURE__ */ n(_, { size: "sm" })
163
163
  ] }),
164
- /* @__PURE__ */ l("div", { ref: I, className: "max-h-[240px] overflow-y-auto py-ds-02", children: [
164
+ /* @__PURE__ */ l("div", { ref: C, className: "max-h-[240px] overflow-y-auto py-ds-02", children: [
165
165
  R ? R.map((e) => /* @__PURE__ */ l("div", { children: [
166
166
  /* @__PURE__ */ n("div", { className: "px-ds-04 py-ds-02 text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: e.label }),
167
167
  e.items.map(D)
168
168
  ] }, e.label)) : x.map(D),
169
- !C && x.length === 0 && /* @__PURE__ */ n("p", { className: "px-ds-04 py-ds-05 text-center text-ds-sm font-body text-surface-fg-subtle", children: j })
169
+ !S && x.length === 0 && /* @__PURE__ */ n("p", { className: "px-ds-04 py-ds-05 text-center text-ds-sm font-body text-surface-fg-subtle", children: q })
170
170
  ] })
171
171
  ]
172
172
  }
@@ -174,7 +174,7 @@ const _ = r.forwardRef(
174
174
  ] });
175
175
  }
176
176
  );
177
- _.displayName = "MultiSelectPopover";
177
+ V.displayName = "MultiSelectPopover";
178
178
  export {
179
- _ as MultiSelectPopover
179
+ V as MultiSelectPopover
180
180
  };
@@ -1 +1 @@
1
- {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFA+Ef,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
1
+ {"version":3,"file":"page-header.d.ts","sourceRoot":"","sources":["../../src/composed/page-header.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,eAAgB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,WAAW,CAAC,EAAE,UAAU,EAAE,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,QAAA,MAAM,UAAU,wFA4Ef,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}