@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,144 +1,134 @@
1
1
  "use client";
2
- import { jsxs as W, jsx as c } from "react/jsx-runtime";
3
- import * as f from "react";
4
- import { springs as y } from "./lib/motion.js";
5
- import { cn as v } from "./lib/utils.js";
6
- import { u as w, a as b, b as N, c as S, m as M } from "../_chunks/framer.js";
7
- const R = {
8
- default: "var(--color-accent-9)",
9
- success: "var(--color-success-9)",
10
- warning: "var(--color-warning-9)",
11
- error: "var(--color-error-9)",
12
- info: "var(--color-info-9)"
13
- }, $ = {
14
- sm: { size: 32, strokeWidth: 3, fontSize: "text-ds-xs" },
15
- md: { size: 48, strokeWidth: 3.5, fontSize: "text-ds-sm" },
16
- lg: { size: 64, strokeWidth: 4, fontSize: "text-ds-md" }
17
- }, B = f.forwardRef(
18
- ({ value: l, max: d = 100, size: m = "md", color: h = "default", showValue: u = !1, label: g, className: s, ...r }, k) => {
19
- const i = w(), e = $[m], o = (e.size - e.strokeWidth) / 2, a = 2 * Math.PI * o, n = Math.min(Math.max(l / d, 0), 1), p = a * (1 - n), t = e.size / 2, P = Math.round(n * 100), z = b(0), D = N(z, (x) => `${Math.round(x)}%`);
20
- return f.useEffect(() => {
21
- const x = S(
22
- z,
23
- n * 100,
24
- i ? { type: "tween", duration: 0 } : { stiffness: 100, damping: 30, type: "spring" }
25
- );
26
- return () => x.stop();
27
- }, [n, z, i]), /* @__PURE__ */ W(
28
- "svg",
29
- {
30
- ref: k,
31
- width: e.size,
32
- height: e.size,
33
- viewBox: `0 0 ${e.size} ${e.size}`,
34
- role: "progressbar",
35
- "aria-valuenow": l,
36
- "aria-valuemin": 0,
37
- "aria-valuemax": d,
38
- "aria-label": g ?? `${P}% progress`,
39
- className: v("shrink-0", s),
40
- ...r,
41
- children: [
42
- /* @__PURE__ */ c(
43
- "circle",
44
- {
45
- cx: t,
46
- cy: t,
47
- r: o,
48
- fill: "none",
49
- stroke: "var(--color-surface-raised-hover)",
50
- strokeWidth: e.strokeWidth
51
- }
52
- ),
53
- /* @__PURE__ */ c(
54
- M.circle,
55
- {
56
- cx: t,
57
- cy: t,
58
- r: o,
59
- fill: "none",
60
- stroke: R[h],
61
- strokeWidth: e.strokeWidth,
62
- strokeLinecap: "round",
63
- strokeDasharray: a,
64
- initial: { strokeDashoffset: a },
65
- animate: { strokeDashoffset: p },
66
- transition: i ? { duration: 0 } : y.smooth,
67
- transform: `rotate(-90 ${t} ${t})`
68
- }
69
- ),
70
- u && /* @__PURE__ */ c(
71
- M.text,
72
- {
73
- x: t,
74
- y: t,
75
- textAnchor: "middle",
76
- dominantBaseline: "central",
77
- className: v(e.fontSize, "fill-surface-fg font-sans font-semibold"),
78
- children: D
79
- }
80
- )
81
- ]
82
- }
83
- );
84
- }
85
- );
86
- B.displayName = "ProgressRing";
87
- const V = f.forwardRef(
88
- ({ rings: l, size: d = "md", className: m, ...h }, u) => {
89
- const g = w(), s = $[d], r = s.size / 2, k = s.strokeWidth + 2;
90
- return /* @__PURE__ */ c(
91
- "svg",
92
- {
93
- ref: u,
94
- width: s.size,
95
- height: s.size,
96
- viewBox: `0 0 ${s.size} ${s.size}`,
97
- role: "group",
98
- "aria-label": "Progress rings",
99
- className: v("shrink-0", m),
100
- ...h,
101
- children: l.map((i, e) => {
102
- const o = (s.size - s.strokeWidth) / 2 - e * k;
103
- if (o <= 0) return null;
104
- const a = 2 * Math.PI * o, n = Math.min(Math.max(i.value / (i.max ?? 100), 0), 1), p = a * (1 - n);
105
- return /* @__PURE__ */ W(f.Fragment, { children: [
106
- /* @__PURE__ */ c(
107
- "circle",
108
- {
109
- cx: r,
110
- cy: r,
111
- r: o,
112
- fill: "none",
113
- stroke: "var(--color-surface-raised-hover)",
114
- strokeWidth: s.strokeWidth
115
- }
116
- ),
117
- /* @__PURE__ */ c(
118
- M.circle,
119
- {
120
- cx: r,
121
- cy: r,
122
- r: o,
123
- fill: "none",
124
- stroke: R[i.color ?? "default"],
125
- strokeWidth: s.strokeWidth,
126
- strokeLinecap: "round",
127
- strokeDasharray: a,
128
- initial: { strokeDashoffset: a },
129
- animate: { strokeDashoffset: p },
130
- transition: g ? { duration: 0 } : y.smooth,
131
- transform: `rotate(-90 ${r} ${r})`
132
- }
133
- )
134
- ] }, e);
135
- })
136
- }
137
- );
138
- }
139
- );
140
- V.displayName = "MultiProgressRing";
141
- export {
142
- V as MultiProgressRing,
143
- B as ProgressRing
144
- };
2
+ import { a as e, i as t, n, r, t as i } from "../_chunks/framer.js";
3
+ import { springs as a } from "./lib/motion.js";
4
+ import { cn as o } from "./lib/utils.js";
5
+ import * as s from "react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
+ //#region src/ui/progress-ring.tsx
8
+ var u = {
9
+ default: "var(--color-accent-9)",
10
+ success: "var(--color-success-9)",
11
+ warning: "var(--color-warning-9)",
12
+ error: "var(--color-error-9)",
13
+ info: "var(--color-info-9)"
14
+ }, d = {
15
+ sm: {
16
+ size: 32,
17
+ strokeWidth: 3,
18
+ fontSize: "text-ds-xs"
19
+ },
20
+ md: {
21
+ size: 48,
22
+ strokeWidth: 3.5,
23
+ fontSize: "text-ds-sm"
24
+ },
25
+ lg: {
26
+ size: 64,
27
+ strokeWidth: 4,
28
+ fontSize: "text-ds-md"
29
+ }
30
+ }, f = s.forwardRef(({ value: f, max: p = 100, size: m = "md", color: h = "default", showValue: g = !1, label: _, className: v, ...y }, b) => {
31
+ let x = n(), S = d[m], C = (S.size - S.strokeWidth) / 2, w = 2 * Math.PI * C, T = Math.min(Math.max(f / p, 0), 1), E = w * (1 - T), D = S.size / 2, O = Math.round(T * 100), k = t(0), A = r(k, (e) => `${Math.round(e)}%`);
32
+ return s.useEffect(() => {
33
+ let e = i(k, T * 100, x ? {
34
+ type: "tween",
35
+ duration: 0
36
+ } : {
37
+ stiffness: 100,
38
+ damping: 30,
39
+ type: "spring"
40
+ });
41
+ return () => e.stop();
42
+ }, [
43
+ T,
44
+ k,
45
+ x
46
+ ]), /* @__PURE__ */ l("svg", {
47
+ ref: b,
48
+ width: S.size,
49
+ height: S.size,
50
+ viewBox: `0 0 ${S.size} ${S.size}`,
51
+ role: "progressbar",
52
+ "aria-valuenow": f,
53
+ "aria-valuemin": 0,
54
+ "aria-valuemax": p,
55
+ "aria-label": _ ?? `${O}% progress`,
56
+ className: o("shrink-0", v),
57
+ ...y,
58
+ children: [
59
+ /* @__PURE__ */ c("circle", {
60
+ cx: D,
61
+ cy: D,
62
+ r: C,
63
+ fill: "none",
64
+ stroke: "var(--color-surface-raised-hover)",
65
+ strokeWidth: S.strokeWidth
66
+ }),
67
+ /* @__PURE__ */ c(e.circle, {
68
+ cx: D,
69
+ cy: D,
70
+ r: C,
71
+ fill: "none",
72
+ stroke: u[h],
73
+ strokeWidth: S.strokeWidth,
74
+ strokeLinecap: "round",
75
+ strokeDasharray: w,
76
+ initial: { strokeDashoffset: w },
77
+ animate: { strokeDashoffset: E },
78
+ transition: x ? { duration: 0 } : a.smooth,
79
+ transform: `rotate(-90 ${D} ${D})`
80
+ }),
81
+ g && /* @__PURE__ */ c(e.text, {
82
+ x: D,
83
+ y: D,
84
+ textAnchor: "middle",
85
+ dominantBaseline: "central",
86
+ className: o(S.fontSize, "fill-surface-fg font-sans font-semibold"),
87
+ children: A
88
+ })
89
+ ]
90
+ });
91
+ });
92
+ f.displayName = "ProgressRing";
93
+ var p = s.forwardRef(({ rings: t, size: r = "md", className: i, ...f }, p) => {
94
+ let m = n(), h = d[r], g = h.size / 2, _ = h.strokeWidth + 2;
95
+ return /* @__PURE__ */ c("svg", {
96
+ ref: p,
97
+ width: h.size,
98
+ height: h.size,
99
+ viewBox: `0 0 ${h.size} ${h.size}`,
100
+ role: "group",
101
+ "aria-label": "Progress rings",
102
+ className: o("shrink-0", i),
103
+ ...f,
104
+ children: t.map((t, n) => {
105
+ let r = (h.size - h.strokeWidth) / 2 - n * _;
106
+ if (r <= 0) return null;
107
+ let i = 2 * Math.PI * r, o = i * (1 - Math.min(Math.max(t.value / (t.max ?? 100), 0), 1));
108
+ return /* @__PURE__ */ l(s.Fragment, { children: [/* @__PURE__ */ c("circle", {
109
+ cx: g,
110
+ cy: g,
111
+ r,
112
+ fill: "none",
113
+ stroke: "var(--color-surface-raised-hover)",
114
+ strokeWidth: h.strokeWidth
115
+ }), /* @__PURE__ */ c(e.circle, {
116
+ cx: g,
117
+ cy: g,
118
+ r,
119
+ fill: "none",
120
+ stroke: u[t.color ?? "default"],
121
+ strokeWidth: h.strokeWidth,
122
+ strokeLinecap: "round",
123
+ strokeDasharray: i,
124
+ initial: { strokeDashoffset: i },
125
+ animate: { strokeDashoffset: o },
126
+ transition: m ? { duration: 0 } : a.smooth,
127
+ transform: `rotate(-90 ${g} ${g})`
128
+ })] }, n);
129
+ })
130
+ });
131
+ });
132
+ p.displayName = "MultiProgressRing";
133
+ //#endregion
134
+ export { p as MultiProgressRing, f as ProgressRing };
@@ -1,96 +1,52 @@
1
1
  "use client";
