@devalok/shilp-sutra 0.27.2 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/badge-group.js +299 -0
- package/dist/_chunks/framer.js +1915 -1980
- package/dist/_chunks/keybinding.js +4 -5
- package/dist/_chunks/primitives.js +3198 -3272
- package/dist/_chunks/sonner.js +29 -31
- package/dist/_chunks/stat-row.js +110 -131
- package/dist/_chunks/tiptap.js +42 -78
- package/dist/_chunks/tree-view.js +138 -149
- package/dist/_chunks/typing-indicator.js +565 -0
- package/dist/_chunks/use-calendar.js +416 -439
- package/dist/_chunks/vendor-client.js +977 -814
- package/dist/_chunks/vendor-utils.js +5 -5
- package/dist/ai/block-renderer.js +22 -22
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.d.ts.map +1 -1
- package/dist/ai/command-bar.js +241 -263
- package/dist/ai/conversation.d.ts.map +1 -1
- package/dist/ai/conversation.js +87 -107
- package/dist/composed/activity-feed.d.ts +2 -0
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +118 -90
- package/dist/composed/avatar-group.d.ts +1 -0
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +91 -67
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +29 -28
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +99 -113
- package/dist/composed/content-card.js +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.d.ts.map +1 -1
- package/dist/composed/deadline-indicator.js +29 -28
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +30 -27
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/file-preview.d.ts.map +1 -1
- package/dist/composed/file-preview.js +261 -271
- package/dist/composed/filter-bar.d.ts.map +1 -1
- package/dist/composed/filter-bar.js +49 -48
- package/dist/composed/form-section.d.ts.map +1 -1
- package/dist/composed/form-section.js +12 -11
- package/dist/composed/global-loading.js +1 -1
- package/dist/composed/index.js +63 -63
- package/dist/composed/inline-edit.d.ts.map +1 -1
- package/dist/composed/inline-edit.js +55 -54
- package/dist/composed/markdown-viewer.d.ts.map +1 -1
- package/dist/composed/markdown-viewer.js +44 -43
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +35 -34
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +64 -64
- package/dist/composed/page-header.d.ts.map +1 -1
- package/dist/composed/page-header.js +31 -37
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -36
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +287 -306
- package/dist/composed/schedule-view.js +62 -62
- package/dist/composed/status-badge.d.ts +4 -2
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +58 -45
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +93 -93
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +21 -20
- package/dist/shell/index.js +18 -18
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +96 -95
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +82 -85
- package/dist/shell/sidebar.js +59 -60
- package/dist/shell/top-bar.d.ts.map +1 -1
- package/dist/shell/top-bar.js +103 -103
- package/dist/tailwind/index.cjs +37 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +38 -5
- package/dist/tokens/primitives.css +10 -0
- package/dist/tokens/semantic.css +70 -7
- package/dist/ui/accordion.d.ts +5 -2
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +44 -39
- package/dist/ui/alert-dialog.js +57 -57
- package/dist/ui/alert.d.ts +1 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +30 -29
- package/dist/ui/aspect-ratio.js +4 -4
- package/dist/ui/autocomplete.js +56 -56
- package/dist/ui/avatar.js +2 -2
- package/dist/ui/badge-group.d.ts +22 -0
- package/dist/ui/badge-group.d.ts.map +1 -0
- package/dist/ui/badge-group.js +8 -0
- package/dist/ui/badge-indicator.d.ts +32 -0
- package/dist/ui/badge-indicator.d.ts.map +1 -0
- package/dist/ui/badge-indicator.js +54 -0
- package/dist/ui/badge.d.ts +27 -24
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +13 -129
- package/dist/ui/banner.d.ts +1 -1
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +27 -26
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +37 -36
- package/dist/ui/button-group.d.ts +12 -6
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +18 -18
- package/dist/ui/button-processing.d.ts +15 -0
- package/dist/ui/button-processing.d.ts.map +1 -0
- package/dist/ui/button-processing.js +77 -0
- package/dist/ui/button.d.ts +50 -25
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +243 -127
- package/dist/ui/card.js +20 -21
- package/dist/ui/charts/index.js +499 -508
- package/dist/ui/chat/date-separator.d.ts +12 -0
- package/dist/ui/chat/date-separator.d.ts.map +1 -0
- package/dist/ui/chat/index.d.ts +9 -0
- package/dist/ui/chat/index.d.ts.map +1 -0
- package/dist/ui/chat/index.js +12 -0
- package/dist/ui/chat/message-input.d.ts +16 -0
- package/dist/ui/chat/message-input.d.ts.map +1 -0
- package/dist/ui/chat/message-list.d.ts +24 -0
- package/dist/ui/chat/message-list.d.ts.map +1 -0
- package/dist/ui/chat/message.d.ts +108 -0
- package/dist/ui/chat/message.d.ts.map +1 -0
- package/dist/ui/chat/system-message.d.ts +11 -0
- package/dist/ui/chat/system-message.d.ts.map +1 -0
- package/dist/ui/chat/typing-indicator.d.ts +14 -0
- package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
- package/dist/ui/chat/unread-separator.d.ts +12 -0
- package/dist/ui/chat/unread-separator.d.ts.map +1 -0
- package/dist/ui/checkbox.js +18 -18
- package/dist/ui/chip.d.ts +13 -62
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +10 -109
- package/dist/ui/collapsible.js +4 -4
- package/dist/ui/color-input.d.ts +19 -5
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +371 -79
- package/dist/ui/color-swatch.js +11 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +74 -80
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +86 -85
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +51 -57
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +268 -296
- package/dist/ui/devalok-grain.d.ts +81 -0
- package/dist/ui/devalok-grain.d.ts.map +1 -0
- package/dist/ui/devalok-grain.js +69 -0
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +73 -72
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +93 -92
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +82 -82
- package/dist/ui/hover-card.js +29 -29
- package/dist/ui/icon-button.d.ts +7 -7
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-context.d.ts +15 -0
- package/dist/ui/icon-context.d.ts.map +1 -0
- package/dist/ui/icon-context.js +20 -0
- package/dist/ui/icon-group.d.ts +22 -0
- package/dist/ui/icon-group.d.ts.map +1 -0
- package/dist/ui/icon-group.js +32 -0
- package/dist/ui/icon.d.ts +57 -0
- package/dist/ui/icon.d.ts.map +1 -0
- package/dist/ui/icon.js +122 -0
- package/dist/ui/index.d.ts +8 -1
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +351 -329
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +21 -20
- package/dist/ui/input.d.ts +32 -11
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +149 -44
- package/dist/ui/label.js +1 -1
- package/dist/ui/lib/motion.d.ts +2 -0
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +13 -11
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +87 -86
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +23 -28
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +54 -53
- package/dist/ui/pagination.d.ts.map +1 -1
- package/dist/ui/pagination.js +45 -44
- package/dist/ui/popover.js +30 -30
- package/dist/ui/progress.d.ts +3 -1
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +43 -39
- package/dist/ui/radio.js +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +47 -60
- package/dist/ui/segmented-control.js +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +54 -53
- package/dist/ui/separator.js +5 -5
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +46 -45
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +196 -193
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.js +1 -1
- package/dist/ui/spinner.js +74 -74
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +85 -86
- package/dist/ui/switch.d.ts +3 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +40 -26
- package/dist/ui/tabs.js +43 -43
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.js +10 -10
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +169 -169
- package/dist/ui/toggle-group.js +1 -1
- package/dist/ui/toggle.js +5 -5
- package/dist/ui/tooltip.js +41 -41
- package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
- package/docs/components/_header.md +4 -4
- package/docs/components/composed/activity-feed.md +7 -0
- package/docs/components/composed/avatar-group.md +8 -5
- package/docs/components/composed/status-badge.md +14 -1
- package/docs/components/ui/accordion.md +5 -2
- package/docs/components/ui/badge-group.md +38 -0
- package/docs/components/ui/badge-indicator.md +40 -0
- package/docs/components/ui/badge.md +36 -5
- package/docs/components/ui/button-processing.md +15 -0
- package/docs/components/ui/button.md +40 -11
- package/docs/components/ui/chat.md +214 -0
- package/docs/components/ui/color-input.md +58 -4
- package/docs/components/ui/data-table.md +3 -0
- package/docs/components/ui/devalok-grain.md +55 -0
- package/docs/components/ui/icon-button.md +12 -5
- package/docs/components/ui/icon-context.md +38 -0
- package/docs/components/ui/icon-group.md +36 -0
- package/docs/components/ui/icon.md +47 -0
- package/docs/components/ui/input.md +32 -6
- package/docs/components/ui/progress.md +5 -0
- package/docs/components/ui/spinner.md +3 -0
- package/docs/components/ui/switch.md +13 -0
- package/llms-full.txt +724 -44
- package/llms.txt +38 -19
- package/package.json +8 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as w, jsx as
|
|
2
|
+
import { jsxs as w, jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import * as $ from "react";
|
|
4
|
-
import { startOfWeek as S, addDays as E, format as
|
|
4
|
+
import { startOfWeek as S, addDays as E, format as l, isSameDay as k, isToday as C, getHours as v, getMinutes as N, differenceInMinutes as I } from "date-fns";
|
|
5
5
|
import { cn as x } from "../ui/lib/utils.js";
|
|
6
|
-
import { m as
|
|
7
|
-
const
|
|
6
|
+
import { m as D } from "../_chunks/framer.js";
|
|
7
|
+
const A = {
|
|
8
8
|
primary: "bg-accent-2 border-accent-7 text-accent-11",
|
|
9
9
|
success: "bg-success-3 border-success-7 text-success-11",
|
|
10
10
|
warning: "bg-warning-3 border-warning-7 text-warning-11",
|
|
@@ -12,90 +12,90 @@ const P = {
|
|
|
12
12
|
info: "bg-info-3 border-info-7 text-info-11",
|
|
13
13
|
neutral: "bg-surface-raised border-surface-border-strong text-surface-fg-muted"
|
|
14
14
|
};
|
|
15
|
-
function
|
|
15
|
+
function O(r) {
|
|
16
16
|
return r === 0 ? "12 AM" : r < 12 ? `${r} AM` : r === 12 ? "12 PM" : `${r - 12} PM`;
|
|
17
17
|
}
|
|
18
|
-
function
|
|
19
|
-
const
|
|
18
|
+
function P(r, s, o) {
|
|
19
|
+
const i = (o - s) * 60, t = (v(r.start) - s) * 60 + N(r.start), f = I(r.end, r.start), u = t / i * 100, m = f / i * 100;
|
|
20
20
|
return {
|
|
21
|
-
top: `${
|
|
21
|
+
top: `${u}%`,
|
|
22
22
|
height: `${m}%`
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function T({ startHour: r, endHour: s }) {
|
|
26
26
|
const o = [];
|
|
27
27
|
for (let t = r; t < s; t++)
|
|
28
28
|
o.push(t);
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
29
|
+
const i = 100 / (s - r);
|
|
30
|
+
return /* @__PURE__ */ a(
|
|
31
31
|
"div",
|
|
32
32
|
{
|
|
33
33
|
className: "relative shrink-0 w-[60px] border-r border-surface-border-strong",
|
|
34
34
|
"aria-hidden": "true",
|
|
35
|
-
children: o.map((t) => /* @__PURE__ */
|
|
35
|
+
children: o.map((t) => /* @__PURE__ */ a(
|
|
36
36
|
"div",
|
|
37
37
|
{
|
|
38
38
|
className: "text-ds-xs text-surface-fg-muted pr-ds-02 text-right",
|
|
39
|
-
style: { height: `${
|
|
40
|
-
children:
|
|
39
|
+
style: { height: `${i}%` },
|
|
40
|
+
children: O(t)
|
|
41
41
|
},
|
|
42
42
|
t
|
|
43
43
|
))
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function V({
|
|
48
48
|
date: r,
|
|
49
49
|
events: s,
|
|
50
50
|
startHour: o,
|
|
51
|
-
endHour:
|
|
51
|
+
endHour: i,
|
|
52
52
|
slotDuration: t,
|
|
53
|
-
onEventClick:
|
|
54
|
-
onSlotClick:
|
|
53
|
+
onEventClick: f,
|
|
54
|
+
onSlotClick: u,
|
|
55
55
|
showHeader: m
|
|
56
56
|
}) {
|
|
57
|
-
const y = s.filter((e) =>
|
|
57
|
+
const y = s.filter((e) => k(e.start, r)), p = (i - o) * 60, h = p / t, b = [];
|
|
58
58
|
for (let e = 0; e < h; e++) {
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
const
|
|
62
|
-
|
|
59
|
+
const n = new Date(r);
|
|
60
|
+
n.setHours(o, e * t, 0, 0);
|
|
61
|
+
const c = new Date(n);
|
|
62
|
+
c.setMinutes(c.getMinutes() + t), b.push({ start: n, end: c });
|
|
63
63
|
}
|
|
64
|
-
const
|
|
64
|
+
const d = C(r);
|
|
65
65
|
let g = null;
|
|
66
|
-
if (
|
|
67
|
-
const e = /* @__PURE__ */ new Date(),
|
|
68
|
-
|
|
66
|
+
if (d) {
|
|
67
|
+
const e = /* @__PURE__ */ new Date(), n = v(e), c = N(e);
|
|
68
|
+
n >= o && n < i && (g = ((n - o) * 60 + c) / p * 100);
|
|
69
69
|
}
|
|
70
70
|
return /* @__PURE__ */ w("div", { className: "flex flex-1 flex-col min-w-[80px]", children: [
|
|
71
|
-
m && /* @__PURE__ */
|
|
71
|
+
m && /* @__PURE__ */ a(
|
|
72
72
|
"div",
|
|
73
73
|
{
|
|
74
74
|
className: x(
|
|
75
75
|
"text-center text-ds-sm font-semibold py-ds-02 border-b border-surface-border-strong",
|
|
76
|
-
|
|
76
|
+
d ? "text-accent-11 bg-accent-2" : "text-surface-fg bg-surface-raised"
|
|
77
77
|
),
|
|
78
|
-
children:
|
|
78
|
+
children: l(r, "EEE d")
|
|
79
79
|
}
|
|
80
80
|
),
|
|
81
81
|
/* @__PURE__ */ w("div", { className: "relative flex-1", children: [
|
|
82
|
-
b.map((e,
|
|
82
|
+
b.map((e, n) => /* @__PURE__ */ a(
|
|
83
83
|
"button",
|
|
84
84
|
{
|
|
85
85
|
type: "button",
|
|
86
86
|
className: x(
|
|
87
87
|
"block w-full border-b border-surface-border hover:bg-surface-raised-hover transition-colors ease-productive-standard",
|
|
88
|
-
|
|
88
|
+
n % 2 === 0 ? "border-surface-border-strong" : "border-surface-border-subtle"
|
|
89
89
|
),
|
|
90
90
|
style: { height: `${100 / h}%` },
|
|
91
|
-
onClick: () =>
|
|
92
|
-
"aria-label": `${
|
|
91
|
+
onClick: () => u?.(e.start, e.end),
|
|
92
|
+
"aria-label": `${l(e.start, "h:mm a")} to ${l(e.end, "h:mm a")}`
|
|
93
93
|
},
|
|
94
|
-
|
|
94
|
+
n
|
|
95
95
|
)),
|
|
96
96
|
y.map((e) => {
|
|
97
|
-
const
|
|
98
|
-
return /* @__PURE__ */
|
|
97
|
+
const n = P(e, o, i), c = A[e.color ?? "primary"];
|
|
98
|
+
return /* @__PURE__ */ a(
|
|
99
99
|
"button",
|
|
100
100
|
{
|
|
101
101
|
type: "button",
|
|
@@ -103,26 +103,26 @@ function R({
|
|
|
103
103
|
"absolute left-ds-01 right-ds-01 rounded-ds-sm border-l-[3px] px-ds-02 py-ds-01",
|
|
104
104
|
"text-left text-ds-xs font-medium overflow-hidden cursor-pointer",
|
|
105
105
|
"hover:shadow-raised hover:scale-[1.02] transition-[box-shadow,transform] duration-fast-02 ease-productive-standard",
|
|
106
|
-
|
|
106
|
+
c
|
|
107
107
|
),
|
|
108
|
-
style:
|
|
108
|
+
style: n,
|
|
109
109
|
onClick: (M) => {
|
|
110
|
-
M.stopPropagation(),
|
|
110
|
+
M.stopPropagation(), f?.(e);
|
|
111
111
|
},
|
|
112
|
-
"aria-label": `${e.title}, ${
|
|
113
|
-
children: /* @__PURE__ */
|
|
112
|
+
"aria-label": `${e.title}, ${l(e.start, "h:mm a")} to ${l(e.end, "h:mm a")}`,
|
|
113
|
+
children: /* @__PURE__ */ a("span", { className: "line-clamp-2", children: e.title })
|
|
114
114
|
},
|
|
115
115
|
e.id
|
|
116
116
|
);
|
|
117
117
|
}),
|
|
118
|
-
g != null && /* @__PURE__ */
|
|
118
|
+
g != null && /* @__PURE__ */ a(
|
|
119
119
|
"div",
|
|
120
120
|
{
|
|
121
121
|
className: "absolute left-0 right-0 h-[2px] bg-error-9 z-10 pointer-events-none",
|
|
122
122
|
style: { top: `${g}%` },
|
|
123
123
|
"aria-hidden": "true",
|
|
124
|
-
children: /* @__PURE__ */
|
|
125
|
-
|
|
124
|
+
children: /* @__PURE__ */ a(
|
|
125
|
+
D.span,
|
|
126
126
|
{
|
|
127
127
|
className: "absolute -left-[5px] -top-[4px] h-[10px] w-[10px] rounded-ds-full bg-error-9",
|
|
128
128
|
animate: { scale: [1, 1.3, 1] },
|
|
@@ -134,30 +134,30 @@ function R({
|
|
|
134
134
|
] })
|
|
135
135
|
] });
|
|
136
136
|
}
|
|
137
|
-
const
|
|
137
|
+
const j = $.forwardRef(
|
|
138
138
|
({
|
|
139
139
|
view: r,
|
|
140
140
|
date: s,
|
|
141
141
|
events: o,
|
|
142
|
-
onEventClick:
|
|
142
|
+
onEventClick: i,
|
|
143
143
|
onSlotClick: t,
|
|
144
|
-
startHour:
|
|
145
|
-
endHour:
|
|
144
|
+
startHour: f = 8,
|
|
145
|
+
endHour: u = 18,
|
|
146
146
|
slotDuration: m = 30,
|
|
147
147
|
className: y,
|
|
148
148
|
...p
|
|
149
149
|
}, h) => {
|
|
150
150
|
const b = $.useMemo(() => {
|
|
151
151
|
if (r === "day") return [s];
|
|
152
|
-
const
|
|
153
|
-
return Array.from({ length: 7 }, (g, e) => E(
|
|
152
|
+
const d = S(s, { weekStartsOn: 1 });
|
|
153
|
+
return Array.from({ length: 7 }, (g, e) => E(d, e));
|
|
154
154
|
}, [r, s]);
|
|
155
155
|
return /* @__PURE__ */ w(
|
|
156
156
|
"div",
|
|
157
157
|
{
|
|
158
158
|
ref: h,
|
|
159
159
|
role: "region",
|
|
160
|
-
"aria-label": r === "day" ? `Schedule for ${
|
|
160
|
+
"aria-label": r === "day" ? `Schedule for ${l(s, "EEEE, MMMM d, yyyy")}` : `Week schedule starting ${l(b[0], "MMMM d, yyyy")}`,
|
|
161
161
|
className: x(
|
|
162
162
|
"flex rounded-ds-md border border-surface-border-strong bg-surface-raised overflow-hidden",
|
|
163
163
|
"h-[480px]",
|
|
@@ -165,27 +165,27 @@ const W = $.forwardRef(
|
|
|
165
165
|
),
|
|
166
166
|
...p,
|
|
167
167
|
children: [
|
|
168
|
-
/* @__PURE__ */
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
168
|
+
/* @__PURE__ */ a(T, { startHour: f, endHour: u }),
|
|
169
|
+
/* @__PURE__ */ a("div", { className: "flex flex-1 divide-x divide-surface-border overflow-x-auto", children: b.map((d) => /* @__PURE__ */ a(
|
|
170
|
+
V,
|
|
171
171
|
{
|
|
172
|
-
date:
|
|
172
|
+
date: d,
|
|
173
173
|
events: o,
|
|
174
|
-
startHour:
|
|
175
|
-
endHour:
|
|
174
|
+
startHour: f,
|
|
175
|
+
endHour: u,
|
|
176
176
|
slotDuration: m,
|
|
177
|
-
onEventClick:
|
|
177
|
+
onEventClick: i,
|
|
178
178
|
onSlotClick: t,
|
|
179
179
|
showHeader: r === "week"
|
|
180
180
|
},
|
|
181
|
-
|
|
181
|
+
d.toISOString()
|
|
182
182
|
)) })
|
|
183
183
|
]
|
|
184
184
|
}
|
|
185
185
|
);
|
|
186
186
|
}
|
|
187
187
|
);
|
|
188
|
-
|
|
188
|
+
j.displayName = "ScheduleView";
|
|
189
189
|
export {
|
|
190
|
-
|
|
190
|
+
j as ScheduleView
|
|
191
191
|
};
|
|
@@ -2,14 +2,16 @@
|
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
declare const statusBadgeVariants: (props?: ({
|
|
5
|
-
status?: "active" | "pending" | "completed" | "approved" | "rejected" | "blocked" | "cancelled" | "draft" | null | undefined;
|
|
6
|
-
color?: "
|
|
5
|
+
status?: "active" | "pending" | "completed" | "approved" | "rejected" | "blocked" | "in-progress" | "review" | "cancelled" | "draft" | null | undefined;
|
|
6
|
+
color?: "success" | "error" | "info" | "warning" | "neutral" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | null | undefined;
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
9
9
|
interface StatusBadgeBaseProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, 'children' | 'color'> {
|
|
10
10
|
label?: string;
|
|
11
11
|
hideDot?: boolean;
|
|
12
12
|
size?: VariantProps<typeof statusBadgeVariants>['size'];
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
icon?: React.ReactNode;
|
|
13
15
|
}
|
|
14
16
|
interface StatusBadgeWithStatus extends StatusBadgeBaseProps {
|
|
15
17
|
status?: VariantProps<typeof statusBadgeVariants>['status'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"status-badge.d.ts","sourceRoot":"","sources":["../../src/composed/status-badge.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,mBAAmB;;;;8EAgCxB,CAAA;AAuBD,UAAU,oBAAqB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IACtG,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAA;IACvD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED,UAAU,qBAAsB,SAAQ,oBAAoB;IAC1D,MAAM,CAAC,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC,QAAQ,CAAC,CAAA;IAC3D,KAAK,CAAC,EAAE,KAAK,CAAA;CACd;AAED,UAAU,oBAAqB,SAAQ,oBAAoB;IACzD,MAAM,CAAC,EAAE,KAAK,CAAA;IACd,KAAK,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CAC5D;AAED,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,oBAAoB,CAAA;AAI3E,QAAA,MAAM,WAAW,0FAyFhB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
2
|
+
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import * as B from "react";
|
|
4
|
+
import { a as I } from "../_chunks/vendor-utils.js";
|
|
5
|
+
import { IconChevronDown as M } from "@tabler/icons-react";
|
|
6
|
+
import { Icon as L } from "../ui/icon.js";
|
|
7
|
+
import { motionProps as x } from "../ui/lib/motion.js";
|
|
8
|
+
import { cn as n } from "../ui/lib/utils.js";
|
|
9
|
+
import { m as w, A as h } from "../_chunks/framer.js";
|
|
10
|
+
const y = I(
|
|
9
11
|
"inline-flex items-center gap-ds-02b rounded-ds-full font-body",
|
|
10
12
|
{
|
|
11
13
|
variants: {
|
|
@@ -16,6 +18,8 @@ const b = C(
|
|
|
16
18
|
rejected: "bg-error-3 text-error-11",
|
|
17
19
|
completed: "bg-success-3 text-success-11",
|
|
18
20
|
blocked: "bg-error-3 text-error-11",
|
|
21
|
+
"in-progress": "bg-accent-3 text-accent-11",
|
|
22
|
+
review: "bg-info-3 text-info-11",
|
|
19
23
|
cancelled: "bg-surface-raised text-surface-fg-subtle",
|
|
20
24
|
draft: "bg-surface-raised text-surface-fg-subtle"
|
|
21
25
|
},
|
|
@@ -35,91 +39,100 @@ const b = C(
|
|
|
35
39
|
size: "md"
|
|
36
40
|
}
|
|
37
41
|
}
|
|
38
|
-
),
|
|
42
|
+
), P = {
|
|
39
43
|
active: "bg-success-9",
|
|
40
44
|
pending: "bg-warning-9",
|
|
41
45
|
approved: "bg-success-9",
|
|
42
46
|
rejected: "bg-error-9",
|
|
43
47
|
completed: "bg-success-9",
|
|
44
48
|
blocked: "bg-error-9",
|
|
49
|
+
"in-progress": "bg-accent-9",
|
|
50
|
+
review: "bg-info-9",
|
|
45
51
|
cancelled: "bg-disabled",
|
|
46
52
|
draft: "bg-surface-fg-subtle"
|
|
47
|
-
},
|
|
53
|
+
}, R = {
|
|
48
54
|
success: "bg-success-9",
|
|
49
55
|
warning: "bg-warning-9",
|
|
50
56
|
error: "bg-error-9",
|
|
51
57
|
info: "bg-info-9",
|
|
52
58
|
neutral: "bg-surface-fg-subtle"
|
|
53
|
-
},
|
|
54
|
-
({ status:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
}, v = { duration: 0.3, ease: "easeOut" }, S = B.forwardRef(
|
|
60
|
+
({ status: C, color: e, size: a, label: c, hideDot: i = !1, onClick: o, icon: d, className: u, ...l }, g) => {
|
|
61
|
+
const s = o != null, p = s ? w.button : w.span, b = s ? "cursor-pointer hover:opacity-80 transition-opacity" : void 0, f = d ?? (s ? /* @__PURE__ */ r(L, { icon: M, size: "xs", className: "text-current/50 -mr-0.5 shrink-0" }) : null);
|
|
62
|
+
if (e != null) {
|
|
63
|
+
const j = c ?? e.charAt(0).toUpperCase() + e.slice(1), A = R[e];
|
|
64
|
+
return /* @__PURE__ */ r(h, { mode: "wait", children: /* @__PURE__ */ m(
|
|
65
|
+
p,
|
|
59
66
|
{
|
|
60
|
-
ref:
|
|
67
|
+
ref: g,
|
|
68
|
+
...s ? { type: "button", onClick: o } : {},
|
|
61
69
|
initial: { opacity: 0.6, scale: 0.95 },
|
|
62
70
|
animate: { opacity: 1, scale: 1 },
|
|
63
71
|
exit: { opacity: 0.6, scale: 0.95 },
|
|
64
|
-
transition:
|
|
65
|
-
className:
|
|
66
|
-
|
|
67
|
-
|
|
72
|
+
transition: v,
|
|
73
|
+
className: n(
|
|
74
|
+
y({ color: e, size: a }),
|
|
75
|
+
b,
|
|
76
|
+
u
|
|
68
77
|
),
|
|
69
|
-
...
|
|
78
|
+
...x(l),
|
|
70
79
|
children: [
|
|
71
|
-
!
|
|
80
|
+
!i && /* @__PURE__ */ r(
|
|
72
81
|
"span",
|
|
73
82
|
{
|
|
74
|
-
className:
|
|
83
|
+
className: n(
|
|
75
84
|
"shrink-0 rounded-ds-full",
|
|
76
|
-
|
|
77
|
-
|
|
85
|
+
a === "sm" ? "h-ds-02b w-ds-02b" : "h-[8px] w-[8px]",
|
|
86
|
+
A
|
|
78
87
|
),
|
|
79
88
|
"aria-hidden": "true"
|
|
80
89
|
}
|
|
81
90
|
),
|
|
82
|
-
|
|
91
|
+
j,
|
|
92
|
+
f
|
|
83
93
|
]
|
|
84
94
|
},
|
|
85
|
-
|
|
95
|
+
e
|
|
86
96
|
) });
|
|
87
97
|
}
|
|
88
|
-
const
|
|
89
|
-
return /* @__PURE__ */
|
|
90
|
-
p
|
|
98
|
+
const t = C ?? "pending", k = c ?? t.charAt(0).toUpperCase() + t.slice(1), N = P[t];
|
|
99
|
+
return /* @__PURE__ */ r(h, { mode: "wait", children: /* @__PURE__ */ m(
|
|
100
|
+
p,
|
|
91
101
|
{
|
|
92
|
-
ref:
|
|
102
|
+
ref: g,
|
|
103
|
+
...s ? { type: "button", onClick: o } : {},
|
|
93
104
|
initial: { opacity: 0.6 },
|
|
94
105
|
animate: { opacity: 1 },
|
|
95
106
|
exit: { opacity: 0.6 },
|
|
96
|
-
transition:
|
|
97
|
-
className:
|
|
98
|
-
|
|
99
|
-
|
|
107
|
+
transition: v,
|
|
108
|
+
className: n(
|
|
109
|
+
y({ status: t, size: a }),
|
|
110
|
+
b,
|
|
111
|
+
u
|
|
100
112
|
),
|
|
101
|
-
...
|
|
113
|
+
...x(l),
|
|
102
114
|
children: [
|
|
103
|
-
!
|
|
115
|
+
!i && /* @__PURE__ */ r(
|
|
104
116
|
"span",
|
|
105
117
|
{
|
|
106
|
-
className:
|
|
118
|
+
className: n(
|
|
107
119
|
"shrink-0 rounded-ds-full",
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
a === "sm" ? "h-ds-02b w-ds-02b" : "h-[8px] w-[8px]",
|
|
121
|
+
N
|
|
110
122
|
),
|
|
111
123
|
"aria-hidden": "true"
|
|
112
124
|
}
|
|
113
125
|
),
|
|
114
|
-
|
|
126
|
+
k,
|
|
127
|
+
f
|
|
115
128
|
]
|
|
116
129
|
},
|
|
117
|
-
|
|
130
|
+
t
|
|
118
131
|
) });
|
|
119
132
|
}
|
|
120
133
|
);
|
|
121
|
-
|
|
134
|
+
S.displayName = "StatusBadge";
|
|
122
135
|
export {
|
|
123
|
-
|
|
124
|
-
|
|
136
|
+
S as StatusBadge,
|
|
137
|
+
y as statusBadgeVariants
|
|
125
138
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-command-palette.d.ts","sourceRoot":"","sources":["../../src/shell/app-command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,OAAO,EAAkB,KAAK,YAAY,EAAoB,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"app-command-palette.d.ts","sourceRoot":"","sources":["../../src/shell/app-command-palette.tsx"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAsB9B,OAAO,EAAkB,KAAK,YAAY,EAAoB,KAAK,mBAAmB,EAAE,KAAK,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAS5I,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAClC,2EAA2E;IAC3E,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,8CAA8C;AAC9C,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,YAAY,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,MAAM,WAAW,sBACf,SAAQ,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5D,oDAAoD;IACpD,IAAI,CAAC,EAAE,qBAAqB,GAAG,IAAI,CAAA;IACnC,iHAAiH;IACjH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,wCAAwC;IACxC,WAAW,CAAC,EAAE,YAAY,EAAE,CAAA;IAC5B,uDAAuD;IACvD,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,oEAAoE;IACpE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC;iEAC6D;IAC7D,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;+DAC2D;IAC3D,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAA;IACxC,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB;qFACiF;IACjF,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,CAAA;IACrD;oEACgE;IAChE,kBAAkB,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;IAEzD,6BAA6B;IAC7B,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0BAA0B;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACtC,0EAA0E;IAC1E,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAA;IAC9C,8CAA8C;IAC9C,SAAS,CAAC,EAAE,mBAAmB,CAAC,WAAW,CAAC,CAAA;IAC5C,0BAA0B;IAC1B,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,iDAAiD;IACjD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,KAAK,CAAA;CACnC;AA+KD,QAAA,MAAM,iBAAiB,4GAuJtB,CAAA;AAID,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|