@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
@@ -21,20 +21,18 @@ $base-cell: (
21
21
  icon-size: 1rem,
22
22
  ),
23
23
  copy-button-complete: (
24
- color: var(--clr-black-100),
24
+ color: var(--rt-text-base-strong),
25
25
  ),
26
26
  );
27
27
 
28
28
  :host {
29
- height: 100%;
30
- width: 100%;
31
-
29
+ position: relative;
32
30
  display: flex;
31
+ width: 100%;
32
+ height: 100%;
33
33
  align-items: center;
34
34
  gap: var(--rt-table-base-cell-host-gap);
35
35
 
36
- position: relative;
37
-
38
36
  @each $element, $elements in $base-cell {
39
37
  @each $style-token, $value in $elements {
40
38
  #{mixins.generateCssVar('table-base-cell', #{$element}, #{$style-token})}: #{$value};
@@ -49,16 +47,16 @@ $base-cell: (
49
47
  }
50
48
 
51
49
  &__title {
52
- width: 100%;
53
50
  display: table;
51
+ width: 100%;
54
52
  table-layout: fixed;
55
53
 
56
54
  &-text {
55
+ overflow: hidden;
57
56
  width: 100%;
58
57
  padding: var(--rt-table-base-cell-title-padding);
59
- white-space: nowrap;
60
- overflow: hidden;
61
58
  text-overflow: ellipsis;
59
+ white-space: nowrap;
62
60
  }
63
61
 
64
62
  &--align {
@@ -90,14 +88,15 @@ $base-cell: (
90
88
 
91
89
  &__copy-button {
92
90
  position: absolute;
93
- visibility: hidden;
94
91
  padding: var(--rt-table-base-cell-copy-button-padding);
95
92
  background-color: var(--rt-table-base-cell-copy-button-background-color);
93
+ visibility: hidden;
96
94
 
97
95
  &--position {
98
96
  &--left {
99
97
  left: var(--rt-table-base-cell-copy-button-position-left);
100
98
  }
99
+
101
100
  &--right {
102
101
  right: var(--rt-table-base-cell-copy-button-position-right);
103
102
  }
@@ -1,4 +1,4 @@
1
1
  :host {
2
- height: 100%;
3
2
  width: 100%;
3
+ height: 100%;
4
4
  }
@@ -6,13 +6,13 @@ $table-container: (
6
6
  margin: 0 0.65rem,
7
7
  ),
8
8
  selector-label: (
9
- color: var(--clr-black-60),
9
+ color: var(--rt-text-base-secondary),
10
10
  ),
11
11
  selector-label-hover: (
12
- color: var(--clr-black-100),
12
+ color: var(--rt-text-base-strong),
13
13
  ),
14
14
  selector-counter: (
15
- color: var(--clr-black-60),
15
+ color: var(--rt-text-base-secondary),
16
16
  font-size: 0.875rem,
17
17
  ),
18
18
  toolbar-mobile: (
@@ -26,7 +26,7 @@ $table-container: (
26
26
  ),
27
27
  toolbar-actions-divider: (
28
28
  height: 2rem,
29
- border-left: 1px solid var(--clr-gray-20),
29
+ border-left: 1px solid var(--rt-border-neutral-divider),
30
30
  ),
31
31
  toolbar-search: (
32
32
  width: 22rem,
@@ -44,24 +44,26 @@ $table-container: (
44
44
  );
45
45
 
46
46
  :host {
47
- width: 100%;
48
47
  position: relative;
49
48
  display: flex;
50
49
  overflow: hidden;
50
+ width: 100%;
51
51
 
52
52
  // initial table container scrollbar styles
53
53
  ::-webkit-scrollbar-track:hover {
54
- border: 1px solid var(--clr-gray-10);
54
+ border: 1px solid var(--rt-border-neutral-subtle);
55
55
  }
56
+
56
57
  ::-webkit-scrollbar-thumb {
57
- background: var(--clr-gray-20);
58
58
  border: 3px solid transparent;
59
- border-radius: 6px;
59
+ border-radius: var(--rt-radius-sm);
60
+ background: var(--rt-scrollbar-thumb);
60
61
  background-clip: content-box;
61
62
  }
63
+
62
64
  ::-webkit-scrollbar-thumb:hover {
63
- background: var(--clr-black-40);
64
65
  border: 2px solid transparent;
66
+ background: var(--rt-scrollbar-thumb-hover);
65
67
  background-clip: content-box;
66
68
  }
67
69
 
@@ -94,10 +96,10 @@ $table-container: (
94
96
  .table-container {
95
97
  &__selectors {
96
98
  display: flex;
97
- justify-content: flex-start;
98
- align-items: center;
99
- flex-grow: 1;
100
99
  width: 100%;
100
+ flex-grow: 1;
101
+ align-items: center;
102
+ justify-content: flex-start;
101
103
  margin: var(--rt-table-container-selectors-margin);
102
104
  gap: var(--rt-table-container-toolbar-actions-gap);
103
105
 
@@ -110,16 +112,16 @@ $table-container: (
110
112
  }
111
113
 
112
114
  &-counter {
113
- font-size: var(--rt-table-container-selector-counter-font-size);
114
115
  color: var(--rt-table-container-selector-counter-color);
116
+ font-size: var(--rt-table-container-selector-counter-font-size);
115
117
  }
116
118
  }
117
119
 
118
120
  &__toolbar {
119
- width: 100%;
120
121
  display: flex;
121
- justify-content: flex-end;
122
+ width: 100%;
122
123
  align-items: center;
124
+ justify-content: flex-end;
123
125
 
124
126
  &-actions {
125
127
  display: flex;
@@ -143,9 +145,9 @@ $table-container: (
143
145
  }
144
146
 
145
147
  &__content {
148
+ overflow: auto;
146
149
  width: 100%;
147
150
  flex-grow: 1;
148
- overflow: auto;
149
151
  padding: var(--rt-table-container-content-padding);
150
152
 
151
153
  &::-webkit-scrollbar {
@@ -155,12 +157,12 @@ $table-container: (
155
157
  }
156
158
 
157
159
  &__placeholder {
160
+ display: flex;
158
161
  width: var(--rt-table-container-placeholder-width);
159
162
  height: var(--rt-table-container-placeholder-height);
160
- display: flex;
161
163
  flex-direction: column;
162
- justify-content: center;
163
164
  align-items: center;
165
+ justify-content: center;
164
166
  gap: var(--rt-table-container-placeholder-gap);
165
167
 
166
168
  &-icon {
@@ -203,8 +205,8 @@ $table-container: (
203
205
 
204
206
  &-search {
205
207
  width: 100%;
206
- grid-row: 1;
207
208
  justify-content: center;
209
+ grid-row: 1;
208
210
  }
209
211
  }
210
212
  }
@@ -12,17 +12,17 @@ $header-cell: (
12
12
  ),
13
13
  icon: (
14
14
  margin: 0 0 0 1rem,
15
- color: var(--clr-black-40),
15
+ color: var(--rt-text-base-disabled),
16
16
  ),
17
17
  icon-active: (
18
- color: var(--clr-black-100),
18
+ color: var(--rt-text-base-strong),
19
19
  ),
20
20
  );
21
21
 
22
22
  :host {
23
23
  display: flex;
24
- justify-content: space-between;
25
24
  align-items: center;
25
+ justify-content: space-between;
26
26
  cursor: pointer;
27
27
 
28
28
  @each $element, $elements in $header-cell {
@@ -38,8 +38,8 @@ $header-cell: (
38
38
  }
39
39
 
40
40
  .header-cell-label {
41
- flex-grow: 1;
42
41
  display: flex;
42
+ flex-grow: 1;
43
43
  align-items: center;
44
44
  gap: var(--rt-table-header-cell-label-gap);
45
45
 
@@ -64,9 +64,9 @@ $header-cell: (
64
64
  }
65
65
 
66
66
  &__text {
67
- white-space: nowrap;
68
67
  overflow: hidden;
69
68
  text-overflow: ellipsis;
69
+ white-space: nowrap;
70
70
  }
71
71
 
72
72
  &__suffix {
@@ -85,10 +85,9 @@ $header-cell: (
85
85
  .header-cell-icons {
86
86
  display: flex;
87
87
  flex-direction: column;
88
- justify-content: center;
89
88
  align-items: center;
89
+ justify-content: center;
90
90
  margin: var(--rt-table-header-cell-icon-margin);
91
-
92
91
  visibility: hidden;
93
92
 
94
93
  &--active {
@@ -98,12 +97,12 @@ $header-cell: (
98
97
  &__icon {
99
98
  width: 0;
100
99
  height: 0;
101
- border-left: 3px solid transparent;
102
100
  border-right: 3px solid transparent;
103
101
  border-bottom: 5.2px solid var(--rt-table-header-cell-icon-color);
102
+ border-left: 3px solid transparent;
104
103
 
105
104
  &--second {
106
- margin-top: 2px;
105
+ margin-top: var(--rt-spacing-2);
107
106
  transform: scaleY(-1);
108
107
  }
109
108
 
@@ -1,9 +1,9 @@
1
1
  :host {
2
- width: 100%;
3
2
  display: flex;
4
- justify-content: flex-start;
3
+ width: 100%;
5
4
  align-items: center;
6
- gap: 0.5rem;
5
+ justify-content: flex-start;
6
+ gap: var(--rt-spacing-8);
7
7
 
8
8
  .table-header-cell-filter-input {
9
9
  width: 100%;
@@ -1,6 +1,6 @@
1
1
  :host {
2
- width: 100%;
3
- height: 100%;
4
2
  display: flex;
5
3
  overflow: hidden;
4
+ width: 100%;
5
+ height: 100%;
6
6
  }
@@ -1,7 +1,7 @@
1
1
  :host {
2
+ display: flex;
2
3
  width: 100vw;
3
4
  height: 100vh;
4
- display: flex;
5
5
  flex-direction: column;
6
6
  margin: -1rem;
7
7
 
@@ -1,16 +1,16 @@
1
1
  :host {
2
+ position: relative;
3
+ display: flex;
4
+ overflow: hidden;
2
5
  width: 100vw;
3
6
  height: 100vh;
4
- display: flex;
5
7
  flex-direction: column;
6
8
  margin: -1rem;
7
- position: relative;
8
- overflow: hidden;
9
9
 
10
10
  .pagination {
11
- width: 100%;
12
11
  position: absolute;
13
12
  top: 0;
14
13
  left: 0;
14
+ width: 100%;
15
15
  }
16
16
  }
@@ -1,7 +1,7 @@
1
1
  :host {
2
+ display: flex;
2
3
  width: 100vw;
3
4
  height: 100vh;
4
- display: flex;
5
5
  flex-direction: column;
6
6
  margin: -1rem;
7
7
  }
@@ -12,31 +12,31 @@ $toggle: (
12
12
  ),
13
13
  toggle: (
14
14
  border-radius: 6.25rem,
15
- background-color: var(--clr-gray-5),
16
- box-shadow: inset 0 0 0.125rem 0.0625rem rgba(0, 0, 0, 0.05),
15
+ background-color: var(--rt-bg-base-subtle),
16
+ box-shadow: inset 0 0 0.125rem 0.0625rem rgb(0 0 0 / 5%),
17
17
  ),
18
18
  toggle-check: (
19
- box-shadow: inset 0 0 0 1.25rem var(--clr-black-80),
19
+ box-shadow: inset 0 0 0 1.25rem var(--rt-control-checked),
20
20
  ),
21
21
  toggle-switch: (
22
22
  border-radius: 2.25rem,
23
- background-color: var(--clr-white-100),
24
- box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.2),
23
+ background-color: var(--rt-control-thumb),
24
+ box-shadow: 0 0.0625rem 0.125rem rgb(0 0 0 / 20%),
25
25
  ),
26
26
  toggle-track: (
27
- background-color: var(--clr-gray-10),
27
+ background-color: var(--rt-control-track),
28
28
  border-radius: 2.5rem,
29
- border: 0.0625rem solid var(--clr-gray-15),
29
+ border: 0.0625rem solid var(--rt-border-neutral-medium),
30
30
  ),
31
31
  label: (
32
- color: var(--clr-black-60),
32
+ color: var(--rt-text-base-secondary),
33
33
  font-size: 0.875rem,
34
34
  ),
35
35
  label-active: (
36
- color: var(--clr-black-100),
36
+ color: var(--rt-text-base-strong),
37
37
  ),
38
38
  label-hover: (
39
- color: var(--clr-black-100),
39
+ color: var(--rt-text-base-strong),
40
40
  cursor: pointer,
41
41
  ),
42
42
  );
@@ -79,12 +79,12 @@ $toggle: (
79
79
 
80
80
  .rtui-toggle {
81
81
  position: relative;
82
+ overflow: hidden;
82
83
  width: 3.125rem;
83
84
  min-width: 3.125rem;
84
85
  height: 1.875rem;
85
86
  border-radius: var(--rt-toggle-toggle-border-radius);
86
87
  background-color: var(--rt-toggle-toggle-background-color);
87
- overflow: hidden;
88
88
  box-shadow: var(--rt-toggle-toggle-box-shadow);
89
89
  cursor: pointer;
90
90
 
@@ -103,36 +103,30 @@ $toggle: (
103
103
  right: 0.125rem;
104
104
  left: 1.375rem;
105
105
  transition: 0.35s cubic-bezier(0.785, 0.135, 0.15, 0.86);
106
- transition-property: left, right;
107
106
  transition-delay: 0.05s, 0s;
107
+ transition-property: left, right;
108
108
  }
109
109
  }
110
110
 
111
111
  &__switch {
112
112
  position: absolute;
113
- left: 0.125rem;
114
- top: 0.125rem;
115
- bottom: 0.125rem;
116
- right: 1.375rem;
117
- background-color: var(--rt-toggle-toggle-switch-background-color);
118
- border-radius: var(--rt-toggle-toggle-switch-border-radius);
119
113
  z-index: 1;
114
+ border-radius: var(--rt-toggle-toggle-switch-border-radius);
115
+ background-color: var(--rt-toggle-toggle-switch-background-color);
116
+ box-shadow: var(--rt-toggle-toggle-switch-box-shadow);
117
+ inset: 0.125rem 1.375rem 0.125rem 0.125rem;
120
118
  transition: 0.35s cubic-bezier(0.785, 0.135, 0.15, 0.86);
121
- transition-property: left, right;
122
119
  transition-delay: 0s, 0.05s;
123
- box-shadow: var(--rt-toggle-toggle-switch-box-shadow);
120
+ transition-property: left, right;
124
121
  }
125
122
 
126
123
  &__track {
127
124
  position: absolute;
128
- left: 0;
129
- top: 0;
130
- right: 0;
131
- bottom: 0;
132
- transition: 0.35s cubic-bezier(0.785, 0.135, 0.15, 0.86);
133
- background-color: var(--rt-toggle-toggle-track-background-color);
134
- border-radius: var(--rt-toggle-toggle-track-border-radius);
135
125
  border: var(--rt-toggle-toggle-track-border);
126
+ border-radius: var(--rt-toggle-toggle-track-border-radius);
127
+ background-color: var(--rt-toggle-toggle-track-background-color);
128
+ inset: 0;
129
+ transition: 0.35s cubic-bezier(0.785, 0.135, 0.15, 0.86);
136
130
  }
137
131
 
138
132
  // modify
@@ -148,8 +142,8 @@ $toggle: (
148
142
  }
149
143
 
150
144
  .rtui-toggle__check:checked ~ .rtui-toggle__switch {
151
- left: 1.625rem;
152
145
  right: 0.125rem;
146
+ left: 1.625rem;
153
147
  }
154
148
  }
155
149
 
@@ -165,8 +159,8 @@ $toggle: (
165
159
  }
166
160
 
167
161
  .rtui-toggle__check:checked ~ .rtui-toggle__switch {
168
- left: 0.75rem;
169
162
  right: 0.125rem;
163
+ left: 0.75rem;
170
164
  }
171
165
  }
172
166
  }
@@ -1,9 +1,9 @@
1
1
  :host {
2
+ display: flex;
2
3
  width: 100vw;
3
4
  height: 100vh;
4
- display: flex;
5
5
  flex-direction: column;
6
- justify-content: center;
7
6
  align-items: center;
7
+ justify-content: center;
8
8
  margin: -1rem;
9
9
  }
@@ -13,7 +13,7 @@ $toolbar: (
13
13
  bars: (
14
14
  border-bottom-style: solid,
15
15
  border-bottom-width: 1px,
16
- border-bottom-color: var(--clr-black-20),
16
+ border-bottom-color: var(--rt-border-neutral-default),
17
17
  ),
18
18
  bars-left: (
19
19
  width: fit-content,
@@ -40,9 +40,8 @@ $toolbar: (
40
40
  --mat-toolbar-standard-height: var(--rt-toolbar-body-mobile-height);
41
41
  --mdc-secondary-navigation-tab-container-height: var(--rt-toolbar-body-mobile-height);
42
42
 
43
- min-height: var(--rt-toolbar-body-mobile-height);
44
43
  height: var(--rt-toolbar-body-mobile-height);
45
-
44
+ min-height: var(--rt-toolbar-body-mobile-height);
46
45
  padding: var(--rt-toolbar-body-padding);
47
46
  background-color: transparent;
48
47
 
@@ -61,25 +60,21 @@ $toolbar: (
61
60
 
62
61
  .bars {
63
62
  position: relative;
64
-
65
63
  display: flex;
66
64
  width: 100%;
67
65
  height: 100%;
68
-
66
+ border-bottom: var(--rt-toolbar-bars-border-bottom-width) var(--rt-toolbar-bars-border-bottom-style)
67
+ var(--rt-toolbar-bars-border-bottom-color);
69
68
  background-color: var(--rt-toolbar-body-background-color);
70
69
 
71
- border-bottom-style: var(--rt-toolbar-bars-border-bottom-style);
72
- border-bottom-width: var(--rt-toolbar-bars-border-bottom-width);
73
- border-bottom-color: var(--rt-toolbar-bars-border-bottom-color);
74
-
75
70
  &__bar {
76
71
  &--left {
77
72
  width: var(--rt-toolbar-bars-left-width);
78
73
  }
79
74
 
80
75
  &--center {
81
- width: var(--rt-toolbar-bars-center-width);
82
76
  overflow: hidden;
77
+ width: var(--rt-toolbar-bars-center-width);
83
78
  }
84
79
 
85
80
  &--right {
@@ -89,8 +84,8 @@ $toolbar: (
89
84
  &--left,
90
85
  &--center,
91
86
  &--right {
92
- height: 100%;
93
87
  display: flex;
88
+ height: 100%;
94
89
  align-items: center;
95
90
  }
96
91
  }
@@ -0,0 +1,121 @@
1
+ # rt-tools CSS Design Tokens (v2)
2
+
3
+ GMT-style three-tier CSS custom property system. **Full documentation lives in
4
+ Storybook**: Foundation/Design Tokens/{Overview, Colors, Semantic, Spacing},
5
+ Foundation/Theming, How to use tokens (`projects/ui-kit/docs/*.mdx`).
6
+
7
+ ```
8
+ Tier 1 primitives --rt-color-* base/_tokens.scss
9
+ Tier 2 semantic --rt-{bg,text,icon,border}-* base/_tokens.scss (light-dark())
10
+ Tier 3 component --rt-<component>-<el>-<token> per-component SCSS maps
11
+ ```
12
+
13
+ Quick facts:
14
+
15
+ - Light default; `.rt-dark` global switch; `data-rt-theme` nested local contexts;
16
+ `.rt-theme-auto` follows the OS. Runtime: `RtThemeService` / `RtThemeDirective`.
17
+ - Angular Material hybrid: semantic tokens are `var(--mat-sys-*, light-dark(…))`
18
+ fallback chains. Opt out: `@use '...main' with ($tokens-use-material: false)`.
19
+ - Accent roles `{primary,success,warning,danger,info,neutral}`,
20
+ steps `{subtle,solid,hover,disabled}` (simplified vs GMT).
21
+ - Accent indirection: the accent semantic tier derives from `--rt-color-{role}-{0..100}`
22
+ ramps (`{primary,info,success,warning,danger,brand}`). Custom brand palettes
23
+ override only those rows — see **Custom color schemes** below.
24
+ - Foundations: `--rt-spacing-{0..64}` (px-named, rem values), `--rt-radius-*`,
25
+ `--rt-font-*`, `--rt-shadow-*`, `--rt-transition-*`, `--rt-z-index-*`.
26
+ - Prebuilt CSS for non-sass consumers: `dist/ui-kit/styles/tokens.css`
27
+ (`pnpm run build:tokens`).
28
+ - Figma parity: collections `core` (`rt/color/*`) and `theme` (`rt/{bg,text,icon,border}/*`,
29
+ Light/Dark modes) in the “RT-Tools UI Kit” file mirror these names 1:1.
30
+ - App-defined (never set by the kit): `--font-default`, mat theme colors.
31
+
32
+ ## Component theming API (Tier 3 contract)
33
+
34
+ Tier-3 vars are split into a **public theming API** and **internal implementation details**.
35
+ Only the public set is a compatibility promise; internal vars may be renamed or stop being
36
+ emitted in the next major release.
37
+
38
+ **Public** (override these from your app):
39
+
40
+ 1. Every var matching `--rt-<component>-*-{color,background-color,bg,shadow,indicator}` —
41
+ the color surface of each component.
42
+ 2. Documented size hooks proven by consumers:
43
+ `--rt-table-row-height`, `--rt-toolbar-body-height`, `--rt-toolbar-body-mobile-height`,
44
+ `--rt-aside-error-box-height`, `--rt-aside-host-width`,
45
+ `--rt-image-upload-host-min-height`, `--rt-image-upload-image-container-image-max-height`.
46
+
47
+ **Internal** (everything else): layout paddings/margins/gaps/font-sizes generated from SCSS maps.
48
+ They currently _are_ emitted (≈380 vars total, ~14% actually themed by consumers) — in the next
49
+ major the internal set stops being emitted and gets inlined into rules.
50
+
51
+ ### `:root` vs `:host` emission — override semantics
52
+
53
+ - Vars emitted at **`:root`** (global stylesheets + `ViewEncapsulation.None` components like
54
+ aside-panel) are overridable from any ancestor scope: `.dark-mode { --rt-aside-host-background-color: …; }`.
55
+ - Vars emitted at **`:host`** are set on the element itself and **win over inherited values** —
56
+ consumers must target the element (`rtui-toolbar { --rt-toolbar-body-height: … !important; }`).
57
+ This asymmetry is why some consumers need `!important` for toolbar/toggle but not for aside/table.
58
+ - Planned unification (major): emit defaults via `var(--override, default)` indirection so all
59
+ components are ancestor-overridable without `!important`.
60
+
61
+ ## Buttons: legacy vs rtui
62
+
63
+ `.c-button` (\_button.scss) is **deprecated**; `.rtui-btn` (\_rtui_button.scss) is the system.
64
+ Both stay until the next major because consumers apply `.c-button` classes and override
65
+ `--rt-button-*` directly. Migration map:
66
+
67
+ | legacy `.c-button` | `.rtui-btn` |
68
+ | ------------------------- | --------------------------------------------------------------------- |
69
+ | `--fill-green` / `-light` | `rtui-btn-success` / `-light` |
70
+ | `--fill-red` / `-light` | `rtui-btn-error` / `-light` |
71
+ | `--fill-blue` | `rtui-btn-accent-light` |
72
+ | `--fill-base/black/gray` | `rtui-btn-secondary` (+`-light`) |
73
+ | `--outline-{blue,base}` | `rtui-btn-{accent,secondary}-outline` |
74
+ | `--txt-*`, `--fab` | no equivalent yet — needs a text/icon appearance in `.rtui-btn` first |
75
+ | `--size-{sm,md,l}` | `rtui-btn-{sm,md,lg}` (+`-full`) |
76
+
77
+ ## Material bridge
78
+
79
+ All **global** Material/CDK overrides live in `styles/components/_material-bridge.scss`
80
+ (single file to review on a Material upgrade). Component-scoped piercings stay with their
81
+ component; the bridge header keeps the inventory of those locations.
82
+
83
+ ## Custom color schemes (brand palettes)
84
+
85
+ The accent semantic tier never hardcodes color — it derives from an indirection layer,
86
+ the **accent-role ramps** `--rt-color-{role}-{0..100}` for
87
+ `{primary, info, success, warning, danger, brand}`. A custom brand palette overrides
88
+ **only** those rows; the kit derives `--rt-{bg,text,icon,border}-accent-*`,
89
+ hover/subtle/disabled and `--rt-border-focus` from them. The block is scoped to
90
+ `[data-rt-scheme="<name>"]` on `<html>`, set raw → it wins over `--mat-sys-*`.
91
+
92
+ ```scss
93
+ @use '@rt-tools/ui-kit/src/styles/main' as rt;
94
+ @include rt.color-scheme(
95
+ 'teal',
96
+ (
97
+ primary: (
98
+ 20: #b3e3e1,
99
+ 40: #5cb8b5,
100
+ 60: #1a9d99,
101
+ 100: #008582,
102
+ ),
103
+ brand: (
104
+ 20: #e8e8e8,
105
+ 100: #008582,
106
+ ),
107
+ )
108
+ );
109
+ ```
110
+
111
+ ```typescript
112
+ // runtime twin (browser-only); prefer the Sass path for SSR/brand-critical schemes
113
+ theme.registerColorScheme('teal', { primary: { 100: '#008582' /* … */ } });
114
+ theme.setColorScheme('teal'); // data-rt-scheme="teal"; persisted to rt-color-scheme
115
+ theme.setColorScheme(null); // back to the default palette
116
+ ```
117
+
118
+ - Orthogonal to light/dark (one ramp per role serves both modes).
119
+ - Δ0: with no scheme the accent layer is byte-for-byte the historical palette
120
+ (regression-tested in `styles/color-scheme.spec.ts`); Sass↔JS generator parity is tested too.
121
+ - Full guide: Storybook **Foundation/Theming/Custom color schemes** (`docs/ColorSchemes.mdx`).
@@ -1,8 +1,6 @@
1
- @use './mixin' as mixins;
2
-
3
1
  $palette: (
4
2
  white: (
5
- 100: #ffffff,
3
+ 100: #fff,
6
4
  ),
7
5
  gray: (
8
6
  5: #f5f6f8,
@@ -12,7 +10,7 @@ $palette: (
12
10
  ),
13
11
  black: (
14
12
  10: #f3f3f3,
15
- 15: #eeeeee,
13
+ 15: #eee,
16
14
  20: #e0e0e0,
17
15
  30: #b2cbca,
18
16
  40: #a3a3a3,
@@ -55,17 +53,11 @@ $palette: (
55
53
  ),
56
54
  );
57
55
 
58
- :root {
59
- @each $family, $set in $palette {
60
- @each $saturate, $clr in $set {
61
- #{mixins.generateCssClrVar($family, $saturate)}: #{$clr};
62
- }
63
- }
64
-
65
- --clr-base-accent: #0d1c2b;
66
- --clr-txt: rgba(0, 0, 0, 0.87);
67
- --clr-white-rgb: 255, 255, 255;
56
+ // NOTE: the $palette map above is kept for backwards compatibility (consumers may @use it).
57
+ // All CSS custom property emission lives in base/_tokens.scss:
58
+ // --rt-color-* primitives, --rt-{bg,text,icon,border}-* semantic, and foundations.
68
59
 
60
+ :root {
69
61
  // Buttons
70
- --rt-button-box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.2), 0 6px 10px 0 rgba(0, 0, 0, 0.12), 0 1px 18px 0 rgba(0, 0, 0, 0.14);
62
+ --rt-button-box-shadow: 0 3px 5px -1px rgb(0 0 0 / 20%), 0 6px 10px 0 rgb(0 0 0 / 12%), 0 1px 18px 0 rgb(0 0 0 / 14%);
71
63
  }