@rt-tools/ui-kit 0.0.16 → 0.0.20

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.
Files changed (73) hide show
  1. package/fesm2022/rt-tools-ui-kit.mjs +310 -75
  2. package/fesm2022/rt-tools-ui-kit.mjs.map +1 -1
  3. package/package.json +1 -1
  4. package/rt-tools-ui-kit-0.0.20.tgz +0 -0
  5. package/src/lib/ui-kit/action-bar/components/bar/rtui-action-bar.component.scss +18 -18
  6. package/src/lib/ui-kit/action-bar/components/container/rtui-action-bar-container.component.scss +5 -7
  7. package/src/lib/ui-kit/aside/components/container/aside-container.component.scss +1 -0
  8. package/src/lib/ui-kit/aside/components/error-notification/aside-error-box.component.scss +6 -6
  9. package/src/lib/ui-kit/aside/components/panel/aside-panel.component.scss +33 -40
  10. package/src/lib/ui-kit/aside/stories/aside-component/test-aside.component.scss +1 -1
  11. package/src/lib/ui-kit/buttons/icon-round/rtui-round-icon-button.component.scss +4 -4
  12. package/src/lib/ui-kit/buttons/multi-button/rtui-multi-button.component.scss +13 -13
  13. package/src/lib/ui-kit/checkbox/rtui-checkbox.component.scss +11 -11
  14. package/src/lib/ui-kit/checkbox/stories/component/test-checkbox.component.scss +2 -2
  15. package/src/lib/ui-kit/dynamic-selectors/components/actions/rtui-dynamic-selector-list-actions.component.scss +3 -3
  16. package/src/lib/ui-kit/dynamic-selectors/components/dynamic-selector/rtui-dynamic-selector.component.scss +3 -3
  17. package/src/lib/ui-kit/dynamic-selectors/components/multi-selector-popup/rtui-multi-selector-popup.component.scss +28 -28
  18. package/src/lib/ui-kit/dynamic-selectors/components/placeholder/rtui-dynamic-selector-placeholder.component.scss +6 -7
  19. package/src/lib/ui-kit/dynamic-selectors/components/selected-list/rtui-dynamic-selector-selected-list.component.scss +2 -2
  20. package/src/lib/ui-kit/dynamic-selectors/strories/component/input/test-dynamic-input.component.scss +2 -3
  21. package/src/lib/ui-kit/dynamic-selectors/strories/component/selector/test-selector.component.scss +4 -5
  22. package/src/lib/ui-kit/file-uploader/rtui-file-upload.component.scss +8 -8
  23. package/src/lib/ui-kit/file-uploader/stories/component/test-file-upload.component.scss +1 -1
  24. package/src/lib/ui-kit/header/header.component.scss +1 -0
  25. package/src/lib/ui-kit/header/stories/component/test-header.component.scss +3 -3
  26. package/src/lib/ui-kit/image-uploader/image-uploader/rtui-image-upload.component.scss +5 -5
  27. package/src/lib/ui-kit/image-uploader/stories/component/test-image-upload.component.scss +2 -2
  28. package/src/lib/ui-kit/info-badge/info-badge.component.scss +20 -19
  29. package/src/lib/ui-kit/info-badge/stories/component/test-info-badge/test-info-badge.component.scss +1 -1
  30. package/src/lib/ui-kit/modal/modal.component.scss +9 -9
  31. package/src/lib/ui-kit/popover/rtui-popover-container.component.scss +2 -3
  32. package/src/lib/ui-kit/scrollable/scrollable-container.component.scss +7 -9
  33. package/src/lib/ui-kit/side-menu/menu/rtui-side-menu.component.scss +26 -26
  34. package/src/lib/ui-kit/side-menu/menu-sub-item/rtui-side-menu-sub-item.component.scss +15 -15
  35. package/src/lib/ui-kit/side-menu/stories/component/test-side-menu-wrapper.component.scss +10 -10
  36. package/src/lib/ui-kit/snack-bar/snack-bar.component.scss +13 -13
  37. package/src/lib/ui-kit/snack-bar/stories/component/test-snack-bar.component.scss +3 -3
  38. package/src/lib/ui-kit/spinner/spinner.component.scss +12 -15
  39. package/src/lib/ui-kit/table/components/clear-search-button/rtui-clear-button.component.scss +8 -8
  40. package/src/lib/ui-kit/table/components/pagination-view/rtui-pagination.component.scss +20 -28
  41. package/src/lib/ui-kit/table/components/table-base-cell/table-base-cell.component.scss +9 -10
  42. package/src/lib/ui-kit/table/components/table-config-aside/rt-table-config-aside.component.scss +1 -1
  43. package/src/lib/ui-kit/table/components/table-container/table-container.component.scss +21 -19
  44. package/src/lib/ui-kit/table/components/table-header-cell/table-header-cell.component.scss +8 -9
  45. package/src/lib/ui-kit/table/components/table-header-filter-cell/table-header-filter-cell.component.scss +3 -3
  46. package/src/lib/ui-kit/table/dynamic-list.component.scss +2 -2
  47. package/src/lib/ui-kit/table/stories/dynamic-list/test-dynamic-list.component.scss +1 -1
  48. package/src/lib/ui-kit/table/stories/pagination/test-pagination-component.scss +4 -4
  49. package/src/lib/ui-kit/table/stories/table/test-table-component.scss +1 -1
  50. package/src/lib/ui-kit/toggle/rtui-toggle.component.scss +23 -29
  51. package/src/lib/ui-kit/toggle/stories/component/test-toggle.component.scss +2 -2
  52. package/src/lib/ui-kit/toolbar/toolbar.component.scss +6 -11
  53. package/src/styles/TOKENS.md +121 -0
  54. package/src/styles/base/_base.scss +7 -15
  55. package/src/styles/base/_color-scheme.scss +86 -0
  56. package/src/styles/base/_mixin.scss +12 -15
  57. package/src/styles/base/_tokens.scss +426 -0
  58. package/src/styles/base/_variables.scss +7 -13
  59. package/src/styles/color-scheme.spec.ts +236 -0
  60. package/src/styles/components/_action-bar.scss +8 -8
  61. package/src/styles/components/_button.scss +63 -55
  62. package/src/styles/components/_checkbox.scss +5 -5
  63. package/src/styles/components/_dynamic-selectors.scss +13 -14
  64. package/src/styles/components/_form.scss +8 -13
  65. package/src/styles/components/_material-bridge.scss +30 -0
  66. package/src/styles/components/_rtui_button.scss +82 -82
  67. package/src/styles/components/_snackbar.scss +14 -14
  68. package/src/styles/components/_table.scss +34 -50
  69. package/src/styles/main.scss +5 -0
  70. package/src/styles/tokens.scss +5 -0
  71. package/styles/tokens.css +301 -0
  72. package/types/rt-tools-ui-kit.d.ts +101 -2
  73. package/rt-tools-ui-kit-0.0.16.tgz +0 -0
