@devalok/shilp-sutra 0.33.2 → 0.34.1

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.
Files changed (175) hide show
  1. package/dist/_chunks/badge-group.js +306 -246
  2. package/dist/_chunks/chat.js +513 -0
  3. package/dist/_chunks/date-picker.js +748 -0
  4. package/dist/_chunks/document-preview.js +109 -90
  5. package/dist/_chunks/file-preview.js +492 -504
  6. package/dist/_chunks/framer.js +5564 -5613
  7. package/dist/_chunks/image-preview.js +127 -88
  8. package/dist/_chunks/keybinding.js +12 -14
  9. package/dist/_chunks/link-context.js +19 -16
  10. package/dist/_chunks/mention-suggestion.js +353 -350
  11. package/dist/_chunks/motion-provider.js +26 -20
  12. package/dist/_chunks/popover.js +127 -0
  13. package/dist/_chunks/primitives.js +7584 -6425
  14. package/dist/_chunks/rich-chat-input.js +2070 -0
  15. package/dist/_chunks/rolldown-runtime.js +21 -0
  16. package/dist/_chunks/shared.js +126 -0
  17. package/dist/_chunks/sonner.js +605 -734
  18. package/dist/_chunks/stat-row.js +418 -440
  19. package/dist/_chunks/tiptap.js +15850 -19964
  20. package/dist/_chunks/tree-view.js +231 -290
  21. package/dist/_chunks/use-calendar.js +161 -208
  22. package/dist/_chunks/vendor-client.js +314 -2199
  23. package/dist/_chunks/vendor-utils.js +1721 -2978
  24. package/dist/ai/ai-command-provider.js +23 -17
  25. package/dist/ai/block-renderer.js +68 -51
  26. package/dist/ai/blocks/index.js +2 -12
  27. package/dist/ai/command-bar.js +470 -519
  28. package/dist/ai/conversation.js +241 -227
  29. package/dist/ai/index.js +181 -167
  30. package/dist/ai/types.js +0 -1
  31. package/dist/composed/activity-feed.js +232 -202
  32. package/dist/composed/avatar-group.js +164 -222
  33. package/dist/composed/bulk-action-bar.js +174 -165
  34. package/dist/composed/command-palette.js +290 -308
  35. package/dist/composed/confirm-dialog.js +28 -48
  36. package/dist/composed/content-card.js +69 -108
  37. package/dist/composed/date-picker/index.js +3 -13
  38. package/dist/composed/deadline-indicator.js +68 -74
  39. package/dist/composed/emoji-picker.js +83 -110
  40. package/dist/composed/empty-state.js +64 -103
  41. package/dist/composed/error-boundary.js +129 -127
  42. package/dist/composed/file-preview.js +2 -12
  43. package/dist/composed/filter-bar.js +98 -130
  44. package/dist/composed/form-section.js +61 -45
  45. package/dist/composed/global-loading.js +34 -47
  46. package/dist/composed/index.js +34 -92
  47. package/dist/composed/inline-edit.js +92 -107
  48. package/dist/composed/lib/string-utils.js +8 -8
  49. package/dist/composed/loading-skeleton.js +103 -171
  50. package/dist/composed/markdown-viewer.js +187 -139
  51. package/dist/composed/master-detail.js +147 -156
  52. package/dist/composed/member-picker.js +46 -49
  53. package/dist/composed/multi-select-popover.js +181 -179
  54. package/dist/composed/page-header.js +54 -76
  55. package/dist/composed/page-skeletons.js +143 -127
  56. package/dist/composed/priority-indicator.js +105 -111
  57. package/dist/composed/responsive-overlay.js +36 -41
  58. package/dist/composed/rich-chat-input.js +2 -1860
  59. package/dist/composed/rich-text-editor.js +561 -424
  60. package/dist/composed/schedule-view.js +134 -185
  61. package/dist/composed/simple-tooltip.js +21 -21
  62. package/dist/composed/status-badge.js +133 -137
  63. package/dist/hooks/index.js +7 -12
  64. package/dist/hooks/use-color-mode.js +28 -25
  65. package/dist/hooks/use-mobile.js +13 -13
  66. package/dist/hooks/use-toast.js +2 -4
  67. package/dist/hooks/use-touch-device.js +9 -11
  68. package/dist/hooks/use-viewport-height.js +14 -14
  69. package/dist/motion/index.js +3 -11
  70. package/dist/motion/primitives-index.js +226 -186
  71. package/dist/shell/app-command-palette.js +203 -234
  72. package/dist/shell/bottom-navbar.js +150 -190
  73. package/dist/shell/command-registry.js +13 -14
  74. package/dist/shell/index.js +10 -20
  75. package/dist/shell/link-context.js +2 -5
  76. package/dist/shell/notification-center.js +238 -259
  77. package/dist/shell/notification-preferences.js +241 -184
  78. package/dist/shell/sidebar.js +251 -281
  79. package/dist/shell/top-bar.js +203 -237
  80. package/dist/tailwind/index.cjs +426 -451
  81. package/dist/tailwind/index.js +2 -4
  82. package/dist/tailwind/preset.d.ts.map +1 -1
  83. package/dist/tailwind/preset.js +443 -468
  84. package/dist/ui/accordion.js +52 -60
  85. package/dist/ui/alert-dialog.js +111 -156
  86. package/dist/ui/alert.js +177 -99
  87. package/dist/ui/aspect-ratio.js +13 -16
  88. package/dist/ui/autocomplete.js +112 -148
  89. package/dist/ui/avatar.js +196 -169
  90. package/dist/ui/badge-group.js +2 -7
  91. package/dist/ui/badge-indicator.js +42 -51
  92. package/dist/ui/badge.js +2 -15
  93. package/dist/ui/banner.js +76 -68
  94. package/dist/ui/breadcrumb.js +65 -84
  95. package/dist/ui/button-group.js +109 -102
  96. package/dist/ui/button-processing.js +69 -73
  97. package/dist/ui/button.js +393 -279
  98. package/dist/ui/card.js +151 -157
  99. package/dist/ui/charts/index.js +1002 -1319
  100. package/dist/ui/chat/index.js +2 -11
  101. package/dist/ui/checkbox.js +77 -100
  102. package/dist/ui/code.js +18 -32
  103. package/dist/ui/collapsible.js +21 -29
  104. package/dist/ui/color-input.js +453 -372
  105. package/dist/ui/color-swatch.js +60 -90
  106. package/dist/ui/combobox.js +244 -293
  107. package/dist/ui/container.js +18 -24
  108. package/dist/ui/context-menu.js +154 -203
  109. package/dist/ui/data-table-body.js +116 -213
  110. package/dist/ui/data-table-bulk-actions.js +43 -59
  111. package/dist/ui/data-table-card.js +84 -71
  112. package/dist/ui/data-table-context.js +39 -42
  113. package/dist/ui/data-table-header.js +98 -139
  114. package/dist/ui/data-table-pagination.js +69 -82
  115. package/dist/ui/data-table-toolbar.js +104 -130
  116. package/dist/ui/data-table.js +278 -354
  117. package/dist/ui/devalok-grain.js +77 -66
  118. package/dist/ui/dialog.js +122 -151
  119. package/dist/ui/dropdown-menu.js +152 -203
  120. package/dist/ui/file-upload.js +242 -266
  121. package/dist/ui/form.js +60 -56
  122. package/dist/ui/hover-card.js +54 -54
  123. package/dist/ui/icon-button.js +21 -26
  124. package/dist/ui/icon-context.js +17 -17
  125. package/dist/ui/icon-group.js +22 -29
  126. package/dist/ui/icon.js +201 -121
  127. package/dist/ui/index.js +74 -350
  128. package/dist/ui/input-otp.d.ts.map +1 -1
  129. package/dist/ui/input-otp.js +44 -48
  130. package/dist/ui/input.js +92 -169
  131. package/dist/ui/label.js +17 -22
  132. package/dist/ui/lib/date-utils.js +14 -11
  133. package/dist/ui/lib/motion.js +77 -36
  134. package/dist/ui/lib/utils.js +39 -16
  135. package/dist/ui/link.js +13 -24
  136. package/dist/ui/menubar.js +132 -210
  137. package/dist/ui/navigation-menu.js +164 -194
  138. package/dist/ui/number-input.js +72 -95
  139. package/dist/ui/pagination.js +122 -159
  140. package/dist/ui/popover.js +2 -131
  141. package/dist/ui/progress-ring.js +133 -143
  142. package/dist/ui/progress.js +51 -95
  143. package/dist/ui/radio.js +41 -50
  144. package/dist/ui/search-input.js +51 -53
  145. package/dist/ui/segmented-control.js +93 -114
  146. package/dist/ui/select.js +131 -157
  147. package/dist/ui/separator.js +15 -25
  148. package/dist/ui/sheet.js +135 -163
  149. package/dist/ui/sidebar.js +357 -600
  150. package/dist/ui/skeleton.js +179 -231
  151. package/dist/ui/slider.js +24 -34
  152. package/dist/ui/spinner.js +226 -205
  153. package/dist/ui/split-button.js +227 -276
  154. package/dist/ui/stack.js +56 -70
  155. package/dist/ui/stat-card.js +259 -251
  156. package/dist/ui/status-dot.js +67 -63
  157. package/dist/ui/stepper.js +119 -168
  158. package/dist/ui/switch.js +51 -54
  159. package/dist/ui/table.js +57 -90
  160. package/dist/ui/tabs.js +139 -156
  161. package/dist/ui/text.js +52 -59
  162. package/dist/ui/textarea.js +40 -57
  163. package/dist/ui/toast-types.js +0 -1
  164. package/dist/ui/toast.js +554 -536
  165. package/dist/ui/toaster.js +23 -33
  166. package/dist/ui/toggle-group.js +37 -41
  167. package/dist/ui/toggle.js +36 -40
  168. package/dist/ui/tooltip.js +80 -65
  169. package/dist/ui/tree-view/index.js +2 -6
  170. package/dist/ui/visually-hidden.js +12 -10
  171. package/llms-full.txt +1 -1
  172. package/llms.txt +12 -0
  173. package/package.json +3 -3
  174. package/dist/_chunks/date-time-picker.js +0 -851
  175. package/dist/_chunks/typing-indicator.js +0 -565
