@jonmilner/ui 0.21.2 → 0.22.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/THIRD_PARTY_NOTICES.md +1 -1
- package/dist/AlertDialog/index.d.mts +1 -1
- package/dist/Avatar/index.d.mts +1 -1
- package/dist/Avatar/index.mjs +5 -5
- package/dist/Badge/index.d.mts +1 -1
- package/dist/Badge/index.mjs +12 -12
- package/dist/Box/index.mjs +1 -1
- package/dist/Button/index.d.mts +1 -1
- package/dist/Button/index.mjs +22 -22
- package/dist/Checkbox/index.mjs +7 -7
- package/dist/Chip/index.mjs +35 -35
- package/dist/Clickable/index.d.mts +1 -1
- package/dist/Clickable/index.mjs +4 -4
- package/dist/ColorField/client.mjs +6 -6
- package/dist/ColorField/index.mjs +14 -14
- package/dist/Combobox/Combobox.css +1 -1
- package/dist/Combobox/client.mjs +26 -26
- package/dist/Combobox/index.mjs +20 -20
- package/dist/Dialog/client.mjs +26 -26
- package/dist/Dialog/index.d.mts +1 -1
- package/dist/Dialog/index.mjs +19 -19
- package/dist/Field/client.mjs +6 -6
- package/dist/Field/index.mjs +29 -29
- package/dist/IconButton/IconButton.css +1 -1
- package/dist/IconButton/IconButton.css.mjs +2 -2
- package/dist/IconButton/index.d.mts +5 -2
- package/dist/IconButton/index.mjs +60 -21
- package/dist/Inline/index.d.mts +2 -2
- package/dist/Inline/index.mjs +4 -4
- package/dist/Menu/Menu.css +1 -1
- package/dist/Menu/Menu.css.mjs +2 -2
- package/dist/Menu/client.d.mts +1 -0
- package/dist/Menu/client.mjs +95 -53
- package/dist/Menu/index.d.mts +8 -0
- package/dist/Menu/index.mjs +123 -87
- package/dist/MultiSelect/MultiSelect.css +1 -1
- package/dist/MultiSelect/client.mjs +4 -4
- package/dist/MultiSelect/index.mjs +8 -8
- package/dist/NavList/NavList.css +1 -1
- package/dist/NavList/client.mjs +3 -3
- package/dist/NavList/index.d.mts +3 -3
- package/dist/NavList/index.mjs +67 -65
- package/dist/NumberField/index.mjs +17 -17
- package/dist/RadioGroup/index.mjs +23 -23
- package/dist/SearchField/client.mjs +13 -13
- package/dist/SearchField/index.mjs +16 -16
- package/dist/Select/Select.css +1 -1
- package/dist/Select/client.mjs +11 -11
- package/dist/Select/index.mjs +8 -8
- package/dist/Sidebar/index.d.mts +1 -1
- package/dist/Sidebar/index.mjs +21 -21
- package/dist/SidebarLayout/index.d.mts +1 -1
- package/dist/SidebarLayout/index.mjs +8 -8
- package/dist/Stack/index.d.mts +2 -2
- package/dist/Stack/index.mjs +4 -4
- package/dist/Switch/index.mjs +13 -13
- package/dist/Table/index.d.mts +1 -1
- package/dist/Table/index.mjs +59 -59
- package/dist/Tabs/index.mjs +26 -26
- package/dist/Tag/index.d.mts +1 -1
- package/dist/Tag/index.mjs +16 -16
- package/dist/Text/index.d.mts +2 -2
- package/dist/Text/index.mjs +4 -4
- package/dist/TextField/index.mjs +16 -16
- package/dist/Textarea/index.mjs +9 -9
- package/dist/Toast/client.d.mts +2 -1
- package/dist/Toast/client.mjs +62 -55
- package/dist/Tooltip/base.mjs +13 -13
- package/dist/contrast/contrast.d.mts +1 -1
- package/dist/contrast/contrast.mjs +9 -9
- package/dist/contrast/mixes.mjs +27 -27
- package/dist/docs/Combobox.md +1 -0
- package/dist/docs/IconButton.md +9 -1
- package/dist/docs/Menu.md +51 -3
- package/dist/docs/MultiSelect.md +1 -0
- package/dist/docs/NavList.md +2 -2
- package/dist/docs/Select.md +1 -0
- package/dist/docs/Toast.md +7 -0
- package/dist/docs/llms.txt +1 -1
- package/dist/docs/manifest.json +118 -1
- package/dist/docs/migrations/0.22.0.md +35 -0
- package/dist/icons/index.d.mts +3 -3
- package/dist/icons/index.mjs +33 -33
- package/dist/index.d.mts +16 -16
- package/dist/index.mjs +39 -39
- package/dist/lint/index.mjs +1 -0
- package/dist/popup/client.d.mts +1 -1
- package/dist/popup/client.mjs +49 -32
- package/dist/popup/direction.d.mts +1 -0
- package/dist/popup/direction.mjs +23 -0
- package/dist/popup/listbox-base.mjs +24 -24
- package/dist/popup/listbox-options.mjs +4 -4
- package/dist/popup/listbox-row.mjs +1 -0
- package/dist/popup/tooltip.d.mts +1 -0
- package/dist/popup/tooltip.mjs +48 -42
- package/dist/theme/define-theme.mjs +42 -42
- package/package.json +2 -2
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Lucide
|
|
4
4
|
|
|
5
|
-
The components exported from `@jonmilner/ui/icons` are generated from [Lucide](https://lucide.dev) icons (lucide-static 1.
|
|
5
|
+
The components exported from `@jonmilner/ui/icons` are generated from [Lucide](https://lucide.dev) icons (lucide-static 1.68.0). Lucide's license follows.
|
|
6
6
|
|
|
7
7
|
```text
|
|
8
8
|
ISC License
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "../Dialog/index.mjs";
|
|
2
1
|
import { DialogTrigger, DialogTriggerProps } from "../Dialog/client.mjs";
|
|
2
|
+
import "../Dialog/index.mjs";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
|
|
5
5
|
export type AlertDialogTriggerProps = DialogTriggerProps;
|
package/dist/Avatar/index.d.mts
CHANGED
package/dist/Avatar/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { join as t } from "../styles/join.mjs";
|
|
3
3
|
import { Text as n } from "../Text/index.mjs";
|
|
4
4
|
import { avatar as r, root as i } from "./Avatar.css.mjs";
|
|
5
5
|
import { fillFor as a, inkFor as o } from "./ink.mjs";
|
|
@@ -16,7 +16,7 @@ function m({ initials: d, label: m, color: h, hue: g, size: _ = "med", display:
|
|
|
16
16
|
backgroundColor: s.fill,
|
|
17
17
|
...l(E)
|
|
18
18
|
};
|
|
19
|
-
return /* @__PURE__ */ u(
|
|
19
|
+
return /* @__PURE__ */ u(e, {
|
|
20
20
|
...T,
|
|
21
21
|
alignItems: y,
|
|
22
22
|
"aria-label": m,
|
|
@@ -24,7 +24,7 @@ function m({ initials: d, label: m, color: h, hue: g, size: _ = "med", display:
|
|
|
24
24
|
as: "span",
|
|
25
25
|
backgroundColor: O ? "bgMuted" : void 0,
|
|
26
26
|
borderRadius: S,
|
|
27
|
-
className:
|
|
27
|
+
className: t(i, O && "o8rb9b1", E !== null && "o8rb9b6", r({ size: _ }), C),
|
|
28
28
|
color: O ? "fgMuted" : void 0,
|
|
29
29
|
display: v,
|
|
30
30
|
flexShrink: x,
|
|
@@ -36,7 +36,7 @@ function m({ initials: d, label: m, color: h, hue: g, size: _ = "med", display:
|
|
|
36
36
|
},
|
|
37
37
|
children: /* @__PURE__ */ u(n, {
|
|
38
38
|
as: "span",
|
|
39
|
-
className:
|
|
39
|
+
className: t(E !== null && "o8rb9b7", D !== null && (o(D) === "black" ? "o8rb9b9" : "o8rb9ba"), _ === "sm" && "o8rb9b8"),
|
|
40
40
|
font: "label",
|
|
41
41
|
size: p[_],
|
|
42
42
|
weight: "semibold",
|
package/dist/Badge/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { OmitEach } from "../types.mjs";
|
|
2
1
|
import { StyleProps } from "../Box/base.mjs";
|
|
3
2
|
import { IconSlotProps } from "../icon-slot/slot.mjs";
|
|
4
3
|
import { Tone } from "../styles/subtle-fills.mjs";
|
|
4
|
+
import { OmitEach } from "../types.mjs";
|
|
5
5
|
import { ComponentPropsWithRef } from "react";
|
|
6
6
|
export type BadgeOwnProps = IconSlotProps & {
|
|
7
7
|
size?: "xs" | "sm" | "med";
|
package/dist/Badge/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { slotIcons as t } from "../icon-slot/slot.mjs";
|
|
3
|
+
import { capped as n } from "../styles/capped.mjs";
|
|
4
|
+
import { join as r } from "../styles/join.mjs";
|
|
5
|
+
import { subtleFills as i } from "../styles/subtle-fills.mjs";
|
|
6
|
+
import { Text as a } from "../Text/index.mjs";
|
|
7
7
|
import { badge as o, root as s, slot as c } from "./Badge.css.mjs";
|
|
8
8
|
import { jsx as l } from "react/jsx-runtime";
|
|
9
9
|
// src/Badge/index.tsx
|
|
@@ -52,15 +52,15 @@ var u = {
|
|
|
52
52
|
paddingBlock: "6"
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
|
-
function f({ variant: f = "neutral", subtle: p = !1, size: m = "med", iconStart: h, iconEnd: g, display: _ = "inline-block", paddingInline: v = d[m].paddingInline, paddingBlock: y = d[m].paddingBlock, borderRadius: b = "xs", backgroundColor: x = (p ?
|
|
55
|
+
function f({ variant: f = "neutral", subtle: p = !1, size: m = "med", iconStart: h, iconEnd: g, display: _ = "inline-block", paddingInline: v = d[m].paddingInline, paddingBlock: y = d[m].paddingBlock, borderRadius: b = "xs", backgroundColor: x = (p ? i : u)[f].backgroundColor, color: S = (p ? i : u)[f].color, maxInlineSize: C, className: w, style: T, children: E, ...D }) {
|
|
56
56
|
if (E == null || typeof E == "boolean" || E === "") return null;
|
|
57
|
-
let O =
|
|
58
|
-
return /* @__PURE__ */ l(
|
|
57
|
+
let O = n(C, T);
|
|
58
|
+
return /* @__PURE__ */ l(e, {
|
|
59
59
|
...D,
|
|
60
60
|
as: "span",
|
|
61
61
|
backgroundColor: x,
|
|
62
62
|
borderRadius: b,
|
|
63
|
-
className:
|
|
63
|
+
className: r(s, o({
|
|
64
64
|
variant: f,
|
|
65
65
|
subtle: p,
|
|
66
66
|
size: m
|
|
@@ -71,7 +71,7 @@ function f({ variant: f = "neutral", subtle: p = !1, size: m = "med", iconStart:
|
|
|
71
71
|
paddingBlock: y,
|
|
72
72
|
paddingInline: v,
|
|
73
73
|
style: T,
|
|
74
|
-
children: /* @__PURE__ */ l(
|
|
74
|
+
children: /* @__PURE__ */ l(a, {
|
|
75
75
|
as: "span",
|
|
76
76
|
font: "label",
|
|
77
77
|
leading: d[m].leading,
|
|
@@ -79,7 +79,7 @@ function f({ variant: f = "neutral", subtle: p = !1, size: m = "med", iconStart:
|
|
|
79
79
|
truncate: O,
|
|
80
80
|
weight: "medium",
|
|
81
81
|
wrap: "nowrap",
|
|
82
|
-
children:
|
|
82
|
+
children: t({
|
|
83
83
|
iconStart: h,
|
|
84
84
|
iconEnd: g,
|
|
85
85
|
size: d[m].step,
|
package/dist/Box/index.mjs
CHANGED
package/dist/Button/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { PolymorphicProps } from "../types.mjs";
|
|
2
1
|
import { StyleProps } from "../Box/base.mjs";
|
|
3
2
|
import { ClickableOwnProps } from "../Clickable/index.mjs";
|
|
4
3
|
import { IconSlotProps } from "../icon-slot/slot.mjs";
|
|
4
|
+
import { PolymorphicProps } from "../types.mjs";
|
|
5
5
|
import { ElementType } from "react";
|
|
6
6
|
export type ButtonOwnProps = IconSlotProps & {
|
|
7
7
|
loading?: boolean;
|
package/dist/Button/index.mjs
CHANGED
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { Clickable as t } from "../Clickable/index.mjs";
|
|
3
|
+
import { Icon as n } from "../Icon/index.mjs";
|
|
4
|
+
import { iconGap as r } from "../icon-slot/gap.mjs";
|
|
5
|
+
import { fills as i } from "../styles/button-fills.mjs";
|
|
6
|
+
import { content as a, stack as o } from "../styles/button-parts.css.mjs";
|
|
7
|
+
import { controlHeight as s, controlText as c } from "../styles/control-size.mjs";
|
|
8
|
+
import { join as l } from "../styles/join.mjs";
|
|
9
9
|
import { Text as u } from "../Text/index.mjs";
|
|
10
10
|
import { button as d, content as f, root as p, stack as m } from "./Button.css.mjs";
|
|
11
11
|
import { jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
12
12
|
// src/Button/index.tsx
|
|
13
13
|
var _ = {
|
|
14
14
|
sm: {
|
|
15
|
-
minBlockSize:
|
|
15
|
+
minBlockSize: s.sm,
|
|
16
16
|
paddingBlock: "4",
|
|
17
17
|
paddingInline: "8"
|
|
18
18
|
},
|
|
19
19
|
med: {
|
|
20
|
-
minBlockSize:
|
|
20
|
+
minBlockSize: s.med,
|
|
21
21
|
paddingBlock: "6",
|
|
22
22
|
paddingInline: "12"
|
|
23
23
|
},
|
|
24
24
|
lg: {
|
|
25
|
-
minBlockSize:
|
|
25
|
+
minBlockSize: s.lg,
|
|
26
26
|
paddingBlock: "8",
|
|
27
27
|
paddingInline: "16"
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
function v({ variant:
|
|
31
|
-
let P = y || String(M) === "true", F = N, I =
|
|
32
|
-
return /* @__PURE__ */ h(
|
|
30
|
+
function v({ variant: s = "secondary", size: v = "med", loading: y = !1, uppercase: b = !1, iconStart: x, iconEnd: S, minBlockSize: C = _[v].minBlockSize, paddingBlock: w = _[v].paddingBlock, paddingInline: T = _[v].paddingInline, gap: E = r[c[v]], borderRadius: D = "sm", backgroundColor: O = i[s].backgroundColor, color: k = i[s].color, className: A, children: j, "aria-busy": M, ...N }) {
|
|
31
|
+
let P = y || String(M) === "true", F = N, I = c[v];
|
|
32
|
+
return /* @__PURE__ */ h(t, {
|
|
33
33
|
...F,
|
|
34
34
|
backgroundColor: O,
|
|
35
35
|
borderRadius: D,
|
|
36
36
|
busy: P,
|
|
37
|
-
className:
|
|
38
|
-
variant:
|
|
37
|
+
className: l(p, d({
|
|
38
|
+
variant: s,
|
|
39
39
|
size: v
|
|
40
40
|
}), A),
|
|
41
41
|
color: k,
|
|
42
42
|
minBlockSize: C,
|
|
43
43
|
paddingBlock: w,
|
|
44
44
|
paddingInline: T,
|
|
45
|
-
children: /* @__PURE__ */ g(
|
|
45
|
+
children: /* @__PURE__ */ g(e, {
|
|
46
46
|
alignItems: "center",
|
|
47
47
|
as: "span",
|
|
48
|
-
className:
|
|
48
|
+
className: l(m, o),
|
|
49
49
|
display: "grid",
|
|
50
|
-
children: [/* @__PURE__ */ g(
|
|
50
|
+
children: [/* @__PURE__ */ g(e, {
|
|
51
51
|
alignItems: "center",
|
|
52
52
|
as: "span",
|
|
53
|
-
className:
|
|
53
|
+
className: l(f, a),
|
|
54
54
|
display: "flex",
|
|
55
55
|
gap: E,
|
|
56
56
|
children: [
|
|
57
57
|
x && /* @__PURE__ */ h(x, { size: I }),
|
|
58
58
|
j != null && j !== !1 && j !== "" && /* @__PURE__ */ h(u, {
|
|
59
59
|
as: "span",
|
|
60
|
-
className:
|
|
60
|
+
className: l(b && "hkhd89", "_1gwwloa2"),
|
|
61
61
|
font: "label",
|
|
62
62
|
size: I,
|
|
63
63
|
weight: "medium",
|
|
@@ -65,7 +65,7 @@ function v({ variant: c = "secondary", size: v = "med", loading: y = !1, upperca
|
|
|
65
65
|
}),
|
|
66
66
|
S && /* @__PURE__ */ h(S, { size: I })
|
|
67
67
|
]
|
|
68
|
-
}), P && /* @__PURE__ */ g(
|
|
68
|
+
}), P && /* @__PURE__ */ g(n, {
|
|
69
69
|
className: "hkhd8d",
|
|
70
70
|
fill: "currentColor",
|
|
71
71
|
size: I,
|
package/dist/Checkbox/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { join as t } from "../styles/join.mjs";
|
|
3
|
+
import { splitStyleProps as n } from "../styles/split-style-props.mjs";
|
|
4
4
|
import { box as r, dash as i, mark as a, root as o, tick as s } from "./Checkbox.css.mjs";
|
|
5
5
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
6
6
|
import { Checkbox as u } from "@base-ui/react/checkbox";
|
|
7
7
|
// src/Checkbox/index.tsx
|
|
8
8
|
function d({ display: d = "inline-flex", alignItems: f = "center", justifyContent: p = "center", flexShrink: m = 0, minInlineSize: h = "xs", minBlockSize: g = "xs", className: _, style: v, ...y }) {
|
|
9
|
-
let [b, x] =
|
|
9
|
+
let [b, x] = n(y);
|
|
10
10
|
return /* @__PURE__ */ c(u.Root, {
|
|
11
11
|
...x,
|
|
12
|
-
render: /* @__PURE__ */ c(
|
|
12
|
+
render: /* @__PURE__ */ c(e, {
|
|
13
13
|
as: "span",
|
|
14
14
|
display: d,
|
|
15
15
|
alignItems: f,
|
|
@@ -18,10 +18,10 @@ function d({ display: d = "inline-flex", alignItems: f = "center", justifyConten
|
|
|
18
18
|
minInlineSize: h,
|
|
19
19
|
minBlockSize: g,
|
|
20
20
|
...b,
|
|
21
|
-
className:
|
|
21
|
+
className: t(o, _),
|
|
22
22
|
style: v
|
|
23
23
|
}),
|
|
24
|
-
children: /* @__PURE__ */ c(
|
|
24
|
+
children: /* @__PURE__ */ c(e, {
|
|
25
25
|
as: "span",
|
|
26
26
|
className: r,
|
|
27
27
|
children: /* @__PURE__ */ l(u.Indicator, {
|
package/dist/Chip/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { Clickable as t } from "../Clickable/index.mjs";
|
|
3
|
+
import { slotIcons as n } from "../icon-slot/slot.mjs";
|
|
4
|
+
import { CheckIcon as r } from "../icons/CheckIcon.mjs";
|
|
5
|
+
import { join as i } from "../styles/join.mjs";
|
|
6
|
+
import { splitStyleProps as a } from "../styles/split-style-props.mjs";
|
|
7
|
+
import { Text as o } from "../Text/index.mjs";
|
|
8
8
|
import { check as s, chip as c, own as l, root as u, slot as d } from "./Chip.css.mjs";
|
|
9
9
|
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
10
|
import { Toggle as h } from "@base-ui/react/toggle";
|
|
@@ -22,45 +22,45 @@ var _ = {
|
|
|
22
22
|
paddingInline: "12"
|
|
23
23
|
}
|
|
24
24
|
}, v = /* @__PURE__ */ new WeakMap();
|
|
25
|
-
function y({ className:
|
|
26
|
-
return /* @__PURE__ */ p(
|
|
27
|
-
...
|
|
28
|
-
className:
|
|
25
|
+
function y({ className: e, ...t }) {
|
|
26
|
+
return /* @__PURE__ */ p(r, {
|
|
27
|
+
...t,
|
|
28
|
+
className: i(s, e)
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
|
-
function b(
|
|
32
|
-
if (!
|
|
33
|
-
let
|
|
34
|
-
return
|
|
35
|
-
...
|
|
36
|
-
className:
|
|
37
|
-
}), /* @__PURE__ */ p(
|
|
38
|
-
...
|
|
39
|
-
className:
|
|
40
|
-
})] }), v.set(
|
|
31
|
+
function b(e) {
|
|
32
|
+
if (!e) return y;
|
|
33
|
+
let t = v.get(e);
|
|
34
|
+
return t || (t = ({ className: t, ...n }) => /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(y, {
|
|
35
|
+
...n,
|
|
36
|
+
className: t
|
|
37
|
+
}), /* @__PURE__ */ p(e, {
|
|
38
|
+
...n,
|
|
39
|
+
className: i(l, t)
|
|
40
|
+
})] }), v.set(e, t)), t;
|
|
41
41
|
}
|
|
42
|
-
function x({ size:
|
|
43
|
-
let [E, D] =
|
|
42
|
+
function x({ size: e = "med", disabled: r = !1, iconStart: s, iconEnd: l, children: f, minBlockSize: m = _[e].minBlockSize, paddingBlock: g = _[e].paddingBlock, paddingInline: v = _[e].paddingInline, borderRadius: y = "full", backgroundColor: x = "bg", color: S = "fg", className: C, style: w, ...T }) {
|
|
43
|
+
let [E, D] = a(T);
|
|
44
44
|
return /* @__PURE__ */ p(h, {
|
|
45
45
|
...D,
|
|
46
|
-
render: /* @__PURE__ */ p(
|
|
46
|
+
render: /* @__PURE__ */ p(t, {
|
|
47
47
|
backgroundColor: x,
|
|
48
48
|
borderRadius: y,
|
|
49
49
|
color: S,
|
|
50
|
-
disabled:
|
|
50
|
+
disabled: r,
|
|
51
51
|
minBlockSize: m,
|
|
52
52
|
paddingBlock: g,
|
|
53
53
|
paddingInline: v,
|
|
54
54
|
...E,
|
|
55
|
-
className:
|
|
55
|
+
className: i(u, c({ size: e }), C),
|
|
56
56
|
style: w
|
|
57
57
|
}),
|
|
58
|
-
children: /* @__PURE__ */ p(
|
|
58
|
+
children: /* @__PURE__ */ p(o, {
|
|
59
59
|
as: "span",
|
|
60
60
|
font: "label",
|
|
61
61
|
size: "sm",
|
|
62
62
|
weight: "medium",
|
|
63
|
-
children:
|
|
63
|
+
children: n({
|
|
64
64
|
iconStart: b(s),
|
|
65
65
|
iconEnd: l,
|
|
66
66
|
size: "sm",
|
|
@@ -70,16 +70,16 @@ function x({ size: n = "med", disabled: o = !1, iconStart: s, iconEnd: l, childr
|
|
|
70
70
|
})
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
function S({ orientation:
|
|
74
|
-
let [d, f] =
|
|
73
|
+
function S({ orientation: t = "horizontal", display: n = "flex", flexDirection: r = t === "vertical" ? "column" : "row", flexWrap: i = "wrap", alignItems: o = t === "vertical" ? "start" : "center", gap: s = "8", className: c, style: l, ...u }) {
|
|
74
|
+
let [d, f] = a(u);
|
|
75
75
|
return /* @__PURE__ */ p(g, {
|
|
76
76
|
...f,
|
|
77
|
-
orientation:
|
|
78
|
-
render: /* @__PURE__ */ p(
|
|
77
|
+
orientation: t,
|
|
78
|
+
render: /* @__PURE__ */ p(e, {
|
|
79
79
|
alignItems: o,
|
|
80
|
-
display:
|
|
81
|
-
flexDirection:
|
|
82
|
-
flexWrap:
|
|
80
|
+
display: n,
|
|
81
|
+
flexDirection: r,
|
|
82
|
+
flexWrap: i,
|
|
83
83
|
gap: s,
|
|
84
84
|
...d,
|
|
85
85
|
className: c,
|
package/dist/Clickable/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { Box as e } from "../Box/base.mjs";
|
|
3
|
+
import { join as t } from "../styles/join.mjs";
|
|
4
4
|
import { root as n } from "./Clickable.css.mjs";
|
|
5
5
|
import { jsx as r } from "react/jsx-runtime";
|
|
6
6
|
// src/Clickable/index.tsx
|
|
@@ -8,7 +8,7 @@ function i({ as: i, disabled: a = !1, busy: o = !1, display: s = "inline-flex",
|
|
|
8
8
|
let m = i ?? "button", { onClick: h, onAuxClick: g, "aria-disabled": _, "aria-busy": v, ...y } = p, b = a || String(_) === "true", x = o || String(v) === "true", S = (e) => (t) => {
|
|
9
9
|
b || x ? t.preventDefault() : e?.(t);
|
|
10
10
|
};
|
|
11
|
-
return /* @__PURE__ */ r(
|
|
11
|
+
return /* @__PURE__ */ r(e, {
|
|
12
12
|
alignItems: c,
|
|
13
13
|
as: m,
|
|
14
14
|
display: s,
|
|
@@ -19,7 +19,7 @@ function i({ as: i, disabled: a = !1, busy: o = !1, display: s = "inline-flex",
|
|
|
19
19
|
...y,
|
|
20
20
|
"aria-busy": x || void 0,
|
|
21
21
|
"aria-disabled": b || void 0,
|
|
22
|
-
className:
|
|
22
|
+
className: t(n, f),
|
|
23
23
|
onAuxClick: S(g),
|
|
24
24
|
onClick: S(h)
|
|
25
25
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { Box as e } from "../Box/base.mjs";
|
|
3
|
+
import { controlText as t } from "../styles/control-size.mjs";
|
|
4
|
+
import { join as n } from "../styles/join.mjs";
|
|
5
5
|
import { Text as r } from "../Text/index.mjs";
|
|
6
6
|
import { input as i, slot as a, swatch as o } from "./ColorField.css.mjs";
|
|
7
7
|
import { useState as s } from "react";
|
|
@@ -13,7 +13,7 @@ function p({ value: d, defaultValue: p, onValueChange: m, placeholder: h, size:
|
|
|
13
13
|
let [T, E] = s(p), D = d ?? T, O = (e) => {
|
|
14
14
|
d === void 0 && E(e), m?.(e);
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ l(
|
|
16
|
+
return /* @__PURE__ */ l(e, {
|
|
17
17
|
alignItems: "center",
|
|
18
18
|
display: "grid",
|
|
19
19
|
children: [
|
|
@@ -34,8 +34,8 @@ function p({ value: d, defaultValue: p, onValueChange: m, placeholder: h, size:
|
|
|
34
34
|
placeholder: h,
|
|
35
35
|
render: /* @__PURE__ */ c(r, {
|
|
36
36
|
as: "input",
|
|
37
|
-
className:
|
|
38
|
-
size:
|
|
37
|
+
className: n(i({ size: g }), C && a.roomStart[g], w && a.roomEnd[g]),
|
|
38
|
+
size: t[g]
|
|
39
39
|
}),
|
|
40
40
|
required: v,
|
|
41
41
|
type: "text",
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Field as e } from "../Field/index.mjs";
|
|
2
|
+
import { InputIcons as t } from "../icon-slot/input-icons.mjs";
|
|
3
|
+
import { controlText as n } from "../styles/control-size.mjs";
|
|
4
|
+
import { ColorFieldControl as r } from "./client.mjs";
|
|
5
|
+
import { hiddenLabel as i, slot as a } from "./ColorField.css.mjs";
|
|
6
6
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
7
|
// src/ColorField/index.tsx
|
|
8
8
|
function c({ label: c, hideLabel: l = !1, iconStart: u, iconEnd: d, value: f, defaultValue: p = "", onValueChange: m, placeholder: h, description: g, error: _, size: v = "med", disabled: y = !1, required: b = !1, name: x, swatchLabel: S = "Pick colour", inputProps: C, className: w, style: T, ...E }) {
|
|
9
|
-
return /* @__PURE__ */ s(
|
|
9
|
+
return /* @__PURE__ */ s(e, {
|
|
10
10
|
...E,
|
|
11
11
|
className: w,
|
|
12
12
|
disabled: y,
|
|
13
13
|
invalid: _ != null && _ !== !1 && _ !== "",
|
|
14
14
|
style: T,
|
|
15
15
|
children: [
|
|
16
|
-
/* @__PURE__ */ o(
|
|
17
|
-
className: l ?
|
|
16
|
+
/* @__PURE__ */ o(e.Label, {
|
|
17
|
+
className: l ? i : void 0,
|
|
18
18
|
children: c
|
|
19
19
|
}),
|
|
20
|
-
/* @__PURE__ */ o(
|
|
20
|
+
/* @__PURE__ */ o(r, {
|
|
21
21
|
defaultValue: p,
|
|
22
22
|
disabled: y,
|
|
23
23
|
hasIconEnd: d != null,
|
|
24
24
|
hasIconStart: u != null,
|
|
25
|
-
icons: u || d ? /* @__PURE__ */ o(
|
|
25
|
+
icons: u || d ? /* @__PURE__ */ o(t, {
|
|
26
26
|
iconEnd: d,
|
|
27
27
|
iconStart: u,
|
|
28
28
|
size: v,
|
|
29
|
-
step:
|
|
30
|
-
styles:
|
|
29
|
+
step: n[v],
|
|
30
|
+
styles: a
|
|
31
31
|
}) : void 0,
|
|
32
32
|
inputProps: C,
|
|
33
33
|
name: x,
|
|
@@ -38,8 +38,8 @@ function c({ label: c, hideLabel: l = !1, iconStart: u, iconEnd: d, value: f, de
|
|
|
38
38
|
swatchLabel: S,
|
|
39
39
|
value: f
|
|
40
40
|
}),
|
|
41
|
-
g != null && /* @__PURE__ */ o(
|
|
42
|
-
/* @__PURE__ */ o(
|
|
41
|
+
g != null && /* @__PURE__ */ o(e.Description, { children: g }),
|
|
42
|
+
/* @__PURE__ */ o(e.Error, { children: _ })
|
|
43
43
|
]
|
|
44
44
|
});
|
|
45
45
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
@layer tokens, reset, atoms.base, atoms.sm, atoms.med, atoms.lg, atoms.xl, components.box, components.checkbox, components.clickable, components.icon, components.icon-button, components.inline, components.sidebar, components.sidebar-layout, components.stack, components.text, components.avatar, components.badge, components.button, components.chip, components.field, components.color-field, components.combobox, components.heading, components.dialog, components.alert-dialog, components.menu, components.multiselect, components.number-field, components.radio-group, components.search-field, components.select, components.switch, components.tabs, components.tag, components.text-field, components.textarea, components.toast, components.tooltip, components.visually-hidden, components.nav-list, components.table;
|
|
2
|
-
@layer components.combobox{.y6b2yi0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.y6b2yi1{text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(.y6b2yi1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(.y6b2yi1) ._1gwwloa1{min-inline-size:0}:where(.y6b2yi1) ._1gwwloa2{flex:auto;min-inline-size:0}.y6b2yi2{min-inline-size:0;display:block}.y6b2yi2[data-placeholder]{color:var(--color-fg-muted)}.y6b2yi3{min-inline-size:0;display:grid}.y6b2yi4{grid-area:1/1}.y6b2yi4[aria-hidden=true]{visibility:hidden}.y6b2yi5{grid-area:1/1}.y6b2yi6{border:var(--space-1) solid var(--color-border);min-inline-size:var(--anchor-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);gap:var(--space-4);flex-direction:column;display:flex;overflow:hidden}.y6b2yi6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi6[data-starting-style],.y6b2yi6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.y6b2yi7{appearance:none;border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);border-radius:var(--radius-xs);background-color:var(--color-bg);inline-size:100%;min-inline-size:0;color:var(--color-fg);padding-block:0}.y6b2yi7::placeholder{color:var(--color-fg-muted);opacity:1}.y6b2yi7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi7:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;border-style:dashed}.y6b2yi7[aria-invalid=true]{border-color:var(--color-danger)}.y6b2yi8{block-size:var(--size-xs);padding-inline:var(--space-6)}.y6b2yi9{block-size:var(--size-sm);padding-inline:var(--space-8)}.y6b2yia{block-size:var(--size-med);padding-inline:var(--space-12)}.y6b2yib:empty{position:absolute}.y6b2yib:not(:empty){padding-block:var(--space-8);padding-inline:var(--space-12)}.y6b2yic{min-block-size:0;overflow-y:auto}.y6b2yid{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.y6b2yid:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.y6b2yid[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}.y6b2yid[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}.y6b2yie{visibility:hidden;flex-shrink:0}.y6b2yid[aria-selected=true] .y6b2yie{visibility:visible}@media (pointer:coarse){.y6b2yi7{font-size:var(--font-size-med)}}@media (forced-colors:active){.y6b2yi1{--color-fg:CanvasText}.y6b2yi1[aria-disabled=true]{border-color:graytext}.y6b2yi7:disabled{color:graytext;border-color:graytext}.y6b2yid[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}.y6b2yid[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}.y6b2yid[aria-disabled=true]{color:graytext}}@supports (text-box:trim-both cap alphabetic){.y6b2yi4,.y6b2yi5{text-box-trim:trim-both}.y6b2yi7{text-box-trim:none}}}
|
|
2
|
+
@layer components.combobox{.y6b2yi0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.y6b2yi1{text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(.y6b2yi1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(.y6b2yi1) ._1gwwloa1{min-inline-size:0}:where(.y6b2yi1) ._1gwwloa2{flex:auto;min-inline-size:0}.y6b2yi2{min-inline-size:0;display:block}.y6b2yi2[data-placeholder]{color:var(--color-fg-muted)}.y6b2yi3{min-inline-size:0;display:grid}.y6b2yi4{grid-area:1/1}.y6b2yi4[aria-hidden=true]{visibility:hidden}.y6b2yi5{grid-area:1/1}.y6b2yi6{border:var(--space-1) solid var(--color-border);min-inline-size:min(var(--anchor-width), var(--available-width));max-inline-size:var(--available-width);max-block-size:var(--available-height);transform-origin:var(--transform-origin);transition:opacity var(--duration-fast) var(--easing-standard), scale var(--duration-fast) var(--easing-enter);gap:var(--space-4);flex-direction:column;display:flex;overflow:hidden}.y6b2yi6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi6[data-starting-style],.y6b2yi6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.y6b2yi7{appearance:none;border-width:var(--space-1);border-style:solid;border-color:var(--color-border-strong);border-radius:var(--radius-xs);background-color:var(--color-bg);inline-size:100%;min-inline-size:0;color:var(--color-fg);padding-block:0}.y6b2yi7::placeholder{color:var(--color-fg-muted);opacity:1}.y6b2yi7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.y6b2yi7:disabled{background-color:var(--color-bg-muted);color:var(--color-fg-muted);cursor:not-allowed;border-style:dashed}.y6b2yi7[aria-invalid=true]{border-color:var(--color-danger)}.y6b2yi8{block-size:var(--size-xs);padding-inline:var(--space-6)}.y6b2yi9{block-size:var(--size-sm);padding-inline:var(--space-8)}.y6b2yia{block-size:var(--size-med);padding-inline:var(--space-12)}.y6b2yib:empty{position:absolute}.y6b2yib:not(:empty){padding-block:var(--space-8);padding-inline:var(--space-12)}.y6b2yic{min-block-size:0;overflow-y:auto}.y6b2yid{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;overflow-wrap:anywhere;-webkit-user-select:none;user-select:none}.y6b2yid:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.y6b2yid[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}.y6b2yid[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}.y6b2yie{visibility:hidden;flex-shrink:0}.y6b2yid[aria-selected=true] .y6b2yie{visibility:visible}@media (pointer:coarse){.y6b2yi7{font-size:var(--font-size-med)}}@media (forced-colors:active){.y6b2yi1{--color-fg:CanvasText}.y6b2yi1[aria-disabled=true]{border-color:graytext}.y6b2yi7:disabled{color:graytext;border-color:graytext}.y6b2yid[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}.y6b2yid[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}.y6b2yid[aria-disabled=true]{color:graytext}}@supports (text-box:trim-both cap alphabetic){.y6b2yi4,.y6b2yi5{text-box-trim:trim-both}.y6b2yi7{text-box-trim:none}}}
|
package/dist/Combobox/client.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Box as e } from "../Box/base.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { CheckIcon as t } from "../icons/CheckIcon.mjs";
|
|
4
4
|
import { usePopupScope as n, useRecordOpenChange as r } from "../popup/client.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { listboxPlacement as i, listboxPopupBox as a, listboxTriggerLook as o, renderListboxPositioner as s, useListboxLabelId as c } from "../popup/listbox-base.mjs";
|
|
6
|
+
import { listboxRow as l } from "../popup/listbox-row.mjs";
|
|
7
|
+
import { ListboxSummary as u } from "../popup/listbox-summary.mjs";
|
|
8
|
+
import { Text as d } from "../Text/index.mjs";
|
|
9
9
|
import { check as f, count as p, item as m, labels as h, list as g, popup as _, summary as v, trigger as y, value as b } from "./Combobox.css.mjs";
|
|
10
10
|
import { createContext as x, use as S, useMemo as C, useState as w } from "react";
|
|
11
11
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
@@ -50,32 +50,32 @@ function A({ children: e, defaultValue: t, multiple: n, onValueChange: i, option
|
|
|
50
50
|
})
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function j({ countLabel:
|
|
54
|
-
let { ref:
|
|
53
|
+
function j({ countLabel: t, disabled: r, placeholder: i, size: a }) {
|
|
54
|
+
let { ref: s } = n(), { labelOf: c } = S(O);
|
|
55
55
|
return /* @__PURE__ */ T(D.Trigger, {
|
|
56
|
-
disabled:
|
|
57
|
-
ref:
|
|
58
|
-
render:
|
|
56
|
+
disabled: r,
|
|
57
|
+
ref: s,
|
|
58
|
+
render: o({
|
|
59
59
|
className: y,
|
|
60
|
-
size:
|
|
60
|
+
size: a,
|
|
61
61
|
children: /* @__PURE__ */ T(D.Value, { children: (n) => {
|
|
62
|
-
let
|
|
62
|
+
let r = k(n);
|
|
63
63
|
return /* @__PURE__ */ T(e, {
|
|
64
64
|
as: "span",
|
|
65
65
|
className: b,
|
|
66
|
-
"data-placeholder":
|
|
67
|
-
children:
|
|
66
|
+
"data-placeholder": r.length === 0 ? "" : void 0,
|
|
67
|
+
children: r.length === 0 ? i : typeof n == "string" ? /* @__PURE__ */ T(d, {
|
|
68
68
|
as: "span",
|
|
69
69
|
truncate: "box",
|
|
70
|
-
children:
|
|
71
|
-
}) : /* @__PURE__ */ T(
|
|
70
|
+
children: c(n)
|
|
71
|
+
}) : /* @__PURE__ */ T(u, {
|
|
72
72
|
classNames: {
|
|
73
73
|
count: p,
|
|
74
74
|
labels: h,
|
|
75
75
|
summary: v
|
|
76
76
|
},
|
|
77
|
-
count:
|
|
78
|
-
labels:
|
|
77
|
+
count: t.replaceAll("{count}", String(r.length)),
|
|
78
|
+
labels: r.map(c)
|
|
79
79
|
})
|
|
80
80
|
});
|
|
81
81
|
} })
|
|
@@ -91,33 +91,33 @@ function M({ children: e }) {
|
|
|
91
91
|
}
|
|
92
92
|
function N({ children: e }) {
|
|
93
93
|
return /* @__PURE__ */ T(D.Positioner, {
|
|
94
|
-
...
|
|
95
|
-
render:
|
|
94
|
+
...i,
|
|
95
|
+
render: s,
|
|
96
96
|
children: e
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
function P({ children: e }) {
|
|
100
100
|
return /* @__PURE__ */ T(D.Popup, {
|
|
101
|
-
"aria-labelledby":
|
|
102
|
-
render:
|
|
101
|
+
"aria-labelledby": c(),
|
|
102
|
+
render: a(_),
|
|
103
103
|
children: e
|
|
104
104
|
});
|
|
105
105
|
}
|
|
106
106
|
function F() {
|
|
107
107
|
let { labelOf: e, option: n } = S(O);
|
|
108
108
|
return /* @__PURE__ */ T(D.List, {
|
|
109
|
-
"aria-labelledby":
|
|
109
|
+
"aria-labelledby": c(),
|
|
110
110
|
className: g,
|
|
111
111
|
children: (r) => /* @__PURE__ */ E(D.Item, {
|
|
112
112
|
disabled: n(r).disabled,
|
|
113
|
-
render:
|
|
113
|
+
render: l(m),
|
|
114
114
|
value: r,
|
|
115
|
-
children: [/* @__PURE__ */ T(
|
|
115
|
+
children: [/* @__PURE__ */ T(d, {
|
|
116
116
|
as: "span",
|
|
117
117
|
font: "label",
|
|
118
118
|
size: "sm",
|
|
119
119
|
children: e(r)
|
|
120
|
-
}), /* @__PURE__ */ T(
|
|
120
|
+
}), /* @__PURE__ */ T(t, {
|
|
121
121
|
className: f,
|
|
122
122
|
size: "sm"
|
|
123
123
|
})]
|