2
- import { jsxs as n, jsx as a } from "react/jsx-runtime";
3
- import * as x from "react";
4
- import { aP as c, aQ as d } from "../_chunks/primitives.js";
5
- import { a as m } from "../_chunks/vendor-utils.js";
6
- import { cn as s } from "./lib/utils.js";
7
- import { springs as N } from "./lib/motion.js";
8
- import { m as b } from "../_chunks/framer.js";
9
- const v = m(
10
- "relative w-full overflow-hidden rounded-ds-full bg-surface-raised",
11
- {
12
- variants: {
13
- size: {
14
- sm: "h-1",
15
- md: "h-2",
16
- lg: "h-3"
17
- }
18
- },
19
- defaultVariants: { size: "md" }
20
- }
21
- ), l = m(
22
- "h-full w-full flex-1 transition-[width] duration-moderate-02 ease-expressive-standard",
23
- {
24
- variants: {
25
- color: {
26
- default: "bg-accent-9",
27
- success: "bg-success-9",
28
- warning: "bg-warning-9",
29
- error: "bg-error-9"
30
- }
31
- },
32
- defaultVariants: { color: "default" }
33
- }
34
- ), V = x.forwardRef(
35
- ({
36
- className: f,
37
- value: r,
38
- size: u,
39
- color: p,
40
- indicatorClassName: t,
41
- showLabel: o,
42
- autoColor: g,
43
- ...h
44
- }, w) => {
45
- const e = r == null, i = g && r != null ? r > 100 ? "error" : r >= 85 ? "success" : r >= 60 ? "warning" : "default" : p;
46
- return /* @__PURE__ */ n("div", { className: s("flex items-center gap-ds-03", o && "w-full"), children: [
47
- /* @__PURE__ */ a(
48
- c,
49
- {
50
- ref: w,
51
- value: e ? null : r,
52
- className: s(v({ size: u }), f),
53
- ...h,
54
- children: e ? /* @__PURE__ */ a(
55
- d,
56
- {
57
- className: s(
58
- l({ color: i }),
59
- "w-2/5 animate-progress-indeterminate motion-reduce:animate-none",
60
- t
61
- )
62
- }
63
- ) : /* @__PURE__ */ a(
64
- d,
65
- {
66
- className: s("h-full", t),
67
- asChild: !0,
68
- children: /* @__PURE__ */ a(
69
- b.div,
70
- {
71
- className: s(
72
- l({ color: i }),
73
- "transition-colors duration-moderate-01 ease-productive-standard"
74
- ),
75
- initial: !1,
76
- animate: { width: `${r || 0}%` },
77
- transition: N.smooth
78
- }
79
- )
80
- }
81
- )
82
- }
83
- ),
84
- o && !e && /* @__PURE__ */ n("span", { className: "shrink-0 text-ds-xs text-surface-fg-muted tabular-nums", children: [
85
- r,
86
- "%"
87
- ] })
88
- ] });
89
- }
90
- );
91
- V.displayName = c.displayName;
92
- export {
93
- V as Progress,
94
- l as progressIndicatorVariants,
95
- v as progressTrackVariants
96
- };
2
+ import { F as e, P as t } from "../_chunks/primitives.js";
3
+ import { a as n } from "../_chunks/framer.js";
4
+ import { springs as r } from "./lib/motion.js";
5
+ import { t as i } from "../_chunks/vendor-utils.js";
6
+ import { cn as a } from "./lib/utils.js";
7
+ import * as o from "react";
8
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
9
+ //#region src/ui/progress.tsx
10
+ var l = i("relative w-full overflow-hidden rounded-ds-full bg-surface-raised", {
11
+ variants: { size: {
12
+ sm: "h-1",
13
+ md: "h-2",
14
+ lg: "h-3"
15
+ } },
16
+ defaultVariants: { size: "md" }
17
+ }), u = i("h-full w-full flex-1 transition-[width] duration-moderate-02 ease-expressive-standard", {
18
+ variants: { color: {
19
+ default: "bg-accent-9",
20
+ success: "bg-success-9",
21
+ warning: "bg-warning-9",
22
+ error: "bg-error-9"
23
+ } },
24
+ defaultVariants: { color: "default" }
25
+ }), d = o.forwardRef(({ className: i, value: o, size: d, color: f, indicatorClassName: p, showLabel: m, autoColor: h, ...g }, _) => {
26
+ let v = o == null, y = h && o != null ? o > 100 ? "error" : o >= 85 ? "success" : o >= 60 ? "warning" : "default" : f;
27
+ return /* @__PURE__ */ c("div", {
28
+ className: a("flex items-center gap-ds-03", m && "w-full"),
29
+ children: [/* @__PURE__ */ s(e, {
30
+ ref: _,
31
+ value: v ? null : o,
32
+ className: a(l({ size: d }), i),
33
+ ...g,
34
+ children: v ? /* @__PURE__ */ s(t, { className: a(u({ color: y }), "w-2/5 animate-progress-indeterminate motion-reduce:animate-none", p) }) : /* @__PURE__ */ s(t, {
35
+ className: a("h-full", p),
36
+ asChild: !0,
37
+ children: /* @__PURE__ */ s(n.div, {
38
+ className: a(u({ color: y }), "transition-colors duration-moderate-01 ease-productive-standard"),
39
+ initial: !1,
40
+ animate: { width: `${o || 0}%` },
41
+ transition: r.smooth
42
+ })
43
+ })
44
+ }), m && !v && /* @__PURE__ */ c("span", {
45
+ className: "shrink-0 text-ds-xs text-surface-fg-muted tabular-nums",
46
+ children: [o, "%"]
47
+ })]
48
+ });
49
+ });
50
+ d.displayName = e.displayName;
51
+ //#endregion
52
+ export { d as Progress, u as progressIndicatorVariants, l as progressTrackVariants };
package/dist/ui/radio.js CHANGED
@@ -1,51 +1,42 @@
1
1
  "use client";
