@sankhyatronics/sankhya-cms 0.0.0-stage → 0.1.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/README.md +34 -3
- package/custom-elements.json +4008 -0
- package/dist/bento-grid/index.d.ts +27 -0
- package/dist/bento-grid/index.js +10 -0
- package/dist/bento-grid/index.js.map +1 -0
- package/dist/card/index.d.ts +20 -0
- package/dist/card/index.js +9 -0
- package/dist/card/index.js.map +1 -0
- package/dist/carousel/index.d.ts +44 -0
- package/dist/carousel/index.js +10 -0
- package/dist/carousel/index.js.map +1 -0
- package/dist/chunk-23IHTBAB.js +557 -0
- package/dist/chunk-23IHTBAB.js.map +1 -0
- package/dist/chunk-2VZFHTBC.js +203 -0
- package/dist/chunk-2VZFHTBC.js.map +1 -0
- package/dist/chunk-3ERKQNZT.js +155 -0
- package/dist/chunk-3ERKQNZT.js.map +1 -0
- package/dist/chunk-3JU3R22O.js +193 -0
- package/dist/chunk-3JU3R22O.js.map +1 -0
- package/dist/chunk-3TCP25JG.js +347 -0
- package/dist/chunk-3TCP25JG.js.map +1 -0
- package/dist/chunk-3VE6VFJ4.js +87 -0
- package/dist/chunk-3VE6VFJ4.js.map +1 -0
- package/dist/chunk-4HKSA5UT.js +312 -0
- package/dist/chunk-4HKSA5UT.js.map +1 -0
- package/dist/chunk-5REZSZCK.js +266 -0
- package/dist/chunk-5REZSZCK.js.map +1 -0
- package/dist/chunk-5UFRGZWG.js +268 -0
- package/dist/chunk-5UFRGZWG.js.map +1 -0
- package/dist/chunk-74MILER4.js +215 -0
- package/dist/chunk-74MILER4.js.map +1 -0
- package/dist/chunk-7PSYCTEN.js +118 -0
- package/dist/chunk-7PSYCTEN.js.map +1 -0
- package/dist/chunk-CDC4P77V.js +299 -0
- package/dist/chunk-CDC4P77V.js.map +1 -0
- package/dist/chunk-E52WO7R7.js +279 -0
- package/dist/chunk-E52WO7R7.js.map +1 -0
- package/dist/chunk-EUXUH3YW.js +15 -0
- package/dist/chunk-EUXUH3YW.js.map +1 -0
- package/dist/chunk-IMACP7HN.js +156 -0
- package/dist/chunk-IMACP7HN.js.map +1 -0
- package/dist/chunk-LHU23TF6.js +273 -0
- package/dist/chunk-LHU23TF6.js.map +1 -0
- package/dist/chunk-OEX5FDMR.js +250 -0
- package/dist/chunk-OEX5FDMR.js.map +1 -0
- package/dist/chunk-RHAOQ6K4.js +138 -0
- package/dist/chunk-RHAOQ6K4.js.map +1 -0
- package/dist/chunk-RMIJVTFS.js +397 -0
- package/dist/chunk-RMIJVTFS.js.map +1 -0
- package/dist/chunk-U7YKCCJG.js +228 -0
- package/dist/chunk-U7YKCCJG.js.map +1 -0
- package/dist/chunk-USNFT4DU.js +125 -0
- package/dist/chunk-USNFT4DU.js.map +1 -0
- package/dist/chunk-VYON56QO.js +90 -0
- package/dist/chunk-VYON56QO.js.map +1 -0
- package/dist/chunk-WCO7JAIK.js +195 -0
- package/dist/chunk-WCO7JAIK.js.map +1 -0
- package/dist/chunk-XHBC23TV.js +254 -0
- package/dist/chunk-XHBC23TV.js.map +1 -0
- package/dist/chunk-XXPBFHWR.js +70 -0
- package/dist/chunk-XXPBFHWR.js.map +1 -0
- package/dist/cms-theme.css +15 -0
- package/dist/content-block/index.d.ts +25 -0
- package/dist/content-block/index.js +11 -0
- package/dist/content-block/index.js.map +1 -0
- package/dist/cookie-consent/index.d.ts +33 -0
- package/dist/cookie-consent/index.js +9 -0
- package/dist/cookie-consent/index.js.map +1 -0
- package/dist/dropdown/index.d.ts +89 -0
- package/dist/dropdown/index.js +9 -0
- package/dist/dropdown/index.js.map +1 -0
- package/dist/feature-split/index.d.ts +38 -0
- package/dist/feature-split/index.js +11 -0
- package/dist/feature-split/index.js.map +1 -0
- package/dist/features-section/index.d.ts +50 -0
- package/dist/features-section/index.js +14 -0
- package/dist/features-section/index.js.map +1 -0
- package/dist/footer/index.d.ts +64 -0
- package/dist/footer/index.js +9 -0
- package/dist/footer/index.js.map +1 -0
- package/dist/header/index.d.ts +112 -0
- package/dist/header/index.js +10 -0
- package/dist/header/index.js.map +1 -0
- package/dist/hero/index.d.ts +32 -0
- package/dist/hero/index.js +10 -0
- package/dist/hero/index.js.map +1 -0
- package/dist/icon-button/index.d.ts +23 -0
- package/dist/icon-button/index.js +9 -0
- package/dist/icon-button/index.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +93 -0
- package/dist/index.js.map +1 -0
- package/dist/items-accordion/index.d.ts +31 -0
- package/dist/items-accordion/index.js +10 -0
- package/dist/items-accordion/index.js.map +1 -0
- package/dist/markdown/index.d.ts +33 -0
- package/dist/markdown/index.js +9 -0
- package/dist/markdown/index.js.map +1 -0
- package/dist/menu-grid/index.d.ts +21 -0
- package/dist/menu-grid/index.js +9 -0
- package/dist/menu-grid/index.js.map +1 -0
- package/dist/menu-grid-item/index.d.ts +53 -0
- package/dist/menu-grid-item/index.js +9 -0
- package/dist/menu-grid-item/index.js.map +1 -0
- package/dist/menu-item/index.d.ts +50 -0
- package/dist/menu-item/index.js +9 -0
- package/dist/menu-item/index.js.map +1 -0
- package/dist/promo-banner/index.d.ts +22 -0
- package/dist/promo-banner/index.js +10 -0
- package/dist/promo-banner/index.js.map +1 -0
- package/dist/schema/index.d.ts +72 -0
- package/dist/schema/index.js +75 -0
- package/dist/schema/index.js.map +1 -0
- package/dist/select/index.d.ts +77 -0
- package/dist/select/index.js +10 -0
- package/dist/select/index.js.map +1 -0
- package/dist/shared/icons.d.ts +77 -0
- package/dist/shared/icons.js +64 -0
- package/dist/shared/icons.js.map +1 -0
- package/dist/shared/styles.d.ts +90 -0
- package/dist/shared/styles.js +48 -0
- package/dist/shared/styles.js.map +1 -0
- package/dist/stats/index.d.ts +17 -0
- package/dist/stats/index.js +9 -0
- package/dist/stats/index.js.map +1 -0
- package/dist/testimonials/index.d.ts +25 -0
- package/dist/testimonials/index.js +10 -0
- package/dist/testimonials/index.js.map +1 -0
- package/dist/theme.css +292 -0
- package/dist/themes.css +65 -0
- package/dist/theming/index.d.ts +28 -0
- package/dist/theming/index.js +53 -0
- package/dist/theming/index.js.map +1 -0
- package/package.json +161 -4
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface StatItem {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
}
|
|
9
|
+
/** Responsive grid of headline numbers with a label and optional description. Port of React `Stats`. */
|
|
10
|
+
declare class Stats extends LitElement {
|
|
11
|
+
static styles: lit.CSSResult;
|
|
12
|
+
items: StatItem[];
|
|
13
|
+
inverted: boolean;
|
|
14
|
+
render(): lit.TemplateResult<1>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { type StatItem, Stats };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as lit from 'lit';
|
|
2
|
+
import { LitElement } from 'lit';
|
|
3
|
+
|
|
4
|
+
interface TestimonialItem {
|
|
5
|
+
id?: string;
|
|
6
|
+
name: string;
|
|
7
|
+
role: string;
|
|
8
|
+
company?: string;
|
|
9
|
+
imageSrc?: string;
|
|
10
|
+
quote: string;
|
|
11
|
+
/** Number of stars, default 5. */
|
|
12
|
+
rating?: number;
|
|
13
|
+
}
|
|
14
|
+
/** Section heading plus a grid of quote cards with star rating and author. Port of React `Testimonials`. */
|
|
15
|
+
declare class Testimonials extends LitElement {
|
|
16
|
+
static styles: lit.CSSResult;
|
|
17
|
+
title: string;
|
|
18
|
+
subtitle: string;
|
|
19
|
+
items: TestimonialItem[];
|
|
20
|
+
inverted: boolean;
|
|
21
|
+
private renderItem;
|
|
22
|
+
render(): lit.TemplateResult<1>;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export { type TestimonialItem, Testimonials };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/theme.css
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Design tokens for @sankhyatronics/components.
|
|
3
|
+
*
|
|
4
|
+
* Every st-* component reads its styling exclusively via `var(--st-x)` — no
|
|
5
|
+
* fallback values anywhere — and custom properties inherit through Shadow
|
|
6
|
+
* DOM, so setting these at :root (or any ancestor of your st-* components)
|
|
7
|
+
* reskins/rescales the whole tree without forking any component.
|
|
8
|
+
*
|
|
9
|
+
* Import this file once. There are three layers, in cascade order:
|
|
10
|
+
* 1. PRIMARIES — the only literal color values in the system (5 seeds,
|
|
11
|
+
* plus the 3 independent file-type brand colors). Override these for a
|
|
12
|
+
* full rebrand — everything else follows.
|
|
13
|
+
* 2. SHADES — an internal color-mix() ramp derived from each primary,
|
|
14
|
+
* EXCEPT the neutral ramp: --st-neutral-50 through --st-neutral-950
|
|
15
|
+
* (the standard 11-step scale) is the one shade ramp meant to be
|
|
16
|
+
* overridden directly — every neutral text/background token below
|
|
17
|
+
* resolves to one of these 11 steps.
|
|
18
|
+
* 3. SEMANTIC TOKENS — what components actually consume
|
|
19
|
+
* (--st-color-text, --st-radius-md, --st-text-sm, ...), each pointing
|
|
20
|
+
* at one shade/scale step. Override a semantic token for a single
|
|
21
|
+
* exception, or override a whole scale (spacing/radius/size/type) for
|
|
22
|
+
* a density or typography change.
|
|
23
|
+
*
|
|
24
|
+
* Only reach for an individual token override (see component READMEs /
|
|
25
|
+
* source for the full list) when you need an exception the primaries,
|
|
26
|
+
* neutral palette, and scales below don't cover.
|
|
27
|
+
*/
|
|
28
|
+
:root {
|
|
29
|
+
/* =========================================================
|
|
30
|
+
PRIMARIES — override these for a rebrand.
|
|
31
|
+
========================================================= */
|
|
32
|
+
--st-primary-color: oklch(12.9% 0.042 264.695);
|
|
33
|
+
--st-primary-background: oklch(98.4% 0.003 247.858);
|
|
34
|
+
--st-neutral-50: var(--st-primary-background);
|
|
35
|
+
--st-neutral-950: var(--st-primary-color);
|
|
36
|
+
--st-neutral-100: oklch(from color-mix(in oklch, var(--st-neutral-950) 8%, var(--st-neutral-50)) l calc(c * 2.1) h);
|
|
37
|
+
--st-neutral-200: oklch(from color-mix(in oklch, var(--st-neutral-950) 15%, var(--st-neutral-50)) l calc(c * 3.0) h);
|
|
38
|
+
--st-neutral-300: oklch(from color-mix(in oklch, var(--st-neutral-950) 27%, var(--st-neutral-50)) l calc(c * 4.3) h);
|
|
39
|
+
--st-neutral-400: oklch(from color-mix(in oklch, var(--st-neutral-950) 36%, var(--st-neutral-50)) l calc(c * 5.2) h);
|
|
40
|
+
--st-neutral-500: oklch(from color-mix(in oklch, var(--st-neutral-950) 49%, var(--st-neutral-50)) l calc(c * 7.0) h);
|
|
41
|
+
--st-neutral-600: oklch(from color-mix(in oklch, var(--st-neutral-950) 69%, var(--st-neutral-50)) l calc(c * 5.4) h);
|
|
42
|
+
--st-neutral-700: oklch(from color-mix(in oklch, var(--st-neutral-950) 86%, var(--st-neutral-50)) l calc(c * 3.0) h);
|
|
43
|
+
--st-neutral-800: oklch(from color-mix(in oklch, var(--st-neutral-950) 93%, var(--st-neutral-50)) l calc(c * 2.3) h);
|
|
44
|
+
--st-neutral-900: oklch(from color-mix(in oklch, var(--st-neutral-950) 96%, var(--st-neutral-50)) l calc(c * 1.6) h);
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
/* Brand-like file-type colors are intentionally independent of the accent
|
|
48
|
+
seed (Word/Excel/PowerPoint have their own identity) — three extra,
|
|
49
|
+
narrowly-scoped primaries rather than derived shades. */
|
|
50
|
+
--st-primary-type-word: oklch(0.55 0.13 250);
|
|
51
|
+
--st-primary-type-excel: oklch(0.55 0.13 145);
|
|
52
|
+
--st-primary-type-powerpoint: oklch(0.55 0.13 40);
|
|
53
|
+
|
|
54
|
+
--st-primary-neutral: var(--st-neutral-50);
|
|
55
|
+
/* --st-brand-color is deliberately left undefined: set it (on :root) to
|
|
56
|
+
make the accent, the solid call-to-action buttons and checkboxes all
|
|
57
|
+
follow one host-app brand color. Unset, each keeps its own default. */
|
|
58
|
+
--st-primary-accent: var(--st-brand-color, var(--st-neutral-500));
|
|
59
|
+
--st-primary-danger: oklch(0.6 0.2 25);
|
|
60
|
+
--st-primary-warning: oklch(0.75 0.16 40);
|
|
61
|
+
--st-primary-success: oklch(0.55 0.13 145);
|
|
62
|
+
|
|
63
|
+
/* Pure white/black anchors for the color-mix() ramps below and the
|
|
64
|
+
"text/icon on a solid fill" token — not general-purpose literals. */
|
|
65
|
+
--st-primary-canvas: var(--st-neutral-50);
|
|
66
|
+
--st-primary-ink: var(--st-neutral-950);
|
|
67
|
+
|
|
68
|
+
--st-accent-subtle: color-mix(in oklch, var(--st-primary-accent) 8%, var(--st-primary-canvas));
|
|
69
|
+
--st-accent-border: color-mix(in oklch, var(--st-primary-accent) 22%, var(--st-primary-canvas));
|
|
70
|
+
--st-accent-muted: color-mix(in oklch, var(--st-primary-accent) 55%, var(--st-primary-canvas));
|
|
71
|
+
--st-accent-text: color-mix(in oklch, var(--st-primary-accent) 78%, var(--st-primary-ink));
|
|
72
|
+
|
|
73
|
+
--st-danger-subtle: color-mix(in oklch, var(--st-primary-danger) 10%, var(--st-primary-canvas));
|
|
74
|
+
--st-danger-border: color-mix(in oklch, var(--st-primary-danger) 28%, var(--st-primary-canvas));
|
|
75
|
+
--st-danger-text: color-mix(in oklch, var(--st-primary-danger) 70%, var(--st-primary-ink));
|
|
76
|
+
|
|
77
|
+
--st-warning-subtle: color-mix(in oklch, var(--st-primary-warning) 10%, var(--st-primary-canvas));
|
|
78
|
+
--st-warning-border: color-mix(in oklch, var(--st-primary-warning) 28%, var(--st-primary-canvas));
|
|
79
|
+
--st-warning-text: color-mix(in oklch, var(--st-primary-warning) 70%, var(--st-primary-ink));
|
|
80
|
+
|
|
81
|
+
--st-success-subtle: color-mix(in oklch, var(--st-primary-success) 20%, var(--st-primary-canvas));
|
|
82
|
+
--st-success-text: color-mix(in oklch, var(--st-primary-success) 70%, var(--st-primary-ink));
|
|
83
|
+
|
|
84
|
+
/* =========================================================
|
|
85
|
+
SEMANTIC TOKENS — what components actually consume.
|
|
86
|
+
========================================================= */
|
|
87
|
+
|
|
88
|
+
/* ---- Neutral surfaces & text ---- */
|
|
89
|
+
--st-color-page: var(--st-neutral-50);
|
|
90
|
+
--st-color-surface: var(--st-primary-canvas);
|
|
91
|
+
--st-color-subtle: var(--st-neutral-100);
|
|
92
|
+
--st-color-divider: var(--st-neutral-200);
|
|
93
|
+
--st-color-hover: var(--st-neutral-200);
|
|
94
|
+
--st-color-border: var(--st-neutral-300);
|
|
95
|
+
--st-color-skeleton: var(--st-neutral-300);
|
|
96
|
+
--st-color-folder-icon-bg: var(--st-neutral-300);
|
|
97
|
+
--st-color-border-strong: var(--st-neutral-400);
|
|
98
|
+
--st-color-text-faint: var(--st-neutral-600);
|
|
99
|
+
--st-color-text-muted: var(--st-neutral-600);
|
|
100
|
+
--st-color-text: var(--st-neutral-600);
|
|
101
|
+
--st-color-text-strong: var(--st-neutral-900);
|
|
102
|
+
|
|
103
|
+
/* Text/icon color for content sitting on a solid/dark fill (buttons,
|
|
104
|
+
avatars, active pills) — never hardcode "white" at the point of use. */
|
|
105
|
+
--st-color-on-solid: var(--st-primary-canvas);
|
|
106
|
+
|
|
107
|
+
/* ---- Accent ramp — derived from --st-primary-accent ---- */
|
|
108
|
+
--st-color-accent: var(--st-primary-accent);
|
|
109
|
+
--st-color-accent-subtle: var(--st-accent-subtle);
|
|
110
|
+
--st-color-accent-border: var(--st-accent-border);
|
|
111
|
+
--st-color-accent-muted: var(--st-accent-muted);
|
|
112
|
+
--st-color-accent-text: var(--st-accent-text);
|
|
113
|
+
|
|
114
|
+
/* ---- Semantic state ramps — derived from --st-primary-danger/warning/success ---- */
|
|
115
|
+
--st-color-danger: var(--st-primary-danger);
|
|
116
|
+
--st-color-danger-subtle: var(--st-danger-subtle);
|
|
117
|
+
--st-color-danger-border: var(--st-danger-border);
|
|
118
|
+
--st-color-danger-text: var(--st-danger-text);
|
|
119
|
+
|
|
120
|
+
--st-color-warning: var(--st-primary-warning);
|
|
121
|
+
--st-color-warning-subtle: var(--st-warning-subtle);
|
|
122
|
+
--st-color-warning-border: var(--st-warning-border);
|
|
123
|
+
--st-color-warning-text: var(--st-warning-text);
|
|
124
|
+
|
|
125
|
+
--st-color-success: var(--st-primary-success);
|
|
126
|
+
--st-color-success-subtle: var(--st-success-subtle);
|
|
127
|
+
--st-color-success-text: var(--st-success-text);
|
|
128
|
+
|
|
129
|
+
/* ---- File-type badge colors ---- */
|
|
130
|
+
--st-color-type-word: var(--st-primary-type-word);
|
|
131
|
+
--st-color-type-excel: var(--st-primary-type-excel);
|
|
132
|
+
--st-color-type-powerpoint: var(--st-primary-type-powerpoint);
|
|
133
|
+
|
|
134
|
+
/* ---- Standalone brand accent (favorites/star marker) ---- */
|
|
135
|
+
--st-favorite-accent: #f0b429;
|
|
136
|
+
|
|
137
|
+
/* ---- <st-status-pill> override points. Consumers set --st-status-hue
|
|
138
|
+
(or --st-status-bg/--st-status-color directly) on the host element;
|
|
139
|
+
these root defaults mean the token always resolves, so call sites
|
|
140
|
+
never need a fallback. ---- */
|
|
141
|
+
--st-status-hue: var(--st-neutral-hue);
|
|
142
|
+
--st-status-bg: oklch(0.95 0.05 var(--st-status-hue));
|
|
143
|
+
--st-status-color: oklch(0.4 0.13 var(--st-status-hue));
|
|
144
|
+
|
|
145
|
+
/* ---- Shadow tint — box-shadows are colors too, so they get tokens. ---- */
|
|
146
|
+
--st-shadow-color-subtle: var(--st-neutral-300);
|
|
147
|
+
--st-shadow-color-sm: var(--st-neutral-300);
|
|
148
|
+
--st-shadow-color-md: var(--st-neutral-300);
|
|
149
|
+
--st-shadow-color-lg: var(--st-neutral-300);
|
|
150
|
+
--st-shadow-color-xl: var(--st-neutral-300);
|
|
151
|
+
|
|
152
|
+
/* =========================================================
|
|
153
|
+
SPACING SCALE — padding/margin/gap/inset. Named by their px
|
|
154
|
+
value for exactness; override one step or the whole scale.
|
|
155
|
+
========================================================= */
|
|
156
|
+
--st-space-0: 0;
|
|
157
|
+
--st-space-2: 2px;
|
|
158
|
+
--st-space-3: 3px;
|
|
159
|
+
--st-space-4: 4px;
|
|
160
|
+
--st-space-5: 5px;
|
|
161
|
+
--st-space-6: 6px;
|
|
162
|
+
--st-space-7: 7px;
|
|
163
|
+
--st-space-8: 8px;
|
|
164
|
+
--st-space-9: 9px;
|
|
165
|
+
--st-space-10: 10px;
|
|
166
|
+
--st-space-11: 11px;
|
|
167
|
+
--st-space-12: 12px;
|
|
168
|
+
--st-space-14: 14px;
|
|
169
|
+
--st-space-16: 16px;
|
|
170
|
+
--st-space-18: 18px;
|
|
171
|
+
--st-space-20: 20px;
|
|
172
|
+
--st-space-22: 22px;
|
|
173
|
+
--st-space-24: 24px;
|
|
174
|
+
--st-space-28: 28px;
|
|
175
|
+
--st-space-30: 30px;
|
|
176
|
+
--st-space-32: 32px;
|
|
177
|
+
--st-space-40: 40px;
|
|
178
|
+
--st-space-44: 44px;
|
|
179
|
+
--st-space-48: 48px;
|
|
180
|
+
|
|
181
|
+
/* =========================================================
|
|
182
|
+
RADIUS SCALE
|
|
183
|
+
========================================================= */
|
|
184
|
+
--st-radius-none: 0;
|
|
185
|
+
--st-radius-xs: 4px;
|
|
186
|
+
--st-radius-sm: 8px;
|
|
187
|
+
--st-radius-md: 10px;
|
|
188
|
+
--st-radius-lg: 12px;
|
|
189
|
+
--st-radius-full: 999px;
|
|
190
|
+
--st-radius-circle: 50%;
|
|
191
|
+
|
|
192
|
+
/* =========================================================
|
|
193
|
+
CONTROL-SIZE SCALE — square-ish UI controls (checkboxes,
|
|
194
|
+
icon buttons, avatars, badges, table icon columns).
|
|
195
|
+
========================================================= */
|
|
196
|
+
--st-size-14: 14px;
|
|
197
|
+
--st-size-16: 16px;
|
|
198
|
+
--st-size-18: 18px;
|
|
199
|
+
--st-size-20: 20px;
|
|
200
|
+
--st-size-24: 24px;
|
|
201
|
+
--st-size-26: 26px;
|
|
202
|
+
--st-size-28: 28px;
|
|
203
|
+
--st-size-30: 30px;
|
|
204
|
+
--st-size-32: 32px;
|
|
205
|
+
--st-size-36: 36px;
|
|
206
|
+
--st-size-38: 38px;
|
|
207
|
+
--st-size-40: 40px;
|
|
208
|
+
|
|
209
|
+
/* =========================================================
|
|
210
|
+
TYPOGRAPHY TOKENS
|
|
211
|
+
========================================================= */
|
|
212
|
+
--st-font-family: system-ui, -apple-system, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
|
|
213
|
+
|
|
214
|
+
--st-text-2xs: 10px;
|
|
215
|
+
--st-text-xs: 11px;
|
|
216
|
+
--st-text-sm: 12px;
|
|
217
|
+
--st-text-base: 13px;
|
|
218
|
+
--st-text-md: 14px;
|
|
219
|
+
--st-text-lg: 15px;
|
|
220
|
+
--st-text-xl: 16px;
|
|
221
|
+
--st-text-2xl: 20px;
|
|
222
|
+
|
|
223
|
+
--st-font-weight-regular: 400;
|
|
224
|
+
--st-font-weight-medium: 500;
|
|
225
|
+
--st-font-weight-semibold: 600;
|
|
226
|
+
--st-font-weight-bold: 700;
|
|
227
|
+
--st-font-weight-extrabold: 800;
|
|
228
|
+
|
|
229
|
+
--st-leading-none: 1;
|
|
230
|
+
--st-leading-snug: 1.35;
|
|
231
|
+
--st-leading-normal: 1.4;
|
|
232
|
+
|
|
233
|
+
--st-tracking-tight: -0.2px;
|
|
234
|
+
--st-tracking-normal: 0;
|
|
235
|
+
--st-tracking-wide: 0.3px;
|
|
236
|
+
--st-tracking-wider: 0.4px;
|
|
237
|
+
|
|
238
|
+
/* =========================================================
|
|
239
|
+
COMPONENT TOKENS — narrowly-scoped overrides for one piece
|
|
240
|
+
of chrome, each defaulting to a scale step above. Set them
|
|
241
|
+
on :root or on the component's host element, the same way
|
|
242
|
+
as --st-primary-color.
|
|
243
|
+
========================================================= */
|
|
244
|
+
|
|
245
|
+
/* ---- Wizard step heading/description (<st-template-hub>) ---- */
|
|
246
|
+
--st-step-heading-font-size: var(--st-text-2xl);
|
|
247
|
+
--st-step-heading-font-weight: var(--st-font-weight-bold);
|
|
248
|
+
--st-step-heading-color: var(--st-color-text-strong);
|
|
249
|
+
--st-step-description-font-size: var(--st-text-base);
|
|
250
|
+
--st-step-description-color: var(--st-color-text-muted);
|
|
251
|
+
|
|
252
|
+
/* ---- Buttons. --st-button-font-size sizes the wizard footer
|
|
253
|
+
(Back/Next/Finish/...); --st-button-font-size-sm the in-content
|
|
254
|
+
action buttons (Generate/Regenerate). The primary fill applies
|
|
255
|
+
to every solid call-to-action button. ---- */
|
|
256
|
+
--st-button-font-size: var(--st-text-md);
|
|
257
|
+
--st-button-font-size-sm: var(--st-text-base);
|
|
258
|
+
--st-button-font-weight: var(--st-font-weight-semibold);
|
|
259
|
+
--st-button-height: var(--st-size-40);
|
|
260
|
+
--st-button-radius: var(--st-radius-sm);
|
|
261
|
+
--st-button-primary-bg: var(--st-brand-color, var(--st-color-text-strong));
|
|
262
|
+
--st-button-primary-color: var(--st-color-on-solid);
|
|
263
|
+
--st-button-primary-font-weight: var(--st-font-weight-bold);
|
|
264
|
+
|
|
265
|
+
/* ---- Checkboxes/radios (native controls, tinted via accent-color).
|
|
266
|
+
`auto` = the browser's own color. ---- */
|
|
267
|
+
--st-checkbox-color: var(--st-brand-color, auto);
|
|
268
|
+
|
|
269
|
+
/* ---- Keyboard focus ring, an `outline` shorthand. `auto` = the
|
|
270
|
+
browser's own ring; e.g. `2px solid #0b5cff` for a custom one. ---- */
|
|
271
|
+
--st-focus-ring: auto;
|
|
272
|
+
--st-focus-ring-offset: 0px;
|
|
273
|
+
|
|
274
|
+
/* ---- Text inputs (search boxes, file names, new folder, pattern) ---- */
|
|
275
|
+
--st-input-font-family: var(--st-font-family);
|
|
276
|
+
--st-input-mono-font-family: ui-monospace, monospace;
|
|
277
|
+
--st-input-font-size: var(--st-text-base);
|
|
278
|
+
--st-input-color: var(--st-color-text-strong);
|
|
279
|
+
--st-input-bg: var(--st-color-surface);
|
|
280
|
+
--st-input-border-color: var(--st-color-border);
|
|
281
|
+
--st-input-radius: var(--st-radius-sm);
|
|
282
|
+
|
|
283
|
+
/* ---- Wizard frame (<st-template-hub>). Set --st-wizard-bg to
|
|
284
|
+
`transparent` to sit on the host app's own card/page. ---- */
|
|
285
|
+
--st-wizard-bg: var(--st-color-page);
|
|
286
|
+
--st-wizard-subheader-bg: var(--st-color-subtle);
|
|
287
|
+
--st-wizard-footer-bg: var(--st-color-surface);
|
|
288
|
+
--st-wizard-footer-height: 64px;
|
|
289
|
+
--st-wizard-border-color: var(--st-color-border);
|
|
290
|
+
--st-wizard-content-padding: var(--st-space-24) var(--st-space-32);
|
|
291
|
+
--st-wizard-content-padding-compact: var(--st-space-16) var(--st-space-18);
|
|
292
|
+
}
|
package/dist/themes.css
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
:root.dark {
|
|
2
|
+
--st-primary-color: oklch(97.913% 0.00011 271.152);
|
|
3
|
+
--st-primary-background: oklch(11.862% 0.03663 260.411 / 0.808);
|
|
4
|
+
--st-font-family: "Open Sans";
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
:root.red {
|
|
8
|
+
--st-primary-color: oklch(25.8% 0.092 26.042);
|
|
9
|
+
--st-primary-background: oklch(97.1% 0.013 17.38);
|
|
10
|
+
--st-font-family: 'Arimo';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root.amber {
|
|
14
|
+
--st-primary-color: oklch(27.9% 0.077 45.635);
|
|
15
|
+
--st-primary-background: oklch(98.7% 0.022 95.277);
|
|
16
|
+
--st-font-family: "Open Sans";
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:root.lime {
|
|
20
|
+
--st-primary-color: oklch(27.4% 0.072 132.109);
|
|
21
|
+
--st-primary-background: oklch(98.6% 0.031 120.757);
|
|
22
|
+
--st-font-family: "Quicksand";
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
:root.teal {
|
|
26
|
+
--st-primary-color: oklch(27.7% 0.046 192.524);
|
|
27
|
+
--st-primary-background: oklch(98.4% 0.014 180.72);
|
|
28
|
+
--st-font-family: "Nunito";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
:root.cyan {
|
|
32
|
+
--st-primary-color: oklch(30.2% 0.056 229.695);
|
|
33
|
+
--st-primary-background: oklch(98.4% 0.019 200.873);
|
|
34
|
+
--st-font-family: "Arimo";
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
:root.sky {
|
|
38
|
+
--st-primary-color: oklch(29.3% 0.066 243.157);
|
|
39
|
+
--st-primary-background: oklch(97.7% 0.013 236.62);
|
|
40
|
+
--st-font-family: "Almendra";
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
:root.blue {
|
|
44
|
+
--st-primary-color: oklch(28.2% 0.091 267.935);
|
|
45
|
+
--st-primary-background: oklch(97% 0.014 254.604);
|
|
46
|
+
--st-font-family: "Miranda Sans";
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:root.indigo {
|
|
50
|
+
--st-primary-color: oklch(25.7% 0.09 281.288);
|
|
51
|
+
--st-primary-background: oklch(96.2% 0.018 272.314);
|
|
52
|
+
--st-font-family: "Nunito";
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:root.fuchsia {
|
|
56
|
+
--st-primary-color: oklch(29.3% 0.136 325.661);
|
|
57
|
+
--st-primary-background: oklch(97.7% 0.017 320.058);
|
|
58
|
+
--st-font-family: "Quicksand";
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
:root.pink {
|
|
62
|
+
--st-primary-color: oklch(28.4% 0.109 3.907);
|
|
63
|
+
--st-primary-background: oklch(97.1% 0.014 343.198);
|
|
64
|
+
--st-font-family: "Open Sans";
|
|
65
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Theme runtime for `themes.css`: the list of themes, and applying one to `<html>`.
|
|
3
|
+
* Framework-free and storage-free — where the chosen theme is remembered is up to the host app.
|
|
4
|
+
*/
|
|
5
|
+
interface ThemeOption {
|
|
6
|
+
value: string;
|
|
7
|
+
label: string;
|
|
8
|
+
/** Approximate color for a picker swatch, not the palette itself (that's `themes.css`). */
|
|
9
|
+
swatch: string;
|
|
10
|
+
dark: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const DEFAULT_THEME = "default";
|
|
13
|
+
/** `'default'` applies no class (the base palette); every other value is a class in `themes.css`. */
|
|
14
|
+
declare const THEMES: readonly ThemeOption[];
|
|
15
|
+
declare function isTheme(value: unknown): value is string;
|
|
16
|
+
/** The theme to use when nobody has chosen one: `dark` if the OS prefers it, else `default`. */
|
|
17
|
+
declare function systemTheme(): string;
|
|
18
|
+
/** Calls `onChange` when the OS light/dark setting flips; returns an unsubscribe function. */
|
|
19
|
+
declare function watchSystemTheme(onChange: (theme: string) => void): () => void;
|
|
20
|
+
/**
|
|
21
|
+
* Applies a theme to `<html>`: swaps only the theme classes (other classes on the element are left
|
|
22
|
+
* alone) and sets `color-scheme` so native controls and scrollbars match. `null`/`undefined` means
|
|
23
|
+
* "nobody chose", which follows the OS; an unknown value falls back to `default`. Returns the
|
|
24
|
+
* theme actually applied.
|
|
25
|
+
*/
|
|
26
|
+
declare function applyTheme(theme: string | null | undefined): string;
|
|
27
|
+
|
|
28
|
+
export { DEFAULT_THEME, THEMES, type ThemeOption, applyTheme, isTheme, systemTheme, watchSystemTheme };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import "../chunk-EUXUH3YW.js";
|
|
2
|
+
|
|
3
|
+
// src/theming/index.ts
|
|
4
|
+
var DEFAULT_THEME = "default";
|
|
5
|
+
var THEMES = [
|
|
6
|
+
{ value: "default", label: "Default", swatch: "#94a3b8", dark: false },
|
|
7
|
+
{ value: "dark", label: "Dark", swatch: "#1f2937", dark: true },
|
|
8
|
+
{ value: "red", label: "Red", swatch: "#ef4444", dark: false },
|
|
9
|
+
{ value: "amber", label: "Amber", swatch: "#f59e0b", dark: false },
|
|
10
|
+
{ value: "lime", label: "Lime", swatch: "#84cc16", dark: false },
|
|
11
|
+
{ value: "teal", label: "Teal", swatch: "#14b8a6", dark: false },
|
|
12
|
+
{ value: "cyan", label: "Cyan", swatch: "#06b6d4", dark: false },
|
|
13
|
+
{ value: "sky", label: "Sky", swatch: "#0ea5e9", dark: false },
|
|
14
|
+
{ value: "blue", label: "Blue", swatch: "#3b82f6", dark: false },
|
|
15
|
+
{ value: "indigo", label: "Indigo", swatch: "#6366f1", dark: false },
|
|
16
|
+
{ value: "fuchsia", label: "Fuchsia", swatch: "#d946ef", dark: false },
|
|
17
|
+
{ value: "pink", label: "Pink", swatch: "#ec4899", dark: false }
|
|
18
|
+
];
|
|
19
|
+
function isTheme(value) {
|
|
20
|
+
return typeof value === "string" && THEMES.some((theme) => theme.value === value);
|
|
21
|
+
}
|
|
22
|
+
var THEME_CLASSES = THEMES.filter((theme) => theme.value !== DEFAULT_THEME).map((theme) => theme.value);
|
|
23
|
+
var DARK_QUERY = "(prefers-color-scheme: dark)";
|
|
24
|
+
function systemTheme() {
|
|
25
|
+
if (typeof window === "undefined" || !window.matchMedia) return DEFAULT_THEME;
|
|
26
|
+
return window.matchMedia(DARK_QUERY).matches ? "dark" : DEFAULT_THEME;
|
|
27
|
+
}
|
|
28
|
+
function watchSystemTheme(onChange) {
|
|
29
|
+
if (typeof window === "undefined" || !window.matchMedia) return () => {
|
|
30
|
+
};
|
|
31
|
+
const query = window.matchMedia(DARK_QUERY);
|
|
32
|
+
const listener = () => onChange(systemTheme());
|
|
33
|
+
query.addEventListener("change", listener);
|
|
34
|
+
return () => query.removeEventListener("change", listener);
|
|
35
|
+
}
|
|
36
|
+
function applyTheme(theme) {
|
|
37
|
+
const resolved = theme === null || theme === void 0 ? systemTheme() : isTheme(theme) ? theme : DEFAULT_THEME;
|
|
38
|
+
if (typeof document === "undefined") return resolved;
|
|
39
|
+
const root = document.documentElement;
|
|
40
|
+
root.classList.remove(...THEME_CLASSES);
|
|
41
|
+
if (resolved !== DEFAULT_THEME) root.classList.add(resolved);
|
|
42
|
+
root.style.colorScheme = THEMES.find((option) => option.value === resolved)?.dark ? "dark" : "light";
|
|
43
|
+
return resolved;
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
DEFAULT_THEME,
|
|
47
|
+
THEMES,
|
|
48
|
+
applyTheme,
|
|
49
|
+
isTheme,
|
|
50
|
+
systemTheme,
|
|
51
|
+
watchSystemTheme
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/theming/index.ts"],"sourcesContent":["/**\r\n * Theme runtime for `themes.css`: the list of themes, and applying one to `<html>`.\r\n * Framework-free and storage-free — where the chosen theme is remembered is up to the host app.\r\n */\r\n\r\nexport interface ThemeOption {\r\n value: string;\r\n label: string;\r\n /** Approximate color for a picker swatch, not the palette itself (that's `themes.css`). */\r\n swatch: string;\r\n dark: boolean;\r\n}\r\n\r\nexport const DEFAULT_THEME = 'default';\r\n\r\n/** `'default'` applies no class (the base palette); every other value is a class in `themes.css`. */\r\nexport const THEMES: readonly ThemeOption[] = [\r\n { value: 'default', label: 'Default', swatch: '#94a3b8', dark: false },\r\n { value: 'dark', label: 'Dark', swatch: '#1f2937', dark: true },\r\n { value: 'red', label: 'Red', swatch: '#ef4444', dark: false },\r\n { value: 'amber', label: 'Amber', swatch: '#f59e0b', dark: false },\r\n { value: 'lime', label: 'Lime', swatch: '#84cc16', dark: false },\r\n { value: 'teal', label: 'Teal', swatch: '#14b8a6', dark: false },\r\n { value: 'cyan', label: 'Cyan', swatch: '#06b6d4', dark: false },\r\n { value: 'sky', label: 'Sky', swatch: '#0ea5e9', dark: false },\r\n { value: 'blue', label: 'Blue', swatch: '#3b82f6', dark: false },\r\n { value: 'indigo', label: 'Indigo', swatch: '#6366f1', dark: false },\r\n { value: 'fuchsia', label: 'Fuchsia', swatch: '#d946ef', dark: false },\r\n { value: 'pink', label: 'Pink', swatch: '#ec4899', dark: false }\r\n];\r\n\r\nexport function isTheme(value: unknown): value is string {\r\n return typeof value === 'string' && THEMES.some(theme => theme.value === value);\r\n}\r\n\r\nconst THEME_CLASSES = THEMES.filter(theme => theme.value !== DEFAULT_THEME).map(theme => theme.value);\r\nconst DARK_QUERY = '(prefers-color-scheme: dark)';\r\n\r\n/** The theme to use when nobody has chosen one: `dark` if the OS prefers it, else `default`. */\r\nexport function systemTheme(): string {\r\n if (typeof window === 'undefined' || !window.matchMedia) return DEFAULT_THEME;\r\n return window.matchMedia(DARK_QUERY).matches ? 'dark' : DEFAULT_THEME;\r\n}\r\n\r\n/** Calls `onChange` when the OS light/dark setting flips; returns an unsubscribe function. */\r\nexport function watchSystemTheme(onChange: (theme: string) => void): () => void {\r\n if (typeof window === 'undefined' || !window.matchMedia) return () => {};\r\n const query = window.matchMedia(DARK_QUERY);\r\n const listener = () => onChange(systemTheme());\r\n query.addEventListener('change', listener);\r\n return () => query.removeEventListener('change', listener);\r\n}\r\n\r\n/**\r\n * Applies a theme to `<html>`: swaps only the theme classes (other classes on the element are left\r\n * alone) and sets `color-scheme` so native controls and scrollbars match. `null`/`undefined` means\r\n * \"nobody chose\", which follows the OS; an unknown value falls back to `default`. Returns the\r\n * theme actually applied.\r\n */\r\nexport function applyTheme(theme: string | null | undefined): string {\r\n const resolved = theme === null || theme === undefined ? systemTheme() : isTheme(theme) ? theme : DEFAULT_THEME;\r\n if (typeof document === 'undefined') return resolved;\r\n const root = document.documentElement;\r\n root.classList.remove(...THEME_CLASSES);\r\n if (resolved !== DEFAULT_THEME) root.classList.add(resolved);\r\n root.style.colorScheme = THEMES.find(option => option.value === resolved)?.dark ? 'dark' : 'light';\r\n return resolved;\r\n}\r\n"],"mappings":";;;AAaO,IAAM,gBAAgB;AAGtB,IAAM,SAAiC;AAAA,EAC5C,EAAE,OAAO,WAAW,OAAO,WAAW,QAAQ,WAAW,MAAM,MAAM;AAAA,EACrE,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,KAAK;AAAA,EAC9D,EAAE,OAAO,OAAO,OAAO,OAAO,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC7D,EAAE,OAAO,SAAS,OAAO,SAAS,QAAQ,WAAW,MAAM,MAAM;AAAA,EACjE,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC/D,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC/D,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC/D,EAAE,OAAO,OAAO,OAAO,OAAO,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC7D,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,MAAM;AAAA,EAC/D,EAAE,OAAO,UAAU,OAAO,UAAU,QAAQ,WAAW,MAAM,MAAM;AAAA,EACnE,EAAE,OAAO,WAAW,OAAO,WAAW,QAAQ,WAAW,MAAM,MAAM;AAAA,EACrE,EAAE,OAAO,QAAQ,OAAO,QAAQ,QAAQ,WAAW,MAAM,MAAM;AACjE;AAEO,SAAS,QAAQ,OAAiC;AACvD,SAAO,OAAO,UAAU,YAAY,OAAO,KAAK,WAAS,MAAM,UAAU,KAAK;AAChF;AAEA,IAAM,gBAAgB,OAAO,OAAO,WAAS,MAAM,UAAU,aAAa,EAAE,IAAI,WAAS,MAAM,KAAK;AACpG,IAAM,aAAa;AAGZ,SAAS,cAAsB;AACpC,MAAI,OAAO,WAAW,eAAe,CAAC,OAAO,WAAY,QAAO;AAChE,SAAO,OAAO,WAAW,UAAU,EAAE,UAAU,SAAS;AAC1D;AAGO,SAAS,iBAAiB,UAA+C;AAC9E,MAAI,OAAO,WAAW,eAAe,CAAC,OAAO,WAAY,QAAO,MAAM;AAAA,EAAC;AACvE,QAAM,QAAQ,OAAO,WAAW,UAAU;AAC1C,QAAM,WAAW,MAAM,SAAS,YAAY,CAAC;AAC7C,QAAM,iBAAiB,UAAU,QAAQ;AACzC,SAAO,MAAM,MAAM,oBAAoB,UAAU,QAAQ;AAC3D;AAQO,SAAS,WAAW,OAA0C;AACnE,QAAM,WAAW,UAAU,QAAQ,UAAU,SAAY,YAAY,IAAI,QAAQ,KAAK,IAAI,QAAQ;AAClG,MAAI,OAAO,aAAa,YAAa,QAAO;AAC5C,QAAM,OAAO,SAAS;AACtB,OAAK,UAAU,OAAO,GAAG,aAAa;AACtC,MAAI,aAAa,cAAe,MAAK,UAAU,IAAI,QAAQ;AAC3D,OAAK,MAAM,cAAc,OAAO,KAAK,YAAU,OAAO,UAAU,QAAQ,GAAG,OAAO,SAAS;AAC3F,SAAO;AACT;","names":[]}
|