@tcn/ui 0.3.3 → 0.4.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/Color-6BZIO3FS-CWWwv-fq.js +1004 -0
- package/dist/Color-6BZIO3FS-CWWwv-fq.js.map +1 -0
- package/dist/{WithTooltip-IO6J4KBT-B1oq93K5.js → WithTooltip-65CFNBJE-DvcUZizH.js} +4 -4
- package/dist/WithTooltip-65CFNBJE-DvcUZizH.js.map +1 -0
- package/dist/actions/__docs__/components/showcase.d.ts.map +1 -1
- package/dist/actions/__docs__/components/showcase.js +1 -1
- package/dist/actions/button/base_button/base_button.d.ts +2 -4
- package/dist/actions/button/base_button/base_button.d.ts.map +1 -1
- package/dist/actions/button/base_button/base_button.js +35 -35
- package/dist/actions/button/base_button/base_button.js.map +1 -1
- package/dist/actions/button/button/button.d.ts +7 -1
- package/dist/actions/button/button/button.d.ts.map +1 -1
- package/dist/actions/button/button/button.js +9 -7
- package/dist/actions/button/button/button.js.map +1 -1
- package/dist/actions/button/slim_button/slim_button.d.ts +6 -1
- package/dist/actions/button/slim_button/slim_button.d.ts.map +1 -1
- package/dist/actions/button/slim_button/slim_button.js +13 -14
- package/dist/actions/button/slim_button/slim_button.js.map +1 -1
- package/dist/actions/toggle/toggle.d.ts +9 -0
- package/dist/actions/toggle/toggle.d.ts.map +1 -0
- package/dist/actions/toggle/toggle.js +21 -0
- package/dist/actions/toggle/toggle.js.map +1 -0
- package/dist/feedback/lazy/lazy.js +3 -3
- package/dist/formatter-EIJCOSYU-D6nmx63h.js +6 -0
- package/dist/formatter-EIJCOSYU-D6nmx63h.js.map +1 -0
- package/dist/inputs/mask_input/mask.d.ts.map +1 -1
- package/dist/inputs/mask_input/mask.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_inline_values.js +3 -2
- package/dist/inputs/multiselect/multiselect_inline_values.js.map +1 -1
- package/dist/inputs/multiselect/multiselect_values.js +3 -2
- package/dist/inputs/multiselect/multiselect_values.js.map +1 -1
- package/dist/layouts/index.d.ts +2 -1
- package/dist/layouts/index.d.ts.map +1 -1
- package/dist/layouts/index.js +20 -18
- package/dist/layouts/index.js.map +1 -1
- package/dist/layouts/row/row.d.ts +4 -0
- package/dist/layouts/row/row.d.ts.map +1 -0
- package/dist/layouts/row/row.js +11 -0
- package/dist/layouts/row/row.js.map +1 -0
- package/dist/layouts/section/heading.d.ts +7 -0
- package/dist/layouts/section/heading.d.ts.map +1 -0
- package/dist/layouts/section/heading.js +9 -0
- package/dist/layouts/section/heading.js.map +1 -0
- package/dist/layouts/section/section.d.ts +4 -0
- package/dist/layouts/section/section.d.ts.map +1 -0
- package/dist/layouts/section/section.js +22 -0
- package/dist/layouts/section/section.js.map +1 -0
- package/dist/navigation/tabs/primitives/tabs_list.d.ts.map +1 -1
- package/dist/navigation/tabs/primitives/tabs_list.js +17 -24
- package/dist/navigation/tabs/primitives/tabs_list.js.map +1 -1
- package/dist/overlay/carrot/base_carrot.d.ts +8 -0
- package/dist/overlay/carrot/base_carrot.d.ts.map +1 -0
- package/dist/overlay/carrot/base_carrot.js +21 -0
- package/dist/overlay/carrot/base_carrot.js.map +1 -0
- package/dist/row.css +1 -0
- package/dist/section.css +1 -0
- package/dist/section.module-0wyGkhDg.js +5 -0
- package/dist/section.module-0wyGkhDg.js.map +1 -0
- package/dist/{showcase-WfP6kBEb.js → showcase-DK557szS.js} +18018 -16269
- package/dist/showcase-DK557szS.js.map +1 -0
- package/dist/surfaces/pop_confirm/pop_confirm.js +4 -3
- package/dist/surfaces/pop_confirm/pop_confirm.js.map +1 -1
- package/dist/{syntaxhighlighter-IQDEPFLK-BX_eF8__.js → syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js} +54 -54
- package/dist/syntaxhighlighter-ED5Y7EFY-DaMS-2cF.js.map +1 -0
- package/dist/themes/themes/ergo/ergo_theme.css +1 -1
- package/dist/themes/themes/ergo/ergo_theme.js +403 -263
- package/dist/themes/themes/ergo/ergo_theme.js.map +1 -1
- package/dist/themes/themes/windows_98/windows_98.css +1 -1
- package/dist/themes/themes/windows_98/windows_98_theme.js +108 -1
- package/dist/themes/themes/windows_98/windows_98_theme.js.map +1 -1
- package/dist/tokens/index.d.ts +2 -0
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/index.js +5 -1
- package/dist/tokens/index.js.map +1 -1
- package/dist/tokens/key/key.d.ts +3 -0
- package/dist/tokens/key/key.d.ts.map +1 -0
- package/dist/tokens/key/key.js +8 -0
- package/dist/tokens/key/key.js.map +1 -0
- package/dist/tokens/value/value.d.ts +3 -0
- package/dist/tokens/value/value.d.ts.map +1 -0
- package/dist/tokens/value/value.js +8 -0
- package/dist/tokens/value/value.js.map +1 -0
- package/package.json +1 -1
- package/src/actions/__docs__/actions.mdx +159 -34
- package/src/actions/__docs__/actions.stories.tsx +416 -101
- package/src/actions/__docs__/components/showcase.tsx +10 -6
- package/src/actions/button/__stories__/button.stories.tsx +10 -0
- package/src/actions/button/__stories__/toggle.stories.tsx +177 -0
- package/src/actions/button/base_button/base_button.tsx +8 -10
- package/src/actions/button/button/button.tsx +11 -2
- package/src/actions/button/slim_button/slim_button.tsx +20 -13
- package/src/actions/toggle/toggle.tsx +26 -0
- package/src/inputs/mask_input/mask.ts +7 -1
- package/src/layouts/index.ts +3 -2
- package/src/layouts/row/row.module.css +5 -0
- package/src/layouts/row/row.tsx +15 -0
- package/src/layouts/section/__stories__/section.stories.module.css +6 -0
- package/src/layouts/section/__stories__/section.stories.tsx +152 -0
- package/src/layouts/section/heading.tsx +16 -0
- package/src/layouts/section/section.module.css +41 -0
- package/src/layouts/section/section.tsx +21 -0
- package/src/navigation/tabs/primitives/tabs_list.tsx +5 -6
- package/src/overlay/carrot/base_carrot.tsx +24 -0
- package/src/overlay/carrot/carrot.stories.tsx +54 -0
- package/src/surfaces/card/card.stories.tsx +14 -14
- package/src/surfaces/modal/__stories__/modal.stories.tsx +16 -7
- package/src/surfaces/window/window.stories.tsx +16 -10
- package/src/themes/themes/ergo/__stories__/components/material_picker/sb_inverted_materials.module.css +4 -4
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.module.css +3 -0
- package/src/themes/themes/ergo/__stories__/components/tone_picker/sb_tone_picker.tsx +5 -2
- package/src/themes/themes/ergo/__stories__/material.stories.tsx +2 -2
- package/src/themes/themes/ergo/__stories__/sb_materials.module.css +31 -26
- package/src/themes/themes/ergo/ergo_theme.css +400 -260
- package/src/themes/themes/windows_98/windows_98.css +108 -1
- package/src/tokens/index.ts +2 -0
- package/src/tokens/key/key.tsx +10 -0
- package/src/tokens/value/value.tsx +10 -0
- package/tsconfig.json +6 -0
- package/dist/Color-ASIRERSW-B4GaVKuQ.js +0 -990
- package/dist/Color-ASIRERSW-B4GaVKuQ.js.map +0 -1
- package/dist/WithTooltip-IO6J4KBT-B1oq93K5.js.map +0 -1
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js +0 -6
- package/dist/formatter-QJ4M4OGQ-DaIl2Wi_.js.map +0 -1
- package/dist/layouts/list/section_header.d.ts +0 -6
- package/dist/layouts/list/section_header.d.ts.map +0 -1
- package/dist/layouts/list/section_header.js +0 -22
- package/dist/layouts/list/section_header.js.map +0 -1
- package/dist/showcase-WfP6kBEb.js.map +0 -1
- package/dist/syntaxhighlighter-IQDEPFLK-BX_eF8__.js.map +0 -1
- package/src/layouts/list/section_header.module.css +0 -20
- package/src/layouts/list/section_header.tsx +0 -21
|
@@ -9,11 +9,44 @@ const n = `@layer tcn-reset {
|
|
|
9
9
|
@layer tcn-theme {
|
|
10
10
|
/* ===== CSS VARIABLES ===== */
|
|
11
11
|
:root {
|
|
12
|
+
/* ========== Ergo Brand Palette ========== */
|
|
13
|
+
--ergo-primary: #ce6b2b;
|
|
14
|
+
--ergo-secondary: #669eb4;
|
|
15
|
+
--ergo-secondary-light: #ecf4fb;
|
|
16
|
+
--ergo-secondary-dark: #497485;
|
|
17
|
+
--ergo-tertiary: #dfd7cd;
|
|
18
|
+
--ergo-white: #ffffff;
|
|
19
|
+
|
|
20
|
+
--ergo-accent-blue: #395578;
|
|
21
|
+
--ergo-accent-green: #97bba3;
|
|
22
|
+
--ergo-accent-yellow: #dbc97e;
|
|
23
|
+
--ergo-accent-green: #97bba3;
|
|
24
|
+
|
|
25
|
+
--ergo-grey: #aaaaaa;
|
|
26
|
+
--ergo-grey-light: #d3d3d3;
|
|
27
|
+
--ergo-grey-dark: #808080;
|
|
28
|
+
|
|
29
|
+
--ergo-status-red: #ff6565;
|
|
30
|
+
--ergo-status-red-dark: #c24848;
|
|
31
|
+
|
|
32
|
+
--ergo-status-yellow: #ffd439;
|
|
33
|
+
--ergo-status-yellow-dark: #dbb735;
|
|
34
|
+
|
|
35
|
+
--ergo-status-blue: var(--ergo-secondary);
|
|
36
|
+
--ergo-status-blue-dark: var(--ergo-secondary-dark);
|
|
37
|
+
|
|
38
|
+
--ergo-status-green: #3fbc6a;
|
|
39
|
+
--ergo-status-green-dark: #2d904f;
|
|
40
|
+
|
|
41
|
+
--ergo-ink-primary: var(--ergo-accent-blue);
|
|
42
|
+
--ergo-ink-inverse: var(--ergo-white);
|
|
43
|
+
|
|
44
|
+
/* ========== Blackcat System Tokens ========== */
|
|
12
45
|
--scalar: 1;
|
|
13
|
-
--accent-color:
|
|
46
|
+
--accent-color: var(--ergo-primary);
|
|
14
47
|
|
|
15
48
|
/* Typography */
|
|
16
|
-
--font-color:
|
|
49
|
+
--font-color: var(--ergo-ink-primary);
|
|
17
50
|
--font-family: "Lato", sans-serif;
|
|
18
51
|
--font-size: 12px;
|
|
19
52
|
|
|
@@ -27,16 +60,22 @@ const n = `@layer tcn-reset {
|
|
|
27
60
|
--padding-large: 16px;
|
|
28
61
|
|
|
29
62
|
/* Status Colors */
|
|
30
|
-
--status-color-disabled:
|
|
31
|
-
--status-color-info:
|
|
32
|
-
--status-color-warning:
|
|
33
|
-
--status-color-positive:
|
|
34
|
-
--status-color-error:
|
|
35
|
-
|
|
36
|
-
--async-color-initial:
|
|
37
|
-
--async-color-pending:
|
|
38
|
-
--async-color-success:
|
|
39
|
-
--async-color-failed:
|
|
63
|
+
--status-color-disabled: var(--ergo-grey-light);
|
|
64
|
+
--status-color-info: var(--ergo-status-blue);
|
|
65
|
+
--status-color-warning: var(--ergo-status-yellow);
|
|
66
|
+
--status-color-positive: var(--ergo-status-green);
|
|
67
|
+
--status-color-error: var(--ergo-status-red);
|
|
68
|
+
|
|
69
|
+
--async-color-initial: var(--ergo-grey-main);
|
|
70
|
+
--async-color-pending: var(--ergo-status-blue);
|
|
71
|
+
--async-color-success: var(--ergo-status-green);
|
|
72
|
+
--async-color-failed: var(--ergo-status-red);
|
|
73
|
+
|
|
74
|
+
--action-severity-dangerous: var(--ergo-status-red);
|
|
75
|
+
--action-severity-cautious: var(--ergo-status-yellow);
|
|
76
|
+
--action-severity-neutral: var(--ergo-primary);
|
|
77
|
+
--action-severity-suggested: var(--ergo-status-blue);
|
|
78
|
+
--action-severity-encouraged: var(--ergo-status-green);
|
|
40
79
|
|
|
41
80
|
/* Shape */
|
|
42
81
|
--shape-radius-small: 2px;
|
|
@@ -70,29 +109,26 @@ const n = `@layer tcn-reset {
|
|
|
70
109
|
--foreground-color-tertiary: #222222;
|
|
71
110
|
--foreground-color-quaternary: #222222;
|
|
72
111
|
|
|
73
|
-
--material-disabled:
|
|
74
|
-
--material-
|
|
75
|
-
--
|
|
76
|
-
--material-tan: 33, 22%, 84%;
|
|
112
|
+
--material-disabled: var(--ergo-grey-light);
|
|
113
|
+
--on-material-disabled: var(--ergo-ink-inverse);
|
|
114
|
+
--ink-disabled: var(--ergo-grey-light);
|
|
77
115
|
|
|
78
|
-
|
|
79
|
-
--action: 23, 65%, 49%;
|
|
80
|
-
--on-action: 0, 0%, 100%;
|
|
81
|
-
--material: 0, 0%, 100%;
|
|
82
|
-
--on-material: 213, 35.6%, 34.7%;
|
|
116
|
+
--material-line: var(--ergo-grey);
|
|
83
117
|
|
|
84
|
-
|
|
85
|
-
--action
|
|
86
|
-
--on-action
|
|
87
|
-
--
|
|
88
|
-
--
|
|
89
|
-
--action-encouraged: 120, 90%, 40%;
|
|
118
|
+
/* Default Material */
|
|
119
|
+
--action: var(--ergo-primary);
|
|
120
|
+
--on-action: var(--ergo-white);
|
|
121
|
+
--material: var(--ergo-white);
|
|
122
|
+
--on-material: var(--ergo-accent-blue);
|
|
90
123
|
}
|
|
91
124
|
|
|
92
125
|
.tcn-theme-root {
|
|
93
126
|
font-family: var(--font-family);
|
|
94
127
|
color: var(--font-color);
|
|
95
|
-
|
|
128
|
+
--action: var(--ergo-primary);
|
|
129
|
+
--on-action: var(--ergo-white);
|
|
130
|
+
--material: var(--ergo-white);
|
|
131
|
+
--on-material: var(--ergo-accent-blue);
|
|
96
132
|
}
|
|
97
133
|
|
|
98
134
|
/* ===== Actions ===== */
|
|
@@ -105,192 +141,206 @@ const n = `@layer tcn-reset {
|
|
|
105
141
|
background 0.1s,
|
|
106
142
|
color 0.1s;
|
|
107
143
|
|
|
108
|
-
--
|
|
109
|
-
--
|
|
110
|
-
|
|
111
|
-
--act-down: color-mix(in srgb, var(--act), black 8%);
|
|
112
|
-
--act-raised: color-mix(in srgb, var(--act), white 8%);
|
|
113
|
-
--act-faint: hsla(var(--action), 0.2);
|
|
114
|
-
--on-mat: hsl(var(--on-material));
|
|
115
|
-
--on-mat-faint: hsla(var(--on-material), 0.2);
|
|
116
|
-
--on-mat-down: color-mix(in srgb, var(--on-mat), black 8%);
|
|
117
|
-
--mat: hsl(var(--material));
|
|
118
|
-
--mat-down: color-mix(in srgb, var(--mat), black 8%);
|
|
119
|
-
--mat-raised: color-mix(in srgb, var(--mat), white 8%);
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
.tcn-interactive[data-is-disabled="true"] {
|
|
123
|
-
pointer-events: none;
|
|
124
|
-
cursor: not-allowed;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.tcn-interactive[data-hierarchy="primary"] {
|
|
128
|
-
background: var(--act);
|
|
129
|
-
color: var(--on-act);
|
|
130
|
-
border: 1px solid var(--act);
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
.tcn-interactive[data-hierarchy="primary"]:focus-visible {
|
|
134
|
-
outline: 2px dashed var(--act);
|
|
135
|
-
}
|
|
144
|
+
--ink: var(--on-material);
|
|
145
|
+
--act: var(--action);
|
|
146
|
+
--mat: var(--material);
|
|
136
147
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
148
|
+
--act-down: color-mix(in srgb, var(--mat), black 12%);
|
|
149
|
+
--act-raised: color-mix(in srgb, var(--mat), var(--act) 12%);
|
|
150
|
+
--act-focus: color-mix(in srgb, var(--mat), var(--act) 16%);
|
|
151
|
+
--act-drag: color-mix(in srgb, var(--mat), var(--act) 24%);
|
|
142
152
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
background: var(--act-down);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.tcn-interactive[data-hierarchy="secondary"] {
|
|
152
|
-
background: transparent;
|
|
153
|
-
color: var(--on-mat);
|
|
154
|
-
border: 1px solid var(--on-mat);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.tcn-interactive[data-hierarchy="secondary"]:focus-visible {
|
|
158
|
-
outline: 2px dashed var(--on-mat);
|
|
159
|
-
}
|
|
153
|
+
background: var(--mat);
|
|
154
|
+
color: var(--ink);
|
|
155
|
+
transition:
|
|
156
|
+
background 0.1s,
|
|
157
|
+
color 0.1s;
|
|
160
158
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
&:focus-visible,
|
|
160
|
+
&[data-focus-visible] {
|
|
161
|
+
background: var(--act-focus);
|
|
162
|
+
outline: 2px solid var(--ergo-primary);
|
|
163
|
+
outline-offset: 2px;
|
|
164
|
+
}
|
|
165
165
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
166
|
+
&:hover,
|
|
167
|
+
&[data-hover] {
|
|
168
|
+
background: var(--act-raised);
|
|
169
|
+
}
|
|
169
170
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
&:active,
|
|
172
|
+
&[data-active] {
|
|
173
|
+
background: var(--act-down);
|
|
174
|
+
}
|
|
173
175
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
border: 1px solid transparent;
|
|
176
|
+
&[data-is-disabled="true"] {
|
|
177
|
+
pointer-events: none;
|
|
178
|
+
}
|
|
178
179
|
}
|
|
179
180
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
/* ===== Base Button =====
|
|
182
|
+
* Shared between Button and Toggle.
|
|
183
|
+
* Primarily manages button dimensions and sizing ratios.
|
|
184
|
+
*/
|
|
185
|
+
.tcn-base-button {
|
|
186
|
+
/* TODO: btn size should look for "--tcn-action-size" variable before defaulting. */
|
|
187
|
+
--btn-size-base: 26px;
|
|
188
|
+
--btn-pad-base: 12px;
|
|
183
189
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
190
|
+
--btn-pad-delta: 4px;
|
|
191
|
+
--btn-size-delta: 4px;
|
|
192
|
+
--btn-step: 1;
|
|
187
193
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
text-decoration-thickness: 1px;
|
|
192
|
-
text-underline-offset: 4px;
|
|
193
|
-
color: var(--on-mat);
|
|
194
|
-
background: var(--on-mat-faint);
|
|
195
|
-
}
|
|
194
|
+
/* Increase size and pad by 4px for each size "step" from medium */
|
|
195
|
+
--btn-pad: calc(var(--btn-pad-base) + var(--btn-pad-delta) * var(--btn-step));
|
|
196
|
+
--btn-size: calc(var(--btn-size-base) + var(--btn-size-delta) * var(--btn-step));
|
|
196
197
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
border-radius: var(--shape-radius-medium);
|
|
199
|
+
min-height: var(--btn-size);
|
|
200
|
+
padding: var(--padding-small) var(--btn-pad);
|
|
200
201
|
|
|
201
|
-
|
|
202
|
+
&[data-size="sm"] {
|
|
203
|
+
--btn-step: -1;
|
|
204
|
+
}
|
|
205
|
+
&[data-size="md"] {
|
|
206
|
+
--btn-step: 0;
|
|
207
|
+
}
|
|
208
|
+
&[data-size="lg"] {
|
|
209
|
+
--btn-step: 1;
|
|
210
|
+
}
|
|
202
211
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
212
|
+
&[data-is-utility="true"] {
|
|
213
|
+
height: auto;
|
|
214
|
+
width: auto;
|
|
215
|
+
min-width: var(--btn-size);
|
|
216
|
+
padding: 0;
|
|
206
217
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
218
|
+
/* Icon is 75% of the button size but minimum of 2px to account for border and 1px offset */
|
|
219
|
+
--util-ratio: 0.75;
|
|
220
|
+
--btn-size-base: 18px;
|
|
211
221
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
222
|
+
.tcn-icon {
|
|
223
|
+
min-height: min(2px, calc(var(--btn-size) * var(--util-ratio)));
|
|
224
|
+
min-width: min(2px, calc(var(--btn-size) * var(--util-ratio)));
|
|
225
|
+
}
|
|
226
|
+
}
|
|
216
227
|
}
|
|
217
228
|
|
|
218
|
-
/*
|
|
219
|
-
|
|
220
|
-
|
|
229
|
+
/* ===== Button =====
|
|
230
|
+
* Manages Hierarchy and Severity.
|
|
231
|
+
*/
|
|
232
|
+
.tcn-button {
|
|
233
|
+
--btn-primary: var(--action);
|
|
234
|
+
--btn-on-primary: var(--on-action);
|
|
235
|
+
--btn-variant: var(--on-material);
|
|
236
|
+
|
|
237
|
+
&[data-severity="dangerous"] {
|
|
238
|
+
--btn-primary: var(--action-severity-dangerous);
|
|
239
|
+
--btn-variant: var(--ergo-status-red-dark);
|
|
240
|
+
}
|
|
241
|
+
&[data-severity="cautious"] {
|
|
242
|
+
--btn-primary: var(--action-severity-cautious);
|
|
243
|
+
--btn-on-primary: var(--ergo-accent-blue);
|
|
244
|
+
--btn-variant: var(--ergo-status-yellow-dark);
|
|
245
|
+
}
|
|
246
|
+
&[data-severity="suggested"] {
|
|
247
|
+
--btn-primary: var(--action-severity-suggested);
|
|
248
|
+
--btn-variant: var(--ergo-status-blue-dark);
|
|
249
|
+
}
|
|
250
|
+
&[data-severity="encouraged"] {
|
|
251
|
+
--btn-primary: var(--action-severity-encouraged);
|
|
252
|
+
--btn-variant: var(--ergo-status-green-dark);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&[data-hierarchy="primary"] {
|
|
256
|
+
--act: var(--ergo-white);
|
|
257
|
+
--ink: var(--tcn-button-text-color, var(--btn-on-primary));
|
|
258
|
+
--mat: var(--tcn-button-color, var(--btn-primary));
|
|
259
|
+
&[data-is-disabled="true"] {
|
|
260
|
+
--ink: var(--ergo-white);
|
|
261
|
+
--mat: var(--ergo-grey-light);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
221
264
|
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
265
|
+
&[data-hierarchy="secondary"],
|
|
266
|
+
&[data-hierarchy="tertiary"] {
|
|
267
|
+
--act: var(--tcn-button-color, var(--btn-variant));
|
|
268
|
+
--ink: var(--tcn-button-color, var(--btn-variant));
|
|
269
|
+
&[data-is-disabled="true"] {
|
|
270
|
+
--ink: var(--ergo-grey-light);
|
|
271
|
+
}
|
|
272
|
+
}
|
|
226
273
|
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
274
|
+
/* Decorations */
|
|
275
|
+
&[data-hierarchy="tertiary"]:hover {
|
|
276
|
+
text-decoration: underline;
|
|
277
|
+
text-decoration-color: var(--ink);
|
|
278
|
+
text-decoration-thickness: 1px;
|
|
279
|
+
text-underline-offset: 4px;
|
|
280
|
+
}
|
|
231
281
|
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
282
|
+
&[data-hierarchy="tertiary"] {
|
|
283
|
+
border: 1px solid transparent;
|
|
284
|
+
}
|
|
235
285
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
}
|
|
286
|
+
&[data-hierarchy="secondary"] {
|
|
287
|
+
border: 1px solid var(--ink);
|
|
288
|
+
}
|
|
240
289
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
290
|
+
&[data-hierarchy="primary"] {
|
|
291
|
+
border: 1px solid var(--mat);
|
|
292
|
+
}
|
|
245
293
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}
|
|
294
|
+
transition:
|
|
295
|
+
box-shadow 0.1s,
|
|
296
|
+
transform 0.1s;
|
|
250
297
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
298
|
+
&:hover,
|
|
299
|
+
&[data-hover] {
|
|
300
|
+
transform: translateY(-1px);
|
|
301
|
+
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.12);
|
|
302
|
+
}
|
|
255
303
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
304
|
+
&:active,
|
|
305
|
+
&[data-active] {
|
|
306
|
+
transform: translateY(1px);
|
|
307
|
+
box-shadow: inset 0 2px 2px 0 rgba(0, 0, 0, 0.12);
|
|
308
|
+
}
|
|
259
309
|
}
|
|
260
310
|
|
|
311
|
+
/* @deprecated - use Button with utility prop instead */
|
|
261
312
|
.tcn-slim-button {
|
|
262
313
|
height: auto;
|
|
263
314
|
width: auto;
|
|
264
315
|
padding: 0;
|
|
265
|
-
}
|
|
266
316
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
317
|
+
&[data-size="sm"] {
|
|
318
|
+
min-height: 12px;
|
|
319
|
+
min-width: 12px;
|
|
320
|
+
padding: 0;
|
|
321
|
+
.tcn-icon {
|
|
322
|
+
min-height: 10px;
|
|
323
|
+
min-width: 10px;
|
|
324
|
+
}
|
|
274
325
|
}
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
min-width: 14px;
|
|
326
|
+
&[data-size="md"] {
|
|
327
|
+
min-height: 18px;
|
|
328
|
+
min-width: 18px;
|
|
329
|
+
padding: 0;
|
|
330
|
+
.tcn-icon {
|
|
331
|
+
min-height: 14px;
|
|
332
|
+
min-width: 14px;
|
|
333
|
+
}
|
|
284
334
|
}
|
|
285
|
-
}
|
|
286
335
|
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
336
|
+
&[data-size="lg"] {
|
|
337
|
+
min-height: 24px;
|
|
338
|
+
min-width: 24px;
|
|
339
|
+
padding: 0;
|
|
340
|
+
.tcn-icon {
|
|
341
|
+
min-height: 20px;
|
|
342
|
+
min-width: 20px;
|
|
343
|
+
}
|
|
294
344
|
}
|
|
295
345
|
}
|
|
296
346
|
|
|
@@ -298,6 +348,28 @@ const n = `@layer tcn-reset {
|
|
|
298
348
|
padding-inline-end: 26px;
|
|
299
349
|
}
|
|
300
350
|
|
|
351
|
+
/* Toggle */
|
|
352
|
+
.tcn-toggle {
|
|
353
|
+
--tgl-false: var(--ergo-accent-blue);
|
|
354
|
+
--tgl-true: var(--ergo-accent-blue);
|
|
355
|
+
--on-tgl-true: var(--ergo-white);
|
|
356
|
+
|
|
357
|
+
--ink: var(--tcn-button-color, var(--tgl-false));
|
|
358
|
+
--act: var(--tcn-button-color, var(--tgl-false));
|
|
359
|
+
&[data-is-disabled="true"] {
|
|
360
|
+
--ink: var(--ergo-grey-light);
|
|
361
|
+
}
|
|
362
|
+
&[data-is-selected="true"] {
|
|
363
|
+
--mat: var(--tcn-button-color, var(--tgl-true));
|
|
364
|
+
--ink: var(--tcn-button-text-color, var(--ergo-white));
|
|
365
|
+
--act: var(--ergo-white);
|
|
366
|
+
&[data-is-disabled="true"] {
|
|
367
|
+
--ink: var(--ergo-white);
|
|
368
|
+
--mat: var(--ergo-grey-light);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
|
|
301
373
|
.tcn-button-group {
|
|
302
374
|
.tcn-button-group-button:hover,
|
|
303
375
|
.tcn-button-group-button:active {
|
|
@@ -333,7 +405,6 @@ const n = `@layer tcn-reset {
|
|
|
333
405
|
}
|
|
334
406
|
|
|
335
407
|
.tcn-select-group {
|
|
336
|
-
--action: var(--action-neutral);
|
|
337
408
|
.tcn-select-group-option:hover,
|
|
338
409
|
.tcn-select-group-option:active {
|
|
339
410
|
transform: none;
|
|
@@ -398,10 +469,15 @@ const n = `@layer tcn-reset {
|
|
|
398
469
|
box-sizing: border-box;
|
|
399
470
|
border: none;
|
|
400
471
|
padding: 0px var(--padding-medium);
|
|
472
|
+
border-radius: 0;
|
|
401
473
|
}
|
|
402
474
|
.tcn-tab-item[data-is-selected="true"] {
|
|
403
|
-
--
|
|
475
|
+
--mat: var(--tcn-button-color, var(--material));
|
|
476
|
+
--ink: var(--tcn-button-text-color, var(--ergo-primary));
|
|
477
|
+
--act: var(--ergo-primary);
|
|
404
478
|
}
|
|
479
|
+
|
|
480
|
+
/* Hover Indicator */
|
|
405
481
|
.tcn-tab-item[data-is-selected="false"]:hover::after {
|
|
406
482
|
content: "";
|
|
407
483
|
display: block;
|
|
@@ -410,12 +486,13 @@ const n = `@layer tcn-reset {
|
|
|
410
486
|
right: 0;
|
|
411
487
|
bottom: 0px;
|
|
412
488
|
height: 1px;
|
|
413
|
-
background: var(--
|
|
489
|
+
background: var(--ergo-accent-blue);
|
|
414
490
|
pointer-events: none;
|
|
415
|
-
z-index: 2;
|
|
416
491
|
width: 100%;
|
|
492
|
+
z-index: 3;
|
|
417
493
|
}
|
|
418
494
|
|
|
495
|
+
/* Indicator */
|
|
419
496
|
&::after {
|
|
420
497
|
content: "";
|
|
421
498
|
position: absolute;
|
|
@@ -424,7 +501,7 @@ const n = `@layer tcn-reset {
|
|
|
424
501
|
min-height: 2px;
|
|
425
502
|
transform: translateX(var(--tabs-active-rectangle-position-x, 0));
|
|
426
503
|
width: var(--tabs-active-rectangle-width, 0);
|
|
427
|
-
background:
|
|
504
|
+
background: var(--ergo-primary);
|
|
428
505
|
pointer-events: none;
|
|
429
506
|
border-bottom-left-radius: 2px;
|
|
430
507
|
border-bottom-right-radius: 2px;
|
|
@@ -436,15 +513,17 @@ const n = `@layer tcn-reset {
|
|
|
436
513
|
}
|
|
437
514
|
}
|
|
438
515
|
|
|
516
|
+
/* Rail */
|
|
439
517
|
&::before {
|
|
440
518
|
content: "";
|
|
441
519
|
position: absolute;
|
|
442
|
-
bottom:
|
|
520
|
+
bottom: 0px;
|
|
443
521
|
left: 0;
|
|
444
522
|
width: 100%;
|
|
445
523
|
height: 1px;
|
|
446
524
|
background: var(--material-line);
|
|
447
525
|
pointer-events: none;
|
|
526
|
+
z-index: 1;
|
|
448
527
|
}
|
|
449
528
|
}
|
|
450
529
|
|
|
@@ -454,8 +533,7 @@ const n = `@layer tcn-reset {
|
|
|
454
533
|
width: auto;
|
|
455
534
|
flex-grow: 0;
|
|
456
535
|
border-radius: var(--shape-radius-medium);
|
|
457
|
-
border: 1px solid
|
|
458
|
-
--action: var(--on-material);
|
|
536
|
+
border: 1px solid var(--on-material);
|
|
459
537
|
|
|
460
538
|
.tcn-tabs-list {
|
|
461
539
|
gap: var(--gap-small);
|
|
@@ -463,24 +541,14 @@ const n = `@layer tcn-reset {
|
|
|
463
541
|
.tcn-tab-item {
|
|
464
542
|
border-radius: var(--shape-radius-medium);
|
|
465
543
|
}
|
|
466
|
-
.tcn-tab-item[data-is-selected="true"] {
|
|
467
|
-
background: var(--on-mat);
|
|
468
|
-
color: var(--mat);
|
|
469
|
-
}
|
|
470
|
-
.tcn-tab-item[data-is-selected="true"]:hover {
|
|
471
|
-
background: color-mix(in srgb, var(--on-mat), white 8%);
|
|
472
|
-
}
|
|
473
|
-
.tcn-tab-item[data-is-selected="true"]:active {
|
|
474
|
-
background: color-mix(in srgb, var(--on-mat), black 8%);
|
|
475
|
-
}
|
|
476
544
|
}
|
|
477
545
|
}
|
|
478
546
|
|
|
479
547
|
/* ===== MATERIAL ===== */
|
|
480
548
|
|
|
481
549
|
.material {
|
|
482
|
-
background-color:
|
|
483
|
-
color:
|
|
550
|
+
background-color: var(--material);
|
|
551
|
+
color: var(--on-material);
|
|
484
552
|
}
|
|
485
553
|
|
|
486
554
|
/* ===== SURFACES ===== */
|
|
@@ -572,26 +640,17 @@ const n = `@layer tcn-reset {
|
|
|
572
640
|
border: 1px solid var(--foreground-color-primary);
|
|
573
641
|
}
|
|
574
642
|
|
|
575
|
-
:where(.tcn-typography) {
|
|
576
|
-
color: inherit;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
643
|
:where(.tcn-header) {
|
|
580
|
-
--material: var(--
|
|
581
|
-
--on-material:
|
|
582
|
-
--action: var(--
|
|
583
|
-
--on-action:
|
|
584
|
-
|
|
585
|
-
color:
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
--on-material: 0, 0%, 100%;
|
|
591
|
-
--action: var(--material-tan);
|
|
592
|
-
--on-action: 0, 0%, 100%;
|
|
593
|
-
background-color: hsl(var(--material));
|
|
594
|
-
color: hsl(var(--on-material));
|
|
644
|
+
--material: var(--ergo-secondary-dark);
|
|
645
|
+
--on-material: var(--ergo-white);
|
|
646
|
+
--action: var(--ergo-tertiary);
|
|
647
|
+
--on-action: var(--ergo-secondary-dark);
|
|
648
|
+
|
|
649
|
+
background-color: var(--material);
|
|
650
|
+
color: var(--on-material);
|
|
651
|
+
:where(.tcn-typography) {
|
|
652
|
+
color: inherit;
|
|
653
|
+
}
|
|
595
654
|
}
|
|
596
655
|
}
|
|
597
656
|
|
|
@@ -607,26 +666,17 @@ const n = `@layer tcn-reset {
|
|
|
607
666
|
border: 2px solid white;
|
|
608
667
|
}
|
|
609
668
|
|
|
610
|
-
:where(.tcn-typography) {
|
|
611
|
-
color: inherit;
|
|
612
|
-
}
|
|
613
|
-
|
|
614
669
|
:where(.tcn-header) {
|
|
615
|
-
--material: var(--
|
|
616
|
-
--on-material:
|
|
617
|
-
--action: var(--
|
|
618
|
-
--on-action:
|
|
619
|
-
|
|
620
|
-
color:
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
--on-material: 0, 0%, 100%;
|
|
626
|
-
--action: var(--material-tan);
|
|
627
|
-
--on-action: 0, 0%, 100%;
|
|
628
|
-
background-color: hsl(var(--material));
|
|
629
|
-
color: hsl(var(--on-material));
|
|
670
|
+
--material: var(--ergo-secondary-dark);
|
|
671
|
+
--on-material: var(--ergo-white);
|
|
672
|
+
--action: var(--ergo-tertiary);
|
|
673
|
+
--on-action: var(--ergo-secondary-dark);
|
|
674
|
+
|
|
675
|
+
background-color: var(--material);
|
|
676
|
+
color: var(--on-material);
|
|
677
|
+
:where(.tcn-typography) {
|
|
678
|
+
color: inherit;
|
|
679
|
+
}
|
|
630
680
|
}
|
|
631
681
|
}
|
|
632
682
|
|
|
@@ -641,27 +691,19 @@ const n = `@layer tcn-reset {
|
|
|
641
691
|
overflow: hidden;
|
|
642
692
|
}
|
|
643
693
|
|
|
644
|
-
:where(.tcn-typography) {
|
|
645
|
-
color: inherit;
|
|
646
|
-
}
|
|
647
|
-
|
|
648
694
|
:where(.tcn-header) {
|
|
649
695
|
min-height: 32px;
|
|
650
|
-
--material: var(--material-secondary-dark);
|
|
651
|
-
--on-material: 0, 0%, 100%;
|
|
652
|
-
--action: var(--material-tan);
|
|
653
|
-
--on-action: 0, 0%, 100%;
|
|
654
|
-
background-color: hsl(var(--material));
|
|
655
|
-
color: hsl(var(--on-material));
|
|
656
|
-
}
|
|
657
696
|
|
|
658
|
-
|
|
659
|
-
--material: var(--
|
|
660
|
-
--
|
|
661
|
-
--action: var(--
|
|
662
|
-
|
|
663
|
-
background-color:
|
|
664
|
-
color:
|
|
697
|
+
--material: var(--ergo-secondary-dark);
|
|
698
|
+
--on-material: var(--ergo-white);
|
|
699
|
+
--action: var(--ergo-tertiary);
|
|
700
|
+
--on-action: var(--ergo-secondary-dark);
|
|
701
|
+
|
|
702
|
+
background-color: var(--material);
|
|
703
|
+
color: var(--on-material);
|
|
704
|
+
:where(.tcn-typography) {
|
|
705
|
+
color: inherit;
|
|
706
|
+
}
|
|
665
707
|
}
|
|
666
708
|
}
|
|
667
709
|
|
|
@@ -685,19 +727,117 @@ const n = `@layer tcn-reset {
|
|
|
685
727
|
overflow: hidden;
|
|
686
728
|
|
|
687
729
|
:where(.tcn-header) {
|
|
688
|
-
|
|
689
|
-
|
|
730
|
+
min-height: 32px;
|
|
731
|
+
|
|
732
|
+
--material: var(--ergo-secondary-light);
|
|
733
|
+
--on-material: var(--ergo-accent-blue);
|
|
734
|
+
--action: var(--ergo-secondary);
|
|
735
|
+
--on-action: var(--ergo-white);
|
|
736
|
+
|
|
737
|
+
background-color: var(--material);
|
|
738
|
+
color: var(--on-material);
|
|
739
|
+
:where(.tcn-typography) {
|
|
740
|
+
color: inherit;
|
|
741
|
+
}
|
|
690
742
|
}
|
|
743
|
+
}
|
|
691
744
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
745
|
+
/* SECTION */
|
|
746
|
+
.tcn-heading {
|
|
747
|
+
background-color: #f1f1f1;
|
|
748
|
+
padding-inline-start: 8px;
|
|
749
|
+
height: 30px;
|
|
750
|
+
z-index: 5;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
.tcn-section > .tcn-heading {
|
|
754
|
+
background-color: #f2f4f6;
|
|
755
|
+
padding-inline-start: 8px;
|
|
756
|
+
color: rgb(51, 51, 51);
|
|
757
|
+
z-index: 4;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
.tcn-section > .tcn-section > .tcn-heading {
|
|
761
|
+
background-color: #fff7f0;
|
|
762
|
+
padding-inline-start: 12px;
|
|
763
|
+
color: #395578;
|
|
764
|
+
z-index: 3;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
.tcn-section > .tcn-section > .tcn-section > .tcn-heading {
|
|
768
|
+
background-color: #eef8ef;
|
|
769
|
+
padding-inline-start: 16px;
|
|
770
|
+
color: #395578;
|
|
771
|
+
z-index: 2;
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
.tcn-section > .tcn-section > .tcn-section > .tcn-section .tcn-heading {
|
|
775
|
+
background-color: #ecf4fb;
|
|
776
|
+
padding-inline-start: 20px;
|
|
777
|
+
color: #395578;
|
|
778
|
+
z-index: 1;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
.tcn-section > :not(.tcn-heading, .tcn-section) {
|
|
782
|
+
padding-inline-start: 8px;
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
.tcn-section > .tcn-section > :not(.tcn-heading, .tcn-section) {
|
|
786
|
+
padding-inline-start: 12px;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
.tcn-section > .tcn-section > .tcn-section > :not(.tcn-heading, .tcn-section) {
|
|
790
|
+
padding-inline-start: 16px;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
.tcn-section
|
|
794
|
+
> .tcn-section
|
|
795
|
+
> .tcn-section
|
|
796
|
+
> .tcn-section
|
|
797
|
+
> :not(.tcn-heading, .tcn-section) {
|
|
798
|
+
padding-inline-start: 20px;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
.tcn-base-carrot {
|
|
802
|
+
--carrot-size: 12px;
|
|
803
|
+
--carrot-triangle-height: calc(var(--carrot-size) / 2);
|
|
804
|
+
--carrot-triangle-width: var(--carrot-size);
|
|
805
|
+
--carrot-triangle-base: var(--carrot-triangle-height) solid transparent;
|
|
806
|
+
--carrot-triangle-peak: var(--carrot-triangle-width) solid var(--material);
|
|
807
|
+
|
|
808
|
+
width: 0;
|
|
809
|
+
height: 0;
|
|
810
|
+
flex-grow: 0;
|
|
811
|
+
display: inline-block;
|
|
812
|
+
|
|
813
|
+
&[data-direction="top"] {
|
|
814
|
+
border-bottom: var(--carrot-triangle-peak);
|
|
815
|
+
border-left: var(--carrot-triangle-base);
|
|
816
|
+
border-right: var(--carrot-triangle-base);
|
|
817
|
+
}
|
|
818
|
+
|
|
819
|
+
&[data-direction="bottom"] {
|
|
820
|
+
border-top: var(--carrot-triangle-peak);
|
|
821
|
+
border-left: var(--carrot-triangle-base);
|
|
822
|
+
border-right: var(--carrot-triangle-base);
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
&[data-direction="start"] {
|
|
826
|
+
border-right: var(--carrot-triangle-peak);
|
|
827
|
+
border-top: var(--carrot-triangle-base);
|
|
828
|
+
border-bottom: var(--carrot-triangle-base);
|
|
829
|
+
}
|
|
830
|
+
|
|
831
|
+
&[data-direction="end"] {
|
|
832
|
+
border-left: var(--carrot-triangle-peak);
|
|
833
|
+
border-top: var(--carrot-triangle-base);
|
|
834
|
+
border-bottom: var(--carrot-triangle-base);
|
|
695
835
|
}
|
|
696
836
|
}
|
|
697
837
|
}
|
|
698
|
-
`,
|
|
699
|
-
|
|
838
|
+
`, r = new CSSStyleSheet();
|
|
839
|
+
r.replaceSync(n);
|
|
700
840
|
export {
|
|
701
|
-
|
|
841
|
+
r as ergoStyleSheet
|
|
702
842
|
};
|
|
703
843
|
//# sourceMappingURL=ergo_theme.js.map
|