@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,50 +1,30 @@
1
1
  "use client";
2
- import { jsx as r, jsxs as e } from "react/jsx-runtime";
3
- import * as g from "react";
4
- import { AlertDialog as p, AlertDialogContent as A, AlertDialogHeader as C, AlertDialogTitle as u, AlertDialogDescription as x, AlertDialogFooter as b } from "../ui/alert-dialog.js";
2
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a } from "../ui/alert-dialog.js";
5
3
  import { Button as o } from "../ui/button.js";
6
- const j = g.forwardRef(
7
- ({
8
- open: t,
9
- onOpenChange: l,
10
- title: a,
11
- description: n,
12
- confirmText: c = "Confirm",
13
- cancelText: d = "Cancel",
14
- color: s = "accent",
15
- loading: i = !1,
16
- onConfirm: m,
17
- className: f,
18
- ...D
19
- }, h) => /* @__PURE__ */ r(p, { open: t, onOpenChange: l, children: /* @__PURE__ */ e(A, { ref: h, className: f, ...D, children: [
20
- /* @__PURE__ */ e(C, { children: [
21
- /* @__PURE__ */ r(u, { children: a }),
22
- /* @__PURE__ */ r(x, { children: n })
23
- ] }),
24
- /* @__PURE__ */ e(b, { children: [
25
- /* @__PURE__ */ r(
26
- o,
27
- {
28
- variant: "outline",
29
- disabled: i,
30
- onClick: () => l(!1),
31
- children: d
32
- }
33
- ),
34
- /* @__PURE__ */ r(
35
- o,
36
- {
37
- variant: "solid",
38
- color: s,
39
- disabled: i,
40
- onClick: () => m(),
41
- children: i ? "Processing..." : c
42
- }
43
- )
44
- ] })
45
- ] }) })
46
- );
47
- j.displayName = "ConfirmDialog";
48
- export {
49
- j as ConfirmDialog
50
- };
4
+ import * as s from "react";
5
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
+ //#region src/composed/confirm-dialog.tsx
7
+ var u = s.forwardRef(({ open: s, onOpenChange: u, title: d, description: f, confirmText: p = "Confirm", cancelText: m = "Cancel", color: h = "accent", loading: g = !1, onConfirm: _, className: v, ...y }, b) => /* @__PURE__ */ c(e, {
8
+ open: s,
9
+ onOpenChange: u,
10
+ children: /* @__PURE__ */ l(t, {
11
+ ref: b,
12
+ className: v,
13
+ ...y,
14
+ children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: d }), /* @__PURE__ */ c(n, { children: f })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
15
+ variant: "outline",
16
+ disabled: g,
17
+ onClick: () => u(!1),
18
+ children: m
19
+ }), /* @__PURE__ */ c(o, {
20
+ variant: "solid",
21
+ color: h,
22
+ disabled: g,
23
+ onClick: () => _(),
24
+ children: g ? "Processing..." : p
25
+ })] })]
26
+ })
27
+ }));
28
+ u.displayName = "ConfirmDialog";
29
+ //#endregion
30
+ export { u as ConfirmDialog };
@@ -1,108 +1,69 @@
1
- import { jsxs as i, jsx as e, Fragment as m } from "react/jsx-runtime";
2
- import * as g from "react";
3
- import { a as h } from "../_chunks/vendor-utils.js";
4
- import { cn as d } from "../ui/lib/utils.js";
5
- const v = h(
6
- "rounded-ds-lg will-change-[box-shadow] transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard",
7
- {
8
- variants: {
9
- variant: {
10
- default: "border border-surface-border-strong bg-surface-raised shadow-raised hover:shadow-raised-hover",
11
- outline: "border border-surface-border bg-transparent hover:border-surface-border-strong",
12
- ghost: "border border-transparent bg-transparent hover:bg-surface-raised"
13
- },
14
- padding: {
15
- default: "p-ds-05b",
16
- compact: "p-ds-04",
17
- spacious: "p-ds-06",
18
- none: "p-0"
19
- }
20
- },
21
- defaultVariants: {
22
- variant: "default",
23
- padding: "default"
24
- }
25
- }
26
- ), b = (r) => {
27
- switch (r) {
28
- case "compact":
29
- return "px-ds-04 py-ds-03";
30
- case "spacious":
31
- return "px-ds-06 py-ds-05";
32
- default:
33
- return "px-ds-05b py-ds-04";
34
- }
35
- }, x = (r) => {
36
- switch (r) {
37
- case "compact":
38
- return "p-ds-04";
39
- case "spacious":
40
- return "p-ds-06";
41
- default:
42
- return "p-ds-05b";
43
- }
44
- }, w = g.forwardRef(
45
- ({
46
- variant: r,
47
- padding: s,
48
- header: c,
49
- headerTitle: t,
50
- headerActions: o,
51
- footer: a,
52
- className: u,
53
- children: p,
54
- ...l
55
- }, f) => {
56
- const n = c || t || o;
57
- return /* @__PURE__ */ i(
58
- "div",
59
- {
60
- ref: f,
61
- className: d(
62
- v({ variant: r, padding: n || a ? "none" : s }),
63
- u
64
- ),
65
- ...l,
66
- children: [
67
- n && /* @__PURE__ */ e(
68
- "div",
69
- {
70
- className: d(
71
- "flex items-center justify-between border-b border-surface-border-strong",
72
- b(s)
73
- ),
74
- children: c ?? /* @__PURE__ */ i(m, { children: [
75
- t && /* @__PURE__ */ e("h3", { className: "text-ds-base font-semibold text-surface-fg", children: t }),
76
- o && /* @__PURE__ */ e("div", { className: "flex items-center gap-ds-03", children: o })
77
- ] })
78
- }
79
- ),
80
- /* @__PURE__ */ e(
81
- "div",
82
- {
83
- className: d(
84
- (n || a) && x(s)
85
- ),
86
- children: p
87
- }
88
- ),
89
- a && /* @__PURE__ */ e(
90
- "div",
91
- {
92
- className: d(
93
- "border-t border-surface-border-strong",
94
- b(s)
95
- ),
96
- children: a
97
- }
98
- )
99
- ]
100
- }
101
- );
102
- }
103
- );
104
- w.displayName = "ContentCard";
105
- export {
106
- w as ContentCard,
107
- v as contentCardVariants
108
- };
1
+ import { t as e } from "../_chunks/vendor-utils.js";
2
+ import { cn as t } from "../ui/lib/utils.js";
3
+ import * as n from "react";
4
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
+ //#region src/composed/content-card.tsx
6
+ var o = e("rounded-ds-lg will-change-[box-shadow] transition-[color,background-color,border-color,box-shadow] duration-fast-02 ease-productive-standard", {
7
+ variants: {
8
+ variant: {
9
+ default: "border border-surface-border-strong bg-surface-raised shadow-raised hover:shadow-raised-hover",
10
+ outline: "border border-surface-border bg-transparent hover:border-surface-border-strong",
11
+ ghost: "border border-transparent bg-transparent hover:bg-surface-raised"
12
+ },
13
+ padding: {
14
+ default: "p-ds-05b",
15
+ compact: "p-ds-04",
16
+ spacious: "p-ds-06",
17
+ none: "p-0"
18
+ }
19
+ },
20
+ defaultVariants: {
21
+ variant: "default",
22
+ padding: "default"
23
+ }
24
+ }), s = (e) => {
25
+ switch (e) {
26
+ case "compact": return "px-ds-04 py-ds-03";
27
+ case "spacious": return "px-ds-06 py-ds-05";
28
+ default: return "px-ds-05b py-ds-04";
29
+ }
30
+ }, c = (e) => {
31
+ switch (e) {
32
+ case "compact": return "p-ds-04";
33
+ case "spacious": return "p-ds-06";
34
+ default: return "p-ds-05b";
35
+ }
36
+ }, l = n.forwardRef(({ variant: e, padding: n, header: l, headerTitle: u, headerActions: d, footer: f, className: p, children: m, ...h }, g) => {
37
+ let _ = l || u || d;
38
+ return /* @__PURE__ */ a("div", {
39
+ ref: g,
40
+ className: t(o({
41
+ variant: e,
42
+ padding: _ || f ? "none" : n
43
+ }), p),
44
+ ...h,
45
+ children: [
46
+ _ && /* @__PURE__ */ i("div", {
47
+ className: t("flex items-center justify-between border-b border-surface-border-strong", s(n)),
48
+ children: l ?? /* @__PURE__ */ a(r, { children: [u && /* @__PURE__ */ i("h3", {
49
+ className: "text-ds-base font-semibold text-surface-fg",
50
+ children: u
51
+ }), d && /* @__PURE__ */ i("div", {
52
+ className: "flex items-center gap-ds-03",
53
+ children: d
54
+ })] })
55
+ }),
56
+ /* @__PURE__ */ i("div", {
57
+ className: t((_ || f) && c(n)),
58
+ children: m
59
+ }),
60
+ f && /* @__PURE__ */ i("div", {
61
+ className: t("border-t border-surface-border-strong", s(n)),
62
+ children: f
63
+ })
64
+ ]
65
+ });
66
+ });
67
+ l.displayName = "ContentCard";
68
+ //#endregion
69
+ export { l as ContentCard, o as contentCardVariants };
@@ -1,14 +1,4 @@
1
1
  "use client";
