@devalok/shilp-sutra 0.7.0 → 0.8.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/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +84 -73
- package/dist/composed/extensions/emoji-suggestion.d.ts +2 -1
- package/dist/composed/extensions/emoji-suggestion.d.ts.map +1 -1
- package/dist/composed/extensions/emoji-suggestion.js +1 -1
- package/dist/composed/extensions/file-attachment.d.ts +2 -1
- package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +173 -161
- package/dist/composed/status-badge.d.ts +11 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +48 -20
- package/dist/hooks/use-color-mode.d.ts.map +1 -1
- package/dist/hooks/use-color-mode.js +8 -4
- package/dist/hooks/use-mobile.d.ts +5 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -1
- package/dist/node_modules/.pnpm/@emoji-mart_data@1.2.1/node_modules/@emoji-mart/data/sets/15/native.json.js +40141 -0
- package/dist/node_modules/.pnpm/@emoji-mart_react@1.1.1_emoji-mart@5.6.0_react@19.2.4/node_modules/@emoji-mart/react/dist/module.js +17 -0
- package/dist/node_modules/.pnpm/emoji-mart@5.6.0/node_modules/emoji-mart/dist/module.js +2958 -0
- package/dist/tailwind/index.cjs +2 -0
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +2 -0
- package/dist/tokens/semantic.css +3 -1
- package/dist/ui/alert.js +1 -1
- package/dist/ui/badge.js +2 -1
- package/dist/ui/banner.js +12 -12
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +17 -16
- package/dist/ui/combobox.d.ts +20 -11
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/dialog.js +9 -9
- package/dist/ui/form.js +14 -35
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +12 -11
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +39 -35
- package/dist/ui/sheet.js +21 -21
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +30 -24
- package/dist/ui/toast.js +18 -18
- package/llms-full.txt +6 -4
- package/package.json +597 -592
- package/dist/_virtual/shilp-sutra.js +0 -5
- package/dist/_virtual/shilp-sutra2.js +0 -5
package/dist/tailwind/index.cjs
CHANGED
|
@@ -160,6 +160,7 @@ const r = {
|
|
|
160
160
|
"layer-01": "var(--color-layer-01)",
|
|
161
161
|
"layer-02": "var(--color-layer-02)",
|
|
162
162
|
"layer-03": "var(--color-layer-03)",
|
|
163
|
+
"layer-active": "var(--color-layer-active)",
|
|
163
164
|
overlay: "var(--color-overlay)",
|
|
164
165
|
field: "var(--color-field)",
|
|
165
166
|
"field-hover": "var(--color-field-hover)",
|
|
@@ -172,6 +173,7 @@ const r = {
|
|
|
172
173
|
"text-error": "var(--color-text-error)",
|
|
173
174
|
"text-success": "var(--color-text-success)",
|
|
174
175
|
"text-warning": "var(--color-text-warning)",
|
|
176
|
+
"text-info": "var(--color-text-info)",
|
|
175
177
|
"text-link": "var(--color-text-link)",
|
|
176
178
|
"text-on-color": "var(--color-text-on-color)",
|
|
177
179
|
"text-inverse": "var(--color-text-inverse)",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/tailwind/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,QAAA,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/tailwind/preset.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEzC,QAAA,MAAM,MAAM,EAAE,OAAO,CAAC,MAAM,CA0V3B,CAAA;AAED,eAAe,MAAM,CAAA"}
|
package/dist/tailwind/preset.js
CHANGED
|
@@ -160,6 +160,7 @@ const r = {
|
|
|
160
160
|
"layer-01": "var(--color-layer-01)",
|
|
161
161
|
"layer-02": "var(--color-layer-02)",
|
|
162
162
|
"layer-03": "var(--color-layer-03)",
|
|
163
|
+
"layer-active": "var(--color-layer-active)",
|
|
163
164
|
overlay: "var(--color-overlay)",
|
|
164
165
|
field: "var(--color-field)",
|
|
165
166
|
"field-hover": "var(--color-field-hover)",
|
|
@@ -172,6 +173,7 @@ const r = {
|
|
|
172
173
|
"text-error": "var(--color-text-error)",
|
|
173
174
|
"text-success": "var(--color-text-success)",
|
|
174
175
|
"text-warning": "var(--color-text-warning)",
|
|
176
|
+
"text-info": "var(--color-text-info)",
|
|
175
177
|
"text-link": "var(--color-text-link)",
|
|
176
178
|
"text-on-color": "var(--color-text-on-color)",
|
|
177
179
|
"text-inverse": "var(--color-text-inverse)",
|
package/dist/tokens/semantic.css
CHANGED
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
--color-layer-01: var(--neutral-0);
|
|
59
59
|
--color-layer-02: var(--neutral-50);
|
|
60
60
|
--color-layer-03: var(--neutral-100);
|
|
61
|
+
--color-layer-active: var(--neutral-200);
|
|
61
62
|
--color-layer-accent-subtle: var(--pink-50);
|
|
62
63
|
--color-overlay: rgba(5, 5, 5, 0.50);
|
|
63
64
|
--color-field: var(--neutral-50);
|
|
@@ -67,7 +68,7 @@
|
|
|
67
68
|
--color-text-primary: var(--neutral-900);
|
|
68
69
|
--color-text-secondary: var(--neutral-700);
|
|
69
70
|
--color-text-tertiary: var(--neutral-600);
|
|
70
|
-
--color-text-placeholder: var(--neutral-
|
|
71
|
+
--color-text-placeholder: var(--neutral-500);
|
|
71
72
|
--color-text-helper: var(--neutral-600);
|
|
72
73
|
--color-text-disabled: var(--neutral-400);
|
|
73
74
|
--color-text-error: var(--red-600);
|
|
@@ -283,6 +284,7 @@
|
|
|
283
284
|
--color-layer-01: var(--neutral-900);
|
|
284
285
|
--color-layer-02: var(--neutral-800);
|
|
285
286
|
--color-layer-03: var(--neutral-700);
|
|
287
|
+
--color-layer-active: var(--neutral-700);
|
|
286
288
|
--color-layer-accent-subtle: var(--pink-950);
|
|
287
289
|
--color-overlay: rgba(0, 0, 0, 0.70);
|
|
288
290
|
/* Fields */
|
package/dist/ui/alert.js
CHANGED
|
@@ -48,7 +48,7 @@ const N = v("relative flex gap-ds-04 rounded-ds-lg border p-ds-05", {
|
|
|
48
48
|
neutral: s
|
|
49
49
|
}, h = g.forwardRef(({ className: n, variant: c = "subtle", color: e = "info", title: t, onDismiss: o, children: i, ...l }, d) => {
|
|
50
50
|
const b = w[e ?? "info"];
|
|
51
|
-
return a("div", { ref: d, className: p(N({ variant: c, color: e }), n), role: "alert", ...l, children: [r(b, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }), a("div", { className: "flex-1 min-w-0", children: [t && r("p", { className: "text-ds-md font-semibold mb-ds-01", children: t }), r("div", { className: "text-ds-md opacity-[0.9]", children: i })] }), o && r("button", { type: "button", onClick: o, className: "shrink-0 min-h-
|
|
51
|
+
return a("div", { ref: d, className: p(N({ variant: c, color: e }), n), role: "alert", ...l, children: [r(b, { className: "mt-ds-01 h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }), a("div", { className: "flex-1 min-w-0", children: [t && r("p", { className: "text-ds-md font-semibold mb-ds-01", children: t }), r("div", { className: "text-ds-md opacity-[0.9]", children: i })] }), o && r("button", { type: "button", onClick: o, className: "shrink-0 min-h-ds-xs min-w-ds-xs 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", "aria-label": "Dismiss", children: r(f, { className: "h-ico-sm w-ico-sm" }) })] });
|
|
52
52
|
});
|
|
53
53
|
h.displayName = "Alert";
|
|
54
54
|
export {
|
package/dist/ui/badge.js
CHANGED
|
@@ -32,6 +32,7 @@ const u = x("inline-flex items-center gap-ds-02b font-sans font-medium rounded-d
|
|
|
32
32
|
emerald: ""
|
|
33
33
|
},
|
|
34
34
|
size: {
|
|
35
|
+
xs: "h-[16px] px-ds-02b text-ds-xs",
|
|
35
36
|
sm: "h-[20px] px-ds-03 text-ds-xs",
|
|
36
37
|
md: "h-ds-xs px-ds-03 text-ds-sm",
|
|
37
38
|
lg: "h-ds-xs-plus px-ds-04 text-ds-md"
|
|
@@ -94,7 +95,7 @@ const u = x("inline-flex items-center gap-ds-02b font-sans font-medium rounded-d
|
|
|
94
95
|
color: "default",
|
|
95
96
|
size: "md"
|
|
96
97
|
}
|
|
97
|
-
}), v = g.forwardRef(({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => d("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [n && r("span", { className: "h-ds-02b w-ds-02b rounded-ds-full bg-current opacity-[0.7] shrink-0", "aria-hidden": "true" }), c, e && r("button", { type: "button", onClick: e, className: "ml-ds-01 min-h-
|
|
98
|
+
}), v = g.forwardRef(({ className: t, variant: a, color: o, size: s, dot: n, onDismiss: e, children: c, ...l }, i) => d("span", { ref: i, className: m(u({ variant: a, color: o, size: s }), t), ...l, children: [n && r("span", { className: "h-ds-02b w-ds-02b rounded-ds-full bg-current opacity-[0.7] shrink-0", "aria-hidden": "true" }), c, e && r("button", { type: "button", onClick: e, className: "ml-ds-01 min-h-ds-xs min-w-ds-xs flex items-center justify-center rounded-ds-full text-icon-secondary transition-colors hover:text-icon-primary hover:bg-field focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus", "aria-label": "Remove", children: r(b, { className: "h-ico-sm w-ico-sm" }) })] }));
|
|
98
99
|
v.displayName = "Badge";
|
|
99
100
|
export {
|
|
100
101
|
v as Badge,
|
package/dist/ui/banner.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { IconInfoCircle as
|
|
2
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
3
|
+
import { IconInfoCircle as n, IconAlertCircle as f, IconAlertTriangle as m, IconCircleCheck as b, IconX as u } from "@tabler/icons-react";
|
|
4
4
|
import * as x from "react";
|
|
5
5
|
import { cva as g } from "class-variance-authority";
|
|
6
6
|
import { cn as p } from "./lib/utils.js";
|
|
@@ -19,24 +19,24 @@ const h = g(
|
|
|
19
19
|
defaultVariants: { color: "info" }
|
|
20
20
|
}
|
|
21
21
|
), N = {
|
|
22
|
-
info:
|
|
22
|
+
info: n,
|
|
23
23
|
success: b,
|
|
24
24
|
warning: m,
|
|
25
25
|
error: f,
|
|
26
|
-
neutral:
|
|
26
|
+
neutral: n
|
|
27
27
|
}, v = x.forwardRef(
|
|
28
|
-
({ className: t, color: e = "info", action:
|
|
29
|
-
const
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */ r(
|
|
28
|
+
({ className: t, color: e = "info", action: s, onDismiss: o, children: i, ...c }, a) => {
|
|
29
|
+
const d = N[e ?? "info"];
|
|
30
|
+
return /* @__PURE__ */ l("div", { ref: a, className: p(h({ color: e }), t), role: "alert", ...c, children: [
|
|
31
|
+
/* @__PURE__ */ r(d, { className: "h-ico-md w-ico-md shrink-0", "aria-hidden": "true" }),
|
|
32
32
|
/* @__PURE__ */ r("span", { className: "flex-1", children: i }),
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
s && /* @__PURE__ */ r("span", { className: "shrink-0", children: s }),
|
|
34
|
+
o && /* @__PURE__ */ r(
|
|
35
35
|
"button",
|
|
36
36
|
{
|
|
37
37
|
type: "button",
|
|
38
|
-
onClick:
|
|
39
|
-
className: "shrink-0 min-h-
|
|
38
|
+
onClick: o,
|
|
39
|
+
className: "shrink-0 min-h-ds-xs min-w-ds-xs 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",
|
|
40
40
|
"aria-label": "Dismiss",
|
|
41
41
|
children: /* @__PURE__ */ r(u, { className: "h-ico-sm w-ico-sm" })
|
|
42
42
|
}
|
package/dist/ui/chip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/ui/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"chip.d.ts","sourceRoot":"","sources":["../../src/ui/chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,YAAY;;;;8EA6DjB,CAAA;AAED,KAAK,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;AAEzJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,KAAK,SAAS,GAAG,IAAI,CAAC,YAAY,CAAC,OAAO,YAAY,CAAC,EAAE,OAAO,CAAC,GAAG;IAClE,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAA;IACjC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,QAAA,MAAM,IAAI;;;;;WATD,MAAM;YACL,SAAS;WACV,KAAK,CAAC,SAAS;cACZ,KAAK,CAAC,iBAAiB;gBACrB,MAAM,IAAI;eACX,OAAO;gBACN,MAAM;qCAyCnB,CAAA;AAGD,OAAO,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,CAAA"}
|
package/dist/ui/chip.js
CHANGED
|
@@ -85,7 +85,7 @@ const w = N(
|
|
|
85
85
|
{
|
|
86
86
|
type: "button",
|
|
87
87
|
"aria-label": `Remove ${a}`,
|
|
88
|
-
className: "flex-shrink-0 min-h-
|
|
88
|
+
className: "flex-shrink-0 min-h-ds-xs min-w-ds-xs 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: (y) => {
|
|
90
90
|
y.stopPropagation(), c();
|
|
91
91
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color-input.d.ts","sourceRoot":"","sources":["../../src/ui/color-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"color-input.d.ts","sourceRoot":"","sources":["../../src/ui/color-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;IAClB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,QAAA,MAAM,UAAU,0FAmFf,CAAA;AAGD,OAAO,EAAE,UAAU,EAAE,CAAA"}
|
package/dist/ui/color-input.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
3
3
|
import * as m from "react";
|
|
4
|
-
import { cn as
|
|
4
|
+
import { cn as s } from "./lib/utils.js";
|
|
5
5
|
const f = m.forwardRef(
|
|
6
|
-
({ value:
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
({ value: l = "#000000", onChange: n, presets: c, disabled: o = !1, className: d }, u) => {
|
|
7
|
+
const a = (r) => {
|
|
8
|
+
n == null || n(r);
|
|
9
9
|
};
|
|
10
|
-
return /* @__PURE__ */ i("div", { className:
|
|
10
|
+
return /* @__PURE__ */ i("div", { className: s("flex flex-col gap-ds-03", d), children: [
|
|
11
11
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-ds-03", children: [
|
|
12
12
|
/* @__PURE__ */ i(
|
|
13
13
|
"label",
|
|
14
14
|
{
|
|
15
15
|
"aria-label": "Pick a color",
|
|
16
|
-
className:
|
|
16
|
+
className: s(
|
|
17
17
|
"relative flex h-ds-sm w-ds-sm shrink-0 cursor-pointer items-center justify-center overflow-hidden rounded-ds-md border border-border transition-colors hover:border-border-strong",
|
|
18
18
|
o && "cursor-not-allowed opacity-50"
|
|
19
19
|
),
|
|
@@ -23,9 +23,9 @@ const f = m.forwardRef(
|
|
|
23
23
|
{
|
|
24
24
|
ref: u,
|
|
25
25
|
type: "color",
|
|
26
|
-
value:
|
|
26
|
+
value: l,
|
|
27
27
|
disabled: o,
|
|
28
|
-
onChange: (r) =>
|
|
28
|
+
onChange: (r) => a(r.target.value),
|
|
29
29
|
className: "absolute inset-0 h-full w-full cursor-pointer opacity-0"
|
|
30
30
|
}
|
|
31
31
|
),
|
|
@@ -33,7 +33,7 @@ const f = m.forwardRef(
|
|
|
33
33
|
"span",
|
|
34
34
|
{
|
|
35
35
|
className: "h-full w-full rounded-[inherit]",
|
|
36
|
-
style: { backgroundColor:
|
|
36
|
+
style: { backgroundColor: l }
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
]
|
|
@@ -43,18 +43,19 @@ const f = m.forwardRef(
|
|
|
43
43
|
"input",
|
|
44
44
|
{
|
|
45
45
|
type: "text",
|
|
46
|
-
|
|
46
|
+
"aria-label": "Hex color value",
|
|
47
|
+
value: l,
|
|
47
48
|
disabled: o,
|
|
48
49
|
onChange: (r) => {
|
|
49
50
|
const e = r.target.value;
|
|
50
|
-
/^#[0-9a-fA-F]{0,6}$/.test(e) &&
|
|
51
|
+
/^#[0-9a-fA-F]{0,6}$/.test(e) && a(e);
|
|
51
52
|
},
|
|
52
53
|
onBlur: (r) => {
|
|
53
54
|
const e = r.target.value;
|
|
54
|
-
/^#[0-9a-fA-F]{6}$/.test(e) &&
|
|
55
|
+
/^#[0-9a-fA-F]{6}$/.test(e) && a(e);
|
|
55
56
|
},
|
|
56
57
|
maxLength: 7,
|
|
57
|
-
className:
|
|
58
|
+
className: s(
|
|
58
59
|
"h-ds-sm w-[90px] rounded-ds-md border border-border bg-layer-01 px-ds-03 font-mono text-ds-sm text-text-primary transition-colors",
|
|
59
60
|
"focus:border-interactive focus:outline-none focus:ring-1 focus:ring-interactive",
|
|
60
61
|
o && "cursor-not-allowed opacity-50"
|
|
@@ -67,10 +68,10 @@ const f = m.forwardRef(
|
|
|
67
68
|
{
|
|
68
69
|
type: "button",
|
|
69
70
|
disabled: o,
|
|
70
|
-
onClick: () =>
|
|
71
|
-
className:
|
|
71
|
+
onClick: () => a(r),
|
|
72
|
+
className: s(
|
|
72
73
|
"h-ds-xs w-ds-xs rounded-ds-sm border transition-colors",
|
|
73
|
-
|
|
74
|
+
l === r ? "border-interactive ring-1 ring-interactive" : "border-border hover:border-border-strong",
|
|
74
75
|
o && "cursor-not-allowed opacity-50"
|
|
75
76
|
),
|
|
76
77
|
style: { backgroundColor: r },
|
package/dist/ui/combobox.d.ts
CHANGED
|
@@ -15,11 +15,12 @@ export interface ComboboxOption {
|
|
|
15
15
|
* Props for Combobox — a searchable single or multi-select dropdown with built-in keyboard
|
|
16
16
|
* navigation, pill overflow ("+ N more"), and an optional custom option renderer.
|
|
17
17
|
*
|
|
18
|
-
* **Single vs multi:** `multiple={false}` (default) — `value` is a `string
|
|
19
|
-
* `value` is `string[]`
|
|
18
|
+
* **Single vs multi:** `multiple={false}` (default) — `value` is a `string` and `onValueChange`
|
|
19
|
+
* receives a `string`. When `multiple={true}`, `value` is `string[]`, `onValueChange` receives
|
|
20
|
+
* `string[]`, and selected items appear as dismissible pills in the trigger.
|
|
20
21
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
22
|
+
* The props form a **discriminated union** on `multiple` — TypeScript will narrow `value` and
|
|
23
|
+
* `onValueChange` automatically, so no manual casts are needed.
|
|
23
24
|
*
|
|
24
25
|
* **Custom rendering:** Use `renderOption` to return custom JSX per option (e.g. avatars, badges).
|
|
25
26
|
*
|
|
@@ -28,7 +29,7 @@ export interface ComboboxOption {
|
|
|
28
29
|
* <Combobox
|
|
29
30
|
* options={[{ value: 'in', label: 'India' }, { value: 'us', label: 'United States' }]}
|
|
30
31
|
* value={country}
|
|
31
|
-
* onValueChange={(v) => setCountry(v
|
|
32
|
+
* onValueChange={(v) => setCountry(v)}
|
|
32
33
|
* placeholder="Select country"
|
|
33
34
|
* />
|
|
34
35
|
*
|
|
@@ -38,7 +39,7 @@ export interface ComboboxOption {
|
|
|
38
39
|
* multiple
|
|
39
40
|
* options={tagOptions}
|
|
40
41
|
* value={selectedTags}
|
|
41
|
-
* onValueChange={(v) => setSelectedTags(v
|
|
42
|
+
* onValueChange={(v) => setSelectedTags(v)}
|
|
42
43
|
* placeholder="Select tags..."
|
|
43
44
|
* />
|
|
44
45
|
*
|
|
@@ -47,7 +48,7 @@ export interface ComboboxOption {
|
|
|
47
48
|
* <Combobox
|
|
48
49
|
* options={users.map(u => ({ value: u.id, label: u.name }))}
|
|
49
50
|
* value={assigneeId}
|
|
50
|
-
* onValueChange={(v) => setAssigneeId(v
|
|
51
|
+
* onValueChange={(v) => setAssigneeId(v)}
|
|
51
52
|
* renderOption={(option, selected) => (
|
|
52
53
|
* <span className="flex items-center gap-ds-03">
|
|
53
54
|
* <Avatar size="xs"><AvatarFallback>{option.label[0]}</AvatarFallback></Avatar>
|
|
@@ -57,20 +58,28 @@ export interface ComboboxOption {
|
|
|
57
58
|
* />
|
|
58
59
|
* // These are just a few ways — feel free to combine props creatively!
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
interface ComboboxBaseProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
|
|
61
62
|
options: ComboboxOption[];
|
|
62
|
-
value?: string | string[];
|
|
63
|
-
onValueChange: (value: string | string[]) => void;
|
|
64
63
|
placeholder?: string;
|
|
65
64
|
searchPlaceholder?: string;
|
|
66
65
|
emptyMessage?: string;
|
|
67
|
-
multiple?: boolean;
|
|
68
66
|
disabled?: boolean;
|
|
69
67
|
triggerClassName?: string;
|
|
70
68
|
/** Max visible items in the dropdown before scroll (default 6) */
|
|
71
69
|
maxVisible?: number;
|
|
72
70
|
renderOption?: (option: ComboboxOption, selected: boolean) => React.ReactNode;
|
|
73
71
|
}
|
|
72
|
+
interface ComboboxSingleProps extends ComboboxBaseProps {
|
|
73
|
+
multiple?: false;
|
|
74
|
+
value?: string;
|
|
75
|
+
onValueChange: (value: string) => void;
|
|
76
|
+
}
|
|
77
|
+
interface ComboboxMultipleProps extends ComboboxBaseProps {
|
|
78
|
+
multiple: true;
|
|
79
|
+
value?: string[];
|
|
80
|
+
onValueChange: (value: string[]) => void;
|
|
81
|
+
}
|
|
82
|
+
export type ComboboxProps = ComboboxSingleProps | ComboboxMultipleProps;
|
|
74
83
|
declare const Combobox: React.ForwardRefExoticComponent<ComboboxProps & React.RefAttributes<HTMLButtonElement>>;
|
|
75
84
|
export { Combobox };
|
|
76
85
|
//# sourceMappingURL=combobox.d.ts.map
|
|
@@ -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
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AACH,UAAU,iBAAkB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxF,OAAO,EAAE,cAAc,EAAE,CAAA;IACzB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,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;AAED,UAAU,mBAAoB,SAAQ,iBAAiB;IACrD,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC;AAED,UAAU,qBAAsB,SAAQ,iBAAiB;IACvD,QAAQ,EAAE,IAAI,CAAA;IACd,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;CACzC;AAED,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,qBAAqB,CAAA;AAQvE,QAAA,MAAM,QAAQ,yFA4Xb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAA"}
|
package/dist/ui/dialog.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
2
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
3
3
|
import * as s from "react";
|
|
4
|
-
import { Root as g, Close as r, Portal as
|
|
4
|
+
import { Root as g, Close as r, Portal as x, Trigger as y, Content as i, 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
6
|
import { cn as l } from "./lib/utils.js";
|
|
7
|
-
const F = g, H =
|
|
7
|
+
const F = g, H = y, u = x, O = r, f = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
8
8
|
c,
|
|
9
9
|
{
|
|
10
10
|
ref: t,
|
|
@@ -16,10 +16,10 @@ const F = g, H = x, u = y, O = r, f = s.forwardRef(({ className: e, ...a }, t) =
|
|
|
16
16
|
}
|
|
17
17
|
));
|
|
18
18
|
f.displayName = c.displayName;
|
|
19
|
-
const D = s.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__ */
|
|
19
|
+
const D = s.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__ */ d(u, { children: [
|
|
20
20
|
/* @__PURE__ */ o(f, {}),
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
21
|
+
/* @__PURE__ */ d(
|
|
22
|
+
i,
|
|
23
23
|
{
|
|
24
24
|
ref: p,
|
|
25
25
|
className: l(
|
|
@@ -29,7 +29,7 @@ const D = s.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__
|
|
|
29
29
|
...t,
|
|
30
30
|
children: [
|
|
31
31
|
a,
|
|
32
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ d(r, { className: "absolute right-ds-05 top-ds-05 min-h-ds-xs min-w-ds-xs 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,9 +37,9 @@ const D = s.forwardRef(({ className: e, children: a, ...t }, p) => /* @__PURE__
|
|
|
37
37
|
}
|
|
38
38
|
)
|
|
39
39
|
] }));
|
|
40
|
-
D.displayName =
|
|
40
|
+
D.displayName = i.displayName;
|
|
41
41
|
const w = s.forwardRef(({ className: e, ...a }, t) => /* @__PURE__ */ o(
|
|
42
|
-
|
|
42
|
+
i,
|
|
43
43
|
{
|
|
44
44
|
ref: t,
|
|
45
45
|
className: l(e),
|
package/dist/ui/form.js
CHANGED
|
@@ -1,49 +1,28 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
2
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import * as e from "react";
|
|
4
4
|
import { cn as i } from "./lib/utils.js";
|
|
5
|
-
const x = e.createContext({}), m = e.forwardRef(
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"div",
|
|
10
|
-
{
|
|
11
|
-
ref: r,
|
|
12
|
-
className: i("flex flex-col gap-ds-02", o),
|
|
13
|
-
...t,
|
|
14
|
-
children: a
|
|
15
|
-
}
|
|
16
|
-
) });
|
|
17
|
-
}
|
|
18
|
-
);
|
|
5
|
+
const x = e.createContext({}), m = e.forwardRef(({ className: o, helperTextId: s, state: l = "helper", required: n, children: d, ...t }, r) => {
|
|
6
|
+
const a = e.useId(), p = s || `${a}-helper`;
|
|
7
|
+
return c(x.Provider, { value: { state: l, helperTextId: p, required: n }, children: c("div", { ref: r, className: i("flex flex-col gap-ds-02", o), ...t, children: d }) });
|
|
8
|
+
});
|
|
19
9
|
m.displayName = "FormField";
|
|
20
|
-
const
|
|
10
|
+
const f = {
|
|
21
11
|
helper: "text-text-helper",
|
|
22
12
|
error: "text-text-error",
|
|
23
13
|
warning: "text-text-warning",
|
|
24
14
|
success: "text-text-success"
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
ref: a,
|
|
32
|
-
id: c,
|
|
33
|
-
role: r === "error" ? "alert" : void 0,
|
|
34
|
-
className: i("text-ds-sm", u[r], o),
|
|
35
|
-
...n
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
f.displayName = "FormHelperText";
|
|
41
|
-
function v() {
|
|
15
|
+
}, u = e.forwardRef(({ className: o, id: s, state: l, ...n }, d) => {
|
|
16
|
+
const t = e.useContext(x), r = l ?? t.state ?? "helper", a = s ?? t.helperTextId;
|
|
17
|
+
return c("p", { ref: d, id: a, role: r === "error" ? "alert" : void 0, className: i("text-ds-sm", f[r], o), ...n });
|
|
18
|
+
});
|
|
19
|
+
u.displayName = "FormHelperText";
|
|
20
|
+
function C() {
|
|
42
21
|
return e.useContext(x);
|
|
43
22
|
}
|
|
44
23
|
export {
|
|
45
24
|
m as FormField,
|
|
46
25
|
x as FormFieldContext,
|
|
47
|
-
|
|
48
|
-
|
|
26
|
+
u as FormHelperText,
|
|
27
|
+
C as useFormField
|
|
49
28
|
};
|
package/dist/ui/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/ui/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAA;AAEpE,QAAA,MAAM,aAAa;;8EAsBlB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,EAC/D,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC,KAAK,CAAC,EAAE,UAAU,CAAA;IAClB,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC3B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B;AAED,QAAA,MAAM,KAAK,qFA6CV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAA"}
|
package/dist/ui/input.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
2
|
+
import { jsx as d, jsxs as m } from "react/jsx-runtime";
|
|
3
|
+
import * as p from "react";
|
|
4
|
+
import { cva as x } from "class-variance-authority";
|
|
5
|
+
import { cn as v } from "./lib/utils.js";
|
|
6
|
+
import { useFormField as g } from "./form.js";
|
|
7
|
+
const h = x([
|
|
7
8
|
"flex w-full font-sans",
|
|
8
9
|
"bg-field text-text-primary",
|
|
9
10
|
"border border-border rounded-ds-md",
|
|
@@ -22,12 +23,12 @@ const b = u([
|
|
|
22
23
|
}
|
|
23
24
|
},
|
|
24
25
|
defaultVariants: { size: "md" }
|
|
25
|
-
}),
|
|
26
|
-
const
|
|
27
|
-
return !
|
|
26
|
+
}), y = p.forwardRef(({ className: a, type: n, state: l, size: c, startIcon: e, endIcon: r, ...t }, u) => {
|
|
27
|
+
const s = g(), i = l ?? (s.state === "helper" ? void 0 : s.state), f = t["aria-describedby"] ?? s.helperTextId, b = t["aria-required"] ?? s.required, o = d("input", { type: n, className: v(h({ size: c }), e && "pl-ds-08", r && "pr-ds-08", i === "error" && "border-border-error focus-visible:ring-error", i === "warning" && "border-border-warning focus-visible:ring-warning", i === "success" && "border-border-success focus-visible:ring-success", a), "aria-invalid": i === "error" || void 0, "aria-describedby": f, "aria-required": b || void 0, ref: u, ...t });
|
|
28
|
+
return !e && !r ? o : m("div", { className: "relative flex items-center w-full", children: [e && d("span", { className: "absolute left-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: e }), o, r && d("span", { className: "absolute right-ds-03 flex items-center text-text-secondary pointer-events-none [&>svg]:h-ico-sm [&>svg]:w-ico-sm", children: r })] });
|
|
28
29
|
});
|
|
29
|
-
|
|
30
|
+
y.displayName = "Input";
|
|
30
31
|
export {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
y as Input,
|
|
33
|
+
h as inputVariants
|
|
33
34
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../src/ui/number-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"number-input.d.ts","sourceRoot":"","sources":["../../src/ui/number-input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,OAAO,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;IACjI,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,QAAA,MAAM,WAAW,2FAuFhB,CAAA;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/number-input.js
CHANGED
|
@@ -1,35 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import * as
|
|
4
|
-
import { IconMinus as
|
|
5
|
-
import { cn as
|
|
6
|
-
|
|
2
|
+
import { jsxs as I, jsx as c } from "react/jsx-runtime";
|
|
3
|
+
import * as w from "react";
|
|
4
|
+
import { IconMinus as y, IconPlus as v } from "@tabler/icons-react";
|
|
5
|
+
import { cn as E } from "./lib/utils.js";
|
|
6
|
+
import { useFormField as j } from "./form.js";
|
|
7
|
+
const h = w.forwardRef(
|
|
7
8
|
({
|
|
8
9
|
value: r = 0,
|
|
9
10
|
onValueChange: e,
|
|
10
|
-
min:
|
|
11
|
-
max:
|
|
12
|
-
step:
|
|
11
|
+
min: i = Number.MIN_SAFE_INTEGER,
|
|
12
|
+
max: o = Number.MAX_SAFE_INTEGER,
|
|
13
|
+
step: n = 1,
|
|
13
14
|
disabled: d = !1,
|
|
14
15
|
className: m,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
"aria-label": b,
|
|
17
|
+
...a
|
|
18
|
+
}, p) => {
|
|
19
|
+
const l = j(), f = b ?? (a.id || l.helperTextId ? void 0 : "Numeric value"), x = (s) => {
|
|
20
|
+
const t = parseInt(s.target.value, 10) || 0;
|
|
21
|
+
t >= i && t <= o && (e == null || e(t));
|
|
22
|
+
}, u = (s) => {
|
|
21
23
|
s.preventDefault();
|
|
22
|
-
const t = r +
|
|
23
|
-
t <=
|
|
24
|
-
},
|
|
24
|
+
const t = r + n;
|
|
25
|
+
t <= o && (e == null || e(t));
|
|
26
|
+
}, N = (s) => {
|
|
25
27
|
s.preventDefault();
|
|
26
|
-
const t = r -
|
|
27
|
-
t >=
|
|
28
|
+
const t = r - n;
|
|
29
|
+
t >= i && (e == null || e(t));
|
|
28
30
|
};
|
|
29
|
-
return /* @__PURE__ */
|
|
31
|
+
return /* @__PURE__ */ I(
|
|
30
32
|
"div",
|
|
31
33
|
{
|
|
32
|
-
className:
|
|
34
|
+
className: E(
|
|
33
35
|
"flex items-center justify-between rounded-ds-full border border-border",
|
|
34
36
|
m
|
|
35
37
|
),
|
|
@@ -38,37 +40,39 @@ const y = u.forwardRef(
|
|
|
38
40
|
"button",
|
|
39
41
|
{
|
|
40
42
|
type: "button",
|
|
41
|
-
onClick:
|
|
42
|
-
disabled: d || r <=
|
|
43
|
+
onClick: N,
|
|
44
|
+
disabled: d || r <= i,
|
|
43
45
|
"aria-label": "Decrease value",
|
|
44
46
|
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-text-placeholder transition-colors hover:text-text-secondary",
|
|
45
|
-
children: /* @__PURE__ */ c(
|
|
47
|
+
children: /* @__PURE__ */ c(y, { className: "h-ico-sm w-ico-sm" })
|
|
46
48
|
}
|
|
47
49
|
),
|
|
48
50
|
/* @__PURE__ */ c(
|
|
49
51
|
"input",
|
|
50
52
|
{
|
|
51
|
-
ref:
|
|
53
|
+
ref: p,
|
|
52
54
|
type: "number",
|
|
53
55
|
value: r,
|
|
54
|
-
onChange:
|
|
55
|
-
min:
|
|
56
|
-
max:
|
|
57
|
-
step:
|
|
56
|
+
onChange: x,
|
|
57
|
+
min: i,
|
|
58
|
+
max: o,
|
|
59
|
+
step: n,
|
|
58
60
|
disabled: d,
|
|
61
|
+
"aria-label": f,
|
|
62
|
+
"aria-describedby": a["aria-describedby"] ?? l.helperTextId,
|
|
59
63
|
className: "bg-transparent text-ds-base font-semibold w-ds-sm-plus border-0 text-center text-text-secondary [appearance:textfield] [&::-webkit-inner-spin-button]:appearance-none [&::-webkit-outer-spin-button]:appearance-none",
|
|
60
|
-
...
|
|
64
|
+
...a
|
|
61
65
|
}
|
|
62
66
|
),
|
|
63
67
|
/* @__PURE__ */ c(
|
|
64
68
|
"button",
|
|
65
69
|
{
|
|
66
70
|
type: "button",
|
|
67
|
-
onClick:
|
|
68
|
-
disabled: d || r >=
|
|
71
|
+
onClick: u,
|
|
72
|
+
disabled: d || r >= o,
|
|
69
73
|
"aria-label": "Increase value",
|
|
70
74
|
className: "flex h-ds-sm w-ds-sm items-center justify-center border-0 text-text-placeholder transition-colors hover:text-text-secondary",
|
|
71
|
-
children: /* @__PURE__ */ c(
|
|
75
|
+
children: /* @__PURE__ */ c(v, { className: "h-ico-sm w-ico-sm" })
|
|
72
76
|
}
|
|
73
77
|
)
|
|
74
78
|
]
|
|
@@ -76,7 +80,7 @@ const y = u.forwardRef(
|
|
|
76
80
|
);
|
|
77
81
|
}
|
|
78
82
|
);
|
|
79
|
-
|
|
83
|
+
h.displayName = "NumberInput";
|
|
80
84
|
export {
|
|
81
|
-
|
|
85
|
+
h as NumberInput
|
|
82
86
|
};
|