@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.
- package/dist/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +977 -814
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +64 -64
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.d.ts +19 -5
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +371 -79
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +30 -30
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/radio.js +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +40 -26
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.js +41 -41
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/color-input.md +58 -4
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +724 -44
- package/llms.txt +38 -19
- package/package.json +8 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, Fragment as
|
|
2
|
+
import { jsx as r, Fragment as k, jsxs as c } from "react/jsx-runtime";
|
|
3
3
|
import * as u from "react";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { IconCheck as
|
|
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,
|
|
17
|
-
u.useEffect(() => () => clearTimeout(
|
|
18
|
-
function
|
|
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
|
-
|
|
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:
|
|
30
|
+
onClick: d,
|
|
30
31
|
"aria-label": a ? "Copied" : "Copy code",
|
|
31
|
-
children: a ? /* @__PURE__ */ r(
|
|
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:
|
|
36
|
-
const [
|
|
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 ||
|
|
44
|
+
f || d({ Highlighter: e.Prism ?? e.default, style: s.default });
|
|
44
45
|
}).catch(() => {
|
|
45
46
|
}), () => {
|
|
46
47
|
f = !0;
|
|
47
48
|
};
|
|
48
|
-
}, []), !
|
|
49
|
-
return /* @__PURE__ */ c("div", { className: o("group relative",
|
|
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:
|
|
54
|
-
return /* @__PURE__ */ c("div", { className: o("group relative",
|
|
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:
|
|
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
|
|
73
|
+
function q({
|
|
73
74
|
content: t,
|
|
74
75
|
compact: a = !1,
|
|
75
|
-
allowHtml:
|
|
76
|
-
linkTarget:
|
|
77
|
-
className:
|
|
76
|
+
allowHtml: i = !1,
|
|
77
|
+
linkTarget: l = "_blank",
|
|
78
|
+
className: d,
|
|
78
79
|
...p
|
|
79
80
|
}) {
|
|
80
|
-
const
|
|
81
|
-
return /* @__PURE__ */ r("div", { className: o("font-sans text-surface-fg",
|
|
82
|
-
|
|
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: [
|
|
85
|
-
skipHtml: !
|
|
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,
|
|
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",
|
|
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",
|
|
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",
|
|
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:
|
|
114
|
-
rel:
|
|
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, ...
|
|
120
|
+
code: ({ className: e, children: s, ...y }) => {
|
|
120
121
|
const h = e ? /language-(\w+)/.exec(e) : null;
|
|
121
122
|
if (h) {
|
|
122
|
-
const
|
|
123
|
-
return /* @__PURE__ */ r(j, { language:
|
|
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", ...
|
|
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(
|
|
128
|
-
blockquote: ({ children: e }) => /* @__PURE__ */ r("blockquote", { className: o("border-l-2 border-surface-border-subtle pl-ds-04 text-surface-fg-muted italic",
|
|
129
|
-
ul: ({ children: e }) => /* @__PURE__ */ r("ul", { className: o("list-disc pl-ds-06 text-ds-md text-surface-fg space-y-ds-01",
|
|
130
|
-
ol: ({ children: e }) => /* @__PURE__ */ r("ol", { className: o("list-decimal pl-ds-06 text-ds-md text-surface-fg space-y-ds-01",
|
|
131
|
-
table: ({ children: e }) => /* @__PURE__ */ r("div", { className: o("overflow-x-auto",
|
|
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
|
-
|
|
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;
|
|
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
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
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
|
|
15
|
-
const [n,
|
|
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
|
-
|
|
20
|
-
const o = (
|
|
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
|
|
25
|
+
const u = c.createContext({
|
|
25
26
|
selected: null,
|
|
26
27
|
isMobile: !1
|
|
27
28
|
});
|
|
28
|
-
function
|
|
29
|
-
const { selected: t, isMobile: o, onNavigate:
|
|
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(),
|
|
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
|
-
...
|
|
46
|
+
...r,
|
|
46
47
|
children: e
|
|
47
48
|
}
|
|
48
49
|
);
|
|
49
50
|
}
|
|
50
|
-
function
|
|
51
|
-
const { selected: t, isMobile: o, onBack:
|
|
52
|
-
return o && !t ? null : /* @__PURE__ */ x("div", { className: d("flex-1 overflow-y-auto", n), ...
|
|
53
|
-
o &&
|
|
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
|
-
|
|
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:
|
|
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
|
|
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
|
-
|
|
81
|
+
r
|
|
81
82
|
),
|
|
82
83
|
...t,
|
|
83
84
|
children: n
|
|
84
85
|
}
|
|
85
86
|
);
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
+
function I({
|
|
88
89
|
selected: e = null,
|
|
89
90
|
onBack: n,
|
|
90
|
-
masterWidth:
|
|
91
|
+
masterWidth: r = "280px",
|
|
91
92
|
breakpoint: t = "md",
|
|
92
93
|
emptyState: o,
|
|
93
|
-
onNavigate:
|
|
94
|
+
onNavigate: s,
|
|
94
95
|
children: l,
|
|
95
96
|
className: a,
|
|
96
|
-
style:
|
|
97
|
+
style: m,
|
|
97
98
|
...p
|
|
98
99
|
}) {
|
|
99
|
-
const f =
|
|
100
|
-
return /* @__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
|
-
...
|
|
110
|
-
...f ? {} : { gridTemplateColumns: `${
|
|
110
|
+
...m,
|
|
111
|
+
...f ? {} : { gridTemplateColumns: `${r} 1fr` }
|
|
111
112
|
},
|
|
112
113
|
...p,
|
|
113
114
|
children: l
|
|
114
115
|
}
|
|
115
116
|
) });
|
|
116
117
|
}
|
|
117
|
-
const
|
|
118
|
-
List:
|
|
119
|
-
Detail:
|
|
120
|
-
ListItem:
|
|
118
|
+
const R = Object.assign(I, {
|
|
119
|
+
List: L,
|
|
120
|
+
Detail: k,
|
|
121
|
+
ListItem: C
|
|
121
122
|
});
|
|
122
123
|
export {
|
|
123
|
-
|
|
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;
|
|
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
|
|
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
|
|
6
|
-
import { IconSearch as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
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:
|
|
14
|
+
groups: c,
|
|
14
15
|
value: d,
|
|
15
16
|
onValueChange: h,
|
|
16
|
-
searchPlaceholder:
|
|
17
|
-
onSearch:
|
|
17
|
+
searchPlaceholder: j = "Search...",
|
|
18
|
+
onSearch: o,
|
|
18
19
|
searchDebounce: v = 300,
|
|
19
20
|
renderItem: N,
|
|
20
|
-
emptyMessage:
|
|
21
|
+
emptyMessage: q = "No results found",
|
|
21
22
|
maxSelections: k,
|
|
22
|
-
align:
|
|
23
|
+
align: z = "start",
|
|
23
24
|
width: F,
|
|
24
25
|
children: O,
|
|
25
26
|
className: K,
|
|
26
27
|
...$
|
|
27
|
-
},
|
|
28
|
-
const [f,
|
|
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 || (
|
|
31
|
+
f || (I(""), m(null), p(-1));
|
|
31
32
|
}, [f]), r.useEffect(() => {
|
|
32
|
-
if (!(!
|
|
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
|
-
|
|
39
|
+
o(i).then((e) => m(e)).catch(() => m([])).finally(() => y(!1));
|
|
39
40
|
}, v), () => clearTimeout(g.current);
|
|
40
41
|
}
|
|
41
|
-
}, [i,
|
|
42
|
-
const b = r.useMemo(() => u || (
|
|
43
|
-
if (
|
|
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((
|
|
46
|
-
}, [b, i,
|
|
47
|
-
if (!
|
|
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
|
|
50
|
-
...
|
|
51
|
-
items: e ?
|
|
52
|
-
})).filter((
|
|
53
|
-
}, [
|
|
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((
|
|
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 =
|
|
62
|
+
const e = C.current;
|
|
63
63
|
if (!e) return;
|
|
64
|
-
|
|
64
|
+
e.querySelectorAll("[data-multiselect-item]")[a]?.scrollIntoView({ block: "nearest" });
|
|
65
65
|
}, [a]);
|
|
66
|
-
function
|
|
67
|
-
const
|
|
68
|
-
if (
|
|
66
|
+
function B(e) {
|
|
67
|
+
const t = x.length;
|
|
68
|
+
if (t !== 0) {
|
|
69
69
|
if (e.key === "ArrowDown")
|
|
70
|
-
e.preventDefault(), p((
|
|
70
|
+
e.preventDefault(), p((s) => s < t - 1 ? s + 1 : 0);
|
|
71
71
|
else if (e.key === "ArrowUp")
|
|
72
|
-
e.preventDefault(), p((
|
|
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
|
|
76
|
-
|
|
75
|
+
const s = x[a];
|
|
76
|
+
s && !s.disabled && M(s.id);
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
let
|
|
80
|
+
let H = 0;
|
|
81
81
|
function D(e) {
|
|
82
|
-
const
|
|
82
|
+
const t = d.includes(e.id), s = H++, E = s === a;
|
|
83
83
|
return /* @__PURE__ */ l(
|
|
84
|
-
|
|
84
|
+
T.button,
|
|
85
85
|
{
|
|
86
|
-
id: `msp-item-${
|
|
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: { ...
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
118
|
-
|
|
117
|
+
t && /* @__PURE__ */ n(
|
|
118
|
+
T.span,
|
|
119
119
|
{
|
|
120
120
|
initial: { scale: 0 },
|
|
121
121
|
animate: { scale: 1 },
|
|
122
|
-
transition:
|
|
122
|
+
transition: A.bouncy,
|
|
123
123
|
className: "inline-flex shrink-0",
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
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(
|
|
133
|
-
/* @__PURE__ */ n(
|
|
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
|
-
|
|
135
|
+
X,
|
|
136
136
|
{
|
|
137
|
-
ref:
|
|
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:
|
|
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(
|
|
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:
|
|
153
|
+
placeholder: j,
|
|
154
154
|
value: i,
|
|
155
|
-
onChange: (e) =>
|
|
156
|
-
onKeyDown:
|
|
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
|
-
|
|
162
|
+
S && /* @__PURE__ */ n(_, { size: "sm" })
|
|
163
163
|
] }),
|
|
164
|
-
/* @__PURE__ */ l("div", { ref:
|
|
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
|
-
!
|
|
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
|
-
|
|
177
|
+
V.displayName = "MultiSelectPopover";
|
|
178
178
|
export {
|
|
179
|
-
|
|
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;
|
|
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"}
|