@jztack/tokens 0.0.0-stage → 0.2.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 +71 -2
- package/dist/css/commonboard.css +269 -0
- package/dist/css/rentproof.css +269 -0
- package/dist/css/tabbie.css +277 -0
- package/dist/css/twjs.css +308 -0
- package/dist/css/wedding-ops.css +269 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/locale/my.d.ts +16 -0
- package/dist/locale/my.js +22 -0
- package/dist/palette/colors.d.ts +130 -0
- package/dist/palette/colors.js +129 -0
- package/dist/restyle.d.ts +38 -0
- package/dist/restyle.js +140 -0
- package/dist/semantic/contract.d.ts +118 -0
- package/dist/semantic/contract.js +148 -0
- package/dist/themes/commonboard.d.ts +13 -0
- package/dist/themes/commonboard.js +53 -0
- package/dist/themes/index.d.ts +10 -0
- package/dist/themes/index.js +15 -0
- package/dist/themes/rentproof.d.ts +2 -0
- package/dist/themes/rentproof.js +55 -0
- package/dist/themes/status-defaults.d.ts +11 -0
- package/dist/themes/status-defaults.js +29 -0
- package/dist/themes/tabbie.d.ts +2 -0
- package/dist/themes/tabbie.js +65 -0
- package/dist/themes/twjs.d.ts +19 -0
- package/dist/themes/twjs.js +83 -0
- package/dist/themes/wedding-ops.d.ts +18 -0
- package/dist/themes/wedding-ops.js +56 -0
- package/dist/tokens.css +472 -0
- package/package.json +31 -3
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tabbie — dark only. Obsidian visual language, values verbatim from
|
|
3
|
+
* Tabbie's src/styles/index.css `:root` block (which is intentionally
|
|
4
|
+
* identical to its `.dark` block; Tabbie has no light mode).
|
|
5
|
+
*
|
|
6
|
+
* Slots Tabbie never expressed are marked CONSTRUCTED:
|
|
7
|
+
* - background-secondary: Tabbie has no recessed-surface token; filled with
|
|
8
|
+
* its own secondary/muted glass value.
|
|
9
|
+
* - border-strong: filled with Tabbie's ring value (its strongest neutral).
|
|
10
|
+
* - destructive-foreground: shadcn convention (white on the destructive red).
|
|
11
|
+
* - status triples: Tabbie has no status system; constructed from its chart
|
|
12
|
+
* palette (chart-3 emerald-400, chart-2 amber-400, chart-1 red-400,
|
|
13
|
+
* chart-4 blue-400) as foregrounds on 12%-alpha backgrounds, following the
|
|
14
|
+
* shared dark-status shape.
|
|
15
|
+
* - accent-bg / accent-border (P4): Tabbie tints accent surfaces with its
|
|
16
|
+
* --accent value itself (bg-accent in dropdown/select focus states) and
|
|
17
|
+
* borders its canonical subtle surface (the glass-surface utility) with
|
|
18
|
+
* white/10 — so the pair is (accent, white/10), both real Tabbie values.
|
|
19
|
+
*/
|
|
20
|
+
const obsidian = '#090a0f';
|
|
21
|
+
const obsidianRaised = '#0f111a';
|
|
22
|
+
export const tabbie = {
|
|
23
|
+
name: 'tabbie',
|
|
24
|
+
modes: {
|
|
25
|
+
dark: {
|
|
26
|
+
background: obsidian,
|
|
27
|
+
'background-secondary': 'rgba(255, 255, 255, 0.05)', // CONSTRUCTED
|
|
28
|
+
foreground: '#ffffff',
|
|
29
|
+
'foreground-secondary': 'rgba(255, 255, 255, 0.6)', // = muted-foreground
|
|
30
|
+
card: obsidianRaised,
|
|
31
|
+
'card-foreground': '#ffffff',
|
|
32
|
+
popover: obsidianRaised,
|
|
33
|
+
'popover-foreground': '#ffffff',
|
|
34
|
+
primary: '#ffffff',
|
|
35
|
+
'primary-foreground': obsidian,
|
|
36
|
+
secondary: 'rgba(255, 255, 255, 0.05)',
|
|
37
|
+
'secondary-foreground': '#ffffff',
|
|
38
|
+
muted: 'rgba(255, 255, 255, 0.05)',
|
|
39
|
+
'muted-foreground': 'rgba(255, 255, 255, 0.6)',
|
|
40
|
+
accent: 'rgba(255, 255, 255, 0.1)',
|
|
41
|
+
'accent-bg': 'rgba(255, 255, 255, 0.1)', // = --accent, Tabbie's subtle-accent tint
|
|
42
|
+
'accent-border': 'rgba(255, 255, 255, 0.1)', // glass-surface border (border-white/10)
|
|
43
|
+
'accent-foreground': '#ffffff',
|
|
44
|
+
destructive: '#f87171',
|
|
45
|
+
'destructive-foreground': '#ffffff', // CONSTRUCTED
|
|
46
|
+
border: 'rgba(255, 255, 255, 0.1)',
|
|
47
|
+
'border-strong': 'rgba(255, 255, 255, 0.3)', // CONSTRUCTED
|
|
48
|
+
input: 'rgba(255, 255, 255, 0.1)',
|
|
49
|
+
ring: 'rgba(255, 255, 255, 0.3)',
|
|
50
|
+
// CONSTRUCTED status triples (from Tabbie's chart palette)
|
|
51
|
+
success: '#34d399',
|
|
52
|
+
'success-bg': 'rgba(52, 211, 153, 0.12)',
|
|
53
|
+
'success-foreground': '#34d399',
|
|
54
|
+
warning: '#fbbf24',
|
|
55
|
+
'warning-bg': 'rgba(251, 191, 36, 0.12)',
|
|
56
|
+
'warning-foreground': '#fbbf24',
|
|
57
|
+
danger: '#f87171',
|
|
58
|
+
'danger-bg': 'rgba(248, 113, 113, 0.12)',
|
|
59
|
+
'danger-foreground': '#f87171',
|
|
60
|
+
info: '#60a5fa',
|
|
61
|
+
'info-bg': 'rgba(96, 165, 250, 0.12)',
|
|
62
|
+
'info-foreground': '#60a5fa',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ThemeDefinition } from '../semantic/contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* TWJS — light + dark. Values verbatim from ui-components theme.ts /
|
|
4
|
+
* darkTheme, with names reconciled to the canonical contract (DESIGN.md §3):
|
|
5
|
+
* indigo #4F46E5 is `primary`; the vivid purple #5A31F4 is `accent`.
|
|
6
|
+
*
|
|
7
|
+
* CONSTRUCTED slots (new in the contract; TWJS never expressed them):
|
|
8
|
+
* card-foreground, popover, popover-foreground, muted, muted-foreground,
|
|
9
|
+
* accent-foreground, destructive-foreground, input (= border), ring
|
|
10
|
+
* (= primary). Everything else is a 1:1 rename of an existing TWJS value.
|
|
11
|
+
*
|
|
12
|
+
* The purple's alpha surface pair (brandBg/brandBorder in the source) are
|
|
13
|
+
* the canonical `accent-bg`/`accent-border` slots (P4, adopted Dec 4,
|
|
14
|
+
* 2026); the restyle emitter keeps emitting the legacy brandBg/brandBorder
|
|
15
|
+
* keys, sourced from those slots. TWJS's dead duplicate keys
|
|
16
|
+
* (successLight/warningLight/dangerLight, the slate200/slate300 semantic
|
|
17
|
+
* leaks) are dropped at this boundary, per DESIGN.md §3.
|
|
18
|
+
*/
|
|
19
|
+
export declare const twjs: ThemeDefinition;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { palette } from '../palette/colors.js';
|
|
2
|
+
import { darkStatus, lightStatus } from './status-defaults.js';
|
|
3
|
+
/**
|
|
4
|
+
* TWJS — light + dark. Values verbatim from ui-components theme.ts /
|
|
5
|
+
* darkTheme, with names reconciled to the canonical contract (DESIGN.md §3):
|
|
6
|
+
* indigo #4F46E5 is `primary`; the vivid purple #5A31F4 is `accent`.
|
|
7
|
+
*
|
|
8
|
+
* CONSTRUCTED slots (new in the contract; TWJS never expressed them):
|
|
9
|
+
* card-foreground, popover, popover-foreground, muted, muted-foreground,
|
|
10
|
+
* accent-foreground, destructive-foreground, input (= border), ring
|
|
11
|
+
* (= primary). Everything else is a 1:1 rename of an existing TWJS value.
|
|
12
|
+
*
|
|
13
|
+
* The purple's alpha surface pair (brandBg/brandBorder in the source) are
|
|
14
|
+
* the canonical `accent-bg`/`accent-border` slots (P4, adopted Dec 4,
|
|
15
|
+
* 2026); the restyle emitter keeps emitting the legacy brandBg/brandBorder
|
|
16
|
+
* keys, sourced from those slots. TWJS's dead duplicate keys
|
|
17
|
+
* (successLight/warningLight/dangerLight, the slate200/slate300 semantic
|
|
18
|
+
* leaks) are dropped at this boundary, per DESIGN.md §3.
|
|
19
|
+
*/
|
|
20
|
+
export const twjs = {
|
|
21
|
+
name: 'twjs',
|
|
22
|
+
modes: {
|
|
23
|
+
light: {
|
|
24
|
+
background: palette.slate[50],
|
|
25
|
+
'background-secondary': palette.slate[100],
|
|
26
|
+
foreground: palette.slate[900],
|
|
27
|
+
'foreground-secondary': palette.slate[500],
|
|
28
|
+
card: palette.white,
|
|
29
|
+
'card-foreground': palette.slate[900], // CONSTRUCTED
|
|
30
|
+
popover: palette.white, // CONSTRUCTED
|
|
31
|
+
'popover-foreground': palette.slate[900], // CONSTRUCTED
|
|
32
|
+
primary: palette.indigo[600],
|
|
33
|
+
'primary-foreground': palette.white,
|
|
34
|
+
secondary: palette.slate[100],
|
|
35
|
+
'secondary-foreground': palette.slate[700],
|
|
36
|
+
muted: palette.slate[100], // CONSTRUCTED
|
|
37
|
+
// slate-600 (contrast correction, Dec 5, 2026): slate-500 on
|
|
38
|
+
// slate-100 measured 4.34:1 — below the 4.5:1 floor for the Badge
|
|
39
|
+
// neutral-subtle pairing (muted-foreground on muted at 12px).
|
|
40
|
+
// Slate-600 on slate-100 measures 6.92:1 (pinned in
|
|
41
|
+
// tests/contrast.test.ts). CONSTRUCTED — verify at adoption.
|
|
42
|
+
'muted-foreground': palette.slate[600], // CONSTRUCTED
|
|
43
|
+
accent: '#5a31f4',
|
|
44
|
+
'accent-bg': 'rgba(90, 49, 244, 0.06)', // = brandBg in the source theme
|
|
45
|
+
'accent-border': 'rgba(90, 49, 244, 0.15)', // = brandBorder in the source theme
|
|
46
|
+
'accent-foreground': palette.white, // CONSTRUCTED
|
|
47
|
+
destructive: palette.red[500],
|
|
48
|
+
'destructive-foreground': palette.white, // CONSTRUCTED
|
|
49
|
+
border: palette.slate[200],
|
|
50
|
+
'border-strong': palette.slate[700],
|
|
51
|
+
input: palette.slate[200], // CONSTRUCTED
|
|
52
|
+
ring: palette.indigo[600], // CONSTRUCTED
|
|
53
|
+
...lightStatus,
|
|
54
|
+
},
|
|
55
|
+
dark: {
|
|
56
|
+
background: '#0b0f19',
|
|
57
|
+
'background-secondary': '#162032',
|
|
58
|
+
foreground: '#e2e8f0',
|
|
59
|
+
'foreground-secondary': '#94a3b8',
|
|
60
|
+
card: '#151e2e',
|
|
61
|
+
'card-foreground': '#e2e8f0', // CONSTRUCTED
|
|
62
|
+
popover: '#151e2e', // CONSTRUCTED
|
|
63
|
+
'popover-foreground': '#e2e8f0', // CONSTRUCTED
|
|
64
|
+
primary: palette.indigo[500],
|
|
65
|
+
'primary-foreground': '#ffffff',
|
|
66
|
+
secondary: '#1e293b',
|
|
67
|
+
'secondary-foreground': '#cbd5e1',
|
|
68
|
+
muted: '#1e293b', // CONSTRUCTED
|
|
69
|
+
'muted-foreground': '#94a3b8', // CONSTRUCTED
|
|
70
|
+
accent: '#818cf8',
|
|
71
|
+
'accent-bg': 'rgba(129, 140, 248, 0.12)', // = brandBg in the source darkTheme
|
|
72
|
+
'accent-border': 'rgba(129, 140, 248, 0.25)', // = brandBorder in the source darkTheme
|
|
73
|
+
'accent-foreground': '#0b0f19', // CONSTRUCTED
|
|
74
|
+
destructive: palette.red[300],
|
|
75
|
+
'destructive-foreground': '#0b0f19', // CONSTRUCTED
|
|
76
|
+
border: '#243044',
|
|
77
|
+
'border-strong': '#475569',
|
|
78
|
+
input: '#243044', // CONSTRUCTED
|
|
79
|
+
ring: palette.indigo[500], // CONSTRUCTED
|
|
80
|
+
...darkStatus,
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ThemeDefinition } from '../semantic/contract.js';
|
|
2
|
+
/**
|
|
3
|
+
* Wedding Ops — light. Stone neutrals, teal primary.
|
|
4
|
+
*
|
|
5
|
+
* Theme decision (DESIGN.md §4): the app config says teal-700 (#0f766e) but
|
|
6
|
+
* the UI actually uses the teal-800 family (bg-teal-800 primary buttons in
|
|
7
|
+
* forms.tsx). The mismatch is resolved in favor of the UI: primary is
|
|
8
|
+
* teal-800; teal-700 survives as the accent and focus ring (its
|
|
9
|
+
* focus:border-teal-700 is real usage).
|
|
10
|
+
*
|
|
11
|
+
* CONSTRUCTED slots (neutral defaults per DESIGN.md §4, flagged for review
|
|
12
|
+
* at adoption): background-secondary, popover, popover-foreground, secondary,
|
|
13
|
+
* muted, accent-foreground, accent-bg, accent-border (a teal-tinted subtle
|
|
14
|
+
* pair in the accent hue — the app has no badge/subtle-accent surface
|
|
15
|
+
* today), destructive-foreground, border-strong, and the status triples
|
|
16
|
+
* (shared default).
|
|
17
|
+
*/
|
|
18
|
+
export declare const weddingOps: ThemeDefinition;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { palette } from '../palette/colors.js';
|
|
2
|
+
import { lightStatus } from './status-defaults.js';
|
|
3
|
+
/**
|
|
4
|
+
* Wedding Ops — light. Stone neutrals, teal primary.
|
|
5
|
+
*
|
|
6
|
+
* Theme decision (DESIGN.md §4): the app config says teal-700 (#0f766e) but
|
|
7
|
+
* the UI actually uses the teal-800 family (bg-teal-800 primary buttons in
|
|
8
|
+
* forms.tsx). The mismatch is resolved in favor of the UI: primary is
|
|
9
|
+
* teal-800; teal-700 survives as the accent and focus ring (its
|
|
10
|
+
* focus:border-teal-700 is real usage).
|
|
11
|
+
*
|
|
12
|
+
* CONSTRUCTED slots (neutral defaults per DESIGN.md §4, flagged for review
|
|
13
|
+
* at adoption): background-secondary, popover, popover-foreground, secondary,
|
|
14
|
+
* muted, accent-foreground, accent-bg, accent-border (a teal-tinted subtle
|
|
15
|
+
* pair in the accent hue — the app has no badge/subtle-accent surface
|
|
16
|
+
* today), destructive-foreground, border-strong, and the status triples
|
|
17
|
+
* (shared default).
|
|
18
|
+
*/
|
|
19
|
+
export const weddingOps = {
|
|
20
|
+
name: 'wedding-ops',
|
|
21
|
+
modes: {
|
|
22
|
+
light: {
|
|
23
|
+
background: palette.stone[50],
|
|
24
|
+
'background-secondary': palette.stone[100], // CONSTRUCTED
|
|
25
|
+
foreground: palette.stone[900],
|
|
26
|
+
'foreground-secondary': palette.stone[500],
|
|
27
|
+
card: palette.white,
|
|
28
|
+
'card-foreground': palette.stone[900],
|
|
29
|
+
popover: palette.white, // CONSTRUCTED
|
|
30
|
+
'popover-foreground': palette.stone[900], // CONSTRUCTED
|
|
31
|
+
primary: palette.teal[800],
|
|
32
|
+
'primary-foreground': palette.white,
|
|
33
|
+
secondary: palette.stone[100], // CONSTRUCTED
|
|
34
|
+
'secondary-foreground': palette.stone[700],
|
|
35
|
+
muted: palette.stone[100], // CONSTRUCTED
|
|
36
|
+
// stone-600 (contrast correction, Dec 5, 2026): stone-500 on
|
|
37
|
+
// stone-100 measured 4.40:1 — below the 4.5:1 floor for the Badge
|
|
38
|
+
// neutral-subtle pairing (muted-foreground on muted at 12px).
|
|
39
|
+
// Stone-600 on stone-100 measures 6.99:1 (pinned in
|
|
40
|
+
// tests/contrast.test.ts). Constructed value — verify against the
|
|
41
|
+
// live app at adoption.
|
|
42
|
+
'muted-foreground': palette.stone[600],
|
|
43
|
+
accent: palette.teal[700],
|
|
44
|
+
'accent-bg': palette.teal[50], // CONSTRUCTED
|
|
45
|
+
'accent-border': 'rgba(15, 118, 110, 0.25)', // CONSTRUCTED — teal-700 at 25%
|
|
46
|
+
'accent-foreground': palette.white, // CONSTRUCTED
|
|
47
|
+
destructive: palette.red[700],
|
|
48
|
+
'destructive-foreground': palette.white, // CONSTRUCTED
|
|
49
|
+
border: palette.stone[300],
|
|
50
|
+
'border-strong': palette.stone[700], // CONSTRUCTED
|
|
51
|
+
input: palette.stone[300],
|
|
52
|
+
ring: palette.teal[700],
|
|
53
|
+
...lightStatus, // CONSTRUCTED (shared default)
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
};
|