@devalok/shilp-sutra-karm 0.18.1 → 0.20.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/render-adjustment-type.js +50 -48
- package/dist/_chunks/sidebar-scratchpad.js +714 -326
- package/dist/_chunks/task-detail-panel.js +1638 -1175
- package/dist/_chunks/vendor.js +1154 -1123
- package/dist/dashboard/index.d.ts +20 -0
- package/dist/dashboard/index.d.ts.map +1 -1
- package/dist/dashboard/index.js +451 -5
- package/dist/dashboard/project-health-card.d.ts +22 -0
- package/dist/dashboard/project-health-card.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/index.d.ts +13 -0
- package/dist/dashboard/scratchpad/index.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-add-input.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts +15 -0
- package/dist/dashboard/scratchpad/scratchpad-collapse.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts +44 -0
- package/dist/dashboard/scratchpad/scratchpad-context.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-empty-state.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts +7 -0
- package/dist/dashboard/scratchpad/scratchpad-filter-toggle.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-header.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts +13 -0
- package/dist/dashboard/scratchpad/scratchpad-item.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts +9 -0
- package/dist/dashboard/scratchpad/scratchpad-list.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts +11 -0
- package/dist/dashboard/scratchpad/scratchpad-progress-ring.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts +8 -0
- package/dist/dashboard/scratchpad/scratchpad-root.d.ts.map +1 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts +29 -0
- package/dist/dashboard/scratchpad/scratchpad.d.ts.map +1 -0
- package/dist/dashboard/scratchpad-widget.d.ts +5 -5
- package/dist/dashboard/scratchpad-widget.d.ts.map +1 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts +8 -1
- package/dist/dashboard/sidebar-scratchpad.d.ts.map +1 -1
- package/dist/dashboard/week-heatmap/index.d.ts +10 -0
- package/dist/dashboard/week-heatmap/index.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts +31 -0
- package/dist/dashboard/week-heatmap/week-heatmap-context.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day-strip.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts +15 -0
- package/dist/dashboard/week-heatmap/week-heatmap-day.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-progress-bar.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts +8 -0
- package/dist/dashboard/week-heatmap/week-heatmap-root.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-streak.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts +7 -0
- package/dist/dashboard/week-heatmap/week-heatmap-summary.d.ts.map +1 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts +33 -0
- package/dist/dashboard/week-heatmap/week-heatmap.d.ts.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +57 -56
- package/dist/tasks/activity-tab.d.ts +2 -11
- package/dist/tasks/activity-tab.d.ts.map +1 -1
- package/dist/tasks/conversation-tab.d.ts +2 -21
- package/dist/tasks/conversation-tab.d.ts.map +1 -1
- package/dist/tasks/files-tab.d.ts +2 -18
- package/dist/tasks/files-tab.d.ts.map +1 -1
- package/dist/tasks/index.d.ts +13 -6
- package/dist/tasks/index.d.ts.map +1 -1
- package/dist/tasks/index.js +766 -8
- package/dist/tasks/pickers/index.d.ts +16 -0
- package/dist/tasks/pickers/index.d.ts.map +1 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-assignee-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-column-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-column-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-date-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-date-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-label-editor.d.ts +13 -0
- package/dist/tasks/pickers/task-label-editor.d.ts.map +1 -0
- package/dist/tasks/pickers/task-member-picker.d.ts +14 -0
- package/dist/tasks/pickers/task-member-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts +12 -0
- package/dist/tasks/pickers/task-priority-picker.d.ts.map +1 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts +13 -0
- package/dist/tasks/pickers/task-visibility-picker.d.ts.map +1 -0
- package/dist/tasks/review-tab.d.ts +4 -20
- package/dist/tasks/review-tab.d.ts.map +1 -1
- package/dist/tasks/subtasks-tab.d.ts +2 -18
- package/dist/tasks/subtasks-tab.d.ts.map +1 -1
- package/dist/tasks/tabs/activity-entry.d.ts +9 -0
- package/dist/tasks/tabs/activity-entry.d.ts.map +1 -0
- package/dist/tasks/tabs/activity-timeline.d.ts +8 -0
- package/dist/tasks/tabs/activity-timeline.d.ts.map +1 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts +10 -0
- package/dist/tasks/tabs/file-drop-zone.d.ts.map +1 -0
- package/dist/tasks/tabs/file-item.d.ts +11 -0
- package/dist/tasks/tabs/file-item.d.ts.map +1 -0
- package/dist/tasks/tabs/file-list.d.ts +8 -0
- package/dist/tasks/tabs/file-list.d.ts.map +1 -0
- package/dist/tasks/tabs/index.d.ts +34 -0
- package/dist/tasks/tabs/index.d.ts.map +1 -0
- package/dist/tasks/tabs/message-bubble.d.ts +14 -0
- package/dist/tasks/tabs/message-bubble.d.ts.map +1 -0
- package/dist/tasks/tabs/message-input.d.ts +16 -0
- package/dist/tasks/tabs/message-input.d.ts.map +1 -0
- package/dist/tasks/tabs/message-list.d.ts +9 -0
- package/dist/tasks/tabs/message-list.d.ts.map +1 -0
- package/dist/tasks/tabs/review-card.d.ts +10 -0
- package/dist/tasks/tabs/review-card.d.ts.map +1 -0
- package/dist/tasks/tabs/review-request-button.d.ts +10 -0
- package/dist/tasks/tabs/review-request-button.d.ts.map +1 -0
- package/dist/tasks/tabs/review-response-form.d.ts +11 -0
- package/dist/tasks/tabs/review-response-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts +9 -0
- package/dist/tasks/tabs/subtask-add-form.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-item.d.ts +12 -0
- package/dist/tasks/tabs/subtask-item.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-list.d.ts +8 -0
- package/dist/tasks/tabs/subtask-list.d.ts.map +1 -0
- package/dist/tasks/tabs/subtask-progress.d.ts +9 -0
- package/dist/tasks/tabs/subtask-progress.d.ts.map +1 -0
- package/dist/tasks/tabs/visibility-warning.d.ts +7 -0
- package/dist/tasks/tabs/visibility-warning.d.ts.map +1 -0
- package/dist/tasks/task-action-row/index.d.ts +3 -0
- package/dist/tasks/task-action-row/index.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-checkbox.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts +21 -0
- package/dist/tasks/task-action-row/task-action-row-context.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-due-date.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-labels.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-navigate.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-priority.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts +8 -0
- package/dist/tasks/task-action-row/task-action-row-project-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts +14 -0
- package/dist/tasks/task-action-row/task-action-row-root.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts +5 -0
- package/dist/tasks/task-action-row/task-action-row-status-badge.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts +9 -0
- package/dist/tasks/task-action-row/task-action-row-title.d.ts.map +1 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts +48 -0
- package/dist/tasks/task-action-row/task-action-row.d.ts.map +1 -0
- package/dist/tasks/task-detail-panel.d.ts.map +1 -1
- package/dist/tasks/task-panel.d.ts +104 -0
- package/dist/tasks/task-panel.d.ts.map +1 -0
- package/dist/tasks/task-properties.d.ts +2 -12
- package/dist/tasks/task-properties.d.ts.map +1 -1
- package/dist/tasks/task-types.d.ts +104 -0
- package/dist/tasks/task-types.d.ts.map +1 -0
- package/docs/components/admin/admin-dashboard.md +6 -6
- package/docs/components/admin/admin-utils.md +2 -2
- package/docs/components/admin/break-admin.md +14 -14
- package/docs/components/board/board-provider.md +16 -0
- package/docs/components/board/column-empty.md +1 -1
- package/docs/components/board/task-card.md +4 -0
- package/docs/components/chat/streaming-text.md +1 -1
- package/docs/components/client/client-portal-header.md +2 -2
- package/docs/components/dashboard/attendance-cta.md +3 -3
- package/docs/components/dashboard/daily-brief.md +1 -1
- package/docs/components/dashboard/project-health-card.md +90 -0
- package/docs/components/dashboard/scratchpad-widget.md +17 -0
- package/docs/components/dashboard/scratchpad.md +151 -0
- package/docs/components/dashboard/sidebar-scratchpad.md +29 -5
- package/docs/components/dashboard/week-heatmap.md +95 -0
- package/docs/components/tasks/activity-tab.md +4 -0
- package/docs/components/tasks/conversation-tab.md +4 -0
- package/docs/components/tasks/files-tab.md +4 -0
- package/docs/components/tasks/review-tab.md +5 -1
- package/docs/components/tasks/subtasks-tab.md +5 -0
- package/docs/components/tasks/task-action-row.md +159 -0
- package/docs/components/tasks/task-assignee-picker.md +36 -0
- package/docs/components/tasks/task-column-picker.md +37 -0
- package/docs/components/tasks/task-date-picker.md +49 -0
- package/docs/components/tasks/task-detail-panel.md +256 -84
- package/docs/components/tasks/task-label-editor.md +42 -0
- package/docs/components/tasks/task-member-picker.md +35 -0
- package/docs/components/tasks/task-panel.md +89 -0
- package/docs/components/tasks/task-priority-picker.md +37 -0
- package/docs/components/tasks/task-properties.md +5 -0
- package/docs/components/tasks/task-visibility-picker.md +38 -0
- package/llms.txt +40 -13
- package/package.json +1 -1
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
3
|
-
import * as
|
|
4
|
-
import { useState as C, useRef as
|
|
5
|
-
import { cn as
|
|
6
|
-
import { IconCheck as
|
|
7
|
-
import { AnimatePresence as
|
|
8
|
-
import { m as
|
|
9
|
-
import { springs as
|
|
10
|
-
import { formatRelativeTime as
|
|
11
|
-
import { M as
|
|
12
|
-
import { Checkbox as
|
|
13
|
-
import { Input as
|
|
14
|
-
import { Button as
|
|
15
|
-
function
|
|
16
|
-
const
|
|
17
|
-
return
|
|
3
|
+
import * as w from "react";
|
|
4
|
+
import { useState as C, useMemo as j, useContext as ne, createContext as de, useRef as L, useEffect as B, useCallback as ie } from "react";
|
|
5
|
+
import { cn as h } from "@devalok/shilp-sutra/ui/lib/utils";
|
|
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
|
+
import { AnimatePresence as K, motion as A } from "framer-motion";
|
|
8
|
+
import { m as Ne } from "./markdown-components.js";
|
|
9
|
+
import { springs as $, motionProps as ve } from "@devalok/shilp-sutra/ui/lib/motion";
|
|
10
|
+
import { formatRelativeTime as ye } from "@devalok/shilp-sutra/ui/lib/date-utils";
|
|
11
|
+
import { M as we, u as Se, C as ke, b as Ce, d as M, g as Ie, D as Re, i as De, S as Ae, v as Ee, K as Te, P as Pe } from "./vendor.js";
|
|
12
|
+
import { Checkbox as je } from "@devalok/shilp-sutra/ui/checkbox";
|
|
13
|
+
import { Input as F } from "@devalok/shilp-sutra/ui/input";
|
|
14
|
+
import { Button as Me } from "@devalok/shilp-sutra/ui/button";
|
|
15
|
+
function _e() {
|
|
16
|
+
const N = (/* @__PURE__ */ new Date()).getHours();
|
|
17
|
+
return N < 12 ? "Good morning" : N < 17 ? "Good afternoon" : "Good evening";
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function Le() {
|
|
20
20
|
return (/* @__PURE__ */ new Date()).toLocaleDateString("en-IN", {
|
|
21
21
|
weekday: "long",
|
|
22
22
|
day: "numeric",
|
|
@@ -25,206 +25,206 @@ function ee() {
|
|
|
25
25
|
timeZone: "Asia/Kolkata"
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
return new Date(
|
|
28
|
+
function Be(N) {
|
|
29
|
+
return new Date(N).toLocaleTimeString("en-IN", {
|
|
30
30
|
hour: "2-digit",
|
|
31
31
|
minute: "2-digit",
|
|
32
32
|
hour12: !0,
|
|
33
33
|
timeZone: "Asia/Kolkata"
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
const
|
|
36
|
+
const Ke = w.forwardRef(
|
|
37
37
|
function({
|
|
38
|
-
userName:
|
|
39
|
-
attendance:
|
|
40
|
-
canMarkAttendance:
|
|
41
|
-
onMarkAttendance:
|
|
42
|
-
isSubmitting:
|
|
43
|
-
formatTime:
|
|
44
|
-
className:
|
|
45
|
-
...
|
|
46
|
-
},
|
|
47
|
-
var
|
|
48
|
-
const
|
|
49
|
-
return
|
|
38
|
+
userName: t,
|
|
39
|
+
attendance: a,
|
|
40
|
+
canMarkAttendance: n,
|
|
41
|
+
onMarkAttendance: o,
|
|
42
|
+
isSubmitting: d = !1,
|
|
43
|
+
formatTime: c = Be,
|
|
44
|
+
className: l,
|
|
45
|
+
...i
|
|
46
|
+
}, u) {
|
|
47
|
+
var g, k;
|
|
48
|
+
const r = ((g = a == null ? void 0 : a.attendance) == null ? void 0 : g.status) ?? "Not_Marked", x = r === "PRESENT" || d, b = r === "BREAK", f = (k = a == null ? void 0 : a.attendance) == null ? void 0 : k.timeIn, m = _e(), p = (t == null ? void 0 : t.split(" ")[0]) || "there", v = Le();
|
|
49
|
+
return x && !b ? /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", l), ...i, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
50
50
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02", children: [
|
|
51
51
|
/* @__PURE__ */ s("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
52
|
-
|
|
52
|
+
m,
|
|
53
53
|
",",
|
|
54
54
|
" ",
|
|
55
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children:
|
|
55
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
56
56
|
] }),
|
|
57
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children:
|
|
57
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: v })
|
|
58
58
|
] }),
|
|
59
59
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-success-3 px-ds-05 py-ds-03", children: [
|
|
60
|
-
/* @__PURE__ */ e("div", { className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-full bg-success-9", children: /* @__PURE__ */ e(
|
|
60
|
+
/* @__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
61
|
/* @__PURE__ */ s("span", { className: "text-ds-md font-semibold text-success-11", children: [
|
|
62
62
|
"Marked at",
|
|
63
63
|
" ",
|
|
64
|
-
|
|
64
|
+
f ? c(f) : "--:--"
|
|
65
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-1 shadow-01", l), ...i, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-05b sm:px-ds-07", children: [
|
|
68
68
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02", children: [
|
|
69
69
|
/* @__PURE__ */ s("h2", { className: "text-ds-2xl text-surface-fg", children: [
|
|
70
|
-
|
|
70
|
+
m,
|
|
71
71
|
",",
|
|
72
72
|
" ",
|
|
73
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children:
|
|
73
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
74
74
|
] }),
|
|
75
|
-
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children:
|
|
75
|
+
/* @__PURE__ */ e("p", { className: "text-ds-md text-surface-fg-subtle", children: v })
|
|
76
76
|
] }),
|
|
77
77
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-warning-3 px-ds-05 py-ds-03", children: [
|
|
78
|
-
/* @__PURE__ */ e(
|
|
78
|
+
/* @__PURE__ */ e(le, { className: "h-ico-sm w-ico-sm text-warning-11" }),
|
|
79
79
|
/* @__PURE__ */ s("span", { className: "text-ds-md font-semibold text-warning-11", children: [
|
|
80
80
|
"On break",
|
|
81
|
-
|
|
81
|
+
a != null && a.breakReason ? ` — ${a.breakReason}` : ""
|
|
82
82
|
] })
|
|
83
83
|
] })
|
|
84
|
-
] }) }) :
|
|
84
|
+
] }) }) : n ? /* @__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__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-07 sm:px-ds-07 sm:py-ds-08", children: [
|
|
85
85
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
86
86
|
/* @__PURE__ */ s("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
87
|
-
|
|
87
|
+
m,
|
|
88
88
|
",",
|
|
89
89
|
" ",
|
|
90
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children:
|
|
90
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
91
91
|
] }),
|
|
92
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children:
|
|
92
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: /* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: v }) })
|
|
93
93
|
] }),
|
|
94
94
|
/* @__PURE__ */ s(
|
|
95
95
|
"button",
|
|
96
96
|
{
|
|
97
97
|
type: "button",
|
|
98
|
-
onClick:
|
|
99
|
-
disabled:
|
|
98
|
+
onClick: o,
|
|
99
|
+
disabled: d,
|
|
100
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-02 transition-all duration-150 ease-out hover:-translate-y-0.5 hover:shadow-03 active:translate-y-0 active:scale-[0.98] disabled:opacity-action-disabled",
|
|
101
101
|
children: [
|
|
102
|
-
|
|
103
|
-
!
|
|
102
|
+
d ? "Marking..." : "Mark Attendance",
|
|
103
|
+
!d && /* @__PURE__ */ e(me, { className: "h-ico-sm w-ico-sm" })
|
|
104
104
|
]
|
|
105
105
|
}
|
|
106
106
|
)
|
|
107
|
-
] }) }) : /* @__PURE__ */ e("div", { ref:
|
|
107
|
+
] }) }) : /* @__PURE__ */ e("div", { ref: u, className: h("relative overflow-hidden rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", l), ...i, children: /* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-06 py-ds-06 sm:px-ds-07 sm:py-ds-07", children: [
|
|
108
108
|
/* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-02b", children: [
|
|
109
109
|
/* @__PURE__ */ s("h2", { className: "text-ds-3xl text-surface-fg", children: [
|
|
110
|
-
|
|
110
|
+
m,
|
|
111
111
|
",",
|
|
112
112
|
" ",
|
|
113
|
-
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children:
|
|
113
|
+
/* @__PURE__ */ e("span", { className: "font-semibold italic text-accent-11", children: p })
|
|
114
114
|
] }),
|
|
115
|
-
/* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children:
|
|
115
|
+
/* @__PURE__ */ e("p", { className: "text-ds-base text-surface-fg-subtle", children: v })
|
|
116
116
|
] }),
|
|
117
117
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03 rounded-ds-xl bg-surface-2 px-ds-05 py-ds-03", children: [
|
|
118
|
-
/* @__PURE__ */ e(
|
|
118
|
+
/* @__PURE__ */ e(fe, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
119
119
|
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: "Attendance window closed" })
|
|
120
120
|
] })
|
|
121
121
|
] }) });
|
|
122
122
|
}
|
|
123
123
|
);
|
|
124
|
-
|
|
124
|
+
Ke.displayName = "AttendanceCTA";
|
|
125
125
|
const _ = [
|
|
126
126
|
"bg-category-amber-9",
|
|
127
127
|
"bg-category-teal-9",
|
|
128
128
|
"bg-category-cyan-9",
|
|
129
129
|
"bg-accent-9",
|
|
130
130
|
"bg-accent-9"
|
|
131
|
-
],
|
|
131
|
+
], $e = w.forwardRef(
|
|
132
132
|
function({
|
|
133
|
-
data:
|
|
134
|
-
loading:
|
|
135
|
-
onRefresh:
|
|
136
|
-
unavailable:
|
|
137
|
-
collapsible:
|
|
138
|
-
defaultCollapsed:
|
|
139
|
-
title:
|
|
140
|
-
className:
|
|
141
|
-
...
|
|
142
|
-
},
|
|
143
|
-
const [
|
|
144
|
-
if (
|
|
145
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
133
|
+
data: t,
|
|
134
|
+
loading: a = !1,
|
|
135
|
+
onRefresh: n,
|
|
136
|
+
unavailable: o = !1,
|
|
137
|
+
collapsible: d = !0,
|
|
138
|
+
defaultCollapsed: c = !1,
|
|
139
|
+
title: l,
|
|
140
|
+
className: i,
|
|
141
|
+
...u
|
|
142
|
+
}, r) {
|
|
143
|
+
const [x, b] = C(c), f = l ?? "Morning Brief";
|
|
144
|
+
if (a && !t)
|
|
145
|
+
return /* @__PURE__ */ s("div", { ref: r, className: h("flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 p-ds-05b", i), ...u, children: [
|
|
146
146
|
/* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
147
147
|
/* @__PURE__ */ e("div", { className: "h-ico-sm w-ico-sm animate-pulse rounded bg-surface-2" }),
|
|
148
148
|
/* @__PURE__ */ e("div", { className: "h-4 w-24 animate-pulse rounded bg-surface-2" })
|
|
149
149
|
] }),
|
|
150
|
-
[1, 2, 3].map((
|
|
150
|
+
[1, 2, 3].map((p) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
151
151
|
/* @__PURE__ */ e("div", { className: "mt-ds-02b h-2 w-2 shrink-0 animate-pulse rounded-ds-full bg-surface-2" }),
|
|
152
152
|
/* @__PURE__ */ e(
|
|
153
153
|
"div",
|
|
154
154
|
{
|
|
155
155
|
className: "h-4 animate-pulse rounded bg-surface-2",
|
|
156
|
-
style: { width: `${60 +
|
|
156
|
+
style: { width: `${60 + p * 10}%` }
|
|
157
157
|
}
|
|
158
158
|
)
|
|
159
|
-
] },
|
|
159
|
+
] }, p))
|
|
160
160
|
] });
|
|
161
|
-
if (
|
|
162
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
163
|
-
/* @__PURE__ */ e(
|
|
161
|
+
if (o)
|
|
162
|
+
return /* @__PURE__ */ s("div", { ref: r, className: h("flex items-center gap-ds-03 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 px-ds-05b py-ds-05", i), ...u, children: [
|
|
163
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-surface-fg-subtle" }),
|
|
164
164
|
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-subtle", children: "AI brief unavailable" })
|
|
165
165
|
] });
|
|
166
|
-
if (!
|
|
167
|
-
const
|
|
168
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
166
|
+
if (!t || t.brief.length === 0) return null;
|
|
167
|
+
const m = !d || !x;
|
|
168
|
+
return /* @__PURE__ */ s("div", { ref: r, className: h("flex flex-col rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01", i), ...u, children: [
|
|
169
169
|
/* @__PURE__ */ s("div", { className: "flex items-center justify-between px-ds-05b py-ds-05", children: [
|
|
170
|
-
|
|
170
|
+
d ? /* @__PURE__ */ s(
|
|
171
171
|
"button",
|
|
172
172
|
{
|
|
173
173
|
type: "button",
|
|
174
174
|
"aria-label": "Toggle brief",
|
|
175
|
-
"aria-expanded":
|
|
176
|
-
onClick: () =>
|
|
175
|
+
"aria-expanded": m,
|
|
176
|
+
onClick: () => b(!x),
|
|
177
177
|
className: "flex flex-1 items-center gap-ds-03 transition-colors hover:opacity-80",
|
|
178
178
|
children: [
|
|
179
|
-
/* @__PURE__ */ e(
|
|
180
|
-
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children:
|
|
179
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
180
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: f }),
|
|
181
181
|
/* @__PURE__ */ e(
|
|
182
|
-
|
|
182
|
+
D,
|
|
183
183
|
{
|
|
184
|
-
className:
|
|
184
|
+
className: h(
|
|
185
185
|
"h-ico-sm w-ico-sm text-surface-fg-subtle transition-transform duration-200",
|
|
186
|
-
|
|
186
|
+
m && "rotate-180"
|
|
187
187
|
)
|
|
188
188
|
}
|
|
189
189
|
)
|
|
190
190
|
]
|
|
191
191
|
}
|
|
192
192
|
) : /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
193
|
-
/* @__PURE__ */ e(
|
|
194
|
-
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children:
|
|
193
|
+
/* @__PURE__ */ e(R, { className: "h-ico-sm w-ico-sm text-accent-11" }),
|
|
194
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: f })
|
|
195
195
|
] }),
|
|
196
|
-
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children:
|
|
196
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: n && /* @__PURE__ */ e(
|
|
197
197
|
"button",
|
|
198
198
|
{
|
|
199
199
|
type: "button",
|
|
200
|
-
onClick:
|
|
200
|
+
onClick: n,
|
|
201
201
|
"aria-label": "Refresh brief",
|
|
202
202
|
className: "p-1.5 rounded hover:bg-surface-2 transition-colors",
|
|
203
|
-
children: /* @__PURE__ */ e(
|
|
203
|
+
children: /* @__PURE__ */ e(ue, { className: h("h-ico-sm w-ico-sm text-surface-fg-subtle", a && "animate-spin") })
|
|
204
204
|
}
|
|
205
205
|
) })
|
|
206
206
|
] }),
|
|
207
|
-
/* @__PURE__ */ e(
|
|
208
|
-
|
|
207
|
+
/* @__PURE__ */ e(K, { initial: !1, children: m && /* @__PURE__ */ e(
|
|
208
|
+
A.div,
|
|
209
209
|
{
|
|
210
210
|
initial: { height: 0, opacity: 0 },
|
|
211
211
|
animate: { height: "auto", opacity: 1 },
|
|
212
212
|
exit: { height: 0, opacity: 0 },
|
|
213
|
-
transition:
|
|
213
|
+
transition: $.smooth,
|
|
214
214
|
className: "overflow-hidden",
|
|
215
215
|
children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-ds-03 border-t border-surface-border-strong px-ds-05b pb-ds-05b pt-ds-05", children: [
|
|
216
|
-
|
|
216
|
+
t.brief.map((p, v) => /* @__PURE__ */ s("div", { className: "flex items-start gap-ds-04", children: [
|
|
217
217
|
/* @__PURE__ */ e(
|
|
218
218
|
"div",
|
|
219
219
|
{
|
|
220
|
-
className:
|
|
220
|
+
className: h("mt-ds-02b h-2 w-2 shrink-0 rounded-ds-full", _[v % _.length])
|
|
221
221
|
}
|
|
222
222
|
),
|
|
223
|
-
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg-muted [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-surface-3 [&_code]:px-1 [&_code]:py-ds-01 [&_code]:text-ds-sm [&_a]:text-accent-11 [&_a]:underline", children: /* @__PURE__ */ e(
|
|
224
|
-
] },
|
|
223
|
+
/* @__PURE__ */ e("div", { className: "text-ds-md text-surface-fg-muted [&_p]:mb-0 [&_strong]:font-semibold [&_code]:rounded [&_code]:bg-surface-3 [&_code]:px-1 [&_code]:py-ds-01 [&_code]:text-ds-sm [&_a]:text-accent-11 [&_a]:underline", children: /* @__PURE__ */ e(we, { components: Ne, children: p }) })
|
|
224
|
+
] }, v)),
|
|
225
225
|
/* @__PURE__ */ s("div", { className: "mt-ds-02 text-ds-xs text-surface-fg-subtle", children: [
|
|
226
226
|
"Generated ",
|
|
227
|
-
|
|
227
|
+
ye(t.generatedAt)
|
|
228
228
|
] })
|
|
229
229
|
] })
|
|
230
230
|
}
|
|
@@ -232,279 +232,667 @@ const _ = [
|
|
|
232
232
|
] });
|
|
233
233
|
}
|
|
234
234
|
);
|
|
235
|
-
|
|
236
|
-
const
|
|
237
|
-
function
|
|
238
|
-
const
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
"/",
|
|
279
|
-
a
|
|
280
|
-
] })
|
|
281
|
-
]
|
|
282
|
-
}
|
|
235
|
+
$e.displayName = "DailyBrief";
|
|
236
|
+
const z = de(null);
|
|
237
|
+
function I() {
|
|
238
|
+
const N = ne(z);
|
|
239
|
+
if (!N)
|
|
240
|
+
throw new Error("useScratchpad must be used within a ScratchpadProvider");
|
|
241
|
+
return N;
|
|
242
|
+
}
|
|
243
|
+
function H({
|
|
244
|
+
children: N,
|
|
245
|
+
items: t,
|
|
246
|
+
maxItems: a = 20,
|
|
247
|
+
onToggle: n,
|
|
248
|
+
onAdd: o,
|
|
249
|
+
onDelete: d,
|
|
250
|
+
onEdit: c,
|
|
251
|
+
onReorder: l,
|
|
252
|
+
onPromote: i,
|
|
253
|
+
defaultShowCompleted: u = !0
|
|
254
|
+
}) {
|
|
255
|
+
const [r, x] = C(u), b = j(
|
|
256
|
+
() => r ? t : t.filter((m) => !m.done),
|
|
257
|
+
[t, r]
|
|
258
|
+
), f = j(
|
|
259
|
+
() => ({
|
|
260
|
+
items: t,
|
|
261
|
+
visibleItems: b,
|
|
262
|
+
maxItems: a,
|
|
263
|
+
showCompleted: r,
|
|
264
|
+
setShowCompleted: x,
|
|
265
|
+
onToggle: n,
|
|
266
|
+
onAdd: o,
|
|
267
|
+
onDelete: d,
|
|
268
|
+
onEdit: c,
|
|
269
|
+
onReorder: l,
|
|
270
|
+
onPromote: i,
|
|
271
|
+
canAdd: !!o,
|
|
272
|
+
canDelete: !!d,
|
|
273
|
+
canEdit: !!c,
|
|
274
|
+
canReorder: !!l,
|
|
275
|
+
canPromote: !!i
|
|
276
|
+
}),
|
|
277
|
+
[t, b, a, r, n, o, d, c, l, i]
|
|
283
278
|
);
|
|
279
|
+
return /* @__PURE__ */ e(z.Provider, { value: f, children: N });
|
|
284
280
|
}
|
|
285
|
-
|
|
281
|
+
H.displayName = "ScratchpadProvider";
|
|
282
|
+
const O = w.forwardRef(
|
|
286
283
|
function({
|
|
287
|
-
items:
|
|
288
|
-
maxItems:
|
|
289
|
-
onToggle:
|
|
290
|
-
onAdd:
|
|
291
|
-
onDelete:
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
...
|
|
299
|
-
},
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
284
|
+
items: t,
|
|
285
|
+
maxItems: a,
|
|
286
|
+
onToggle: n,
|
|
287
|
+
onAdd: o,
|
|
288
|
+
onDelete: d,
|
|
289
|
+
onEdit: c,
|
|
290
|
+
onReorder: l,
|
|
291
|
+
onPromote: i,
|
|
292
|
+
defaultShowCompleted: u,
|
|
293
|
+
className: r,
|
|
294
|
+
children: x,
|
|
295
|
+
...b
|
|
296
|
+
}, f) {
|
|
297
|
+
return /* @__PURE__ */ e(
|
|
298
|
+
H,
|
|
299
|
+
{
|
|
300
|
+
items: t,
|
|
301
|
+
maxItems: a,
|
|
302
|
+
onToggle: n,
|
|
303
|
+
onAdd: o,
|
|
304
|
+
onDelete: d,
|
|
305
|
+
onEdit: c,
|
|
306
|
+
onReorder: l,
|
|
307
|
+
onPromote: i,
|
|
308
|
+
defaultShowCompleted: u,
|
|
309
|
+
children: /* @__PURE__ */ e("div", { ref: f, className: h("flex flex-col", r), ...b, children: x })
|
|
310
|
+
}
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
O.displayName = "ScratchpadRoot";
|
|
315
|
+
const G = w.forwardRef(
|
|
316
|
+
function({ title: t = "Scratchpad", className: a, children: n, ...o }, d) {
|
|
317
|
+
return /* @__PURE__ */ s(
|
|
312
318
|
"div",
|
|
313
319
|
{
|
|
314
|
-
ref:
|
|
315
|
-
className:
|
|
316
|
-
|
|
317
|
-
g
|
|
318
|
-
),
|
|
319
|
-
...y,
|
|
320
|
+
ref: d,
|
|
321
|
+
className: h("flex items-center justify-between px-ds-05b py-ds-05", a),
|
|
322
|
+
...o,
|
|
320
323
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
|
|
323
|
-
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-pulse rounded-full bg-surface-2" })
|
|
324
|
-
] }),
|
|
325
|
-
[1, 2, 3].map((t) => /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
326
|
-
/* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md shrink-0 animate-pulse rounded-ds-sm bg-surface-2" }),
|
|
327
|
-
/* @__PURE__ */ e(
|
|
328
|
-
"div",
|
|
329
|
-
{
|
|
330
|
-
className: "h-4 animate-pulse rounded bg-surface-2",
|
|
331
|
-
style: { width: `${50 + t * 12}%` }
|
|
332
|
-
}
|
|
333
|
-
)
|
|
334
|
-
] }, t))
|
|
324
|
+
/* @__PURE__ */ e("span", { className: "text-ds-base font-semibold text-surface-fg", children: t }),
|
|
325
|
+
n && /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: n })
|
|
335
326
|
]
|
|
336
327
|
}
|
|
337
|
-
)
|
|
338
|
-
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
);
|
|
331
|
+
G.displayName = "ScratchpadHeader";
|
|
332
|
+
const E = w.forwardRef(
|
|
333
|
+
function({ item: t, compact: a = !1, sortable: n = !1, className: o, ...d }, c) {
|
|
334
|
+
const { onToggle: l, onEdit: i, onDelete: u, onPromote: r, canEdit: x, canDelete: b, canPromote: f } = I(), [m, p] = C(!1), [v, g] = C(t.text), k = L(null), {
|
|
335
|
+
attributes: q,
|
|
336
|
+
listeners: J,
|
|
337
|
+
setNodeRef: T,
|
|
338
|
+
transform: Y,
|
|
339
|
+
transition: ee,
|
|
340
|
+
isDragging: te
|
|
341
|
+
} = Se({
|
|
342
|
+
id: t.id,
|
|
343
|
+
disabled: !n
|
|
344
|
+
}), se = n ? {
|
|
345
|
+
transform: ke.Transform.toString(Y),
|
|
346
|
+
transition: ee
|
|
347
|
+
} : void 0;
|
|
348
|
+
B(() => {
|
|
349
|
+
m && k.current && (k.current.focus(), k.current.select());
|
|
350
|
+
}, [m]);
|
|
351
|
+
function P() {
|
|
352
|
+
const y = v.trim();
|
|
353
|
+
y && y !== t.text && i && i(t.id, y), p(!1), g(t.text);
|
|
354
|
+
}
|
|
355
|
+
function ae(y) {
|
|
356
|
+
y.key === "Enter" ? (y.preventDefault(), P()) : y.key === "Escape" && (p(!1), g(t.text));
|
|
357
|
+
}
|
|
358
|
+
function re() {
|
|
359
|
+
x && (g(t.text), p(!0));
|
|
360
|
+
}
|
|
361
|
+
const ce = w.useCallback(
|
|
362
|
+
(y) => {
|
|
363
|
+
T(y), typeof c == "function" ? c(y) : c && (c.current = y);
|
|
364
|
+
},
|
|
365
|
+
[c, T]
|
|
366
|
+
);
|
|
367
|
+
return /* @__PURE__ */ s(
|
|
368
|
+
A.div,
|
|
339
369
|
{
|
|
340
|
-
ref:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
370
|
+
ref: n ? ce : c,
|
|
371
|
+
initial: { opacity: 0, x: -10 },
|
|
372
|
+
animate: { opacity: te ? 0.5 : 1, x: 0 },
|
|
373
|
+
exit: { opacity: 0, x: 20, height: 0 },
|
|
374
|
+
transition: $.snappy,
|
|
375
|
+
style: se,
|
|
376
|
+
className: h(
|
|
377
|
+
"group flex items-center rounded-ds-md transition-colors duration-150 hover:bg-surface-2",
|
|
378
|
+
a ? "gap-ds-02 px-ds-02 py-0.5" : "gap-ds-03 px-ds-02 py-ds-02",
|
|
379
|
+
o
|
|
344
380
|
),
|
|
345
|
-
...
|
|
381
|
+
...d,
|
|
382
|
+
...n ? q : void 0,
|
|
346
383
|
children: [
|
|
347
|
-
/* @__PURE__ */
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
"flex-1 text-ds-md transition-all duration-200 ease-in-out",
|
|
377
|
-
t.done && "text-surface-fg-subtle line-through"
|
|
378
|
-
),
|
|
379
|
-
children: t.text
|
|
380
|
-
}
|
|
381
|
-
),
|
|
382
|
-
/* @__PURE__ */ e(
|
|
383
|
-
"button",
|
|
384
|
-
{
|
|
385
|
-
type: "button",
|
|
386
|
-
onClick: () => u(t.id),
|
|
387
|
-
"aria-label": `Delete ${t.text}`,
|
|
388
|
-
className: "flex h-ico-md w-ico-md items-center justify-center rounded-ds-sm opacity-0 transition-opacity group-hover:opacity-100 group-focus-within:opacity-100 hover:bg-surface-3",
|
|
389
|
-
children: /* @__PURE__ */ e(H, { className: "h-3 w-3 text-surface-fg-subtle" })
|
|
390
|
-
}
|
|
391
|
-
)
|
|
392
|
-
]
|
|
393
|
-
},
|
|
394
|
-
t.id
|
|
395
|
-
)) }) }),
|
|
396
|
-
a.length < r && /* @__PURE__ */ e("div", { className: "mt-ds-02b", children: i ? /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
397
|
-
/* @__PURE__ */ e(
|
|
398
|
-
Q,
|
|
399
|
-
{
|
|
400
|
-
ref: k,
|
|
401
|
-
size: "sm",
|
|
402
|
-
value: x,
|
|
403
|
-
onChange: (t) => w(t.target.value),
|
|
404
|
-
onKeyDown: O,
|
|
405
|
-
onBlur: () => {
|
|
406
|
-
x.trim() || (o(!1), w(""));
|
|
407
|
-
},
|
|
408
|
-
placeholder: "What needs doing?",
|
|
409
|
-
className: "flex-1"
|
|
410
|
-
}
|
|
384
|
+
/* @__PURE__ */ e(
|
|
385
|
+
je,
|
|
386
|
+
{
|
|
387
|
+
checked: t.done,
|
|
388
|
+
onCheckedChange: (y) => l(t.id, y === !0),
|
|
389
|
+
"aria-label": `Toggle ${t.text}`,
|
|
390
|
+
className: a ? "h-3.5 w-3.5" : "h-4 w-4"
|
|
391
|
+
}
|
|
392
|
+
),
|
|
393
|
+
m ? /* @__PURE__ */ e(
|
|
394
|
+
F,
|
|
395
|
+
{
|
|
396
|
+
ref: k,
|
|
397
|
+
size: "sm",
|
|
398
|
+
value: v,
|
|
399
|
+
onChange: (y) => g(y.target.value),
|
|
400
|
+
onKeyDown: ae,
|
|
401
|
+
onBlur: P,
|
|
402
|
+
className: "flex-1"
|
|
403
|
+
}
|
|
404
|
+
) : /* @__PURE__ */ e(
|
|
405
|
+
"span",
|
|
406
|
+
{
|
|
407
|
+
onDoubleClick: re,
|
|
408
|
+
className: h(
|
|
409
|
+
"flex-1 transition-all duration-200 ease-in-out",
|
|
410
|
+
a ? "text-ds-sm" : "text-ds-md",
|
|
411
|
+
t.done && "text-surface-fg-subtle line-through",
|
|
412
|
+
!t.done && (a ? "text-surface-fg" : "")
|
|
411
413
|
),
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
onMouseDown: (t) => t.preventDefault(),
|
|
418
|
-
children: "Add"
|
|
419
|
-
}
|
|
420
|
-
)
|
|
421
|
-
] }) : /* @__PURE__ */ e(
|
|
414
|
+
children: t.text
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ s("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
|
+
f && r && /* @__PURE__ */ e(
|
|
422
419
|
"button",
|
|
423
420
|
{
|
|
424
421
|
type: "button",
|
|
425
|
-
onClick: () =>
|
|
426
|
-
|
|
427
|
-
|
|
422
|
+
onClick: () => r(t.id),
|
|
423
|
+
"aria-label": `Promote ${t.text}`,
|
|
424
|
+
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
|
+
children: /* @__PURE__ */ e(he, { className: "h-3 w-3" })
|
|
428
426
|
}
|
|
429
|
-
)
|
|
430
|
-
|
|
427
|
+
),
|
|
428
|
+
b && u && /* @__PURE__ */ e(
|
|
429
|
+
"button",
|
|
430
|
+
{
|
|
431
|
+
type: "button",
|
|
432
|
+
onClick: () => u(t.id),
|
|
433
|
+
"aria-label": `Delete ${t.text}`,
|
|
434
|
+
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
|
+
children: /* @__PURE__ */ e(pe, { className: "h-3 w-3" })
|
|
436
|
+
}
|
|
437
|
+
),
|
|
438
|
+
n && /* @__PURE__ */ e(
|
|
439
|
+
"button",
|
|
440
|
+
{
|
|
441
|
+
type: "button",
|
|
442
|
+
className: "flex h-ico-md w-ico-md shrink-0 cursor-grab items-center justify-center text-surface-fg-muted",
|
|
443
|
+
"aria-label": `Drag ${t.text}`,
|
|
444
|
+
...J,
|
|
445
|
+
children: /* @__PURE__ */ e(xe, { className: "h-3.5 w-3.5" })
|
|
446
|
+
}
|
|
447
|
+
)
|
|
431
448
|
] })
|
|
432
449
|
]
|
|
433
450
|
}
|
|
434
451
|
);
|
|
435
452
|
}
|
|
436
453
|
);
|
|
437
|
-
|
|
438
|
-
const
|
|
439
|
-
function({
|
|
440
|
-
const
|
|
441
|
-
|
|
454
|
+
E.displayName = "ScratchpadItem";
|
|
455
|
+
const W = w.forwardRef(
|
|
456
|
+
function({ compact: t = !1, className: a, ...n }, o) {
|
|
457
|
+
const { visibleItems: d, items: c, canReorder: l, onReorder: i } = I(), u = Ce(
|
|
458
|
+
M(Pe, { activationConstraint: { distance: 5 } }),
|
|
459
|
+
M(Te)
|
|
460
|
+
), r = ie(
|
|
461
|
+
(f) => {
|
|
462
|
+
const { active: m, over: p } = f;
|
|
463
|
+
if (!p || m.id === p.id || !i) return;
|
|
464
|
+
const v = c.findIndex((k) => k.id === m.id), g = c.findIndex((k) => k.id === p.id);
|
|
465
|
+
v !== -1 && g !== -1 && i(Ie(c, v, g));
|
|
466
|
+
},
|
|
467
|
+
[c, i]
|
|
468
|
+
), x = d.map((f) => f.id), b = /* @__PURE__ */ e(
|
|
469
|
+
"div",
|
|
470
|
+
{
|
|
471
|
+
ref: o,
|
|
472
|
+
className: h("flex flex-col gap-ds-02b", a),
|
|
473
|
+
...l ? void 0 : { role: "list" },
|
|
474
|
+
...n,
|
|
475
|
+
children: /* @__PURE__ */ e(K, { initial: !1, children: d.map((f) => /* @__PURE__ */ e(
|
|
476
|
+
E,
|
|
477
|
+
{
|
|
478
|
+
item: f,
|
|
479
|
+
compact: t,
|
|
480
|
+
sortable: l,
|
|
481
|
+
...l ? void 0 : { role: "listitem" }
|
|
482
|
+
},
|
|
483
|
+
f.id
|
|
484
|
+
)) })
|
|
485
|
+
}
|
|
486
|
+
);
|
|
487
|
+
return l ? /* @__PURE__ */ e(
|
|
488
|
+
Re,
|
|
489
|
+
{
|
|
490
|
+
sensors: u,
|
|
491
|
+
collisionDetection: De,
|
|
492
|
+
onDragEnd: r,
|
|
493
|
+
children: /* @__PURE__ */ e(Ae, { items: x, strategy: Ee, children: b })
|
|
494
|
+
}
|
|
495
|
+
) : b;
|
|
496
|
+
}
|
|
497
|
+
);
|
|
498
|
+
W.displayName = "ScratchpadList";
|
|
499
|
+
const Z = w.forwardRef(
|
|
500
|
+
function({
|
|
501
|
+
placeholder: t = "What needs doing?",
|
|
502
|
+
triggerLabel: a = "+ Add a task...",
|
|
503
|
+
className: n,
|
|
504
|
+
...o
|
|
505
|
+
}, d) {
|
|
506
|
+
const { onAdd: c, canAdd: l, items: i, maxItems: u } = I(), [r, x] = C(!1), [b, f] = C(""), m = L(null);
|
|
507
|
+
if (B(() => {
|
|
508
|
+
r && m.current && m.current.focus();
|
|
509
|
+
}, [r]), !l || i.length >= u) return null;
|
|
510
|
+
function p() {
|
|
511
|
+
const g = b.trim();
|
|
512
|
+
g && c && (c(g), f(""));
|
|
513
|
+
}
|
|
514
|
+
function v(g) {
|
|
515
|
+
g.key === "Enter" ? (g.preventDefault(), p()) : g.key === "Escape" && (x(!1), f(""));
|
|
516
|
+
}
|
|
517
|
+
return /* @__PURE__ */ e("div", { ref: d, className: h("mt-ds-02b", n), ...o, children: r ? /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
518
|
+
/* @__PURE__ */ e(
|
|
519
|
+
F,
|
|
520
|
+
{
|
|
521
|
+
ref: m,
|
|
522
|
+
size: "sm",
|
|
523
|
+
value: b,
|
|
524
|
+
onChange: (g) => f(g.target.value),
|
|
525
|
+
onKeyDown: v,
|
|
526
|
+
onBlur: () => {
|
|
527
|
+
b.trim() || (x(!1), f(""));
|
|
528
|
+
},
|
|
529
|
+
placeholder: t,
|
|
530
|
+
className: "flex-1"
|
|
531
|
+
}
|
|
532
|
+
),
|
|
533
|
+
/* @__PURE__ */ e(
|
|
534
|
+
Me,
|
|
535
|
+
{
|
|
536
|
+
size: "sm",
|
|
537
|
+
onClick: p,
|
|
538
|
+
onMouseDown: (g) => g.preventDefault(),
|
|
539
|
+
children: "Add"
|
|
540
|
+
}
|
|
541
|
+
)
|
|
542
|
+
] }) : /* @__PURE__ */ e(
|
|
543
|
+
"button",
|
|
544
|
+
{
|
|
545
|
+
type: "button",
|
|
546
|
+
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-2",
|
|
548
|
+
children: a
|
|
549
|
+
}
|
|
550
|
+
) });
|
|
551
|
+
}
|
|
552
|
+
);
|
|
553
|
+
Z.displayName = "ScratchpadAddInput";
|
|
554
|
+
const X = w.forwardRef(
|
|
555
|
+
function({ icon: t, message: a = "Nothing here yet. Add a task!", className: n, ...o }, d) {
|
|
556
|
+
const { visibleItems: c } = I();
|
|
557
|
+
return c.length > 0 ? null : /* @__PURE__ */ s(
|
|
558
|
+
"div",
|
|
559
|
+
{
|
|
560
|
+
ref: d,
|
|
561
|
+
className: h(
|
|
562
|
+
"flex flex-col items-center justify-center gap-ds-03 py-ds-06 text-center",
|
|
563
|
+
n
|
|
564
|
+
),
|
|
565
|
+
...o,
|
|
566
|
+
children: [
|
|
567
|
+
t && /* @__PURE__ */ e(t, { className: "h-ico-lg w-ico-lg text-surface-fg-subtle" }),
|
|
568
|
+
/* @__PURE__ */ e("span", { className: "text-ds-md text-surface-fg-subtle", children: a })
|
|
569
|
+
]
|
|
570
|
+
}
|
|
571
|
+
);
|
|
572
|
+
}
|
|
573
|
+
);
|
|
574
|
+
X.displayName = "ScratchpadEmptyState";
|
|
575
|
+
const Fe = {
|
|
576
|
+
sm: { diameter: 16, stroke: 1.5, fontSize: "7px" },
|
|
577
|
+
md: { diameter: 20, stroke: 2, fontSize: "8px" }
|
|
578
|
+
}, Q = w.forwardRef(
|
|
579
|
+
function({ size: t = "md", showCount: a = !0, className: n, ...o }, d) {
|
|
580
|
+
const { items: c, maxItems: l } = I(), i = c.length, u = i > 0 && c.every((g) => g.done), { diameter: r, stroke: x, fontSize: b } = Fe[t], f = (r - x) / 2, m = 2 * Math.PI * f, p = l > 0 ? i / l : 0, v = m * (1 - p);
|
|
581
|
+
return /* @__PURE__ */ s(
|
|
582
|
+
A.div,
|
|
583
|
+
{
|
|
584
|
+
ref: d,
|
|
585
|
+
className: h("relative flex items-center justify-center", n),
|
|
586
|
+
animate: u ? { scale: [1, 1.1, 1] } : {},
|
|
587
|
+
transition: { duration: 0.3 },
|
|
588
|
+
...ve(o),
|
|
589
|
+
children: [
|
|
590
|
+
/* @__PURE__ */ s(
|
|
591
|
+
"svg",
|
|
592
|
+
{
|
|
593
|
+
width: r,
|
|
594
|
+
height: r,
|
|
595
|
+
viewBox: `0 0 ${r} ${r}`,
|
|
596
|
+
className: "-rotate-90",
|
|
597
|
+
children: [
|
|
598
|
+
/* @__PURE__ */ e(
|
|
599
|
+
"circle",
|
|
600
|
+
{
|
|
601
|
+
cx: r / 2,
|
|
602
|
+
cy: r / 2,
|
|
603
|
+
r: f,
|
|
604
|
+
fill: "none",
|
|
605
|
+
strokeWidth: x,
|
|
606
|
+
className: "stroke-surface-2"
|
|
607
|
+
}
|
|
608
|
+
),
|
|
609
|
+
/* @__PURE__ */ e(
|
|
610
|
+
"circle",
|
|
611
|
+
{
|
|
612
|
+
cx: r / 2,
|
|
613
|
+
cy: r / 2,
|
|
614
|
+
r: f,
|
|
615
|
+
fill: "none",
|
|
616
|
+
strokeWidth: x,
|
|
617
|
+
strokeLinecap: "round",
|
|
618
|
+
strokeDasharray: m,
|
|
619
|
+
strokeDashoffset: v,
|
|
620
|
+
className: h(
|
|
621
|
+
"transition-all duration-300",
|
|
622
|
+
u ? "stroke-success-9" : "stroke-accent-9"
|
|
623
|
+
)
|
|
624
|
+
}
|
|
625
|
+
)
|
|
626
|
+
]
|
|
627
|
+
}
|
|
628
|
+
),
|
|
629
|
+
a && /* @__PURE__ */ s(
|
|
630
|
+
"span",
|
|
631
|
+
{
|
|
632
|
+
className: "absolute font-medium text-surface-fg-muted",
|
|
633
|
+
style: { fontSize: b },
|
|
634
|
+
"data-testid": "progress-count",
|
|
635
|
+
children: [
|
|
636
|
+
i,
|
|
637
|
+
"/",
|
|
638
|
+
l
|
|
639
|
+
]
|
|
640
|
+
}
|
|
641
|
+
)
|
|
642
|
+
]
|
|
643
|
+
}
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
);
|
|
647
|
+
Q.displayName = "ScratchpadProgressRing";
|
|
648
|
+
const U = w.forwardRef(
|
|
649
|
+
function({ className: t, ...a }, n) {
|
|
650
|
+
const { showCompleted: o, setShowCompleted: d } = I(), c = o ? ge : be;
|
|
651
|
+
return /* @__PURE__ */ e(
|
|
652
|
+
"button",
|
|
653
|
+
{
|
|
654
|
+
ref: n,
|
|
655
|
+
type: "button",
|
|
656
|
+
onClick: () => d(!o),
|
|
657
|
+
"aria-label": o ? "Hide completed" : "Show completed",
|
|
658
|
+
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-2 hover:text-surface-fg",
|
|
660
|
+
t
|
|
661
|
+
),
|
|
662
|
+
...a,
|
|
663
|
+
children: /* @__PURE__ */ e(c, { className: "h-3.5 w-3.5" })
|
|
664
|
+
}
|
|
665
|
+
);
|
|
666
|
+
}
|
|
667
|
+
);
|
|
668
|
+
U.displayName = "ScratchpadFilterToggle";
|
|
669
|
+
const V = w.forwardRef(
|
|
670
|
+
function({
|
|
671
|
+
label: t = "Scratchpad",
|
|
672
|
+
defaultOpen: a = !0,
|
|
673
|
+
badgeCount: n,
|
|
674
|
+
headerClassName: o,
|
|
675
|
+
className: d,
|
|
676
|
+
children: c,
|
|
677
|
+
...l
|
|
678
|
+
}, i) {
|
|
679
|
+
const [u, r] = C(a);
|
|
680
|
+
return /* @__PURE__ */ s("div", { ref: i, className: h("flex flex-col", d), ...l, children: [
|
|
442
681
|
/* @__PURE__ */ s(
|
|
443
682
|
"button",
|
|
444
683
|
{
|
|
445
684
|
type: "button",
|
|
446
|
-
onClick: () =>
|
|
447
|
-
"aria-expanded":
|
|
448
|
-
className:
|
|
685
|
+
onClick: () => r((x) => !x),
|
|
686
|
+
"aria-expanded": u,
|
|
687
|
+
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-2",
|
|
689
|
+
o
|
|
690
|
+
),
|
|
449
691
|
children: [
|
|
450
692
|
/* @__PURE__ */ e(
|
|
451
|
-
|
|
693
|
+
D,
|
|
452
694
|
{
|
|
453
|
-
className:
|
|
695
|
+
className: h(
|
|
454
696
|
"h-3.5 w-3.5 shrink-0 transition-transform duration-200",
|
|
455
|
-
!
|
|
697
|
+
!u && "-rotate-90"
|
|
456
698
|
)
|
|
457
699
|
}
|
|
458
700
|
),
|
|
459
|
-
/* @__PURE__ */ e("span", { className: "flex-1", children:
|
|
460
|
-
|
|
701
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: t }),
|
|
702
|
+
n != null && n > 0 && /* @__PURE__ */ e("span", { className: "rounded-full bg-surface-2 px-1.5 text-ds-xs text-surface-fg-muted", children: n })
|
|
461
703
|
]
|
|
462
704
|
}
|
|
463
705
|
),
|
|
464
706
|
/* @__PURE__ */ e(
|
|
465
707
|
"div",
|
|
466
708
|
{
|
|
467
|
-
className:
|
|
709
|
+
className: h(
|
|
468
710
|
"grid transition-[grid-template-rows] duration-200",
|
|
469
|
-
|
|
711
|
+
u ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
470
712
|
),
|
|
471
|
-
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children:
|
|
472
|
-
|
|
713
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: c })
|
|
714
|
+
}
|
|
715
|
+
)
|
|
716
|
+
] });
|
|
717
|
+
}
|
|
718
|
+
);
|
|
719
|
+
V.displayName = "ScratchpadCollapse";
|
|
720
|
+
const S = {
|
|
721
|
+
Root: O,
|
|
722
|
+
Header: G,
|
|
723
|
+
List: W,
|
|
724
|
+
Item: E,
|
|
725
|
+
AddInput: Z,
|
|
726
|
+
EmptyState: X,
|
|
727
|
+
ProgressRing: Q,
|
|
728
|
+
FilterToggle: U,
|
|
729
|
+
Collapse: V
|
|
730
|
+
}, ze = w.forwardRef(
|
|
731
|
+
function({
|
|
732
|
+
items: t,
|
|
733
|
+
maxItems: a = 5,
|
|
734
|
+
onToggle: n,
|
|
735
|
+
onAdd: o,
|
|
736
|
+
onDelete: d,
|
|
737
|
+
onEdit: c,
|
|
738
|
+
onReorder: l,
|
|
739
|
+
onPromote: i,
|
|
740
|
+
title: u = "My Scratchpad",
|
|
741
|
+
resetLabel: r,
|
|
742
|
+
emptyText: x = "Nothing here yet. Add a task!",
|
|
743
|
+
emptyIcon: b,
|
|
744
|
+
loading: f = !1,
|
|
745
|
+
className: m,
|
|
746
|
+
...p
|
|
747
|
+
}, v) {
|
|
748
|
+
return f ? /* @__PURE__ */ s(
|
|
749
|
+
"div",
|
|
750
|
+
{
|
|
751
|
+
ref: v,
|
|
752
|
+
className: h(
|
|
753
|
+
"flex flex-col gap-ds-04 rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01 p-ds-05b",
|
|
754
|
+
m
|
|
755
|
+
),
|
|
756
|
+
...p,
|
|
757
|
+
children: [
|
|
758
|
+
/* @__PURE__ */ s("div", { className: "flex items-center justify-between", children: [
|
|
759
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-28 animate-pulse rounded bg-surface-2" }),
|
|
760
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-5 animate-pulse rounded-full bg-surface-2" })
|
|
761
|
+
] }),
|
|
762
|
+
[1, 2, 3].map((g) => /* @__PURE__ */ s("div", { className: "flex items-center gap-ds-03", children: [
|
|
763
|
+
/* @__PURE__ */ e("div", { className: "h-ico-md w-ico-md shrink-0 animate-pulse rounded-ds-sm bg-surface-2" }),
|
|
764
|
+
/* @__PURE__ */ e(
|
|
765
|
+
"div",
|
|
766
|
+
{
|
|
767
|
+
className: "h-4 animate-pulse rounded bg-surface-2",
|
|
768
|
+
style: { width: `${50 + g * 12}%` }
|
|
769
|
+
}
|
|
770
|
+
)
|
|
771
|
+
] }, g))
|
|
772
|
+
]
|
|
773
|
+
}
|
|
774
|
+
) : /* @__PURE__ */ s(
|
|
775
|
+
S.Root,
|
|
776
|
+
{
|
|
777
|
+
ref: v,
|
|
778
|
+
items: t,
|
|
779
|
+
maxItems: a,
|
|
780
|
+
onToggle: n,
|
|
781
|
+
onAdd: o,
|
|
782
|
+
onDelete: d,
|
|
783
|
+
onEdit: c,
|
|
784
|
+
onReorder: l,
|
|
785
|
+
onPromote: i,
|
|
786
|
+
className: h(
|
|
787
|
+
"rounded-ds-2xl border border-surface-border-strong bg-surface-1 shadow-01",
|
|
788
|
+
m
|
|
789
|
+
),
|
|
790
|
+
...p,
|
|
791
|
+
children: [
|
|
792
|
+
/* @__PURE__ */ e(S.Header, { title: u, children: /* @__PURE__ */ e(S.ProgressRing, {}) }),
|
|
793
|
+
/* @__PURE__ */ s("div", { className: "flex flex-col border-t border-surface-border-strong px-ds-05b pb-ds-04 pt-ds-04", children: [
|
|
794
|
+
/* @__PURE__ */ e(S.EmptyState, { icon: b, message: x }),
|
|
795
|
+
/* @__PURE__ */ e(S.List, {}),
|
|
796
|
+
/* @__PURE__ */ e(S.AddInput, {}),
|
|
797
|
+
r && /* @__PURE__ */ e("span", { className: "mt-ds-03 text-ds-xs text-surface-fg-subtle", children: r })
|
|
798
|
+
] })
|
|
799
|
+
]
|
|
800
|
+
}
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
);
|
|
804
|
+
ze.displayName = "ScratchpadWidget";
|
|
805
|
+
const He = w.forwardRef(
|
|
806
|
+
function({
|
|
807
|
+
items: t,
|
|
808
|
+
onToggle: a,
|
|
809
|
+
onAdd: n,
|
|
810
|
+
onDelete: o,
|
|
811
|
+
onEdit: d,
|
|
812
|
+
onReorder: c,
|
|
813
|
+
onPromote: l,
|
|
814
|
+
maxItems: i = 20,
|
|
815
|
+
defaultOpen: u = !0,
|
|
816
|
+
// badgeCount kept in signature for back-compat but no longer rendered
|
|
817
|
+
badgeCount: r,
|
|
818
|
+
className: x,
|
|
819
|
+
...b
|
|
820
|
+
}, f) {
|
|
821
|
+
const [m, p] = C(u);
|
|
822
|
+
return /* @__PURE__ */ e(
|
|
823
|
+
S.Root,
|
|
824
|
+
{
|
|
825
|
+
ref: f,
|
|
826
|
+
items: t,
|
|
827
|
+
maxItems: i,
|
|
828
|
+
onToggle: a,
|
|
829
|
+
onAdd: n,
|
|
830
|
+
onDelete: o,
|
|
831
|
+
onEdit: d,
|
|
832
|
+
onReorder: c,
|
|
833
|
+
onPromote: l,
|
|
834
|
+
className: h("flex flex-col", x),
|
|
835
|
+
...b,
|
|
836
|
+
children: /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
|
|
837
|
+
/* @__PURE__ */ s("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: [
|
|
838
|
+
/* @__PURE__ */ s(
|
|
839
|
+
"button",
|
|
840
|
+
{
|
|
841
|
+
type: "button",
|
|
842
|
+
onClick: () => p((v) => !v),
|
|
843
|
+
"aria-expanded": m,
|
|
844
|
+
"aria-label": "Scratchpad",
|
|
845
|
+
className: "flex flex-1 items-center gap-ds-02 text-left transition-colors duration-150 hover:text-surface-fg",
|
|
846
|
+
children: [
|
|
847
|
+
/* @__PURE__ */ e(
|
|
848
|
+
D,
|
|
849
|
+
{
|
|
850
|
+
className: h(
|
|
851
|
+
"h-3.5 w-3.5 shrink-0 transition-transform duration-200",
|
|
852
|
+
!m && "-rotate-90"
|
|
853
|
+
)
|
|
854
|
+
}
|
|
855
|
+
),
|
|
856
|
+
/* @__PURE__ */ e("span", { className: "flex-1", children: "Scratchpad" })
|
|
857
|
+
]
|
|
858
|
+
}
|
|
859
|
+
),
|
|
860
|
+
/* @__PURE__ */ e(S.FilterToggle, {}),
|
|
861
|
+
/* @__PURE__ */ e(S.ProgressRing, { size: "sm", showCount: !1 })
|
|
862
|
+
] }),
|
|
863
|
+
/* @__PURE__ */ e(
|
|
864
|
+
"div",
|
|
473
865
|
{
|
|
474
|
-
className:
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
"aria-label": `Toggle ${c.text}`,
|
|
482
|
-
className: "h-3.5 w-3.5"
|
|
483
|
-
}
|
|
484
|
-
),
|
|
866
|
+
className: h(
|
|
867
|
+
"grid transition-[grid-template-rows] duration-200",
|
|
868
|
+
m ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
869
|
+
),
|
|
870
|
+
children: /* @__PURE__ */ e("div", { className: "overflow-hidden", children: /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 px-ds-03 pb-ds-02", children: [
|
|
871
|
+
/* @__PURE__ */ e(S.EmptyState, {}),
|
|
872
|
+
/* @__PURE__ */ e(S.List, { compact: !0 }),
|
|
485
873
|
/* @__PURE__ */ e(
|
|
486
|
-
|
|
874
|
+
S.AddInput,
|
|
487
875
|
{
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
),
|
|
492
|
-
children: c.text
|
|
876
|
+
placeholder: "Quick add...",
|
|
877
|
+
triggerLabel: "+ Add...",
|
|
878
|
+
className: "mt-0"
|
|
493
879
|
}
|
|
494
880
|
)
|
|
495
|
-
]
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
] });
|
|
881
|
+
] }) })
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
] })
|
|
885
|
+
}
|
|
886
|
+
);
|
|
502
887
|
}
|
|
503
888
|
);
|
|
504
|
-
|
|
889
|
+
He.displayName = "SidebarScratchpad";
|
|
505
890
|
export {
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
891
|
+
Ke as A,
|
|
892
|
+
$e as D,
|
|
893
|
+
ze as S,
|
|
894
|
+
He as a,
|
|
895
|
+
S as b,
|
|
896
|
+
H as c,
|
|
897
|
+
I as u
|
|
510
898
|
};
|