@tailor-platform/app-shell 1.16.0 → 1.18.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/app-shell-core.css +1 -1
- package/dist/app-shell.d.ts +762 -51
- package/dist/app-shell.js +7642 -5636
- package/dist/{appshell-B0wh5Lq0.js → appshell-Y1AYCuVJ.js} +323 -304
- package/dist/semantic-contrast.test.ts +227 -0
- package/dist/style-entry.d.ts +61 -26
- package/dist/testing.d.ts +66 -29
- package/dist/testing.js +1 -1
- package/dist/theme-bridge.test.ts +124 -1
- package/dist/theme.bridge.css +178 -0
- package/dist/theme.css +8 -2
- package/dist/themes/_template.css +8 -3
- package/dist/themes/bloom.css +0 -8
- package/dist/themes/cream.css +0 -8
- package/dist/themes/default.css +458 -103
- package/dist/vite-plugin.d.ts +61 -26
- package/package.json +2 -2
- package/skills/app-shell-patterns/SKILL.md +48 -37
- package/skills/app-shell-patterns/references/api/define-i18n-labels.md +123 -91
- package/skills/app-shell-patterns/references/api/define-module.md +4 -6
- package/skills/app-shell-patterns/references/api/define-resource.md +2 -2
- package/skills/app-shell-patterns/references/api/use-app-shell-config.md +53 -47
- package/skills/app-shell-patterns/references/api/use-app-shell-data.md +30 -26
- package/skills/app-shell-patterns/references/api/use-app-shell.md +37 -30
- package/skills/app-shell-patterns/references/api/use-toast.md +28 -31
- package/skills/app-shell-patterns/references/components/app-shell.md +4 -4
- package/skills/app-shell-patterns/references/components/card.md +79 -7
- package/skills/app-shell-patterns/references/components/data-table.md +599 -77
- package/skills/app-shell-patterns/references/components/date-picker.md +32 -21
- package/skills/app-shell-patterns/references/components/filter-rail.md +165 -0
- package/skills/app-shell-patterns/references/components/sidebar-group.md +12 -6
- package/skills/app-shell-patterns/references/components/sidebar-section.md +114 -0
- package/skills/app-shell-patterns/references/components/text.md +198 -0
- package/skills/app-shell-patterns/references/concepts/custom-components.md +1 -1
- package/skills/app-shell-patterns/references/concepts/file-based-routing.md +7 -1
- package/skills/app-shell-patterns/references/concepts/graphql.md +20 -14
- package/skills/app-shell-patterns/references/concepts/routing-navigation.md +41 -3
- package/skills/app-shell-patterns/references/concepts/sidebar-navigation.md +32 -0
- package/skills/app-shell-patterns/references/concepts/styling-theming.md +278 -65
- package/skills/app-shell-patterns/references/migrations.md +43 -1
- package/skills/app-shell-patterns/references/pages/document-detail.md +6 -6
- package/skills/app-shell-patterns/references/patterns/form-modal.md +26 -20
- package/skills/app-shell-patterns/references/patterns/i18n-labels.md +139 -0
- package/skills/app-shell-patterns/references/patterns/interaction-multi-select.md +129 -118
- package/skills/app-shell-patterns/references/patterns/list-dense-scan.md +5 -4
|
@@ -14,6 +14,9 @@ const here = dirname(fileURLToPath(import.meta.url));
|
|
|
14
14
|
const bridge = readFileSync(join(here, "theme.bridge.css"), "utf8");
|
|
15
15
|
const defaultTheme = readFileSync(join(here, "themes/default.css"), "utf8");
|
|
16
16
|
|
|
17
|
+
/** Semantic colour roles: 5 intents x 8 roles, named `--{intent}-{role}`. */
|
|
18
|
+
const SEMANTIC_PREFIX = "(?:info|success|warning|danger|neutral)";
|
|
19
|
+
|
|
17
20
|
/** Token names defined in the default palette for a given prefix, e.g. `alert`. */
|
|
18
21
|
function definedTokens(prefix: string): string[] {
|
|
19
22
|
const matches = defaultTheme.matchAll(new RegExp(`^\\s*--(${prefix}-[a-z-]+):`, "gm"));
|
|
@@ -29,7 +32,11 @@ function bridgedTokens(prefix: string): Map<string, string> {
|
|
|
29
32
|
}
|
|
30
33
|
|
|
31
34
|
describe("theme bridge", () => {
|
|
32
|
-
describe.each([
|
|
35
|
+
describe.each([
|
|
36
|
+
["alert", "alert"],
|
|
37
|
+
["status", "status"],
|
|
38
|
+
["semantic colour role", SEMANTIC_PREFIX],
|
|
39
|
+
])("--%s-* tokens", (_label, prefix) => {
|
|
33
40
|
const defined = definedTokens(prefix);
|
|
34
41
|
const bridged = bridgedTokens(prefix);
|
|
35
42
|
|
|
@@ -56,4 +63,120 @@ describe("theme bridge", () => {
|
|
|
56
63
|
// both files — fails loudly.
|
|
57
64
|
expect(bridgedTokens("alert").size).toBe(20);
|
|
58
65
|
});
|
|
66
|
+
|
|
67
|
+
it("bridges all 40 semantic colour roles", () => {
|
|
68
|
+
// 5 intents x 8 roles, pinned for the same reason as the alert count.
|
|
69
|
+
expect(bridgedTokens(SEMANTIC_PREFIX).size).toBe(40);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
describe("typography roles", () => {
|
|
73
|
+
const slots = ["size", "line-height", "weight", "letter-spacing"] as const;
|
|
74
|
+
/** `--type-<role>-<slot>` variables in the default palette, grouped by role. */
|
|
75
|
+
const defined = new Map<string, Map<string, string>>();
|
|
76
|
+
for (const m of defaultTheme.matchAll(
|
|
77
|
+
/^\s*--type-([a-z-]+)-(size|line-height|weight|letter-spacing):\s*([^;]+);/gm,
|
|
78
|
+
)) {
|
|
79
|
+
const role = m[1];
|
|
80
|
+
defined.set(role, (defined.get(role) ?? new Map()).set(m[2], m[3].trim()));
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Bridge entries `--text-<role>[--<suffix>]: var(--app-shell-type-X, var(--type-X))`,
|
|
84
|
+
* keyed by property name. The value is the `--type-*` name, or a marker when the
|
|
85
|
+
* entry does not read the same deprecated `--app-shell-type-*` name first.
|
|
86
|
+
*/
|
|
87
|
+
const bridgedText = new Map(
|
|
88
|
+
[
|
|
89
|
+
...bridge.matchAll(
|
|
90
|
+
/^\s*(--text-[a-z-]+):\s*var\(\s*--app-shell-type-([a-z-]+),\s*var\(\s*--type-([a-z-]+)\s*\)\s*\);/gm,
|
|
91
|
+
),
|
|
92
|
+
].map((m) => [m[1], m[2] === m[3] ? `--type-${m[3]}` : `mismatched old name ${m[2]}`]),
|
|
93
|
+
);
|
|
94
|
+
|
|
95
|
+
it("pins the role count at 10", () => {
|
|
96
|
+
// Dropping a whole role from both files would still pass the symmetry checks.
|
|
97
|
+
expect(defined.size).toBe(10);
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("defines exactly four variables per role", () => {
|
|
101
|
+
for (const [role, values] of defined) {
|
|
102
|
+
expect([...values.keys()].toSorted(), role).toEqual([...slots].toSorted());
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
106
|
+
it("bridges every role slot to its own variable", () => {
|
|
107
|
+
const suffix = {
|
|
108
|
+
size: "",
|
|
109
|
+
"line-height": "--line-height",
|
|
110
|
+
weight: "--font-weight",
|
|
111
|
+
"letter-spacing": "--letter-spacing",
|
|
112
|
+
} as const;
|
|
113
|
+
const expected = new Map<string, string>();
|
|
114
|
+
for (const role of defined.keys()) {
|
|
115
|
+
for (const slot of slots) {
|
|
116
|
+
expected.set(`--text-${role}${suffix[slot]}`, `--type-${role}-${slot}`);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
expect(bridgedText).toEqual(expected);
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it("reads the deprecated --app-shell-type-* name first in every bridge entry", () => {
|
|
123
|
+
// 1.17.0 shipped the roles under --app-shell-type-*. The bridge resolves the
|
|
124
|
+
// fallback on the element, so an old-name override keeps working at any scope.
|
|
125
|
+
const typeEntries = [...bridge.matchAll(/^\s*(--text-[a-z-]+):\s*([^;]+);/gm)].filter((m) =>
|
|
126
|
+
m[2].includes("--type-"),
|
|
127
|
+
);
|
|
128
|
+
expect(typeEntries.length).toBe(defined.size * slots.length);
|
|
129
|
+
expect(typeEntries.filter((m) => !bridgedText.has(m[1])).map((m) => m[1])).toEqual([]);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it("does not collide with a --color-* token that Tailwind resolves first", () => {
|
|
133
|
+
// `text-<name>` resolves against --color-<name> before --text-<name>.
|
|
134
|
+
const colors = [...bridge.matchAll(/^\s*--color-([a-z0-9-]+):/gm)].map((m) => m[1]);
|
|
135
|
+
for (const role of defined.keys()) {
|
|
136
|
+
expect(colors, role).not.toContain(role);
|
|
137
|
+
}
|
|
138
|
+
for (const name of colors) {
|
|
139
|
+
expect(name).not.toMatch(/^(heading|body|label|code)(-|$)/);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
it("keeps the line boxes on the spec values", () => {
|
|
144
|
+
// size (px) x line-height ratio = line box (px); weight and letter spacing are pinned too. Values from decisions/typography-roles.md.
|
|
145
|
+
const spec: Record<
|
|
146
|
+
string,
|
|
147
|
+
[size: number, lineBox: number, weight: number, letterSpacing: string]
|
|
148
|
+
> = {
|
|
149
|
+
"heading-lg": [24, 32, 700, "-0.025em"],
|
|
150
|
+
"heading-md": [18, 28, 600, "0em"],
|
|
151
|
+
"heading-sm": [14, 20, 600, "0em"],
|
|
152
|
+
"body-md": [14, 20, 400, "0em"],
|
|
153
|
+
"body-sm": [12, 16, 400, "0em"],
|
|
154
|
+
"label-md": [14, 20, 500, "0em"],
|
|
155
|
+
"label-sm": [12, 16, 500, "0em"],
|
|
156
|
+
"code-sm": [12, 18, 400, "0em"],
|
|
157
|
+
"body-md-relaxed": [14, 24, 400, "0em"],
|
|
158
|
+
"body-sm-relaxed": [12, 20, 400, "0em"],
|
|
159
|
+
};
|
|
160
|
+
expect([...defined.keys()].toSorted()).toEqual(Object.keys(spec).toSorted());
|
|
161
|
+
for (const [role, [size, lineBox, weight, letterSpacing]] of Object.entries(spec)) {
|
|
162
|
+
const values = defined.get(role)!;
|
|
163
|
+
const rem = /^([0-9.]+)rem$/.exec(values.get("size") ?? "");
|
|
164
|
+
expect(rem, `${role} size`).not.toBeNull();
|
|
165
|
+
expect(Number(rem![1]) * 16, `${role} size`).toBe(size);
|
|
166
|
+
const ratio = /^calc\((\d+) \/ (\d+)\)$/.exec(values.get("line-height") ?? "");
|
|
167
|
+
expect(ratio, `${role} line-height`).not.toBeNull();
|
|
168
|
+
expect(Number(ratio![2]), `${role} ratio base`).toBe(size);
|
|
169
|
+
expect(Number(ratio![1]), `${role} line box`).toBe(lineBox);
|
|
170
|
+
expect(Number(values.get("weight")), `${role} weight`).toBe(weight);
|
|
171
|
+
expect(values.get("letter-spacing"), `${role} letter-spacing`).toBe(letterSpacing);
|
|
172
|
+
}
|
|
173
|
+
});
|
|
174
|
+
});
|
|
175
|
+
|
|
176
|
+
it("defines --backdrop in the default palette and bridges it as bg-backdrop", () => {
|
|
177
|
+
// Dialog, Sheet and the CsvImporter drawer use `bg-backdrop`; without both
|
|
178
|
+
// lines the backdrop compiles to an undefined variable and turns transparent.
|
|
179
|
+
expect(defaultTheme).toMatch(/^\s*--backdrop:\s*var\(--primitive-black-a7\);/m);
|
|
180
|
+
expect(bridge).toMatch(/^\s*--color-backdrop:\s*var\(--backdrop\);/m);
|
|
181
|
+
});
|
|
59
182
|
});
|
package/dist/theme.bridge.css
CHANGED
|
@@ -36,6 +36,142 @@
|
|
|
36
36
|
sans-serif
|
|
37
37
|
);
|
|
38
38
|
|
|
39
|
+
/*
|
|
40
|
+
* Typography roles. `text-heading-lg` sets font-size, line-height, font-weight and
|
|
41
|
+
* letter-spacing together. The values live in themes/default.css and are referenced
|
|
42
|
+
* with `var()` here, like the colors: `@theme inline` writes literals into the
|
|
43
|
+
* utility, so a value placed here could not be overridden on `:root`.
|
|
44
|
+
*
|
|
45
|
+
* The `--text-*` namespace cannot set font-family. `text-code-sm` is used with
|
|
46
|
+
* `font-mono`.
|
|
47
|
+
*
|
|
48
|
+
* Each entry reads the deprecated `--app-shell-type-*` name first: 1.17.0
|
|
49
|
+
* shipped the roles under that name. The fallback is resolved on the element
|
|
50
|
+
* that uses the utility, so an old-name override keeps working at any scope,
|
|
51
|
+
* not only on `:root`. Remove the old names in the next major.
|
|
52
|
+
*/
|
|
53
|
+
--text-heading-lg: var(--app-shell-type-heading-lg-size, var(--type-heading-lg-size));
|
|
54
|
+
--text-heading-lg--line-height: var(
|
|
55
|
+
--app-shell-type-heading-lg-line-height,
|
|
56
|
+
var(--type-heading-lg-line-height)
|
|
57
|
+
);
|
|
58
|
+
--text-heading-lg--font-weight: var(
|
|
59
|
+
--app-shell-type-heading-lg-weight,
|
|
60
|
+
var(--type-heading-lg-weight)
|
|
61
|
+
);
|
|
62
|
+
--text-heading-lg--letter-spacing: var(
|
|
63
|
+
--app-shell-type-heading-lg-letter-spacing,
|
|
64
|
+
var(--type-heading-lg-letter-spacing)
|
|
65
|
+
);
|
|
66
|
+
--text-heading-md: var(--app-shell-type-heading-md-size, var(--type-heading-md-size));
|
|
67
|
+
--text-heading-md--line-height: var(
|
|
68
|
+
--app-shell-type-heading-md-line-height,
|
|
69
|
+
var(--type-heading-md-line-height)
|
|
70
|
+
);
|
|
71
|
+
--text-heading-md--font-weight: var(
|
|
72
|
+
--app-shell-type-heading-md-weight,
|
|
73
|
+
var(--type-heading-md-weight)
|
|
74
|
+
);
|
|
75
|
+
--text-heading-md--letter-spacing: var(
|
|
76
|
+
--app-shell-type-heading-md-letter-spacing,
|
|
77
|
+
var(--type-heading-md-letter-spacing)
|
|
78
|
+
);
|
|
79
|
+
--text-heading-sm: var(--app-shell-type-heading-sm-size, var(--type-heading-sm-size));
|
|
80
|
+
--text-heading-sm--line-height: var(
|
|
81
|
+
--app-shell-type-heading-sm-line-height,
|
|
82
|
+
var(--type-heading-sm-line-height)
|
|
83
|
+
);
|
|
84
|
+
--text-heading-sm--font-weight: var(
|
|
85
|
+
--app-shell-type-heading-sm-weight,
|
|
86
|
+
var(--type-heading-sm-weight)
|
|
87
|
+
);
|
|
88
|
+
--text-heading-sm--letter-spacing: var(
|
|
89
|
+
--app-shell-type-heading-sm-letter-spacing,
|
|
90
|
+
var(--type-heading-sm-letter-spacing)
|
|
91
|
+
);
|
|
92
|
+
--text-body-md: var(--app-shell-type-body-md-size, var(--type-body-md-size));
|
|
93
|
+
--text-body-md--line-height: var(
|
|
94
|
+
--app-shell-type-body-md-line-height,
|
|
95
|
+
var(--type-body-md-line-height)
|
|
96
|
+
);
|
|
97
|
+
--text-body-md--font-weight: var(--app-shell-type-body-md-weight, var(--type-body-md-weight));
|
|
98
|
+
--text-body-md--letter-spacing: var(
|
|
99
|
+
--app-shell-type-body-md-letter-spacing,
|
|
100
|
+
var(--type-body-md-letter-spacing)
|
|
101
|
+
);
|
|
102
|
+
--text-body-sm: var(--app-shell-type-body-sm-size, var(--type-body-sm-size));
|
|
103
|
+
--text-body-sm--line-height: var(
|
|
104
|
+
--app-shell-type-body-sm-line-height,
|
|
105
|
+
var(--type-body-sm-line-height)
|
|
106
|
+
);
|
|
107
|
+
--text-body-sm--font-weight: var(--app-shell-type-body-sm-weight, var(--type-body-sm-weight));
|
|
108
|
+
--text-body-sm--letter-spacing: var(
|
|
109
|
+
--app-shell-type-body-sm-letter-spacing,
|
|
110
|
+
var(--type-body-sm-letter-spacing)
|
|
111
|
+
);
|
|
112
|
+
--text-label-md: var(--app-shell-type-label-md-size, var(--type-label-md-size));
|
|
113
|
+
--text-label-md--line-height: var(
|
|
114
|
+
--app-shell-type-label-md-line-height,
|
|
115
|
+
var(--type-label-md-line-height)
|
|
116
|
+
);
|
|
117
|
+
--text-label-md--font-weight: var(--app-shell-type-label-md-weight, var(--type-label-md-weight));
|
|
118
|
+
--text-label-md--letter-spacing: var(
|
|
119
|
+
--app-shell-type-label-md-letter-spacing,
|
|
120
|
+
var(--type-label-md-letter-spacing)
|
|
121
|
+
);
|
|
122
|
+
--text-label-sm: var(--app-shell-type-label-sm-size, var(--type-label-sm-size));
|
|
123
|
+
--text-label-sm--line-height: var(
|
|
124
|
+
--app-shell-type-label-sm-line-height,
|
|
125
|
+
var(--type-label-sm-line-height)
|
|
126
|
+
);
|
|
127
|
+
--text-label-sm--font-weight: var(--app-shell-type-label-sm-weight, var(--type-label-sm-weight));
|
|
128
|
+
--text-label-sm--letter-spacing: var(
|
|
129
|
+
--app-shell-type-label-sm-letter-spacing,
|
|
130
|
+
var(--type-label-sm-letter-spacing)
|
|
131
|
+
);
|
|
132
|
+
--text-code-sm: var(--app-shell-type-code-sm-size, var(--type-code-sm-size));
|
|
133
|
+
--text-code-sm--line-height: var(
|
|
134
|
+
--app-shell-type-code-sm-line-height,
|
|
135
|
+
var(--type-code-sm-line-height)
|
|
136
|
+
);
|
|
137
|
+
--text-code-sm--font-weight: var(--app-shell-type-code-sm-weight, var(--type-code-sm-weight));
|
|
138
|
+
--text-code-sm--letter-spacing: var(
|
|
139
|
+
--app-shell-type-code-sm-letter-spacing,
|
|
140
|
+
var(--type-code-sm-letter-spacing)
|
|
141
|
+
);
|
|
142
|
+
--text-body-md-relaxed: var(
|
|
143
|
+
--app-shell-type-body-md-relaxed-size,
|
|
144
|
+
var(--type-body-md-relaxed-size)
|
|
145
|
+
);
|
|
146
|
+
--text-body-md-relaxed--line-height: var(
|
|
147
|
+
--app-shell-type-body-md-relaxed-line-height,
|
|
148
|
+
var(--type-body-md-relaxed-line-height)
|
|
149
|
+
);
|
|
150
|
+
--text-body-md-relaxed--font-weight: var(
|
|
151
|
+
--app-shell-type-body-md-relaxed-weight,
|
|
152
|
+
var(--type-body-md-relaxed-weight)
|
|
153
|
+
);
|
|
154
|
+
--text-body-md-relaxed--letter-spacing: var(
|
|
155
|
+
--app-shell-type-body-md-relaxed-letter-spacing,
|
|
156
|
+
var(--type-body-md-relaxed-letter-spacing)
|
|
157
|
+
);
|
|
158
|
+
--text-body-sm-relaxed: var(
|
|
159
|
+
--app-shell-type-body-sm-relaxed-size,
|
|
160
|
+
var(--type-body-sm-relaxed-size)
|
|
161
|
+
);
|
|
162
|
+
--text-body-sm-relaxed--line-height: var(
|
|
163
|
+
--app-shell-type-body-sm-relaxed-line-height,
|
|
164
|
+
var(--type-body-sm-relaxed-line-height)
|
|
165
|
+
);
|
|
166
|
+
--text-body-sm-relaxed--font-weight: var(
|
|
167
|
+
--app-shell-type-body-sm-relaxed-weight,
|
|
168
|
+
var(--type-body-sm-relaxed-weight)
|
|
169
|
+
);
|
|
170
|
+
--text-body-sm-relaxed--letter-spacing: var(
|
|
171
|
+
--app-shell-type-body-sm-relaxed-letter-spacing,
|
|
172
|
+
var(--type-body-sm-relaxed-letter-spacing)
|
|
173
|
+
);
|
|
174
|
+
|
|
39
175
|
--color-background: var(--background);
|
|
40
176
|
--color-foreground: var(--foreground);
|
|
41
177
|
--color-card: var(--card);
|
|
@@ -55,6 +191,7 @@
|
|
|
55
191
|
--color-border: var(--border);
|
|
56
192
|
--color-input: var(--input);
|
|
57
193
|
--color-ring: var(--ring);
|
|
194
|
+
--color-backdrop: var(--backdrop);
|
|
58
195
|
--color-chart-1: var(--chart-1);
|
|
59
196
|
--color-chart-2: var(--chart-2);
|
|
60
197
|
--color-chart-3: var(--chart-3);
|
|
@@ -100,6 +237,47 @@
|
|
|
100
237
|
--color-alert-info-foreground-muted: var(--alert-info-foreground-muted);
|
|
101
238
|
--color-alert-info-border: var(--alert-info-border);
|
|
102
239
|
|
|
240
|
+
--color-neutral-surface: var(--neutral-surface);
|
|
241
|
+
--color-neutral-surface-hover: var(--neutral-surface-hover);
|
|
242
|
+
--color-neutral-border: var(--neutral-border);
|
|
243
|
+
--color-neutral-solid: var(--neutral-solid);
|
|
244
|
+
--color-neutral-solid-hover: var(--neutral-solid-hover);
|
|
245
|
+
--color-neutral-text: var(--neutral-text);
|
|
246
|
+
--color-neutral-contrast: var(--neutral-contrast);
|
|
247
|
+
--color-neutral-indicator: var(--neutral-indicator);
|
|
248
|
+
--color-info-surface: var(--info-surface);
|
|
249
|
+
--color-info-surface-hover: var(--info-surface-hover);
|
|
250
|
+
--color-info-border: var(--info-border);
|
|
251
|
+
--color-info-solid: var(--info-solid);
|
|
252
|
+
--color-info-solid-hover: var(--info-solid-hover);
|
|
253
|
+
--color-info-text: var(--info-text);
|
|
254
|
+
--color-info-contrast: var(--info-contrast);
|
|
255
|
+
--color-info-indicator: var(--info-indicator);
|
|
256
|
+
--color-success-surface: var(--success-surface);
|
|
257
|
+
--color-success-surface-hover: var(--success-surface-hover);
|
|
258
|
+
--color-success-border: var(--success-border);
|
|
259
|
+
--color-success-solid: var(--success-solid);
|
|
260
|
+
--color-success-solid-hover: var(--success-solid-hover);
|
|
261
|
+
--color-success-text: var(--success-text);
|
|
262
|
+
--color-success-contrast: var(--success-contrast);
|
|
263
|
+
--color-success-indicator: var(--success-indicator);
|
|
264
|
+
--color-warning-surface: var(--warning-surface);
|
|
265
|
+
--color-warning-surface-hover: var(--warning-surface-hover);
|
|
266
|
+
--color-warning-border: var(--warning-border);
|
|
267
|
+
--color-warning-solid: var(--warning-solid);
|
|
268
|
+
--color-warning-solid-hover: var(--warning-solid-hover);
|
|
269
|
+
--color-warning-text: var(--warning-text);
|
|
270
|
+
--color-warning-contrast: var(--warning-contrast);
|
|
271
|
+
--color-warning-indicator: var(--warning-indicator);
|
|
272
|
+
--color-danger-surface: var(--danger-surface);
|
|
273
|
+
--color-danger-surface-hover: var(--danger-surface-hover);
|
|
274
|
+
--color-danger-border: var(--danger-border);
|
|
275
|
+
--color-danger-solid: var(--danger-solid);
|
|
276
|
+
--color-danger-solid-hover: var(--danger-solid-hover);
|
|
277
|
+
--color-danger-text: var(--danger-text);
|
|
278
|
+
--color-danger-contrast: var(--danger-contrast);
|
|
279
|
+
--color-danger-indicator: var(--danger-indicator);
|
|
280
|
+
|
|
103
281
|
--shadow-xs: var(--semantic-shadow-xs);
|
|
104
282
|
--shadow-sm: var(--semantic-shadow-sm);
|
|
105
283
|
--shadow-md: var(--semantic-shadow-md);
|
package/dist/theme.css
CHANGED
|
@@ -13,10 +13,16 @@
|
|
|
13
13
|
* 2. SHELL GRADIENT — optional; branded palettes only (bloom, cream).
|
|
14
14
|
* 3. SYSTEM — surfaces & chrome; copy default or tune for brand tint
|
|
15
15
|
* (foreground, muted, popover, card, borders).
|
|
16
|
-
* 4. PALETTE — optional: radius, charts, shadows
|
|
16
|
+
* 4. PALETTE — optional: radius, charts, shadows.
|
|
17
17
|
*
|
|
18
18
|
* Inherited from default.css — do not duplicate in new palettes:
|
|
19
|
-
* --ring, --sidebar-*, --status-*, --alert
|
|
19
|
+
* --ring, --sidebar-*, --backdrop, --primitive-* (colour scales), --status-*, --alert-*,
|
|
20
|
+
* --destructive, --destructive-foreground (aliases of the danger roles),
|
|
21
|
+
* --type-* (typography roles).
|
|
22
|
+
* The colour roles --{intent}-{role} inherit too; a palette overrides them
|
|
23
|
+
* only to recolour the status components. Typography roles are inherited
|
|
24
|
+
* the same way: do not copy the defaults, override only the variables
|
|
25
|
+
* whose values differ.
|
|
20
26
|
*
|
|
21
27
|
* Light/dark mode is controlled separately via `.dark` on <html>.
|
|
22
28
|
* Palette selection is by CSS import; there is no runtime palette prop.
|
|
@@ -17,7 +17,14 @@
|
|
|
17
17
|
* `@tailor-platform/app-shell/styles` in the consuming app.
|
|
18
18
|
*
|
|
19
19
|
* DO NOT SET (inherited from `:root` in default.css):
|
|
20
|
-
* --ring, --sidebar-*, --status-*, --alert
|
|
20
|
+
* --ring, --sidebar-*, --backdrop, --primitive-* (colour scales), --status-*, --alert-*,
|
|
21
|
+
* --destructive, --destructive-foreground, --type-*
|
|
22
|
+
* The colour roles --{info|success|warning|danger|neutral}-{role} also inherit.
|
|
23
|
+
* Override a role only to recolour the status components (Badge, Alert, ...)
|
|
24
|
+
* for this palette; never set --status-*, --alert-* or --destructive*, they alias the roles
|
|
25
|
+
* (--destructive is the danger solid; recolour it with --danger-solid).
|
|
26
|
+
* Typography roles (--type-*) inherit too: do not copy the defaults,
|
|
27
|
+
* override only the variables whose values differ.
|
|
21
28
|
*
|
|
22
29
|
* PREVIEW: `/showcase/colors` in the Vite example app.
|
|
23
30
|
* ═══════════════════════════════════════════════════════════════════════════
|
|
@@ -54,7 +61,6 @@
|
|
|
54
61
|
--sidebar-border: rgba(229, 229, 229, 1);
|
|
55
62
|
|
|
56
63
|
/* ── 4. PALETTE — optional overrides (else inherited from :root) ──────── */
|
|
57
|
-
--destructive: rgba(220, 38, 38, 1);
|
|
58
64
|
--radius: 0.625rem;
|
|
59
65
|
--chart-1: /* brand-adjacent */;
|
|
60
66
|
--chart-2: /* ... */;
|
|
@@ -98,7 +104,6 @@
|
|
|
98
104
|
--sidebar-border: rgba(255, 255, 255, 0.1);
|
|
99
105
|
|
|
100
106
|
/* ── 4. PALETTE (dark overrides) ─────────────────────────────────────── */
|
|
101
|
-
--destructive: rgba(248, 113, 113, 1);
|
|
102
107
|
--chart-1: /* ... */;
|
|
103
108
|
--chart-2: /* ... */;
|
|
104
109
|
--chart-3: /* ... */;
|
package/dist/themes/bloom.css
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
--sidebar-border: rgba(0, 0, 0, 0.08);
|
|
35
35
|
|
|
36
36
|
/* ── 4. PALETTE ───────────────────────────────────────────────────────── */
|
|
37
|
-
--destructive: rgba(220, 38, 38, 1);
|
|
38
37
|
--radius: 1rem;
|
|
39
38
|
--chart-1: rgba(83, 90, 232, 1);
|
|
40
39
|
--chart-2: rgba(0, 151, 156, 1);
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
--sidebar-border: rgba(255, 255, 255, 0.08);
|
|
79
78
|
|
|
80
79
|
/* ── 4. PALETTE (dark) ────────────────────────────────────────────────── */
|
|
81
|
-
--destructive: rgba(248, 113, 113, 1);
|
|
82
80
|
--chart-1: rgba(131, 138, 247, 1);
|
|
83
81
|
--chart-2: rgba(45, 191, 196, 1);
|
|
84
82
|
--chart-3: rgba(94, 234, 212, 1);
|
|
@@ -146,15 +144,9 @@ html
|
|
|
146
144
|
background-color: transparent;
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
html [data-slot="button"][class*="astw:bg-background"][class*="astw:border"],
|
|
150
147
|
html [data-slot="data-table-filter-chip"] {
|
|
151
148
|
background-color: transparent;
|
|
152
149
|
transition:
|
|
153
150
|
background-color 0.12s ease,
|
|
154
151
|
color 0.12s ease;
|
|
155
152
|
}
|
|
156
|
-
|
|
157
|
-
html [data-slot="button"][class*="astw:bg-background"][class*="astw:border"]:hover:not(:disabled) {
|
|
158
|
-
background-color: var(--accent);
|
|
159
|
-
color: var(--accent-foreground);
|
|
160
|
-
}
|
package/dist/themes/cream.css
CHANGED
|
@@ -34,7 +34,6 @@
|
|
|
34
34
|
--sidebar-border: rgba(0, 0, 0, 0.08);
|
|
35
35
|
|
|
36
36
|
/* ── 4. PALETTE ───────────────────────────────────────────────────────── */
|
|
37
|
-
--destructive: rgba(220, 38, 38, 1);
|
|
38
37
|
--radius: 1rem;
|
|
39
38
|
--chart-1: rgba(83, 90, 232, 1);
|
|
40
39
|
--chart-2: rgba(0, 151, 156, 1);
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
--sidebar-border: rgba(255, 255, 255, 0.08);
|
|
79
78
|
|
|
80
79
|
/* ── 4. PALETTE (dark) ────────────────────────────────────────────────── */
|
|
81
|
-
--destructive: rgba(248, 113, 113, 1);
|
|
82
80
|
--chart-1: rgba(131, 138, 247, 1);
|
|
83
81
|
--chart-2: rgba(45, 191, 196, 1);
|
|
84
82
|
--chart-3: rgba(94, 234, 212, 1);
|
|
@@ -146,15 +144,9 @@ html
|
|
|
146
144
|
background-color: transparent;
|
|
147
145
|
}
|
|
148
146
|
|
|
149
|
-
html [data-slot="button"][class*="astw:bg-background"][class*="astw:border"],
|
|
150
147
|
html [data-slot="data-table-filter-chip"] {
|
|
151
148
|
background-color: transparent;
|
|
152
149
|
transition:
|
|
153
150
|
background-color 0.12s ease,
|
|
154
151
|
color 0.12s ease;
|
|
155
152
|
}
|
|
156
|
-
|
|
157
|
-
html [data-slot="button"][class*="astw:bg-background"][class*="astw:border"]:hover:not(:disabled) {
|
|
158
|
-
background-color: var(--accent);
|
|
159
|
-
color: var(--accent-foreground);
|
|
160
|
-
}
|