@devalok/shilp-sutra 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/framer.js +2 -2
- package/dist/_chunks/primitives.js +39 -39
- package/dist/_chunks/vendor-client.js +1 -1
- package/dist/_chunks/vendor-utils.js +83484 -3535
- package/dist/ai/index.js +1 -1
- package/dist/composed/bulk-action-bar.d.ts +29 -0
- package/dist/composed/bulk-action-bar.d.ts.map +1 -0
- package/dist/composed/bulk-action-bar.js +123 -0
- package/dist/composed/deadline-indicator.d.ts +18 -0
- package/dist/composed/deadline-indicator.d.ts.map +1 -0
- package/dist/composed/deadline-indicator.js +75 -0
- package/dist/composed/emoji-picker.d.ts +26 -0
- package/dist/composed/emoji-picker.d.ts.map +1 -0
- package/dist/composed/emoji-picker.js +104 -0
- package/dist/composed/file-preview.d.ts +22 -0
- package/dist/composed/file-preview.d.ts.map +1 -0
- package/dist/composed/file-preview.js +675 -0
- package/dist/composed/filter-bar.d.ts +38 -0
- package/dist/composed/filter-bar.d.ts.map +1 -0
- package/dist/composed/filter-bar.js +133 -0
- package/dist/composed/form-section.d.ts +12 -0
- package/dist/composed/form-section.d.ts.map +1 -0
- package/dist/composed/form-section.js +45 -0
- package/dist/composed/index.d.ts +22 -0
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +61 -36
- package/dist/composed/inline-edit.d.ts +16 -0
- package/dist/composed/inline-edit.d.ts.map +1 -0
- package/dist/composed/inline-edit.js +107 -0
- package/dist/composed/markdown-viewer.d.ts +14 -0
- package/dist/composed/markdown-viewer.d.ts.map +1 -0
- package/dist/composed/markdown-viewer.js +143 -0
- package/dist/composed/master-detail.d.ts +35 -0
- package/dist/composed/master-detail.d.ts.map +1 -0
- package/dist/composed/master-detail.js +124 -0
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js +41 -88
- package/dist/composed/multi-select-popover.d.ts +44 -0
- package/dist/composed/multi-select-popover.d.ts.map +1 -0
- package/dist/composed/multi-select-popover.js +185 -0
- package/dist/composed/responsive-overlay.d.ts +15 -0
- package/dist/composed/responsive-overlay.d.ts.map +1 -0
- package/dist/composed/responsive-overlay.js +45 -0
- package/dist/ui/alert-dialog.js +10 -10
- package/dist/ui/avatar.js +1 -1
- package/dist/ui/button.d.ts +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +42 -36
- package/dist/ui/card.d.ts +6 -48
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +92 -49
- package/dist/ui/checkbox.js +1 -1
- package/dist/ui/collapsible.js +1 -1
- package/dist/ui/color-swatch.d.ts +27 -0
- package/dist/ui/color-swatch.d.ts.map +1 -0
- package/dist/ui/color-swatch.js +91 -0
- package/dist/ui/data-table.d.ts +7 -1
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +221 -215
- package/dist/ui/dialog.js +4 -4
- package/dist/ui/dropdown-menu.js +31 -31
- package/dist/ui/index.d.ts +3 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +187 -180
- package/dist/ui/input.d.ts +1 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +10 -9
- package/dist/ui/label.js +1 -1
- package/dist/ui/progress-ring.d.ts +46 -0
- package/dist/ui/progress-ring.d.ts.map +1 -0
- package/dist/ui/progress-ring.js +144 -0
- package/dist/ui/search-input.d.ts +1 -1
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +9 -8
- package/dist/ui/select.d.ts +1 -1
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +28 -27
- package/dist/ui/sheet.js +1 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +15 -15
- package/dist/ui/status-dot.d.ts +27 -0
- package/dist/ui/status-dot.d.ts.map +1 -0
- package/dist/ui/status-dot.js +64 -0
- package/dist/ui/textarea.d.ts +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +13 -12
- package/docs/components/composed/bulk-action-bar.md +40 -0
- package/docs/components/composed/deadline-indicator.md +27 -0
- package/docs/components/composed/emoji-picker.md +43 -0
- package/docs/components/composed/file-preview.md +40 -0
- package/docs/components/composed/filter-bar.md +57 -0
- package/docs/components/composed/form-section.md +31 -0
- package/docs/components/composed/inline-edit.md +35 -0
- package/docs/components/composed/markdown-viewer.md +27 -0
- package/docs/components/composed/master-detail.md +48 -0
- package/docs/components/composed/multi-select-popover.md +53 -0
- package/docs/components/composed/responsive-overlay.md +34 -0
- package/docs/components/ui/color-swatch.md +25 -0
- package/docs/components/ui/progress-ring.md +41 -0
- package/docs/components/ui/status-dot.md +26 -0
- package/llms-full.txt +528 -1
- package/llms.txt +37 -9
- package/package.json +808 -733
package/dist/ai/index.js
CHANGED
|
@@ -7,7 +7,7 @@ import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
|
7
7
|
import * as a from "react";
|
|
8
8
|
import { cn as g } from "../ui/lib/utils.js";
|
|
9
9
|
import { u as x } from "../_chunks/motion-provider.js";
|
|
10
|
-
import { m as i, A as m, a as R,
|
|
10
|
+
import { m as i, A as m, a as R, c as v, b as A } from "../_chunks/framer.js";
|
|
11
11
|
import { B as U, C as V, D as q, E as J, I as Q, L as W, S as X, a as Y, T as Z } from "../_chunks/stat-row.js";
|
|
12
12
|
const s = "M25.97,21.39c-0.9-1.85,0.08-3.95-1.72-5.39c1.76-1.44,0.8-3.55,1.69-5.39c0.05-0.12,0.04-0.25-0.02-0.35c-0.06-0.1-0.16-0.18-0.29-0.19c-2.05-0.15-3.35-2.04-5.5-1.21c-0.39-2.21-2.7-2.44-3.84-4.13c-0.08-0.1-0.19-0.16-0.31-0.16c-0.12,0-0.23,0.05-0.31,0.16c-1.14,1.69-3.43,1.92-3.82,4.13c-2.14-0.83-3.47,1.07-5.52,1.21c-0.13,0.01-0.23,0.09-0.29,0.19c-0.06,0.1-0.07,0.23-0.02,0.35c0.9,1.85-0.08,3.95,1.72,5.39c-1.76,1.44-0.8,3.55-1.69,5.39C6,21.51,6.02,21.64,6.07,21.74c0.06,0.1,0.16,0.18,0.29,0.19c2.05,0.15,3.38,2.06,5.52,1.23c0.39,2.21,2.67,2.43,3.82,4.12c0.08,0.1,0.19,0.16,0.31,0.16c0.12,0,0.23-0.05,0.31-0.16c1.14-1.69,3.42-1.92,3.81-4.13c2.14,0.83,3.48-1.07,5.53-1.22c0.13-0.01,0.23-0.09,0.29-0.19C26.01,21.64,26.02,21.51,25.97,21.39z", t = "#D33163", D = "#E8457A", C = "#9B5DE5", E = "#C850C0", h = "#FF6B9D", p = "#E5383B";
|
|
13
13
|
function T(c) {
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface BulkActionBarAction {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ComponentType<{
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
onClick: () => void;
|
|
9
|
+
color?: 'default' | 'error';
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Show inline confirmation before executing the action */
|
|
12
|
+
requiresConfirmation?: boolean;
|
|
13
|
+
/** Custom confirmation message @default 'Are you sure?' */
|
|
14
|
+
confirmMessage?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface BulkActionBarProps {
|
|
17
|
+
show: boolean;
|
|
18
|
+
count: number;
|
|
19
|
+
onClearSelection: () => void;
|
|
20
|
+
actions: BulkActionBarAction[];
|
|
21
|
+
/** Total number of items available for selection */
|
|
22
|
+
totalCount?: number;
|
|
23
|
+
/** Called when user clicks "Select all" */
|
|
24
|
+
onSelectAll?: () => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
declare function BulkActionBar({ show, count, onClearSelection, actions, totalCount, onSelectAll, className, }: BulkActionBarProps): React.ReactPortal | null;
|
|
28
|
+
export { BulkActionBar };
|
|
29
|
+
//# sourceMappingURL=bulk-action-bar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bulk-action-bar.d.ts","sourceRoot":"","sources":["../../src/composed/bulk-action-bar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2DAA2D;IAC3D,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,2DAA2D;IAC3D,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,OAAO,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,gBAAgB,EAAE,MAAM,IAAI,CAAA;IAC5B,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,oDAAoD;IACpD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,2CAA2C;IAC3C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAoED,iBAAS,aAAa,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,WAAW,EACX,SAAS,GACV,EAAE,kBAAkB,4BAwDpB;AAED,OAAO,EAAE,aAAa,EAAE,CAAA"}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { createPortal as y } from "react-dom";
|
|
5
|
+
import { IconX as g } from "@tabler/icons-react";
|
|
6
|
+
import { cn as x } from "../ui/lib/utils.js";
|
|
7
|
+
import { Button as a } from "../ui/button.js";
|
|
8
|
+
import { Badge as b } from "../ui/badge.js";
|
|
9
|
+
import { springs as v } from "../ui/lib/motion.js";
|
|
10
|
+
import { A as d, m as l } from "../_chunks/framer.js";
|
|
11
|
+
function C({ action: i }) {
|
|
12
|
+
const [r, s] = n.useState(!1);
|
|
13
|
+
return r ? /* @__PURE__ */ t(
|
|
14
|
+
l.div,
|
|
15
|
+
{
|
|
16
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
17
|
+
animate: { opacity: 1, scale: 1 },
|
|
18
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
19
|
+
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
20
|
+
className: "flex items-center gap-ds-02",
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ e("span", { className: "text-ds-sm text-surface-fg-muted whitespace-nowrap", children: i.confirmMessage ?? "Are you sure?" }),
|
|
23
|
+
/* @__PURE__ */ e(
|
|
24
|
+
a,
|
|
25
|
+
{
|
|
26
|
+
variant: "solid",
|
|
27
|
+
size: "sm",
|
|
28
|
+
color: "error",
|
|
29
|
+
onClick: () => {
|
|
30
|
+
s(!1), i.onClick();
|
|
31
|
+
},
|
|
32
|
+
children: "Confirm"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ e(
|
|
36
|
+
a,
|
|
37
|
+
{
|
|
38
|
+
variant: "ghost",
|
|
39
|
+
size: "sm",
|
|
40
|
+
onClick: () => s(!1),
|
|
41
|
+
children: "Cancel"
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
) : /* @__PURE__ */ e(
|
|
47
|
+
l.div,
|
|
48
|
+
{
|
|
49
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
50
|
+
animate: { opacity: 1, scale: 1 },
|
|
51
|
+
exit: { opacity: 0, scale: 0.95 },
|
|
52
|
+
transition: { type: "spring", stiffness: 500, damping: 30 },
|
|
53
|
+
children: /* @__PURE__ */ e(
|
|
54
|
+
a,
|
|
55
|
+
{
|
|
56
|
+
variant: "ghost",
|
|
57
|
+
size: "sm",
|
|
58
|
+
color: i.color === "error" ? "error" : "default",
|
|
59
|
+
disabled: i.disabled,
|
|
60
|
+
onClick: i.requiresConfirmation ? () => s(!0) : i.onClick,
|
|
61
|
+
startIcon: i.icon ? /* @__PURE__ */ e(i.icon, { className: "h-ico-sm w-ico-sm" }) : void 0,
|
|
62
|
+
children: i.label
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
function M({
|
|
69
|
+
show: i,
|
|
70
|
+
count: r,
|
|
71
|
+
onClearSelection: s,
|
|
72
|
+
actions: f,
|
|
73
|
+
totalCount: o,
|
|
74
|
+
onSelectAll: c,
|
|
75
|
+
className: p
|
|
76
|
+
}) {
|
|
77
|
+
const [u, h] = n.useState(!1);
|
|
78
|
+
return n.useEffect(() => {
|
|
79
|
+
h(!0);
|
|
80
|
+
}, []), u ? y(
|
|
81
|
+
/* @__PURE__ */ e(d, { children: i && /* @__PURE__ */ t(
|
|
82
|
+
l.div,
|
|
83
|
+
{
|
|
84
|
+
initial: { y: 100, opacity: 0 },
|
|
85
|
+
animate: { y: 0, opacity: 1 },
|
|
86
|
+
exit: { y: 100, opacity: 0 },
|
|
87
|
+
transition: v.snappy,
|
|
88
|
+
className: x(
|
|
89
|
+
"fixed bottom-ds-06 left-1/2 z-50 -translate-x-1/2",
|
|
90
|
+
"flex items-center gap-ds-04 rounded-ds-lg border border-surface-border bg-surface-overlay px-ds-05 py-ds-03 shadow-floating",
|
|
91
|
+
p
|
|
92
|
+
),
|
|
93
|
+
role: "toolbar",
|
|
94
|
+
"aria-label": `${r} items selected`,
|
|
95
|
+
children: [
|
|
96
|
+
/* @__PURE__ */ t(b, { variant: "solid", size: "sm", children: [
|
|
97
|
+
r,
|
|
98
|
+
" selected"
|
|
99
|
+
] }),
|
|
100
|
+
o != null && o > r && c && /* @__PURE__ */ t(a, { variant: "link", size: "xs", onClick: c, children: [
|
|
101
|
+
"Select all ",
|
|
102
|
+
o
|
|
103
|
+
] }),
|
|
104
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-ds-02", children: /* @__PURE__ */ e(d, { mode: "popLayout", children: f.map((m) => /* @__PURE__ */ e(C, { action: m }, m.label)) }) }),
|
|
105
|
+
/* @__PURE__ */ e(
|
|
106
|
+
a,
|
|
107
|
+
{
|
|
108
|
+
variant: "ghost",
|
|
109
|
+
size: "icon-sm",
|
|
110
|
+
onClick: s,
|
|
111
|
+
"aria-label": "Clear selection",
|
|
112
|
+
children: /* @__PURE__ */ e(g, { className: "h-ico-sm w-ico-sm" })
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
) }),
|
|
118
|
+
document.body
|
|
119
|
+
) : null;
|
|
120
|
+
}
|
|
121
|
+
export {
|
|
122
|
+
M as BulkActionBar
|
|
123
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface DeadlineIndicatorProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
deadline: Date | string;
|
|
5
|
+
/** Minutes before deadline to show warning color @default 1440 (24h) */
|
|
6
|
+
warningThreshold?: number;
|
|
7
|
+
/** Minutes before deadline to show critical color @default 240 (4h) */
|
|
8
|
+
criticalThreshold?: number;
|
|
9
|
+
/** @default 'relative' */
|
|
10
|
+
format?: 'relative' | 'absolute';
|
|
11
|
+
/** Show clock icon prefix */
|
|
12
|
+
showIcon?: boolean;
|
|
13
|
+
/** Auto-refresh interval in ms to keep relative time up to date @default 60000 */
|
|
14
|
+
refreshInterval?: number;
|
|
15
|
+
}
|
|
16
|
+
declare function DeadlineIndicator({ deadline, warningThreshold, criticalThreshold, format, showIcon, refreshInterval, className, ...props }: DeadlineIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export { DeadlineIndicator };
|
|
18
|
+
//# sourceMappingURL=deadline-indicator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deadline-indicator.d.ts","sourceRoot":"","sources":["../../src/composed/deadline-indicator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,MAAM,WAAW,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;IACnF,QAAQ,EAAE,IAAI,GAAG,MAAM,CAAA;IACvB,wEAAwE;IACxE,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,0BAA0B;IAC1B,MAAM,CAAC,EAAE,UAAU,GAAG,UAAU,CAAA;IAChC,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,kFAAkF;IAClF,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AA8BD,iBAAS,iBAAiB,CAAC,EACzB,QAAQ,EACR,gBAAuB,EACvB,iBAAuB,EACvB,MAAmB,EACnB,QAAgB,EAChB,eAAuB,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,sBAAsB,2CA+DxB;AAED,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as v, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { cn as D } from "../ui/lib/utils.js";
|
|
5
|
+
import { motionProps as N } from "../ui/lib/motion.js";
|
|
6
|
+
import { IconClock as w } from "@tabler/icons-react";
|
|
7
|
+
import { SimpleTooltip as b } from "./simple-tooltip.js";
|
|
8
|
+
import { m as O } from "../_chunks/framer.js";
|
|
9
|
+
function S(t) {
|
|
10
|
+
const e = Math.abs(t), n = t < 0 ? "Overdue by " : "", r = t >= 0 ? " left" : "";
|
|
11
|
+
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}`;
|
|
12
|
+
}
|
|
13
|
+
function j(t) {
|
|
14
|
+
return t.toLocaleDateString(void 0, {
|
|
15
|
+
month: "short",
|
|
16
|
+
day: "numeric",
|
|
17
|
+
hour: "numeric",
|
|
18
|
+
minute: "2-digit"
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function E({
|
|
22
|
+
deadline: t,
|
|
23
|
+
warningThreshold: e = 1440,
|
|
24
|
+
criticalThreshold: n = 240,
|
|
25
|
+
format: r = "relative",
|
|
26
|
+
showIcon: m = !1,
|
|
27
|
+
refreshInterval: a = 6e4,
|
|
28
|
+
className: u,
|
|
29
|
+
...d
|
|
30
|
+
}) {
|
|
31
|
+
const [, g] = f.useReducer((i) => i + 1, 0);
|
|
32
|
+
f.useEffect(() => {
|
|
33
|
+
if (!a) return;
|
|
34
|
+
const i = setInterval(g, a);
|
|
35
|
+
return () => clearInterval(i);
|
|
36
|
+
}, [a]);
|
|
37
|
+
const l = f.useMemo(
|
|
38
|
+
() => t instanceof Date ? t : new Date(t),
|
|
39
|
+
[t]
|
|
40
|
+
), o = (l.getTime() - Date.now()) / 6e4;
|
|
41
|
+
let s;
|
|
42
|
+
o <= 0 ? s = "text-error-11 font-semibold" : o <= n ? s = "text-error-11" : o <= e ? s = "text-warning-11" : s = "text-success-11";
|
|
43
|
+
const p = r === "relative" ? S(o) : j(l), M = o <= 0, y = o <= n && o > 0, C = M || y, x = r === "relative", h = l.toLocaleString();
|
|
44
|
+
if (C) {
|
|
45
|
+
const i = /* @__PURE__ */ v(
|
|
46
|
+
O.span,
|
|
47
|
+
{
|
|
48
|
+
className: D("inline-flex items-center gap-ds-01 font-sans text-ds-sm", s, u),
|
|
49
|
+
animate: { opacity: [1, 0.7, 1] },
|
|
50
|
+
transition: { duration: 2, repeat: 1 / 0 },
|
|
51
|
+
...N(d),
|
|
52
|
+
children: [
|
|
53
|
+
m && /* @__PURE__ */ c(w, { className: "h-3.5 w-3.5" }),
|
|
54
|
+
p
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
return x ? /* @__PURE__ */ c(b, { content: h, children: i }) : i;
|
|
59
|
+
}
|
|
60
|
+
const $ = /* @__PURE__ */ v(
|
|
61
|
+
"span",
|
|
62
|
+
{
|
|
63
|
+
className: D("inline-flex items-center gap-ds-01 font-sans text-ds-sm", s, u),
|
|
64
|
+
...d,
|
|
65
|
+
children: [
|
|
66
|
+
m && /* @__PURE__ */ c(w, { className: "h-3.5 w-3.5" }),
|
|
67
|
+
p
|
|
68
|
+
]
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
return x ? /* @__PURE__ */ c(b, { content: h, children: $ }) : $;
|
|
72
|
+
}
|
|
73
|
+
export {
|
|
74
|
+
E as DeadlineIndicator
|
|
75
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export interface EmojiData {
|
|
4
|
+
id: string;
|
|
5
|
+
native: string;
|
|
6
|
+
shortcodes?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface EmojiPickerProps {
|
|
9
|
+
onSelect: (emoji: EmojiData) => void;
|
|
10
|
+
/** @default 'auto' */
|
|
11
|
+
theme?: 'auto' | 'light' | 'dark';
|
|
12
|
+
/** @default 'none' */
|
|
13
|
+
previewPosition?: 'top' | 'bottom' | 'none';
|
|
14
|
+
/** @default 'search' */
|
|
15
|
+
skinTonePosition?: 'search' | 'preview' | 'none';
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface EmojiPickerPopoverProps extends EmojiPickerProps {
|
|
19
|
+
children: React.ReactNode;
|
|
20
|
+
/** @default 'start' */
|
|
21
|
+
align?: 'start' | 'center' | 'end';
|
|
22
|
+
}
|
|
23
|
+
declare function EmojiPicker({ onSelect, theme, previewPosition, skinTonePosition, className, }: EmojiPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
declare function EmojiPickerPopover({ children, align, onSelect, theme, previewPosition, skinTonePosition, className, }: EmojiPickerPopoverProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export { EmojiPicker, EmojiPickerPopover };
|
|
26
|
+
//# sourceMappingURL=emoji-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"emoji-picker.d.ts","sourceRoot":"","sources":["../../src/composed/emoji-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAe9B,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,CAAA;IACpC,sBAAsB;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,CAAA;IACjC,sBAAsB;IACtB,eAAe,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAA;IAC3C,wBAAwB;IACxB,gBAAgB,CAAC,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAA;IAChD,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,uBAAuB;IACvB,KAAK,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAA;CACnC;AAsBD,iBAAS,WAAW,CAAC,EACnB,QAAQ,EACR,KAAc,EACd,eAAwB,EACxB,gBAA2B,EAC3B,SAAS,GACV,EAAE,gBAAgB,2CAqDlB;AAMD,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,KAAe,EACf,QAAQ,EACR,KAAK,EACL,eAAe,EACf,gBAAgB,EAChB,SAAS,GACV,EAAE,uBAAuB,2CA0BzB;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as g } from "react/jsx-runtime";
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { cn as m } from "../ui/lib/utils.js";
|
|
5
|
+
import { springs as u } from "../ui/lib/motion.js";
|
|
6
|
+
import { Skeleton as f } from "../ui/skeleton.js";
|
|
7
|
+
import { Popover as k, PopoverTrigger as S, PopoverContent as v } from "../ui/popover.js";
|
|
8
|
+
import { A as x, m as h } from "../_chunks/framer.js";
|
|
9
|
+
const P = n.lazy(
|
|
10
|
+
() => import("@emoji-mart/react").then((t) => ({
|
|
11
|
+
default: t.default
|
|
12
|
+
}))
|
|
13
|
+
);
|
|
14
|
+
function j(t) {
|
|
15
|
+
return t !== "auto" ? t : typeof document > "u" ? "light" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
16
|
+
}
|
|
17
|
+
function w({
|
|
18
|
+
onSelect: t,
|
|
19
|
+
theme: r = "auto",
|
|
20
|
+
previewPosition: s = "none",
|
|
21
|
+
skinTonePosition: c = "search",
|
|
22
|
+
className: o
|
|
23
|
+
}) {
|
|
24
|
+
const [d, l] = n.useState(!1), [a, i] = n.useState(null);
|
|
25
|
+
return n.useEffect(() => {
|
|
26
|
+
l(!0), import("@emoji-mart/data").then((p) => {
|
|
27
|
+
i(p.default);
|
|
28
|
+
});
|
|
29
|
+
}, []), /* @__PURE__ */ e(x, { mode: "wait", children: d && !!a ? /* @__PURE__ */ e(
|
|
30
|
+
h.div,
|
|
31
|
+
{
|
|
32
|
+
initial: { opacity: 0, scale: 0.95 },
|
|
33
|
+
animate: { opacity: 1, scale: 1 },
|
|
34
|
+
transition: u.snappy,
|
|
35
|
+
className: o,
|
|
36
|
+
children: /* @__PURE__ */ e(
|
|
37
|
+
n.Suspense,
|
|
38
|
+
{
|
|
39
|
+
fallback: /* @__PURE__ */ e("div", { className: m("rounded-ds-lg", o), children: /* @__PURE__ */ e(f, { className: "h-[435px] w-[352px] rounded-ds-lg" }) }),
|
|
40
|
+
children: /* @__PURE__ */ e(
|
|
41
|
+
P,
|
|
42
|
+
{
|
|
43
|
+
data: a,
|
|
44
|
+
onEmojiSelect: t,
|
|
45
|
+
theme: j(r),
|
|
46
|
+
previewPosition: s,
|
|
47
|
+
skinTonePosition: c
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
}
|
|
51
|
+
)
|
|
52
|
+
},
|
|
53
|
+
"picker"
|
|
54
|
+
) : /* @__PURE__ */ e(
|
|
55
|
+
h.div,
|
|
56
|
+
{
|
|
57
|
+
initial: { opacity: 0 },
|
|
58
|
+
animate: { opacity: 1 },
|
|
59
|
+
exit: { opacity: 0 },
|
|
60
|
+
transition: u.snappy,
|
|
61
|
+
className: m("rounded-ds-lg", o),
|
|
62
|
+
children: /* @__PURE__ */ e(f, { className: "h-[435px] w-[352px] rounded-ds-lg" })
|
|
63
|
+
},
|
|
64
|
+
"skeleton"
|
|
65
|
+
) });
|
|
66
|
+
}
|
|
67
|
+
function z({
|
|
68
|
+
children: t,
|
|
69
|
+
align: r = "start",
|
|
70
|
+
onSelect: s,
|
|
71
|
+
theme: c,
|
|
72
|
+
previewPosition: o,
|
|
73
|
+
skinTonePosition: d,
|
|
74
|
+
className: l
|
|
75
|
+
}) {
|
|
76
|
+
const [a, i] = n.useState(!1);
|
|
77
|
+
return /* @__PURE__ */ g(k, { open: a, onOpenChange: i, children: [
|
|
78
|
+
/* @__PURE__ */ e(S, { asChild: !0, children: t }),
|
|
79
|
+
/* @__PURE__ */ e(
|
|
80
|
+
v,
|
|
81
|
+
{
|
|
82
|
+
align: r,
|
|
83
|
+
className: "w-auto border-none bg-transparent p-0 shadow-none",
|
|
84
|
+
sideOffset: 8,
|
|
85
|
+
children: /* @__PURE__ */ e(
|
|
86
|
+
w,
|
|
87
|
+
{
|
|
88
|
+
onSelect: (p) => {
|
|
89
|
+
s(p), i(!1);
|
|
90
|
+
},
|
|
91
|
+
theme: c,
|
|
92
|
+
previewPosition: o,
|
|
93
|
+
skinTonePosition: d,
|
|
94
|
+
className: l
|
|
95
|
+
}
|
|
96
|
+
)
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] });
|
|
100
|
+
}
|
|
101
|
+
export {
|
|
102
|
+
w as EmojiPicker,
|
|
103
|
+
z as EmojiPickerPopover
|
|
104
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
type FileType = 'image' | 'pdf' | 'video' | 'audio' | 'embed';
|
|
4
|
+
export interface FilePreviewProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onError'> {
|
|
5
|
+
url: string;
|
|
6
|
+
/** Auto-detected from URL/mimeType if omitted */
|
|
7
|
+
type?: FileType;
|
|
8
|
+
mimeType?: string;
|
|
9
|
+
alt?: string;
|
|
10
|
+
/** PDF starting page @default 1 */
|
|
11
|
+
initialPage?: number;
|
|
12
|
+
/** File name for display */
|
|
13
|
+
fileName?: string;
|
|
14
|
+
/** File size for display (e.g. '2.4 MB') */
|
|
15
|
+
fileSize?: string;
|
|
16
|
+
/** Called on errors (broken URL, CORS, timeout) */
|
|
17
|
+
onError?: (error: string) => void;
|
|
18
|
+
}
|
|
19
|
+
declare function FilePreview({ url, type: typeProp, mimeType, alt, initialPage, fileName, fileSize, onError, className, ...props }: FilePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export { FilePreview };
|
|
21
|
+
export type { FileType };
|
|
22
|
+
//# sourceMappingURL=file-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-preview.d.ts","sourceRoot":"","sources":["../../src/composed/file-preview.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AA2B9B,KAAK,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAA;AAE7D,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IAC7F,GAAG,EAAE,MAAM,CAAA;IACX,iDAAiD;IACjD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mCAAmC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mDAAmD;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CAClC;AAg2BD,iBAAS,WAAW,CAAC,EACnB,GAAG,EACH,IAAI,EAAE,QAAQ,EACd,QAAQ,EACR,GAAG,EACH,WAAe,EACf,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,SAAS,EACT,GAAG,KAAK,EACT,EAAE,gBAAgB,2CAuClB;AAED,OAAO,EAAE,WAAW,EAAE,CAAA;AACtB,YAAY,EAAE,QAAQ,EAAE,CAAA"}
|