@@ -0,0 +1,86 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use 'sass:list';
4
+ @use './tokens' as tokens;
5
+
6
+ /// ============================================================================
7
+ /// Custom color schemes (brand palettes)
8
+ /// ============================================================================
9
+ ///
10
+ /// A color scheme overrides ONLY the accent-role indirection rows
11
+ /// `--rt-color-{role}-{0..100}` (see `_tokens.scss`). The whole semantic accent
12
+ /// tier (`--rt-bg/text/icon/border-accent-*`, hover/subtle/disabled, `--rt-border-focus`)
13
+ /// re-derives from those rows — so a brand recolors with Δ0 effort and the
14
+ /// component contract (semantic token names) stays untouched.
15
+ ///
16
+ /// The emitted block is scoped to `[data-rt-scheme="<name>"]`, which the runtime
17
+ /// (`RtThemeService.setColorScheme`) toggles on `<html>`. Because the scheme sets
18
+ /// raw values, it overrides the default rows that carry the `--mat-sys-*` fallback
19
+ /// → the scheme wins over an active Material theme.
20
+ ///
21
+ /// Usage:
22
+ /// @use '@rt-tools/ui-kit/src/styles/main' as rt; // or the package's scss entry
23
+ /// @include rt.color-scheme('teal', (
24
+ /// primary: (20: #b3e3e1, 40: #5cb8b5, 60: #1a9d99, 100: #008582),
25
+ /// brand: (20: #e8e8e8, 100: #008582),
26
+ /// ));
27
+ ///
28
+ /// One tonal ramp per role serves both light and dark (M3-style): the mode picks
29
+ /// the tone via `light-dark()` inside the semantic tier — schemes never duplicate
30
+ /// that logic. `$modes` is accepted for forward-compatibility but a single ramp
31
+ /// already covers every mode.
32
+
33
+ /// Roles a scheme may override, with their valid tone steps (from the default ramps).
34
+ $known-roles: tokens.$accent-roles;
35
+
36
+ /// Validate a single role/ramp pair; @error with an actionable message on bad input.
37
+ @function _validate-role($name, $role, $ramp) {
38
+ @if not map.has-key($known-roles, $role) {
39
+ @error 'rt.color-scheme("#{$name}"): unknown role "#{$role}". Allowed roles: #{map.keys($known-roles)}.';
40
+ }
41
+
42
+ @if meta.type-of($ramp) != 'map' {
43
+ @error 'rt.color-scheme("#{$name}"): role "#{$role}" must be a map of (tone: color), got #{meta.type-of($ramp)}.';
44
+ }
45
+
46
+ @each $step, $value in $ramp {
47
+ @if meta.type-of($step) != 'number' or not _is-integer-step($step) {
48
+ @error 'rt.color-scheme("#{$name}"): role "#{$role}" tone "#{$step}" must be an integer 0–100.';
49
+ }
50
+ }
51
+
52
+ @return true;
53
+ }
54
+
55
+ /// Tone steps must be integers within 0–100.
56
+ @function _is-integer-step($step) {
57
+ @return $step >= 0 and $step <= 100 and ($step % 1 == 0);
58
+ }
59
+
60
+ /// Emit a named color scheme as a `[data-rt-scheme]` block (only raw `--rt-color-{role}-{N}` rows).
61
+ ///
62
+ /// @param {String} $name Scheme name, matched by `data-rt-scheme="<name>"`.
63
+ /// @param {Map} $roles Map of `role: (tone: color, …)`. Roles ⊆ #{map.keys($known-roles)}.
64
+ /// @param {List} $modes Reserved for forward-compat; one ramp already serves all modes.
65
+ @mixin color-scheme($name, $roles, $modes: (light, dark)) {
66
+ @if meta.type-of($name) != 'string' {
67
+ @error 'rt.color-scheme: $name must be a string, got #{meta.type-of($name)}.';
68
+ }
69
+
70
+ @if meta.type-of($roles) != 'map' or list.length(map.keys($roles)) == 0 {
71
+ @error 'rt.color-scheme("#{$name}"): $roles must be a non-empty map of (role: ramp).';
72
+ }
73
+
74
+ @each $role, $ramp in $roles {
75
+ $ok: _validate-role($name, $role, $ramp);
76
+ }
77
+
78
+ // `:root[...]` (0,2,0) outranks the default `:root` rows (0,1,0) regardless of source order.
79
+ :root[data-rt-scheme='#{$name}'] {
80
+ @each $role, $ramp in $roles {
81
+ @each $step, $value in $ramp {
82
+ --rt-color-#{$role}-#{$step}: #{$value};
83
+ }
84
+ }
85
+ }
86
+ }
@@ -1,12 +1,7 @@
1
+ @use 'sass:color';
1
2
  @use 'sass:math';