@@ -1,168 +1,177 @@
1
1
  "use client";
2
- import { jsxs as u, jsx as t } from "react/jsx-runtime";
3
- import * as n from "react";
4
- import { createPortal as B } from "react-dom";
5
- import { IconX as w } from "@tabler/icons-react";
6
- import { Icon as x } from "../ui/icon.js";
7
- import { cn as z } from "../ui/lib/utils.js";
8
- import { Button as m } from "../ui/button.js";
9
- import { B as A } from "../_chunks/badge-group.js";
10
- import { springs as D } from "../ui/lib/motion.js";
11
- import { m as y, A as h } from "../_chunks/framer.js";
12
- const I = n.forwardRef(function({ action: e, tabIndex: c }, o) {
13
- const [l, a] = n.useState(!1);
14
- return l ? /* @__PURE__ */ u(
15
- y.div,
16
- {
17
- ref: o,
18
- initial: { opacity: 0, scale: 0.95 },
19
- animate: { opacity: 1, scale: 1 },
20
- exit: { opacity: 0, scale: 0.95 },
21
- transition: { type: "spring", stiffness: 500, damping: 30 },
22
- className: "flex items-center gap-ds-02",
23
- tabIndex: c,
24
- children: [
25
- /* @__PURE__ */ t("span", { className: "text-ds-sm text-surface-fg-muted whitespace-nowrap", children: e.confirmMessage ?? "Are you sure?" }),
26
- /* @__PURE__ */ t(
27
- m,
28
- {
29
- variant: "solid",
30
- size: "sm",
31
- color: "error",
32
- onClick: () => {
33
- a(!1), e.onClick();
34
- },
35
- children: "Confirm"
36
- }
37
- ),
38
- /* @__PURE__ */ t(
39
- m,
40
- {
41
- variant: "ghost",
42
- size: "sm",
43
- onClick: () => a(!1),
44
- children: "Cancel"
45
- }
46
- )
47
- ]
48
- }
49
- ) : /* @__PURE__ */ t(
50
- y.div,
51
- {
52
- ref: o,
53
- initial: { opacity: 0, scale: 0.95 },
54
- animate: { opacity: 1, scale: 1 },
55
- exit: { opacity: 0, scale: 0.95 },
56
- transition: { type: "spring", stiffness: 500, damping: 30 },
57
- tabIndex: c,
58
- children: /* @__PURE__ */ t(
59
- m,
60
- {
61
- variant: "ghost",
62
- size: "sm",
63
- color: e.color === "error" ? "error" : "accent",
64
- disabled: e.disabled,
65
- onClick: e.requiresConfirmation ? () => a(!0) : e.onClick,
66
- startIcon: e.icon ? /* @__PURE__ */ t(x, { icon: e.icon }) : void 0,
67
- tabIndex: -1,
68
- children: e.label
69
- }
70
- )
71
- }
72
- );
2
+ import { a as e, c as t } from "../_chunks/framer.js";
3
+ import { springs as n } from "../ui/lib/motion.js";
4
+ import { cn as r } from "../ui/lib/utils.js";
5
+ import { Icon as i } from "../ui/icon.js";
6
+ import { n as a } from "../_chunks/badge-group.js";
7
+ import { Button as o } from "../ui/button.js";
8
+ import * as s from "react";
9
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
+ import { createPortal as u } from "react-dom";
11
+ import { IconX as d } from "@tabler/icons-react";
12
+ //#region src/composed/bulk-action-bar.tsx
13
+ var f = s.forwardRef(function({ action: t, tabIndex: n }, r) {
14
+ let [a, u] = s.useState(!1);
15
+ return a ? /* @__PURE__ */ l(e.div, {
16
+ ref: r,
17
+ initial: {
18
+ opacity: 0,
19
+ scale: .95
20
+ },
21
+ animate: {
22
+ opacity: 1,
23
+ scale: 1
24
+ },
25
+ exit: {
26
+ opacity: 0,
27
+ scale: .95
28
+ },
29
+ transition: {
30
+ type: "spring",
31
+ stiffness: 500,
32
+ damping: 30
33
+ },
34
+ className: "flex items-center gap-ds-02",
35
+ tabIndex: n,
36
+ children: [
37
+ /* @__PURE__ */ c("span", {
38
+ className: "text-ds-sm text-surface-fg-muted whitespace-nowrap",
39
+ children: t.confirmMessage ?? "Are you sure?"
40
+ }),
41
+ /* @__PURE__ */ c(o, {
42
+ variant: "solid",
43
+ size: "sm",
44
+ color: "error",
45
+ onClick: () => {
46
+ u(!1), t.onClick();
47
+ },
48
+ children: "Confirm"
49
+ }),
50
+ /* @__PURE__ */ c(o, {
51
+ variant: "ghost",
52
+ size: "sm",
53
+ onClick: () => u(!1),
54
+ children: "Cancel"
55
+ })
56
+ ]
57
+ }) : /* @__PURE__ */ c(e.div, {
58
+ ref: r,
59
+ initial: {
60
+ opacity: 0,
61
+ scale: .95
62
+ },
63
+ animate: {
64
+ opacity: 1,
65
+ scale: 1
66
+ },
67
+ exit: {
68
+ opacity: 0,
69
+ scale: .95
70
+ },
71
+ transition: {
72
+ type: "spring",
73
+ stiffness: 500,
74
+ damping: 30
75
+ },
76
+ tabIndex: n,
77
+ children: /* @__PURE__ */ c(o, {
78
+ variant: "ghost",
79
+ size: "sm",
80
+ color: t.color === "error" ? "error" : "accent",
81
+ disabled: t.disabled,
82
+ onClick: t.requiresConfirmation ? () => u(!0) : t.onClick,
83
+ startIcon: t.icon ? /* @__PURE__ */ c(i, { icon: t.icon }) : void 0,
84
+ tabIndex: -1,
85
+ children: t.label
86
+ })
87
+ });
73
88
  });
74
- function N({
75
- show: g,
76
- count: e,
77
- onClearSelection: c,
78
- actions: o,
79
- totalCount: l,
80
- onSelectAll: a,
81
- className: v
82
- }) {
83
- const [k, b] = n.useState(!1), [p, f] = n.useState(0), d = n.useRef([]);
84
- n.useEffect(() => {
85
- f(0);
86
- }, [o.length]), n.useEffect(() => {
87
- b(!0);
88
- }, []);
89
- function C(r) {
90
- if (r.key === "Escape") {
91
- r.preventDefault(), c();
92
- return;
93
- }
94
- const s = o.length;
95
- if (s !== 0) {
96
- if (r.key === "ArrowRight") {
97
- r.preventDefault();
98
- const i = (p + 1) % s;
99
- f(i), d.current[i]?.focus();
100
- } else if (r.key === "ArrowLeft") {
101
- r.preventDefault();
102
- const i = (p - 1 + s) % s;
103
- f(i), d.current[i]?.focus();
104
- } else if (r.key === "Home")
105
- r.preventDefault(), f(0), d.current[0]?.focus();
106
- else if (r.key === "End") {
107
- r.preventDefault();
108
- const i = s - 1;
109
- f(i), d.current[i]?.focus();
110
- }
111
- }
112
- }
113
- return k ? B(
114
- /* @__PURE__ */ t(h, { children: g && /* @__PURE__ */ u(
115
- y.div,
116
- {
117
- initial: { y: 100, opacity: 0 },
118
- animate: { y: 0, opacity: 1 },
119
- exit: { y: 100, opacity: 0 },
120
- transition: D.snappy,
121
- className: z(
122
- "fixed bottom-ds-06 left-1/2 z-50 -translate-x-1/2",
123
- "flex items-center gap-ds-04 rounded-ds-lg border border-surface-border bg-surface-overlay px-ds-05 py-ds-03 shadow-floating",
124
- v
125
- ),
126
- role: "toolbar",
127
- "aria-label": `${e} items selected`,
128
- onKeyDown: C,
129
- children: [
130
- /* @__PURE__ */ u(A, { variant: "solid", size: "sm", children: [
131
- e,
132
- " selected"
133
- ] }),
134
- l != null && l > e && a && /* @__PURE__ */ u(m, { variant: "link", size: "xs", onClick: a, children: [
135
- "Select all ",
136
- l
137
- ] }),
138
- /* @__PURE__ */ t("div", { className: "flex items-center gap-ds-02", children: /* @__PURE__ */ t(h, { mode: "popLayout", children: o.map((r, s) => /* @__PURE__ */ t(
139
- I,
140
- {
141
- ref: (i) => {
142
- d.current[s] = i;
143
- },
144
- action: r,
145
- tabIndex: s === p ? 0 : -1
146
- },
147
- r.label
148
- )) }) }),
149
- /* @__PURE__ */ t(
150
- m,
151
- {
152
- variant: "ghost",
153
- size: "icon-sm",
154
- onClick: c,
155
- "aria-label": "Clear selection",
156
- children: /* @__PURE__ */ t(x, { icon: w, size: "sm" })
157
- }
158
- )
159
- ]
160
- }
161
- ) }),
162
- document.body
163
- ) : null;
89
+ function p({ show: p, count: m, onClearSelection: h, actions: g, totalCount: _, onSelectAll: v, className: y }) {
90
+ let [b, x] = s.useState(!1), [S, C] = s.useState(0), w = s.useRef([]);
91
+ s.useEffect(() => {
92
+ C(0);
93
+ }, [g.length]), s.useEffect(() => {
94
+ x(!0);
95
+ }, []);
96
+ function T(e) {
97
+ if (e.key === "Escape") {
98
+ e.preventDefault(), h();
99
+ return;
100
+ }
101
+ let t = g.length;
102
+ if (t !== 0) {
103
+ if (e.key === "ArrowRight") {
104
+ e.preventDefault();
105
+ let n = (S + 1) % t;
106
+ C(n), w.current[n]?.focus();
107
+ } else if (e.key === "ArrowLeft") {
108
+ e.preventDefault();
109
+ let n = (S - 1 + t) % t;
110
+ C(n), w.current[n]?.focus();
111
+ } else if (e.key === "Home") e.preventDefault(), C(0), w.current[0]?.focus();
112
+ else if (e.key === "End") {
113
+ e.preventDefault();
114
+ let n = t - 1;
115
+ C(n), w.current[n]?.focus();
116
+ }
117
+ }
118
+ }
119
+ return b ? u(/* @__PURE__ */ c(t, { children: p && /* @__PURE__ */ l(e.div, {
120
+ initial: {
121
+ y: 100,
122
+ opacity: 0
123
+ },
124
+ animate: {
125
+ y: 0,
126
+ opacity: 1
127
+ },
128
+ exit: {
129
+ y: 100,
130
+ opacity: 0
131
+ },
132
+ transition: n.snappy,
133
+ className: r("fixed bottom-ds-06 left-1/2 z-50 -translate-x-1/2", "flex items-center gap-ds-04 rounded-ds-lg border border-surface-border bg-surface-overlay px-ds-05 py-ds-03 shadow-floating", y),
134
+ role: "toolbar",
135
+ "aria-label": `${m} items selected`,
136
+ onKeyDown: T,
137
+ children: [
138
+ /* @__PURE__ */ l(a, {
139
+ variant: "solid",
140
+ size: "sm",
141
+ children: [m, " selected"]
142
+ }),
143
+ _ != null && _ > m && v && /* @__PURE__ */ l(o, {
144
+ variant: "link",
145
+ size: "xs",
146
+ onClick: v,
147
+ children: ["Select all ", _]
148
+ }),
149
+ /* @__PURE__ */ c("div", {
150
+ className: "flex items-center gap-ds-02",
151
+ children: /* @__PURE__ */ c(t, {
152
+ mode: "popLayout",
153
+ children: g.map((e, t) => /* @__PURE__ */ c(f, {
154
+ ref: (e) => {
155
+ w.current[t] = e;
156
+ },
157
+ action: e,
158
+ tabIndex: t === S ? 0 : -1
159
+ }, e.label))
160
+ })
161
+ }),
162
+ /* @__PURE__ */ c(o, {
163
+ variant: "ghost",
164
+ size: "icon-sm",
165
+ onClick: h,
166
+ "aria-label": "Clear selection",
167
+ children: /* @__PURE__ */ c(i, {
168
+ icon: d,
169
+ size: "sm"
170
+ })
171
+ })
172
+ ]
173
+ }) }), document.body) : null;
164
174
  }
165
- N.displayName = "BulkActionBar";
166
- export {
167
- N as BulkActionBar
168
- };
175
+ p.displayName = "BulkActionBar";
176
+ //#endregion
177
+ export { p as BulkActionBar };