@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.
- package/dist/_chunks/badge-group.js +306 -246
- package/dist/_chunks/chat.js +513 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/popover.js +127 -0
- package/dist/_chunks/primitives.js +7584 -6425
- package/dist/_chunks/rich-chat-input.js +2070 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/index.js +181 -167
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/bulk-action-bar.js +174 -165
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/multi-select-popover.js +181 -179
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/status-badge.js +133 -137
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/motion/index.js +3 -11
- package/dist/motion/primitives-index.js +226 -186
- package/dist/shell/app-command-palette.js +203 -234
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.js +238 -259
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/top-bar.js +203 -237
- package/dist/tailwind/index.cjs +426 -451
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +443 -468
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/alert-dialog.js +111 -156
- package/dist/ui/alert.js +177 -99
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/autocomplete.js +112 -148
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-processing.js +69 -73
- package/dist/ui/button.js +393 -279
- package/dist/ui/card.js +151 -157
- package/dist/ui/charts/index.js +1002 -1319
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/checkbox.js +77 -100
- package/dist/ui/code.js +18 -32
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/color-input.js +453 -372
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/combobox.js +244 -293
- package/dist/ui/container.js +18 -24
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table.js +278 -354
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/dialog.js +122 -151
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/form.js +60 -56
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon.js +201 -121
- package/dist/ui/index.js +74 -350
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +44 -48
- package/dist/ui/input.js +92 -169
- package/dist/ui/label.js +17 -22
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/motion.js +77 -36
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/link.js +13 -24
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/navigation-menu.js +164 -194
- package/dist/ui/number-input.js +72 -95
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress.js +51 -95
- package/dist/ui/radio.js +41 -50
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/segmented-control.js +93 -114
- package/dist/ui/select.js +131 -157
- package/dist/ui/separator.js +15 -25
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/slider.js +24 -34
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/split-button.js +227 -276
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/stepper.js +119 -168
- package/dist/ui/switch.js +51 -54
- package/dist/ui/table.js +57 -90
- package/dist/ui/tabs.js +139 -156
- package/dist/ui/text.js +52 -59
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.js +554 -536
- package/dist/ui/toaster.js +23 -33
- package/dist/ui/toggle-group.js +37 -41
- package/dist/ui/toggle.js +36 -40
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/llms-full.txt +1 -1
- package/llms.txt +12 -0
- package/package.json +3 -3
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
|
@@ -1,50 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
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
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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 {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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 {
|
|
3
|
-
import {
|
|
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 {
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
};
|
|
71
|
+
d.displayName = "DeadlineIndicator";
|
|
72
|
+
//#endregion
|
|
73
|
+
export { d as DeadlineIndicator };
|
|
@@ -1,115 +1,88 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { cn as
|
|
5
|
-
import {
|
|
6
|
-
import { Skeleton as
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
)
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
21
|
-
|
|
17
|
+
function p(e) {
|
|
18
|
+
return e === "auto" ? typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light" : e;
|
|
22
19
|
}
|
|
23
|
-
function
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
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
|
-
|
|
110
|
-
|
|
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 };
|