2
- import { C as r, u as s } from "../../_chunks/use-calendar.js";
3
- import { D as P, a as t, b as c, M as k, P as o, T as m, Y as n } from "../../_chunks/date-time-picker.js";
4
- export {
5
- r as CalendarGrid,
6
- P as DatePicker,
7
- t as DateRangePicker,
8
- c as DateTimePicker,
9
- k as MonthPicker,
10
- o as Presets,
11
- m as TimePicker,
12
- n as YearPicker,
13
- s as useCalendar
14
- };
2
+ import { n as e, t } from "../../_chunks/use-calendar.js";
3
+ import { a as n, i as r, n as i, o as a, r as o, s, t as c } from "../../_chunks/date-picker.js";
4
+ export { e as CalendarGrid, n as DatePicker, o as DateRangePicker, c as DateTimePicker, a as MonthPicker, r as Presets, i as TimePicker, s as YearPicker, t as useCalendar };
@@ -1,79 +1,73 @@
1
1
  "use client";
2
- import { jsxs as D, jsx as c } from "react/jsx-runtime";
2
+ import { a as e } from "../_chunks/framer.js";
3
+ import { motionProps as t } from "../ui/lib/motion.js";
4
+ import { cn as n } from "../ui/lib/utils.js";
5
+ import { Icon as r } from "../ui/icon.js";
6
+ import { SimpleTooltip as i } from "./simple-tooltip.js";
3
7
  import * as a from "react";
