@devalok/shilp-sutra 0.52.0 → 0.54.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/AGENTS.md +7 -1
- package/BREAKING.json +29 -0
- package/MIGRATION.md +61 -0
- package/dist/_chunks/motion-provider.js +7 -6
- package/dist/_chunks/motion-provider.js.map +1 -1
- package/dist/_chunks/success.js +53 -53
- package/dist/ai/command-bar.js +158 -158
- package/dist/ai/command-bar.js.map +1 -1
- package/dist/ai/conversation.js +5 -5
- package/dist/composed/avatar-group.d.ts +11 -9
- package/dist/composed/avatar-group.d.ts.map +1 -1
- package/dist/composed/avatar-group.js +108 -140
- package/dist/composed/avatar-group.js.map +1 -1
- package/dist/composed/bulk-action-bar.d.ts +19 -11
- package/dist/composed/bulk-action-bar.d.ts.map +1 -1
- package/dist/composed/bulk-action-bar.js +81 -110
- package/dist/composed/bulk-action-bar.js.map +1 -1
- package/dist/composed/command-palette.js +17 -17
- package/dist/composed/command-palette.js.map +1 -1
- package/dist/composed/error-boundary.d.ts +15 -3
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +43 -26
- package/dist/composed/error-boundary.js.map +1 -1
- package/dist/composed/loading-skeleton.d.ts +2 -0
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js +79 -56
- package/dist/composed/loading-skeleton.js.map +1 -1
- package/dist/composed/master-detail.d.ts +21 -8
- package/dist/composed/master-detail.d.ts.map +1 -1
- package/dist/composed/master-detail.js +91 -77
- package/dist/composed/master-detail.js.map +1 -1
- package/dist/composed/page-skeletons.d.ts +6 -0
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +93 -71
- package/dist/composed/page-skeletons.js.map +1 -1
- package/dist/composed/priority-indicator.d.ts +15 -6
- package/dist/composed/priority-indicator.d.ts.map +1 -1
- package/dist/composed/priority-indicator.js +37 -88
- package/dist/composed/priority-indicator.js.map +1 -1
- package/dist/composed/schedule-view.d.ts +17 -2
- package/dist/composed/schedule-view.d.ts.map +1 -1
- package/dist/composed/schedule-view.js +163 -64
- package/dist/composed/schedule-view.js.map +1 -1
- package/dist/motion/motion-provider.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.d.ts +32 -6
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +156 -129
- package/dist/shell/bottom-navbar.js.map +1 -1
- package/dist/shell/index.d.ts +5 -3
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +2 -3
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +2 -0
- package/dist/shell/notification-preferences.js.map +1 -1
- package/dist/tokens/primitives.css +6 -2
- package/dist/tokens/utilities.css +6 -0
- package/dist/ui/autocomplete.d.ts +34 -32
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +115 -110
- package/dist/ui/autocomplete.js.map +1 -1
- package/dist/ui/combobox.d.ts +1 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +133 -128
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +124 -138
- package/dist/ui/file-upload.js.map +1 -1
- package/dist/ui/form.d.ts +7 -0
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +4 -2
- package/dist/ui/form.js.map +1 -1
- package/dist/ui/icon-button.d.ts +2 -1
- package/dist/ui/icon-button.d.ts.map +1 -1
- package/dist/ui/icon-button.js +1 -1
- package/dist/ui/icon-button.js.map +1 -1
- package/dist/ui/index.js +30 -30
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +7 -6
- package/dist/ui/label.js.map +1 -1
- package/dist/ui/search-input.js +4 -4
- package/dist/ui/sidebar.js +7 -7
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +50 -44
- package/dist/ui/spinner.js.map +1 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +24 -24
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.js +1 -1
- package/dist/ui/table.js.map +1 -1
- package/docs/components/composed/bulk-action-bar.md +9 -3
- package/docs/components/composed/error-boundary.md +18 -2
- package/docs/components/composed/master-detail.md +12 -2
- package/docs/components/composed/page-skeletons.md +2 -2
- package/docs/components/composed/priority-indicator.md +22 -11
- package/docs/components/composed/rich-chat-input.md +18 -6
- package/docs/components/composed/schedule-view.md +20 -5
- package/docs/components/composed/simple-tooltip.md +1 -1
- package/docs/components/shell/app-command-palette.md +2 -1
- package/docs/components/shell/bottom-navbar.md +28 -9
- package/docs/components/shell/command-registry.md +2 -2
- package/docs/components/shell/link-context.md +2 -2
- package/docs/components/shell/top-bar.md +1 -1
- package/docs/components/ui/autocomplete.md +26 -10
- package/docs/components/ui/search-input.md +2 -2
- package/docs/components/ui/slider.md +2 -2
- package/docs/components/ui/split-button.md +3 -3
- package/llms.txt +2 -2
- package/make-kit/Guidelines.md +1 -1
- package/make-kit/components/overview.md +2 -2
- package/make-kit/foundations/surfaces.md +1 -1
- package/mcp-manifest.json +581 -172
- package/package.json +1 -6
- package/skill/SKILL.md +1 -1
- package/skill/chat-skill/README.md +18 -0
- package/skill/chat-skill/SKILL.md +78 -0
- package/skill/chat-skill/chatgpt-instructions.md +26 -0
- package/skill/chat-skill/gemini-instructions.md +25 -0
- package/skill/references/components.md +2 -2
- package/dist/shell/sidebar.d.ts +0 -113
- package/dist/shell/sidebar.d.ts.map +0 -1
- package/dist/shell/sidebar.js +0 -293
- package/dist/shell/sidebar.js.map +0 -1
- package/docs/components/shell/sidebar.md +0 -103
|
@@ -3,142 +3,164 @@ import { Skeleton as t } from "../ui/skeleton.js";
|
|
|
3
3
|
import * as n from "react";
|
|
4
4
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/composed/page-skeletons.tsx
|
|
6
|
-
|
|
6
|
+
function a(e) {
|
|
7
|
+
return {
|
|
8
|
+
role: "status",
|
|
9
|
+
"aria-busy": !0,
|
|
10
|
+
"aria-label": e ?? "Loading"
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
function o({ label: e }) {
|
|
14
|
+
return /* @__PURE__ */ i("span", {
|
|
15
|
+
className: "sr-only",
|
|
16
|
+
children: [e ?? "Loading", "…"]
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
var s = n.forwardRef(function({ className: n, label: s, ...c }, l) {
|
|
7
20
|
return /* @__PURE__ */ i("div", {
|
|
8
|
-
ref:
|
|
9
|
-
...
|
|
21
|
+
ref: l,
|
|
22
|
+
...a(s),
|
|
23
|
+
...c,
|
|
10
24
|
className: e("flex flex-col gap-ds-06", n),
|
|
11
|
-
children: [
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className: "
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ r(o, { label: s }),
|
|
27
|
+
/* @__PURE__ */ r("div", {
|
|
28
|
+
className: "grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-4",
|
|
29
|
+
children: Array.from({ length: 4 }).map((e, n) => /* @__PURE__ */ i("div", {
|
|
30
|
+
className: "flex flex-col gap-ds-04 rounded-surface border border-card bg-surface-raised p-ds-05b",
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ i("div", {
|
|
33
|
+
className: "flex items-center justify-between",
|
|
34
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-04 w-ds-11" }), /* @__PURE__ */ r(t, { className: "h-ds-sm w-ds-sm rounded-surface" })]
|
|
35
|
+
}),
|
|
36
|
+
/* @__PURE__ */ r(t, { className: "h-ds-xs-plus w-ds-10" }),
|
|
37
|
+
/* @__PURE__ */ r(t, { className: "h-ds-03 w-[112px]" })
|
|
38
|
+
]
|
|
39
|
+
}, `stat-${n}`))
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ i("div", {
|
|
42
|
+
className: "rounded-surface border border-card bg-surface-raised p-ds-06",
|
|
15
43
|
children: [
|
|
16
44
|
/* @__PURE__ */ i("div", {
|
|
17
|
-
className: "flex items-center justify-between",
|
|
18
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
45
|
+
className: "mb-ds-06 flex items-center justify-between",
|
|
46
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-05b w-[128px]" }), /* @__PURE__ */ i("div", {
|
|
47
|
+
className: "flex items-center gap-ds-03",
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ r(t, { className: "h-ds-sm w-ds-sm rounded-surface" }),
|
|
50
|
+
/* @__PURE__ */ r(t, { className: "h-ds-05 w-[112px]" }),
|
|
51
|
+
/* @__PURE__ */ r(t, { className: "h-ds-sm w-ds-sm rounded-surface" })
|
|
52
|
+
]
|
|
53
|
+
})]
|
|
19
54
|
}),
|
|
20
|
-
/* @__PURE__ */ r(
|
|
21
|
-
|
|
55
|
+
/* @__PURE__ */ r("div", {
|
|
56
|
+
className: "mb-ds-03 grid grid-cols-7 gap-ds-03",
|
|
57
|
+
children: Array.from({ length: 7 }).map((e, n) => /* @__PURE__ */ r(t, { className: "mx-auto h-ds-04 w-ds-07" }, `wh-${n}`))
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ r("div", {
|
|
60
|
+
className: "grid grid-cols-7 gap-ds-03",
|
|
61
|
+
children: Array.from({ length: 35 }).map((e, n) => /* @__PURE__ */ r(t, { className: "mx-auto h-ds-md w-ds-md rounded-pill" }, `cal-${n}`))
|
|
62
|
+
})
|
|
22
63
|
]
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
className: "rounded-overlay-lg border border-card-strong bg-surface-raised p-ds-06",
|
|
26
|
-
children: [
|
|
27
|
-
/* @__PURE__ */ i("div", {
|
|
28
|
-
className: "mb-ds-06 flex items-center justify-between",
|
|
29
|
-
children: [/* @__PURE__ */ r(t, { className: e("h-ds-05b w-[128px]", a) }), /* @__PURE__ */ i("div", {
|
|
30
|
-
className: "flex items-center gap-ds-03",
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ r(t, { className: e("h-ds-sm w-ds-sm rounded-surface", a) }),
|
|
33
|
-
/* @__PURE__ */ r(t, { className: e("h-ds-05 w-[112px]", a) }),
|
|
34
|
-
/* @__PURE__ */ r(t, { className: e("h-ds-sm w-ds-sm rounded-surface", a) })
|
|
35
|
-
]
|
|
36
|
-
})]
|
|
37
|
-
}),
|
|
38
|
-
/* @__PURE__ */ r("div", {
|
|
39
|
-
className: "mb-ds-03 grid grid-cols-7 gap-ds-03",
|
|
40
|
-
children: Array.from({ length: 7 }).map((n, i) => /* @__PURE__ */ r(t, { className: e("mx-auto h-ds-04 w-ds-07", a) }, `wh-${i}`))
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ r("div", {
|
|
43
|
-
className: "grid grid-cols-7 gap-ds-03",
|
|
44
|
-
children: Array.from({ length: 35 }).map((n, i) => /* @__PURE__ */ r(t, { className: e("mx-auto h-ds-md w-ds-md rounded-pill", a) }, `cal-${i}`))
|
|
45
|
-
})
|
|
46
|
-
]
|
|
47
|
-
})]
|
|
64
|
+
})
|
|
65
|
+
]
|
|
48
66
|
});
|
|
49
67
|
});
|
|
50
|
-
|
|
51
|
-
var
|
|
68
|
+
s.displayName = "DashboardSkeleton";
|
|
69
|
+
var c = n.forwardRef(function({ className: n, label: s, ...c }, l) {
|
|
52
70
|
return /* @__PURE__ */ i("div", {
|
|
53
|
-
ref:
|
|
54
|
-
...
|
|
71
|
+
ref: l,
|
|
72
|
+
...a(s),
|
|
73
|
+
...c,
|
|
55
74
|
className: e("flex flex-col gap-ds-06", n),
|
|
56
75
|
children: [
|
|
76
|
+
/* @__PURE__ */ r(o, { label: s }),
|
|
57
77
|
/* @__PURE__ */ i("div", {
|
|
58
78
|
className: "flex flex-col gap-ds-05 sm:flex-row sm:items-center sm:justify-between",
|
|
59
79
|
children: [/* @__PURE__ */ i("div", {
|
|
60
80
|
className: "flex flex-col gap-ds-03",
|
|
61
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
62
|
-
}), /* @__PURE__ */ r(t, { className:
|
|
81
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-06 w-[112px]" }), /* @__PURE__ */ r(t, { className: "h-ds-04 w-ds-13" })]
|
|
82
|
+
}), /* @__PURE__ */ r(t, { className: "h-ds-sm-plus w-[128px] rounded-surface" })]
|
|
63
83
|
}),
|
|
64
84
|
/* @__PURE__ */ i("div", {
|
|
65
85
|
className: "flex flex-col gap-ds-04 sm:flex-row sm:items-center",
|
|
66
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
86
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-sm-plus flex-1 rounded-surface" }), /* @__PURE__ */ r("div", {
|
|
67
87
|
className: "flex gap-ds-02b",
|
|
68
|
-
children: Array.from({ length: 4 }).map((
|
|
88
|
+
children: Array.from({ length: 4 }).map((e, n) => /* @__PURE__ */ r(t, { className: "h-ds-sm w-ds-10 rounded-surface" }, `f-${n}`))
|
|
69
89
|
})]
|
|
70
90
|
}),
|
|
71
91
|
/* @__PURE__ */ r("div", {
|
|
72
92
|
className: "grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-3",
|
|
73
|
-
children: Array.from({ length: 6 }).map((
|
|
74
|
-
className: "flex flex-col gap-ds-05 rounded-
|
|
93
|
+
children: Array.from({ length: 6 }).map((e, n) => /* @__PURE__ */ i("div", {
|
|
94
|
+
className: "flex flex-col gap-ds-05 rounded-surface border border-card bg-surface-raised p-ds-05b",
|
|
75
95
|
children: [
|
|
76
96
|
/* @__PURE__ */ i("div", {
|
|
77
97
|
className: "flex items-center justify-between",
|
|
78
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
98
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-05b w-ds-10 rounded-pill" }), /* @__PURE__ */ r(t, { className: "h-ds-05 w-ds-11 rounded-control" })]
|
|
79
99
|
}),
|
|
80
100
|
/* @__PURE__ */ i("div", {
|
|
81
101
|
className: "flex flex-col gap-ds-03",
|
|
82
102
|
children: [
|
|
83
|
-
/* @__PURE__ */ r(t, { className:
|
|
84
|
-
/* @__PURE__ */ r(t, { className:
|
|
85
|
-
/* @__PURE__ */ r(t, { className:
|
|
103
|
+
/* @__PURE__ */ r(t, { className: "h-ds-05 w-3/4" }),
|
|
104
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-full" }),
|
|
105
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-2/3" })
|
|
86
106
|
]
|
|
87
107
|
}),
|
|
88
108
|
/* @__PURE__ */ i("div", {
|
|
89
109
|
className: "flex items-center justify-between pt-ds-02",
|
|
90
110
|
children: [/* @__PURE__ */ r("div", {
|
|
91
111
|
className: "flex -space-x-ds-03",
|
|
92
|
-
children: Array.from({ length: 3 }).map((
|
|
93
|
-
}), /* @__PURE__ */ r(t, { className:
|
|
112
|
+
children: Array.from({ length: 3 }).map((e, i) => /* @__PURE__ */ r(t, { className: "h-ds-xs-plus w-ds-xs-plus rounded-pill" }, `av-${n}-${i}`))
|
|
113
|
+
}), /* @__PURE__ */ r(t, { className: "h-ds-04 w-ds-md" })]
|
|
94
114
|
})
|
|
95
115
|
]
|
|
96
|
-
}, `proj-${
|
|
116
|
+
}, `proj-${n}`))
|
|
97
117
|
})
|
|
98
118
|
]
|
|
99
119
|
});
|
|
100
120
|
});
|
|
101
|
-
|
|
102
|
-
var
|
|
121
|
+
c.displayName = "ProjectListSkeleton";
|
|
122
|
+
var l = n.forwardRef(function({ className: n, label: s, ...c }, l) {
|
|
103
123
|
return /* @__PURE__ */ i("div", {
|
|
104
|
-
ref:
|
|
105
|
-
...
|
|
106
|
-
|
|
124
|
+
ref: l,
|
|
125
|
+
...a(s),
|
|
126
|
+
...c,
|
|
127
|
+
className: e("flex h-full flex-col gap-0 rounded-surface border border-card bg-surface-raised", n),
|
|
107
128
|
children: [
|
|
129
|
+
/* @__PURE__ */ r(o, { label: s }),
|
|
108
130
|
/* @__PURE__ */ i("div", {
|
|
109
131
|
className: "flex items-center justify-between border-b border-surface-border-strong px-ds-05b py-ds-05",
|
|
110
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
132
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-05b w-[192px]" }), /* @__PURE__ */ i("div", {
|
|
111
133
|
className: "flex items-center gap-ds-03",
|
|
112
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
134
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-xs-plus w-ds-xs-plus rounded-surface" }), /* @__PURE__ */ r(t, { className: "h-ds-xs-plus w-ds-xs-plus rounded-surface" })]
|
|
113
135
|
})]
|
|
114
136
|
}),
|
|
115
137
|
/* @__PURE__ */ r("div", {
|
|
116
138
|
className: "flex flex-col gap-0 border-b border-surface-border-strong px-ds-05b py-ds-05",
|
|
117
|
-
children: Array.from({ length: 5 }).map((
|
|
139
|
+
children: Array.from({ length: 5 }).map((e, n) => /* @__PURE__ */ i("div", {
|
|
118
140
|
className: "flex items-center gap-ds-05 py-ds-03",
|
|
119
|
-
children: [/* @__PURE__ */ r(t, { className:
|
|
120
|
-
}, `prop-${
|
|
141
|
+
children: [/* @__PURE__ */ r(t, { className: "h-ds-04 w-ds-12 shrink-0" }), /* @__PURE__ */ r(t, { className: "h-ds-06 w-[128px] rounded-control" })]
|
|
142
|
+
}, `prop-${n}`))
|
|
121
143
|
}),
|
|
122
144
|
/* @__PURE__ */ r("div", {
|
|
123
145
|
className: "border-b border-surface-border-strong px-ds-05b",
|
|
124
146
|
children: /* @__PURE__ */ r("div", {
|
|
125
147
|
className: "flex gap-ds-05 py-ds-04",
|
|
126
|
-
children: Array.from({ length: 3 }).map((
|
|
148
|
+
children: Array.from({ length: 3 }).map((e, n) => /* @__PURE__ */ r(t, { className: "h-ds-05 w-ds-10" }, `tab-${n}`))
|
|
127
149
|
})
|
|
128
150
|
}),
|
|
129
151
|
/* @__PURE__ */ i("div", {
|
|
130
152
|
className: "flex flex-1 flex-col gap-ds-04 px-ds-05b py-ds-05",
|
|
131
153
|
children: [
|
|
132
|
-
/* @__PURE__ */ r(t, { className:
|
|
133
|
-
/* @__PURE__ */ r(t, { className:
|
|
134
|
-
/* @__PURE__ */ r(t, { className:
|
|
135
|
-
/* @__PURE__ */ r(t, { className:
|
|
136
|
-
/* @__PURE__ */ r(t, { className:
|
|
154
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-full" }),
|
|
155
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-4/5" }),
|
|
156
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-3/5" }),
|
|
157
|
+
/* @__PURE__ */ r(t, { className: "mt-ds-03 h-ds-04 w-full" }),
|
|
158
|
+
/* @__PURE__ */ r(t, { className: "h-ds-04 w-2/3" })
|
|
137
159
|
]
|
|
138
160
|
})
|
|
139
161
|
]
|
|
140
162
|
});
|
|
141
163
|
});
|
|
142
|
-
|
|
164
|
+
l.displayName = "TaskDetailSkeleton";
|
|
143
165
|
//#endregion
|
|
144
|
-
export {
|
|
166
|
+
export { s as DashboardSkeleton, c as ProjectListSkeleton, l as TaskDetailSkeleton };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page-skeletons.js","names":[],"sources":["../../src/composed/page-skeletons.tsx"],"sourcesContent":["// @server-safe\nimport * as React from 'react'\n\nimport { cn } from '../ui/lib/utils'\nimport { Skeleton } from '../ui/skeleton'\n\nconst shimmer = 'bg-surface-raised-hover'\n\n// --- Dashboard Skeleton ---\n\nexport interface DashboardSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst DashboardSkeleton = React.forwardRef<HTMLDivElement, DashboardSkeletonProps>(\n function DashboardSkeleton({ className, ...props }, ref) {\n return (\n <div ref={ref} {...props} className={cn(\"flex flex-col gap-ds-06\", className)}>\n {/* Stat cards grid */}\n <div className=\"grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-4\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div\n key={`stat-${i}`}\n className=\"flex flex-col gap-ds-04 rounded-overlay-lg border border-card-strong bg-surface-raised p-ds-05b\"\n >\n <div className=\"flex items-center justify-between\">\n <Skeleton className={cn('h-ds-04 w-ds-11', shimmer)} />\n <Skeleton className={cn('h-ds-sm w-ds-sm rounded-surface', shimmer)} />\n </div>\n <Skeleton className={cn('h-ds-xs-plus w-ds-10', shimmer)} />\n <Skeleton className={cn('h-ds-03 w-[112px]', shimmer)} />\n </div>\n ))}\n </div>\n\n {/* Attendance calendar placeholder */}\n <div className=\"rounded-overlay-lg border border-card-strong bg-surface-raised p-ds-06\">\n <div className=\"mb-ds-06 flex items-center justify-between\">\n <Skeleton className={cn('h-ds-05b w-[128px]', shimmer)} />\n <div className=\"flex items-center gap-ds-03\">\n <Skeleton className={cn('h-ds-sm w-ds-sm rounded-surface', shimmer)} />\n <Skeleton className={cn('h-ds-05 w-[112px]', shimmer)} />\n <Skeleton className={cn('h-ds-sm w-ds-sm rounded-surface', shimmer)} />\n </div>\n </div>\n {/* Weekday headers */}\n <div className=\"mb-ds-03 grid grid-cols-7 gap-ds-03\">\n {Array.from({ length: 7 }).map((_, i) => (\n <Skeleton key={`wh-${i}`} className={cn('mx-auto h-ds-04 w-ds-07', shimmer)} />\n ))}\n </div>\n {/* Calendar grid */}\n <div className=\"grid grid-cols-7 gap-ds-03\">\n {Array.from({ length: 35 }).map((_, i) => (\n <Skeleton\n key={`cal-${i}`}\n className={cn('mx-auto h-ds-md w-ds-md rounded-pill', shimmer)}\n />\n ))}\n </div>\n </div>\n </div>\n )\n},\n)\n\nDashboardSkeleton.displayName = 'DashboardSkeleton'\n\n// --- Project List Skeleton ---\n\nexport interface ProjectListSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst ProjectListSkeleton = React.forwardRef<HTMLDivElement, ProjectListSkeletonProps>(\n function ProjectListSkeleton({ className, ...props }, ref) {\n return (\n <div ref={ref} {...props} className={cn(\"flex flex-col gap-ds-06\", className)}>\n {/* Header */}\n <div className=\"flex flex-col gap-ds-05 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex flex-col gap-ds-03\">\n <Skeleton className={cn('h-ds-06 w-[112px]', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-ds-13', shimmer)} />\n </div>\n <Skeleton className={cn('h-ds-sm-plus w-[128px] rounded-surface', shimmer)} />\n </div>\n\n {/* Filters */}\n <div className=\"flex flex-col gap-ds-04 sm:flex-row sm:items-center\">\n <Skeleton className={cn('h-ds-sm-plus flex-1 rounded-surface', shimmer)} />\n <div className=\"flex gap-ds-02b\">\n {Array.from({ length: 4 }).map((_, i) => (\n <Skeleton key={`f-${i}`} className={cn('h-ds-sm w-ds-10 rounded-surface', shimmer)} />\n ))}\n </div>\n </div>\n\n {/* Project cards grid */}\n <div className=\"grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-3\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div\n key={`proj-${i}`}\n className=\"flex flex-col gap-ds-05 rounded-overlay-lg border border-card-strong bg-surface-raised p-ds-05b\"\n >\n {/* Top row: status + org */}\n <div className=\"flex items-center justify-between\">\n <Skeleton className={cn('h-ds-05b w-ds-10 rounded-pill', shimmer)} />\n <Skeleton className={cn('h-ds-05 w-ds-11 rounded-control', shimmer)} />\n </div>\n {/* Title + description */}\n <div className=\"flex flex-col gap-ds-03\">\n <Skeleton className={cn('h-ds-05 w-3/4', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-full', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-2/3', shimmer)} />\n </div>\n {/* Bottom row: members + count */}\n <div className=\"flex items-center justify-between pt-ds-02\">\n <div className=\"flex -space-x-ds-03\">\n {Array.from({ length: 3 }).map((_, j) => (\n <Skeleton\n key={`av-${i}-${j}`}\n className={cn('h-ds-xs-plus w-ds-xs-plus rounded-pill', shimmer)}\n />\n ))}\n </div>\n <Skeleton className={cn('h-ds-04 w-ds-md', shimmer)} />\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n},\n)\n\nProjectListSkeleton.displayName = 'ProjectListSkeleton'\n\n// --- Task Detail Skeleton ---\n\nexport interface TaskDetailSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {}\n\nconst TaskDetailSkeleton = React.forwardRef<HTMLDivElement, TaskDetailSkeletonProps>(\n function TaskDetailSkeleton({ className, ...props }, ref) {\n return (\n <div ref={ref} {...props} className={cn(\"flex h-full flex-col gap-0 rounded-overlay-lg border border-card-strong bg-surface-raised\", className)}>\n {/* Header */}\n <div className=\"flex items-center justify-between border-b border-surface-border-strong px-ds-05b py-ds-05\">\n <Skeleton className={cn('h-ds-05b w-[192px]', shimmer)} />\n <div className=\"flex items-center gap-ds-03\">\n <Skeleton className={cn('h-ds-xs-plus w-ds-xs-plus rounded-surface', shimmer)} />\n <Skeleton className={cn('h-ds-xs-plus w-ds-xs-plus rounded-surface', shimmer)} />\n </div>\n </div>\n\n {/* Property rows */}\n <div className=\"flex flex-col gap-0 border-b border-surface-border-strong px-ds-05b py-ds-05\">\n {Array.from({ length: 5 }).map((_, i) => (\n <div\n key={`prop-${i}`}\n className=\"flex items-center gap-ds-05 py-ds-03\"\n >\n <Skeleton className={cn('h-ds-04 w-ds-12 shrink-0', shimmer)} />\n <Skeleton className={cn('h-ds-06 w-[128px] rounded-control', shimmer)} />\n </div>\n ))}\n </div>\n\n {/* Tabs */}\n <div className=\"border-b border-surface-border-strong px-ds-05b\">\n <div className=\"flex gap-ds-05 py-ds-04\">\n {Array.from({ length: 3 }).map((_, i) => (\n <Skeleton key={`tab-${i}`} className={cn('h-ds-05 w-ds-10', shimmer)} />\n ))}\n </div>\n </div>\n\n {/* Tab content */}\n <div className=\"flex flex-1 flex-col gap-ds-04 px-ds-05b py-ds-05\">\n <Skeleton className={cn('h-ds-04 w-full', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-4/5', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-3/5', shimmer)} />\n <Skeleton className={cn('mt-ds-03 h-ds-04 w-full', shimmer)} />\n <Skeleton className={cn('h-ds-04 w-2/3', shimmer)} />\n </div>\n </div>\n )\n},\n)\n\nTaskDetailSkeleton.displayName = 'TaskDetailSkeleton'\n\nexport {\n DashboardSkeleton,\n ProjectListSkeleton,\n TaskDetailSkeleton,\n}\n"],"mappings":";;;;;AAMA,IAAM,IAAU,2BAMV,IAAoB,EAAM,WAC9B,SAA2B,EAAE,cAAW,GAAG,KAAS,GAAK;CACzD,OACE,kBAAC,OAAD;EAAU;EAAK,GAAI;EAAO,WAAW,EAAG,2BAA2B,CAAS;YAA5E,CAEE,kBAAC,OAAD;GAAK,WAAU;aACZ,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MACjC,kBAAC,OAAD;IAEE,WAAU;cAFZ;KAIE,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACE,kBAAC,GAAD,EAAU,WAAW,EAAG,mBAAmB,CAAO,EAAI,CAAA,GACtD,kBAAC,GAAD,EAAU,WAAW,EAAG,mCAAmC,CAAO,EAAI,CAAA,CACnE;;KACL,kBAAC,GAAD,EAAU,WAAW,EAAG,wBAAwB,CAAO,EAAI,CAAA;KAC3D,kBAAC,GAAD,EAAU,WAAW,EAAG,qBAAqB,CAAO,EAAI,CAAA;IACrD;MATE,QAAQ,GASV,CACN;EACE,CAAA,GAGL,kBAAC,OAAD;GAAK,WAAU;aAAf;IACE,kBAAC,OAAD;KAAK,WAAU;eAAf,CACE,kBAAC,GAAD,EAAU,WAAW,EAAG,sBAAsB,CAAO,EAAI,CAAA,GACzD,kBAAC,OAAD;MAAK,WAAU;gBAAf;OACE,kBAAC,GAAD,EAAU,WAAW,EAAG,mCAAmC,CAAO,EAAI,CAAA;OACtE,kBAAC,GAAD,EAAU,WAAW,EAAG,qBAAqB,CAAO,EAAI,CAAA;OACxD,kBAAC,GAAD,EAAU,WAAW,EA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AA6C,CAAO,EAAI,CAAA,GAChF,kBAAC,GAAD,EAAU,WAAW,EAAG,6CAA6C,CAAO,EAAI,CAAA,CAC7E;MACF;;GAGL,kBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MACjC,kBAAC,OAAD;KAEE,WAAU;eAFZ,CAIE,kBAAC,GAAD,EAAU,WAAW,EAAG,4BAA4B,CAAO,EAAI,CAAA,GAC/D,kBAAC,GAAD,EAAU,WAAW,EAAG,qCAAqC,CAAO,EAAI,CAAA,CACrE;OALE,QAAQ,GAKV,CACN;GACE,CAAA;GAGL,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,OAAD;KAAK,WAAU;eACZ,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MACjC,kBAAC,GAAD,EAA2B,WAAW,EAAG,mBAAmB,CAAO,EAAI,GAAxD,OAAO,GAAiD,CACxE;IACE,CAAA;GACF,CAAA;GAGL,kBAAC,OAAD;IAAK,WAAU;cAAf;KACE,kBAAC,GAAD,EAAU,WAAW,EAAG,kBAAkB,CAAO,EAAI,CAAA;KACrD,kBAAC,GAAD,EAAU,WAAW,EAAG,iBAAiB,CAAO,EAAI,CAAA;KACpD,kBAAC,GAAD,EAAU,WAAW,EAAG,iBAAiB,CAAO,EAAI,CAAA;KACpD,kBAAC,GAAD,EAAU,WAAW,EAAG,2BAA2B,CAAO,EAAI,CAAA;KAC9D,kBAAC,GAAD,EAAU,WAAW,EAAG,iBAAiB,CAAO,EAAI,CAAA;IACjD;;EACF;;AAET,CACA;AAEA,EAAmB,cAAc"}
|
|
1
|
+
{"version":3,"file":"page-skeletons.js","names":[],"sources":["../../src/composed/page-skeletons.tsx"],"sourcesContent":["// @server-safe\nimport * as React from 'react'\n\nimport { cn } from '../ui/lib/utils'\nimport { Skeleton } from '../ui/skeleton'\n\n// role=status + aria-busy so AT announces the loading region (child Skeletons are\n// aria-hidden). The sr-only label carries the announcement text.\nfunction statusProps(label?: string) {\n return { role: 'status' as const, 'aria-busy': true, 'aria-label': label ?? 'Loading' }\n}\nfunction SrLabel({ label }: { label?: string }) {\n return <span className=\"sr-only\">{label ?? 'Loading'}…</span>\n}\n\n// --- Dashboard Skeleton ---\n\nexport interface DashboardSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Accessible label for the loading region. @default 'Loading' */\n label?: string\n}\n\nconst DashboardSkeleton = React.forwardRef<HTMLDivElement, DashboardSkeletonProps>(\n function DashboardSkeleton({ className, label, ...props }, ref) {\n return (\n <div ref={ref} {...statusProps(label)} {...props} className={cn(\"flex flex-col gap-ds-06\", className)}>\n <SrLabel label={label} />\n {/* Stat cards grid */}\n <div className=\"grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-4\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div\n key={`stat-${i}`}\n className=\"flex flex-col gap-ds-04 rounded-surface border border-card bg-surface-raised p-ds-05b\"\n >\n <div className=\"flex items-center justify-between\">\n <Skeleton className={'h-ds-04 w-ds-11'} />\n <Skeleton className={'h-ds-sm w-ds-sm rounded-surface'} />\n </div>\n <Skeleton className={'h-ds-xs-plus w-ds-10'} />\n <Skeleton className={'h-ds-03 w-[112px]'} />\n </div>\n ))}\n </div>\n\n {/* Attendance calendar placeholder */}\n <div className=\"rounded-surface border border-card bg-surface-raised p-ds-06\">\n <div className=\"mb-ds-06 flex items-center justify-between\">\n <Skeleton className={'h-ds-05b w-[128px]'} />\n <div className=\"flex items-center gap-ds-03\">\n <Skeleton className={'h-ds-sm w-ds-sm rounded-surface'} />\n <Skeleton className={'h-ds-05 w-[112px]'} />\n <Skeleton className={'h-ds-sm w-ds-sm rounded-surface'} />\n </div>\n </div>\n {/* Weekday headers */}\n <div className=\"mb-ds-03 grid grid-cols-7 gap-ds-03\">\n {Array.from({ length: 7 }).map((_, i) => (\n <Skeleton key={`wh-${i}`} className={'mx-auto h-ds-04 w-ds-07'} />\n ))}\n </div>\n {/* Calendar grid */}\n <div className=\"grid grid-cols-7 gap-ds-03\">\n {Array.from({ length: 35 }).map((_, i) => (\n <Skeleton\n key={`cal-${i}`}\n className={'mx-auto h-ds-md w-ds-md rounded-pill'}\n />\n ))}\n </div>\n </div>\n </div>\n )\n},\n)\n\nDashboardSkeleton.displayName = 'DashboardSkeleton'\n\n// --- Project List Skeleton ---\n\nexport interface ProjectListSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Accessible label for the loading region. @default 'Loading' */\n label?: string\n}\n\nconst ProjectListSkeleton = React.forwardRef<HTMLDivElement, ProjectListSkeletonProps>(\n function ProjectListSkeleton({ className, label, ...props }, ref) {\n return (\n <div ref={ref} {...statusProps(label)} {...props} className={cn(\"flex flex-col gap-ds-06\", className)}>\n <SrLabel label={label} />\n {/* Header */}\n <div className=\"flex flex-col gap-ds-05 sm:flex-row sm:items-center sm:justify-between\">\n <div className=\"flex flex-col gap-ds-03\">\n <Skeleton className={'h-ds-06 w-[112px]'} />\n <Skeleton className={'h-ds-04 w-ds-13'} />\n </div>\n <Skeleton className={'h-ds-sm-plus w-[128px] rounded-surface'} />\n </div>\n\n {/* Filters */}\n <div className=\"flex flex-col gap-ds-04 sm:flex-row sm:items-center\">\n <Skeleton className={'h-ds-sm-plus flex-1 rounded-surface'} />\n <div className=\"flex gap-ds-02b\">\n {Array.from({ length: 4 }).map((_, i) => (\n <Skeleton key={`f-${i}`} className={'h-ds-sm w-ds-10 rounded-surface'} />\n ))}\n </div>\n </div>\n\n {/* Project cards grid */}\n <div className=\"grid grid-cols-1 gap-ds-05 sm:grid-cols-2 lg:grid-cols-3\">\n {Array.from({ length: 6 }).map((_, i) => (\n <div\n key={`proj-${i}`}\n className=\"flex flex-col gap-ds-05 rounded-surface border border-card bg-surface-raised p-ds-05b\"\n >\n {/* Top row: status + org */}\n <div className=\"flex items-center justify-between\">\n <Skeleton className={'h-ds-05b w-ds-10 rounded-pill'} />\n <Skeleton className={'h-ds-05 w-ds-11 rounded-control'} />\n </div>\n {/* Title + description */}\n <div className=\"flex flex-col gap-ds-03\">\n <Skeleton className={'h-ds-05 w-3/4'} />\n <Skeleton className={'h-ds-04 w-full'} />\n <Skeleton className={'h-ds-04 w-2/3'} />\n </div>\n {/* Bottom row: members + count */}\n <div className=\"flex items-center justify-between pt-ds-02\">\n <div className=\"flex -space-x-ds-03\">\n {Array.from({ length: 3 }).map((_, j) => (\n <Skeleton\n key={`av-${i}-${j}`}\n className={'h-ds-xs-plus w-ds-xs-plus rounded-pill'}\n />\n ))}\n </div>\n <Skeleton className={'h-ds-04 w-ds-md'} />\n </div>\n </div>\n ))}\n </div>\n </div>\n )\n},\n)\n\nProjectListSkeleton.displayName = 'ProjectListSkeleton'\n\n// --- Task Detail Skeleton ---\n\nexport interface TaskDetailSkeletonProps extends React.ComponentPropsWithoutRef<'div'> {\n /** Accessible label for the loading region. @default 'Loading' */\n label?: string\n}\n\nconst TaskDetailSkeleton = React.forwardRef<HTMLDivElement, TaskDetailSkeletonProps>(\n function TaskDetailSkeleton({ className, label, ...props }, ref) {\n return (\n <div ref={ref} {...statusProps(label)} {...props} className={cn(\"flex h-full flex-col gap-0 rounded-surface border border-card bg-surface-raised\", className)}>\n <SrLabel label={label} />\n {/* Header */}\n <div className=\"flex items-center justify-between border-b border-surface-border-strong px-ds-05b py-ds-05\">\n <Skeleton className={'h-ds-05b w-[192px]'} />\n <div className=\"flex items-center gap-ds-03\">\n <Skeleton className={'h-ds-xs-plus w-ds-xs-plus rounded-surface'} />\n <Skeleton className={'h-ds-xs-plus w-ds-xs-plus rounded-surface'} />\n </div>\n </div>\n\n {/* Property rows */}\n <div className=\"flex flex-col gap-0 border-b border-surface-border-strong px-ds-05b py-ds-05\">\n {Array.from({ length: 5 }).map((_, i) => (\n <div\n key={`prop-${i}`}\n className=\"flex items-center gap-ds-05 py-ds-03\"\n >\n <Skeleton className={'h-ds-04 w-ds-12 shrink-0'} />\n <Skeleton className={'h-ds-06 w-[128px] rounded-control'} />\n </div>\n ))}\n </div>\n\n {/* Tabs */}\n <div className=\"border-b border-surface-border-strong px-ds-05b\">\n <div className=\"flex gap-ds-05 py-ds-04\">\n {Array.from({ length: 3 }).map((_, i) => (\n <Skeleton key={`tab-${i}`} className={'h-ds-05 w-ds-10'} />\n ))}\n </div>\n </div>\n\n {/* Tab content */}\n <div className=\"flex flex-1 flex-col gap-ds-04 px-ds-05b py-ds-05\">\n <Skeleton className={'h-ds-04 w-full'} />\n <Skeleton className={'h-ds-04 w-4/5'} />\n <Skeleton className={'h-ds-04 w-3/5'} />\n <Skeleton className={'mt-ds-03 h-ds-04 w-full'} />\n <Skeleton className={'h-ds-04 w-2/3'} />\n </div>\n </div>\n )\n},\n)\n\nTaskDetailSkeleton.displayName = 'TaskDetailSkeleton'\n\nexport {\n DashboardSkeleton,\n ProjectListSkeleton,\n TaskDetailSkeleton,\n}\n"],"mappings":";;;;;AAQA,SAAS,EAAY,GAAgB;CACnC,OAAO;EAAE,MAAM;EAAmB,aAAa;EAAM,cAAc,KAAS;CAAU;AACxF;AACA,SAAS,EAAQ,EAAE,YAA6B;CAC9C,OAAO,kBAAC,QAAD;EAAM,WAAU;YAAhB,CAA2B,KAAS,WAAU,GAAO;;AAC9D;AASA,IAAM,IAAoB,EAAM,WAC9B,SAA2B,EAAE,cAAW,UAAO,GAAG,KAAS,GAAK;CAChE,OACE,kBAAC,OAAD;EAAU;EAAK,GAAI,EAAY,CAAK;EAAG,GAAI;EAAO,WAAW,EAAG,2BAA2B,CAAS;YAApG;GACE,kBAAC,GAAD,EAAgB,SAAQ,CAAA;GAExB,kBAAC,OAAD;IAAK,WAAU;cACZ,MAAM,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG,MACjC,kBAAC,OAAD;KAEE,WAAU;eAFZ;MAIE,kBAAC,OAAD;OAAK,WAAU;iBAAf,CACE,kBAAC,GAAD,EAAU,WAAW,kBAAoB,CAAA,GAC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ps } from 'class-variance-authority';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
export type Priority = 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT' | 'low' | 'medium' | 'high' | 'urgent';
|
|
5
|
-
|
|
6
|
-
display?: "compact" | "full" | null | undefined;
|
|
7
|
-
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
8
|
-
export interface PriorityIndicatorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children'>, VariantProps<typeof priorityVariants> {
|
|
4
|
+
export interface PriorityIndicatorProps extends React.HTMLAttributes<HTMLElement> {
|
|
9
5
|
priority: Priority;
|
|
6
|
+
/** Render an icon-only chip (no visible text). Set an accessible name is handled automatically. */
|
|
7
|
+
iconOnly?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* @deprecated Use `iconOnly`. `'compact'` → icon-only, `'full'` → labeled.
|
|
10
|
+
* Accepted for back-compat; maps to `iconOnly`.
|
|
11
|
+
*/
|
|
12
|
+
display?: 'compact' | 'full';
|
|
13
|
+
/** Override the label text (i18n / custom copy). Defaults to the priority name. */
|
|
14
|
+
children?: React.ReactNode;
|
|
10
15
|
}
|
|
11
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Presentational priority chip — composes `Badge` so radius, color semantics,
|
|
18
|
+
* a11y labeling, and reduced-motion handling come from one place.
|
|
19
|
+
*/
|
|
20
|
+
declare const PriorityIndicator: React.ForwardRefExoticComponent<PriorityIndicatorProps & React.RefAttributes<HTMLElement>>;
|
|
12
21
|
export { PriorityIndicator };
|
|
13
22
|
//# sourceMappingURL=priority-indicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"priority-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/priority-indicator.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,QAAQ,GACR,MAAM,GACN,QAAQ,CAAA;AAiBZ,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,WAAW,CAAC;IAC/E,QAAQ,EAAE,QAAQ,CAAA;IAClB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAA;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC3B;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,4FAqCtB,CAAA;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -1,106 +1,55 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
-
import { IconAlertTriangle as o, IconArrowDown as s, IconArrowUp as c, IconMinus as l } from "@tabler/icons-react";
|
|
8
|
-
import { motion as u } from "framer-motion";
|
|
2
|
+
import { BadgeCompound as e } from "../_chunks/badge-group.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import { IconAlertTriangle as r, IconArrowDown as i, IconArrowUp as a, IconMinus as o } from "@tabler/icons-react";
|
|
9
6
|
//#region src/composed/priority-indicator.tsx
|
|
10
|
-
var
|
|
7
|
+
var s = {
|
|
11
8
|
LOW: {
|
|
12
|
-
icon:
|
|
13
|
-
color: "
|
|
14
|
-
|
|
9
|
+
icon: i,
|
|
10
|
+
color: "slate",
|
|
11
|
+
variant: "soft",
|
|
15
12
|
label: "Low"
|
|
16
13
|
},
|
|
17
14
|
MEDIUM: {
|
|
18
|
-
icon:
|
|
19
|
-
color: "
|
|
20
|
-
|
|
15
|
+
icon: o,
|
|
16
|
+
color: "warning",
|
|
17
|
+
variant: "soft",
|
|
21
18
|
label: "Medium"
|
|
22
19
|
},
|
|
23
20
|
HIGH: {
|
|
24
|
-
icon:
|
|
25
|
-
color: "
|
|
26
|
-
|
|
21
|
+
icon: a,
|
|
22
|
+
color: "error",
|
|
23
|
+
variant: "soft",
|
|
27
24
|
label: "High"
|
|
28
25
|
},
|
|
29
26
|
URGENT: {
|
|
30
|
-
icon:
|
|
31
|
-
color: "
|
|
32
|
-
|
|
27
|
+
icon: r,
|
|
28
|
+
color: "error",
|
|
29
|
+
variant: "solid",
|
|
33
30
|
label: "Urgent"
|
|
34
31
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
title: p.label,
|
|
48
|
-
...s,
|
|
49
|
-
children: /* @__PURE__ */ i(n, {
|
|
50
|
-
icon: m,
|
|
51
|
-
size: "sm",
|
|
52
|
-
className: p.color
|
|
53
|
-
})
|
|
54
|
-
});
|
|
55
|
-
return h ? /* @__PURE__ */ i(u.div, {
|
|
56
|
-
animate: { scale: [
|
|
57
|
-
1,
|
|
58
|
-
1.1,
|
|
59
|
-
1
|
|
60
|
-
] },
|
|
61
|
-
transition: {
|
|
62
|
-
repeat: Infinity,
|
|
63
|
-
duration: 2,
|
|
64
|
-
ease: "easeInOut"
|
|
65
|
-
},
|
|
66
|
-
className: "inline-flex",
|
|
67
|
-
children: e
|
|
68
|
-
}) : e;
|
|
69
|
-
}
|
|
70
|
-
return /* @__PURE__ */ a("div", {
|
|
32
|
+
}, c = t.forwardRef(({ priority: t, iconOnly: r, display: i, children: a, ...o }, c) => {
|
|
33
|
+
let l = s[t.toUpperCase()] ?? s.MEDIUM, u = r ?? i === "compact", d = a ?? l.label;
|
|
34
|
+
return u ? /* @__PURE__ */ n(e, {
|
|
35
|
+
ref: c,
|
|
36
|
+
...o,
|
|
37
|
+
variant: l.variant,
|
|
38
|
+
color: l.color,
|
|
39
|
+
size: "sm",
|
|
40
|
+
startIcon: l.icon,
|
|
41
|
+
role: "img",
|
|
42
|
+
"aria-label": typeof d == "string" ? d : l.label
|
|
43
|
+
}) : /* @__PURE__ */ n(e, {
|
|
71
44
|
ref: c,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
1
|
|
79
|
-
] },
|
|
80
|
-
transition: {
|
|
81
|
-
repeat: Infinity,
|
|
82
|
-
duration: 2,
|
|
83
|
-
ease: "easeInOut"
|
|
84
|
-
},
|
|
85
|
-
className: t("inline-flex items-center justify-center rounded-control p-ds-01", p.bgColor),
|
|
86
|
-
children: /* @__PURE__ */ i(n, {
|
|
87
|
-
icon: m,
|
|
88
|
-
size: "sm",
|
|
89
|
-
className: p.color
|
|
90
|
-
})
|
|
91
|
-
}) : /* @__PURE__ */ i("div", {
|
|
92
|
-
className: t("inline-flex items-center justify-center rounded-control p-ds-01", p.bgColor),
|
|
93
|
-
children: /* @__PURE__ */ i(n, {
|
|
94
|
-
icon: m,
|
|
95
|
-
size: "sm",
|
|
96
|
-
className: p.color
|
|
97
|
-
})
|
|
98
|
-
}), /* @__PURE__ */ i("span", {
|
|
99
|
-
className: "text-body-sm text-surface-fg-muted",
|
|
100
|
-
children: p.label
|
|
101
|
-
})]
|
|
45
|
+
...o,
|
|
46
|
+
variant: l.variant,
|
|
47
|
+
color: l.color,
|
|
48
|
+
size: "sm",
|
|
49
|
+
startIcon: l.icon,
|
|
50
|
+
children: d
|
|
102
51
|
});
|
|
103
52
|
});
|
|
104
|
-
|
|
53
|
+
c.displayName = "PriorityIndicator";
|
|
105
54
|
//#endregion
|
|
106
|
-
export {
|
|
55
|
+
export { c as PriorityIndicator };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"priority-indicator.js","names":[],"sources":["../../src/composed/priority-indicator.tsx"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"priority-indicator.js","names":[],"sources":["../../src/composed/priority-indicator.tsx"],"sourcesContent":["import {\n IconAlertTriangle,\n IconArrowDown,\n IconArrowUp,\n IconMinus,\n} from '@tabler/icons-react'\nimport * as React from 'react'\n\nimport { Badge, type BadgeColor, type BadgeProps } from '../ui/badge'\nimport type { IconInput } from '../ui/lib/icon-input'\n\nexport type Priority =\n | 'LOW'\n | 'MEDIUM'\n | 'HIGH'\n | 'URGENT'\n | 'low'\n | 'medium'\n | 'high'\n | 'urgent'\n\n/**\n * Severity is conveyed by **icon + color + weight**, never motion. URGENT uses\n * a solid fill so the top tier reads at a glance without any animation\n * (matches Linear/Jira; also removes the prior WCAG 2.2.2 infinite-pulse issue).\n */\nconst priorityConfig: Record<\n 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT',\n { icon: IconInput; color: BadgeColor; variant: NonNullable<BadgeProps['variant']>; label: string }\n> = {\n LOW: { icon: IconArrowDown, color: 'slate', variant: 'soft', label: 'Low' },\n MEDIUM: { icon: IconMinus, color: 'warning', variant: 'soft', label: 'Medium' },\n HIGH: { icon: IconArrowUp, color: 'error', variant: 'soft', label: 'High' },\n URGENT: { icon: IconAlertTriangle, color: 'error', variant: 'solid', label: 'Urgent' },\n}\n\nexport interface PriorityIndicatorProps extends React.HTMLAttributes<HTMLElement> {\n priority: Priority\n /** Render an icon-only chip (no visible text). Set an accessible name is handled automatically. */\n iconOnly?: boolean\n /**\n * @deprecated Use `iconOnly`. `'compact'` → icon-only, `'full'` → labeled.\n * Accepted for back-compat; maps to `iconOnly`.\n */\n display?: 'compact' | 'full'\n /** Override the label text (i18n / custom copy). Defaults to the priority name. */\n children?: React.ReactNode\n}\n\n/**\n * Presentational priority chip — composes `Badge` so radius, color semantics,\n * a11y labeling, and reduced-motion handling come from one place.\n */\nconst PriorityIndicator = React.forwardRef<HTMLElement, PriorityIndicatorProps>(\n ({ priority, iconOnly, display, children, ...props }, ref) => {\n const key = priority.toUpperCase() as 'LOW' | 'MEDIUM' | 'HIGH' | 'URGENT'\n // Defensive fallback: an unexpected priority string renders as MEDIUM\n // rather than throwing on `config.icon`.\n const config = priorityConfig[key] ?? priorityConfig.MEDIUM\n const compact = iconOnly ?? display === 'compact'\n const label = children ?? config.label\n\n if (compact) {\n return (\n <Badge\n ref={ref}\n {...props}\n variant={config.variant}\n color={config.color}\n size=\"sm\"\n startIcon={config.icon}\n role=\"img\"\n aria-label={typeof label === 'string' ? label : config.label}\n />\n )\n }\n\n return (\n <Badge\n ref={ref}\n {...props}\n variant={config.variant}\n color={config.color}\n size=\"sm\"\n startIcon={config.icon}\n >\n {label}\n </Badge>\n )\n },\n)\nPriorityIndicator.displayName = 'PriorityIndicator'\n\nexport { PriorityIndicator }\n"],"mappings":";;;;;AA0BA,IAAM,IAGF;CACF,KAAK;EAAE,MAAM;EAAe,OAAO;EAAS,SAAS;EAAQ,OAAO;CAAM;CAC1E,QAAQ;EAAE,MAAM;EAAW,OAAO;EAAW,SAAS;EAAQ,OAAO;CAAS;CAC9E,MAAM;EAAE,MAAM;EAAa,OAAO;EAAS,SAAS;EAAQ,OAAO;CAAO;CAC1E,QAAQ;EAAE,MAAM;EAAmB,OAAO;EAAS,SAAS;EAAS,OAAO;CAAS;AACvF,GAmBM,IAAoB,EAAM,YAC7B,EAAE,aAAU,aAAU,YAAS,aAAU,GAAG,KAAS,MAAQ;CAI5D,IAAM,IAAS,EAHH,EAAS,YAGS,MAAQ,EAAe,QAC/C,IAAU,KAAY,MAAY,WAClC,IAAQ,KAAY,EAAO;CAiBjC,OAfI,IAEA,kBAAC,GAAD;EACO;EACL,GAAI;EACJ,SAAS,EAAO;EAChB,OAAO,EAAO;EACd,MAAK;EACL,WAAW,EAAO;EAClB,MAAK;EACL,cAAY,OAAO,KAAU,WAAW,IAAQ,EAAO;CACxD,CAAA,IAKH,kBAAC,GAAD;EACO;EACL,GAAI;EACJ,SAAS,EAAO;EAChB,OAAO,EAAO;EACd,MAAK;EACL,WAAW,EAAO;YAEjB;CACI,CAAA;AAEX,CACF;AACA,EAAkB,cAAc"}
|
|
@@ -9,7 +9,9 @@ export interface ScheduleEvent {
|
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* A day/week calendar schedule grid. Renders time-slotted events with
|
|
12
|
-
* proportional height, color coding,
|
|
12
|
+
* proportional height, color coding, overlapping-event columns, a live
|
|
13
|
+
* current-time indicator, and keyboard-navigable slots (when `onSlotClick` is
|
|
14
|
+
* set). Presentational — drive `events`/`date`/`view` from the parent.
|
|
13
15
|
*/
|
|
14
16
|
export interface ScheduleViewProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
15
17
|
/** Display mode: single-day column or full-week (7 columns). */
|
|
@@ -20,7 +22,10 @@ export interface ScheduleViewProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
20
22
|
events: ScheduleEvent[];
|
|
21
23
|
/** Called when an event block is clicked. */
|
|
22
24
|
onEventClick?: (event: ScheduleEvent) => void;
|
|
23
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* Called when an empty time slot is clicked. When omitted, slots render as
|
|
27
|
+
* non-interactive grid lines (no keyboard/AT tab stops).
|
|
28
|
+
*/
|
|
24
29
|
onSlotClick?: (start: Date, end: Date) => void;
|
|
25
30
|
/** First visible hour (default 8). */
|
|
26
31
|
startHour?: number;
|
|
@@ -28,6 +33,16 @@ export interface ScheduleViewProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
28
33
|
endHour?: number;
|
|
29
34
|
/** Slot duration in minutes (default 30). */
|
|
30
35
|
slotDuration?: number;
|
|
36
|
+
/** Currently-selected event id — rendered with a ring. */
|
|
37
|
+
selectedEventId?: string;
|
|
38
|
+
/** Custom event content renderer. Receives the event; return the block body. */
|
|
39
|
+
renderEvent?: (event: ScheduleEvent) => React.ReactNode;
|
|
40
|
+
/** Optional toolbar/header rendered above the grid. */
|
|
41
|
+
header?: React.ReactNode;
|
|
42
|
+
/** Content shown when there are no events in view. */
|
|
43
|
+
emptyState?: React.ReactNode;
|
|
44
|
+
/** Grid body height (CSS length or px number). @default 480 */
|
|
45
|
+
height?: number | string;
|
|
31
46
|
}
|
|
32
47
|
declare const ScheduleView: React.ForwardRefExoticComponent<ScheduleViewProps & React.RefAttributes<HTMLDivElement>>;
|
|
33
48
|
export { ScheduleView };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schedule-view.d.ts","sourceRoot":"","sources":["../../src/composed/schedule-view.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CACxE;AAED
|
|
1
|
+
{"version":3,"file":"schedule-view.d.ts","sourceRoot":"","sources":["../../src/composed/schedule-view.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,IAAI,CAAA;IACX,GAAG,EAAE,IAAI,CAAA;IACT,KAAK,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAA;CACxE;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IAC7E,gEAAgE;IAChE,IAAI,EAAE,KAAK,GAAG,MAAM,CAAA;IACpB,6EAA6E;IAC7E,IAAI,EAAE,IAA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