@roxyapi/ui 0.16.0 → 0.17.1
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/components-catalog.json +271 -55
- package/dist/cdn/components/endpoint-form.js +1 -1
- package/dist/cdn/components/endpoint-form.js.map +2 -2
- package/dist/cdn/components/location-search.js +1 -1
- package/dist/cdn/components/location-search.js.map +2 -2
- package/dist/cdn/roxy-ui.js +2 -2
- package/dist/cdn/roxy-ui.js.map +2 -2
- package/dist/components/endpoint-form.d.ts +3 -1
- package/dist/components/endpoint-form.d.ts.map +1 -1
- package/dist/components/endpoint-form.js +1 -1
- package/dist/components/endpoint-form.js.map +2 -2
- package/dist/components/location-search.d.ts.map +1 -1
- package/dist/components/location-search.js +1 -1
- package/dist/components/location-search.js.map +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/dist/styles/palettes.d.ts +44 -0
- package/dist/styles/palettes.d.ts.map +1 -0
- package/dist/styles/themes/eucalyptus.css +116 -0
- package/dist/styles/themes/kiln.css +116 -0
- package/dist/styles/themes/moonlit.css +116 -0
- package/dist/styles/themes/practitioner.css +20 -17
- package/dist/types/types.gen.d.ts +4663 -4663
- package/dist/types/types.gen.d.ts.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/endpoint-form.ts +4 -2
- package/src/components/location-search.ts +8 -1
- package/src/styles/palettes.ts +121 -0
- package/src/styles/themes/eucalyptus.css +116 -0
- package/src/styles/themes/kiln.css +116 -0
- package/src/styles/themes/moonlit.css +116 -0
- package/src/styles/themes/practitioner.css +20 -17
- package/src/types/types.gen.ts +4649 -4649
- package/src/version.ts +1 -1
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ROXY_UI_VERSION = "0.
|
|
1
|
+
export declare const ROXY_UI_VERSION = "0.17.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@roxyapi/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.1",
|
|
4
4
|
"description": "Web components for the RoxyAPI catalog. Drop-in charts, tables, cards, forms for astrology, tarot, numerology, biorhythm, I Ching, crystals, dreams, angel numbers, and more. One key, beautiful in 30 minutes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -522,10 +522,12 @@ export class RoxyEndpointForm extends LitElement {
|
|
|
522
522
|
return LOCATION_TRIO.every((n) => inGroup.some((f) => f.name === n));
|
|
523
523
|
}
|
|
524
524
|
|
|
525
|
-
/**
|
|
525
|
+
/**
|
|
526
|
+
* True when the location block must show a required mark, i.e. ANY member of the trio is required. The block is a single city-search input that fills all three, so if even one is required (e.g. bodygraph requires `timezone` while `latitude`/`longitude` are optional) the input is required and `collectMissing` blocks submit without it. Requiring ALL three understated that: the asterisk went missing on a block the form still enforced, which reads as optional to a non-technical embedder.
|
|
527
|
+
*/
|
|
526
528
|
private locationRequired(group?: string): boolean {
|
|
527
529
|
const inGroup = this.fields.filter((f) => f.group === group);
|
|
528
|
-
return LOCATION_TRIO.
|
|
530
|
+
return LOCATION_TRIO.some((n) =>
|
|
529
531
|
inGroup.some((f) => f.name === n && f.required),
|
|
530
532
|
);
|
|
531
533
|
}
|
|
@@ -86,6 +86,12 @@ export class RoxyLocationSearch extends LitElement {
|
|
|
86
86
|
top: calc(100% + 4px);
|
|
87
87
|
left: 0;
|
|
88
88
|
right: 0;
|
|
89
|
+
/* Reset the UA <ul> defaults, or the listbox shows disc bullets and a
|
|
90
|
+
* ~40px inline indent. Small even inset so rounded rows never clip the
|
|
91
|
+
* container corners. */
|
|
92
|
+
margin: 0;
|
|
93
|
+
padding: var(--roxy-space-xs, 0.25rem);
|
|
94
|
+
list-style: none;
|
|
89
95
|
background: var(--roxy-bg, #fff);
|
|
90
96
|
border: 1px solid var(--roxy-border, #e4e4e7);
|
|
91
97
|
border-radius: var(--roxy-radius-md, 8px);
|
|
@@ -97,12 +103,13 @@ export class RoxyLocationSearch extends LitElement {
|
|
|
97
103
|
}
|
|
98
104
|
.option {
|
|
99
105
|
display: flex;
|
|
100
|
-
align-items:
|
|
106
|
+
align-items: center;
|
|
101
107
|
gap: var(--roxy-space-sm, 0.5rem);
|
|
102
108
|
width: 100%;
|
|
103
109
|
padding: var(--roxy-space-sm, 0.5rem) var(--roxy-space-md, 1rem);
|
|
104
110
|
background: transparent;
|
|
105
111
|
border: 0;
|
|
112
|
+
border-radius: var(--roxy-radius-sm, 6px);
|
|
106
113
|
text-align: left;
|
|
107
114
|
font-family: inherit;
|
|
108
115
|
font-size: var(--roxy-text-sm, 0.875rem);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme preset palettes: the single source of truth for the shipped Roxy UI themes. Each entry drives a generated `styles/themes/{name}.css` file (via `scripts/sync-themes.ts`) and the demo customizer presets (via `scripts/sync-manifest.ts`). Edit the data here and rerun the codegen; never hand-edit the generated CSS.
|
|
3
|
+
*
|
|
4
|
+
* @remarks Every palette only reassigns `--roxy-*` tokens, so a theme file composes with the core token contract in `tokens.css` instead of replacing it. Light values are the practitioner-grade palettes; each dark surface and border is tuned by OKLCH rule rather than by eye: lightness of the card surface sits at least 0.06 above the page background and the border at least 0.05 above the surface, keeping each palette's own hue and chroma so the elevation reads as a warm lift, not a grey one, while foreground/surface stays above 7:1 and muted/surface above 4.5:1 for WCAG. The `practitioner` preset is the rosewater palette and keeps the shipped filename `practitioner.css`.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
export type PaletteName = 'practitioner' | 'eucalyptus' | 'kiln' | 'moonlit';
|
|
8
|
+
|
|
9
|
+
/** The theme-varying tokens one palette sets per mode. `accent-ink` and `ring` derive from `accent`, and `danger` is shared, so none of them appear here. */
|
|
10
|
+
export interface PaletteTokens {
|
|
11
|
+
accent: string;
|
|
12
|
+
secondary: string;
|
|
13
|
+
bg: string;
|
|
14
|
+
surface: string;
|
|
15
|
+
fg: string;
|
|
16
|
+
muted: string;
|
|
17
|
+
border: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface Palette {
|
|
21
|
+
light: PaletteTokens;
|
|
22
|
+
dark: PaletteTokens;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Chrome that never varies by palette, declared once in each theme's light block and inherited by the dark blocks. `danger` still varies by mode; the rest are mode-invariant.
|
|
27
|
+
*/
|
|
28
|
+
export const SHARED_THEME = {
|
|
29
|
+
fontImport:
|
|
30
|
+
'https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap',
|
|
31
|
+
fontSans:
|
|
32
|
+
'"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
33
|
+
fontDisplay:
|
|
34
|
+
'"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif',
|
|
35
|
+
radius: { sm: '0.4375rem', md: '0.875rem', lg: '1.575rem' },
|
|
36
|
+
shadow: { sm: 'none', md: 'none', lg: 'none' },
|
|
37
|
+
danger: { light: '#b23a38', dark: '#e4736b' },
|
|
38
|
+
} as const;
|
|
39
|
+
|
|
40
|
+
export const ROXY_PALETTES: Record<PaletteName, Palette> = {
|
|
41
|
+
practitioner: {
|
|
42
|
+
light: {
|
|
43
|
+
accent: '#914955',
|
|
44
|
+
secondary: '#503a3a',
|
|
45
|
+
bg: '#fbf6f3',
|
|
46
|
+
surface: '#f5e8e0',
|
|
47
|
+
fg: '#3e2a2c',
|
|
48
|
+
muted: '#7e625f',
|
|
49
|
+
border: '#ead9d2',
|
|
50
|
+
},
|
|
51
|
+
dark: {
|
|
52
|
+
accent: '#d9a2a6',
|
|
53
|
+
secondary: '#e0cecb',
|
|
54
|
+
bg: '#231619',
|
|
55
|
+
surface: '#37272b',
|
|
56
|
+
fg: '#f2e4df',
|
|
57
|
+
muted: '#b39698',
|
|
58
|
+
border: '#49353a',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
eucalyptus: {
|
|
62
|
+
light: {
|
|
63
|
+
accent: '#4c7060',
|
|
64
|
+
secondary: '#3a4037',
|
|
65
|
+
bg: '#f8f7f2',
|
|
66
|
+
surface: '#edefe6',
|
|
67
|
+
fg: '#22281f',
|
|
68
|
+
muted: '#666d63',
|
|
69
|
+
border: '#dce0d3',
|
|
70
|
+
},
|
|
71
|
+
dark: {
|
|
72
|
+
accent: '#9cc0ac',
|
|
73
|
+
secondary: '#cfd5ca',
|
|
74
|
+
bg: '#191e19',
|
|
75
|
+
surface: '#2a312a',
|
|
76
|
+
fg: '#e9ede3',
|
|
77
|
+
muted: '#9fa89b',
|
|
78
|
+
border: '#384138',
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
kiln: {
|
|
82
|
+
light: {
|
|
83
|
+
accent: '#a44a24',
|
|
84
|
+
secondary: '#493d30',
|
|
85
|
+
bg: '#faf4ea',
|
|
86
|
+
surface: '#efe6d6',
|
|
87
|
+
fg: '#322820',
|
|
88
|
+
muted: '#74634f',
|
|
89
|
+
border: '#e6d8c2',
|
|
90
|
+
},
|
|
91
|
+
dark: {
|
|
92
|
+
accent: '#d98d5f',
|
|
93
|
+
secondary: '#dccdbc',
|
|
94
|
+
bg: '#211710',
|
|
95
|
+
surface: '#35281e',
|
|
96
|
+
fg: '#f2e7d9',
|
|
97
|
+
muted: '#b49d87',
|
|
98
|
+
border: '#463729',
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
moonlit: {
|
|
102
|
+
light: {
|
|
103
|
+
accent: '#254b5a',
|
|
104
|
+
secondary: '#2d3c47',
|
|
105
|
+
bg: '#faf6ec',
|
|
106
|
+
surface: '#f1eadb',
|
|
107
|
+
fg: '#14232e',
|
|
108
|
+
muted: '#5c6a76',
|
|
109
|
+
border: '#e4dbc6',
|
|
110
|
+
},
|
|
111
|
+
dark: {
|
|
112
|
+
accent: '#c9a96b',
|
|
113
|
+
secondary: '#ced0c7',
|
|
114
|
+
bg: '#0b1826',
|
|
115
|
+
surface: '#1b2a39',
|
|
116
|
+
fg: '#efe7d3',
|
|
117
|
+
muted: '#92a4b2',
|
|
118
|
+
border: '#263a4c',
|
|
119
|
+
},
|
|
120
|
+
},
|
|
121
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Eucalyptus theme preset for Roxy UI. GENERATED by scripts/sync-themes.ts
|
|
3
|
+
* from src/styles/palettes.ts. Do not edit; change the palette data and
|
|
4
|
+
* rerun the codegen.
|
|
5
|
+
*
|
|
6
|
+
* It only reassigns --roxy-* tokens, so it composes with the core token
|
|
7
|
+
* contract instead of replacing it: link it AFTER the base tokens (or the
|
|
8
|
+
* CDN bundle that injects them) and every component on the page adopts the
|
|
9
|
+
* look. Light and dark blocks mirror the trigger structure of tokens.css
|
|
10
|
+
* exactly (OS preference, [data-theme] / .dark opt-in, and the explicit-
|
|
11
|
+
* light opt-out), all at :where() zero specificity so a per-page override
|
|
12
|
+
* still wins.
|
|
13
|
+
*
|
|
14
|
+
* Fonts are loaded below via one Google Fonts @import (both families are
|
|
15
|
+
* OFL, loaded from Google, never bundled here). To load them with markup
|
|
16
|
+
* instead, drop the @import line and add these to the page <head>:
|
|
17
|
+
*
|
|
18
|
+
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
19
|
+
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
20
|
+
* <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap">
|
|
21
|
+
*
|
|
22
|
+
* To use the whole preset with one line instead of copying tokens, link
|
|
23
|
+
* the file:
|
|
24
|
+
*
|
|
25
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/eucalyptus.css">
|
|
26
|
+
*/
|
|
27
|
+
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap");
|
|
28
|
+
|
|
29
|
+
/* Light defaults. Fonts, radius, and shadow do not vary by theme, so they are
|
|
30
|
+
* set once here and inherited by the dark blocks unchanged. */
|
|
31
|
+
:where(:root, :host) {
|
|
32
|
+
--roxy-font-sans:
|
|
33
|
+
"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
34
|
+
sans-serif;
|
|
35
|
+
--roxy-font-display:
|
|
36
|
+
"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
37
|
+
|
|
38
|
+
--roxy-radius-sm: 0.4375rem;
|
|
39
|
+
--roxy-radius-md: 0.875rem;
|
|
40
|
+
--roxy-radius-lg: 1.575rem;
|
|
41
|
+
|
|
42
|
+
--roxy-shadow-sm: none;
|
|
43
|
+
--roxy-shadow-md: none;
|
|
44
|
+
--roxy-shadow-lg: none;
|
|
45
|
+
|
|
46
|
+
--roxy-accent: #4c7060;
|
|
47
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
48
|
+
--roxy-ring: var(--roxy-accent);
|
|
49
|
+
/* Secondary ink (form labels, generic-renderer text, chart strokes): a warm tone between fg and muted so it stays stronger than help text. Without this override the stock slate leaks through and reads bluish on the warm palette. */
|
|
50
|
+
--roxy-secondary: #3a4037;
|
|
51
|
+
--roxy-danger: #b23a38;
|
|
52
|
+
|
|
53
|
+
--roxy-bg: #f8f7f2;
|
|
54
|
+
--roxy-surface: #edefe6;
|
|
55
|
+
--roxy-fg: #22281f;
|
|
56
|
+
--roxy-muted: #666d63;
|
|
57
|
+
--roxy-border: #dce0d3;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Dark theme via system preference. Mirrors tokens.css: only the theme-varying
|
|
61
|
+
* tokens are reassigned; accent-ink follows the accent (already legible on the
|
|
62
|
+
* dark surface) rather than mixing toward black. */
|
|
63
|
+
@media (prefers-color-scheme: dark) {
|
|
64
|
+
:where(:root, :host) {
|
|
65
|
+
--roxy-accent: #9cc0ac;
|
|
66
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
67
|
+
--roxy-secondary: #cfd5ca;
|
|
68
|
+
--roxy-danger: #e4736b;
|
|
69
|
+
|
|
70
|
+
--roxy-bg: #191e19;
|
|
71
|
+
--roxy-surface: #2a312a;
|
|
72
|
+
--roxy-fg: #e9ede3;
|
|
73
|
+
--roxy-muted: #9fa89b;
|
|
74
|
+
--roxy-border: #384138;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Light opt-out: beats the OS-dark block when the host explicitly chooses light. */
|
|
79
|
+
:where(
|
|
80
|
+
:root[data-theme="light"],
|
|
81
|
+
[data-theme="light"],
|
|
82
|
+
:root.light,
|
|
83
|
+
.light,
|
|
84
|
+
:host([data-theme="light"])
|
|
85
|
+
) {
|
|
86
|
+
--roxy-accent: #4c7060;
|
|
87
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
88
|
+
--roxy-secondary: #3a4037;
|
|
89
|
+
--roxy-danger: #b23a38;
|
|
90
|
+
|
|
91
|
+
--roxy-bg: #f8f7f2;
|
|
92
|
+
--roxy-surface: #edefe6;
|
|
93
|
+
--roxy-fg: #22281f;
|
|
94
|
+
--roxy-muted: #666d63;
|
|
95
|
+
--roxy-border: #dce0d3;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Dark theme via explicit opt-in ([data-theme=dark] or .dark on any ancestor). */
|
|
99
|
+
:where(
|
|
100
|
+
:root[data-theme="dark"],
|
|
101
|
+
[data-theme="dark"],
|
|
102
|
+
:root.dark,
|
|
103
|
+
.dark,
|
|
104
|
+
:host([data-theme="dark"])
|
|
105
|
+
) {
|
|
106
|
+
--roxy-accent: #9cc0ac;
|
|
107
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
108
|
+
--roxy-secondary: #cfd5ca;
|
|
109
|
+
--roxy-danger: #e4736b;
|
|
110
|
+
|
|
111
|
+
--roxy-bg: #191e19;
|
|
112
|
+
--roxy-surface: #2a312a;
|
|
113
|
+
--roxy-fg: #e9ede3;
|
|
114
|
+
--roxy-muted: #9fa89b;
|
|
115
|
+
--roxy-border: #384138;
|
|
116
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Kiln theme preset for Roxy UI. GENERATED by scripts/sync-themes.ts
|
|
3
|
+
* from src/styles/palettes.ts. Do not edit; change the palette data and
|
|
4
|
+
* rerun the codegen.
|
|
5
|
+
*
|
|
6
|
+
* It only reassigns --roxy-* tokens, so it composes with the core token
|
|
7
|
+
* contract instead of replacing it: link it AFTER the base tokens (or the
|
|
8
|
+
* CDN bundle that injects them) and every component on the page adopts the
|
|
9
|
+
* look. Light and dark blocks mirror the trigger structure of tokens.css
|
|
10
|
+
* exactly (OS preference, [data-theme] / .dark opt-in, and the explicit-
|
|
11
|
+
* light opt-out), all at :where() zero specificity so a per-page override
|
|
12
|
+
* still wins.
|
|
13
|
+
*
|
|
14
|
+
* Fonts are loaded below via one Google Fonts @import (both families are
|
|
15
|
+
* OFL, loaded from Google, never bundled here). To load them with markup
|
|
16
|
+
* instead, drop the @import line and add these to the page <head>:
|
|
17
|
+
*
|
|
18
|
+
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
19
|
+
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
20
|
+
* <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap">
|
|
21
|
+
*
|
|
22
|
+
* To use the whole preset with one line instead of copying tokens, link
|
|
23
|
+
* the file:
|
|
24
|
+
*
|
|
25
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/kiln.css">
|
|
26
|
+
*/
|
|
27
|
+
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap");
|
|
28
|
+
|
|
29
|
+
/* Light defaults. Fonts, radius, and shadow do not vary by theme, so they are
|
|
30
|
+
* set once here and inherited by the dark blocks unchanged. */
|
|
31
|
+
:where(:root, :host) {
|
|
32
|
+
--roxy-font-sans:
|
|
33
|
+
"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
34
|
+
sans-serif;
|
|
35
|
+
--roxy-font-display:
|
|
36
|
+
"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
37
|
+
|
|
38
|
+
--roxy-radius-sm: 0.4375rem;
|
|
39
|
+
--roxy-radius-md: 0.875rem;
|
|
40
|
+
--roxy-radius-lg: 1.575rem;
|
|
41
|
+
|
|
42
|
+
--roxy-shadow-sm: none;
|
|
43
|
+
--roxy-shadow-md: none;
|
|
44
|
+
--roxy-shadow-lg: none;
|
|
45
|
+
|
|
46
|
+
--roxy-accent: #a44a24;
|
|
47
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
48
|
+
--roxy-ring: var(--roxy-accent);
|
|
49
|
+
/* Secondary ink (form labels, generic-renderer text, chart strokes): a warm tone between fg and muted so it stays stronger than help text. Without this override the stock slate leaks through and reads bluish on the warm palette. */
|
|
50
|
+
--roxy-secondary: #493d30;
|
|
51
|
+
--roxy-danger: #b23a38;
|
|
52
|
+
|
|
53
|
+
--roxy-bg: #faf4ea;
|
|
54
|
+
--roxy-surface: #efe6d6;
|
|
55
|
+
--roxy-fg: #322820;
|
|
56
|
+
--roxy-muted: #74634f;
|
|
57
|
+
--roxy-border: #e6d8c2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Dark theme via system preference. Mirrors tokens.css: only the theme-varying
|
|
61
|
+
* tokens are reassigned; accent-ink follows the accent (already legible on the
|
|
62
|
+
* dark surface) rather than mixing toward black. */
|
|
63
|
+
@media (prefers-color-scheme: dark) {
|
|
64
|
+
:where(:root, :host) {
|
|
65
|
+
--roxy-accent: #d98d5f;
|
|
66
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
67
|
+
--roxy-secondary: #dccdbc;
|
|
68
|
+
--roxy-danger: #e4736b;
|
|
69
|
+
|
|
70
|
+
--roxy-bg: #211710;
|
|
71
|
+
--roxy-surface: #35281e;
|
|
72
|
+
--roxy-fg: #f2e7d9;
|
|
73
|
+
--roxy-muted: #b49d87;
|
|
74
|
+
--roxy-border: #463729;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Light opt-out: beats the OS-dark block when the host explicitly chooses light. */
|
|
79
|
+
:where(
|
|
80
|
+
:root[data-theme="light"],
|
|
81
|
+
[data-theme="light"],
|
|
82
|
+
:root.light,
|
|
83
|
+
.light,
|
|
84
|
+
:host([data-theme="light"])
|
|
85
|
+
) {
|
|
86
|
+
--roxy-accent: #a44a24;
|
|
87
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
88
|
+
--roxy-secondary: #493d30;
|
|
89
|
+
--roxy-danger: #b23a38;
|
|
90
|
+
|
|
91
|
+
--roxy-bg: #faf4ea;
|
|
92
|
+
--roxy-surface: #efe6d6;
|
|
93
|
+
--roxy-fg: #322820;
|
|
94
|
+
--roxy-muted: #74634f;
|
|
95
|
+
--roxy-border: #e6d8c2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Dark theme via explicit opt-in ([data-theme=dark] or .dark on any ancestor). */
|
|
99
|
+
:where(
|
|
100
|
+
:root[data-theme="dark"],
|
|
101
|
+
[data-theme="dark"],
|
|
102
|
+
:root.dark,
|
|
103
|
+
.dark,
|
|
104
|
+
:host([data-theme="dark"])
|
|
105
|
+
) {
|
|
106
|
+
--roxy-accent: #d98d5f;
|
|
107
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
108
|
+
--roxy-secondary: #dccdbc;
|
|
109
|
+
--roxy-danger: #e4736b;
|
|
110
|
+
|
|
111
|
+
--roxy-bg: #211710;
|
|
112
|
+
--roxy-surface: #35281e;
|
|
113
|
+
--roxy-fg: #f2e7d9;
|
|
114
|
+
--roxy-muted: #b49d87;
|
|
115
|
+
--roxy-border: #463729;
|
|
116
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Moonlit theme preset for Roxy UI. GENERATED by scripts/sync-themes.ts
|
|
3
|
+
* from src/styles/palettes.ts. Do not edit; change the palette data and
|
|
4
|
+
* rerun the codegen.
|
|
5
|
+
*
|
|
6
|
+
* It only reassigns --roxy-* tokens, so it composes with the core token
|
|
7
|
+
* contract instead of replacing it: link it AFTER the base tokens (or the
|
|
8
|
+
* CDN bundle that injects them) and every component on the page adopts the
|
|
9
|
+
* look. Light and dark blocks mirror the trigger structure of tokens.css
|
|
10
|
+
* exactly (OS preference, [data-theme] / .dark opt-in, and the explicit-
|
|
11
|
+
* light opt-out), all at :where() zero specificity so a per-page override
|
|
12
|
+
* still wins.
|
|
13
|
+
*
|
|
14
|
+
* Fonts are loaded below via one Google Fonts @import (both families are
|
|
15
|
+
* OFL, loaded from Google, never bundled here). To load them with markup
|
|
16
|
+
* instead, drop the @import line and add these to the page <head>:
|
|
17
|
+
*
|
|
18
|
+
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
19
|
+
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
20
|
+
* <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap">
|
|
21
|
+
*
|
|
22
|
+
* To use the whole preset with one line instead of copying tokens, link
|
|
23
|
+
* the file:
|
|
24
|
+
*
|
|
25
|
+
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/moonlit.css">
|
|
26
|
+
*/
|
|
27
|
+
@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap");
|
|
28
|
+
|
|
29
|
+
/* Light defaults. Fonts, radius, and shadow do not vary by theme, so they are
|
|
30
|
+
* set once here and inherited by the dark blocks unchanged. */
|
|
31
|
+
:where(:root, :host) {
|
|
32
|
+
--roxy-font-sans:
|
|
33
|
+
"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
|
34
|
+
sans-serif;
|
|
35
|
+
--roxy-font-display:
|
|
36
|
+
"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
|
|
37
|
+
|
|
38
|
+
--roxy-radius-sm: 0.4375rem;
|
|
39
|
+
--roxy-radius-md: 0.875rem;
|
|
40
|
+
--roxy-radius-lg: 1.575rem;
|
|
41
|
+
|
|
42
|
+
--roxy-shadow-sm: none;
|
|
43
|
+
--roxy-shadow-md: none;
|
|
44
|
+
--roxy-shadow-lg: none;
|
|
45
|
+
|
|
46
|
+
--roxy-accent: #254b5a;
|
|
47
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
48
|
+
--roxy-ring: var(--roxy-accent);
|
|
49
|
+
/* Secondary ink (form labels, generic-renderer text, chart strokes): a warm tone between fg and muted so it stays stronger than help text. Without this override the stock slate leaks through and reads bluish on the warm palette. */
|
|
50
|
+
--roxy-secondary: #2d3c47;
|
|
51
|
+
--roxy-danger: #b23a38;
|
|
52
|
+
|
|
53
|
+
--roxy-bg: #faf6ec;
|
|
54
|
+
--roxy-surface: #f1eadb;
|
|
55
|
+
--roxy-fg: #14232e;
|
|
56
|
+
--roxy-muted: #5c6a76;
|
|
57
|
+
--roxy-border: #e4dbc6;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Dark theme via system preference. Mirrors tokens.css: only the theme-varying
|
|
61
|
+
* tokens are reassigned; accent-ink follows the accent (already legible on the
|
|
62
|
+
* dark surface) rather than mixing toward black. */
|
|
63
|
+
@media (prefers-color-scheme: dark) {
|
|
64
|
+
:where(:root, :host) {
|
|
65
|
+
--roxy-accent: #c9a96b;
|
|
66
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
67
|
+
--roxy-secondary: #ced0c7;
|
|
68
|
+
--roxy-danger: #e4736b;
|
|
69
|
+
|
|
70
|
+
--roxy-bg: #0b1826;
|
|
71
|
+
--roxy-surface: #1b2a39;
|
|
72
|
+
--roxy-fg: #efe7d3;
|
|
73
|
+
--roxy-muted: #92a4b2;
|
|
74
|
+
--roxy-border: #263a4c;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* Light opt-out: beats the OS-dark block when the host explicitly chooses light. */
|
|
79
|
+
:where(
|
|
80
|
+
:root[data-theme="light"],
|
|
81
|
+
[data-theme="light"],
|
|
82
|
+
:root.light,
|
|
83
|
+
.light,
|
|
84
|
+
:host([data-theme="light"])
|
|
85
|
+
) {
|
|
86
|
+
--roxy-accent: #254b5a;
|
|
87
|
+
--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
|
|
88
|
+
--roxy-secondary: #2d3c47;
|
|
89
|
+
--roxy-danger: #b23a38;
|
|
90
|
+
|
|
91
|
+
--roxy-bg: #faf6ec;
|
|
92
|
+
--roxy-surface: #f1eadb;
|
|
93
|
+
--roxy-fg: #14232e;
|
|
94
|
+
--roxy-muted: #5c6a76;
|
|
95
|
+
--roxy-border: #e4dbc6;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/* Dark theme via explicit opt-in ([data-theme=dark] or .dark on any ancestor). */
|
|
99
|
+
:where(
|
|
100
|
+
:root[data-theme="dark"],
|
|
101
|
+
[data-theme="dark"],
|
|
102
|
+
:root.dark,
|
|
103
|
+
.dark,
|
|
104
|
+
:host([data-theme="dark"])
|
|
105
|
+
) {
|
|
106
|
+
--roxy-accent: #c9a96b;
|
|
107
|
+
--roxy-accent-ink: var(--roxy-accent);
|
|
108
|
+
--roxy-secondary: #ced0c7;
|
|
109
|
+
--roxy-danger: #e4736b;
|
|
110
|
+
|
|
111
|
+
--roxy-bg: #0b1826;
|
|
112
|
+
--roxy-surface: #1b2a39;
|
|
113
|
+
--roxy-fg: #efe7d3;
|
|
114
|
+
--roxy-muted: #92a4b2;
|
|
115
|
+
--roxy-border: #263a4c;
|
|
116
|
+
}
|
|
@@ -1,23 +1,26 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Practitioner theme preset for Roxy UI
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* composes with the core token contract instead of replacing it: link it AFTER
|
|
6
|
-
* the base tokens (or the CDN bundle that injects them) and every component on
|
|
7
|
-
* the page adopts the look. Light and dark blocks mirror the trigger structure
|
|
8
|
-
* of tokens.css exactly (OS preference, [data-theme] / .dark opt-in, and the
|
|
9
|
-
* explicit-light opt-out), all at :where() zero specificity so a per-page
|
|
10
|
-
* override still wins.
|
|
2
|
+
* Practitioner theme preset for Roxy UI. GENERATED by scripts/sync-themes.ts
|
|
3
|
+
* from src/styles/palettes.ts. Do not edit; change the palette data and
|
|
4
|
+
* rerun the codegen.
|
|
11
5
|
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
6
|
+
* It only reassigns --roxy-* tokens, so it composes with the core token
|
|
7
|
+
* contract instead of replacing it: link it AFTER the base tokens (or the
|
|
8
|
+
* CDN bundle that injects them) and every component on the page adopts the
|
|
9
|
+
* look. Light and dark blocks mirror the trigger structure of tokens.css
|
|
10
|
+
* exactly (OS preference, [data-theme] / .dark opt-in, and the explicit-
|
|
11
|
+
* light opt-out), all at :where() zero specificity so a per-page override
|
|
12
|
+
* still wins.
|
|
13
|
+
*
|
|
14
|
+
* Fonts are loaded below via one Google Fonts @import (both families are
|
|
15
|
+
* OFL, loaded from Google, never bundled here). To load them with markup
|
|
16
|
+
* instead, drop the @import line and add these to the page <head>:
|
|
15
17
|
*
|
|
16
18
|
* <link rel="preconnect" href="https://fonts.googleapis.com">
|
|
17
19
|
* <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
18
20
|
* <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400..600&family=Jost:wght@400..600&display=swap">
|
|
19
21
|
*
|
|
20
|
-
* To use the whole preset with one line instead of copying tokens, link
|
|
22
|
+
* To use the whole preset with one line instead of copying tokens, link
|
|
23
|
+
* the file:
|
|
21
24
|
*
|
|
22
25
|
* <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css">
|
|
23
26
|
*/
|
|
@@ -65,10 +68,10 @@
|
|
|
65
68
|
--roxy-danger: #e4736b;
|
|
66
69
|
|
|
67
70
|
--roxy-bg: #231619;
|
|
68
|
-
--roxy-surface: #
|
|
71
|
+
--roxy-surface: #37272b;
|
|
69
72
|
--roxy-fg: #f2e4df;
|
|
70
73
|
--roxy-muted: #b39698;
|
|
71
|
-
--roxy-border: #
|
|
74
|
+
--roxy-border: #49353a;
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
77
|
|
|
@@ -106,8 +109,8 @@
|
|
|
106
109
|
--roxy-danger: #e4736b;
|
|
107
110
|
|
|
108
111
|
--roxy-bg: #231619;
|
|
109
|
-
--roxy-surface: #
|
|
112
|
+
--roxy-surface: #37272b;
|
|
110
113
|
--roxy-fg: #f2e4df;
|
|
111
114
|
--roxy-muted: #b39698;
|
|
112
|
-
--roxy-border: #
|
|
115
|
+
--roxy-border: #49353a;
|
|
113
116
|
}
|