4
- import { cn as b } from "../ui/lib/utils.js";
5
- import { motionProps as S } from "../ui/lib/motion.js";
6
- import { IconClock as g } from "@tabler/icons-react";
7
- import { Icon as w } from "../ui/icon.js";
8
- import { SimpleTooltip as y } from "./simple-tooltip.js";
9
- import { m as j } from "../_chunks/framer.js";
10
- function z(t) {
11
- const e = Math.abs(t), n = t < 0 ? "Overdue by " : "", r = t >= 0 ? " left" : "";
12
- return e < 1 ? t < 0 ? "Overdue" : "Due now" : e < 60 ? `${n}${Math.round(e)}m${r}` : e < 1440 ? `${n}${Math.round(e / 60)}h${r}` : `${n}${Math.round(e / 1440)}d${r}`;
8
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
9
+ import { IconClock as c } from "@tabler/icons-react";
10
+ //#region src/composed/deadline-indicator.tsx
11
+ function l(e) {
12
+ let t = Math.abs(e), n = e < 0 ? "Overdue by " : "", r = e >= 0 ? " left" : "";
13
+ return t < 1 ? e < 0 ? "Overdue" : "Due now" : t < 60 ? `${n}${Math.round(t)}m${r}` : t < 1440 ? `${n}${Math.round(t / 60)}h${r}` : `${n}${Math.round(t / 1440)}d${r}`;
13
14
  }
14
- function L(t) {
15
- return t.toLocaleDateString(void 0, {
16
- month: "short",
17
- day: "numeric",
18
- hour: "numeric",
19
- minute: "2-digit"
20
- });
15
+ function u(e) {
16
+ return e.toLocaleDateString(void 0, {
17
+ month: "short",
18
+ day: "numeric",
19
+ hour: "numeric",
20
+ minute: "2-digit"
21
+ });
21
22
  }
22
- const N = a.forwardRef(({
23
- deadline: t,
24
- warningThreshold: e = 1440,
25
- criticalThreshold: n = 240,
26
- format: r = "relative",
27
- showIcon: m = !1,
28
- refreshInterval: f = 6e4,
29
- className: u,
30
- ...d
31
- }, p) => {
32
- const [, M] = a.useReducer((s) => s + 1, 0);
33
- a.useEffect(() => {
34
- if (!f) return;
35
- const s = setInterval(M, f);
36
- return () => clearInterval(s);
37
- }, [f]);
38
- const l = a.useMemo(
39
- () => t instanceof Date ? t : new Date(t),
40
- [t]
41
- ), o = (l.getTime() - Date.now()) / 6e4;
42
- let i;
43
- o <= 0 ? i = "text-error-11 font-semibold" : o <= n ? i = "text-error-11" : o <= e ? i = "text-warning-11" : i = "text-success-11";
44
- const x = r === "relative" ? z(o) : L(l), C = o <= 0, I = o <= n && o > 0, O = C || I, h = r === "relative", $ = l.toLocaleString();
45
- if (O) {
46
- const s = /* @__PURE__ */ D(
47
- j.span,
48
- {
49
- ref: p,
50
- className: b("inline-flex items-center gap-ds-01 font-sans text-ds-sm", i, u),
51
- animate: { opacity: [1, 0.7, 1] },
52
- transition: { duration: 2, repeat: 1 / 0 },
53
- ...S(d),
54
- children: [
55
- m && /* @__PURE__ */ c(w, { icon: g, size: "xs" }),
56
- x
57
- ]
58
- }
59
- );
60
- return h ? /* @__PURE__ */ c(y, { content: $, children: s }) : s;
61
- }
62
- const v = /* @__PURE__ */ D(
63
- "span",
64
- {
65
- ref: p,
66
- className: b("inline-flex items-center gap-ds-01 font-sans text-ds-sm", i, u),
67
- ...d,
68
- children: [
69
- m && /* @__PURE__ */ c(w, { icon: g, size: "xs" }),
70
- x
71
- ]
72
- }
73
- );
74
- return h ? /* @__PURE__ */ c(y, { content: $, children: v }) : v;
23
+ var d = a.forwardRef(({ deadline: d, warningThreshold: f = 1440, criticalThreshold: p = 240, format: m = "relative", showIcon: h = !1, refreshInterval: g = 6e4, className: _, ...v }, y) => {
24
+ let [, b] = a.useReducer((e) => e + 1, 0);
25
+ a.useEffect(() => {
26
+ if (!g) return;
27
+ let e = setInterval(b, g);
28
+ return () => clearInterval(e);
29
+ }, [g]);
30
+ let x = a.useMemo(() => d instanceof Date ? d : new Date(d), [d]), S = (x.getTime() - Date.now()) / 6e4, C;
31
+ C = S <= 0 ? "text-error-11 font-semibold" : S <= p ? "text-error-11" : S <= f ? "text-warning-11" : "text-success-11";
32
+ let w = m === "relative" ? l(S) : u(x), T = S <= 0 || S <= p && S > 0, E = m === "relative", D = x.toLocaleString();
33
+ if (T) {
34
+ let a = /* @__PURE__ */ s(e.span, {
35
+ ref: y,
36
+ className: n("inline-flex items-center gap-ds-01 font-sans text-ds-sm", C, _),
37
+ animate: { opacity: [
38
+ 1,
39
+ .7,
40
+ 1
41
+ ] },
42
+ transition: {
43
+ duration: 2,
44
+ repeat: Infinity
45
+ },
46
+ ...t(v),
47
+ children: [h && /* @__PURE__ */ o(r, {
48
+ icon: c,
49
+ size: "xs"
50
+ }), w]
51
+ });
52
+ return E ? /* @__PURE__ */ o(i, {
53
+ content: D,
54
+ children: a
55
+ }) : a;
56
+ }
57
+ let O = /* @__PURE__ */ s("span", {
58
+ ref: y,
59
+ className: n("inline-flex items-center gap-ds-01 font-sans text-ds-sm", C, _),
60
+ ...v,
61
+ children: [h && /* @__PURE__ */ o(r, {
62
+ icon: c,
63
+ size: "xs"
64
+ }), w]
65
+ });
66
+ return E ? /* @__PURE__ */ o(i, {
67
+ content: D,
68
+ children: O
69
+ }) : O;
75
70
  });
76
- N.displayName = "DeadlineIndicator";
77
- export {
78
- N as DeadlineIndicator
79
- };
71
+ d.displayName = "DeadlineIndicator";
72
+ //#endregion
73
+ export { d as DeadlineIndicator };
@@ -1,115 +1,88 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as S } from "react/jsx-runtime";
3
- import * as o from "react";
4
- import { cn as u } from "../ui/lib/utils.js";
5
- import { springs as f } from "../ui/lib/motion.js";
6
- import { Skeleton as h } from "../ui/skeleton.js";
7
- import { Popover as j, PopoverTrigger as x, PopoverContent as E } from "../ui/popover.js";
8
- import { A as w, m as y } from "../_chunks/framer.js";
9
- const N = o.lazy(
10
- () => import("@emoji-mart/react").then((t) => ({
11
- default: t.default
12
- }))
13
- ), g = {
14
- native: () => import("@emoji-mart/data"),
15
- apple: () => import("@emoji-mart/data/sets/15/apple.json"),
16
- google: () => import("@emoji-mart/data/sets/15/google.json"),
17
- twitter: () => import("@emoji-mart/data/sets/15/twitter.json"),
18
- facebook: () => import("@emoji-mart/data/sets/15/facebook.json")
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 { i, r as a, t as o } from "../_chunks/popover.js";
6
+ import { Skeleton as s } from "../ui/skeleton.js";
7
+ import * as c from "react";
8
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
+ //#region src/composed/emoji-picker.tsx
10
+ var d = c.lazy(() => import("@emoji-mart/react").then((e) => ({ default: e.default }))), f = {
11
+ native: () => import("@emoji-mart/data"),
12
+ apple: () => import("@emoji-mart/data/sets/15/apple.json"),
13
+ google: () => import("@emoji-mart/data/sets/15/google.json"),
14
+ twitter: () => import("@emoji-mart/data/sets/15/twitter.json"),
15
+ facebook: () => import("@emoji-mart/data/sets/15/facebook.json")
19
16
  };
20
- function b(t) {
21
- return t !== "auto" ? t : typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light";
17
+ function p(e) {
18
+ return e === "auto" ? typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light" : e;
22
19
  }
23
- function k({
24
- onSelect: t,
25
- set: n = "native",
26
- theme: s = "auto",
27
- previewPosition: c = "none",
28
- skinTonePosition: d = "search",
29
- className: a
30
- }) {
31
- const [l, p] = o.useState(!1), [i, r] = o.useState(null);
32
- return o.useEffect(() => {
33
- p(!0), (g[n] ?? g.native)().then((P) => r(P.default));
34
- }, [n]), /* @__PURE__ */ e(w, { mode: "wait", children: l && !!i ? /* @__PURE__ */ e(
35
- y.div,
36
- {
37
- initial: { opacity: 0, scale: 0.95 },
38
- animate: { opacity: 1, scale: 1 },
39
- transition: f.snappy,
40
- className: a,
41
- children: /* @__PURE__ */ e(
42
- o.Suspense,
43
- {
44
- fallback: /* @__PURE__ */ e("div", { className: u("rounded-ds-lg", a), children: /* @__PURE__ */ e(h, { className: "h-[435px] w-[352px] rounded-ds-lg" }) }),
45
- children: /* @__PURE__ */ e(
46
- N,
47
- {
48
- data: i,
49
- set: n,
50
- onEmojiSelect: t,
51
- theme: b(s),
52
- previewPosition: c,
53
- skinTonePosition: d
54
- }
55
- )
56
- }
57
- )
58
- },
59
- "picker"
60
- ) : /* @__PURE__ */ e(
61
- y.div,
62
- {
63
- initial: { opacity: 0 },
64
- animate: { opacity: 1 },
65
- exit: { opacity: 0 },
66
- transition: f.snappy,
67
- className: u("rounded-ds-lg", a),
68
- children: /* @__PURE__ */ e(h, { className: "h-[435px] w-[352px] rounded-ds-lg" })
69
- },
70
- "skeleton"
71
- ) });
20
+ function m({ onSelect: i, set: a = "native", theme: o = "auto", previewPosition: u = "none", skinTonePosition: m = "search", className: h }) {
21
+ let [g, _] = c.useState(!1), [v, y] = c.useState(null);
22
+ return c.useEffect(() => {
23
+ _(!0), (f[a] ?? f.native)().then((e) => y(e.default));
24
+ }, [a]), /* @__PURE__ */ l(t, {
25
+ mode: "wait",
26
+ children: g && v ? /* @__PURE__ */ l(e.div, {
27
+ initial: {
28
+ opacity: 0,
29
+ scale: .95
30
+ },
31
+ animate: {
32
+ opacity: 1,
33
+ scale: 1
34
+ },
35
+ transition: n.snappy,
36
+ className: h,
37
+ children: /* @__PURE__ */ l(c.Suspense, {
38
+ fallback: /* @__PURE__ */ l("div", {
39
+ className: r("rounded-ds-lg", h),
40
+ children: /* @__PURE__ */ l(s, { className: "h-[435px] w-[352px] rounded-ds-lg" })
41
+ }),
42
+ children: /* @__PURE__ */ l(d, {
43
+ data: v,
44
+ set: a,
45
+ onEmojiSelect: i,
46
+ theme: p(o),
47
+ previewPosition: u,
48
+ skinTonePosition: m
49
+ })
50
+ })
51
+ }, "picker") : /* @__PURE__ */ l(e.div, {
52
+ initial: { opacity: 0 },
53
+ animate: { opacity: 1 },
54
+ exit: { opacity: 0 },
55
+ transition: n.snappy,
56
+ className: r("rounded-ds-lg", h),
57
+ children: /* @__PURE__ */ l(s, { className: "h-[435px] w-[352px] rounded-ds-lg" })
58
+ }, "skeleton")
59
+ });
72
60
  }
73
- function C({
74
- children: t,
75
- align: n = "start",
76
- onSelect: s,
77
- set: c,
78
- theme: d,
79
- previewPosition: a,
80
- skinTonePosition: l,
81
- className: p
82
- }) {
83
- const [i, r] = o.useState(!1);
84
- return /* @__PURE__ */ S(j, { open: i, onOpenChange: r, children: [
85
- /* @__PURE__ */ e(x, { asChild: !0, children: t }),
86
- /* @__PURE__ */ e(
87
- E,
88
- {
89
- align: n,
90
- className: "w-auto border-none bg-transparent p-0 shadow-none",
91
- sideOffset: 8,
92
- children: /* @__PURE__ */ e(
93
- k,
94
- {
95
- onSelect: (m) => {
96
- s(m), r(!1);
97
- },
98
- set: c,
99
- theme: d,
100
- previewPosition: a,
101
- skinTonePosition: l,
102
- className: p
103
- }
104
- )
105
- }
106
- )
107
- ] });
61
+ function h({ children: e, align: t = "start", onSelect: n, set: r, theme: s, previewPosition: d, skinTonePosition: f, className: p }) {
62
+ let [h, g] = c.useState(!1);
63
+ return /* @__PURE__ */ u(o, {
64
+ open: h,
65
+ onOpenChange: g,
66
+ children: [/* @__PURE__ */ l(i, {
67
+ asChild: !0,
68
+ children: e
69
+ }), /* @__PURE__ */ l(a, {
70
+ align: t,
71
+ className: "w-auto border-none bg-transparent p-0 shadow-none",
72
+ sideOffset: 8,
73
+ children: /* @__PURE__ */ l(m, {
74
+ onSelect: (e) => {
75
+ n(e), g(!1);
76
+ },
77
+ set: r,
78
+ theme: s,
79
+ previewPosition: d,
80
+ skinTonePosition: f,
81
+ className: p
82
+ })
83
+ })]
84
+ });
108
85
  }
109
- k.displayName = "EmojiPicker";
110
- C.displayName = "EmojiPickerPopover";
111
- export {
112
- k as EmojiPicker,
113
- C as EmojiPickerPopover,
114
- g as emojiDataLoaders
115
- };
86
+ m.displayName = "EmojiPicker", h.displayName = "EmojiPickerPopover";
87
+ //#endregion
88
+ export { m as EmojiPicker, h as EmojiPickerPopover, f as emojiDataLoaders };