2
- import { jsx as e } from "react/jsx-runtime";
3
- import { aj as i, ak as t, al as n } from "../_chunks/primitives.js";
4
- import { IconCircle as l } from "@tabler/icons-react";
5
- import * as c from "react";
6
- import { springs as m } from "./lib/motion.js";
7
- import { cn as o } from "./lib/utils.js";
8
- import { m as f } from "../_chunks/framer.js";
9
- const u = c.forwardRef(({ className: r, ...a }, s) => /* @__PURE__ */ e(i, { className: o("grid gap-ds-03", r), ...a, ref: s }));
10
- u.displayName = i.displayName;
11
- const p = {
12
- sm: "h-5 w-5",
13
- md: "h-6 w-6",
14
- lg: "h-7 w-7"
15
- }, b = {
16
- sm: "h-1.5 w-1.5",
17
- md: "h-ds-03 w-ds-03",
18
- lg: "h-2.5 w-2.5"
19
- }, h = c.forwardRef(({ className: r, size: a = "md", ...s }, d) => /* @__PURE__ */ e(
20
- t,
21
- {
22
- ref: d,
23
- className: o(
24
- "touch-target aspect-square rounded-ds-full",
25
- p[a],
26
- "border border-surface-border-strong bg-surface-raised-hover",
27
- "transition-colors duration-fast-01",
28
- "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
29
- "disabled:cursor-not-allowed disabled:opacity-action-disabled",
30
- "hover:border-accent-7 hover:bg-surface-raised-active",
31
- "data-[state=checked]:border-accent-7",
32
- r
33
- ),
34
- ...s,
35
- children: /* @__PURE__ */ e(n, { asChild: !0, className: "flex items-center justify-center", children: /* @__PURE__ */ e(
36
- f.span,
37
- {
38
- className: "flex items-center justify-center",
39
- initial: { scale: 0 },
40
- animate: { scale: 1 },
41
- transition: m.bouncy,
42
- children: /* @__PURE__ */ e(l, { className: o(b[a], "fill-accent-9 text-accent-11") })
43
- }
44
- ) })
45
- }
46
- ));
47
- h.displayName = t.displayName;
48
- export {
49
- u as RadioGroup,
50
- h as RadioGroupItem
51
- };
2
+ import { ct as e, ot as t, st as n } from "../_chunks/primitives.js";
3
+ import { a as r } from "../_chunks/framer.js";
4
+ import { springs as i } from "./lib/motion.js";
5
+ import { cn as a } from "./lib/utils.js";
6
+ import * as o from "react";
7
+ import { jsx as s } from "react/jsx-runtime";
8
+ import { IconCircle as c } from "@tabler/icons-react";
9
+ //#region src/ui/radio.tsx
10
+ var l = o.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ s(e, {
11
+ className: a("grid gap-ds-03", t),
12
+ ...n,
13
+ ref: r
14
+ }));
15
+ l.displayName = e.displayName;
16
+ var u = {
17
+ sm: "h-5 w-5",
18
+ md: "h-6 w-6",
19
+ lg: "h-7 w-7"
20
+ }, d = {
21
+ sm: "h-1.5 w-1.5",
22
+ md: "h-ds-03 w-ds-03",
23
+ lg: "h-2.5 w-2.5"
24
+ }, f = o.forwardRef(({ className: e, size: o = "md", ...l }, f) => /* @__PURE__ */ s(n, {
25
+ ref: f,
26
+ className: a("touch-target aspect-square rounded-ds-full", u[o], "border border-surface-border-strong bg-surface-raised-hover", "transition-colors duration-fast-01", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", "disabled:cursor-not-allowed disabled:opacity-action-disabled", "hover:border-accent-7 hover:bg-surface-raised-active", "data-[state=checked]:border-accent-7", e),
27
+ ...l,
28
+ children: /* @__PURE__ */ s(t, {
29
+ asChild: !0,
30
+ className: "flex items-center justify-center",
31
+ children: /* @__PURE__ */ s(r.span, {
32
+ className: "flex items-center justify-center",
33
+ initial: { scale: 0 },
34
+ animate: { scale: 1 },
35
+ transition: i.bouncy,
36
+ children: /* @__PURE__ */ s(c, { className: a(d[o], "fill-accent-9 text-accent-11") })
37
+ })
38
+ })
39
+ }));
40
+ f.displayName = n.displayName;
41
+ //#endregion
42
+ export { l as RadioGroup, f as RadioGroupItem };
@@ -1,54 +1,52 @@
1
1
  "use client";
2
- import { jsx as t } from "react/jsx-runtime";
3
- import { IconX as f, IconSearch as d } from "@tabler/icons-react";
4
- import * as h from "react";
5
- import { springs as y } from "./lib/motion.js";
6
- import { Spinner as S } from "./spinner.js";
7
- import { Icon as e } from "./icon.js";
8
- import { Input as u } from "./input.js";
9
- import { Button as I } from "./button.js";
10
- import { A as b, m as x } from "../_chunks/framer.js";
11
- const C = h.forwardRef(
12
- ({ className: a, value: i, onClear: r, loading: o, size: c = "md", placeholder: m, ...s }, p) => {
13
- const n = i !== void 0 && i !== "", l = o ? /* @__PURE__ */ t(S, { size: "sm" }) : /* @__PURE__ */ t(b, { children: n && r && /* @__PURE__ */ t(
14
- x.div,
15
- {
16
- initial: { opacity: 0, scale: 0.8 },
17
- animate: { opacity: 1, scale: 1 },
18
- exit: { opacity: 0, scale: 0.8 },
19
- transition: y.snappy,
20
- children: /* @__PURE__ */ t(
21
- I,
22
- {
23
- type: "button",
24
- variant: "ghost",
25
- size: "icon-xs",
26
- onClick: r,
27
- "aria-label": "Clear search",
28
- title: "Clear",
29
- children: /* @__PURE__ */ t(e, { icon: f })
30
- }
31
- )
32
- }
33
- ) });
34
- return /* @__PURE__ */ t(
35
- u,
36
- {
37
- ref: p,
38
- size: c,
39
- startSection: /* @__PURE__ */ t(e, { icon: d }),
40
- endSection: l,
41
- endSectionClickable: !!n && !o,
42
- placeholder: m,
43
- value: i,
44
- "aria-busy": o || void 0,
45
- className: a,
46
- ...s
47
- }
48
- );
49
- }
50
- );
51
- C.displayName = "SearchInput";
52
- export {
53
- C as SearchInput
54
- };
2
+ import { a as e, c as t } from "../_chunks/framer.js";
3
+ import { springs as n } from "./lib/motion.js";
4
+ import { Spinner as r } from "./spinner.js";
5
+ import { Icon as i } from "./icon.js";
6
+ import { Button as a } from "./button.js";
7
+ import { Input as o } from "./input.js";
8
+ import * as s from "react";
9
+ import { jsx as c } from "react/jsx-runtime";
10
+ import { IconSearch as l, IconX as u } from "@tabler/icons-react";
11
+ //#region src/ui/search-input.tsx
12
+ var d = s.forwardRef(({ className: s, value: d, onClear: f, loading: p, size: m = "md", placeholder: h, ...g }, _) => {
13
+ let v = d !== void 0 && d !== "", y = p ? /* @__PURE__ */ c(r, { size: "sm" }) : /* @__PURE__ */ c(t, { children: v && f && /* @__PURE__ */ c(e.div, {
14
+ initial: {
15
+ opacity: 0,
16
+ scale: .8
17
+ },
18
+ animate: {
19
+ opacity: 1,
20
+ scale: 1
21
+ },
22
+ exit: {
23
+ opacity: 0,
24
+ scale: .8
25
+ },
26
+ transition: n.snappy,
27
+ children: /* @__PURE__ */ c(a, {
28
+ type: "button",
29
+ variant: "ghost",
30
+ size: "icon-xs",
31
+ onClick: f,
32
+ "aria-label": "Clear search",
33
+ title: "Clear",
34
+ children: /* @__PURE__ */ c(i, { icon: u })
35
+ })
36
+ }) });
37
+ return /* @__PURE__ */ c(o, {
38
+ ref: _,
39
+ size: m,
40
+ startSection: /* @__PURE__ */ c(i, { icon: l }),
41
+ endSection: y,
42
+ endSectionClickable: !!v && !p,
43
+ placeholder: h,
44
+ value: d,
45
+ "aria-busy": p || void 0,
46
+ className: s,
47
+ ...g
48
+ });
49
+ });
50
+ d.displayName = "SearchInput";
51
+ //#endregion
52
+ export { d as SearchInput };