2
3
  @use './variables' as vars;
3
4
 
4
- // css clr var generator
5
- // #{generateCssVar(red, 100)}: #eb5055;
6
- @function generateCssClrVar($color, $saturate) {
7
- @return --#{vars.$styles-clr-prefix}-#{$color}-#{$saturate};
8
- }
9
-
10
5
  // css var generator
11
6
  // #{generateCssVar(table-base-cell, suffix-icon, size)}: 1rem;
12
7
  @function generateCssVar($component-name, $element, $style-token) {
@@ -16,9 +11,9 @@
16
11
  // convert hex to rgb values
17
12
  // #{convert-hex-to-rgb-values(#ab2727)}: 171, 39, 39;
18
13
  @function convert-hex-to-rgb-values($hex) {
19
- $r: red($hex);
20
- $g: green($hex);
21
- $b: blue($hex);
14
+ $r: color.channel($hex, 'red', $space: rgb);
15
+ $g: color.channel($hex, 'green', $space: rgb);
16
+ $b: color.channel($hex, 'blue', $space: rgb);
22
17
 
23
18
  @return $r + ', ' + $g + ', ' + $b;
24
19
  }
@@ -26,6 +21,7 @@
26
21
  // px to rem
27
22
  // font-size: rem(16);
28
23
  $browser-context: 16;
24
+
29
25
  @function rem($valueRem, $context: $browser-context) {
30
26
  @return #{math.div($valueRem, $context)}rem;
31
27
  }
@@ -47,20 +43,21 @@ $browser-context: 16;
47
43
  @mixin flex-column-center {
48
44
  display: flex;
49
45
  flex-direction: column;
50
- justify-content: center;
51
46
  align-items: center;
47
+ justify-content: center;
52
48
  }
53
49
 
54
50
  @mixin visually-hidden {
55
51
  position: absolute;
52
+ overflow: hidden;
56
53
  width: 1px;
57
54
  height: 1px;
58
- margin: -1px;
59
- border: 0;
60
55
  padding: 0;
61
- white-space: nowrap;
62
- clip-path: inset(100%);
56
+ border: 0;
57
+ margin: -1px;
58
+ /* stylelint-disable-next-line property-no-deprecated -- legacy-browser leg of the visually-hidden pattern */
63
59
  clip: rect(0 0 0 0);
64
- overflow: hidden;
60
+ clip-path: inset(100%);
65
61
  pointer-events: none;
62
+ white-space: nowrap;
66
63
  }
@@ -0,0 +1,426 @@
1
+ @use './variables' as vars;
2
+
3
+ /// ============================================================================
4
+ /// rt-tools Design Tokens v2
5
+ /// ============================================================================
6
+ ///
7
+ /// Two tiers + component tier, GMT-style:
8
+ /// Tier 1 primitives --rt-color-* raw values. NEVER use directly in components.
9
+ /// Tier 2 semantic --rt-{bg,text,icon,border}-* role-based, adaptive via light-dark().
10
+ /// Tier 3 component --rt-<component>-<el>-<token> per-component SCSS maps; must reference Tier 2
11
+ /// (raw primitives allowed only for intentionally
12
+ /// chromatic values, e.g. color-variant buttons).
13
+ ///
14
+ /// Theming: light is the default. `.rt-dark` on <html>/<body> switches globally;
15
+ /// `data-rt-theme="dark|light"` creates a nested local theme context on any element.
16
+ /// Both work through `color-scheme` + light-dark() — no duplicated override blocks.
17
+ ///
18
+ /// Angular Material hybrid: when the consuming app configures a Material theme
19
+ /// (--mat-sys-* present), semantic tokens resolve to Material system colors;
20
+ /// otherwise the own-palette fallback applies. Opt out at build time:
21
+ /// @use 'rt-tools/src/styles/main' with ($tokens-use-material: false);
22
+ ///
23
+ /// Rules (enforced by convention + review):
24
+ /// - no HEX values in component SCSS;
25
+ /// - components reference semantic tokens, semantic references primitives;
26
+ /// - never skip the semantic tier.
27
+
28
+ $use-material: true !default;
29
+
30
+ /// Wrap a light/dark pair into light-dark(), optionally behind a --mat-sys-* fallback chain.
31
+ @function t($light, $dark: null, $mat: null) {
32
+ $v: $light;
33
+
34
+ @if $dark {
35
+ $v: light-dark(#{$light}, #{$dark});
36
+ }
37
+
38
+ @if $mat and $use-material {
39
+ @return var(--mat-sys-#{$mat}, #{$v});
40
+ }
41
+
42
+ @return $v;
43
+ }
44
+
45
+ /* ============================== Tier 1: primitives ============================== */
46
+
47
+ // Unified neutral scale (sorted by lightness, sourced from the legacy white/gray/black families)
48
+ $neutral: (
49
+ 0: #fff,
50
+ 5: #f5f6f8,
51
+ 10: #f3f3f3,
52
+ 15: #eee,
53
+ 20: #e8e8e8,
54
+ 25: #e0e0e0,
55
+ 30: #d1d1d1,
56
+ 35: #ccc,
57
+ 40: #a3a3a3,
58
+ 60: #747474,
59
+ 80: #323033,
60
+ 100: #181818,
61
+ );
62
+
63
+ // Chromatic hues (steps preserved from the legacy palette)
64
+ $hues: (
65
+ 'red': (
66
+ 10: #fdedee,
67
+ 20: #efc0c1,
68
+ 40: #f7b9bb,
69
+ 60: #e88487,
70
+ 80: #df6064,
71
+ 100: #eb5055,
72
+ ),
73
+ 'orange': (
74
+ 5: #f6e4d9,
75
+ 10: #e8cbbf,
76
+ 20: #e1ba9e,
77
+ 40: #e4a985,
78
+ 60: #f1a05d,
79
+ 70: #f2994a,
80
+ 80: #ee7a34,
81
+ 100: #ef7128,
82
+ ),
83
+ 'blue': (
84
+ 20: #eaedfc,
85
+ 40: #b3ceef,
86
+ 60: #6d96e8,
87
+ 80: #4285f4,
88
+ 100: #4284d7,
89
+ ),
90
+ 'green': (
91
+ 10: #e5f8f4,
92
+ 20: #baf4e0,
93
+ 40: #5dbfbc,
94
+ 60: #46c4c0,
95
+ 80: #21b18e,
96
+ 100: #01af8d,
97
+ ),
98
+ );
99
+
100
+ // Base value per hue + brand
101
+ $hue-base: (
102
+ 'red': #eb5055,
103
+ 'orange': #ef7128,
104
+ 'blue': #4284d7,
105
+ 'green': #01af8d,
106
+ 'brand': #0d1c2b,
107
+ );
108
+ $opacity-steps: (5, 10, 20, 30, 40, 50, 60, 70, 80, 90);
109
+ $overlay-steps: (5, 10, 15, 20, 25, 30, 40, 50, 60, 70, 80, 90);
110
+
111
+ /* ------------------------------ Accent-role ramps (indirection layer) ------------------------------ */
112
+ // The semantic accent tier references ONLY these `--rt-color-{role}-{0..100}` rows — never raw hues.
113
+ // A custom color scheme overrides just these rows (see `_color-scheme.scss`) and the entire
114
+ // accent layer (bg/text/icon/border + hover/subtle/disabled/focus derivations) recolors with Δ0 effort.
115
+ // ---
116
+ // Defaults reproduce the historical own-palette byte-for-byte. Tones that previously mapped to a
117
+ // Material system color carry the `--mat-sys-*` fallback INSIDE the tone (`t(..., null, $mat)`), so:
118
+ // - default render honors Material (as before);
119
+ // - a scheme override replaces the tone with a raw value → the scheme wins over Material.
120
+ // `brand` is navy in light (100) / near-white in dark (20); both carry mat-sys-primary because the
121
+ // original text/icon-accent-brand mapped to --mat-sys-primary.
122
+ $accent-roles: (
123
+ 'primary': (
124
+ 20: t(#eaedfc, null, primary-container),
125
+ 40: #b3ceef,
126
+ 60: t(#6d96e8, null, primary),
127
+ 100: t(#4284d7, null, primary),
128
+ ),
129
+ 'info': (
130
+ 20: #eaedfc,
131
+ 80: #4285f4,
132
+ 100: #4284d7,
133
+ ),
134
+ 'success': (
135
+ 10: #e5f8f4,
136
+ 80: #21b18e,
137
+ 100: #01af8d,
138
+ ),
139
+ 'warning': (
140
+ 10: #e8cbbf,
141
+ 80: #ee7a34,
142
+ 100: #ef7128,
143
+ ),
144
+ 'danger': (
145
+ 10: t(#fdedee, null, error-container),
146
+ 60: #e88487,
147
+ 100: t(#eb5055, null, error),
148
+ ),
149
+ 'brand': (
150
+ 20: t(#e8e8e8, null, primary),
151
+ 100: t(#0d1c2b, null, primary),
152
+ ),
153
+ );
154
+
155
+ /* ============================== Tier 2: semantic ============================== */
156
+ // NOTE: function calls in this map are evaluated when the module loads,
157
+ // honoring a `with ($use-material: ...)` configuration.
158
+
159
+ $semantic: (
160
+ /* ---- bg / base (adaptive) ---- */ bg-base-base: t(#fff, #1c1b1e, surface),
161
+ bg-base-elevated: t(#fff, #2a292d, surface-container),
162
+ bg-base-subtle: t(#f5f6f8, #232226),
163
+ bg-base-hover: t(#f3f3f3, rgb(255 255 255 / 6%)),
164
+ bg-base-active: t(#eee, rgb(255 255 255 / 10%)),
165
+ bg-base-strong: t(#e0e0e0, #3f3e43),
166
+ bg-base-emphasis: t(#747474, #a3a3a3),
167
+ bg-base-emphasis-soft: t(#a3a3a3, #747474),
168
+ bg-base-inverse: t(#181818, #f3f3f3, inverse-surface),
169
+ bg-base-inverse-soft: t(#323033, #eee),
170
+ bg-base-overlay: t(rgb(0 0 0 / 32%), rgb(0 0 0 / 60%)),
171
+ /* ---- bg / static ---- */ bg-static-light: #fff,
172
+ bg-static-dark: #181818,
173
+ bg-static-none: transparent,
174
+ /* ---- bg / accent: {subtle, solid, hover, disabled} — driven by --rt-color-{role}-{N} ---- */
175
+ bg-accent-primary-subtle: t(var(--rt-color-primary-20), color-mix(in srgb, var(--rt-color-primary-100) 18%, #1c1b1e)),
176
+ bg-accent-primary-solid: var(--rt-color-primary-100),
177
+ bg-accent-primary-hover: t(
178
+ color-mix(in srgb, var(--rt-color-primary-100) 90%, #000),
179
+ color-mix(in srgb, var(--rt-color-primary-100) 90%, #fff)
180
+ ),
181
+ bg-accent-primary-disabled: color-mix(in srgb, var(--rt-color-primary-100) 38%, transparent),
182
+ bg-accent-success-subtle: t(var(--rt-color-success-10), color-mix(in srgb, var(--rt-color-success-100) 18%, #1c1b1e)),
183
+ bg-accent-success-solid: var(--rt-color-success-80),
184
+ bg-accent-success-hover: t(
185
+ color-mix(in srgb, var(--rt-color-success-80) 90%, #000),
186
+ color-mix(in srgb, var(--rt-color-success-80) 90%, #fff)
187
+ ),
188
+ bg-accent-success-disabled: color-mix(in srgb, var(--rt-color-success-80) 38%, transparent),
189
+ bg-accent-warning-subtle: t(var(--rt-color-warning-10), color-mix(in srgb, var(--rt-color-warning-100) 18%, #1c1b1e)),
190
+ bg-accent-warning-solid: var(--rt-color-warning-80),
191
+ bg-accent-warning-hover: t(
192
+ color-mix(in srgb, var(--rt-color-warning-80) 90%, #000),
193
+ color-mix(in srgb, var(--rt-color-warning-80) 90%, #fff)
194
+ ),
195
+ bg-accent-warning-disabled: color-mix(in srgb, var(--rt-color-warning-80) 38%, transparent),
196
+ bg-accent-danger-subtle: t(var(--rt-color-danger-10), color-mix(in srgb, var(--rt-color-danger-100) 18%, #1c1b1e)),
197
+ bg-accent-danger-solid: var(--rt-color-danger-100),
198
+ bg-accent-danger-hover: t(
199
+ color-mix(in srgb, var(--rt-color-danger-100) 90%, #000),
200
+ color-mix(in srgb, var(--rt-color-danger-100) 90%, #fff)
201
+ ),
202
+ bg-accent-danger-disabled: color-mix(in srgb, var(--rt-color-danger-100) 38%, transparent),
203
+ bg-accent-info-subtle: t(var(--rt-color-info-20), color-mix(in srgb, var(--rt-color-info-100) 18%, #1c1b1e)),
204
+ bg-accent-info-solid: var(--rt-color-info-100),
205
+ bg-accent-info-hover: t(color-mix(in srgb, var(--rt-color-info-100) 90%, #000), color-mix(in srgb, var(--rt-color-info-100) 90%, #fff)),
206
+ bg-accent-info-disabled: color-mix(in srgb, var(--rt-color-info-100) 38%, transparent),
207
+ bg-accent-neutral-subtle: t(#f3f3f3, rgb(255 255 255 / 6%)),
208
+ bg-accent-neutral-solid: t(#747474, #a3a3a3),
209
+ bg-accent-neutral-hover: t(#a3a3a3, #747474),
210
+ bg-accent-neutral-disabled: t(rgb(116 116 116 / 38%), rgb(163 163 163 / 38%)),
211
+ /* ---- text / base (adaptive) ---- */ text-base-primary: t(rgb(0 0 0 / 87%), rgb(255 255 255 / 87%), on-surface),
212
+ text-base-strong: t(#181818, #f3f3f3),
213
+ text-base-soft: t(#323033, #e0e0e0),
214
+ text-base-secondary: t(#747474, #a3a3a3, on-surface-variant),
215
+ text-base-disabled: t(#a3a3a3, #747474),
216
+ text-base-inverse: t(#fff, #181818, inverse-on-surface),
217
+ /* ---- text / static ---- */ text-static-light: #fff,
218
+ text-static-dark: #181818,
219
+ /* ---- text / accent ---- */ text-accent-brand: t(var(--rt-color-brand-100), var(--rt-color-brand-20)),
220
+ text-accent-primary: t(var(--rt-color-primary-100), var(--rt-color-primary-60)),
221
+ text-accent-success: var(--rt-color-success-100),
222
+ text-accent-success-soft: var(--rt-color-success-80),
223
+ text-accent-warning: var(--rt-color-warning-100),
224
+ text-accent-warning-soft: var(--rt-color-warning-80),
225
+ text-accent-danger: var(--rt-color-danger-100),
226
+ text-accent-danger-soft: var(--rt-color-danger-60),
227
+ text-accent-info: var(--rt-color-info-100),
228
+ text-accent-info-soft: var(--rt-color-info-80),
229
+ /* ---- icon / neutral (adaptive) ---- */ icon-neutral-default: t(#323033, #e0e0e0),
230
+ icon-neutral-soft: t(#747474, #a3a3a3),
231
+ icon-neutral-disabled: t(#a3a3a3, #747474),
232
+ icon-neutral-inverse: t(#fff, #181818),
233
+ /* ---- icon / static ---- */ icon-static-light: #fff,
234
+ icon-static-dark: #181818,
235
+ /* ---- icon / accent ---- */ icon-accent-brand: t(var(--rt-color-brand-100), var(--rt-color-brand-20)),
236
+ icon-accent-primary: t(var(--rt-color-primary-100), var(--rt-color-primary-60)),
237
+ icon-accent-success: var(--rt-color-success-100),
238
+ icon-accent-warning: var(--rt-color-warning-100),
239
+ icon-accent-danger: var(--rt-color-danger-100),
240
+ icon-accent-info: var(--rt-color-info-100),
241
+ /* ---- border / neutral (adaptive) ---- */ border-neutral-subtle: t(#e8e8e8, #2e2d31),
242
+ border-neutral-default: t(#e0e0e0, #3f3e43, outline-variant),
243
+ border-neutral-medium: t(#d1d1d1, #4a494e),
244
+ border-neutral-divider: t(#ccc, #4a494e),
245
+ border-neutral-strong: t(#a3a3a3, #5c5b60, outline),
246
+ border-neutral-emphasis: t(#747474, #a3a3a3),
247
+ /* ---- border / accent ---- */ border-accent-primary: t(var(--rt-color-primary-100), var(--rt-color-primary-60)),
248
+ border-accent-success: var(--rt-color-success-100),
249
+ border-accent-warning: var(--rt-color-warning-100),
250
+ border-accent-danger: var(--rt-color-danger-100),
251
+ border-accent-danger-soft: var(--rt-color-danger-60),
252
+ border-accent-info: var(--rt-color-info-100),
253
+ border-focus: t(var(--rt-color-primary-40), var(--rt-color-primary-60)),
254
+ /* ---- form controls (rt extension) ---- */ control-track: t(#e8e8e8, #4a494e),
255
+ control-thumb: t(#fff, #eee),
256
+ control-checked: t(#323033, #e0e0e0),
257
+ /* ---- misc ---- */ scrollbar-thumb: t(#ccc, #4a494e),
258
+ scrollbar-thumb-hover: t(#a3a3a3, #5c5b60),
259
+ shadow-color: t(#747474, rgb(0 0 0 / 60%))
260
+ );
261
+
262
+ /* ============================== Foundations (mode-independent) ============================== */
263
+
264
+ $spacing: (
265
+ 0: 0,
266
+ 2: 0.125rem,
267
+ 4: 0.25rem,
268
+ 6: 0.375rem,
269
+ 8: 0.5rem,
270
+ 12: 0.75rem,
271
+ 16: 1rem,
272
+ 20: 1.25rem,
273
+ 24: 1.5rem,
274
+ 32: 2rem,
275
+ 40: 2.5rem,
276
+ 48: 3rem,
277
+ 56: 3.5rem,
278
+ 64: 4rem,
279
+ );
280
+ $radius: (
281
+ xs: 0.25rem,
282
+ sm: 0.5rem,
283
+ md: 0.75rem,
284
+ lg: 1rem,
285
+ xl: 1.5rem,
286
+ 2xl: 2rem,
287
+ full: 624.9375rem,
288
+ );
289
+ $font-size: (
290
+ xs: 0.75rem,
291
+ sm: 0.875rem,
292
+ md: 1rem,
293
+ lg: 1.25rem,
294
+ xl: 1.5rem,
295
+ );
296
+ $font-weight: (
297
+ regular: 400,
298
+ medium: 500,
299
+ semibold: 600,
300
+ bold: 700,
301
+ );
302
+ $shadow: (
303
+ sm: (
304
+ 0 0.0625rem 0.25rem 0 rgb(0 0 0 / 12%),
305
+ ),
306
+ md: (
307
+ 0 0.25rem 0.5rem 0 rgb(0 0 0 / 14%),
308
+ ),
309
+ lg: (
310
+ 0 0.5rem 1rem 0 var(--rt-shadow-color),
311
+ ),
312
+ );
313
+ $transition: (
314
+ fast: 0.15s ease-in-out,
315
+ base: 0.25s ease-in-out,
316
+ slow: 0.4s ease-in-out,
317
+ );
318
+ $z-index: (
319
+ dropdown: 1000,
320
+ sticky: 1020,
321
+ overlay: 1040,
322
+ modal: 1060,
323
+ popover: 1080,
324
+ tooltip: 1100,
325
+ );
326
+
327
+ // informational only — media queries cannot read CSS vars, use vars.$device-* in SCSS
328
+ $breakpoint: (
329
+ xs: vars.$device-xs,
330
+ sm: vars.$device-sm,
331
+ md: vars.$device-md,
332
+ lg: vars.$device-lg,
333
+ xl: vars.$device-xl,
334
+ );
335
+
336
+ /* ============================== Emission ============================== */
337
+
338
+ :root {
339
+ color-scheme: light;
340
+
341
+ /* --- Tier 1: primitives --- */
342
+ @each $step, $value in $neutral {
343
+ --rt-color-neutral-#{$step}: #{$value};
344
+ }
345
+
346
+ @each $hue, $steps in $hues {
347
+ @each $step, $value in $steps {
348
+ --rt-color-#{$hue}-#{$step}: #{$value};
349
+ }
350
+ }
351
+
352
+ @each $hue, $value in $hue-base {
353
+ --rt-color-#{$hue}: #{$value};
354
+
355
+ // opacity scales via color-mix
356
+ @each $a in $opacity-steps {
357
+ --rt-color-#{$hue}-a#{$a}: color-mix(in srgb, #{$value} #{$a + '%'}, transparent);
358
+ }
359
+ }
360
+
361
+ // overlay scales (on-light darkens, on-dark lightens)
362
+ @each $a in $overlay-steps {
363
+ --rt-color-dark-a#{$a}: rgba(24, 24, 24, #{calc($a / 100)});
364
+ --rt-color-light-a#{$a}: rgba(255, 255, 255, #{calc($a / 100)});
365
+ }
366
+
367
+ // accent-role ramps (indirection layer) — overridable per color scheme
368
+ @each $role, $tones in $accent-roles {
369
+ @each $step, $value in $tones {
370
+ --rt-color-#{$role}-#{$step}: #{$value};
371
+ }
372
+ }
373
+
374
+ /* --- Tier 2: semantic --- */
375
+ @each $token, $value in $semantic {
376
+ --rt-#{$token}: #{$value};
377
+ }
378
+
379
+ /* --- Foundations --- */
380
+ @each $token, $value in $spacing {
381
+ --rt-spacing-#{$token}: #{$value};
382
+ }
383
+
384
+ @each $token, $value in $radius {
385
+ --rt-radius-#{$token}: #{$value};
386
+ }
387
+
388
+ @each $token, $value in $font-size {
389
+ --rt-font-size-#{$token}: #{$value};
390
+ }
391
+
392
+ @each $token, $value in $font-weight {
393
+ --rt-font-weight-#{$token}: #{$value};
394
+ }
395
+
396
+ @each $token, $value in $shadow {
397
+ --rt-shadow-#{$token}: #{$value};
398
+ }
399
+
400
+ @each $token, $value in $transition {
401
+ --rt-transition-#{$token}: #{$value};
402
+ }
403
+
404
+ @each $token, $value in $z-index {
405
+ --rt-z-index-#{$token}: #{$value};
406
+ }
407
+
408
+ @each $token, $value in $breakpoint {
409
+ --rt-breakpoint-#{$token}: #{$value};
410
+ }
411
+ }
412
+
413
+ /* Theme switching: global class + nested local contexts (GMT data-theme analogue) */
414
+ .rt-dark,
415
+ [data-rt-theme='dark'] {
416
+ color-scheme: dark;
417
+ }
418
+
419
+ [data-rt-theme='light'] {
420
+ color-scheme: light;
421
+ }
422
+
423
+ /* 'auto' follows prefers-color-scheme */
424
+ .rt-theme-auto {
425
+ color-scheme: light dark;
426
+ }
@@ -1,12 +1,9 @@
1
1
  /* Material Theme */
2
2
  $main-theme: light;
3
-
4
- $styles-clr-prefix: 'clr';
5
3
  $styles-prefix: 'rt';
6
4
 
7
5
  /* Base */
8
- $avalon-color: var(--clr-avalon);
9
- $base-accent: var(--clr-base-accent);
6
+ $base-accent: var(--rt-text-accent-brand);
10
7
 
11
8
  /* Device Definitions */
12
9
  $device-xl: 1920px; // 120rem
@@ -19,16 +16,13 @@ $device-xs: 600px; // 37.5rem
19
16
  $base-fonts: var(--font-default);
20
17
  $base-font-weight: 400;
21
18
  $base-font-size: 1rem;
22
- $base-text-color: var(--clr-txt);
23
-
24
- /* Colors */
25
- $clr-red-100: #eb5055;
26
- $clr-red-10: #fdedee;
19
+ $base-text-color: var(--rt-text-base-primary);
27
20
 
28
- $clr-green-80: #00b894;
29
- $clr-green-10: #e5f8f4;
21
+ /* Button palette seeds (static — fed to sass color.scale() for hover/active states) */
22
+ $btn-danger: #eb5055;
23
+ $btn-danger-soft: #fdedee;
24
+ $btn-success: #00b894; // outlier: not on the --rt-color-green scale
25
+ $btn-success-soft: #e5f8f4;
30
26
 
31
27
  /* Components */
32
- $side-panel-dynamic-clr: var(--clr-base-accent);
33
- $pagination-dynamic-clr: var(--clr-base-accent);
34
28
  $text-highlight-color: #0077bf;