@devalok/shilp-sutra 0.2.0 → 0.3.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/README.md +239 -0
- package/dist/composed/content-card.d.ts +2 -2
- package/dist/composed/error-boundary.js +1 -1
- package/dist/shell/notification-preferences.js +14 -14
- package/dist/tailwind/index.cjs +344 -0
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +15 -10
- package/dist/tokens/index.css +1 -0
- package/dist/tokens/semantic.css +3 -3
- package/dist/tokens/typography.css +7 -7
- package/dist/ui/alert.d.ts +7 -7
- package/dist/ui/alert.js +10 -10
- package/dist/ui/autocomplete.d.ts +3 -3
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +1 -1
- package/dist/ui/badge.d.ts +10 -7
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +82 -30
- package/dist/ui/banner.d.ts +5 -5
- package/dist/ui/banner.js +17 -17
- package/dist/ui/button-group.d.ts +8 -5
- package/dist/ui/button-group.d.ts.map +1 -1
- package/dist/ui/button-group.js +17 -17
- package/dist/ui/button.d.ts +10 -8
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +65 -47
- package/dist/ui/chip.d.ts +5 -5
- package/dist/ui/chip.js +10 -10
- package/dist/ui/combobox.d.ts +6 -7
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +32 -31
- package/dist/ui/dialog.d.ts +5 -11
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +53 -53
- package/dist/ui/file-upload.js +34 -34
- package/dist/ui/form.d.ts +31 -28
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +34 -32
- package/dist/ui/icon-button.d.ts +4 -4
- package/dist/ui/index.d.ts +3 -3
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +69 -69
- package/dist/ui/number-input.d.ts +8 -10
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +48 -47
- package/dist/ui/progress.d.ts +1 -1
- package/dist/ui/search-input.js +8 -8
- package/dist/ui/sheet.d.ts +6 -12
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +49 -49
- package/dist/ui/sidebar.d.ts +1 -1
- package/dist/ui/slider.d.ts +1 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/spinner.js +7 -7
- package/dist/ui/switch.d.ts +4 -1
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +13 -12
- package/dist/ui/toast.d.ts +3 -3
- package/dist/ui/toast.js +22 -22
- package/dist/ui/toaster.d.ts +3 -3
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle.d.ts +2 -2
- package/fonts/Inter-Italic-Variable.woff2 +0 -0
- package/fonts/Inter-Variable.woff2 +0 -0
- package/fonts/Ranade-Variable.woff2 +0 -0
- package/fonts/Ranade-VariableItalic.woff2 +0 -0
- package/package.json +63 -11
- package/fonts/GoogleSans-Italic-Variable.ttf +0 -0
- package/fonts/GoogleSans-Variable.ttf +0 -0
- package/fonts/Ranade-Variable.ttf +0 -0
- package/fonts/Ranade-VariableItalic.ttf +0 -0
package/dist/ui/chip.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as u, jsx as
|
|
2
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
|
3
3
|
import * as v from "react";
|
|
4
4
|
import { IconX as p } from "@tabler/icons-react";
|
|
5
5
|
import { cva as N } from "class-variance-authority";
|
|
@@ -67,29 +67,29 @@ const w = N(
|
|
|
67
67
|
}
|
|
68
68
|
), C = v.forwardRef(
|
|
69
69
|
({ label: t, variant: l, size: i, color: n, icon: o, onClick: s, onDelete: c, disabled: a, className: d, ...g }, b) => {
|
|
70
|
-
const
|
|
70
|
+
const e = !!s, m = e ? "button" : "span", x = e && !a ? "cursor-pointer hover:bg-field-hover" : "", y = a ? "opacity-action-disabled cursor-not-allowed" : "";
|
|
71
71
|
return /* @__PURE__ */ u(
|
|
72
72
|
m,
|
|
73
73
|
{
|
|
74
74
|
ref: b,
|
|
75
75
|
className: h(w({ variant: l, size: i, color: n }), x, y, d),
|
|
76
|
-
onClick:
|
|
77
|
-
disabled:
|
|
78
|
-
type:
|
|
76
|
+
onClick: e ? s : void 0,
|
|
77
|
+
disabled: e ? a : void 0,
|
|
78
|
+
type: e ? "button" : void 0,
|
|
79
79
|
...g,
|
|
80
80
|
children: [
|
|
81
|
-
o && /* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
c && /* @__PURE__ */
|
|
81
|
+
o && /* @__PURE__ */ r("span", { className: "flex-shrink-0 [&>svg]:w-ico-sm [&>svg]:h-ico-sm", children: o }),
|
|
82
|
+
/* @__PURE__ */ r("span", { children: t }),
|
|
83
|
+
c && /* @__PURE__ */ r(
|
|
84
84
|
"button",
|
|
85
85
|
{
|
|
86
86
|
type: "button",
|
|
87
87
|
"aria-label": `Remove ${t}`,
|
|
88
|
-
className: "flex-shrink-0 rounded-ds-full p-ds-01 hover:bg-layer-03 transition-colors duration-fast-01 [&>svg]:w-ico-sm [&>svg]:h-ico-sm",
|
|
88
|
+
className: "flex-shrink-0 min-h-6 min-w-6 flex items-center justify-center rounded-ds-full p-ds-01 hover:bg-layer-03 transition-colors duration-fast-01 [&>svg]:w-ico-sm [&>svg]:h-ico-sm",
|
|
89
89
|
onClick: (f) => {
|
|
90
90
|
f.stopPropagation(), c();
|
|
91
91
|
},
|
|
92
|
-
children: /* @__PURE__ */
|
|
92
|
+
children: /* @__PURE__ */ r(p, { className: "h-ico-sm w-ico-sm" })
|
|
93
93
|
}
|
|
94
94
|
)
|
|
95
95
|
]
|
package/dist/ui/combobox.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface ComboboxOption {
|
|
|
18
18
|
* **Single vs multi:** `multiple={false}` (default) — `value` is a `string`. When `multiple={true}`,
|
|
19
19
|
* `value` is `string[]` and selected items appear as dismissible pills in the trigger.
|
|
20
20
|
*
|
|
21
|
-
* **`
|
|
21
|
+
* **`onValueChange` signature:** always `(value: string | string[]) => void`. Check `multiple` to determine
|
|
22
22
|
* which type you'll receive.
|
|
23
23
|
*
|
|
24
24
|
* **Custom rendering:** Use `renderOption` to return custom JSX per option (e.g. avatars, badges).
|
|
@@ -28,7 +28,7 @@ export interface ComboboxOption {
|
|
|
28
28
|
* <Combobox
|
|
29
29
|
* options={[{ value: 'in', label: 'India' }, { value: 'us', label: 'United States' }]}
|
|
30
30
|
* value={country}
|
|
31
|
-
*
|
|
31
|
+
* onValueChange={(v) => setCountry(v as string)}
|
|
32
32
|
* placeholder="Select country"
|
|
33
33
|
* />
|
|
34
34
|
*
|
|
@@ -38,7 +38,7 @@ export interface ComboboxOption {
|
|
|
38
38
|
* multiple
|
|
39
39
|
* options={tagOptions}
|
|
40
40
|
* value={selectedTags}
|
|
41
|
-
*
|
|
41
|
+
* onValueChange={(v) => setSelectedTags(v as string[])}
|
|
42
42
|
* placeholder="Select tags..."
|
|
43
43
|
* />
|
|
44
44
|
*
|
|
@@ -47,7 +47,7 @@ export interface ComboboxOption {
|
|
|
47
47
|
* <Combobox
|
|
48
48
|
* options={users.map(u => ({ value: u.id, label: u.name }))}
|
|
49
49
|
* value={assigneeId}
|
|
50
|
-
*
|
|
50
|
+
* onValueChange={(v) => setAssigneeId(v as string)}
|
|
51
51
|
* renderOption={(option, selected) => (
|
|
52
52
|
* <span className="flex items-center gap-ds-03">
|
|
53
53
|
* <Avatar size="xs"><AvatarFallback>{option.label[0]}</AvatarFallback></Avatar>
|
|
@@ -57,16 +57,15 @@ export interface ComboboxOption {
|
|
|
57
57
|
* />
|
|
58
58
|
* // These are just a few ways — feel free to combine props creatively!
|
|
59
59
|
*/
|
|
60
|
-
export interface ComboboxProps {
|
|
60
|
+
export interface ComboboxProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
61
61
|
options: ComboboxOption[];
|
|
62
62
|
value?: string | string[];
|
|
63
|
-
|
|
63
|
+
onValueChange: (value: string | string[]) => void;
|
|
64
64
|
placeholder?: string;
|
|
65
65
|
searchPlaceholder?: string;
|
|
66
66
|
emptyMessage?: string;
|
|
67
67
|
multiple?: boolean;
|
|
68
68
|
disabled?: boolean;
|
|
69
|
-
className?: string;
|
|
70
69
|
triggerClassName?: string;
|
|
71
70
|
/** Max visible items in the dropdown before scroll (default 6) */
|
|
72
71
|
maxVisible?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/ui/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"combobox.d.ts","sourceRoot":"","sources":["../../src/ui/combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IAC3F,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IACzB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,KAAK,IAAI,CAAA;IACjD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAA;CAC9E;AAQD,QAAA,MAAM,QAAQ,yFA4Xb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/dist/ui/combobox.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as r, jsxs as d, Fragment as
|
|
2
|
+
import { jsx as r, jsxs as d, Fragment as B } from "react/jsx-runtime";
|
|
3
3
|
import * as a from "react";
|
|
4
|
-
import { Root as
|
|
5
|
-
import { IconChevronDown as
|
|
4
|
+
import { Root as G, Trigger as U, Portal as q, Content as J } from "../primitives/react-popover.js";
|
|
5
|
+
import { IconChevronDown as Q, IconSearch as W, IconCheck as Y, IconX as Z } from "@tabler/icons-react";
|
|
6
6
|
import { cn as x } from "./lib/utils.js";
|
|
7
|
-
const P = 2,
|
|
7
|
+
const P = 2, V = 36, ee = a.forwardRef(
|
|
8
8
|
({
|
|
9
9
|
options: u,
|
|
10
10
|
value: f,
|
|
11
|
-
|
|
11
|
+
onValueChange: m,
|
|
12
12
|
placeholder: S = "Select...",
|
|
13
13
|
searchPlaceholder: A = "Search...",
|
|
14
14
|
emptyMessage: L = "No results found",
|
|
@@ -17,14 +17,15 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
17
17
|
className: T,
|
|
18
18
|
triggerClassName: $,
|
|
19
19
|
maxVisible: j = 6,
|
|
20
|
-
renderOption: E
|
|
21
|
-
|
|
20
|
+
renderOption: E,
|
|
21
|
+
...H
|
|
22
|
+
}, M) => {
|
|
22
23
|
const [h, w] = a.useState(!1), [v, y] = a.useState(""), [i, c] = a.useState(-1), k = a.useRef(null), N = a.useRef(null), R = a.useId(), I = a.useId(), n = a.useMemo(() => f == null ? [] : Array.isArray(f) ? f : [f], [f]), o = a.useMemo(
|
|
23
24
|
() => v ? u.filter(
|
|
24
25
|
(e) => e.label.toLowerCase().includes(v.toLowerCase())
|
|
25
26
|
) : u,
|
|
26
27
|
[u, v]
|
|
27
|
-
),
|
|
28
|
+
), O = a.useCallback(
|
|
28
29
|
(e) => n.includes(e),
|
|
29
30
|
[n]
|
|
30
31
|
), g = a.useCallback(
|
|
@@ -36,14 +37,14 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
36
37
|
m(e), w(!1);
|
|
37
38
|
},
|
|
38
39
|
[b, n, m]
|
|
39
|
-
),
|
|
40
|
+
), _ = a.useCallback(
|
|
40
41
|
(e, t) => {
|
|
41
42
|
e.stopPropagation(), e.preventDefault();
|
|
42
43
|
const s = n.filter((l) => l !== t);
|
|
43
44
|
m(s);
|
|
44
45
|
},
|
|
45
46
|
[n, m]
|
|
46
|
-
),
|
|
47
|
+
), z = a.useCallback(
|
|
47
48
|
(e) => {
|
|
48
49
|
p || (w(e), e || (y(""), c(-1)));
|
|
49
50
|
},
|
|
@@ -70,7 +71,7 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
70
71
|
return e;
|
|
71
72
|
},
|
|
72
73
|
[o]
|
|
73
|
-
),
|
|
74
|
+
), K = a.useCallback(
|
|
74
75
|
(e) => {
|
|
75
76
|
switch (e.key) {
|
|
76
77
|
case "ArrowDown": {
|
|
@@ -121,11 +122,11 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
121
122
|
t && ((e = t.scrollIntoView) == null || e.call(t, { block: "nearest" }));
|
|
122
123
|
}
|
|
123
124
|
}, [i]);
|
|
124
|
-
const
|
|
125
|
+
const X = a.useCallback(() => {
|
|
125
126
|
if (n.length === 0) return null;
|
|
126
127
|
const e = u.find((t) => t.value === n[0]);
|
|
127
128
|
return (e == null ? void 0 : e.label) ?? null;
|
|
128
|
-
}, [n, u]),
|
|
129
|
+
}, [n, u]), F = () => {
|
|
129
130
|
if (b && n.length > 0) {
|
|
130
131
|
const e = n.slice(0, P), t = n.length - P;
|
|
131
132
|
return /* @__PURE__ */ d("span", { className: "flex flex-1 flex-wrap items-center gap-ds-02 overflow-hidden", children: [
|
|
@@ -142,10 +143,10 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
142
143
|
{
|
|
143
144
|
type: "button",
|
|
144
145
|
className: "inline-flex items-center justify-center rounded-ds-full outline-none hover:opacity-75",
|
|
145
|
-
onClick: (D) =>
|
|
146
|
+
onClick: (D) => _(D, s),
|
|
146
147
|
"aria-label": `Remove ${l.label}`,
|
|
147
148
|
tabIndex: -1,
|
|
148
|
-
children: /* @__PURE__ */ r(
|
|
149
|
+
children: /* @__PURE__ */ r(Z, { className: "h-3 w-3", "aria-hidden": "true" })
|
|
149
150
|
}
|
|
150
151
|
)
|
|
151
152
|
]
|
|
@@ -161,17 +162,17 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
161
162
|
] });
|
|
162
163
|
}
|
|
163
164
|
if (!b && n.length === 1) {
|
|
164
|
-
const e =
|
|
165
|
+
const e = X();
|
|
165
166
|
if (e)
|
|
166
167
|
return /* @__PURE__ */ r("span", { className: "flex-1 truncate text-left", children: e });
|
|
167
168
|
}
|
|
168
169
|
return /* @__PURE__ */ r("span", { className: "flex-1 truncate text-left text-text-placeholder", children: S });
|
|
169
170
|
};
|
|
170
|
-
return /* @__PURE__ */ r(
|
|
171
|
-
/* @__PURE__ */ r(
|
|
171
|
+
return /* @__PURE__ */ r(G, { open: h, onOpenChange: z, children: /* @__PURE__ */ d("div", { className: x("relative", T), ...H, children: [
|
|
172
|
+
/* @__PURE__ */ r(U, { asChild: !0, disabled: p, children: /* @__PURE__ */ d(
|
|
172
173
|
"button",
|
|
173
174
|
{
|
|
174
|
-
ref:
|
|
175
|
+
ref: M,
|
|
175
176
|
type: "button",
|
|
176
177
|
role: "combobox",
|
|
177
178
|
"aria-expanded": h,
|
|
@@ -187,13 +188,13 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
187
188
|
$
|
|
188
189
|
),
|
|
189
190
|
children: [
|
|
190
|
-
|
|
191
|
-
/* @__PURE__ */ r(
|
|
191
|
+
F(),
|
|
192
|
+
/* @__PURE__ */ r(Q, { className: x("ml-ds-02 h-ico-sm w-ico-sm shrink-0 opacity-[0.5] transition-transform duration-fast-01", h && "rotate-180"), "aria-hidden": "true" })
|
|
192
193
|
]
|
|
193
194
|
}
|
|
194
195
|
) }),
|
|
195
|
-
/* @__PURE__ */ r(
|
|
196
|
-
|
|
196
|
+
/* @__PURE__ */ r(q, { children: /* @__PURE__ */ d(
|
|
197
|
+
J,
|
|
197
198
|
{
|
|
198
199
|
className: x(
|
|
199
200
|
"z-dropdown w-[var(--radix-popover-trigger-width)] overflow-hidden rounded-ds-lg border border-border-subtle bg-layer-01 shadow-02",
|
|
@@ -207,7 +208,7 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
207
208
|
},
|
|
208
209
|
children: [
|
|
209
210
|
/* @__PURE__ */ d("div", { className: "flex items-center gap-ds-02 border-b border-border-subtle px-ds-04", children: [
|
|
210
|
-
/* @__PURE__ */ r(
|
|
211
|
+
/* @__PURE__ */ r(W, { className: "h-ico-sm w-ico-sm shrink-0 text-text-tertiary", "aria-hidden": "true" }),
|
|
211
212
|
/* @__PURE__ */ r(
|
|
212
213
|
"input",
|
|
213
214
|
{
|
|
@@ -219,7 +220,7 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
219
220
|
onChange: (e) => {
|
|
220
221
|
y(e.target.value), c(-1);
|
|
221
222
|
},
|
|
222
|
-
onKeyDown:
|
|
223
|
+
onKeyDown: K,
|
|
223
224
|
"aria-autocomplete": "list",
|
|
224
225
|
"aria-controls": I,
|
|
225
226
|
"aria-activedescendant": i >= 0 ? `${R}-option-${i}` : void 0,
|
|
@@ -235,9 +236,9 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
235
236
|
role: "listbox",
|
|
236
237
|
"aria-multiselectable": b || void 0,
|
|
237
238
|
className: "overflow-auto p-ds-02",
|
|
238
|
-
style: { maxHeight: `${j *
|
|
239
|
+
style: { maxHeight: `${j * V}px` },
|
|
239
240
|
children: o.map((e, t) => {
|
|
240
|
-
const s =
|
|
241
|
+
const s = O(e.value);
|
|
241
242
|
return /* @__PURE__ */ d(
|
|
242
243
|
"li",
|
|
243
244
|
{
|
|
@@ -263,11 +264,11 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
263
264
|
},
|
|
264
265
|
children: [
|
|
265
266
|
e.icon && /* @__PURE__ */ r("span", { className: "flex h-ico-sm w-ico-sm items-center justify-center shrink-0", children: e.icon }),
|
|
266
|
-
/* @__PURE__ */ r("span", { className: "flex flex-1 flex-col", children: E ? E(e, s) : /* @__PURE__ */ d(
|
|
267
|
+
/* @__PURE__ */ r("span", { className: "flex flex-1 flex-col", children: E ? E(e, s) : /* @__PURE__ */ d(B, { children: [
|
|
267
268
|
/* @__PURE__ */ r("span", { children: e.label }),
|
|
268
269
|
e.description && /* @__PURE__ */ r("span", { className: "text-ds-sm text-text-secondary", children: e.description })
|
|
269
270
|
] }) }),
|
|
270
|
-
s && /* @__PURE__ */ r(
|
|
271
|
+
s && /* @__PURE__ */ r(Y, { className: "h-ico-sm w-ico-sm shrink-0", "aria-hidden": "true" })
|
|
271
272
|
]
|
|
272
273
|
},
|
|
273
274
|
e.value
|
|
@@ -281,7 +282,7 @@ const P = 2, Y = 36, Z = a.forwardRef(
|
|
|
281
282
|
] }) });
|
|
282
283
|
}
|
|
283
284
|
);
|
|
284
|
-
|
|
285
|
+
ee.displayName = "Combobox";
|
|
285
286
|
export {
|
|
286
|
-
|
|
287
|
+
ee as Combobox
|
|
287
288
|
};
|
package/dist/ui/dialog.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ import * as DialogPrimitive from '../primitives/react-dialog';
|
|
|
22
22
|
* // Confirmation dialog:
|
|
23
23
|
* <Dialog>
|
|
24
24
|
* <DialogTrigger asChild>
|
|
25
|
-
* <Button variant="error">Delete project</Button>
|
|
25
|
+
* <Button variant="solid" color="error">Delete project</Button>
|
|
26
26
|
* </DialogTrigger>
|
|
27
27
|
* <DialogContent>
|
|
28
28
|
* <DialogHeader>
|
|
@@ -32,8 +32,8 @@ import * as DialogPrimitive from '../primitives/react-dialog';
|
|
|
32
32
|
* </DialogDescription>
|
|
33
33
|
* </DialogHeader>
|
|
34
34
|
* <DialogFooter>
|
|
35
|
-
* <DialogClose asChild><Button variant="
|
|
36
|
-
* <Button variant="error" onClick={handleDelete}>Delete</Button>
|
|
35
|
+
* <DialogClose asChild><Button variant="outline">Cancel</Button></DialogClose>
|
|
36
|
+
* <Button variant="solid" color="error" onClick={handleDelete}>Delete</Button>
|
|
37
37
|
* </DialogFooter>
|
|
38
38
|
* </DialogContent>
|
|
39
39
|
* </Dialog>
|
|
@@ -61,14 +61,8 @@ declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitiv
|
|
|
61
61
|
* (e.g. CommandPalette in shared/).
|
|
62
62
|
*/
|
|
63
63
|
declare const DialogContentRaw: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
64
|
-
declare const DialogHeader:
|
|
65
|
-
|
|
66
|
-
displayName: string;
|
|
67
|
-
};
|
|
68
|
-
declare const DialogFooter: {
|
|
69
|
-
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
70
|
-
displayName: string;
|
|
71
|
-
};
|
|
64
|
+
declare const DialogHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
65
|
+
declare const DialogFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
72
66
|
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
73
67
|
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
74
68
|
export { Dialog, DialogPortal, DialogOverlay, DialogTrigger, DialogClose, DialogContent, DialogContentRaw, DialogHeader, DialogFooter, DialogTitle, DialogDescription, };
|
package/dist/ui/dialog.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAK3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,aAAa,8GAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,6CAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,4GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,8JAYjB,CAAA;AAGF,QAAA,MAAM,aAAa,8JAqBjB,CAAA;AAGF;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,8JASpB,CAAA;AAGF,QAAA,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/ui/dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,eAAe,MAAM,0BAA0B,CAAA;AAK3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,QAAA,MAAM,MAAM,uCAAuB,CAAA;AAEnC,QAAA,MAAM,aAAa,8GAA0B,CAAA;AAE7C,QAAA,MAAM,YAAY,6CAAyB,CAAA;AAE3C,QAAA,MAAM,WAAW,4GAAwB,CAAA;AAEzC,QAAA,MAAM,aAAa,8JAYjB,CAAA;AAGF,QAAA,MAAM,aAAa,8JAqBjB,CAAA;AAGF;;;;;GAKG;AACH,QAAA,MAAM,gBAAgB,8JASpB,CAAA;AAGF,QAAA,MAAM,YAAY,6GAWjB,CAAA;AAGD,QAAA,MAAM,YAAY,6GAWjB,CAAA;AAGD,QAAA,MAAM,WAAW,oKAYf,CAAA;AAGF,QAAA,MAAM,iBAAiB,8KASrB,CAAA;AAGF,OAAO,EACL,MAAM,EACN,YAAY,EACZ,aAAa,EACb,aAAa,EACb,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACX,iBAAiB,GAClB,CAAA"}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { Root as g, Close as r, Portal as y, Trigger as x, Content as
|
|
2
|
+
import { jsxs as i, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as s from "react";
|
|
4
|
+
import { Root as g, Close as r, Portal as y, Trigger as x, Content as d, Description as n, Overlay as c, Title as m } from "../primitives/react-dialog.js";
|
|
5
5
|
import { IconX as N } from "@tabler/icons-react";
|
|
6
|
-
import { cn as
|
|
7
|
-
const F = g, H = x, u = y, O = r, f =
|
|
6
|
+
import { cn as l } from "./lib/utils.js";
|
|
7
|
+
const F = g, H = x, u = y, O = r, f = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
8
8
|
c,
|
|
9
9
|
{
|
|
10
10
|
ref: t,
|
|
11
|
-
className:
|
|
11
|
+
className: l(
|
|
12
12
|
"fixed inset-0 z-overlay bg-overlay duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
13
13
|
e
|
|
14
14
|
),
|
|
@@ -16,20 +16,20 @@ const F = g, H = x, u = y, O = r, f = l.forwardRef(({ className: e, ...a }, t) =
|
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
18
|
f.displayName = c.displayName;
|
|
19
|
-
const D =
|
|
19
|
+
const D = s.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__ */ i(u, { children: [
|
|
20
20
|
/* @__PURE__ */ o(f, {}),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
21
|
+
/* @__PURE__ */ i(
|
|
22
|
+
d,
|
|
23
23
|
{
|
|
24
24
|
ref: p,
|
|
25
|
-
className:
|
|
25
|
+
className: l(
|
|
26
26
|
"fixed left-[50%] top-[50%] z-modal grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-ds-05 border border-border bg-layer-01 p-ds-06 shadow-04 rounded-ds-xl duration-moderate-02 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
|
|
27
27
|
e
|
|
28
28
|
),
|
|
29
29
|
...t,
|
|
30
30
|
children: [
|
|
31
31
|
a,
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ i(r, { className: "absolute right-ds-05 top-ds-05 min-h-6 min-w-6 flex items-center justify-center rounded-ds-sm text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus disabled:pointer-events-none", children: [
|
|
33
33
|
/* @__PURE__ */ o(N, { className: "h-ico-lg w-ico-lg" }),
|
|
34
34
|
/* @__PURE__ */ o("span", { className: "sr-only", children: "Close" })
|
|
35
35
|
] })
|
|
@@ -37,75 +37,75 @@ const D = l.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__
|
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
] }));
|
|
40
|
-
D.displayName =
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
D.displayName = d.displayName;
|
|
41
|
+
const w = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
42
|
+
d,
|
|
43
43
|
{
|
|
44
44
|
ref: t,
|
|
45
|
-
className:
|
|
45
|
+
className: l(e),
|
|
46
46
|
...a
|
|
47
47
|
}
|
|
48
48
|
));
|
|
49
|
-
|
|
50
|
-
const
|
|
51
|
-
className: e,
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
49
|
+
w.displayName = "DialogContentRaw";
|
|
50
|
+
const b = s.forwardRef(
|
|
51
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: t,
|
|
55
|
+
className: l(
|
|
56
|
+
"flex flex-col space-y-ds-02b text-center sm:text-left",
|
|
57
|
+
e
|
|
58
|
+
),
|
|
59
|
+
...a
|
|
60
|
+
}
|
|
61
|
+
)
|
|
62
62
|
);
|
|
63
|
-
|
|
64
|
-
const
|
|
65
|
-
className: e,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
b.displayName = "DialogHeader";
|
|
64
|
+
const v = s.forwardRef(
|
|
65
|
+
({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
ref: t,
|
|
69
|
+
className: l(
|
|
70
|
+
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-ds-03",
|
|
71
|
+
e
|
|
72
|
+
),
|
|
73
|
+
...a
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
76
|
);
|
|
77
|
-
|
|
78
|
-
const
|
|
77
|
+
v.displayName = "DialogFooter";
|
|
78
|
+
const R = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
79
79
|
m,
|
|
80
80
|
{
|
|
81
81
|
ref: t,
|
|
82
|
-
className:
|
|
82
|
+
className: l(
|
|
83
83
|
"text-ds-lg font-semibold",
|
|
84
84
|
e
|
|
85
85
|
),
|
|
86
86
|
...a
|
|
87
87
|
}
|
|
88
88
|
));
|
|
89
|
-
|
|
90
|
-
const
|
|
89
|
+
R.displayName = m.displayName;
|
|
90
|
+
const h = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
91
91
|
n,
|
|
92
92
|
{
|
|
93
93
|
ref: t,
|
|
94
|
-
className:
|
|
94
|
+
className: l("text-ds-md text-text-secondary", e),
|
|
95
95
|
...a
|
|
96
96
|
}
|
|
97
97
|
));
|
|
98
|
-
|
|
98
|
+
h.displayName = n.displayName;
|
|
99
99
|
export {
|
|
100
100
|
F as Dialog,
|
|
101
101
|
O as DialogClose,
|
|
102
102
|
D as DialogContent,
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
w as DialogContentRaw,
|
|
104
|
+
h as DialogDescription,
|
|
105
|
+
v as DialogFooter,
|
|
106
|
+
b as DialogHeader,
|
|
107
107
|
f as DialogOverlay,
|
|
108
108
|
u as DialogPortal,
|
|
109
|
-
|
|
109
|
+
R as DialogTitle,
|
|
110
110
|
H as DialogTrigger
|
|
111
111
|
};
|