@jonmilner/ui 0.17.0 → 0.18.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/Badge/Badge.css +1 -1
- package/dist/Badge/Badge.css.mjs +6 -9
- package/dist/Badge/index.mjs +10 -3
- package/dist/Button/Button.css +1 -1
- package/dist/Button/Button.css.mjs +1 -1
- package/dist/Button/index.d.mts +2 -1
- package/dist/Button/index.mjs +21 -21
- package/dist/Combobox/Combobox.css +1 -1
- package/dist/IconButton/IconButton.css +1 -1
- package/dist/IconButton/IconButton.css.mjs +2 -2
- package/dist/IconButton/index.d.mts +1 -1
- package/dist/IconButton/index.mjs +5 -4
- package/dist/Menu/client.d.mts +1 -0
- package/dist/MultiSelect/MultiSelect.css +1 -1
- package/dist/Select/Select.css +1 -1
- package/dist/Tag/Tag.css +1 -1
- package/dist/Tag/Tag.css.mjs +3 -3
- package/dist/Tag/index.mjs +9 -4
- package/dist/contrast/contrast.d.mts +1 -1
- package/dist/contrast/contrast.mjs +3 -2
- package/dist/contrast/mixes.mjs +32 -22
- package/dist/docs/AlertDialog.md +1 -0
- package/dist/docs/Badge.md +2 -2
- package/dist/docs/Button.md +10 -8
- package/dist/docs/Dialog.md +3 -1
- package/dist/docs/IconButton.md +5 -5
- package/dist/docs/Menu.md +3 -2
- package/dist/docs/Tag.md +2 -2
- package/dist/docs/Tooltip.md +2 -1
- package/dist/docs/llms.txt +3 -3
- package/dist/docs/manifest.json +31 -1
- package/dist/docs/migrations/0.18.0.md +65 -0
- package/dist/docs/theming.md +1 -1
- package/dist/popup/client.d.mts +1 -1
- package/dist/popup/client.mjs +6 -5
- package/dist/styles/button-fills.mjs +1 -1
- package/dist/theme/define-theme.mjs +1 -1
- package/package.json +1 -1
package/dist/Badge/Badge.css
CHANGED
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.badge{._1ixfil10{border-width:var(--space-1);border-style:solid;border-color:#0000}._1ixfil1d{vertical-align:calc((1cap - var(--font-size-xs)) / 2);margin-inline-end:var(--space-4);display:inline-block}._1ixfil1e{vertical-align:calc((1cap - var(--font-size-
|
|
2
|
+
@layer components.badge{._1ixfil10{border-width:var(--space-1);border-style:solid;border-color:#0000}._1ixfil1d{vertical-align:calc((1cap - var(--font-size-xs)) / 2);margin-inline-end:var(--space-4);display:inline-block}._1ixfil1e{vertical-align:calc((1cap - var(--font-size-med)) / 2);margin-inline-end:var(--space-8);display:inline-block}._1ixfil1f{vertical-align:calc((1cap - var(--font-size-xs)) / 2);margin-inline-start:var(--space-4);display:inline-block}._1ixfil1g{vertical-align:calc((1cap - var(--font-size-med)) / 2);margin-inline-start:var(--space-8);display:inline-block}._1ixfil1h{vertical-align:top;max-inline-size:calc(100% - var(--font-size-xs) - var(--space-4));display:inline-block}._1ixfil1i{vertical-align:top;max-inline-size:calc(100% - var(--font-size-med) - var(--space-8));display:inline-block}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1ixfil1j{max-inline-size:none;display:inline}@media (forced-colors:active){._1ixfil10{color:canvastext;background-color:canvas;border-color:canvastext}}}
|
package/dist/Badge/Badge.css.mjs
CHANGED
|
@@ -30,19 +30,16 @@ var t = "_1ixfil10", n = e({
|
|
|
30
30
|
}), r = {
|
|
31
31
|
start: {
|
|
32
32
|
xs: "_1ixfil1d",
|
|
33
|
-
|
|
34
|
-
med: "_1ixfil1f"
|
|
33
|
+
med: "_1ixfil1e"
|
|
35
34
|
},
|
|
36
35
|
end: {
|
|
37
|
-
xs: "
|
|
38
|
-
|
|
39
|
-
med: "_1ixfil1i"
|
|
36
|
+
xs: "_1ixfil1f",
|
|
37
|
+
med: "_1ixfil1g"
|
|
40
38
|
},
|
|
41
39
|
clip: {
|
|
42
|
-
xs: "
|
|
43
|
-
|
|
44
|
-
med: "_1ixfil1l"
|
|
40
|
+
xs: "_1ixfil1h",
|
|
41
|
+
med: "_1ixfil1i"
|
|
45
42
|
},
|
|
46
|
-
reveal: "
|
|
43
|
+
reveal: "_1ixfil1j"
|
|
47
44
|
};
|
|
48
45
|
export { n as badge, t as root, r as slot };
|
package/dist/Badge/index.mjs
CHANGED
|
@@ -34,14 +34,20 @@ var u = {
|
|
|
34
34
|
}
|
|
35
35
|
}, d = {
|
|
36
36
|
xs: {
|
|
37
|
-
|
|
37
|
+
step: "xs",
|
|
38
|
+
leading: "meta",
|
|
39
|
+
paddingInline: "6",
|
|
38
40
|
paddingBlock: "2"
|
|
39
41
|
},
|
|
40
42
|
sm: {
|
|
43
|
+
step: "xs",
|
|
44
|
+
leading: "meta",
|
|
41
45
|
paddingInline: "6",
|
|
42
46
|
paddingBlock: "4"
|
|
43
47
|
},
|
|
44
48
|
med: {
|
|
49
|
+
step: "med",
|
|
50
|
+
leading: void 0,
|
|
45
51
|
paddingInline: "8",
|
|
46
52
|
paddingBlock: "6"
|
|
47
53
|
}
|
|
@@ -68,14 +74,15 @@ function f({ variant: f = "neutral", subtle: p = !1, size: m = "med", iconStart:
|
|
|
68
74
|
children: /* @__PURE__ */ l(n, {
|
|
69
75
|
as: "span",
|
|
70
76
|
font: "label",
|
|
71
|
-
|
|
77
|
+
leading: d[m].leading,
|
|
78
|
+
size: d[m].step,
|
|
72
79
|
truncate: O,
|
|
73
80
|
weight: "medium",
|
|
74
81
|
wrap: "nowrap",
|
|
75
82
|
children: r({
|
|
76
83
|
iconStart: h,
|
|
77
84
|
iconEnd: g,
|
|
78
|
-
size: m,
|
|
85
|
+
size: d[m].step,
|
|
79
86
|
styles: c,
|
|
80
87
|
truncate: O,
|
|
81
88
|
children: E
|
package/dist/Button/Button.css
CHANGED
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@keyframes hkhd8c{to{opacity:.25}}@layer components.button{.hkhd80{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.hkhd80[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.hkhd80:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.hkhd82{--_5qoq940:var(--color-accent-fill);border-color:#0000}.hkhd83{
|
|
2
|
+
@keyframes hkhd8c{to{opacity:.25}}@layer components.button{.hkhd80{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.hkhd80[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.hkhd80:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.hkhd82{--_5qoq940:var(--color-accent-fill);border-color:#0000}.hkhd83{border-color:var(--color-border)}.hkhd84,.hkhd85{border-color:#0000}.hkhd89{text-transform:uppercase}.hkhd8a{justify-items:center}.hkhd8b{grid-area:1/1}.hkhd80[aria-busy=true] .hkhd8b{opacity:0}.hkhd8d{grid-area:1/1}.hkhd8e{animation-name:hkhd8c;animation-duration:var(--duration-slow);animation-timing-function:var(--easing-standard);animation-iteration-count:infinite;animation-direction:alternate}.hkhd8e:nth-child(2){animation-delay:calc(var(--duration-slow) / 3)}.hkhd8e:nth-child(3){animation-delay:calc(var(--duration-slow) * 2 / 3)}@media (hover:hover){.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):hover{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}}@media (forced-colors:active){.hkhd80{forced-color-adjust:none}.hkhd80:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.hkhd80[aria-disabled=true]{color:graytext;border-color:graytext}.hkhd80:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{box-shadow:inset 0 0 0 var(--space-1) currentColor;background-image:none}.hkhd83{--color-fg:ButtonText}.hkhd84{border-color:var(--color-border-strong)}.hkhd85{--color-danger:var(--color-accent-fill);--color-danger-fg:var(--color-accent-fill-fg)}}@media (prefers-reduced-motion:reduce){.hkhd8e{animation-name:none}}}@layer reset{.hkhd80{box-shadow:0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.hkhd80[aria-disabled=true]{box-shadow:none}@media (forced-colors:active){.hkhd80{box-shadow:none}}}
|
|
@@ -22,4 +22,4 @@ var t = "hkhd80", n = e({
|
|
|
22
22
|
defaultVariants: {},
|
|
23
23
|
compoundVariants: []
|
|
24
24
|
}), r = "hkhd89", i = "hkhd8a", a = "hkhd8b", o = "hkhd8d", s = "hkhd8e";
|
|
25
|
-
export { n as button, a as content, s as dot,
|
|
25
|
+
export { n as button, a as content, s as dot, t as root, o as spinner, i as stack, r as uppercase };
|
package/dist/Button/index.d.mts
CHANGED
|
@@ -6,9 +6,10 @@ import { ElementType } from "react";
|
|
|
6
6
|
export type ButtonOwnProps = IconSlotProps & {
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
size?: "sm" | "med" | "lg";
|
|
9
|
+
uppercase?: boolean;
|
|
9
10
|
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
10
11
|
};
|
|
11
12
|
export type ButtonProps<T extends ElementType = "button"> = PolymorphicProps<T, StyleProps & ButtonOwnProps & Omit<ClickableOwnProps, "busy">, "busy" | "aria-disabled" | "aria-busy">;
|
|
12
|
-
export declare function Button<T extends ElementType = "button">({ variant, size, loading: loadingProp, iconStart: IconStart, iconEnd: IconEnd, minBlockSize, paddingBlock, paddingInline, gap, borderRadius, backgroundColor, color, className, children, "aria-busy": ariaBusy, ...props }: ButtonProps<T> & {
|
|
13
|
+
export declare function Button<T extends ElementType = "button">({ variant, size, loading: loadingProp, uppercase, iconStart: IconStart, iconEnd: IconEnd, minBlockSize, paddingBlock, paddingInline, gap, borderRadius, backgroundColor, color, className, children, "aria-busy": ariaBusy, ...props }: ButtonProps<T> & {
|
|
13
14
|
"aria-busy"?: boolean | "true" | "false";
|
|
14
15
|
}): import("react").JSX.Element;
|
package/dist/Button/index.mjs
CHANGED
|
@@ -27,21 +27,21 @@ var _ = {
|
|
|
27
27
|
paddingInline: "16"
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
|
-
function v({ variant: c = "secondary", size: v = "med", loading: y = !1,
|
|
31
|
-
let
|
|
30
|
+
function v({ variant: c = "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 = i[l[v]], borderRadius: D = "sm", backgroundColor: O = a[c].backgroundColor, color: k = a[c].color, className: A, children: j, "aria-busy": M, ...N }) {
|
|
31
|
+
let P = y || String(M) === "true", F = N, I = l[v];
|
|
32
32
|
return /* @__PURE__ */ h(n, {
|
|
33
|
-
...
|
|
34
|
-
backgroundColor:
|
|
35
|
-
borderRadius:
|
|
36
|
-
busy:
|
|
33
|
+
...F,
|
|
34
|
+
backgroundColor: O,
|
|
35
|
+
borderRadius: D,
|
|
36
|
+
busy: P,
|
|
37
37
|
className: e(p, d({
|
|
38
38
|
variant: c,
|
|
39
39
|
size: v
|
|
40
|
-
}),
|
|
41
|
-
color:
|
|
42
|
-
minBlockSize:
|
|
43
|
-
paddingBlock:
|
|
44
|
-
paddingInline:
|
|
40
|
+
}), A),
|
|
41
|
+
color: k,
|
|
42
|
+
minBlockSize: C,
|
|
43
|
+
paddingBlock: w,
|
|
44
|
+
paddingInline: T,
|
|
45
45
|
children: /* @__PURE__ */ g(t, {
|
|
46
46
|
alignItems: "center",
|
|
47
47
|
as: "span",
|
|
@@ -52,23 +52,23 @@ function v({ variant: c = "secondary", size: v = "med", loading: y = !1, iconSta
|
|
|
52
52
|
as: "span",
|
|
53
53
|
className: e(f, o),
|
|
54
54
|
display: "flex",
|
|
55
|
-
gap:
|
|
55
|
+
gap: E,
|
|
56
56
|
children: [
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
x && /* @__PURE__ */ h(x, { size: I }),
|
|
58
|
+
j != null && j !== !1 && j !== "" && /* @__PURE__ */ h(u, {
|
|
59
59
|
as: "span",
|
|
60
|
-
className: e("hkhd89", "_1gwwloa2"),
|
|
60
|
+
className: e(b && "hkhd89", "_1gwwloa2"),
|
|
61
61
|
font: "label",
|
|
62
|
-
size:
|
|
63
|
-
weight: "
|
|
64
|
-
children:
|
|
62
|
+
size: I,
|
|
63
|
+
weight: "medium",
|
|
64
|
+
children: j
|
|
65
65
|
}),
|
|
66
|
-
|
|
66
|
+
S && /* @__PURE__ */ h(S, { size: I })
|
|
67
67
|
]
|
|
68
|
-
}),
|
|
68
|
+
}), P && /* @__PURE__ */ g(r, {
|
|
69
69
|
className: "hkhd8d",
|
|
70
70
|
fill: "currentColor",
|
|
71
|
-
size:
|
|
71
|
+
size: I,
|
|
72
72
|
stroke: "none",
|
|
73
73
|
children: [
|
|
74
74
|
/* @__PURE__ */ h("circle", {
|
|
@@ -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.nav-list, components.visually-hidden, 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{
|
|
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-med);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}}}
|
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.icon-button{.n2fy8x0{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.n2fy8x0[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.n2fy8x2{--_5qoq940:var(--color-accent-fill);border-color:#0000}.n2fy8x3{
|
|
2
|
+
@layer components.icon-button{.n2fy8x0{--_5qoq940:transparent;--_5qoq941:40%;--_5qoq942:var(--space-12);border-width:var(--space-1);border-style:solid}.n2fy8x0[aria-disabled=true]{background-color:var(--color-bg-muted);border-color:var(--color-border-strong);color:var(--color-fg-muted);border-style:dashed}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent));box-shadow:inset 0 0 0 var(--space-1) currentColor, 0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):focus-visible{--_5qoq941:70%;--_5qoq942:var(--space-20)}.n2fy8x2{--_5qoq940:var(--color-accent-fill);border-color:#0000}.n2fy8x3{border-color:var(--color-border)}.n2fy8x4{border-color:#0000}.n2fy8x8{color:var(--color-fg-muted)}.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true]):focus-visible,.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{color:var(--color-fg)}@media (hover:hover){.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{--_5qoq941:70%;--_5qoq942:var(--space-20);background-image:linear-gradient(color-mix(in srgb, var(--color-fg) 15%, transparent), color-mix(in srgb, var(--color-fg) 15%, transparent))}.n2fy8x8:not([aria-disabled=true]):not([aria-busy=true]):hover{color:var(--color-fg)}}@media (forced-colors:active){.n2fy8x0{forced-color-adjust:none}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true]):hover{background-image:none}.n2fy8x0[aria-disabled=true]{color:graytext;border-color:graytext}.n2fy8x0:not([aria-disabled=true]):not([aria-busy=true])[aria-expanded=true]{box-shadow:inset 0 0 0 var(--space-1) currentColor;background-image:none}.n2fy8x3{--color-fg:ButtonText}.n2fy8x4{border-color:var(--color-border-strong)}}}@layer reset{.n2fy8x0{box-shadow:0 0 var(--_5qoq942) color-mix(in srgb, var(--_5qoq940) var(--_5qoq941), transparent)}.n2fy8x0[aria-disabled=true]{box-shadow:none}@media (forced-colors:active){.n2fy8x0{box-shadow:none}}}
|
|
@@ -10,4 +10,4 @@ export type IconButtonOwnProps = {
|
|
|
10
10
|
variant?: "primary" | "secondary" | "ghost";
|
|
11
11
|
};
|
|
12
12
|
export type IconButtonProps<T extends ElementType = "button"> = PolymorphicProps<T, StyleProps & IconButtonOwnProps & Omit<ClickableOwnProps, "busy">, "busy" | "aria-disabled" | "aria-busy" | "aria-label" | "aria-labelledby" | "children">;
|
|
13
|
-
export declare function IconButton<T extends ElementType = "button">({ label, icon: IconComponent, variant, size, minInlineSize, minBlockSize, borderRadius, backgroundColor, color, className, ...props }: IconButtonProps<T>): import("react").JSX.Element;
|
|
13
|
+
export declare function IconButton<T extends ElementType = "button">({ label, icon: IconComponent, variant, size, minInlineSize, minBlockSize, borderRadius, backgroundColor, color: colorProp, className, ...props }: IconButtonProps<T>): import("react").JSX.Element;
|
|
@@ -5,9 +5,10 @@ import { controlHeight as r, controlText as i } from "../styles/control-size.mjs
|
|
|
5
5
|
import { iconButton as a, root as o } from "./IconButton.css.mjs";
|
|
6
6
|
import { jsx as s } from "react/jsx-runtime";
|
|
7
7
|
// src/IconButton/index.tsx
|
|
8
|
-
function c({ label: c, icon: l, variant: u = "
|
|
8
|
+
function c({ label: c, icon: l, variant: u = "ghost", size: d = "med", minInlineSize: f = r[d], minBlockSize: p = r[d], borderRadius: m = "sm", backgroundColor: h = n[u].backgroundColor, color: g, className: _, ...v }) {
|
|
9
|
+
let y = v, b = u === "ghost" && g === void 0, x = b ? void 0 : g ?? n[u].color;
|
|
9
10
|
return /* @__PURE__ */ s(t, {
|
|
10
|
-
...
|
|
11
|
+
...y,
|
|
11
12
|
"aria-label": c,
|
|
12
13
|
"aria-labelledby": void 0,
|
|
13
14
|
backgroundColor: h,
|
|
@@ -15,8 +16,8 @@ function c({ label: c, icon: l, variant: u = "secondary", size: d = "med", minIn
|
|
|
15
16
|
className: e(o, a({
|
|
16
17
|
variant: u,
|
|
17
18
|
size: d
|
|
18
|
-
}), _),
|
|
19
|
-
color:
|
|
19
|
+
}), b && "n2fy8x8", _),
|
|
20
|
+
color: x,
|
|
20
21
|
minBlockSize: p,
|
|
21
22
|
minInlineSize: f,
|
|
22
23
|
children: /* @__PURE__ */ s(l, { size: i[d] })
|
package/dist/Menu/client.d.mts
CHANGED
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.multiselect{._1seauxl0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1seauxl1{
|
|
2
|
+
@layer components.multiselect{._1seauxl0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}._1seauxl1{text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(._1seauxl1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(._1seauxl1) ._1gwwloa1{min-inline-size:0}:where(._1seauxl1) ._1gwwloa2{flex:auto;min-inline-size:0}._1seauxl2{min-inline-size:0;display:block}._1seauxl2[data-placeholder]{color:var(--color-fg-muted)}._1seauxl3{min-inline-size:0;display:grid}._1seauxl4{grid-area:1/1}._1seauxl4[aria-hidden=true]{visibility:hidden}._1seauxl5{grid-area:1/1}._1seauxl6{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);overflow-y:auto}._1seauxl6:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}._1seauxl6[data-starting-style],._1seauxl6[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}._1seauxl7{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}._1seauxl7:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}._1seauxl7[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}._1seauxl7[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}._1seauxl8{visibility:hidden;flex-shrink:0}._1seauxl7[aria-selected=true] ._1seauxl8{visibility:visible}@media (forced-colors:active){._1seauxl1{--color-fg:CanvasText}._1seauxl1[aria-disabled=true]{border-color:graytext}._1seauxl7[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}._1seauxl7[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}._1seauxl7[aria-disabled=true]{color:graytext}}@supports (text-box:trim-both cap alphabetic){._1seauxl4,._1seauxl5{text-box-trim:trim-both}}}
|
package/dist/Select/Select.css
CHANGED
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.select{.e26gsj0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.e26gsj1{
|
|
2
|
+
@layer components.select{.e26gsj0{clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:0;padding:0;position:absolute;overflow:hidden}.e26gsj1{text-align:start;border-color:var(--color-border-strong);justify-content:stretch}:where(.e26gsj1) ._1gwwloa0{flex:auto;justify-items:stretch;min-inline-size:0}:where(.e26gsj1) ._1gwwloa1{min-inline-size:0}:where(.e26gsj1) ._1gwwloa2{flex:auto;min-inline-size:0}.e26gsj2{min-inline-size:0;display:block}.e26gsj2[data-placeholder]{color:var(--color-fg-muted)}.e26gsj3{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);overflow-y:auto}.e26gsj3:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:var(--space-2)}.e26gsj3[data-starting-style],.e26gsj3[data-ending-style]{opacity:0;scale:calc(1 - var(--scale-med))}.e26gsj4{cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none}.e26gsj4:focus-visible{outline:var(--space-2) solid var(--color-focus);outline-offset:calc(-1 * var(--space-2))}.e26gsj4[data-highlighted]{background-color:light-dark(var(--color-bg-muted),color-mix(in srgb, var(--color-fg) 10%, var(--color-bg-raised)))}.e26gsj4[aria-disabled=true]{color:var(--color-fg-muted);cursor:not-allowed}.e26gsj5{visibility:hidden;flex-shrink:0}.e26gsj4[aria-selected=true] .e26gsj5{visibility:visible}@media (forced-colors:active){.e26gsj1{--color-fg:CanvasText}.e26gsj1[aria-disabled=true]{border-color:graytext}.e26gsj4[data-highlighted]{forced-color-adjust:none;color:highlighttext;background-color:highlight}.e26gsj4[data-highlighted]:focus-visible{color:canvastext;background-color:canvas}.e26gsj4[aria-disabled=true]{color:graytext}}}
|
package/dist/Tag/Tag.css
CHANGED
|
@@ -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.nav-list, components.visually-hidden, components.table;
|
|
2
|
-
@layer components.tag{._1jsyd8s0{border-width:var(--space-1);border-style:solid;border-color:#0000}._1jsyd8s1{overflow-wrap:anywhere}._1jsyd8s0:hover ._1jsyd8s1,._1jsyd8s0:focus-within ._1jsyd8s1{padding-block:var(--space-4);margin-block:0}._1jsyd8s2{text-decoration:underline}._1jsyd8s3:hover{background-color:var(--color-bg)}._1jsyd8sd{vertical-align:calc((1cap - var(--font-size-
|
|
2
|
+
@layer components.tag{._1jsyd8s0{border-width:var(--space-1);border-style:solid;border-color:#0000}._1jsyd8s1{overflow-wrap:anywhere}._1jsyd8s0:hover ._1jsyd8s1,._1jsyd8s0:focus-within ._1jsyd8s1{padding-block:var(--space-4);margin-block:0}._1jsyd8s2{text-decoration:underline}._1jsyd8s3:hover{background-color:var(--color-bg)}._1jsyd8sd{vertical-align:calc((1cap - var(--font-size-xs)) / 2);margin-inline-end:var(--space-4);display:inline-block}._1jsyd8se{vertical-align:calc((1cap - var(--font-size-med)) / 2);margin-inline-end:var(--space-8);display:inline-block}._1jsyd8sf{vertical-align:calc((1cap - var(--font-size-xs)) / 2);margin-inline-start:var(--space-4);display:inline-block}._1jsyd8sg{vertical-align:calc((1cap - var(--font-size-med)) / 2);margin-inline-start:var(--space-8);display:inline-block}._1jsyd8sh{vertical-align:top;max-inline-size:calc(100% - var(--font-size-xs) - var(--space-4));display:inline-block}._1jsyd8si{vertical-align:top;max-inline-size:calc(100% - var(--font-size-med) - var(--space-8));display:inline-block}:where([data-text-reveal]:hover,[data-text-reveal]:focus-within) ._1jsyd8sj{max-inline-size:none;display:inline}@media (forced-colors:active){._1jsyd8s0{color:canvastext;background-color:canvas;border-color:canvastext}}}
|
package/dist/Tag/Tag.css.mjs
CHANGED
|
@@ -24,15 +24,15 @@ var t = "_1jsyd8s0", n = "_1jsyd8s1", r = "_1jsyd8s2", i = "_1jsyd8s3", a = e({
|
|
|
24
24
|
compoundVariants: []
|
|
25
25
|
}), o = {
|
|
26
26
|
start: {
|
|
27
|
-
|
|
27
|
+
xs: "_1jsyd8sd",
|
|
28
28
|
med: "_1jsyd8se"
|
|
29
29
|
},
|
|
30
30
|
end: {
|
|
31
|
-
|
|
31
|
+
xs: "_1jsyd8sf",
|
|
32
32
|
med: "_1jsyd8sg"
|
|
33
33
|
},
|
|
34
34
|
clip: {
|
|
35
|
-
|
|
35
|
+
xs: "_1jsyd8sh",
|
|
36
36
|
med: "_1jsyd8si"
|
|
37
37
|
},
|
|
38
38
|
reveal: "_1jsyd8sj"
|
package/dist/Tag/index.mjs
CHANGED
|
@@ -17,28 +17,33 @@ function h(e) {
|
|
|
17
17
|
}
|
|
18
18
|
var g = {
|
|
19
19
|
sm: {
|
|
20
|
+
step: "xs",
|
|
21
|
+
leading: "meta",
|
|
20
22
|
paddingInlineStart: "6",
|
|
21
23
|
paddingInlineEnd: "6"
|
|
22
24
|
},
|
|
23
25
|
med: {
|
|
26
|
+
step: "med",
|
|
27
|
+
leading: void 0,
|
|
24
28
|
paddingInlineStart: "8",
|
|
25
29
|
paddingInlineEnd: "8"
|
|
26
30
|
}
|
|
27
31
|
};
|
|
28
|
-
function _({ variant: _ = "neutral", size: v = "med", href: y, iconStart: b, iconEnd: x, onRemove: S, removeLabel: C, display: w = "inline-flex", alignItems: T = "center", gap: E = "2", minBlockSize: D = "xs", paddingInlineStart: O = g[v].paddingInlineStart, paddingInlineEnd: k = S ? "2" : g[v].paddingInlineEnd, borderRadius: A = "
|
|
32
|
+
function _({ variant: _ = "neutral", size: v = "med", href: y, iconStart: b, iconEnd: x, onRemove: S, removeLabel: C, display: w = "inline-flex", alignItems: T = "center", gap: E = "2", minBlockSize: D = "xs", paddingInlineStart: O = g[v].paddingInlineStart, paddingInlineEnd: k = S ? "2" : g[v].paddingInlineEnd, borderRadius: A = "xs", backgroundColor: j = o[_].backgroundColor, color: M = o[_].color, maxInlineSize: N, className: P, style: F, children: I, ...L }) {
|
|
29
33
|
if (I == null || typeof I == "boolean" || I === "" || h(I) === "") return null;
|
|
30
34
|
let R = a(N, F), z = /* @__PURE__ */ p(r, {
|
|
31
35
|
as: "span",
|
|
32
36
|
className: c,
|
|
33
37
|
font: "label",
|
|
38
|
+
leading: g[v].leading,
|
|
34
39
|
paddingBlock: R ? void 0 : "4",
|
|
35
|
-
size: v,
|
|
40
|
+
size: g[v].step,
|
|
36
41
|
truncate: R,
|
|
37
42
|
weight: "medium",
|
|
38
43
|
children: i({
|
|
39
44
|
iconStart: b,
|
|
40
45
|
iconEnd: x,
|
|
41
|
-
size: v,
|
|
46
|
+
size: g[v].step,
|
|
42
47
|
styles: d,
|
|
43
48
|
truncate: R,
|
|
44
49
|
children: I
|
|
@@ -76,7 +81,7 @@ function _({ variant: _ = "neutral", size: v = "med", href: y, iconStart: b, ico
|
|
|
76
81
|
className: "_1jsyd8s3",
|
|
77
82
|
flexShrink: 0,
|
|
78
83
|
onClick: S,
|
|
79
|
-
children: /* @__PURE__ */ p(s, { size: v })
|
|
84
|
+
children: /* @__PURE__ */ p(s, { size: g[v].step })
|
|
80
85
|
})]
|
|
81
86
|
});
|
|
82
87
|
}
|
|
@@ -12,6 +12,6 @@ export interface ContrastFailure extends ContrastPair {
|
|
|
12
12
|
ratio: number;
|
|
13
13
|
}
|
|
14
14
|
export declare const contrastPairs: readonly ContrastPair[];
|
|
15
|
-
export declare function contrastRatio(fg: string, bg: string, mode?: Mode): number;
|
|
15
|
+
export declare function contrastRatio(fg: string, bg: string, mode?: Mode, over?: string): number;
|
|
16
16
|
export declare function checkContrast(brand: Brand): ContrastFailure[];
|
|
17
17
|
export type { Mode };
|
|
@@ -39,8 +39,9 @@ var i = [
|
|
|
39
39
|
function l({ r: e, g: n, b: r }) {
|
|
40
40
|
return .2126 * t(e) + .7152 * t(n) + .0722 * t(r);
|
|
41
41
|
}
|
|
42
|
-
function u(e, t, r = "light") {
|
|
43
|
-
|
|
42
|
+
function u(e, t, r = "light", i) {
|
|
43
|
+
let a = n(t, r);
|
|
44
|
+
return f(n(e, r), i ? d(a, n(i, r)) : a, t);
|
|
44
45
|
}
|
|
45
46
|
function d(e, t) {
|
|
46
47
|
let n = (t, n) => t * e.alpha + n * (1 - e.alpha);
|
package/dist/contrast/mixes.mjs
CHANGED
|
@@ -1,31 +1,41 @@
|
|
|
1
1
|
import { fills as e } from "../styles/button-fills.mjs";
|
|
2
2
|
import { subtleFills as t } from "../styles/subtle-fills.mjs";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { overlayRoles as n } from "../tokens/roles.mjs";
|
|
4
|
+
import { contrastRatio as r, surfaces as i } from "./contrast.mjs";
|
|
5
|
+
import { highlightFill as a, highlightText as o } from "../styles/highlight.mjs";
|
|
6
|
+
import { hoverFill as s } from "../styles/hover-tint.mjs";
|
|
6
7
|
// src/contrast/mixes.ts
|
|
7
|
-
var
|
|
8
|
+
var c = (e) => n.includes(e), l = [
|
|
8
9
|
{
|
|
9
10
|
name: "Menu highlight",
|
|
10
|
-
fill:
|
|
11
|
-
text:
|
|
11
|
+
fill: a,
|
|
12
|
+
text: o,
|
|
12
13
|
min: 4.5
|
|
13
14
|
},
|
|
14
|
-
...Object.entries(e).flatMap(([e, { backgroundColor: t, color: n }]) =>
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
...Object.entries(e).flatMap(([e, { backgroundColor: t, color: n }]) => {
|
|
16
|
+
let r = [n];
|
|
17
|
+
return t && !c(t) ? [{
|
|
18
|
+
name: `${e} Button hover`,
|
|
19
|
+
fill: (e) => s(e.fg, e[t]),
|
|
20
|
+
text: r,
|
|
21
|
+
min: 4.5
|
|
22
|
+
}] : i.map((n) => ({
|
|
23
|
+
name: `${e} Button hover on ${n}`,
|
|
24
|
+
fill: (e) => s(e.fg, e[t ?? n]),
|
|
25
|
+
...t && { over: n },
|
|
26
|
+
text: r,
|
|
27
|
+
min: 4.5
|
|
28
|
+
}));
|
|
29
|
+
}),
|
|
20
30
|
{
|
|
21
31
|
name: "pressed Chip hover",
|
|
22
|
-
fill: (e) =>
|
|
32
|
+
fill: (e) => s(e.fg, e.accent),
|
|
23
33
|
text: ["accentFg"],
|
|
24
34
|
min: 4.5
|
|
25
35
|
},
|
|
26
|
-
...
|
|
36
|
+
...i.map((e) => ({
|
|
27
37
|
name: `Table row hover on ${e}`,
|
|
28
|
-
fill: (t) =>
|
|
38
|
+
fill: (t) => s(t.fg, t[e], "5%"),
|
|
29
39
|
text: e === "bgMuted" || e === "bgPanel" ? ["fg", "fgMuted"] : [
|
|
30
40
|
"fg",
|
|
31
41
|
"fgMuted",
|
|
@@ -39,19 +49,19 @@ var s = [
|
|
|
39
49
|
})),
|
|
40
50
|
...Object.entries(t).map(([e, { backgroundColor: t, color: n }]) => ({
|
|
41
51
|
name: `${e} Table row hover`,
|
|
42
|
-
fill: (e) =>
|
|
52
|
+
fill: (e) => s(e.fg, e[t], "5%"),
|
|
43
53
|
text: [n],
|
|
44
54
|
min: 4.5
|
|
45
55
|
}))
|
|
46
56
|
];
|
|
47
|
-
function
|
|
48
|
-
return ["light", "dark"].flatMap((t) =>
|
|
49
|
-
let
|
|
57
|
+
function u(e) {
|
|
58
|
+
return ["light", "dark"].flatMap((t) => l.flatMap(({ name: n, fill: i, text: a, min: o, over: s }) => {
|
|
59
|
+
let c = i(e.color), l = s && e.color[s];
|
|
50
60
|
return a.flatMap((i) => {
|
|
51
|
-
let a =
|
|
61
|
+
let a = r(e.color[i], c, t, l);
|
|
52
62
|
return a < o ? [{
|
|
53
63
|
fg: i,
|
|
54
|
-
mix:
|
|
64
|
+
mix: n,
|
|
55
65
|
min: o,
|
|
56
66
|
mode: t,
|
|
57
67
|
ratio: a
|
|
@@ -59,4 +69,4 @@ function c(e) {
|
|
|
59
69
|
});
|
|
60
70
|
}));
|
|
61
71
|
}
|
|
62
|
-
export {
|
|
72
|
+
export { u as checkMixes, l as contrastMixes };
|
package/dist/docs/AlertDialog.md
CHANGED
|
@@ -109,6 +109,7 @@ Generated from the TypeScript types.
|
|
|
109
109
|
| `id` | `string` | no | ID of the trigger. In addition to being forwarded to the rendered element, it is also used to specify the active trigger for the dialog in controlled mode (with the DialogRoot `triggerId` prop). |
|
|
110
110
|
| `payload` | `unknown` | no | A payload to pass to the dialog when it is opened. |
|
|
111
111
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
112
|
+
| `uppercase` | `boolean` | no | |
|
|
112
113
|
| `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
|
|
113
114
|
|
|
114
115
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Badge.md
CHANGED
|
@@ -23,7 +23,7 @@ A static label that states the status of, or a short fact about, the thing besid
|
|
|
23
23
|
|
|
24
24
|
- `variant`: `neutral` (default, `fgMuted` on `bgMuted`) for most statuses and facts; `accent` (`accentFg` on `accent`) to draw the eye; `success` (`successFg` on `success`) for a passing or healthy state; `warning` (`warningFg` on `warning`) for one that needs attention soon; `danger` (`dangerFg` on `danger`) for a failure or a blocked state; `done` (`doneFg` on `done`, violet) for finished work, such as a merged PR or a closed issue.
|
|
25
25
|
- `subtle`: `false` (default) is the solid fill above; `true` swaps it for the variant's tint, `<variant>SubtleFg` on `<variant>Subtle` (`neutralSubtleFg` on `neutralSubtle` and so on). Use subtle where many badges sit together, such as a list or a board, so each one stays calm and the color still means one thing; keep solid for the one status that should stand out.
|
|
26
|
-
- `size`: `xs`, `sm` or `med` (default),
|
|
26
|
+
- `size`: `xs`, `sm` or `med` (default). `xs` and `sm` set meta text, a 12/16 medium label with 6px inline padding (ADR 0157, 0164); `xs` has 2px block padding and `sm` 4px, so `xs` is the shorter pill. `med` is a 16px label, 8px by 6px. Use `xs` in dense rows and narrow table cells, such as a board column of status pills; `sm` beside meta text, such as counts and timestamps; `med` elsewhere. 12px is the smallest readable label.
|
|
27
27
|
- The label states the state. Color is never the only cue (WCAG 1.4.1): under forced colors every variant, `success` and `warning` included, is the same outlined box, and some readers cannot tell the fills apart (green from red above all). Write "Failed" or "Passed", not a red or green badge reading "3".
|
|
28
28
|
- `iconStart` and `iconEnd` take an icon component (a generated `GitMergeIcon` from `@jonmilner/ui/icons`, or a component that renders `Icon`), not an element. Badge renders it inline in the label at the badge's text step, spaced from the words and centred on their cap height, so the badge keeps the height it has without one (ADR 0044, 0152). The icons are decorative (`aria-hidden`); the label states the state. Do not put an `Icon` in the children: it renders as a block and breaks the line.
|
|
29
29
|
- Keep it to one or two words; it never wraps. A cap, `maxInlineSize` as the style prop or in `style` (Tag's rule: a step, `full`, or a `style` length), cuts the label to one line with an ellipsis; the end icon stays in view after it. A badge has no hover or focus, so a cut label never shows its whole text: cap one only where the full text is also elsewhere. With no children it renders nothing.
|
|
@@ -61,7 +61,7 @@ A static label that states the status of, or a short fact about, the thing besid
|
|
|
61
61
|
```
|
|
62
62
|
|
|
63
63
|
```tsx
|
|
64
|
-
// A narrow board column or table cell: xs is the
|
|
64
|
+
// A narrow board column or table cell: xs is the shorter pill, 12px with 2px block padding.
|
|
65
65
|
<Badge size="xs" subtle variant="warning">
|
|
66
66
|
Changes requested
|
|
67
67
|
</Badge>
|
package/dist/docs/Button.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
The labelled action: a `<button type="button">` with the house look, or a link styled as one with `as="a"` (or a router's link). Four variants (`primary`, `secondary`, `ghost`, `danger`), three sizes (`sm`, `med`, `lg`, 24, 32 and 40 px high, ADR 0124), a `loading` state that keeps its width, and icon slots before and after the label. It
|
|
5
|
+
The labelled action: a `<button type="button">` with the house look, or a link styled as one with `as="a"` (or a router's link). Four variants (`primary`, `secondary`, `ghost`, `danger`), three sizes (`sm`, `med`, `lg`, 24, 32 and 40 px high, ADR 0124), a `loading` state that keeps its width, and icon slots before and after the label. It takes the control radius (`sm`, 6px, ADR 0162) and a sentence-case label at weight 500; only `primary` glows, softly in its fill (ADR 0131, 0163). It is built on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` / `aria-busy` states that block activation while the button stays focusable.
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
@@ -19,17 +19,18 @@ The labelled action: a `<button type="button">` with the house look, or a link s
|
|
|
19
19
|
## Rules
|
|
20
20
|
|
|
21
21
|
- `primary` marks the one action a view or dialog exists for; everything else is `secondary`, the default. One primary per group. Its fill is `accentFill` with `accentFillFg` text (ADR 0119): light text on a solid accent in both modes, 4.5:1 at rest and on hover.
|
|
22
|
-
- `secondary` is
|
|
22
|
+
- `secondary` is the quiet look: the `controlFill` overlay (`fg` at 5% over whatever surface is below) with `fg` text inside a 1px `border`, and no glow. It reads on `bg`, `bgMuted`, `bgRaised` and `bgPanel` alike.
|
|
23
23
|
- `ghost` is the tertiary action: no fill, no border, no glow, only the hover tint. Use it beside a `secondary` for the least important action ("Skip", "Clear"), or inside another control that already frames it. Its text sits on the surface behind it, so place it on `bg`, `bgMuted` or `bgRaised`.
|
|
24
|
-
- `danger` (`dangerFg` on `danger`, ADR 0060) replaces `primary` when that action destroys data or cannot be undone, such as a confirm dialog's "Delete project". It takes `primary`'s place, so a group has one `primary` or one `danger`, not both. The label names the consequence ("Delete project", not "OK"): under forced colors `danger` looks like `primary`, so the word carries the meaning, not the color. Confirm before an irreversible action runs; `danger` does not.
|
|
24
|
+
- `danger` (`dangerFg` on `danger`, ADR 0060), with no glow, replaces `primary` when that action destroys data or cannot be undone, such as a confirm dialog's "Delete project". It takes `primary`'s place, so a group has one `primary` or one `danger`, not both. The label names the consequence ("Delete project", not "OK"): under forced colors `danger` looks like `primary`, so the word carries the meaning, not the color. Confirm before an irreversible action runs; `danger` does not.
|
|
25
25
|
- Sizes are `sm`, `med` (default) and `lg`, never `md`. `sm`, `med` and `lg` are 24, 32 and 40px high; the label and the icons take the `fontSize` step one below the `size` (`xs`, `sm`, `med`: 12, 14 and 16px).
|
|
26
26
|
- `loading` renders `aria-busy="true"`, blocks clicks, Enter and Space, and swaps the label for three pulsing dots in the same space: the width never changes, and the label stays the accessible name. A label narrower than the dots (one character, such as a page number) widens by a few pixels; give such buttons a fixed `minInlineSize`. Announce the outcome elsewhere (a toast or a status message); `aria-busy` alone is not announced.
|
|
27
27
|
- `disabled` renders `aria-disabled="true"` and a dashed border, never the native `disabled`: the button stays focusable and announced. Say why it is disabled nearby when it is not obvious.
|
|
28
28
|
- `iconStart` and `iconEnd` take an icon component (a generated `ArrowRightIcon`, or a component that renders `Icon`), not an element: Button renders it at its text size. The icons are decorative; the label names the button.
|
|
29
|
-
- Children are the label, rendered inside
|
|
30
|
-
-
|
|
31
|
-
-
|
|
32
|
-
-
|
|
29
|
+
- Children are the label, rendered inside `Text` at weight 500 (`medium`); pass a string in sentence case, not your own `Text` or `Icon`.
|
|
30
|
+
- `uppercase` opts into an uppercase label, cased in CSS only: the DOM text, and so Testing Library queries such as `getByRole`, keep the source case. Chromium's accessibility tree exposes the uppercase text, so a screen reader there may spell out a short label such as "OK"; prefer a word. The default is sentence case (ADR 0163).
|
|
31
|
+
- Fill (`backgroundColor`), text color (`color`), height (`minBlockSize`), `paddingBlock` (which keeps a wrapped label off the border), `paddingInline`, `borderRadius` (`sm`) and `gap` (between icons and label) are default style props: pass one to change it. Hover tints whatever the fill is (not under forced colors, where hover keeps only the pointer cue); the disabled look is component CSS keyed off `aria-disabled`, so it wins over a custom fill. A custom fill needs a text color that passes 4.5:1 on it.
|
|
32
|
+
- `primary`'s glow is soft at rest and stronger on hover, on keyboard focus and while open; a disabled button has none. It is a `box-shadow` below the style props, so a `boxShadow` prop replaces it. The other variants have none.
|
|
33
|
+
- With `aria-expanded="true"` (a Menu or Dialog trigger while its popup is open, or your own disclosure button), a live button holds the hover tint and draws a 1px inset ring in its text color, inside `primary`'s strong glow: a shape cue, kept under forced colors, that takes no layout space (ADR 0063). While open, the ring (and `primary`'s glow) replace a custom `boxShadow`.
|
|
33
34
|
- `type="submit"` for a form's submit button; otherwise it is `type="button"`.
|
|
34
35
|
- Server-safe: Button has no hooks; `Clickable` inside it is the client boundary.
|
|
35
36
|
|
|
@@ -77,7 +78,7 @@ The labelled action: a `<button type="button">` with the house look, or a link s
|
|
|
77
78
|
|
|
78
79
|
- A button that goes somewhere is a link (`as="a"` with `href`); one that does something is a button.
|
|
79
80
|
- Disabled and loading buttons stay in the tab order, so keyboard and screen reader users find them; Enter and Space do nothing while either is set. The blocked click still bubbles to an ancestor's `onClick` (see Clickable's Rules).
|
|
80
|
-
- State is never color alone: disabled adds a dashed border, loading shows the dots. Under forced colors the button keeps its system colors (`LinkText` fill for `primary` and `danger`, a `
|
|
81
|
+
- State is never color alone: disabled adds a dashed border, loading shows the dots. Under forced colors the button keeps its system colors (`LinkText` fill for `primary` and `danger`, a `ButtonFace` fill with `ButtonText` text and a `CanvasText` border for `secondary`, a `CanvasText` border for `ghost`) and a disabled one is `GrayText`. Hover draws no tint and `primary`'s glow is gone there, so the system pairs keep their contrast.
|
|
81
82
|
- Under reduced motion the dots hold still.
|
|
82
83
|
- Text on every variant passes 4.5:1 at rest and on hover in light and dark modes.
|
|
83
84
|
|
|
@@ -96,6 +97,7 @@ Generated from the TypeScript types.
|
|
|
96
97
|
| `iconStart` | `ComponentType` | no | |
|
|
97
98
|
| `loading` | `boolean` | no | |
|
|
98
99
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
100
|
+
| `uppercase` | `boolean` | no | |
|
|
99
101
|
| `variant` | `"danger" \| "ghost" \| "primary" \| "secondary"` | no | |
|
|
100
102
|
|
|
101
103
|
Also accepts every `<button>` attribute (change the element with `as`) and the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Dialog.md
CHANGED
|
@@ -24,7 +24,7 @@ A modal panel over the page for one short task: edit a name, fill a small form,
|
|
|
24
24
|
- `size` (`sm`, `med`, `lg`; `med` by default) sets the width, 384, 512 or 640 px at the default font size; the panel never gets wider than the viewport less a 16 px edge.
|
|
25
25
|
- Put the content in `Dialog.Body`. When the dialog outgrows the viewport the whole popup scrolls; keep the content short so the actions stay close.
|
|
26
26
|
- `Dialog.Actions` end-aligns its buttons and wraps them on a narrow screen. Put `Dialog.Close` first, then one primary `Button`. A dialog with no buttons still closes on Esc and the backdrop, but give it a `Dialog.Close` so a pointer user sees the way out.
|
|
27
|
-
- `Dialog.Trigger` and `Dialog.Close` are bare `Clickable`s. Pass Button's `variant`, `size`, `iconStart` or `
|
|
27
|
+
- `Dialog.Trigger` and `Dialog.Close` are bare `Clickable`s. Pass Button's `variant`, `size`, `iconStart`, `iconEnd` or `uppercase` for a button look (`variant="secondary"` on Close); they render a `Button` with its fill, border and height, and keep the part's behavior and `aria-disabled`. Without them, style them with style props and give them an accessible name.
|
|
28
28
|
- `disabled` on the trigger keeps it focusable and announced, and stops it opening.
|
|
29
29
|
- Control it with `open` and `onOpenChange` to close it after a save or keep it open on an error. `onOpenChangeComplete` runs once the exit transition ends.
|
|
30
30
|
- The popup portals into the trigger's nearest `ThemeProvider`, so it keeps the brand and mode. That provider must not clip or stack its content: wrap the app root, and keep a nested provider off elements with `overflow: hidden`, a `transform` or their own `z-index`. It sits on `zIndex` `modal`. A dialog opened only through `open`, with no `Dialog.Trigger`, has no provider to find and portals to `<body>`.
|
|
@@ -136,6 +136,7 @@ Also accepts the style props (see `manifest.json` `styleProps`).
|
|
|
136
136
|
| `iconEnd` | `ComponentType` | no | |
|
|
137
137
|
| `iconStart` | `ComponentType` | no | |
|
|
138
138
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
139
|
+
| `uppercase` | `boolean` | no | |
|
|
139
140
|
| `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
|
|
140
141
|
|
|
141
142
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
|
@@ -162,6 +163,7 @@ Also accepts the style props (see `manifest.json` `styleProps`).
|
|
|
162
163
|
| `id` | `string` | no | ID of the trigger. In addition to being forwarded to the rendered element, it is also used to specify the active trigger for the dialog in controlled mode (with the DialogRoot `triggerId` prop). |
|
|
163
164
|
| `payload` | `unknown` | no | A payload to pass to the dialog when it is opened. |
|
|
164
165
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
166
|
+
| `uppercase` | `boolean` | no | |
|
|
165
167
|
| `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
|
|
166
168
|
|
|
167
169
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/IconButton.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
A compact button whose only visible content is an icon, for an action the icon makes plain: close, edit, refresh. A required `label` names it for assistive technology (`aria-label`); the icon is decorative. It is a `<button type="button">` on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` that blocks activation while the button stays focusable. Three variants from Button's fills (`
|
|
5
|
+
A compact button whose only visible content is an icon, for an action the icon makes plain: close, edit, refresh. A required `label` names it for assistive technology (`aria-label`); the icon is decorative. It is a `<button type="button">` on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` that blocks activation while the button stays focusable. Three variants from Button's fills (`ghost`, the default, `secondary` and `primary`), each a square at the control radius (`sm`, 6px, ADR 0162), with Button's glow on `primary` only (ADR 0131, 0163), and three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
@@ -20,11 +20,11 @@ A compact button whose only visible content is an icon, for an action the icon m
|
|
|
20
20
|
|
|
21
21
|
- `label` is required and is the accessible name: say what the button does ("Close dialog", "Refresh results"), not what the icon shows ("X", "Arrows"). Never pass an empty string: the button would have no name. `aria-label`, `aria-labelledby` and children are not props; a raw one is ignored.
|
|
22
22
|
- `icon` takes an icon component (a generated `XIcon`, or a component that renders `Icon`), not an element: IconButton renders it at the `fontSize` step one below its `size` (12, 14 and 16px at `sm`, `med`, `lg`), as Button's icons, `aria-hidden`.
|
|
23
|
-
- `variant`: `
|
|
24
|
-
- `size`: `sm`, `med` (default) or `lg`, never `md`. Each is a
|
|
23
|
+
- `variant`: `ghost` (default), a muted ghost: no fill, border or glow, an `fgMuted` icon that turns `fg` on hover, keyboard focus and while open, for most icon actions, toolbars and controls that already frame it (SearchField's clear button). `secondary`, Button's quiet `controlFill` look, for an icon action that needs a visible frame; `primary` for the one action a view or dialog exists for. There is no `tone` and no `danger`: a destructive action deserves a labelled `Button` (ADR 0163).
|
|
24
|
+
- `size`: `sm`, `med` (default) or `lg`, never `md`. Each is a square as wide as Button's height of the same name (24, 32 and 40px), so an IconButton lines up with a Button beside it.
|
|
25
25
|
- `disabled` renders `aria-disabled="true"` and a dashed border, never the native `disabled`. There is no `loading` and no tooltip in v0.1.
|
|
26
26
|
- With `aria-expanded="true"`, as a Dialog trigger sets it, it holds the hover tint and an inset ring while the popup is open, as Button does.
|
|
27
|
-
- Fill (`backgroundColor`), text color (`color`), width (`minInlineSize`), height (`minBlockSize`) and `borderRadius` (`
|
|
27
|
+
- Fill (`backgroundColor`), text color (`color`), width (`minInlineSize`), height (`minBlockSize`) and `borderRadius` (`sm`) are default style props: pass one to change it. Change width and height together to keep the square. A `color` replaces the muted ghost's `fgMuted` and its `fg` on hover. `primary`'s glow gives way to a `boxShadow` prop, as on Button. Hover tints whatever the fill is; a custom fill needs an icon color that passes 3:1 on it (4.5:1 to match Button).
|
|
28
28
|
- `as="a"` with `href` for an icon-only link.
|
|
29
29
|
- Server-safe: IconButton has no hooks; `Clickable` inside it is the client boundary.
|
|
30
30
|
|
|
@@ -63,7 +63,7 @@ A compact button whose only visible content is an icon, for an action the icon m
|
|
|
63
63
|
- The `label` is announced as the button's name; the icon is hidden from assistive technology.
|
|
64
64
|
- The label is not shown on hover or focus. Sighted users who don't recognise the icon get no text, so keep IconButton to widely understood icons.
|
|
65
65
|
- A disabled IconButton stays in the tab order, and Enter and Space do nothing; the blocked click still bubbles to an ancestor's `onClick` (see Clickable's Rules). State is never color alone: disabled adds a dashed border.
|
|
66
|
-
- Every size is at least 24 by 24 CSS px (WCAG 2.2 target size); the icon on each variant passes 4.5:1 at rest and on hover in light and dark modes. Under forced colors it keeps Button's system colors, `ghost`'s `CanvasText` border included, and drops
|
|
66
|
+
- Every size is at least 24 by 24 CSS px (WCAG 2.2 target size); the icon on each variant passes 4.5:1 at rest and on hover in light and dark modes. Under forced colors it keeps Button's system colors, `ghost`'s `CanvasText` border included, and drops `primary`'s glow.
|
|
67
67
|
|
|
68
68
|
## Props
|
|
69
69
|
|
package/dist/docs/Menu.md
CHANGED
|
@@ -21,8 +21,8 @@ A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a
|
|
|
21
21
|
|
|
22
22
|
- Compose the parts: `Menu` > `Menu.Trigger` + `Menu.Popup` > `Menu.Item`, `Menu.LinkItem`, `Menu.Separator`, `Menu.Group`. `Menu` holds the open state and renders no element, so it takes no `className` or `style`; every other part does, plus style props.
|
|
23
23
|
- `Menu.Trigger` is a bare `Clickable`: give it its look with style props (or your own class), and an accessible name.
|
|
24
|
-
- For an icon-only trigger ("More actions"), pass `icon` and `label`: it renders an `IconButton`, the same square as one at each `size` (`sm`, `med`, `lg`; `med` by default), named by `label`, with IconButton's `variant` (`
|
|
25
|
-
- For a trigger that reads as a button ("Actions", "New"), pass Button's `variant`, `size`, `iconStart` or `
|
|
24
|
+
- For an icon-only trigger ("More actions"), pass `icon` and `label`: it renders an `IconButton`, the same square as one at each `size` (`sm`, `med`, `lg`; `med` by default), named by `label`, with IconButton's `variant` (the muted `ghost` by default, ADR 0163) and the open look below. It takes no children, `iconStart`, `iconEnd` or `aria-label` (ADR 0123). Never build one from `iconStart` and `aria-label`: Button's padding makes it wider than the IconButtons beside it.
|
|
25
|
+
- For a trigger that reads as a button ("Actions", "New"), pass Button's `variant`, `size`, `iconStart`, `iconEnd` or `uppercase` (a `ChevronDownIcon` for "Actions ▾"): it renders a `Button`, with its fill, border and height, and keeps the trigger's behavior and `aria-disabled`. While the menu is open it shows Button's open look, a held tint and an inset ring (ADR 0063); a bare trigger has none, so style it yourself off `aria-expanded`. Style props still override the defaults.
|
|
26
26
|
- `Menu.Item` runs its `onClick` on click, Enter and Space, then the menu closes. Pass `closeOnClick={false}` to keep it open.
|
|
27
27
|
- `Menu.LinkItem` is a real `<a role="menuitem">` for an entry that goes somewhere. `href` is required; `target`, `rel` and `download` pass through. Hover shows the URL, Cmd/Ctrl-click and middle-click open a new tab, and a click, Enter or Space follows it and closes the menu. Never navigate from a `Menu.Item`'s `onClick` (`location.assign`, a router's `navigate`): it loses all of that. Router-aware (client-side) links are not offered. It takes no `variant`.
|
|
28
28
|
- `variant="danger"` marks a destructive item. It still runs on one click, so open a confirm dialog from it (Cancel focused first) before anything irreversible happens.
|
|
@@ -250,6 +250,7 @@ Also accepts the style props (see `manifest.json` `styleProps`).
|
|
|
250
250
|
| `openOnHover` | `boolean` | no | Whether the menu should also open when the trigger is hovered. |
|
|
251
251
|
| `payload` | `unknown` | no | A payload to pass to the menu when it is opened. |
|
|
252
252
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
253
|
+
| `uppercase` | `boolean` | no | |
|
|
253
254
|
| `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
|
|
254
255
|
|
|
255
256
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/Tag.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Purpose
|
|
4
4
|
|
|
5
|
-
A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `
|
|
5
|
+
A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `xs` (4px) radius (a small mark's step in `docs/shape.md`, so wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable.
|
|
6
6
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
@@ -20,7 +20,7 @@ A label that puts content in a category: a topic, a label, a user-made category.
|
|
|
20
20
|
|
|
21
21
|
## Rules
|
|
22
22
|
|
|
23
|
-
- `size`: `sm` or `med` (default),
|
|
23
|
+
- `size`: `sm` or `med` (default). `sm` sets meta text, a 12/16 medium label with 6px inline padding (ADR 0157, 0164), for dense lists and beside meta text; `med` is a 16px label with 8px inline padding. Both are 24px tall on one line.
|
|
24
24
|
- `iconStart` and `iconEnd` take an icon component (a generated `InboxIcon` from `@jonmilner/ui/icons`, or a component that renders `Icon`), not an element. Tag renders it inline in the label (inside the link, with `href`) at the label's text step, spaced from the words and centred on their cap height, so the tag keeps the height it has without one (ADR 0044, 0152). The icons are decorative (`aria-hidden`): they are not in the link's or the remove button's name. A truncated label keeps its end icon in view after the ellipsis.
|
|
25
25
|
- `variant`: the tone's subtle fill, `<variant>SubtleFg` on `<variant>Subtle`. `neutral` (default) for most categories; `accent`, `success`, `warning`, `danger` and `done` only where the category has a meaning those colors already carry in the app, as Badge's variants do. Tag has no solid fills: a category label stays calm (ADR 0121). The tone is never the only cue: the label names the category.
|
|
26
26
|
- Read-only is the default. `href` makes the label a link (a `Clickable` `<a>` around the text, underlined). The tag itself stays a `span`, so a remove button never nests in the link.
|
package/dist/docs/Tooltip.md
CHANGED
|
@@ -22,7 +22,7 @@ A short hint about a control that shows on hover after a delay and at once on ke
|
|
|
22
22
|
|
|
23
23
|
- Compose the parts: `Tooltip` > `Tooltip.Trigger` + `Tooltip.Popup`. `Tooltip` holds the open state (`open`, `defaultOpen`, `onOpenChange`, `disabled`) and renders no element, so it takes no `className` or `style`; the trigger and popup take both, plus style props.
|
|
24
24
|
- `disabled` on `Tooltip` switches the tooltip off: it never opens, and the trigger drops its `aria-describedby`, so a screen reader hears no description a sighted user cannot open.
|
|
25
|
-
- `Tooltip.Trigger` is a bare `Clickable`, a `<button>` around your content: style it with style props or your own class. A button holds only inline content, so give a `Text` in it `as="span"`. With Button's `variant`, `size`, `iconStart` or `
|
|
25
|
+
- `Tooltip.Trigger` is a bare `Clickable`, a `<button>` around your content: style it with style props or your own class. A button holds only inline content, so give a `Text` in it `as="span"`. With Button's `variant`, `size`, `iconStart`, `iconEnd` or `uppercase` it renders a `Button`. It needs its own accessible name (its text, or `aria-label`); the tooltip is its description, never its name.
|
|
26
26
|
- `disabled` on the trigger renders `aria-disabled`: it stays focusable and its tooltip still shows, so it can say why the control is disabled.
|
|
27
27
|
- `delay` (600ms by default) and `closeDelay` on the trigger change the hover timing. Focus always opens it at once.
|
|
28
28
|
- The trigger's `aria-describedby` names the popup first, then any you pass. The popup's `id` and `role` are the Tooltip's own, not props.
|
|
@@ -170,6 +170,7 @@ Also accepts the style props (see `manifest.json` `styleProps`).
|
|
|
170
170
|
| `iconEnd` | `ComponentType` | no | |
|
|
171
171
|
| `iconStart` | `ComponentType` | no | |
|
|
172
172
|
| `size` | `"lg" \| "med" \| "sm"` | no | |
|
|
173
|
+
| `uppercase` | `boolean` | no | |
|
|
173
174
|
| `variant` | `"ghost" \| "primary" \| "secondary"` | no | |
|
|
174
175
|
|
|
175
176
|
Also accepts the style props (see `manifest.json` `styleProps`).
|
package/dist/docs/llms.txt
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- [Avatar](Avatar.md): Identifies a person, project or account by one or two letters in a circle, tinted by a hue or filled with a colour of the consumer's choosing, or on a neutral fill. A `span` with `role="img"`, named by `label`, around a `Text` in the `label` font. It is never focusable.
|
|
16
16
|
- [Badge](Badge.md): A static label that states the status of, or a short fact about, the thing beside it: "Draft", "Failed", "Beta". A `span` with a fill from the color roles around a `Text` in the `label` font. It has no role and is never focusable.
|
|
17
17
|
- [Box](Box.md): The base element every component builds on: one element, chosen with `as`, styled with style props. Style props are the token-backed classes from `@layer atoms`: layout (`display`, flex, `gap`, logical padding, margin and sizing), color roles, `borderRadius`, `boxShadow`, `position`, `zIndex`, `overflow` and `textAlign`.
|
|
18
|
-
- [Button](Button.md): The labelled action: a `<button type="button">` with the house look, or a link styled as one with `as="a"` (or a router's link). Four variants (`primary`, `secondary`, `ghost`, `danger`), three sizes (`sm`, `med`, `lg`, 24, 32 and 40 px high, ADR 0124), a `loading` state that keeps its width, and icon slots before and after the label. It
|
|
18
|
+
- [Button](Button.md): The labelled action: a `<button type="button">` with the house look, or a link styled as one with `as="a"` (or a router's link). Four variants (`primary`, `secondary`, `ghost`, `danger`), three sizes (`sm`, `med`, `lg`, 24, 32 and 40 px high, ADR 0124), a `loading` state that keeps its width, and icon slots before and after the label. It takes the control radius (`sm`, 6px, ADR 0162) and a sentence-case label at weight 500; only `primary` glows, softly in its fill (ADR 0131, 0163). It is built on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` / `aria-busy` states that block activation while the button stays focusable.
|
|
19
19
|
- [Checkbox](Checkbox.md): A two-state choice, with a third mixed state for a "select all" over a partly selected list. Built on Base UI `Checkbox` (ADR 0003, 0046): a `span` with `role="checkbox"` and `aria-checked`, plus a hidden `<input type="checkbox">` that submits with the form. The span is a 24 by 24 CSS px target (WCAG 2.2) with the shared focus ring; the 16px box inside fills and shows a tick when checked, a dash when mixed. It composes `Field` for its label, description and error (ADR 0026).
|
|
20
20
|
- [Chip](Chip.md): A toggle that filters content or picks an option: "Unread", "Starred", "Medium". A `<button>` with `aria-pressed` on `Clickable`, built on Base UI `Toggle`; `ChipGroup` is a Base UI `ToggleGroup` of chips that share one state. If it changes state when clicked, it's a chip.
|
|
21
21
|
- [Clickable](Clickable.md): The low-level base for everything a user presses: a `<button type="button">` by default, or a link with `as="a"` (or a router's link component). It brings the shared focus ring, a 24 by 24 CSS px minimum target (WCAG 2.2), `disabled` and `busy` states as ARIA attributes, and no look of its own: the button and link chrome is stripped. `Button`, `IconButton` and link components are built on it.
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
- [Field](Field.md): Wires one form control to its label, description and error: ids, `htmlFor`, `aria-describedby` and `aria-invalid`. It is input-agnostic: the control inside is Base UI's `Field.Control` or a Base UI control (Checkbox, Combobox), and Base UI does the wiring. The parts are `Field` (the root, a flex column), `Field.Label`, `Field.Description` and `Field.Error`. Built on Base UI `Field` (ADR 0003, 0026, 0046); `@base-ui/react` is a peer dependency, so the app's Base UI controls and Field share one copy of its contexts.
|
|
26
26
|
- [Heading](Heading.md): Section and page headings. A `Text` with heading defaults: the `heading` font role, `semibold`, `sm` leading, and balanced line wrapping. The level (`as`) and the look (`size`) are separate, so the outline stays right whatever the design calls for.
|
|
27
27
|
- [Icon](Icon.md): The base for every icon: an `<svg>` on a 24-unit grid that draws its children with round 2-unit strokes in `currentColor`. Generated icons from `@jonmilner/ui/icons` (`ArrowRightIcon`, …) wrap it and take the same props, less `children` and `viewBox`. `size` takes a `fontSize` step, so an icon matches the `Text` beside it; `color` takes a color role.
|
|
28
|
-
- [IconButton](IconButton.md): A compact button whose only visible content is an icon, for an action the icon makes plain: close, edit, refresh. A required `label` names it for assistive technology (`aria-label`); the icon is decorative. It is a `<button type="button">` on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` that blocks activation while the button stays focusable. Three variants from Button's fills (`
|
|
28
|
+
- [IconButton](IconButton.md): A compact button whose only visible content is an icon, for an action the icon makes plain: close, edit, refresh. A required `label` names it for assistive technology (`aria-label`); the icon is decorative. It is a `<button type="button">` on `Clickable`, so it has the shared focus ring, the 24px minimum target and `aria-disabled` that blocks activation while the button stays focusable. Three variants from Button's fills (`ghost`, the default, `secondary` and `primary`), each a square at the control radius (`sm`, 6px, ADR 0162), with Button's glow on `primary` only (ADR 0131, 0163), and three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
|
|
29
29
|
- [Inline](Inline.md): A horizontal row of children that wraps onto new lines, with even space between them on both axes. `Inline` is a `Box` with `display="flex"`, `flexDirection="row"`, `flexWrap="wrap"` and `alignItems="center"` as default style props, spaced by a required `gap`. Children render as they are: no wrapper per child.
|
|
30
30
|
- [Menu](Menu.md): A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a toolbar's overflow. It may mix in links ("Open invoice", "Download PDF") as `Menu.LinkItem`, real anchors that keep the browser's link behavior. Built on Base UI's Menu, which owns the keyboard and focus: arrow keys, Home and End move through the items, typing jumps to a matching item, Esc and an outside click close it, and focus returns to the trigger. The parts add the look: a raised surface with a border and shadow, a highlighted item, a zoom-and-fade that is a plain fade under reduced motion.
|
|
31
31
|
- [MultiSelect](MultiSelect.md): A form field for picking any number of values from a list too long to show at once. A trigger styled as Button's secondary look opens a listbox of options; each selected option shows a check mark, and the trigger summarises the selection as the joined labels, or a count ("3 selected") once the labels would not fit. Built on Base UI's `Select` in multiple mode (ADR 0003), which owns the keyboard and focus: arrow keys, Home and End move through the options, typing jumps to a match, Esc and an outside click close it, and focus returns to the trigger. It composes `Field` for its label, description and error (ADR 0026).
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
- [Switch](Switch.md): Turns one setting on or off, and the change applies the moment it flips. Built on Base UI `Switch` (ADR 0003, 0137): a `span` with `role="switch"` and `aria-checked`, plus a hidden checkbox input that submits with a form. The span is a 24 px target with the shared focus ring around a pill track: off is an outlined track with the thumb at the start, on a filled `accent` track with the thumb at the end. It composes `Field` for its label, description and error (ADR 0026), with the label after the switch.
|
|
41
41
|
- [Table](Table.md): Records in rows that share named columns, so a reader can scan and compare them: transactions, members, invoices. A native `table` with parts for each element (`Table.Head`, `Table.Body`, `Table.Foot`, `Table.Row`, `Table.HeaderCell`, `Table.Cell`, `Table.ColumnGroup`, `Table.Column`), and `Table.ScrollArea` for a table wider than its container. It has no `grid` role and no roving focus: a link, `Checkbox` or `Menu` in a cell keeps the page's tab order, and a screen reader's table commands work as on any table.
|
|
42
42
|
- [Tabs](Tabs.md): Switches between views that share one place on the page. The parts are `Tabs` (the root, a flex column; a row when vertical), `Tabs.List` (the `tablist`), `Tabs.Tab` (a `tab` button on `Clickable`) and `Tabs.Panel` (the `tabpanel`). Built on Base UI `Tabs` (ADR 0003, 0046): it owns the selection, one tab stop with arrow-key roving, `aria-selected`, and the ids that tie each tab to its panel. The selected tab shows an accent bar that fades and grows in (ADR 0049).
|
|
43
|
-
- [Tag](Tag.md): A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `
|
|
43
|
+
- [Tag](Tag.md): A label that puts content in a category: a topic, a label, a user-made category. A `span` with a subtle tone fill (gray by default) and an `xs` (4px) radius (a small mark's step in `docs/shape.md`, so wrapped lines stay inside the fill) around a `Text` in the `label` font. It can be read-only, a link, or removable.
|
|
44
44
|
- [Text](Text.md): The base of all visible text, and the primitive every text component builds on. Its box is trimmed to the cap height and the baseline, so the gap around text is the visible space and text sits centred in a padded control. It takes every Box style prop (`color`, `textAlign`, margins), plus `size`, `font`, `weight`, `leading`, `truncate` and `wrap`.
|
|
45
45
|
- [TextField](TextField.md): A form field for one line of text that is not a search: an `<input>` (role `textbox`) with SearchField's look and no icon or button over it. `type` picks `text`, `email`, `url` or `tel`. Built on Base UI's `Input` (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0110). Three sizes at Button's heights (`sm`, `med`, `lg`: 24, 32 and 40 px, ADR 0124).
|
|
46
46
|
- [Textarea](Textarea.md): A form field for several lines of free text: a `<textarea>` (role `textbox`, multi-line) with TextField's look. Built on Base UI's `Input` rendered as a textarea (ADR 0003); it composes `Field` for its label, description and error (ADR 0026, 0136). `rows` sets its starting height, three by default, and the user can drag it taller or shorter. Three sizes (`sm`, `med`, `lg`) set TextField's text size and padding, so the first line sits where a TextField's text does (ADR 0124).
|
package/dist/docs/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./manifest.schema.json",
|
|
3
3
|
"package": "@jonmilner/ui",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.18.0",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "AlertDialog",
|
|
@@ -114,6 +114,11 @@
|
|
|
114
114
|
"sm"
|
|
115
115
|
]
|
|
116
116
|
},
|
|
117
|
+
{
|
|
118
|
+
"name": "uppercase",
|
|
119
|
+
"type": "boolean",
|
|
120
|
+
"required": false
|
|
121
|
+
},
|
|
117
122
|
{
|
|
118
123
|
"name": "variant",
|
|
119
124
|
"type": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -271,6 +276,11 @@
|
|
|
271
276
|
"sm"
|
|
272
277
|
]
|
|
273
278
|
},
|
|
279
|
+
{
|
|
280
|
+
"name": "uppercase",
|
|
281
|
+
"type": "boolean",
|
|
282
|
+
"required": false
|
|
283
|
+
},
|
|
274
284
|
{
|
|
275
285
|
"name": "variant",
|
|
276
286
|
"type": "\"danger\" | \"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -721,6 +731,11 @@
|
|
|
721
731
|
"sm"
|
|
722
732
|
]
|
|
723
733
|
},
|
|
734
|
+
{
|
|
735
|
+
"name": "uppercase",
|
|
736
|
+
"type": "boolean",
|
|
737
|
+
"required": false
|
|
738
|
+
},
|
|
724
739
|
{
|
|
725
740
|
"name": "variant",
|
|
726
741
|
"type": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -813,6 +828,11 @@
|
|
|
813
828
|
"sm"
|
|
814
829
|
]
|
|
815
830
|
},
|
|
831
|
+
{
|
|
832
|
+
"name": "uppercase",
|
|
833
|
+
"type": "boolean",
|
|
834
|
+
"required": false
|
|
835
|
+
},
|
|
816
836
|
{
|
|
817
837
|
"name": "variant",
|
|
818
838
|
"type": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -1735,6 +1755,11 @@
|
|
|
1735
1755
|
"sm"
|
|
1736
1756
|
]
|
|
1737
1757
|
},
|
|
1758
|
+
{
|
|
1759
|
+
"name": "uppercase",
|
|
1760
|
+
"type": "boolean",
|
|
1761
|
+
"required": false
|
|
1762
|
+
},
|
|
1738
1763
|
{
|
|
1739
1764
|
"name": "variant",
|
|
1740
1765
|
"type": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -3468,6 +3493,11 @@
|
|
|
3468
3493
|
"sm"
|
|
3469
3494
|
]
|
|
3470
3495
|
},
|
|
3496
|
+
{
|
|
3497
|
+
"name": "uppercase",
|
|
3498
|
+
"type": "boolean",
|
|
3499
|
+
"required": false
|
|
3500
|
+
},
|
|
3471
3501
|
{
|
|
3472
3502
|
"name": "variant",
|
|
3473
3503
|
"type": "\"ghost\" | \"primary\" | \"secondary\"",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# 0.18.0
|
|
2
|
+
|
|
3
|
+
Button and IconButton take a quieter look (decision 0163): labels are sentence case at weight 500 instead of bold uppercase, `secondary` is a translucent `controlFill` fill with a 1px `border` and no glow, only `primary` glows, both take the `sm` (6px) radius, and IconButton defaults to a muted `ghost` instead of `secondary`. Apps still type-check, but labels narrow and lose their case, and an unstyled IconButton loses its frame. Most apps change nothing and update their baselines; an app that wants the old case or frame back passes a prop.
|
|
4
|
+
|
|
5
|
+
Badge and Tag set small labels at the meta step (decision 0164): Badge `xs` and `sm` and Tag `sm` render a 12/16 medium label with 6px inline padding, so Badge `sm` and Tag `sm` drop from 14px to 12px and Badge `xs` widens by 4px. Tag's default radius is `xs` (4px) instead of `lg` (12px). Badge and Tag `med` keep their 16px label. Apps still type-check; most update their baselines.
|
|
6
|
+
|
|
7
|
+
## Find
|
|
8
|
+
|
|
9
|
+
In the app's source (`*.tsx`):
|
|
10
|
+
|
|
11
|
+
- A label written in capitals to match the old look, which now renders as typed: regex `<(Button|Menu\.Trigger|Dialog\.(Trigger|Close)|Tooltip\.Trigger)\b(?:=>|[^>])*>\s*[A-Z][A-Z ]{2,}\s*<`.
|
|
12
|
+
- A test or snapshot that reads a label's computed case, weight or radius: regex `text-transform|textTransform|fontWeight|font-weight|borderRadius|border-radius`, kept where it reads a Button or IconButton.
|
|
13
|
+
- An IconButton with no `variant`, which was `secondary` and is now a muted `ghost`: regex `<IconButton\b(?!(?:=>|[^>])*\bvariant=)(?:=>|[^>])*>`.
|
|
14
|
+
- An icon `Menu.Trigger` with no `variant`, which renders that IconButton: regex `<Menu\.Trigger\b(?=(?:=>|[^>])*\bicon=)(?!(?:=>|[^>])*\bvariant=)(?:=>|[^>])*>`.
|
|
15
|
+
- A `ghost` IconButton without `color`, now `fgMuted` at rest: regex `<IconButton\b(?!(?:=>|[^>])*\bcolor=)(?:=>|[^>])*variant=["']ghost["']`.
|
|
16
|
+
- A Badge or Tag at `size="sm"` whose 14px label the design needs: regex `<(Badge|Tag)\b(?:=>|[^>])*size=["']sm["']`.
|
|
17
|
+
- A Tag with no `borderRadius`, whose corners go from 12px to 4px: regex `<Tag\b(?!(?:=>|[^>])*\bborderRadius=)(?:=>|[^>])*>`.
|
|
18
|
+
- A Badge at `size="xs"` in a fixed-width cell, now 4px wider: regex `<Badge\b(?:=>|[^>])*size=["']xs["']`.
|
|
19
|
+
- A test that reads a Badge's or Tag's computed font size, padding or radius: regex `fontSize|font-size|padding|borderRadius|border-radius`, kept where it reads a Badge or Tag.
|
|
20
|
+
|
|
21
|
+
## Replace
|
|
22
|
+
|
|
23
|
+
Keep uppercase where the design calls for it with the `uppercase` prop; write the label in sentence case, since the case is CSS only:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
// before
|
|
27
|
+
<Button variant="primary">SAVE DRAFT</Button>
|
|
28
|
+
// after
|
|
29
|
+
<Button uppercase variant="primary">Save draft</Button>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Keep IconButton's old framed default where a framed icon is wanted:
|
|
33
|
+
|
|
34
|
+
```tsx
|
|
35
|
+
// before
|
|
36
|
+
<IconButton icon={RefreshCwIcon} label="Refresh" />
|
|
37
|
+
// after
|
|
38
|
+
<IconButton icon={RefreshCwIcon} label="Refresh" variant="secondary" />
|
|
39
|
+
<Menu.Trigger icon={EllipsisIcon} label="More" variant="secondary" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Hold a `ghost` IconButton at full-strength text instead of muted:
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
<IconButton color="fg" icon={XIcon} label="Close" />
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Tests that expected uppercase computed text or `font-weight: 700` on a label expect `none` and `500`, or pass `uppercase`.
|
|
49
|
+
|
|
50
|
+
No size keeps the old 14px label: where the design needs a larger one, move it up to `med` (16px, 8px inline padding). Keep Tag's old rounded corners with its `borderRadius` prop:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// before: 14px label, 12px corners
|
|
54
|
+
<Tag size="sm">Design</Tag>
|
|
55
|
+
// after: the old corners, now with the 12px meta label
|
|
56
|
+
<Tag borderRadius="lg" size="sm">Design</Tag>
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Tests that expected a 14px `sm` label expect `12px`, Badge `xs` tests expect 6px inline padding, and Tag radius tests expect `4px`.
|
|
60
|
+
|
|
61
|
+
## Verify
|
|
62
|
+
|
|
63
|
+
The first Find regex matches only labels meant to be acronyms, and every IconButton and icon `Menu.Trigger` the third, fourth and fifth match is meant to be a muted ghost. Then update the app's visual baselines: Button and IconButton corners, fills, glows and label case change, and heights stay the same.
|
|
64
|
+
|
|
65
|
+
Every Badge and Tag `size="sm"` the sixth Find regex matches is meant to be 12px meta text. In the baselines, Tag corners and Badge and Tag small labels change, and Tag heights stay the same.
|
package/dist/docs/theming.md
CHANGED
|
@@ -60,7 +60,7 @@ Three overlay roles lay a tint over whatever surface is under them: `hover` for
|
|
|
60
60
|
|
|
61
61
|
## Radius
|
|
62
62
|
|
|
63
|
-
`vars.radius` (CSS variables `--radius-*`, and the `borderRadius` style prop) has seven steps: `none` 0, `xs` 4px, `sm` 6px, `med` 8px, `lg` 12px, `xl` 16px and `full`. Override a component's radius with its `borderRadius` prop. Each component role is moving to one step at every size: `xs` for badges, tags, tooltips and rows inside a menu or list, `sm` for controls (buttons and fields), `med` for menus, listboxes and toasts, `lg` for cards and dialogs, `full` for avatars, switches and radios. In this release badges, tooltips, rows, popups, dialogs and the `full` shapes already match;
|
|
63
|
+
`vars.radius` (CSS variables `--radius-*`, and the `borderRadius` style prop) has seven steps: `none` 0, `xs` 4px, `sm` 6px, `med` 8px, `lg` 12px, `xl` 16px and `full`. Override a component's radius with its `borderRadius` prop. Each component role is moving to one step at every size: `xs` for badges, tags, tooltips and rows inside a menu or list, `sm` for controls (buttons and fields), `med` for menus, listboxes and toasts, `lg` for cards and dialogs, `full` for avatars, switches and radios. In this release badges, tags, buttons, tooltips, rows, popups, dialogs and the `full` shapes already match; fields and select triggers are still `med` until a later release moves them.
|
|
64
64
|
|
|
65
65
|
## The page canvas
|
|
66
66
|
|
package/dist/popup/client.d.mts
CHANGED
|
@@ -3,5 +3,5 @@ import { ButtonOwnProps } from "../Button/index.mjs";
|
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
export type TriggerLookProps = {
|
|
5
5
|
variant?: Exclude<ButtonOwnProps["variant"], "danger">;
|
|
6
|
-
} & Pick<ButtonOwnProps, "size" | "iconStart" | "iconEnd">;
|
|
6
|
+
} & Pick<ButtonOwnProps, "size" | "iconStart" | "iconEnd" | "uppercase">;
|
|
7
7
|
export type TriggerElementProps = TriggerLookProps & Omit<ClickableProps<"button">, "as" | "busy">;
|
package/dist/popup/client.mjs
CHANGED
|
@@ -29,14 +29,15 @@ function d({ children: e }) {
|
|
|
29
29
|
function f() {
|
|
30
30
|
return i(l);
|
|
31
31
|
}
|
|
32
|
-
function p({ variant: n, size: r, iconStart: i, iconEnd: a,
|
|
33
|
-
return n || r || i || a ? /* @__PURE__ */ c(t, {
|
|
34
|
-
...
|
|
32
|
+
function p({ variant: n, size: r, iconStart: i, iconEnd: a, uppercase: o, ...s }) {
|
|
33
|
+
return n || r || i || a || o ? /* @__PURE__ */ c(t, {
|
|
34
|
+
...s,
|
|
35
35
|
variant: n,
|
|
36
36
|
size: r,
|
|
37
37
|
iconStart: i,
|
|
38
|
-
iconEnd: a
|
|
39
|
-
|
|
38
|
+
iconEnd: a,
|
|
39
|
+
uppercase: o
|
|
40
|
+
}) : /* @__PURE__ */ c(e, { ...s });
|
|
40
41
|
}
|
|
41
42
|
function m(e) {
|
|
42
43
|
let t = i(u);
|
|
@@ -78,7 +78,7 @@ function O(e, t) {
|
|
|
78
78
|
a < 1 && D.has(n) && t(`color.${n} is translucent in ${i} mode, but it is a background in a contrast pair and must be opaque`);
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
-
for (let { name: e, fill: n } of v) for (let
|
|
81
|
+
for (let { name: e, fill: n, over: i } of v) for (let a of ["light", "dark"]) !i && f(n(r), a).alpha < 1 && t(`the ${e} is translucent in ${a} mode: the roles it mixes must be opaque`);
|
|
82
82
|
let i = {
|
|
83
83
|
...e,
|
|
84
84
|
color: r
|