@xeonr/platform-ui 1.6.1 → 1.7.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/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/kit/Anchored.d.ts.map +1 -1
- package/dist/kit/Anchored.js +4 -1
- package/dist/kit/Anchored.js.map +1 -1
- package/dist/kit/Badge.d.ts +23 -0
- package/dist/kit/Badge.d.ts.map +1 -1
- package/dist/kit/Badge.js +53 -0
- package/dist/kit/Badge.js.map +1 -1
- package/dist/kit/Button.d.ts +13 -0
- package/dist/kit/Button.d.ts.map +1 -1
- package/dist/kit/Button.js +7 -3
- package/dist/kit/Button.js.map +1 -1
- package/dist/kit/Checkbox.d.ts +34 -0
- package/dist/kit/Checkbox.d.ts.map +1 -0
- package/dist/kit/Checkbox.js +52 -0
- package/dist/kit/Checkbox.js.map +1 -0
- package/dist/kit/Color.d.ts +8 -1
- package/dist/kit/Color.d.ts.map +1 -1
- package/dist/kit/Color.js +14 -5
- package/dist/kit/Color.js.map +1 -1
- package/dist/kit/Controls.d.ts +2 -33
- package/dist/kit/Controls.d.ts.map +1 -1
- package/dist/kit/Controls.js +3 -44
- package/dist/kit/Controls.js.map +1 -1
- package/dist/kit/DataGrid.d.ts +42 -2
- package/dist/kit/DataGrid.d.ts.map +1 -1
- package/dist/kit/DataGrid.js +98 -7
- package/dist/kit/DataGrid.js.map +1 -1
- package/dist/kit/Editable.d.ts.map +1 -1
- package/dist/kit/Editable.js +3 -0
- package/dist/kit/Editable.js.map +1 -1
- package/dist/kit/Form.d.ts +7 -1
- package/dist/kit/Form.d.ts.map +1 -1
- package/dist/kit/Form.js +7 -4
- package/dist/kit/Form.js.map +1 -1
- package/dist/kit/Menu.d.ts +13 -2
- package/dist/kit/Menu.d.ts.map +1 -1
- package/dist/kit/Menu.js +32 -6
- package/dist/kit/Menu.js.map +1 -1
- package/dist/kit/Spectrum.d.ts +40 -0
- package/dist/kit/Spectrum.d.ts.map +1 -0
- package/dist/kit/Spectrum.js +235 -0
- package/dist/kit/Spectrum.js.map +1 -0
- package/dist/kit/SplitButton.d.ts +43 -0
- package/dist/kit/SplitButton.d.ts.map +1 -0
- package/dist/kit/SplitButton.js +34 -0
- package/dist/kit/SplitButton.js.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +21 -2
- package/dist/theme/ThemeProvider.d.ts.map +1 -1
- package/dist/theme/ThemeProvider.js +21 -5
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/ThemeScope.d.ts +8 -2
- package/dist/theme/ThemeScope.d.ts.map +1 -1
- package/dist/theme/ThemeScope.js +20 -2
- package/dist/theme/ThemeScope.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
import { AppButton } from "./Button.js";
|
|
4
|
+
import { Icon } from "./Icon.js";
|
|
5
|
+
import { Menu } from "./Menu.js";
|
|
6
|
+
// SplitButton: one action, and the menu of its variants beside it — "Export
|
|
7
|
+
// PNG ▾ → PNG / BMP". Added for upl.im's gta-viewer (1.7, UPL-242), which had
|
|
8
|
+
// composed it from an AppButton and a Menu with a narrow trigger.
|
|
9
|
+
const Group = styled.span `
|
|
10
|
+
display: ${(p) => (p.$full ? "flex" : "inline-flex")};
|
|
11
|
+
align-items: stretch;
|
|
12
|
+
> :first-child { flex: 1 1 auto; border-top-right-radius: 0; border-bottom-right-radius: 0; }
|
|
13
|
+
/* the menu's trigger: square on the joined side, and a seam in the
|
|
14
|
+
button's own ink so it reads on every variant */
|
|
15
|
+
> :last-child button {
|
|
16
|
+
border-top-left-radius: 0;
|
|
17
|
+
border-bottom-left-radius: 0;
|
|
18
|
+
margin-left: -1px;
|
|
19
|
+
padding: 0 8px;
|
|
20
|
+
border-left-color: color-mix(in srgb, currentColor 28%, transparent);
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
/**
|
|
24
|
+
* SplitButton: a primary action with a ▾ beside it that opens a `Menu` of
|
|
25
|
+
* alternatives. Reach for it when one choice is the obvious one and the
|
|
26
|
+
* others are its variants (a format, a scope); when no option is the default,
|
|
27
|
+
* use a plain `Menu` behind an `AppButton`, and when the options are peers
|
|
28
|
+
* shown all the time, `Segmented`.
|
|
29
|
+
*/
|
|
30
|
+
export function SplitButton({ children, onClick, href, download, target, rel, menu, menuLabel = "More options", variant = "ghost", size = "sm", icon, loading, disabled, menuDisabled, align = "right", side, width, onOpenChange, fullWidth, title, }) {
|
|
31
|
+
const menuOff = !!(disabled || menuDisabled || loading);
|
|
32
|
+
return (_jsxs(Group, { "$full": fullWidth, children: [href ? (_jsx(AppButton, { as: "a", href: href, download: download, target: target, rel: rel, variant: variant, size: size, icon: icon, loading: loading, disabled: disabled, title: title, onClick: onClick, children: children })) : (_jsx(AppButton, { variant: variant, size: size, icon: icon, loading: loading, disabled: disabled, title: title, onClick: onClick, children: children })), _jsx(Menu, { align: align, side: side, width: width, label: menuLabel, disabled: menuOff, onOpenChange: onOpenChange, trigger: (open) => (_jsx(AppButton, { variant: variant, size: size, disabled: menuOff, "aria-label": menuLabel, "aria-haspopup": "menu", "aria-expanded": open, children: _jsx(Icon, { name: open ? "chevron-up" : "chevron-down" }) })), children: menu })] }));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=SplitButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../../src/kit/SplitButton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,EAAE,SAAS,EAAuB,MAAM,aAAc,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAiB,MAAM,WAAY,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAY,CAAC;AAG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EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,YACtH,QAAQ,GACC,CACb,EACD,KAAC,IAAI,IACH,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,OAAO,EACjB,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CACjB,KAAC,SAAS,IAAC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,gBAAc,SAAS,mBAAgB,MAAM,mBAAgB,IAAI,YACzH,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,GAAI,GAC1C,CACb,YAEA,IAAI,GACA,IACD,CACT,CAAC;AACJ,CAAC"}
|
|
@@ -28,8 +28,27 @@ export interface AppThemeProviderProps {
|
|
|
28
28
|
* explicit localStorage choice on this host still wins.
|
|
29
29
|
*/
|
|
30
30
|
initialPref?: ThemePref | undefined;
|
|
31
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* Called when the person changes the preference (`setPref`, `cycle`), for a
|
|
33
|
+
* host that mirrors it into a cookie — or, with `pref`, for the host that
|
|
34
|
+
* owns it. Never called because the `pref` prop changed.
|
|
35
|
+
*/
|
|
32
36
|
onPrefChange?: ((pref: ThemePref) => void) | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Controlled mode (1.7): the preference is the host's, not the provider's.
|
|
39
|
+
* For a surface that is TOLD its theme — a renderer in a sandboxed iframe
|
|
40
|
+
* following its host's `uplim:theme`, a thumbnail page captured light then
|
|
41
|
+
* dark, an embed whose parent page owns the toggle.
|
|
42
|
+
*
|
|
43
|
+
* While `pref` is given the provider touches no storage at all: it neither
|
|
44
|
+
* reads its key on mount (so a stale stored value cannot win a frame) nor
|
|
45
|
+
* writes it, ignores other tabs' changes, and does not remember the brand
|
|
46
|
+
* either (`brand` and `setBrand` still apply, in memory). Every render uses
|
|
47
|
+
* the prop, from the first one. `setPref`/`cycle` call `onPrefChange` and
|
|
48
|
+
* change nothing themselves; the host decides and passes the new `pref` back.
|
|
49
|
+
* Pass `"system"` to follow the device's scheme under the host's control.
|
|
50
|
+
*/
|
|
51
|
+
pref?: ThemePref | undefined;
|
|
33
52
|
/** false when the host inlines `globalCss()` itself (SSR without a styled sheet). */
|
|
34
53
|
globalStyle?: boolean | undefined;
|
|
35
54
|
/**
|
|
@@ -42,7 +61,7 @@ export interface AppThemeProviderProps {
|
|
|
42
61
|
*/
|
|
43
62
|
brand?: string | null | undefined;
|
|
44
63
|
}
|
|
45
|
-
export declare function AppThemeProvider({ children, storageKey, initialPref, onPrefChange, globalStyle, brand: initialBrand, }: AppThemeProviderProps): import("react").JSX.Element;
|
|
64
|
+
export declare function AppThemeProvider({ children, storageKey, initialPref, onPrefChange, globalStyle, brand: initialBrand, pref: controlledPref, }: AppThemeProviderProps): import("react").JSX.Element;
|
|
46
65
|
export declare function useTheme(): ThemeCtx;
|
|
47
66
|
/** Null outside a provider — for a component that may render in either place. */
|
|
48
67
|
export declare function useThemeMaybe(): ThemeCtx | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiG,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAoBtI,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;AAMpD,UAAU,QAAQ;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,GAAG,MAAM,CAAC;IAC3B,OAAO,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI,CAAC;IAChC,6EAA6E;IAC7E,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB;;;OAGG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB;;;;;OAKG;IACH,QAAQ,EAAE,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;CACxC;AAkDD,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,WAAW,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IACpC;;;;OAIG;IACH,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAC7B,qFAAqF;IACrF,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACnC;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,QAAQ,EACR,UAAgC,EAChC,WAAW,EACX,YAAY,EACZ,WAAkB,EAClB,KAAK,EAAE,YAAmB,EAC1B,IAAI,EAAE,cAAc,GACrB,EAAE,qBAAqB,+BAiHvB;AAED,wBAAgB,QAAQ,IAAI,QAAQ,CAInC;AAED,iFAAiF;AACjF,wBAAgB,aAAa,IAAI,QAAQ,GAAG,IAAI,CAE/C"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useState } from "react";
|
|
2
|
+
import { createContext, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { createGlobalStyle } from "styled-components";
|
|
4
4
|
import { brandCss } from "./brand.js";
|
|
5
5
|
import { cssVariables, globalCss } from "./tokens.js";
|
|
@@ -52,24 +52,33 @@ function storedBrand() {
|
|
|
52
52
|
return null;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
-
export function AppThemeProvider({ children, storageKey = DEFAULT_STORAGE_KEY, initialPref, onPrefChange, globalStyle = true, brand: initialBrand = null, }) {
|
|
55
|
+
export function AppThemeProvider({ children, storageKey = DEFAULT_STORAGE_KEY, initialPref, onPrefChange, globalStyle = true, brand: initialBrand = null, pref: controlledPref, }) {
|
|
56
|
+
const controlled = controlledPref !== undefined;
|
|
57
|
+
// read inside effects and callbacks that must not re-run when it changes
|
|
58
|
+
const controlledRef = useRef(controlled);
|
|
59
|
+
useIsoLayoutEffect(() => { controlledRef.current = controlled; }, [controlled]);
|
|
56
60
|
const STORAGE_KEY = storageKey;
|
|
57
61
|
// The first render uses only what a server could know too: the props. The
|
|
58
62
|
// remembered preference, the system scheme and the remembered brand are read
|
|
59
63
|
// in a layout effect, which runs before the first paint, so a client-only
|
|
60
64
|
// console still paints them on its first frame, and a server-rendered host
|
|
61
65
|
// hydrates against matching markup instead of throwing it away (CON-64).
|
|
62
|
-
const [
|
|
66
|
+
const [ownPref, setPrefState] = useState(() => normalise(initialPref));
|
|
67
|
+
const pref = controlled ? normalise(controlledPref) : ownPref;
|
|
63
68
|
const [sys, setSys] = useState("dark");
|
|
64
69
|
// An explicit prop beats the remembered value: a host that states its colour
|
|
65
70
|
// is not guessing. Everything else starts from what the registry said here
|
|
66
71
|
// last time, which is right on every visit after the first.
|
|
67
72
|
const [brand, setBrandState] = useState(initialBrand);
|
|
68
73
|
useIsoLayoutEffect(() => {
|
|
74
|
+
setSys(systemScheme());
|
|
75
|
+
// a controlled provider was told its theme and its brand: storage, which
|
|
76
|
+
// a sandboxed iframe may not even have, has nothing to add
|
|
77
|
+
if (controlledRef.current)
|
|
78
|
+
return;
|
|
69
79
|
const p = storedPref(STORAGE_KEY);
|
|
70
80
|
if (p)
|
|
71
81
|
setPrefState(p);
|
|
72
|
-
setSys(systemScheme());
|
|
73
82
|
if (!initialBrand) {
|
|
74
83
|
const b = storedBrand();
|
|
75
84
|
if (b)
|
|
@@ -88,6 +97,8 @@ export function AppThemeProvider({ children, storageKey = DEFAULT_STORAGE_KEY, i
|
|
|
88
97
|
}
|
|
89
98
|
const setBrand = useCallback((hex) => {
|
|
90
99
|
setBrandState(hex);
|
|
100
|
+
if (controlledRef.current)
|
|
101
|
+
return;
|
|
91
102
|
try {
|
|
92
103
|
if (hex && HEX_RE.test(hex))
|
|
93
104
|
localStorage.setItem(BRAND_KEY, hex);
|
|
@@ -117,7 +128,7 @@ export function AppThemeProvider({ children, storageKey = DEFAULT_STORAGE_KEY, i
|
|
|
117
128
|
// Cross-tab sync: another tab changing the preference updates us live.
|
|
118
129
|
useEffect(() => {
|
|
119
130
|
const on = (e) => {
|
|
120
|
-
if (e.key !== STORAGE_KEY)
|
|
131
|
+
if (e.key !== STORAGE_KEY || controlledRef.current)
|
|
121
132
|
return;
|
|
122
133
|
setPrefState(normalise(e.newValue));
|
|
123
134
|
};
|
|
@@ -125,6 +136,11 @@ export function AppThemeProvider({ children, storageKey = DEFAULT_STORAGE_KEY, i
|
|
|
125
136
|
return () => window.removeEventListener("storage", on);
|
|
126
137
|
}, [STORAGE_KEY]);
|
|
127
138
|
const setPref = useCallback((p) => {
|
|
139
|
+
if (controlledRef.current) {
|
|
140
|
+
// the host owns it: say what the person asked for, and wait to be told
|
|
141
|
+
onPrefChange?.(p);
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
128
144
|
setPrefState(p);
|
|
129
145
|
try {
|
|
130
146
|
if (p === "system")
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.js","sourceRoot":"","sources":["../../src/theme/ThemeProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UA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M,CAAC;CAC5B,CAAC"}
|
|
@@ -6,6 +6,12 @@ export interface ThemeScopeProps {
|
|
|
6
6
|
brand?: string | null | undefined;
|
|
7
7
|
/** Follow the OS colour scheme when nothing explicit is set. Default true. */
|
|
8
8
|
systemScheme?: boolean | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Apply the element resets the kit's components assume (button, form
|
|
11
|
+
* controls, links, code), at zero specificity (CON-155). Default true; false
|
|
12
|
+
* for a host whose own reset already covers them.
|
|
13
|
+
*/
|
|
14
|
+
reset?: boolean | undefined;
|
|
9
15
|
/**
|
|
10
16
|
* Host CSS appended after the kit's sheets, for overrides. Write it against
|
|
11
17
|
* `scopeSelector(name)`; for a variable the brand ramp also sets, double the
|
|
@@ -20,11 +26,11 @@ export interface ThemeScopeProps {
|
|
|
20
26
|
* server, where nothing portals.
|
|
21
27
|
*/
|
|
22
28
|
export declare function usePortalTarget(): HTMLElement | null;
|
|
23
|
-
/** The scope's sheets: the kit's tokens and ramp, the ink, then the host's own. */
|
|
24
29
|
export declare function themeScopeCss(name: string, opts?: {
|
|
25
30
|
brand?: string | null | undefined;
|
|
26
31
|
systemScheme?: boolean | undefined;
|
|
32
|
+
reset?: boolean | undefined;
|
|
27
33
|
css?: string | undefined;
|
|
28
34
|
}): string;
|
|
29
|
-
export declare function ThemeScope({ name, brand, systemScheme, css, children }: ThemeScopeProps): import("react").JSX.Element;
|
|
35
|
+
export declare function ThemeScope({ name, brand, systemScheme, reset, css, children }: ThemeScopeProps): import("react").JSX.Element;
|
|
30
36
|
//# sourceMappingURL=ThemeScope.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeScope.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeScope.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeScope.d.ts","sourceRoot":"","sources":["../../src/theme/ThemeScope.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AA8BxG,MAAM,WAAW,eAAe;IAC9B,uEAAuE;IACvE,IAAI,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,8EAA8E;IAC9E,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACnC;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAOD;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,WAAW,GAAG,IAAI,CAIpD;AAqBD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAAG,MAAM,CAgB3L;AAQD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,eAAe,+BA0B9F"}
|
package/dist/theme/ThemeScope.js
CHANGED
|
@@ -19,6 +19,23 @@ export function usePortalTarget() {
|
|
|
19
19
|
return hasDOM ? document.body : null;
|
|
20
20
|
}
|
|
21
21
|
/** The scope's sheets: the kit's tokens and ramp, the ink, then the host's own. */
|
|
22
|
+
/**
|
|
23
|
+
* The element half of globalCss(), for inside a scope (CON-155): the kit's
|
|
24
|
+
* buttons, fields and links are written assuming it, and without it a kit
|
|
25
|
+
* button draws the browser's grey outset box. Under `:where()` it has no more
|
|
26
|
+
* weight than a bare element selector, so any class rule (the kit's own, or
|
|
27
|
+
* the host's) still wins. The focus ring and scrollbars are left to the host.
|
|
28
|
+
*/
|
|
29
|
+
function scopedResetCss(s) {
|
|
30
|
+
const w = `:where(${s})`;
|
|
31
|
+
return `
|
|
32
|
+
${w} button { font: inherit; color: inherit; background: none; border: none; padding: 0; cursor: pointer; }
|
|
33
|
+
${w} input, ${w} select, ${w} textarea { font: inherit; color: inherit; }
|
|
34
|
+
${w} a { color: inherit; }
|
|
35
|
+
${w} code, ${w} pre, ${w} kbd { font-family: ${v.mono}; }
|
|
36
|
+
${w} select option, ${w} select optgroup { background: ${v.surface}; color: ${v.text}; }
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
22
39
|
export function themeScopeCss(name, opts) {
|
|
23
40
|
const sheet = { scope: name, systemScheme: opts?.systemScheme };
|
|
24
41
|
const s = scopeSelector(name);
|
|
@@ -32,6 +49,7 @@ ${s} {
|
|
|
32
49
|
}
|
|
33
50
|
${s} *, ${s} *::before, ${s} *::after { box-sizing: border-box; }
|
|
34
51
|
${s} ::selection { background: ${v.brand22}; }
|
|
52
|
+
${opts?.reset === false ? "" : scopedResetCss(s)}
|
|
35
53
|
${opts?.css ?? ""}
|
|
36
54
|
`;
|
|
37
55
|
}
|
|
@@ -39,7 +57,7 @@ const ScopeSheet = createGlobalStyle `
|
|
|
39
57
|
${(p) => p.$css}
|
|
40
58
|
`;
|
|
41
59
|
const wrapperStyle = { display: "contents" };
|
|
42
|
-
export function ThemeScope({ name, brand, systemScheme, css, children }) {
|
|
60
|
+
export function ThemeScope({ name, brand, systemScheme, reset, css, children }) {
|
|
43
61
|
// The portal host is made once the component is in the DOM, so a server
|
|
44
62
|
// render (and a hydrating one) never touches document. An overlay that is
|
|
45
63
|
// already open on the first client frame lands in body for that frame and
|
|
@@ -56,6 +74,6 @@ export function ThemeScope({ name, brand, systemScheme, css, children }) {
|
|
|
56
74
|
setHost(null);
|
|
57
75
|
};
|
|
58
76
|
}, [name]);
|
|
59
|
-
return (_jsxs(PortalCtx.Provider, { value: host, children: [_jsx(ScopeSheet, { "$css": themeScopeCss(name, { brand, systemScheme, css }) }), _jsx("div", { "data-x-scope": name, style: wrapperStyle, children: children })] }));
|
|
77
|
+
return (_jsxs(PortalCtx.Provider, { value: host, children: [_jsx(ScopeSheet, { "$css": themeScopeCss(name, { brand, systemScheme, reset, css }) }), _jsx("div", { "data-x-scope": name, style: wrapperStyle, children: children })] }));
|
|
60
78
|
}
|
|
61
79
|
//# sourceMappingURL=ThemeScope.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeScope.js","sourceRoot":"","sources":["../../src/theme/ThemeScope.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"ThemeScope.js","sourceRoot":"","sources":["../../src/theme/ThemeScope.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AACxG,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAqB,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,CAAC,EAAE,MAAM,aAAa,CAAC;AAgD9C,MAAM,MAAM,GAAG,OAAO,MAAM,KAAK,WAAW,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KAAK,EAAE,GAAG,EAAE,CAAC,GAAI,EAC9E,8BAAmB,IAAI,EAAE,KAAK,EAAE,YAAY,YACzC,QAAQ,GACL,IACa,CACtB,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xeonr/platform-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"description": "Xeonr Platform Suite design language: the --x-* token sheet, theme provider and kit shared by every Xeonr console.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"scripts": {
|
|
86
86
|
"build": "tsc -p tsconfig.build.json",
|
|
87
87
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
88
|
-
"lint": "eslint . && node scripts/check-colour-literals.mjs src/kit/CodeEditor.tsx src/theme/theme.test.ts src/kit/kit.test.tsx",
|
|
88
|
+
"lint": "eslint . && node scripts/check-colour-literals.mjs src/kit/CodeEditor.tsx src/theme/theme.test.ts src/kit/kit.test.tsx src/kit/renderers.test.tsx",
|
|
89
89
|
"test": "vitest run"
|
|
90
90
|
}
|
|
91
91
|
}
|