@arun-dev/tokens 0.32.0 → 0.33.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/createBrand.cjs +2 -0
- package/dist/createBrand.js +2 -0
- package/package.json +1 -1
- package/src/components/tree-view.css +23 -0
- package/src/components.css +1 -0
- package/src/createBrand.ts +2 -0
package/dist/createBrand.cjs
CHANGED
|
@@ -185,6 +185,8 @@ var CONTRAST_REQUIREMENTS = [
|
|
|
185
185
|
{ foreground: "--color-text-secondary", background: "--color-bg-primary", min: 7 },
|
|
186
186
|
{ foreground: "--color-text-muted", background: "--color-bg-primary", min: 4.5 },
|
|
187
187
|
{ foreground: "--color-text-inverse", background: "--color-bg-inverse", min: 7 },
|
|
188
|
+
// A selected row: a TreeView Item's text on its tint.
|
|
189
|
+
{ foreground: "--color-text-primary", background: "--color-bg-accent", min: 7 },
|
|
188
190
|
// The accent as text: links, accent chips, focus outlines.
|
|
189
191
|
{ foreground: "--color-text-accent", background: "--color-bg-primary", min: 7 },
|
|
190
192
|
{ foreground: "--color-text-accent", background: "--color-bg-secondary", min: 4.5 },
|
package/dist/createBrand.js
CHANGED
|
@@ -157,6 +157,8 @@ var CONTRAST_REQUIREMENTS = [
|
|
|
157
157
|
{ foreground: "--color-text-secondary", background: "--color-bg-primary", min: 7 },
|
|
158
158
|
{ foreground: "--color-text-muted", background: "--color-bg-primary", min: 4.5 },
|
|
159
159
|
{ foreground: "--color-text-inverse", background: "--color-bg-inverse", min: 7 },
|
|
160
|
+
// A selected row: a TreeView Item's text on its tint.
|
|
161
|
+
{ foreground: "--color-text-primary", background: "--color-bg-accent", min: 7 },
|
|
160
162
|
// The accent as text: links, accent chips, focus outlines.
|
|
161
163
|
{ foreground: "--color-text-accent", background: "--color-bg-primary", min: 7 },
|
|
162
164
|
{ foreground: "--color-text-accent", background: "--color-bg-secondary", min: 4.5 },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arun-dev/tokens",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.0",
|
|
4
4
|
"description": "Pure-CSS design tokens with white-label brand generation — primitives, brand palettes, semantic layers, and the createBrand() generator",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* TreeView component tokens — nested Items, each a row with a chevron and its label.
|
|
2
|
+
Override any of these to restyle trees without moving other components. */
|
|
3
|
+
:root {
|
|
4
|
+
--tree-view-font-size: var(--text-sm);
|
|
5
|
+
--tree-view-color: var(--color-text-primary);
|
|
6
|
+
--tree-view-item-padding-block: var(--space-3xs);
|
|
7
|
+
--tree-view-item-padding-inline: var(--space-2xs);
|
|
8
|
+
--tree-view-item-gap: var(--space-3xs);
|
|
9
|
+
--tree-view-item-radius: var(--radius-sm);
|
|
10
|
+
--tree-view-item-bg-hover: var(--color-bg-secondary);
|
|
11
|
+
--tree-view-item-bg-selected: var(--color-bg-accent);
|
|
12
|
+
--tree-view-item-color-selected: var(--color-text-primary);
|
|
13
|
+
/* A bar on the selected row's leading edge, so selection is not shown by colour alone. */
|
|
14
|
+
--tree-view-selected-bar-width: var(--space-2px);
|
|
15
|
+
--tree-view-selected-bar-color: var(--color-text-accent);
|
|
16
|
+
--tree-view-chevron-size: 1rem;
|
|
17
|
+
--tree-view-chevron-color: var(--color-text-secondary);
|
|
18
|
+
/* Each level in by a chevron and a gap, so a child's chevron sits under its parent's label. */
|
|
19
|
+
--tree-view-indent: calc(var(--tree-view-chevron-size) + var(--tree-view-item-gap));
|
|
20
|
+
--tree-view-focus-color: var(--color-text-accent);
|
|
21
|
+
--tree-view-disabled-opacity: 0.5;
|
|
22
|
+
--tree-view-duration: var(--duration-fast);
|
|
23
|
+
}
|
package/src/components.css
CHANGED
package/src/createBrand.ts
CHANGED
|
@@ -270,6 +270,8 @@ export const CONTRAST_REQUIREMENTS: readonly {
|
|
|
270
270
|
{ foreground: '--color-text-secondary', background: '--color-bg-primary', min: 7 },
|
|
271
271
|
{ foreground: '--color-text-muted', background: '--color-bg-primary', min: 4.5 },
|
|
272
272
|
{ foreground: '--color-text-inverse', background: '--color-bg-inverse', min: 7 },
|
|
273
|
+
// A selected row: a TreeView Item's text on its tint.
|
|
274
|
+
{ foreground: '--color-text-primary', background: '--color-bg-accent', min: 7 },
|
|
273
275
|
// The accent as text: links, accent chips, focus outlines.
|
|
274
276
|
{ foreground: '--color-text-accent', background: '--color-bg-primary', min: 7 },
|
|
275
277
|
{ foreground: '--color-text-accent', background: '--color-bg-secondary', min: 4.5 },
|