@devalok/shilp-sutra-karm 0.20.2 → 0.21.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/chat-panel.js +51 -51
- package/dist/_chunks/kanban-board.js +40 -39
- package/dist/_chunks/markdown-components.js +15 -15
- package/dist/_chunks/project-card.js +25 -25
- package/dist/_chunks/render-adjustment-type.js +190 -190
- package/dist/_chunks/sidebar-scratchpad.js +225 -224
- package/dist/_chunks/task-detail-panel.js +362 -350
- package/dist/_chunks/vendor-dnd.js +3353 -0
- package/dist/_chunks/vendor-markdown.js +4939 -0
- package/dist/_chunks/vendor-utils.js +3264 -0
- package/dist/dashboard/index.js +80 -80
- package/dist/index.js +8 -8
- package/dist/tasks/index.js +205 -205
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/_chunks/vendor.js +0 -11522
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as e, jsxs as
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
3
|
import * as w from "react";
|
|
4
|
-
import { useState as C, useMemo as j, useContext as
|
|
4
|
+
import { useState as C, useMemo as j, useContext as ce, createContext as ne, useRef as L, useEffect as B, useCallback as ie } from "react";
|
|
5
5
|
import { cn as h } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
6
6
|
import { IconCheck as oe, IconCoffee as le, IconClock as fe, IconArrowRight as me, IconSparkles as R, IconChevronDown as D, IconRefresh as ue, IconArrowUp as he, IconX as pe, IconGripVertical as xe, IconFilter as ge, IconFilterX as be } from "@tabler/icons-react";
|
|
7
7
|
import { AnimatePresence as K, motion as A } from "framer-motion";
|
|
8
|
-
import { m as
|
|
9
|
-
import { springs as $, motionProps as
|
|
8
|
+
import { m as ve } from "./markdown-components.js";
|
|
9
|
+
import { springs as $, motionProps as Ne } from "@devalok/shilp-sutra/ui/lib/motion";
|
|
10
10
|
import { formatRelativeTime as ye } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
11
|
-
import { M as we
|
|
11
|
+
import { M as we } from "./vendor-markdown.js";
|
|
12
|
+
import { u as Se, C as ke, b as Ce, c as M, f as Ie, D as Re, g as De, S as Ae, v as Ee, K as Te, P as Pe } from "./vendor-dnd.js";
|
|
12
13
|
import { Checkbox as je } from "@devalok/shilp-sutra/ui/checkbox";
|
|
13
14
|
import { Input as F } from "@devalok/shilp-sutra/ui/input";
|
|
14
15
|
import { Button as Me } from "@devalok/shilp-sutra/ui/button";
|
|
15
16
|
function _e() {
|
|
16
|
-
const
|
|
17
|
-
return
|
|
17
|
+
const v = (/* @__PURE__ */ new Date()).getHours();
|
|
18
|
+
return v < 12 ? "Good morning" : v < 17 ? "Good afternoon" : "Good evening";
|
|
18
19
|
}
|
|
19
20
|
function Le() {
|
|
20
21
|
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-IN", {
|
|
@@ -25,8 +26,8 @@ function Le() {
|
|
|
25
26
|
timeZone: "Asia/Kolkata"
|
|
26
27
|
});
|
|
27
28
|
}
|
|
28
|
-
function Be(
|
|
29
|
-
return new Date(
|
|
29
|
+
function Be(v) {
|
|
30
|
+
return new Date(v).toLocaleTimeString("en-IN", {
|
|
30
31
|
hour: "2-digit",
|
|
31
32
|
minute: "2-digit",
|
|
32
33
|
hour12: !0,
|
|
@@ -35,86 +36,86 @@ function Be(N) {
|
|
|
35
36
|
}
|
|
36
37
|
const Ke = w.forwardRef(
|
|
37
38
|
function({
|
|
38
|
-
userName:
|
|
39
|
+
userName: s,
|
|
39
40
|
attendance: a,
|
|
40
|
-
canMarkAttendance:
|
|
41
|
+
canMarkAttendance: c,
|
|
41
42
|
onMarkAttendance: o,
|
|
42
|
-
isSubmitting:
|
|
43
|
-
formatTime:
|
|
43
|
+
isSubmitting: n = !1,
|
|
44
|
+
formatTime: d = Be,
|
|
44
45
|
className: l,
|
|
45
46
|
...i
|
|
46
47
|
}, u) {
|
|
47
48
|
var g, k;
|
|
48
|
-
const r = ((g = a == null ? void 0 : a.attendance) == null ? void 0 : g.status) ?? "Not_Marked", x = r === "PRESENT" ||
|
|
49
|
-
return x && !b ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */
|
|
49
|
+
const r = ((g = a == null ? void 0 : a.attendance) == null ? void 0 : g.status) ?? "Not_Marked", x = r === "PRESENT" || n, b = r === "BREAK", f = (k = a == null ? void 0 : a.attendance) == null ? void 0 : k.timeIn, m = _e(), p = (s == null ? void 0 : s.split(" ")[0]) || "there", N = Le();
|
|
50
|
+
return x && !b ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised", l), ...i, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
51
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02", children: [
|
|
52
|
+
/* @__PURE__ */ t("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
52
53
|
m,
|
|
53
54
|
",",
|
|
54
55
|
" ",
|
|
55
56
|
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
56
57
|
] }),
|
|
57
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children:
|
|
58
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: N })
|
|
58
59
|
] }),
|
|
59
|
-
/* @__PURE__ */
|
|
60
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-success-3 px-ds-05 py-ds-03", children: [
|
|
60
61
|
/* @__PURE__ */ e("div", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-success-9", children: /* @__PURE__ */ e(oe, { className: "h-ico-sm w-ico-sm text-accent-fg" }) }),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-success-11", children: [
|
|
62
63
|
"Marked at",
|
|
63
64
|
" ",
|
|
64
|
-
f ?
|
|
65
|
+
f ? d(f) : "--:--"
|
|
65
66
|
] })
|
|
66
67
|
] })
|
|
67
|
-
] }) }) : b ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
68
|
+
] }) }) : b ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised", l), ...i, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
69
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02", children: [
|
|
70
|
+
/* @__PURE__ */ t("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
70
71
|
m,
|
|
71
72
|
",",
|
|
72
73
|
" ",
|
|
73
74
|
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
74
75
|
] }),
|
|
75
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children:
|
|
76
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: N })
|
|
76
77
|
] }),
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-warning-3 px-ds-05 py-ds-03", children: [
|
|
78
79
|
/* @__PURE__ */ e(le, { className: "h-ico-sm w-ico-sm text-warning-11" }),
|
|
79
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ t("span", { className: "text-ds-md font-semibold text-warning-11", children: [
|
|
80
81
|
"On break",
|
|
81
82
|
a != null && a.breakReason ? ` — ${a.breakReason}` : ""
|
|
82
83
|
] })
|
|
83
84
|
] })
|
|
84
|
-
] }) }) :
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
-
/* @__PURE__ */
|
|
85
|
+
] }) }) : c ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-gradient-to-br from-accent-2 via-surface-1 to-success-3", l), ...i, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-07 sm:px-ds-07 sm:py-ds-08", children: [
|
|
86
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
87
|
+
/* @__PURE__ */ t("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
87
88
|
m,
|
|
88
89
|
",",
|
|
89
90
|
" ",
|
|
90
91
|
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
91
92
|
] }),
|
|
92
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children:
|
|
93
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: N }) })
|
|
93
94
|
] }),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ t(
|
|
95
96
|
"button",
|
|
96
97
|
{
|
|
97
98
|
type: "button",
|
|
98
99
|
onClick: o,
|
|
99
|
-
disabled:
|
|
100
|
-
className: "flex items-center gap-ds-03 rounded-ds-xl bg-accent-9 px-ds-06 py-ds-04 font-semibold text-accent-fg shadow-
|
|
100
|
+
disabled: n,
|
|
101
|
+
className: "flex items-center gap-ds-03 rounded-ds-xl bg-accent-9 px-ds-06 py-ds-04 font-semibold text-accent-fg shadow-raised-hover transition-all duration-150 ease-out hover:-translate-y-0.5 hover:shadow-floating active:translate-y-0 active:scale-[0.98] disabled:opacity-action-disabled",
|
|
101
102
|
children: [
|
|
102
|
-
|
|
103
|
-
!
|
|
103
|
+
n ? "Marking..." : "Mark Attendance",
|
|
104
|
+
!n && /* @__PURE__ */ e(me, { className: "h-ico-sm w-ico-sm" })
|
|
104
105
|
]
|
|
105
106
|
}
|
|
106
107
|
)
|
|
107
|
-
] }) }) : /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-
|
|
108
|
-
/* @__PURE__ */
|
|
109
|
-
/* @__PURE__ */
|
|
108
|
+
] }) }) : /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised", l), ...i, children: /* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-06 py-ds-06 sm:px-ds-07 sm:py-ds-07", children: [
|
|
109
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
110
|
+
/* @__PURE__ */ t("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
110
111
|
m,
|
|
111
112
|
",",
|
|
112
113
|
" ",
|
|
113
114
|
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
114
115
|
] }),
|
|
115
|
-
/* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children:
|
|
116
|
+
/* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: N })
|
|
116
117
|
] }),
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-surface-raised px-ds-05 py-ds-03", children: [
|
|
118
119
|
/* @__PURE__ */ e(fe, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
119
120
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "Attendance window closed" })
|
|
120
121
|
] })
|
|
@@ -130,44 +131,44 @@ const _ = [
|
|
|
130
131
|
"bg-accent-9"
|
|
131
132
|
], $e = w.forwardRef(
|
|
132
133
|
function({
|
|
133
|
-
data:
|
|
134
|
+
data: s,
|
|
134
135
|
loading: a = !1,
|
|
135
|
-
onRefresh:
|
|
136
|
+
onRefresh: c,
|
|
136
137
|
unavailable: o = !1,
|
|
137
|
-
collapsible:
|
|
138
|
-
defaultCollapsed:
|
|
138
|
+
collapsible: n = !0,
|
|
139
|
+
defaultCollapsed: d = !1,
|
|
139
140
|
title: l,
|
|
140
141
|
className: i,
|
|
141
142
|
...u
|
|
142
143
|
}, r) {
|
|
143
|
-
const [x, b] = C(
|
|
144
|
-
if (a && !
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
/* @__PURE__ */ e("div", { className: "h-ico-sm w-ico-sm animate-pulse rounded bg-surface-
|
|
148
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse rounded bg-surface-
|
|
144
|
+
const [x, b] = C(d), f = l ?? "Morning Brief";
|
|
145
|
+
if (a && !s)
|
|
146
|
+
return /* @__PURE__ */ t("div", { ref: r, className: h("flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised p-ds-05b", i), ...u, children: [
|
|
147
|
+
/* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03", children: [
|
|
148
|
+
/* @__PURE__ */ e("div", { className: "h-ico-sm w-ico-sm animate-pulse rounded bg-surface-raised-hover" }),
|
|
149
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse rounded bg-surface-raised-hover" })
|
|
149
150
|
] }),
|
|
150
|
-
[1, 2, 3].map((p) => /* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */ e("div", { className: "mt-ds-02b h-2 w-2 shrink-0 animate-pulse rounded-ds-full bg-surface-
|
|
151
|
+
[1, 2, 3].map((p) => /* @__PURE__ */ t("div", { className: "flex items-start gap-ds-04", children: [
|
|
152
|
+
/* @__PURE__ */ e("div", { className: "mt-ds-02b h-2 w-2 shrink-0 animate-pulse rounded-ds-full bg-surface-raised-hover" }),
|
|
152
153
|
/* @__PURE__ */ e(
|
|
153
154
|
"div",
|
|
154
155
|
{
|
|
155
|
-
className: "h-4 animate-pulse rounded bg-surface-
|
|
156
|
+
className: "h-4 animate-pulse rounded bg-surface-raised-hover",
|
|
156
157
|
style: { width: `${60 + p * 10}%` }
|
|
157
158
|
}
|
|
158
159
|
)
|
|
159
160
|
] }, p))
|
|
160
161
|
] });
|
|
161
162
|
if (o)
|
|
162
|
-
return /* @__PURE__ */
|
|
163
|
+
return /* @__PURE__ */ t("div", { ref: r, className: h("flex items-center gap-ds-03 rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised px-ds-05b py-ds-05", i), ...u, children: [
|
|
163
164
|
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
164
165
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: "AI brief unavailable" })
|
|
165
166
|
] });
|
|
166
|
-
if (!
|
|
167
|
-
const m = !
|
|
168
|
-
return /* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
167
|
+
if (!s || s.brief.length === 0) return null;
|
|
168
|
+
const m = !n || !x;
|
|
169
|
+
return /* @__PURE__ */ t("div", { ref: r, className: h("flex flex-col rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised", i), ...u, children: [
|
|
170
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between px-ds-05b py-ds-05", children: [
|
|
171
|
+
n ? /* @__PURE__ */ t(
|
|
171
172
|
"button",
|
|
172
173
|
{
|
|
173
174
|
type: "button",
|
|
@@ -189,17 +190,17 @@ const _ = [
|
|
|
189
190
|
)
|
|
190
191
|
]
|
|
191
192
|
}
|
|
192
|
-
) : /* @__PURE__ */
|
|
193
|
+
) : /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03", children: [
|
|
193
194
|
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
194
195
|
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: f })
|
|
195
196
|
] }),
|
|
196
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children:
|
|
197
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: c && /* @__PURE__ */ e(
|
|
197
198
|
"button",
|
|
198
199
|
{
|
|
199
200
|
type: "button",
|
|
200
|
-
onClick:
|
|
201
|
+
onClick: c,
|
|
201
202
|
"aria-label": "Refresh brief",
|
|
202
|
-
className: "p-1.5 rounded hover:bg-surface-
|
|
203
|
+
className: "p-1.5 rounded hover:bg-surface-raised-hover transition-colors",
|
|
203
204
|
children: /* @__PURE__ */ e(ue, { className: h("h-ico-sm w-ico-sm text-surface-fg-subtle", a && "animate-spin") })
|
|
204
205
|
}
|
|
205
206
|
) })
|
|
@@ -212,19 +213,19 @@ const _ = [
|
|
|
212
213
|
exit: { height: 0, opacity: 0 },
|
|
213
214
|
transition: $.smooth,
|
|
214
215
|
className: "overflow-hidden",
|
|
215
|
-
children: /* @__PURE__ */
|
|
216
|
-
|
|
216
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-ds-03 border-t border-surface-border-strong px-ds-05b pb-ds-05b pt-ds-05", children: [
|
|
217
|
+
s.brief.map((p, N) => /* @__PURE__ */ t("div", { className: "flex items-start gap-ds-04", children: [
|
|
217
218
|
/* @__PURE__ */ e(
|
|
218
219
|
"div",
|
|
219
220
|
{
|
|
220
|
-
className: h("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", _[
|
|
221
|
+
className: h("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", _[N % _.length])
|
|
221
222
|
}
|
|
222
223
|
),
|
|
223
|
-
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg-muted [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-surface-
|
|
224
|
-
] },
|
|
225
|
-
/* @__PURE__ */
|
|
224
|
+
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg-muted [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-surface-raised-hover [&_code]:px-1 [&_code]:py-ds-01 [&_code]:text-ds-sm [&_a]:text-accent-11 [&_a]:underline", children: /* @__PURE__ */ e(we, { components: ve, children: p }) })
|
|
225
|
+
] }, N)),
|
|
226
|
+
/* @__PURE__ */ t("div", { className: "mt-ds-02 text-ds-xs text-surface-fg-subtle", children: [
|
|
226
227
|
"Generated ",
|
|
227
|
-
ye(
|
|
228
|
+
ye(s.generatedAt)
|
|
228
229
|
] })
|
|
229
230
|
] })
|
|
230
231
|
}
|
|
@@ -233,60 +234,60 @@ const _ = [
|
|
|
233
234
|
}
|
|
234
235
|
);
|
|
235
236
|
$e.displayName = "DailyBrief";
|
|
236
|
-
const z =
|
|
237
|
+
const z = ne(null);
|
|
237
238
|
function I() {
|
|
238
|
-
const
|
|
239
|
-
if (!
|
|
239
|
+
const v = ce(z);
|
|
240
|
+
if (!v)
|
|
240
241
|
throw new Error("useScratchpad must be used within a ScratchpadProvider");
|
|
241
|
-
return
|
|
242
|
+
return v;
|
|
242
243
|
}
|
|
243
244
|
function H({
|
|
244
|
-
children:
|
|
245
|
-
items:
|
|
245
|
+
children: v,
|
|
246
|
+
items: s,
|
|
246
247
|
maxItems: a = 20,
|
|
247
|
-
onToggle:
|
|
248
|
+
onToggle: c,
|
|
248
249
|
onAdd: o,
|
|
249
|
-
onDelete:
|
|
250
|
-
onEdit:
|
|
250
|
+
onDelete: n,
|
|
251
|
+
onEdit: d,
|
|
251
252
|
onReorder: l,
|
|
252
253
|
onPromote: i,
|
|
253
254
|
defaultShowCompleted: u = !0
|
|
254
255
|
}) {
|
|
255
256
|
const [r, x] = C(u), b = j(
|
|
256
|
-
() => r ?
|
|
257
|
-
[
|
|
257
|
+
() => r ? s : s.filter((m) => !m.done),
|
|
258
|
+
[s, r]
|
|
258
259
|
), f = j(
|
|
259
260
|
() => ({
|
|
260
|
-
items:
|
|
261
|
+
items: s,
|
|
261
262
|
visibleItems: b,
|
|
262
263
|
maxItems: a,
|
|
263
264
|
showCompleted: r,
|
|
264
265
|
setShowCompleted: x,
|
|
265
|
-
onToggle:
|
|
266
|
+
onToggle: c,
|
|
266
267
|
onAdd: o,
|
|
267
|
-
onDelete:
|
|
268
|
-
onEdit:
|
|
268
|
+
onDelete: n,
|
|
269
|
+
onEdit: d,
|
|
269
270
|
onReorder: l,
|
|
270
271
|
onPromote: i,
|
|
271
272
|
canAdd: !!o,
|
|
272
|
-
canDelete: !!
|
|
273
|
-
canEdit: !!
|
|
273
|
+
canDelete: !!n,
|
|
274
|
+
canEdit: !!d,
|
|
274
275
|
canReorder: !!l,
|
|
275
276
|
canPromote: !!i
|
|
276
277
|
}),
|
|
277
|
-
[
|
|
278
|
+
[s, b, a, r, c, o, n, d, l, i]
|
|
278
279
|
);
|
|
279
|
-
return /* @__PURE__ */ e(z.Provider, { value: f, children:
|
|
280
|
+
return /* @__PURE__ */ e(z.Provider, { value: f, children: v });
|
|
280
281
|
}
|
|
281
282
|
H.displayName = "ScratchpadProvider";
|
|
282
283
|
const O = w.forwardRef(
|
|
283
284
|
function({
|
|
284
|
-
items:
|
|
285
|
+
items: s,
|
|
285
286
|
maxItems: a,
|
|
286
|
-
onToggle:
|
|
287
|
+
onToggle: c,
|
|
287
288
|
onAdd: o,
|
|
288
|
-
onDelete:
|
|
289
|
-
onEdit:
|
|
289
|
+
onDelete: n,
|
|
290
|
+
onEdit: d,
|
|
290
291
|
onReorder: l,
|
|
291
292
|
onPromote: i,
|
|
292
293
|
defaultShowCompleted: u,
|
|
@@ -297,12 +298,12 @@ const O = w.forwardRef(
|
|
|
297
298
|
return /* @__PURE__ */ e(
|
|
298
299
|
H,
|
|
299
300
|
{
|
|
300
|
-
items:
|
|
301
|
+
items: s,
|
|
301
302
|
maxItems: a,
|
|
302
|
-
onToggle:
|
|
303
|
+
onToggle: c,
|
|
303
304
|
onAdd: o,
|
|
304
|
-
onDelete:
|
|
305
|
-
onEdit:
|
|
305
|
+
onDelete: n,
|
|
306
|
+
onEdit: d,
|
|
306
307
|
onReorder: l,
|
|
307
308
|
onPromote: i,
|
|
308
309
|
defaultShowCompleted: u,
|
|
@@ -313,16 +314,16 @@ const O = w.forwardRef(
|
|
|
313
314
|
);
|
|
314
315
|
O.displayName = "ScratchpadRoot";
|
|
315
316
|
const G = w.forwardRef(
|
|
316
|
-
function({ title:
|
|
317
|
-
return /* @__PURE__ */
|
|
317
|
+
function({ title: s = "Scratchpad", className: a, children: c, ...o }, n) {
|
|
318
|
+
return /* @__PURE__ */ t(
|
|
318
319
|
"div",
|
|
319
320
|
{
|
|
320
|
-
ref:
|
|
321
|
+
ref: n,
|
|
321
322
|
className: h("flex items-center justify-between px-ds-05b py-ds-05", a),
|
|
322
323
|
...o,
|
|
323
324
|
children: [
|
|
324
|
-
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children:
|
|
325
|
-
|
|
325
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: s }),
|
|
326
|
+
c && /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: c })
|
|
326
327
|
]
|
|
327
328
|
}
|
|
328
329
|
);
|
|
@@ -330,18 +331,18 @@ const G = w.forwardRef(
|
|
|
330
331
|
);
|
|
331
332
|
G.displayName = "ScratchpadHeader";
|
|
332
333
|
const E = w.forwardRef(
|
|
333
|
-
function({ item:
|
|
334
|
-
const { onToggle: l, onEdit: i, onDelete: u, onPromote: r, canEdit: x, canDelete: b, canPromote: f } = I(), [m, p] = C(!1), [
|
|
334
|
+
function({ item: s, compact: a = !1, sortable: c = !1, className: o, ...n }, d) {
|
|
335
|
+
const { onToggle: l, onEdit: i, onDelete: u, onPromote: r, canEdit: x, canDelete: b, canPromote: f } = I(), [m, p] = C(!1), [N, g] = C(s.text), k = L(null), {
|
|
335
336
|
attributes: q,
|
|
336
337
|
listeners: J,
|
|
337
338
|
setNodeRef: T,
|
|
338
339
|
transform: Y,
|
|
339
340
|
transition: ee,
|
|
340
|
-
isDragging:
|
|
341
|
+
isDragging: se
|
|
341
342
|
} = Se({
|
|
342
|
-
id:
|
|
343
|
-
disabled: !
|
|
344
|
-
}),
|
|
343
|
+
id: s.id,
|
|
344
|
+
disabled: !c
|
|
345
|
+
}), te = c ? {
|
|
345
346
|
transform: ke.Transform.toString(Y),
|
|
346
347
|
transition: ee
|
|
347
348
|
} : void 0;
|
|
@@ -349,44 +350,44 @@ const E = w.forwardRef(
|
|
|
349
350
|
m && k.current && (k.current.focus(), k.current.select());
|
|
350
351
|
}, [m]);
|
|
351
352
|
function P() {
|
|
352
|
-
const y =
|
|
353
|
-
y && y !==
|
|
353
|
+
const y = N.trim();
|
|
354
|
+
y && y !== s.text && i && i(s.id, y), p(!1), g(s.text);
|
|
354
355
|
}
|
|
355
356
|
function ae(y) {
|
|
356
|
-
y.key === "Enter" ? (y.preventDefault(), P()) : y.key === "Escape" && (p(!1), g(
|
|
357
|
+
y.key === "Enter" ? (y.preventDefault(), P()) : y.key === "Escape" && (p(!1), g(s.text));
|
|
357
358
|
}
|
|
358
359
|
function re() {
|
|
359
|
-
x && (g(
|
|
360
|
+
x && (g(s.text), p(!0));
|
|
360
361
|
}
|
|
361
|
-
const
|
|
362
|
+
const de = w.useCallback(
|
|
362
363
|
(y) => {
|
|
363
|
-
T(y), typeof
|
|
364
|
+
T(y), typeof d == "function" ? d(y) : d && (d.current = y);
|
|
364
365
|
},
|
|
365
|
-
[
|
|
366
|
+
[d, T]
|
|
366
367
|
);
|
|
367
|
-
return /* @__PURE__ */
|
|
368
|
+
return /* @__PURE__ */ t(
|
|
368
369
|
A.div,
|
|
369
370
|
{
|
|
370
|
-
ref:
|
|
371
|
+
ref: c ? de : d,
|
|
371
372
|
initial: { opacity: 0, x: -10 },
|
|
372
|
-
animate: { opacity:
|
|
373
|
+
animate: { opacity: se ? 0.5 : 1, x: 0 },
|
|
373
374
|
exit: { opacity: 0, x: 20, height: 0 },
|
|
374
375
|
transition: $.snappy,
|
|
375
|
-
style:
|
|
376
|
+
style: te,
|
|
376
377
|
className: h(
|
|
377
|
-
"group flex items-center rounded-ds-md transition-colors duration-150 hover:bg-surface-
|
|
378
|
+
"group flex items-center rounded-ds-md transition-colors duration-150 hover:bg-surface-raised-hover",
|
|
378
379
|
a ? "gap-ds-02 px-ds-02 py-0.5" : "gap-ds-03 px-ds-02 py-ds-02",
|
|
379
380
|
o
|
|
380
381
|
),
|
|
381
|
-
...
|
|
382
|
-
...
|
|
382
|
+
...n,
|
|
383
|
+
...c ? q : void 0,
|
|
383
384
|
children: [
|
|
384
385
|
/* @__PURE__ */ e(
|
|
385
386
|
je,
|
|
386
387
|
{
|
|
387
|
-
checked:
|
|
388
|
-
onCheckedChange: (y) => l(
|
|
389
|
-
"aria-label": `Toggle ${
|
|
388
|
+
checked: s.done,
|
|
389
|
+
onCheckedChange: (y) => l(s.id, y === !0),
|
|
390
|
+
"aria-label": `Toggle ${s.text}`,
|
|
390
391
|
className: a ? "h-3.5 w-3.5" : "h-4 w-4"
|
|
391
392
|
}
|
|
392
393
|
),
|
|
@@ -395,7 +396,7 @@ const E = w.forwardRef(
|
|
|
395
396
|
{
|
|
396
397
|
ref: k,
|
|
397
398
|
size: "sm",
|
|
398
|
-
value:
|
|
399
|
+
value: N,
|
|
399
400
|
onChange: (y) => g(y.target.value),
|
|
400
401
|
onKeyDown: ae,
|
|
401
402
|
onBlur: P,
|
|
@@ -408,19 +409,19 @@ const E = w.forwardRef(
|
|
|
408
409
|
className: h(
|
|
409
410
|
"flex-1 transition-all duration-200 ease-in-out",
|
|
410
411
|
a ? "text-ds-sm" : "text-ds-md",
|
|
411
|
-
|
|
412
|
-
!
|
|
412
|
+
s.done && "text-surface-fg-subtle line-through",
|
|
413
|
+
!s.done && (a ? "text-surface-fg" : "")
|
|
413
414
|
),
|
|
414
|
-
children:
|
|
415
|
+
children: s.text
|
|
415
416
|
}
|
|
416
417
|
),
|
|
417
|
-
/* @__PURE__ */
|
|
418
|
+
/* @__PURE__ */ t("div", { className: "flex shrink-0 items-center gap-0.5 opacity-0 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100", children: [
|
|
418
419
|
f && r && /* @__PURE__ */ e(
|
|
419
420
|
"button",
|
|
420
421
|
{
|
|
421
422
|
type: "button",
|
|
422
|
-
onClick: () => r(
|
|
423
|
-
"aria-label": `Promote ${
|
|
423
|
+
onClick: () => r(s.id),
|
|
424
|
+
"aria-label": `Promote ${s.text}`,
|
|
424
425
|
className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm text-accent-11 transition-colors duration-150 hover:bg-accent-3 hover:text-accent-12",
|
|
425
426
|
children: /* @__PURE__ */ e(he, { className: "h-3 w-3" })
|
|
426
427
|
}
|
|
@@ -429,18 +430,18 @@ const E = w.forwardRef(
|
|
|
429
430
|
"button",
|
|
430
431
|
{
|
|
431
432
|
type: "button",
|
|
432
|
-
onClick: () => u(
|
|
433
|
-
"aria-label": `Delete ${
|
|
433
|
+
onClick: () => u(s.id),
|
|
434
|
+
"aria-label": `Delete ${s.text}`,
|
|
434
435
|
className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm text-surface-fg-subtle transition-colors duration-150 hover:bg-error-3 hover:text-error-11",
|
|
435
436
|
children: /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
|
|
436
437
|
}
|
|
437
438
|
),
|
|
438
|
-
|
|
439
|
+
c && /* @__PURE__ */ e(
|
|
439
440
|
"button",
|
|
440
441
|
{
|
|
441
442
|
type: "button",
|
|
442
443
|
className: "flex h-ico-md w-ico-md shrink-0 cursor-grab items-center justify-center text-surface-fg-muted",
|
|
443
|
-
"aria-label": `Drag ${
|
|
444
|
+
"aria-label": `Drag ${s.text}`,
|
|
444
445
|
...J,
|
|
445
446
|
children: /* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" })
|
|
446
447
|
}
|
|
@@ -453,30 +454,30 @@ const E = w.forwardRef(
|
|
|
453
454
|
);
|
|
454
455
|
E.displayName = "ScratchpadItem";
|
|
455
456
|
const W = w.forwardRef(
|
|
456
|
-
function({ compact:
|
|
457
|
-
const { visibleItems:
|
|
457
|
+
function({ compact: s = !1, className: a, ...c }, o) {
|
|
458
|
+
const { visibleItems: n, items: d, canReorder: l, onReorder: i } = I(), u = Ce(
|
|
458
459
|
M(Pe, { activationConstraint: { distance: 5 } }),
|
|
459
460
|
M(Te)
|
|
460
461
|
), r = ie(
|
|
461
462
|
(f) => {
|
|
462
463
|
const { active: m, over: p } = f;
|
|
463
464
|
if (!p || m.id === p.id || !i) return;
|
|
464
|
-
const
|
|
465
|
-
|
|
465
|
+
const N = d.findIndex((k) => k.id === m.id), g = d.findIndex((k) => k.id === p.id);
|
|
466
|
+
N !== -1 && g !== -1 && i(Ie(d, N, g));
|
|
466
467
|
},
|
|
467
|
-
[
|
|
468
|
-
), x =
|
|
468
|
+
[d, i]
|
|
469
|
+
), x = n.map((f) => f.id), b = /* @__PURE__ */ e(
|
|
469
470
|
"div",
|
|
470
471
|
{
|
|
471
472
|
ref: o,
|
|
472
473
|
className: h("flex flex-col gap-ds-02b", a),
|
|
473
474
|
...l ? void 0 : { role: "list" },
|
|
474
|
-
...
|
|
475
|
-
children: /* @__PURE__ */ e(K, { initial: !1, children:
|
|
475
|
+
...c,
|
|
476
|
+
children: /* @__PURE__ */ e(K, { initial: !1, children: n.map((f) => /* @__PURE__ */ e(
|
|
476
477
|
E,
|
|
477
478
|
{
|
|
478
479
|
item: f,
|
|
479
|
-
compact:
|
|
480
|
+
compact: s,
|
|
480
481
|
sortable: l,
|
|
481
482
|
...l ? void 0 : { role: "listitem" }
|
|
482
483
|
},
|
|
@@ -498,23 +499,23 @@ const W = w.forwardRef(
|
|
|
498
499
|
W.displayName = "ScratchpadList";
|
|
499
500
|
const Z = w.forwardRef(
|
|
500
501
|
function({
|
|
501
|
-
placeholder:
|
|
502
|
+
placeholder: s = "What needs doing?",
|
|
502
503
|
triggerLabel: a = "+ Add a task...",
|
|
503
|
-
className:
|
|
504
|
+
className: c,
|
|
504
505
|
...o
|
|
505
|
-
},
|
|
506
|
-
const { onAdd:
|
|
506
|
+
}, n) {
|
|
507
|
+
const { onAdd: d, canAdd: l, items: i, maxItems: u } = I(), [r, x] = C(!1), [b, f] = C(""), m = L(null);
|
|
507
508
|
if (B(() => {
|
|
508
509
|
r && m.current && m.current.focus();
|
|
509
510
|
}, [r]), !l || i.length >= u) return null;
|
|
510
511
|
function p() {
|
|
511
512
|
const g = b.trim();
|
|
512
|
-
g &&
|
|
513
|
+
g && d && (d(g), f(""));
|
|
513
514
|
}
|
|
514
|
-
function
|
|
515
|
+
function N(g) {
|
|
515
516
|
g.key === "Enter" ? (g.preventDefault(), p()) : g.key === "Escape" && (x(!1), f(""));
|
|
516
517
|
}
|
|
517
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
518
|
+
return /* @__PURE__ */ e("div", { ref: n, className: h("mt-ds-02b", c), ...o, children: r ? /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03", children: [
|
|
518
519
|
/* @__PURE__ */ e(
|
|
519
520
|
F,
|
|
520
521
|
{
|
|
@@ -522,11 +523,11 @@ const Z = w.forwardRef(
|
|
|
522
523
|
size: "sm",
|
|
523
524
|
value: b,
|
|
524
525
|
onChange: (g) => f(g.target.value),
|
|
525
|
-
onKeyDown:
|
|
526
|
+
onKeyDown: N,
|
|
526
527
|
onBlur: () => {
|
|
527
528
|
b.trim() || (x(!1), f(""));
|
|
528
529
|
},
|
|
529
|
-
placeholder:
|
|
530
|
+
placeholder: s,
|
|
530
531
|
className: "flex-1"
|
|
531
532
|
}
|
|
532
533
|
),
|
|
@@ -544,7 +545,7 @@ const Z = w.forwardRef(
|
|
|
544
545
|
{
|
|
545
546
|
type: "button",
|
|
546
547
|
onClick: () => x(!0),
|
|
547
|
-
className: "w-full rounded-ds-md px-ds-02 py-ds-02 text-left text-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-
|
|
548
|
+
className: "w-full rounded-ds-md px-ds-02 py-ds-02 text-left text-ds-md text-surface-fg-subtle transition-colors hover:bg-surface-raised-hover",
|
|
548
549
|
children: a
|
|
549
550
|
}
|
|
550
551
|
) });
|
|
@@ -552,19 +553,19 @@ const Z = w.forwardRef(
|
|
|
552
553
|
);
|
|
553
554
|
Z.displayName = "ScratchpadAddInput";
|
|
554
555
|
const X = w.forwardRef(
|
|
555
|
-
function({ icon:
|
|
556
|
-
const { visibleItems:
|
|
557
|
-
return
|
|
556
|
+
function({ icon: s, message: a = "Nothing here yet. Add a task!", className: c, ...o }, n) {
|
|
557
|
+
const { visibleItems: d } = I();
|
|
558
|
+
return d.length > 0 ? null : /* @__PURE__ */ t(
|
|
558
559
|
"div",
|
|
559
560
|
{
|
|
560
|
-
ref:
|
|
561
|
+
ref: n,
|
|
561
562
|
className: h(
|
|
562
563
|
"flex flex-col items-center justify-center gap-ds-03 py-ds-06 text-center",
|
|
563
|
-
|
|
564
|
+
c
|
|
564
565
|
),
|
|
565
566
|
...o,
|
|
566
567
|
children: [
|
|
567
|
-
|
|
568
|
+
s && /* @__PURE__ */ e(s, { className: "h-ico-lg w-ico-lg text-surface-fg-subtle" }),
|
|
568
569
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: a })
|
|
569
570
|
]
|
|
570
571
|
}
|
|
@@ -576,18 +577,18 @@ const Fe = {
|
|
|
576
577
|
sm: { diameter: 16, stroke: 1.5, fontSize: "7px" },
|
|
577
578
|
md: { diameter: 20, stroke: 2, fontSize: "8px" }
|
|
578
579
|
}, Q = w.forwardRef(
|
|
579
|
-
function({ size:
|
|
580
|
-
const { items:
|
|
581
|
-
return /* @__PURE__ */
|
|
580
|
+
function({ size: s = "md", showCount: a = !0, className: c, ...o }, n) {
|
|
581
|
+
const { items: d, maxItems: l } = I(), i = d.length, u = i > 0 && d.every((g) => g.done), { diameter: r, stroke: x, fontSize: b } = Fe[s], f = (r - x) / 2, m = 2 * Math.PI * f, p = l > 0 ? i / l : 0, N = m * (1 - p);
|
|
582
|
+
return /* @__PURE__ */ t(
|
|
582
583
|
A.div,
|
|
583
584
|
{
|
|
584
|
-
ref:
|
|
585
|
-
className: h("relative flex items-center justify-center",
|
|
585
|
+
ref: n,
|
|
586
|
+
className: h("relative flex items-center justify-center", c),
|
|
586
587
|
animate: u ? { scale: [1, 1.1, 1] } : {},
|
|
587
588
|
transition: { duration: 0.3 },
|
|
588
|
-
...
|
|
589
|
+
...Ne(o),
|
|
589
590
|
children: [
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ t(
|
|
591
592
|
"svg",
|
|
592
593
|
{
|
|
593
594
|
width: r,
|
|
@@ -603,7 +604,7 @@ const Fe = {
|
|
|
603
604
|
r: f,
|
|
604
605
|
fill: "none",
|
|
605
606
|
strokeWidth: x,
|
|
606
|
-
className: "stroke-surface-
|
|
607
|
+
className: "stroke-surface-raised-hover"
|
|
607
608
|
}
|
|
608
609
|
),
|
|
609
610
|
/* @__PURE__ */ e(
|
|
@@ -616,7 +617,7 @@ const Fe = {
|
|
|
616
617
|
strokeWidth: x,
|
|
617
618
|
strokeLinecap: "round",
|
|
618
619
|
strokeDasharray: m,
|
|
619
|
-
strokeDashoffset:
|
|
620
|
+
strokeDashoffset: N,
|
|
620
621
|
className: h(
|
|
621
622
|
"transition-all duration-300",
|
|
622
623
|
u ? "stroke-success-9" : "stroke-accent-9"
|
|
@@ -626,7 +627,7 @@ const Fe = {
|
|
|
626
627
|
]
|
|
627
628
|
}
|
|
628
629
|
),
|
|
629
|
-
a && /* @__PURE__ */
|
|
630
|
+
a && /* @__PURE__ */ t(
|
|
630
631
|
"span",
|
|
631
632
|
{
|
|
632
633
|
className: "absolute font-medium text-surface-fg-muted",
|
|
@@ -646,21 +647,21 @@ const Fe = {
|
|
|
646
647
|
);
|
|
647
648
|
Q.displayName = "ScratchpadProgressRing";
|
|
648
649
|
const U = w.forwardRef(
|
|
649
|
-
function({ className:
|
|
650
|
-
const { showCompleted: o, setShowCompleted:
|
|
650
|
+
function({ className: s, ...a }, c) {
|
|
651
|
+
const { showCompleted: o, setShowCompleted: n } = I(), d = o ? ge : be;
|
|
651
652
|
return /* @__PURE__ */ e(
|
|
652
653
|
"button",
|
|
653
654
|
{
|
|
654
|
-
ref:
|
|
655
|
+
ref: c,
|
|
655
656
|
type: "button",
|
|
656
|
-
onClick: () =>
|
|
657
|
+
onClick: () => n(!o),
|
|
657
658
|
"aria-label": o ? "Hide completed" : "Show completed",
|
|
658
659
|
className: h(
|
|
659
|
-
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm text-surface-fg-muted transition-colors hover:bg-surface-
|
|
660
|
-
|
|
660
|
+
"flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm text-surface-fg-muted transition-colors hover:bg-surface-raised hover:text-surface-fg",
|
|
661
|
+
s
|
|
661
662
|
),
|
|
662
663
|
...a,
|
|
663
|
-
children: /* @__PURE__ */ e(
|
|
664
|
+
children: /* @__PURE__ */ e(d, { className: "h-3.5 w-3.5" })
|
|
664
665
|
}
|
|
665
666
|
);
|
|
666
667
|
}
|
|
@@ -668,24 +669,24 @@ const U = w.forwardRef(
|
|
|
668
669
|
U.displayName = "ScratchpadFilterToggle";
|
|
669
670
|
const V = w.forwardRef(
|
|
670
671
|
function({
|
|
671
|
-
label:
|
|
672
|
+
label: s = "Scratchpad",
|
|
672
673
|
defaultOpen: a = !0,
|
|
673
|
-
badgeCount:
|
|
674
|
+
badgeCount: c,
|
|
674
675
|
headerClassName: o,
|
|
675
|
-
className:
|
|
676
|
-
children:
|
|
676
|
+
className: n,
|
|
677
|
+
children: d,
|
|
677
678
|
...l
|
|
678
679
|
}, i) {
|
|
679
680
|
const [u, r] = C(a);
|
|
680
|
-
return /* @__PURE__ */
|
|
681
|
-
/* @__PURE__ */
|
|
681
|
+
return /* @__PURE__ */ t("div", { ref: i, className: h("flex flex-col", n), ...l, children: [
|
|
682
|
+
/* @__PURE__ */ t(
|
|
682
683
|
"button",
|
|
683
684
|
{
|
|
684
685
|
type: "button",
|
|
685
686
|
onClick: () => r((x) => !x),
|
|
686
687
|
"aria-expanded": u,
|
|
687
688
|
className: h(
|
|
688
|
-
"flex w-full items-center gap-ds-02 px-ds-03 py-ds-02 text-left text-ds-sm font-semibold text-surface-fg-muted transition-colors duration-150 hover:bg-surface-
|
|
689
|
+
"flex w-full items-center gap-ds-02 px-ds-03 py-ds-02 text-left text-ds-sm font-semibold text-surface-fg-muted transition-colors duration-150 hover:bg-surface-raised-hover",
|
|
689
690
|
o
|
|
690
691
|
),
|
|
691
692
|
children: [
|
|
@@ -698,8 +699,8 @@ const V = w.forwardRef(
|
|
|
698
699
|
)
|
|
699
700
|
}
|
|
700
701
|
),
|
|
701
|
-
/* @__PURE__ */ e("span", { className: "flex-1", children:
|
|
702
|
-
|
|
702
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: s }),
|
|
703
|
+
c != null && c > 0 && /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-raised-hover px-1.5 text-ds-xs text-surface-fg-muted", children: c })
|
|
703
704
|
]
|
|
704
705
|
}
|
|
705
706
|
),
|
|
@@ -710,7 +711,7 @@ const V = w.forwardRef(
|
|
|
710
711
|
"grid transition-[grid-template-rows] duration-200",
|
|
711
712
|
u ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
712
713
|
),
|
|
713
|
-
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children:
|
|
714
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: d })
|
|
714
715
|
}
|
|
715
716
|
)
|
|
716
717
|
] });
|
|
@@ -729,12 +730,12 @@ const S = {
|
|
|
729
730
|
Collapse: V
|
|
730
731
|
}, ze = w.forwardRef(
|
|
731
732
|
function({
|
|
732
|
-
items:
|
|
733
|
+
items: s,
|
|
733
734
|
maxItems: a = 5,
|
|
734
|
-
onToggle:
|
|
735
|
+
onToggle: c,
|
|
735
736
|
onAdd: o,
|
|
736
|
-
onDelete:
|
|
737
|
-
onEdit:
|
|
737
|
+
onDelete: n,
|
|
738
|
+
onEdit: d,
|
|
738
739
|
onReorder: l,
|
|
739
740
|
onPromote: i,
|
|
740
741
|
title: u = "My Scratchpad",
|
|
@@ -744,53 +745,53 @@ const S = {
|
|
|
744
745
|
loading: f = !1,
|
|
745
746
|
className: m,
|
|
746
747
|
...p
|
|
747
|
-
},
|
|
748
|
-
return f ? /* @__PURE__ */
|
|
748
|
+
}, N) {
|
|
749
|
+
return f ? /* @__PURE__ */ t(
|
|
749
750
|
"div",
|
|
750
751
|
{
|
|
751
|
-
ref:
|
|
752
|
+
ref: N,
|
|
752
753
|
className: h(
|
|
753
|
-
"flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-
|
|
754
|
+
"flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised p-ds-05b",
|
|
754
755
|
m
|
|
755
756
|
),
|
|
756
757
|
...p,
|
|
757
758
|
children: [
|
|
758
|
-
/* @__PURE__ */
|
|
759
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-28 animate-pulse rounded bg-surface-
|
|
760
|
-
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-pulse rounded-full bg-surface-
|
|
759
|
+
/* @__PURE__ */ t("div", { className: "flex items-center justify-between", children: [
|
|
760
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-28 animate-pulse rounded bg-surface-raised-hover" }),
|
|
761
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-pulse rounded-full bg-surface-raised-hover" })
|
|
761
762
|
] }),
|
|
762
|
-
[1, 2, 3].map((g) => /* @__PURE__ */
|
|
763
|
-
/* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md shrink-0 animate-pulse rounded-ds-sm bg-surface-
|
|
763
|
+
[1, 2, 3].map((g) => /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-03", children: [
|
|
764
|
+
/* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md shrink-0 animate-pulse rounded-ds-sm bg-surface-raised-hover" }),
|
|
764
765
|
/* @__PURE__ */ e(
|
|
765
766
|
"div",
|
|
766
767
|
{
|
|
767
|
-
className: "h-4 animate-pulse rounded bg-surface-
|
|
768
|
+
className: "h-4 animate-pulse rounded bg-surface-raised-hover",
|
|
768
769
|
style: { width: `${50 + g * 12}%` }
|
|
769
770
|
}
|
|
770
771
|
)
|
|
771
772
|
] }, g))
|
|
772
773
|
]
|
|
773
774
|
}
|
|
774
|
-
) : /* @__PURE__ */
|
|
775
|
+
) : /* @__PURE__ */ t(
|
|
775
776
|
S.Root,
|
|
776
777
|
{
|
|
777
|
-
ref:
|
|
778
|
-
items:
|
|
778
|
+
ref: N,
|
|
779
|
+
items: s,
|
|
779
780
|
maxItems: a,
|
|
780
|
-
onToggle:
|
|
781
|
+
onToggle: c,
|
|
781
782
|
onAdd: o,
|
|
782
|
-
onDelete:
|
|
783
|
-
onEdit:
|
|
783
|
+
onDelete: n,
|
|
784
|
+
onEdit: d,
|
|
784
785
|
onReorder: l,
|
|
785
786
|
onPromote: i,
|
|
786
787
|
className: h(
|
|
787
|
-
"rounded-ds-2xl border border-surface-border-strong bg-surface-
|
|
788
|
+
"rounded-ds-2xl border border-surface-border-strong bg-surface-raised shadow-raised",
|
|
788
789
|
m
|
|
789
790
|
),
|
|
790
791
|
...p,
|
|
791
792
|
children: [
|
|
792
793
|
/* @__PURE__ */ e(S.Header, { title: u, children: /* @__PURE__ */ e(S.ProgressRing, {}) }),
|
|
793
|
-
/* @__PURE__ */
|
|
794
|
+
/* @__PURE__ */ t("div", { className: "flex flex-col border-t border-surface-border-strong px-ds-05b pb-ds-04 pt-ds-04", children: [
|
|
794
795
|
/* @__PURE__ */ e(S.EmptyState, { icon: b, message: x }),
|
|
795
796
|
/* @__PURE__ */ e(S.List, {}),
|
|
796
797
|
/* @__PURE__ */ e(S.AddInput, {}),
|
|
@@ -804,12 +805,12 @@ const S = {
|
|
|
804
805
|
ze.displayName = "ScratchpadWidget";
|
|
805
806
|
const He = w.forwardRef(
|
|
806
807
|
function({
|
|
807
|
-
items:
|
|
808
|
+
items: s,
|
|
808
809
|
onToggle: a,
|
|
809
|
-
onAdd:
|
|
810
|
+
onAdd: c,
|
|
810
811
|
onDelete: o,
|
|
811
|
-
onEdit:
|
|
812
|
-
onReorder:
|
|
812
|
+
onEdit: n,
|
|
813
|
+
onReorder: d,
|
|
813
814
|
onPromote: l,
|
|
814
815
|
maxItems: i = 20,
|
|
815
816
|
defaultOpen: u = !0,
|
|
@@ -823,23 +824,23 @@ const He = w.forwardRef(
|
|
|
823
824
|
S.Root,
|
|
824
825
|
{
|
|
825
826
|
ref: f,
|
|
826
|
-
items:
|
|
827
|
+
items: s,
|
|
827
828
|
maxItems: i,
|
|
828
829
|
onToggle: a,
|
|
829
|
-
onAdd:
|
|
830
|
+
onAdd: c,
|
|
830
831
|
onDelete: o,
|
|
831
|
-
onEdit:
|
|
832
|
-
onReorder:
|
|
832
|
+
onEdit: n,
|
|
833
|
+
onReorder: d,
|
|
833
834
|
onPromote: l,
|
|
834
835
|
className: h("flex flex-col", x),
|
|
835
836
|
...b,
|
|
836
|
-
children: /* @__PURE__ */
|
|
837
|
-
/* @__PURE__ */
|
|
838
|
-
/* @__PURE__ */
|
|
837
|
+
children: /* @__PURE__ */ t("div", { className: "flex flex-col", children: [
|
|
838
|
+
/* @__PURE__ */ t("div", { className: "flex w-full items-center gap-ds-02 px-ds-03 py-ds-02 text-ds-sm font-semibold text-surface-fg-muted", children: [
|
|
839
|
+
/* @__PURE__ */ t(
|
|
839
840
|
"button",
|
|
840
841
|
{
|
|
841
842
|
type: "button",
|
|
842
|
-
onClick: () => p((
|
|
843
|
+
onClick: () => p((N) => !N),
|
|
843
844
|
"aria-expanded": m,
|
|
844
845
|
"aria-label": "Scratchpad",
|
|
845
846
|
className: "flex flex-1 items-center gap-ds-02 text-left transition-colors duration-150 hover:text-surface-fg",
|
|
@@ -867,7 +868,7 @@ const He = w.forwardRef(
|
|
|
867
868
|
"grid transition-[grid-template-rows] duration-200",
|
|
868
869
|
m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
869
870
|
),
|
|
870
|
-
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */
|
|
871
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ t("div", { className: "flex flex-col gap-0.5 px-ds-03 pb-ds-02", children: [
|
|
871
872
|
/* @__PURE__ */ e(S.EmptyState, {}),
|
|
872
873
|
/* @__PURE__ */ e(S.List, { compact: !0 }),
|
|
873
874
|
/* @__PURE__ */ e(
|