@echothink-ui/style 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 +5 -0
- package/dist/index.cjs +216 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.css +1015 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +163 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
- package/src/base-roles.css +175 -0
- package/src/carbon-bridge.css +109 -0
- package/src/density.css +32 -0
- package/src/index.tsx +207 -0
- package/src/palettes.css +51 -0
- package/src/presets.css +617 -0
- package/src/primitives.css +82 -0
- package/src/styles.css +22 -0
- package/src/type-scale.css +47 -0
package/src/styles.css
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* ========================================================================= *
|
|
2
|
+
* @echothink-ui/style — the top-level theme entry.
|
|
3
|
+
*
|
|
4
|
+
* Layer order (each layer depends only on the one above it):
|
|
5
|
+
* carbon-theme -> Carbon + the @echothink-ui/tokens --eth-* contract base
|
|
6
|
+
* palettes -> Layer 1: raw color assets
|
|
7
|
+
* primitives -> Layer 2: radius/space/border/blur/motion/z/elevation
|
|
8
|
+
* base-roles -> Layer 4 base: role/state/status/density defaults (Carbon-like)
|
|
9
|
+
* density -> Layer 5: compact/comfortable sizing steps
|
|
10
|
+
* type-scale -> Layer 5: font size/line-height steps
|
|
11
|
+
* presets -> Layer 3: per-preset semantic + role + status deltas
|
|
12
|
+
* carbon-bridge -> maps the active preset onto --cds-* for Carbon controls
|
|
13
|
+
* ========================================================================= */
|
|
14
|
+
|
|
15
|
+
@import "@echothink-ui/carbon-theme/styles.css";
|
|
16
|
+
@import "./palettes.css";
|
|
17
|
+
@import "./primitives.css";
|
|
18
|
+
@import "./base-roles.css";
|
|
19
|
+
@import "./density.css";
|
|
20
|
+
@import "./type-scale.css";
|
|
21
|
+
@import "./presets.css";
|
|
22
|
+
@import "./carbon-bridge.css";
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* ========================================================================= *
|
|
2
|
+
* Layer 5 — Type scale axis.
|
|
3
|
+
*
|
|
4
|
+
* Explicit size + line-height tokens. Orthogonal to preset; selected via the
|
|
5
|
+
* existing [data-eth-type] attribute that StyleScope emits (compact | standard
|
|
6
|
+
* | large). Standard is the :root default. The legacy --eth-text-scale
|
|
7
|
+
* multiplier in @echothink-ui/tokens still works for un-migrated components.
|
|
8
|
+
* ========================================================================= */
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
--eth-font-size-caption: 0.75rem; /* 12 */
|
|
12
|
+
--eth-font-size-body-sm: 0.8125rem; /* 13 */
|
|
13
|
+
--eth-font-size-body: 0.875rem; /* 14 */
|
|
14
|
+
--eth-font-size-body-lg: 1rem; /* 16 */
|
|
15
|
+
--eth-font-size-heading-sm: 1rem; /* 16 */
|
|
16
|
+
--eth-font-size-heading: 1.25rem; /* 20 */
|
|
17
|
+
--eth-font-size-heading-lg: 1.75rem;/* 28 */
|
|
18
|
+
--eth-font-size-display: 2.5rem; /* 40 */
|
|
19
|
+
--eth-line-height-tight: 1.25;
|
|
20
|
+
--eth-line-height-body: 1.5;
|
|
21
|
+
--eth-letter-spacing-tight: -0.01em;
|
|
22
|
+
--eth-letter-spacing-normal: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
[data-eth-type="compact"] {
|
|
26
|
+
--eth-font-size-caption: 0.6875rem; /* 11 */
|
|
27
|
+
--eth-font-size-body-sm: 0.75rem; /* 12 */
|
|
28
|
+
--eth-font-size-body: 0.8125rem; /* 13 */
|
|
29
|
+
--eth-font-size-body-lg: 0.9375rem; /* 15 */
|
|
30
|
+
--eth-font-size-heading-sm: 0.9375rem;
|
|
31
|
+
--eth-font-size-heading: 1.125rem; /* 18 */
|
|
32
|
+
--eth-font-size-heading-lg: 1.5rem; /* 24 */
|
|
33
|
+
--eth-font-size-display: 2rem; /* 32 */
|
|
34
|
+
--eth-line-height-body: 1.4;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-eth-type="large"] {
|
|
38
|
+
--eth-font-size-caption: 0.8125rem; /* 13 */
|
|
39
|
+
--eth-font-size-body-sm: 0.875rem; /* 14 */
|
|
40
|
+
--eth-font-size-body: 1rem; /* 16 */
|
|
41
|
+
--eth-font-size-body-lg: 1.125rem; /* 18 */
|
|
42
|
+
--eth-font-size-heading-sm: 1.125rem;
|
|
43
|
+
--eth-font-size-heading: 1.375rem; /* 22 */
|
|
44
|
+
--eth-font-size-heading-lg: 2rem; /* 32 */
|
|
45
|
+
--eth-font-size-display: 3rem; /* 48 */
|
|
46
|
+
--eth-line-height-body: 1.6;
|
|
47
|
+
}
|