@jonmilner/ui 0.11.0 → 0.11.2
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/client.mjs +1 -2
- package/dist/AlertDialog/index.d.mts +0 -2
- package/dist/AlertDialog/index.mjs +1 -2
- package/dist/Avatar/Avatar.css.mjs +1 -2
- package/dist/Avatar/index.d.mts +0 -2
- package/dist/Avatar/index.mjs +1 -2
- package/dist/Avatar/ink.mjs +1 -2
- package/dist/Badge/Badge.css.mjs +1 -2
- package/dist/Badge/index.d.mts +1 -3
- package/dist/Badge/index.mjs +1 -2
- package/dist/Box/Box.css.mjs +1 -2
- package/dist/Box/ResponsiveCheck.mjs +1 -2
- package/dist/Box/base.d.mts +1 -3
- package/dist/Box/base.mjs +1 -2
- package/dist/Box/index.d.mts +0 -2
- package/dist/Box/index.mjs +1 -2
- package/dist/Button/Button.css.mjs +1 -2
- package/dist/Button/index.d.mts +1 -3
- package/dist/Button/index.mjs +1 -2
- package/dist/Checkbox/Checkbox.css.mjs +1 -2
- package/dist/Checkbox/index.d.mts +1 -3
- package/dist/Checkbox/index.mjs +1 -2
- package/dist/Chip/Chip.css.mjs +1 -2
- package/dist/Chip/index.d.mts +1 -3
- package/dist/Chip/index.mjs +1 -2
- package/dist/Clickable/Clickable.css.mjs +1 -2
- package/dist/Clickable/index.d.mts +1 -3
- package/dist/Clickable/index.mjs +1 -2
- package/dist/ColorField/ColorField.css.mjs +1 -2
- package/dist/ColorField/client.d.mts +1 -3
- package/dist/ColorField/client.mjs +1 -2
- package/dist/ColorField/index.d.mts +0 -2
- package/dist/ColorField/index.mjs +1 -2
- package/dist/Dialog/Dialog.css.d.mts +1 -3
- package/dist/Dialog/Dialog.css.mjs +1 -2
- package/dist/Dialog/client.d.mts +0 -2
- package/dist/Dialog/client.mjs +1 -2
- package/dist/Dialog/index.d.mts +0 -2
- package/dist/Dialog/index.mjs +1 -2
- package/dist/Field/Field.css.mjs +1 -2
- package/dist/Field/client.mjs +1 -2
- package/dist/Field/index.d.mts +0 -2
- package/dist/Field/index.mjs +1 -2
- package/dist/Heading/Heading.css.mjs +1 -2
- package/dist/Heading/index.d.mts +1 -3
- package/dist/Heading/index.mjs +1 -2
- package/dist/Icon/Icon.css.mjs +1 -2
- package/dist/Icon/index.d.mts +1 -3
- package/dist/Icon/index.mjs +1 -2
- package/dist/IconButton/IconButton.css.mjs +1 -2
- package/dist/IconButton/index.d.mts +1 -3
- package/dist/IconButton/index.mjs +1 -2
- package/dist/Inline/Inline.css.mjs +1 -2
- package/dist/Inline/index.d.mts +0 -2
- package/dist/Inline/index.mjs +1 -2
- package/dist/Menu/Menu.css.mjs +1 -2
- package/dist/Menu/client.d.mts +0 -2
- package/dist/Menu/client.mjs +1 -2
- package/dist/Menu/index.d.mts +0 -2
- package/dist/Menu/index.mjs +1 -2
- package/dist/MultiSelect/MultiSelect.css.mjs +1 -2
- package/dist/MultiSelect/client.d.mts +1 -3
- package/dist/MultiSelect/client.mjs +1 -2
- package/dist/MultiSelect/index.d.mts +1 -3
- package/dist/MultiSelect/index.mjs +1 -2
- package/dist/SearchField/SearchField.css.mjs +1 -2
- package/dist/SearchField/client.d.mts +1 -3
- package/dist/SearchField/client.mjs +1 -2
- package/dist/SearchField/index.d.mts +0 -2
- package/dist/SearchField/index.mjs +1 -2
- package/dist/Stack/Stack.css.mjs +1 -2
- package/dist/Stack/index.d.mts +0 -2
- package/dist/Stack/index.mjs +1 -2
- package/dist/Tabs/Tabs.css.mjs +1 -2
- package/dist/Tabs/index.d.mts +0 -2
- package/dist/Tabs/index.mjs +1 -2
- package/dist/Tag/Tag.css.mjs +1 -2
- package/dist/Tag/index.d.mts +1 -3
- package/dist/Tag/index.mjs +1 -2
- package/dist/Text/Text.css.mjs +1 -2
- package/dist/Text/index.d.mts +1 -3
- package/dist/Text/index.mjs +1 -2
- package/dist/TextField/TextField.css.mjs +1 -2
- package/dist/TextField/index.d.mts +1 -3
- package/dist/TextField/index.mjs +1 -2
- package/dist/Toast/Toast.css.mjs +1 -2
- package/dist/Toast/client.d.mts +0 -2
- package/dist/Toast/client.mjs +5 -3
- package/dist/Toast/index.d.mts +0 -2
- package/dist/Toast/index.mjs +1 -2
- package/dist/VisuallyHidden/VisuallyHidden.css.mjs +1 -2
- package/dist/VisuallyHidden/index.d.mts +1 -3
- package/dist/VisuallyHidden/index.mjs +1 -2
- package/dist/brands/brand.d.mts +1 -3
- package/dist/brands/brand.mjs +1 -2
- package/dist/brands/check-fonts.mjs +1 -2
- package/dist/brands/default.d.mts +1 -3
- package/dist/brands/default.mjs +1 -2
- package/dist/brands/font.d.mts +1 -3
- package/dist/brands/font.mjs +1 -2
- package/dist/brands/forced-colors.mjs +1 -2
- package/dist/brands/index.d.mts +0 -2
- package/dist/brands/index.mjs +1 -2
- package/dist/brands/metrics.mjs +1 -2
- package/dist/contrast/color.d.mts +1 -3
- package/dist/contrast/color.mjs +1 -2
- package/dist/contrast/contrast.d.mts +0 -2
- package/dist/contrast/contrast.mjs +1 -2
- package/dist/contrast/mixes.mjs +1 -2
- package/dist/docs/Checkbox.md +2 -2
- package/dist/docs/Field.md +2 -2
- package/dist/docs/Menu.md +1 -1
- package/dist/docs/MultiSelect.md +2 -2
- package/dist/docs/SearchField.md +1 -1
- package/dist/docs/TextField.md +3 -3
- package/dist/docs/Toast.md +2 -2
- package/dist/docs/manifest.json +1 -1
- package/dist/icons/ArrowLeftIcon.d.mts +1 -3
- package/dist/icons/ArrowLeftIcon.mjs +1 -2
- package/dist/icons/ArrowRightIcon.d.mts +1 -3
- package/dist/icons/ArrowRightIcon.mjs +1 -2
- package/dist/icons/CheckIcon.d.mts +1 -3
- package/dist/icons/CheckIcon.mjs +1 -2
- package/dist/icons/ChevronDownIcon.d.mts +1 -3
- package/dist/icons/ChevronDownIcon.mjs +1 -2
- package/dist/icons/ChevronRightIcon.d.mts +1 -3
- package/dist/icons/ChevronRightIcon.mjs +1 -2
- package/dist/icons/CircleAlertIcon.d.mts +1 -3
- package/dist/icons/CircleAlertIcon.mjs +1 -2
- package/dist/icons/CircleCheckIcon.d.mts +1 -3
- package/dist/icons/CircleCheckIcon.mjs +1 -2
- package/dist/icons/CircleDotIcon.d.mts +1 -3
- package/dist/icons/CircleDotIcon.mjs +1 -2
- package/dist/icons/CircleSlashIcon.d.mts +1 -3
- package/dist/icons/CircleSlashIcon.mjs +1 -2
- package/dist/icons/EllipsisIcon.d.mts +1 -3
- package/dist/icons/EllipsisIcon.mjs +1 -2
- package/dist/icons/GitMergeIcon.d.mts +1 -3
- package/dist/icons/GitMergeIcon.mjs +1 -2
- package/dist/icons/GitPullRequestClosedIcon.d.mts +1 -3
- package/dist/icons/GitPullRequestClosedIcon.mjs +1 -2
- package/dist/icons/GitPullRequestDraftIcon.d.mts +1 -3
- package/dist/icons/GitPullRequestDraftIcon.mjs +1 -2
- package/dist/icons/GitPullRequestIcon.d.mts +1 -3
- package/dist/icons/GitPullRequestIcon.mjs +1 -2
- package/dist/icons/InboxIcon.d.mts +1 -3
- package/dist/icons/InboxIcon.mjs +1 -2
- package/dist/icons/InfoIcon.d.mts +1 -3
- package/dist/icons/InfoIcon.mjs +1 -2
- package/dist/icons/LoaderCircleIcon.d.mts +1 -3
- package/dist/icons/LoaderCircleIcon.mjs +1 -2
- package/dist/icons/LockOpenIcon.d.mts +1 -3
- package/dist/icons/LockOpenIcon.mjs +1 -2
- package/dist/icons/PencilIcon.d.mts +1 -3
- package/dist/icons/PencilIcon.mjs +1 -2
- package/dist/icons/PlayIcon.d.mts +1 -3
- package/dist/icons/PlayIcon.mjs +1 -2
- package/dist/icons/PlusIcon.d.mts +1 -3
- package/dist/icons/PlusIcon.mjs +1 -2
- package/dist/icons/RefreshCwIcon.d.mts +1 -3
- package/dist/icons/RefreshCwIcon.mjs +1 -2
- package/dist/icons/ReplyIcon.d.mts +1 -3
- package/dist/icons/ReplyIcon.mjs +1 -2
- package/dist/icons/SearchIcon.d.mts +1 -3
- package/dist/icons/SearchIcon.mjs +1 -2
- package/dist/icons/SettingsIcon.d.mts +1 -3
- package/dist/icons/SettingsIcon.mjs +1 -2
- package/dist/icons/Trash2Icon.d.mts +1 -3
- package/dist/icons/Trash2Icon.mjs +1 -2
- package/dist/icons/XIcon.d.mts +1 -3
- package/dist/icons/XIcon.mjs +1 -2
- package/dist/icons/index.d.mts +0 -2
- package/dist/icons/index.mjs +1 -2
- package/dist/lint/index.d.mts +1 -3
- package/dist/lint/index.mjs +1 -2
- package/dist/popup/client.d.mts +1 -3
- package/dist/popup/client.mjs +1 -2
- package/dist/styles/atoms.css.d.mts +1 -3
- package/dist/styles/atoms.css.mjs +1 -2
- package/dist/styles/button-fills.mjs +1 -2
- package/dist/styles/button-parts.css.mjs +1 -2
- package/dist/styles/control-size.mjs +1 -2
- package/dist/styles/highlight.mjs +1 -2
- package/dist/styles/hover-tint.mjs +1 -2
- package/dist/styles/join.mjs +1 -2
- package/dist/styles/part-props.d.mts +1 -3
- package/dist/styles/split-style-props.mjs +1 -2
- package/dist/styles/split-text-props.mjs +1 -2
- package/dist/styles/subtle-fills.d.mts +1 -3
- package/dist/styles/subtle-fills.mjs +1 -2
- package/dist/testing/motion.d.mts +1 -3
- package/dist/testing/motion.mjs +1 -2
- package/dist/theme/FontCheck.mjs +1 -2
- package/dist/theme/ThemeProvider.d.mts +1 -3
- package/dist/theme/ThemeProvider.mjs +1 -2
- package/dist/theme/define-theme.d.mts +1 -3
- package/dist/theme/define-theme.mjs +1 -2
- package/dist/theme/use-theme-container.mjs +1 -2
- package/dist/tokens/contract.d.mts +0 -2
- package/dist/tokens/contract.mjs +1 -2
- package/dist/tokens/roles.d.mts +1 -3
- package/dist/tokens/roles.mjs +1 -2
- package/dist/tokens/scales.d.mts +1 -3
- package/dist/tokens/scales.mjs +1 -2
- package/dist/types.d.mts +1 -3
- package/package.json +4 -4
package/dist/Toast/client.d.mts
CHANGED
|
@@ -3,7 +3,6 @@ import { CircleCheckIcon } from "../icons/CircleCheckIcon.mjs";
|
|
|
3
3
|
import { InfoIcon } from "../icons/InfoIcon.mjs";
|
|
4
4
|
import { CSSProperties, ReactNode } from "react";
|
|
5
5
|
import "@base-ui/react/toast";
|
|
6
|
-
//#region src/Toast/client.d.ts
|
|
7
6
|
export type ToastVariant = keyof typeof icons;
|
|
8
7
|
export type ToastOptions = {
|
|
9
8
|
action?: {
|
|
@@ -42,5 +41,4 @@ export declare function useToast(): {
|
|
|
42
41
|
add: ({ title, description, variant, duration, action }: ToastOptions) => string;
|
|
43
42
|
close: (id: string) => void;
|
|
44
43
|
};
|
|
45
|
-
//#endregion
|
|
46
44
|
export { ToastProvider };
|
package/dist/Toast/client.mjs
CHANGED
|
@@ -13,7 +13,7 @@ import { announcer as u, close as d, content as f, list as p, root as m, toast a
|
|
|
13
13
|
import { createContext as _, use as v, useCallback as y, useEffect as b, useLayoutEffect as x, useMemo as S, useRef as C, useState as w } from "react";
|
|
14
14
|
import { jsx as T, jsxs as E } from "react/jsx-runtime";
|
|
15
15
|
import { Toast as D } from "@base-ui/react/toast";
|
|
16
|
-
|
|
16
|
+
// src/Toast/client.tsx
|
|
17
17
|
var O = {
|
|
18
18
|
info: {
|
|
19
19
|
Icon: l,
|
|
@@ -68,7 +68,7 @@ function N({ regionLabel: n, className: r, style: i, children: a }) {
|
|
|
68
68
|
})));
|
|
69
69
|
}, i = (t) => {
|
|
70
70
|
let r = t.relatedTarget;
|
|
71
|
-
|
|
71
|
+
r && e.contains(r) || (n = !1);
|
|
72
72
|
};
|
|
73
73
|
return t.addEventListener("mouseover", r), t.addEventListener("mouseout", i), () => {
|
|
74
74
|
t.removeEventListener("mouseover", r), t.removeEventListener("mouseout", i);
|
|
@@ -82,6 +82,9 @@ function N({ regionLabel: n, className: r, style: i, children: a }) {
|
|
|
82
82
|
let t = e.relatedTarget;
|
|
83
83
|
t && !e.currentTarget.contains(t) && (o.current = t);
|
|
84
84
|
},
|
|
85
|
+
onKeyDown: (e) => {
|
|
86
|
+
e.key === "Escape" && e.stopPropagation();
|
|
87
|
+
},
|
|
85
88
|
ref: s,
|
|
86
89
|
render: /* @__PURE__ */ T(t, {
|
|
87
90
|
className: e(g, r),
|
|
@@ -240,5 +243,4 @@ function R() {
|
|
|
240
243
|
};
|
|
241
244
|
}, [e]);
|
|
242
245
|
}
|
|
243
|
-
//#endregion
|
|
244
246
|
export { P as ToastAnnouncer, I as ToastItem, M as ToastProvider, N as ToastStack, R as useToast };
|
package/dist/Toast/index.d.mts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { ToastOptions, ToastProvider, ToastProviderProps, ToastVariant, useToast } from "./client.mjs";
|
|
2
|
-
//#region src/Toast/index.d.ts
|
|
3
2
|
export declare const Toast: {
|
|
4
3
|
Provider: typeof ToastProvider;
|
|
5
4
|
};
|
|
6
|
-
//#endregion
|
|
7
5
|
export { type ToastOptions, type ToastProviderProps, type ToastVariant, useToast };
|
package/dist/Toast/index.mjs
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { PolymorphicProps } from "../types.mjs";
|
|
2
2
|
import { ElementType } from "react";
|
|
3
|
-
//#region src/VisuallyHidden/index.d.ts
|
|
4
3
|
export type VisuallyHiddenProps<T extends ElementType = "span"> = PolymorphicProps<T>;
|
|
5
|
-
export declare function VisuallyHidden<T extends ElementType = "span">({ as, className, ...props }: VisuallyHiddenProps<T>): import("react").JSX.Element;
|
|
6
|
-
//#endregion
|
|
4
|
+
export declare function VisuallyHidden<T extends ElementType = "span">({ as, className, ...props }: VisuallyHiddenProps<T>): import("react").JSX.Element;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { join as e } from "../styles/join.mjs";
|
|
2
2
|
import { root as t } from "./VisuallyHidden.css.mjs";
|
|
3
3
|
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/VisuallyHidden/index.tsx
|
|
5
5
|
function r({ as: r, className: i, ...a }) {
|
|
6
6
|
return /* @__PURE__ */ n(r ?? "span", {
|
|
7
7
|
...a,
|
|
8
8
|
className: e(t, i)
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
//#endregion
|
|
12
11
|
export { r as VisuallyHidden };
|
package/dist/brands/brand.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ColorRole, FontRole } from "../tokens/roles.mjs";
|
|
2
2
|
import { BrandFont } from "./font.mjs";
|
|
3
|
-
//#region src/brands/brand.d.ts
|
|
4
3
|
export interface Brand {
|
|
5
4
|
readonly name: string;
|
|
6
5
|
readonly color: Readonly<Record<ColorRole, string>>;
|
|
7
6
|
readonly font: Readonly<Record<FontRole, BrandFont>>;
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
7
|
+
}
|
package/dist/brands/brand.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/brands/check-fonts.ts
|
|
2
2
|
var e = /* @__PURE__ */ new Set();
|
|
3
3
|
async function t(t, n = 5e3) {
|
|
4
4
|
if (process.env.NODE_ENV === "production" || typeof document > "u") return;
|
|
@@ -11,5 +11,4 @@ async function t(t, n = 5e3) {
|
|
|
11
11
|
a && (e.add(t), console.warn(`@jonmilner/ui: font "${t}" ${a}, so text uses its fallback. Load the font files for this brand (see the brand docs).`));
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { t as checkFonts };
|
package/dist/brands/default.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { lightDark as e } from "./brand.mjs";
|
|
2
2
|
import { arial as t, consolas as n, courierNew as r, inter as i, jetBrainsMono as a, menlo as o } from "./metrics.mjs";
|
|
3
|
-
|
|
3
|
+
// src/brands/default.ts
|
|
4
4
|
var s = (e, t) => Object.fromEntries(Object.entries(t).map(([t, [n, r]]) => [t, `oklch(${n} ${r} ${e})`])), c = "oklch(1 0 0)", l = "oklch(0 0 0)", u = s(265, {
|
|
5
5
|
50: [.985, .002],
|
|
6
6
|
100: [.968, .004],
|
|
@@ -130,5 +130,4 @@ var s = (e, t) => Object.fromEntries(Object.entries(t).map(([t, [n, r]]) => [t,
|
|
|
130
130
|
mono: _
|
|
131
131
|
}
|
|
132
132
|
};
|
|
133
|
-
//#endregion
|
|
134
133
|
export { v as defaultBrand };
|
package/dist/brands/font.d.mts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/brands/font.d.ts
|
|
2
1
|
export interface FontMetrics {
|
|
3
2
|
readonly familyName: string;
|
|
4
3
|
readonly fullName?: string;
|
|
@@ -15,5 +14,4 @@ export interface BrandFont {
|
|
|
15
14
|
readonly metrics: FontMetrics;
|
|
16
15
|
readonly fallback: FontMetrics | readonly [FontMetrics, ...FontMetrics[]];
|
|
17
16
|
readonly generic: "sans-serif" | "serif" | "monospace";
|
|
18
|
-
}
|
|
19
|
-
//#endregion
|
|
17
|
+
}
|
package/dist/brands/font.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/brands/font.ts
|
|
2
2
|
var e = (e) => `"${e}"`, t = (e) => String(Number(e.toFixed(6))), n = (e) => `${t(e * 100)}%`;
|
|
3
3
|
function r({ metrics: e, fallback: t }) {
|
|
4
4
|
let n = [t].flat();
|
|
@@ -48,5 +48,4 @@ function f(e) {
|
|
|
48
48
|
}
|
|
49
49
|
return new Map([...t].map(([e, t]) => [e, [...t.values()]]));
|
|
50
50
|
}
|
|
51
|
-
//#endregion
|
|
52
51
|
export { d as fallbackFace, f as fallbackFaces, i as fallbackFamily, r as fallbackPairs, u as fallbackVariants, a as fontStack, o as fontTrim };
|
package/dist/brands/index.d.mts
CHANGED
package/dist/brands/index.mjs
CHANGED
package/dist/brands/metrics.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/brands/metrics.ts
|
|
2
2
|
var e = {
|
|
3
3
|
familyName: "Inter",
|
|
4
4
|
fullName: "Inter Regular",
|
|
@@ -159,5 +159,4 @@ var e = {
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
|
-
//#endregion
|
|
163
162
|
export { n as arial, c as consolas, r as courierNew, e as inter, t as jetBrainsMono, o as menlo };
|
package/dist/contrast/color.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ColorRole } from "../tokens/roles.mjs";
|
|
2
2
|
import { Brand } from "../brands/brand.mjs";
|
|
3
3
|
import { Mode } from "./color.mjs";
|
|
4
|
-
//#region src/contrast/contrast.d.ts
|
|
5
4
|
export interface ContrastPair {
|
|
6
5
|
fg: ColorRole;
|
|
7
6
|
bg: ColorRole;
|
|
@@ -14,5 +13,4 @@ export interface ContrastFailure extends ContrastPair {
|
|
|
14
13
|
export declare const contrastPairs: readonly ContrastPair[];
|
|
15
14
|
export declare function contrastRatio(fg: string, bg: string, mode?: Mode): number;
|
|
16
15
|
export declare function checkContrast(brand: Brand): ContrastFailure[];
|
|
17
|
-
//#endregion
|
|
18
16
|
export type { Mode };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { subtleFills as e } from "../styles/subtle-fills.mjs";
|
|
2
2
|
import { decode as t, resolveColor as n } from "./color.mjs";
|
|
3
|
-
|
|
3
|
+
// src/contrast/contrast.ts
|
|
4
4
|
var r = [
|
|
5
5
|
"bg",
|
|
6
6
|
"bgMuted",
|
|
@@ -59,5 +59,4 @@ function d(e) {
|
|
|
59
59
|
});
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
|
-
//#endregion
|
|
63
62
|
export { d as checkContrast, o as contrastPairs, l as contrastRatio, r as surfaces };
|
package/dist/contrast/mixes.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { fills as e } from "../styles/button-fills.mjs";
|
|
|
2
2
|
import { contrastRatio as t, surfaces as n } from "./contrast.mjs";
|
|
3
3
|
import { highlightFill as r, highlightText as i } from "../styles/highlight.mjs";
|
|
4
4
|
import { hoverFill as a } from "../styles/hover-tint.mjs";
|
|
5
|
-
|
|
5
|
+
// src/contrast/mixes.ts
|
|
6
6
|
var o = [
|
|
7
7
|
{
|
|
8
8
|
name: "Menu highlight",
|
|
@@ -38,5 +38,4 @@ function s(e) {
|
|
|
38
38
|
});
|
|
39
39
|
}));
|
|
40
40
|
}
|
|
41
|
-
//#endregion
|
|
42
41
|
export { s as checkMixes, o as contrastMixes };
|
package/dist/docs/Checkbox.md
CHANGED
|
@@ -11,8 +11,8 @@ A two-state choice, with a third mixed state for a "select all" over a partly se
|
|
|
11
11
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
|
-
- A setting that applies the moment it flips:
|
|
15
|
-
- One choice out of several:
|
|
14
|
+
- A setting that applies the moment it flips: `Switch` is planned.
|
|
15
|
+
- One choice out of several: `RadioGroup` is planned.
|
|
16
16
|
- Picking several options from a long list in a popup: use `MultiSelect`.
|
|
17
17
|
|
|
18
18
|
## Rules
|
package/dist/docs/Field.md
CHANGED
|
@@ -7,13 +7,13 @@ Wires one form control to its label, description and error: ids, `htmlFor`, `ari
|
|
|
7
7
|
## When to use
|
|
8
8
|
|
|
9
9
|
- Any form control that needs a visible label, help text or an error, including a control a component builds (Checkbox, MultiSelect build on Field rather than their own wiring).
|
|
10
|
-
- Showing a server validation error
|
|
10
|
+
- Showing a server validation error next to its control. The app's action or submit handler returns it; set `invalid` and put the message in `Field.Error` (a props control such as `TextField` takes it as `error` instead; ADR 0133).
|
|
11
11
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
14
|
- An error about the whole form (a failed save, a network error): put it in a reserved slot at the form level, not on one field.
|
|
15
15
|
- The result of submitting the form ("Profile saved"): use `Toast`; the field's message is for that one input.
|
|
16
|
-
- A group of controls with one legend
|
|
16
|
+
- A group of controls with one legend: a public `Fieldset` is not planned (ADR 0133). For checkboxes, write a native `fieldset` and `legend` with one Field per Checkbox. For one choice among a few, `RadioGroup` is planned and carries its own legend.
|
|
17
17
|
- A single line of text, a search, a colour or a choice from a list: use `TextField`, `SearchField`, `ColorField` or `MultiSelect`, which build on this Field.
|
|
18
18
|
|
|
19
19
|
## Rules
|
package/dist/docs/Menu.md
CHANGED
|
@@ -12,7 +12,7 @@ A list of actions that opens from a button: a row's "Edit, Duplicate, Delete", a
|
|
|
12
12
|
|
|
13
13
|
## When not to use
|
|
14
14
|
|
|
15
|
-
- Picking a value for a form field:
|
|
15
|
+
- Picking a value for a form field: a single `Select` and `RadioGroup` are planned; for several values from a long list, use `MultiSelect`.
|
|
16
16
|
- Navigation between pages: a menu that is only links is still navigation, so show the links on the page or in a nav. Link items are for a menu that mixes actions and links.
|
|
17
17
|
- One or two actions: show them as buttons.
|
|
18
18
|
- Content a user reads, or anything interactive inside the list (fields, toggles): use a popover or a dialog.
|
package/dist/docs/MultiSelect.md
CHANGED
|
@@ -12,10 +12,10 @@ A form field for picking any number of values from a list too long to show at on
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
14
|
- A few options, all visible on the page: use `ChipGroup multiple`.
|
|
15
|
-
- A short list shown inline, each with its own label: use a `Checkbox`
|
|
15
|
+
- A short list shown inline, each with its own label: use a group of `Checkbox`es, one `Field` each, in a native `fieldset` with a `legend`.
|
|
16
16
|
- Actions: use `Menu`; a multi-select picks values and runs nothing.
|
|
17
17
|
- One choice out of several: use a radio group or a single select.
|
|
18
|
-
- Search, filtering or async options: wait for Select and Combobox (
|
|
18
|
+
- Search, filtering or async options: wait for `Select` and `Combobox` (planned).
|
|
19
19
|
- Users who need to see every selected value at once: use `Chip` or `ChipGroup`, or show the selection beside the field.
|
|
20
20
|
|
|
21
21
|
## Rules
|
package/dist/docs/SearchField.md
CHANGED
|
@@ -12,7 +12,7 @@ A form field for a search query: an `<input type="search">` (role `searchbox`) w
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
14
|
- Any other single-line text: use `TextField`; a search field announces itself as a search.
|
|
15
|
-
- Picking from a known list as the user types: wait for Combobox (
|
|
15
|
+
- Picking from a known list as the user types: wait for `Combobox` (planned).
|
|
16
16
|
- Picking several values from a list: use `MultiSelect` or `ChipGroup`.
|
|
17
17
|
- A colour: use `ColorField`.
|
|
18
18
|
|
package/dist/docs/TextField.md
CHANGED
|
@@ -12,9 +12,9 @@ A form field for one line of text that is not a search: an `<input>` (role `text
|
|
|
12
12
|
## When not to use
|
|
13
13
|
|
|
14
14
|
- A query that searches or filters: use `SearchField`; it is announced as a search and has a clear button.
|
|
15
|
-
- Several lines of text: wait for
|
|
16
|
-
- A number with steppers or a range:
|
|
17
|
-
- Picking from a known list as the user types: wait for Combobox (planned
|
|
15
|
+
- Several lines of text: wait for `Textarea` (planned).
|
|
16
|
+
- A number with steppers or a range: a number field is not planned (ADR 0133); use `TextField` with `inputMode` in `inputProps` and validate in the app.
|
|
17
|
+
- Picking from a known list as the user types: wait for `Combobox` (planned).
|
|
18
18
|
- Picking one or several values from a list: use `MultiSelect` or `ChipGroup`.
|
|
19
19
|
- A colour: use `ColorField`; it pairs the hex with the browser's colour picker.
|
|
20
20
|
- A password: TextField has no `password` type, since a password field needs a show and hide toggle of its own.
|
package/dist/docs/Toast.md
CHANGED
|
@@ -86,11 +86,11 @@ toast.add({ title: "Update", description: releaseNotes });
|
|
|
86
86
|
- The stack is a `region` landmark named by `regionLabel` ("Notifications" by default); F6 moves focus to it, and Shift+Tab from there returns focus where it was. Each toast is a `group` named by its title. Neither the stack (`aria-live="off"`) nor the toasts are live regions; the provider renders two visually hidden ones that exist before any toast, and adds each toast's title and description to one as it arrives: `info` and `success` to a polite `status`, `error` to an assertive `alert`. So each toast is announced once, and an error at once (ADR 0074). Adding a toast never moves focus.
|
|
87
87
|
- A toast hidden by `limit` was announced when it arrived. When a newer one leaves and it shows again, it is not announced a second time; a user who needs it finds it in the stack with F6.
|
|
88
88
|
- An error raised from inside a modal `Dialog` is still announced: the dialog hides the rest of the page from assistive tech, but not the announcer's regions.
|
|
89
|
-
- Inside a modal `Dialog`: F6 still reaches the stack past the dialog's focus trap, so an error's action and close button stay in keyboard reach; Tab past the last toast returns focus to the dialog. Escape in the stack
|
|
89
|
+
- Inside a modal `Dialog`: F6 still reaches the stack past the dialog's focus trap, so an error's action and close button stay in keyboard reach; Tab past the last toast returns focus to the dialog. Escape on a toast closes only the toast; the dialog, and what was typed in it, stays (ADR 0132). Escape anywhere in the stack goes no further, so on the stack itself it does nothing, and an app's own `document` or `window` Escape listener never sees it.
|
|
90
90
|
- Reflow (WCAG 1.4.10): a stack taller than the window, as at 320px wide with 200% text, scrolls inside itself with the newest toast on top, so the older ones stay in reach.
|
|
91
91
|
- Resize text (WCAG 1.4.4): when the stack is narrower than 16rem, as at 320px wide with 200% text, the content moves to its own line below the icon and close button, so the button stays inside the card and words wrap whole (ADR 0067).
|
|
92
92
|
- Timing (WCAG 2.2.1, Timing Adjustable): a toast closes on its own only when it is not essential. The timer pauses while the pointer is over the stack, while keyboard focus is in it, and while the window is in the background, so a user who reaches it gets the time they need. An error stays until dismissed by default, and `duration: 0` keeps any toast. The close button dismisses a toast at any time.
|
|
93
|
-
- Dismissing a toast from the keyboard (Enter or Space on its close button, or a screen reader's activation) moves focus to the close button of the toast that takes its place: the next one, else the previous one. Dismissing the last returns focus to where it was before Tab or F6 brought it into the stack, so focus never falls to the page (ADR 0085).
|
|
93
|
+
- Dismissing a toast from the keyboard (Enter or Space on its close button, or a screen reader's activation) moves focus to the close button of the toast that takes its place: the next one, else the previous one. Dismissing the last returns focus to where it was before Tab or F6 brought it into the stack, so focus never falls to the page (ADR 0085). A click or swipe that leaves focus in the leaving toast also returns it there, without scrolling.
|
|
94
94
|
- The close button and the action are native buttons with the shared focus ring and a 24px target. The close button's name is `closeLabel`.
|
|
95
95
|
- Swiping a toast away, down or toward the stack's inline end (right, or left under `dir="rtl"`), is a shortcut; the close button does the same.
|
|
96
96
|
- Under reduced motion a toast only fades. Under forced colors it keeps its border.
|
package/dist/docs/manifest.json
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function ArrowLeftIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function ArrowLeftIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/ArrowLeftIcon.tsx
|
|
4
4
|
function n(n) {
|
|
5
5
|
return /* @__PURE__ */ t(e, {
|
|
6
6
|
...n,
|
|
7
7
|
children: /* @__PURE__ */ t("path", { d: "m12 19-7-7 7-7M19 12H5" })
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as ArrowLeftIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function ArrowRightIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function ArrowRightIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/ArrowRightIcon.tsx
|
|
4
4
|
function n(n) {
|
|
5
5
|
return /* @__PURE__ */ t(e, {
|
|
6
6
|
...n,
|
|
7
7
|
children: /* @__PURE__ */ t("path", { d: "M5 12h14M12 5l7 7-7 7" })
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as ArrowRightIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function CheckIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function CheckIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
package/dist/icons/CheckIcon.mjs
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/CheckIcon.tsx
|
|
4
4
|
function n(n) {
|
|
5
5
|
return /* @__PURE__ */ t(e, {
|
|
6
6
|
...n,
|
|
7
7
|
children: /* @__PURE__ */ t("path", { d: "M20 6 9 17l-5-5" })
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as CheckIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function ChevronDownIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function ChevronDownIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/ChevronDownIcon.tsx
|
|
4
4
|
function n(n) {
|
|
5
5
|
return /* @__PURE__ */ t(e, {
|
|
6
6
|
...n,
|
|
7
7
|
children: /* @__PURE__ */ t("path", { d: "m6 9 6 6 6-6" })
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as ChevronDownIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function ChevronRightIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function ChevronRightIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/ChevronRightIcon.tsx
|
|
4
4
|
function n(n) {
|
|
5
5
|
return /* @__PURE__ */ t(e, {
|
|
6
6
|
...n,
|
|
7
7
|
children: /* @__PURE__ */ t("path", { d: "m9 18 6-6-6-6" })
|
|
8
8
|
});
|
|
9
9
|
}
|
|
10
|
-
//#endregion
|
|
11
10
|
export { n as ChevronRightIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function CircleAlertIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function CircleAlertIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/CircleAlertIcon.tsx
|
|
4
4
|
function r(r) {
|
|
5
5
|
return /* @__PURE__ */ n(e, {
|
|
6
6
|
...r,
|
|
@@ -11,5 +11,4 @@ function r(r) {
|
|
|
11
11
|
}), /* @__PURE__ */ t("path", { d: "M12 8v4M12 16h.01" })]
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as CircleAlertIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function CircleCheckIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function CircleCheckIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/CircleCheckIcon.tsx
|
|
4
4
|
function r(r) {
|
|
5
5
|
return /* @__PURE__ */ n(e, {
|
|
6
6
|
...r,
|
|
@@ -11,5 +11,4 @@ function r(r) {
|
|
|
11
11
|
}), /* @__PURE__ */ t("path", { d: "m16 9-5.5 5.5L8 12" })]
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as CircleCheckIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function CircleDotIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function CircleDotIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/CircleDotIcon.tsx
|
|
4
4
|
function r(r) {
|
|
5
5
|
return /* @__PURE__ */ n(e, {
|
|
6
6
|
...r,
|
|
@@ -15,5 +15,4 @@ function r(r) {
|
|
|
15
15
|
})]
|
|
16
16
|
});
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { r as CircleDotIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function CircleSlashIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function CircleSlashIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/CircleSlashIcon.tsx
|
|
4
4
|
function r(r) {
|
|
5
5
|
return /* @__PURE__ */ n(e, {
|
|
6
6
|
...r,
|
|
@@ -11,5 +11,4 @@ function r(r) {
|
|
|
11
11
|
}), /* @__PURE__ */ t("path", { d: "m9 15 6-6" })]
|
|
12
12
|
});
|
|
13
13
|
}
|
|
14
|
-
//#endregion
|
|
15
14
|
export { r as CircleSlashIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function EllipsisIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function EllipsisIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Icon as e } from "../Icon/index.mjs";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/icons/EllipsisIcon.tsx
|
|
4
4
|
function r(r) {
|
|
5
5
|
return /* @__PURE__ */ n(e, {
|
|
6
6
|
...r,
|
|
@@ -23,5 +23,4 @@ function r(r) {
|
|
|
23
23
|
]
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
|
-
//#endregion
|
|
27
26
|
export { r as EllipsisIcon };
|
|
@@ -1,4 +1,2 @@
|
|
|
1
1
|
import { IconProps } from "../Icon/index.mjs";
|
|
2
|
-
|
|
3
|
-
export declare function GitMergeIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|
|
4
|
-
//#endregion
|
|
2
|
+
export declare function GitMergeIcon(props: Omit<IconProps, "children" | "viewBox">): import("react").JSX.Element;
|