@jonmilner/ui 0.21.1 → 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/ColorField.css +1 -1
- 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/NumberField.css +1 -1
- package/dist/NumberField/index.mjs +17 -17
- package/dist/RadioGroup/index.mjs +23 -23
- package/dist/SearchField/SearchField.css +1 -1
- 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/TextField.css +1 -1
- package/dist/TextField/index.mjs +16 -16
- package/dist/Textarea/Textarea.css +1 -1
- 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/dist/Select/client.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useRecordOpenChange as e } from "../popup/client.mjs";
|
|
3
|
+
import { ListboxTrigger as t } from "../popup/listbox.mjs";
|
|
4
|
+
import { Text as n } from "../Text/index.mjs";
|
|
5
5
|
import { trigger as r, value as i } from "./Select.css.mjs";
|
|
6
6
|
import { useMemo as a } from "react";
|
|
7
7
|
import { jsx as o } from "react/jsx-runtime";
|
|
8
8
|
import { Select as s } from "@base-ui/react/select";
|
|
9
9
|
// src/Select/client.tsx
|
|
10
|
-
function c({ options:
|
|
11
|
-
let f = a(() => new Map(
|
|
12
|
-
return /* @__PURE__ */ o(
|
|
10
|
+
function c({ options: e, placeholder: c, disabled: l, iconStart: u, size: d }) {
|
|
11
|
+
let f = a(() => new Map(e.map((e) => [e.value, e.label])), [e]);
|
|
12
|
+
return /* @__PURE__ */ o(t, {
|
|
13
13
|
className: r,
|
|
14
14
|
disabled: l,
|
|
15
15
|
iconStart: u,
|
|
@@ -17,18 +17,18 @@ function c({ options: t, placeholder: c, disabled: l, iconStart: u, size: d }) {
|
|
|
17
17
|
children: /* @__PURE__ */ o(s.Value, {
|
|
18
18
|
className: i,
|
|
19
19
|
placeholder: c,
|
|
20
|
-
children: (
|
|
20
|
+
children: (e) => /* @__PURE__ */ o(n, {
|
|
21
21
|
as: "span",
|
|
22
22
|
truncate: "box",
|
|
23
|
-
children:
|
|
23
|
+
children: e === null || e === "" ? c : f.get(e) ?? e
|
|
24
24
|
})
|
|
25
25
|
})
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
function l(
|
|
28
|
+
function l(t) {
|
|
29
29
|
return /* @__PURE__ */ o(s.Root, {
|
|
30
|
-
...
|
|
31
|
-
onOpenChange:
|
|
30
|
+
...t,
|
|
31
|
+
onOpenChange: e()
|
|
32
32
|
});
|
|
33
33
|
}
|
|
34
34
|
export { l as SelectRoot, c as SelectTrigger };
|
package/dist/Select/index.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import { Field as e } from "../Field/index.mjs";
|
|
|
2
2
|
import { ListboxLabel as t, ListboxScope as n } from "../popup/listbox-base.mjs";
|
|
3
3
|
import { ListboxPopup as r, ListboxPortal as i, ListboxPositioner as a } from "../popup/listbox.mjs";
|
|
4
4
|
import { ListboxOptions as o } from "../popup/listbox-options.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { SelectRoot as s, SelectTrigger as c } from "./client.mjs";
|
|
6
|
+
import { check as l, hiddenLabel as u, item as d, popup as f } from "./Select.css.mjs";
|
|
7
7
|
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
8
8
|
// src/Select/index.tsx
|
|
9
9
|
function h({ options: h, value: g, defaultValue: _, onValueChange: v, label: y, hideLabel: b = !1, iconStart: x, description: S, error: C, placeholder: w = "Select", disabled: T = !1, required: E = !1, size: D = "med", name: O, className: k, style: A, ...j }) {
|
|
@@ -14,7 +14,7 @@ function h({ options: h, value: g, defaultValue: _, onValueChange: v, label: y,
|
|
|
14
14
|
invalid: C != null && C !== !1 && C !== "",
|
|
15
15
|
style: A,
|
|
16
16
|
children: [
|
|
17
|
-
/* @__PURE__ */ p(n, { children: /* @__PURE__ */ m(
|
|
17
|
+
/* @__PURE__ */ p(n, { children: /* @__PURE__ */ m(s, {
|
|
18
18
|
defaultValue: _,
|
|
19
19
|
disabled: T,
|
|
20
20
|
name: O,
|
|
@@ -23,10 +23,10 @@ function h({ options: h, value: g, defaultValue: _, onValueChange: v, label: y,
|
|
|
23
23
|
value: g,
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ p(t, {
|
|
26
|
-
className: b ?
|
|
26
|
+
className: b ? u : void 0,
|
|
27
27
|
children: y
|
|
28
28
|
}),
|
|
29
|
-
/* @__PURE__ */ p(
|
|
29
|
+
/* @__PURE__ */ p(c, {
|
|
30
30
|
disabled: T,
|
|
31
31
|
iconStart: x,
|
|
32
32
|
options: h,
|
|
@@ -34,10 +34,10 @@ function h({ options: h, value: g, defaultValue: _, onValueChange: v, label: y,
|
|
|
34
34
|
size: D
|
|
35
35
|
}),
|
|
36
36
|
/* @__PURE__ */ p(i, { children: /* @__PURE__ */ p(a, { children: /* @__PURE__ */ p(r, {
|
|
37
|
-
className:
|
|
37
|
+
className: f,
|
|
38
38
|
children: /* @__PURE__ */ p(o, {
|
|
39
|
-
checkClassName:
|
|
40
|
-
itemClassName:
|
|
39
|
+
checkClassName: l,
|
|
40
|
+
itemClassName: d,
|
|
41
41
|
options: h
|
|
42
42
|
})
|
|
43
43
|
}) }) })
|
package/dist/Sidebar/index.d.mts
CHANGED
package/dist/Sidebar/index.mjs
CHANGED
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { IconButton as t } from "../IconButton/index.mjs";
|
|
3
|
+
import { PanelLeftCloseIcon as n } from "../icons/PanelLeftCloseIcon.mjs";
|
|
4
|
+
import { PanelLeftOpenIcon as r } from "../icons/PanelLeftOpenIcon.mjs";
|
|
5
|
+
import { join as i } from "../styles/join.mjs";
|
|
6
6
|
import { body as a, footer as o, header as s, root as c, toggle as l, toggleIcon as u } from "./Sidebar.css.mjs";
|
|
7
7
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
8
|
// src/Sidebar/index.tsx
|
|
9
|
-
function p({ className:
|
|
10
|
-
return /* @__PURE__ */ d(
|
|
11
|
-
...
|
|
12
|
-
className:
|
|
9
|
+
function p({ className: e, ...t }) {
|
|
10
|
+
return /* @__PURE__ */ d(n, {
|
|
11
|
+
...t,
|
|
12
|
+
className: i(u, e)
|
|
13
13
|
});
|
|
14
14
|
}
|
|
15
|
-
function m({ className:
|
|
16
|
-
return /* @__PURE__ */ d(
|
|
17
|
-
...
|
|
18
|
-
className:
|
|
15
|
+
function m({ className: e, ...t }) {
|
|
16
|
+
return /* @__PURE__ */ d(r, {
|
|
17
|
+
...t,
|
|
18
|
+
className: i(u, e)
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
var h = (e) => e != null && e !== !1 && e !== "";
|
|
22
|
-
function g({ collapsed:
|
|
23
|
-
let w =
|
|
24
|
-
"aria-expanded": !
|
|
22
|
+
function g({ collapsed: n = !1, onCollapsedChange: r, header: u, footer: g, toggleLabel: _ = "Toggle sidebar", display: v = "flex", flexDirection: y = "column", backgroundColor: b = "bgPanel", className: x, children: S, ...C }) {
|
|
23
|
+
let w = r ? /* @__PURE__ */ d(t, {
|
|
24
|
+
"aria-expanded": !n,
|
|
25
25
|
className: l,
|
|
26
|
-
icon:
|
|
26
|
+
icon: n ? m : p,
|
|
27
27
|
label: _,
|
|
28
|
-
onClick: () =>
|
|
28
|
+
onClick: () => r(!n),
|
|
29
29
|
size: "sm"
|
|
30
30
|
}) : null;
|
|
31
|
-
return /* @__PURE__ */ f(
|
|
31
|
+
return /* @__PURE__ */ f(e, {
|
|
32
32
|
backgroundColor: b,
|
|
33
33
|
display: v,
|
|
34
34
|
flexDirection: y,
|
|
35
35
|
...C,
|
|
36
36
|
as: "aside",
|
|
37
|
-
className:
|
|
38
|
-
"data-rail":
|
|
37
|
+
className: i(c, x),
|
|
38
|
+
"data-rail": n ? "" : void 0,
|
|
39
39
|
children: [
|
|
40
40
|
h(u) || w ? /* @__PURE__ */ f("div", {
|
|
41
41
|
className: s,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PolymorphicProps } from "../types.mjs";
|
|
2
1
|
import { StyleProps } from "../Box/base.mjs";
|
|
2
|
+
import { PolymorphicProps } from "../types.mjs";
|
|
3
3
|
import { ElementType } from "react";
|
|
4
4
|
export type SidebarLayoutProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
|
|
5
5
|
export type SidebarLayoutSidebarProps<T extends ElementType = "div"> = PolymorphicProps<T, StyleProps>;
|
|
@@ -1,30 +1,30 @@
|
|
|
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 { main as n, root as r, sidebar as i } from "./SidebarLayout.css.mjs";
|
|
4
4
|
import { jsx as a } from "react/jsx-runtime";
|
|
5
5
|
// src/SidebarLayout/index.tsx
|
|
6
6
|
function o({ display: n = "flex", flexWrap: i = "wrap", gap: o = "24", inlineSize: s = "full", className: c, ...l }) {
|
|
7
|
-
return /* @__PURE__ */ a(
|
|
7
|
+
return /* @__PURE__ */ a(e, {
|
|
8
8
|
display: n,
|
|
9
9
|
flexWrap: i,
|
|
10
10
|
gap: o,
|
|
11
11
|
inlineSize: s,
|
|
12
12
|
...l,
|
|
13
|
-
className:
|
|
13
|
+
className: t(r, c)
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
function s({ inlineSize: n = "sidebar", className: r, ...o }) {
|
|
17
|
-
return /* @__PURE__ */ a(
|
|
17
|
+
return /* @__PURE__ */ a(e, {
|
|
18
18
|
inlineSize: n,
|
|
19
19
|
...o,
|
|
20
|
-
className:
|
|
20
|
+
className: t(i, r)
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
function c({ flexGrow: r = 1, className: i, ...o }) {
|
|
24
|
-
return /* @__PURE__ */ a(
|
|
24
|
+
return /* @__PURE__ */ a(e, {
|
|
25
25
|
flexGrow: r,
|
|
26
26
|
...o,
|
|
27
|
-
className:
|
|
27
|
+
className: t(n, i)
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
var l = Object.assign(o, {
|
package/dist/Stack/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PolymorphicProps } from "../types.mjs";
|
|
2
|
-
import { StyleProps } from "../Box/base.mjs";
|
|
3
1
|
import "../Box/index.mjs";
|
|
2
|
+
import { StyleProps } from "../Box/base.mjs";
|
|
3
|
+
import { PolymorphicProps } from "../types.mjs";
|
|
4
4
|
import { ElementType } from "react";
|
|
5
5
|
type Gap = StyleProps["gap"];
|
|
6
6
|
type Token = Extract<Gap, string>;
|
package/dist/Stack/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/index.mjs";
|
|
2
|
+
import { join as t } from "../styles/join.mjs";
|
|
3
3
|
import { root as n } from "./Stack.css.mjs";
|
|
4
4
|
import { jsx as r } from "react/jsx-runtime";
|
|
5
5
|
// src/Stack/index.tsx
|
|
6
6
|
function i({ display: i = "flex", flexDirection: a = "column", className: o, ...s }) {
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
7
|
+
return /* @__PURE__ */ r(e, {
|
|
8
8
|
display: i,
|
|
9
9
|
flexDirection: a,
|
|
10
10
|
...s,
|
|
11
|
-
className:
|
|
11
|
+
className: t(n, o)
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
14
|
export { i as Stack };
|
package/dist/Switch/index.mjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { Field as t } from "../Field/index.mjs";
|
|
3
3
|
import { controlText as n } from "../styles/control-size.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { join as r } from "../styles/join.mjs";
|
|
5
5
|
import { offThumb as i, onThumb as a, root as o, size as s, track as c } from "./Switch.css.mjs";
|
|
6
6
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
7
|
import { Switch as d } from "@base-ui/react/switch";
|
|
8
8
|
// src/Switch/index.tsx
|
|
9
9
|
function f({ label: f, hideLabel: p = !1, "aria-label": m, checked: h, defaultChecked: g, onCheckedChange: _, description: v, error: y, name: b, value: x, uncheckedValue: S, disabled: C = !1, readOnly: w = !1, required: T = !1, busy: E = !1, size: D = "med", className: O, style: k, ...A }) {
|
|
10
10
|
let j = E && !w && !C;
|
|
11
|
-
return /* @__PURE__ */ u(
|
|
11
|
+
return /* @__PURE__ */ u(t, {
|
|
12
12
|
...A,
|
|
13
13
|
className: O,
|
|
14
14
|
disabled: C,
|
|
15
15
|
invalid: y != null && y !== !1 && y !== "",
|
|
16
16
|
style: k,
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */ u(
|
|
18
|
+
/* @__PURE__ */ u(e, {
|
|
19
19
|
alignItems: "center",
|
|
20
20
|
as: "div",
|
|
21
21
|
display: "flex",
|
|
@@ -28,37 +28,37 @@ function f({ label: f, hideLabel: p = !1, "aria-label": m, checked: h, defaultCh
|
|
|
28
28
|
name: b,
|
|
29
29
|
onCheckedChange: _ && ((e) => _(e)),
|
|
30
30
|
readOnly: w || j,
|
|
31
|
-
render: /* @__PURE__ */ l(
|
|
31
|
+
render: /* @__PURE__ */ l(e, {
|
|
32
32
|
as: "span",
|
|
33
|
-
className:
|
|
33
|
+
className: r(o, s[D])
|
|
34
34
|
}),
|
|
35
35
|
required: T,
|
|
36
36
|
uncheckedValue: S,
|
|
37
37
|
value: x,
|
|
38
|
-
children: /* @__PURE__ */ u(
|
|
38
|
+
children: /* @__PURE__ */ u(e, {
|
|
39
39
|
as: "span",
|
|
40
40
|
className: c,
|
|
41
|
-
children: [/* @__PURE__ */ l(
|
|
41
|
+
children: [/* @__PURE__ */ l(e, {
|
|
42
42
|
"aria-hidden": "true",
|
|
43
43
|
as: "span",
|
|
44
44
|
className: i
|
|
45
|
-
}), /* @__PURE__ */ l(
|
|
45
|
+
}), /* @__PURE__ */ l(e, {
|
|
46
46
|
"aria-hidden": "true",
|
|
47
47
|
as: "span",
|
|
48
48
|
className: a
|
|
49
49
|
})]
|
|
50
50
|
})
|
|
51
|
-
}), f != null && /* @__PURE__ */ l(
|
|
51
|
+
}), f != null && /* @__PURE__ */ l(t.Label, {
|
|
52
52
|
className: p ? "njq9m05" : void 0,
|
|
53
53
|
size: n[D],
|
|
54
54
|
children: f
|
|
55
55
|
})]
|
|
56
56
|
}),
|
|
57
|
-
v != null && /* @__PURE__ */ l(
|
|
57
|
+
v != null && /* @__PURE__ */ l(t.Description, {
|
|
58
58
|
size: n[D],
|
|
59
59
|
children: v
|
|
60
60
|
}),
|
|
61
|
-
/* @__PURE__ */ l(
|
|
61
|
+
/* @__PURE__ */ l(t.Error, {
|
|
62
62
|
size: n[D],
|
|
63
63
|
children: y
|
|
64
64
|
})
|
package/dist/Table/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OmitEach } from "../types.mjs";
|
|
2
1
|
import { StyleProps } from "../Box/base.mjs";
|
|
3
2
|
import { PartProps } from "../styles/part-props.mjs";
|
|
4
3
|
import { Tone } from "../styles/subtle-fills.mjs";
|
|
5
4
|
import { TextOwnProps } from "../Text/index.mjs";
|
|
5
|
+
import { OmitEach } from "../types.mjs";
|
|
6
6
|
import { ComponentPropsWithRef, ReactElement } from "react";
|
|
7
7
|
type Element<T extends keyof HTMLElementTagNameMap, Own = object> = StyleProps & Own & OmitEach<ComponentPropsWithRef<T>, keyof StyleProps | keyof Own>;
|
|
8
8
|
type TableName = {
|
package/dist/Table/index.mjs
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { Clickable as t } from "../Clickable/index.mjs";
|
|
3
|
+
import { ArrowDownIcon as n } from "../icons/ArrowDownIcon.mjs";
|
|
4
|
+
import { ArrowUpIcon as r } from "../icons/ArrowUpIcon.mjs";
|
|
5
|
+
import { join as i } from "../styles/join.mjs";
|
|
6
|
+
import { splitStyleProps as a } from "../styles/split-style-props.mjs";
|
|
7
|
+
import { subtleFills as o } from "../styles/subtle-fills.mjs";
|
|
8
|
+
import { Text as s } from "../Text/index.mjs";
|
|
9
|
+
import { VisuallyHidden as c } from "../VisuallyHidden/index.mjs";
|
|
10
10
|
import { caption as l, cell as u, row as d, scrollThumb as f, scrollViewport as p, scrollbar as m, table as h, unsortedArrow as g } from "./Table.css.mjs";
|
|
11
11
|
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
12
12
|
import { ScrollArea as y } from "@base-ui/react/scroll-area";
|
|
13
13
|
// src/Table/index.tsx
|
|
14
|
-
function b({ caption: t, hideCaption:
|
|
15
|
-
return /* @__PURE__ */ v(
|
|
14
|
+
function b({ caption: t, hideCaption: n = !1, layout: r = "auto", inlineSize: a = "full", className: o, children: u, ...d }) {
|
|
15
|
+
return /* @__PURE__ */ v(e, {
|
|
16
16
|
...d,
|
|
17
17
|
as: "table",
|
|
18
|
-
className:
|
|
19
|
-
inlineSize:
|
|
20
|
-
children: [t === void 0 ? null :
|
|
18
|
+
className: i(h({ layout: r }), o),
|
|
19
|
+
inlineSize: a,
|
|
20
|
+
children: [t === void 0 ? null : n ? /* @__PURE__ */ _(c, {
|
|
21
21
|
as: "caption",
|
|
22
22
|
children: t
|
|
23
|
-
}) : /* @__PURE__ */ _(
|
|
23
|
+
}) : /* @__PURE__ */ _(s, {
|
|
24
24
|
as: "caption",
|
|
25
25
|
className: l,
|
|
26
26
|
display: null,
|
|
@@ -32,98 +32,98 @@ function b({ caption: t, hideCaption: r = !1, layout: a = "auto", inlineSize: s
|
|
|
32
32
|
}), u]
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
function x(
|
|
36
|
-
return /* @__PURE__ */ _(
|
|
37
|
-
...
|
|
35
|
+
function x(t) {
|
|
36
|
+
return /* @__PURE__ */ _(e, {
|
|
37
|
+
...t,
|
|
38
38
|
as: "thead"
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function S(
|
|
42
|
-
return /* @__PURE__ */ _(
|
|
43
|
-
...
|
|
41
|
+
function S(t) {
|
|
42
|
+
return /* @__PURE__ */ _(e, {
|
|
43
|
+
...t,
|
|
44
44
|
as: "tbody"
|
|
45
45
|
});
|
|
46
46
|
}
|
|
47
|
-
function C(
|
|
48
|
-
return /* @__PURE__ */ _(
|
|
49
|
-
...
|
|
47
|
+
function C(t) {
|
|
48
|
+
return /* @__PURE__ */ _(e, {
|
|
49
|
+
...t,
|
|
50
50
|
as: "tfoot"
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
function w({ tone: t, "aria-busy":
|
|
54
|
-
return /* @__PURE__ */ _(
|
|
53
|
+
function w({ tone: t, "aria-busy": n, backgroundColor: r = t && o[t].backgroundColor, color: a = t ? o[t].color : n === !0 || n === "true" ? "fgMuted" : void 0, className: s, ...c }) {
|
|
54
|
+
return /* @__PURE__ */ _(e, {
|
|
55
55
|
...c,
|
|
56
|
-
"aria-busy":
|
|
56
|
+
"aria-busy": n,
|
|
57
57
|
as: "tr",
|
|
58
|
-
backgroundColor:
|
|
59
|
-
className:
|
|
60
|
-
color:
|
|
58
|
+
backgroundColor: r,
|
|
59
|
+
className: i(d, s),
|
|
60
|
+
color: a
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
function T(
|
|
64
|
-
return /* @__PURE__ */ _(
|
|
65
|
-
...
|
|
63
|
+
function T(t) {
|
|
64
|
+
return /* @__PURE__ */ _(e, {
|
|
65
|
+
...t,
|
|
66
66
|
as: "colgroup"
|
|
67
67
|
});
|
|
68
68
|
}
|
|
69
|
-
function E(
|
|
70
|
-
return /* @__PURE__ */ _(
|
|
71
|
-
...
|
|
69
|
+
function E(t) {
|
|
70
|
+
return /* @__PURE__ */ _(e, {
|
|
71
|
+
...t,
|
|
72
72
|
as: "col"
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
|
-
function D({ numeric:
|
|
76
|
-
return /* @__PURE__ */ _(
|
|
75
|
+
function D({ numeric: e = !1, size: t = "sm", display: n = null, paddingBlock: r = "8", paddingInline: a = "12", textAlign: o = e ? "end" : void 0, className: c, ...l }) {
|
|
76
|
+
return /* @__PURE__ */ _(s, {
|
|
77
77
|
...l,
|
|
78
78
|
as: "td",
|
|
79
|
-
className:
|
|
80
|
-
display:
|
|
81
|
-
paddingBlock:
|
|
82
|
-
paddingInline:
|
|
83
|
-
size:
|
|
84
|
-
tabularNums:
|
|
85
|
-
textAlign:
|
|
79
|
+
className: i(u, c),
|
|
80
|
+
display: n,
|
|
81
|
+
paddingBlock: r,
|
|
82
|
+
paddingInline: a,
|
|
83
|
+
size: t,
|
|
84
|
+
tabularNums: e,
|
|
85
|
+
textAlign: o
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
|
-
function O({ scope:
|
|
88
|
+
function O({ scope: e = "col", numeric: a = !1, hideLabel: o = !1, sort: l, onSort: d, size: f = e === "row" || e === "rowgroup" ? "sm" : "xs", weight: p = "semibold", color: m = e === "row" || e === "rowgroup" ? void 0 : l === "ascending" || l === "descending" ? "fg" : "fgMuted", display: h = null, paddingBlock: y = "8", paddingInline: b = "12", textAlign: x = a ? "end" : "start", className: S, children: C, ...w }) {
|
|
89
89
|
let T = l === "ascending" || l === "descending";
|
|
90
|
-
return /* @__PURE__ */ _(
|
|
90
|
+
return /* @__PURE__ */ _(s, {
|
|
91
91
|
...w,
|
|
92
92
|
"aria-sort": l === void 0 ? w["aria-sort"] : T ? l : void 0,
|
|
93
93
|
as: "th",
|
|
94
|
-
className:
|
|
94
|
+
className: i(u, S),
|
|
95
95
|
color: m,
|
|
96
96
|
display: h,
|
|
97
97
|
paddingBlock: y,
|
|
98
98
|
paddingInline: b,
|
|
99
|
-
scope:
|
|
99
|
+
scope: e,
|
|
100
100
|
size: f,
|
|
101
|
-
tabularNums:
|
|
101
|
+
tabularNums: a,
|
|
102
102
|
textAlign: x,
|
|
103
103
|
weight: p,
|
|
104
|
-
children: l === void 0 ?
|
|
104
|
+
children: l === void 0 ? o ? /* @__PURE__ */ _(c, { children: C }) : C : /* @__PURE__ */ v(t, {
|
|
105
105
|
gap: "4",
|
|
106
106
|
onClick: d,
|
|
107
|
-
children: [C, l === "descending" ? /* @__PURE__ */ _(
|
|
107
|
+
children: [C, l === "descending" ? /* @__PURE__ */ _(n, { size: f }) : /* @__PURE__ */ _(r, {
|
|
108
108
|
className: T ? void 0 : g,
|
|
109
109
|
size: f
|
|
110
110
|
})]
|
|
111
111
|
})
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
function k({ children:
|
|
115
|
-
let [s, c] =
|
|
114
|
+
function k({ children: t, className: n, ref: r, style: i, ...o }) {
|
|
115
|
+
let [s, c] = a(o);
|
|
116
116
|
return /* @__PURE__ */ v(y.Root, {
|
|
117
|
-
render: /* @__PURE__ */ _(
|
|
117
|
+
render: /* @__PURE__ */ _(e, {
|
|
118
118
|
...s,
|
|
119
|
-
className:
|
|
120
|
-
style:
|
|
119
|
+
className: n,
|
|
120
|
+
style: i
|
|
121
121
|
}),
|
|
122
122
|
children: [/* @__PURE__ */ _(y.Viewport, {
|
|
123
123
|
...c,
|
|
124
124
|
className: p,
|
|
125
|
-
render: /* @__PURE__ */ _("section", { ref:
|
|
126
|
-
children: /* @__PURE__ */ _(y.Content, { children:
|
|
125
|
+
render: /* @__PURE__ */ _("section", { ref: r }),
|
|
126
|
+
children: /* @__PURE__ */ _(y.Content, { children: t })
|
|
127
127
|
}), /* @__PURE__ */ _(y.Scrollbar, {
|
|
128
128
|
className: m,
|
|
129
129
|
orientation: "horizontal",
|
package/dist/Tabs/index.mjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { Box as e } from "../Box/base.mjs";
|
|
2
|
+
import { Clickable as t } from "../Clickable/index.mjs";
|
|
3
|
+
import { join as n } from "../styles/join.mjs";
|
|
4
|
+
import { splitStyleProps as r } from "../styles/split-style-props.mjs";
|
|
5
|
+
import { splitTextProps as i } from "../styles/split-text-props.mjs";
|
|
6
|
+
import { Text as a } from "../Text/index.mjs";
|
|
7
7
|
import { indicator as o, list as s, panel as c, tab as l } from "./Tabs.css.mjs";
|
|
8
8
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
9
|
import { Tabs as f } from "@base-ui/react/tabs";
|
|
10
10
|
// src/Tabs/index.tsx
|
|
11
|
-
function p({ orientation:
|
|
12
|
-
let [d, p] =
|
|
11
|
+
function p({ orientation: t = "horizontal", display: n = "flex", flexDirection: i = t === "vertical" ? "row" : "column", flexWrap: a = t === "vertical" ? "wrap" : "nowrap", gap: o = "16", className: s, style: c, ...l }) {
|
|
12
|
+
let [d, p] = r(l);
|
|
13
13
|
return /* @__PURE__ */ u(f.Root, {
|
|
14
14
|
...p,
|
|
15
|
-
orientation:
|
|
16
|
-
render: /* @__PURE__ */ u(
|
|
17
|
-
display:
|
|
15
|
+
orientation: t,
|
|
16
|
+
render: /* @__PURE__ */ u(e, {
|
|
17
|
+
display: n,
|
|
18
18
|
flexDirection: i,
|
|
19
19
|
flexWrap: a,
|
|
20
20
|
gap: o,
|
|
@@ -24,43 +24,43 @@ function p({ orientation: e = "horizontal", display: r = "flex", flexDirection:
|
|
|
24
24
|
})
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
|
-
function m({ display:
|
|
28
|
-
let [p, m] =
|
|
27
|
+
function m({ display: t = "flex", flexWrap: i = "wrap", gap: a = "4", position: o = "relative", className: c, style: l, ...d }) {
|
|
28
|
+
let [p, m] = r(d);
|
|
29
29
|
return /* @__PURE__ */ u(f.List, {
|
|
30
30
|
...m,
|
|
31
|
-
render: /* @__PURE__ */ u(
|
|
32
|
-
display:
|
|
31
|
+
render: /* @__PURE__ */ u(e, {
|
|
32
|
+
display: t,
|
|
33
33
|
flexWrap: i,
|
|
34
34
|
gap: a,
|
|
35
35
|
position: o,
|
|
36
36
|
...p,
|
|
37
|
-
className:
|
|
37
|
+
className: n(s, c),
|
|
38
38
|
style: l
|
|
39
39
|
})
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
42
|
function h({ children: s, size: c = "sm", font: p = "label", weight: m = "medium", paddingInline: h = "12", justifyContent: g = "start", minBlockSize: _ = "med", position: v = "relative", color: y = "fgMuted", className: b, style: x, ...S }) {
|
|
43
|
-
let [C, w] =
|
|
43
|
+
let [C, w] = i(S), [T, E] = r(w);
|
|
44
44
|
return /* @__PURE__ */ d(f.Tab, {
|
|
45
45
|
...E,
|
|
46
|
-
render: /* @__PURE__ */ u(
|
|
46
|
+
render: /* @__PURE__ */ u(t, {
|
|
47
47
|
color: y,
|
|
48
48
|
justifyContent: g,
|
|
49
49
|
minBlockSize: _,
|
|
50
50
|
paddingInline: h,
|
|
51
51
|
position: v,
|
|
52
52
|
...T,
|
|
53
|
-
className:
|
|
53
|
+
className: n(l, b),
|
|
54
54
|
style: x
|
|
55
55
|
}),
|
|
56
|
-
children: [/* @__PURE__ */ u(
|
|
56
|
+
children: [/* @__PURE__ */ u(a, {
|
|
57
57
|
as: "span",
|
|
58
58
|
font: p,
|
|
59
59
|
size: c,
|
|
60
60
|
weight: m,
|
|
61
61
|
...C,
|
|
62
62
|
children: s
|
|
63
|
-
}), /* @__PURE__ */ u(
|
|
63
|
+
}), /* @__PURE__ */ u(e, {
|
|
64
64
|
"aria-hidden": !0,
|
|
65
65
|
as: "span",
|
|
66
66
|
className: o,
|
|
@@ -68,14 +68,14 @@ function h({ children: s, size: c = "sm", font: p = "label", weight: m = "medium
|
|
|
68
68
|
})]
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
function g({ flexGrow:
|
|
72
|
-
let [s, l] =
|
|
71
|
+
function g({ flexGrow: t = 1, className: i, style: a, ...o }) {
|
|
72
|
+
let [s, l] = r(o);
|
|
73
73
|
return /* @__PURE__ */ u(f.Panel, {
|
|
74
74
|
...l,
|
|
75
|
-
render: /* @__PURE__ */ u(
|
|
76
|
-
flexGrow:
|
|
75
|
+
render: /* @__PURE__ */ u(e, {
|
|
76
|
+
flexGrow: t,
|
|
77
77
|
...s,
|
|
78
|
-
className:
|
|
78
|
+
className: n(c, i),
|
|
79
79
|
style: a
|
|
80
80
|
})
|
|
81
81
|
});
|
package/dist/Tag/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 TagOwnProps = IconSlotProps & {
|
|
7
7
|
appearance?: "subtle" | "outline";
|