@oruga-ui/theme-oruga 0.7.1 → 0.8.1

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 (48) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +5 -5
  3. package/dist/scss/components/_autocomplete.scss +3 -12
  4. package/dist/scss/components/_breadcrumb.scss +122 -103
  5. package/dist/scss/components/_button.scss +228 -173
  6. package/dist/scss/components/_carousel.scss +164 -142
  7. package/dist/scss/components/_checkbox.scss +118 -118
  8. package/dist/scss/components/_collapse.scss +1 -1
  9. package/dist/scss/components/_datepicker.scss +228 -290
  10. package/dist/scss/components/_datetimepicker.scss +8 -2
  11. package/dist/scss/components/_dialog.scss +243 -0
  12. package/dist/scss/components/_dropdown.scss +190 -164
  13. package/dist/scss/components/_field.scss +68 -39
  14. package/dist/scss/components/_icon.scss +24 -29
  15. package/dist/scss/components/_input.scss +112 -97
  16. package/dist/scss/components/_listbox.scss +176 -0
  17. package/dist/scss/components/_loading.scss +35 -15
  18. package/dist/scss/components/_menu.scss +113 -109
  19. package/dist/scss/components/_modal.scss +112 -50
  20. package/dist/scss/components/_notification.scss +113 -97
  21. package/dist/scss/components/_pagination.scss +173 -106
  22. package/dist/scss/components/_radio.scss +91 -84
  23. package/dist/scss/components/_select.scss +108 -115
  24. package/dist/scss/components/_sidebar.scss +102 -101
  25. package/dist/scss/components/_skeleton.scss +50 -39
  26. package/dist/scss/components/_slider.scss +221 -159
  27. package/dist/scss/components/_steps.scss +223 -261
  28. package/dist/scss/components/_switch.scss +126 -90
  29. package/dist/scss/components/_table.scss +307 -251
  30. package/dist/scss/components/_tabs.scss +360 -247
  31. package/dist/scss/components/_tag.scss +95 -39
  32. package/dist/scss/components/_taginput.scss +48 -36
  33. package/dist/scss/components/_timepicker.scss +61 -62
  34. package/dist/scss/components/_tooltip.scss +129 -254
  35. package/dist/scss/components/_upload.scss +83 -35
  36. package/dist/scss/theme-build.scss +9 -0
  37. package/dist/scss/theme.scss +44 -0
  38. package/dist/scss/utils/_animations.scss +30 -9
  39. package/dist/scss/utils/_base.scss +6 -4
  40. package/dist/scss/utils/_helpers.scss +84 -22
  41. package/dist/scss/utils/_root.scss +82 -29
  42. package/dist/scss/utils/_variables.scss +64 -42
  43. package/dist/theme.css +2 -0
  44. package/dist/theme.js +1 -1
  45. package/package.json +27 -20
  46. package/dist/oruga.css +0 -2
  47. package/dist/scss/oruga-build.scss +0 -9
  48. package/dist/scss/oruga.scss +0 -42
@@ -1,97 +1,265 @@
1
1
  @use "sass:list";
2
+ @use "../utils/helpers" as h;
3
+ @use "../utils/variables" as vars;
2
4
 
3
5
  /* @docs */
4
- $table-background-color: #fff !default;
5
- $table-background: $control-brackground-color !default;
6
- $table-boder: 1px solid transparent !default;
7
- $table-border-radius: var(--#{$prefix}base-border-radius) !default;
6
+ $table-color: h.useVar("font-color") !default;
7
+ $table-border-width: h.useVar("control-border-width") !default;
8
+ $table-border-style: solid !default;
9
+ $table-border-color: transparent !default;
10
+ $table-border-radius: h.useVar("border-radius") !default;
11
+ $table-background-color: h.useVar("control-brackground-color") !default;
12
+
13
+ $table-focus-border-color: h.useVar("primary") !default;
14
+ $table-focus-box-shadow: vars.$control-focus-box-shadow h.useVar("focus") !default;
15
+
16
+ $table-sticky-zindex: 1 !default;
17
+ $table-sticky-header-height: 300px !default;
18
+
19
+ $table-tr-hover-background-color: h.useVar("grey-lightest") !default;
20
+ $table-tr-narrow-padding: calc(0.5 * h.useVar("control-spacer"))
21
+ h.useVar("control-spacer") !default;
22
+ $table-tr-striped-background-color: h.useVar("grey-lightest") !default;
23
+
24
+ $table-tr-selected-background-color: h.useVar("primary") !default;
25
+ $table-tr-selected-color: h.useVar("primary-invert") !default;
26
+
27
+ $table-th-color: h.useVar("font-color") !default;
28
+ $table-th-font-size: h.useVar("font-size") !default;
29
+ $table-th-font-weight: 600 !default;
30
+ $table-th-line-height: h.useVar("line-height") !default;
31
+ $table-th-border-width: calc(2 * h.useVar("control-border-width")) !default;
32
+ $table-th-border-style: solid !default;
33
+ $table-th-border-color: h.useVar("control-border-color") !default;
34
+ $table-th-checkbox-width: 40px !default;
35
+ $table-th-padding: h.useVar("control-spacer")
36
+ calc(1.5 * h.useVar("control-spacer")) !default;
37
+
38
+ $table-th-current-sort-border-color: h.useVar("grey") !default;
39
+ $table-th-current-sort-font-weight: 700 !default;
40
+ $table-th-current-sort-hover-border-color: h.useVar("grey") !default;
41
+
42
+ $table-td-border-width: h.useVar("control-border-width") !default;
43
+ $table-td-border-style: solid !default;
44
+ $table-td-border-color: h.useVar("control-border-color") !default;
45
+ $table-td-padding: h.useVar("control-spacer")
46
+ calc(1.5 * h.useVar("control-spacer")) !default;
47
+
48
+ $table-tr-detail-background-color: h.useVar("grey-lightest") !default;
49
+ $table-tr-detail-box-shadow: h.useVar("control-box-shadow") !default;
50
+ $table-tr-detail-padding: calc(2 * h.useVar("control-spacer")) !default;
51
+ $table-td-detail-chevron-color: h.useVar("primary") !default;
52
+ $table-td-detail-chevron-width: 40px !default;
53
+
54
+ $table-tr-empty-padding: h.useVar("control-spacer")
55
+ calc(1.5 * h.useVar("control-spacer")) !default;
56
+
57
+ $table-pagination-padding: h.useVar("control-spacer") 0 !default;
58
+
8
59
  $table-card-box-shadow:
9
- 0 2px 3px rgba(var(--#{$prefix}black), 0.1),
10
- 0 0 0 1px rgba(var(--#{$prefix}black), 0.1) !default;
60
+ 0 2px 3px h.useVar("control-shadow-color"),
61
+ 0 0 0 1px h.useVar("control-shadow-color") !default;
11
62
  $table-card-cell-font-weight: 600 !default;
12
63
  $table-card-cell-padding: 0 0.5em 0 0 !default;
13
64
  $table-card-cell-text-align: left !default;
14
65
  $table-card-detail-margin: -1rem 0 0 0;
15
66
  $table-card-margin: 0 0 1rem 0;
16
- $table-color: black !default;
17
- $table-current-sort-border-color: var(--#{$prefix}grey) !default;
18
- $table-current-sort-font-weight: 700 !default;
19
- $table-current-sort-hover-border-color: var(--#{$prefix}grey) !default;
20
- $table-detail-background: #fafafa !default;
21
- $table-detail-box-shadow: inset 0 1px 3px var(--#{$prefix}grey) !default;
22
- $table-detail-chevron-color: var(--#{$prefix}primary) !default;
23
- $table-detail-chevron-width: 40px !default;
24
- $table-detail-padding: 1rem !default;
25
- $table-focus-border-color: var(--#{$prefix}primary) !default;
26
- $table-focus-box-shadow: 0 0 0 0.125em rgba(var(--#{$prefix}primary), 0.25) !default;
27
- $table-hoverable-background-color: #fafafa !default;
28
- $table-narrow-padding: 0.25em 0.5em !default;
29
- $table-row-active-background-color: var(--#{$prefix}primary) !default;
30
- $table-row-active-color: var(--#{$prefix}primary-invert) !default;
31
- $table-sticky-header-height: 300px !default;
32
- $table-sticky-zindex: 1 !default;
33
- $table-striped-background-color: #fafafa !default;
34
- $table-td-border: 1px solid var(--#{$prefix}grey-lighter) !default;
35
- $table-td-padding: 0.5em 0.75em !default;
36
- $table-th-border: 2px solid var(--#{$prefix}grey-lighter) !default;
37
- $table-th-checkbox-width: 40px !default;
38
- $table-th-color: #363636 !default;
39
- $table-th-detail-width: 14px !default;
40
- $table-th-font-weight: 600 !default;
41
- $table-th-padding: 0.5em 0.75em !default;
42
- $table-pagination-padding: 0.5em 0 !default;
43
67
  /* @docs */
44
68
 
45
69
  .o-table {
70
+ &__root {
71
+ @include h.defineVar("table-color", $table-color);
72
+
73
+ @include h.defineVar("table-border-color", $table-border-color);
74
+ @include h.defineVar("table-border-style", $table-border-style);
75
+ @include h.defineVar("table-border-width", $table-border-width);
76
+ @include h.defineVar("table-border-radius", $table-border-radius);
77
+ @include h.defineVar("table-background-color", $table-background-color);
78
+
79
+ @include h.defineVar("table-sticky-zindex", $table-sticky-zindex);
80
+ @include h.defineVar(
81
+ "table-sticky-header-height",
82
+ $table-sticky-header-height
83
+ );
84
+ @include h.defineVar(
85
+ "table-focus-border-color",
86
+ $table-focus-border-color
87
+ );
88
+ @include h.defineVar("table-focus-box-shadow", $table-focus-box-shadow);
89
+
90
+ @include h.defineVar(
91
+ "table-tr-hover-background-color",
92
+ $table-tr-hover-background-color
93
+ );
94
+ @include h.defineVar(
95
+ "table-tr-narrow-padding",
96
+ $table-tr-narrow-padding
97
+ );
98
+ @include h.defineVar(
99
+ "table-tr-striped-background-color",
100
+ $table-tr-striped-background-color
101
+ );
102
+
103
+ @include h.defineVar(
104
+ "table-tr-selected-background-color",
105
+ $table-tr-selected-background-color
106
+ );
107
+ @include h.defineVar(
108
+ "table-tr-selected-color",
109
+ $table-tr-selected-color
110
+ );
111
+
112
+ @include h.defineVar("table-th-color", $table-th-color);
113
+ @include h.defineVar("table-th-font-size", $table-th-font-size);
114
+ @include h.defineVar("table-th-font-weight", $table-th-font-weight);
115
+ @include h.defineVar("table-th-line-height", $table-th-line-height);
116
+ @include h.defineVar("table-th-border-width", $table-th-border-width);
117
+ @include h.defineVar("table-th-border-style", $table-th-border-style);
118
+ @include h.defineVar("table-th-border-color", $table-th-border-color);
119
+ @include h.defineVar(
120
+ "table-th-checkbox-width",
121
+ $table-th-checkbox-width
122
+ );
123
+ @include h.defineVar("table-th-padding", $table-th-padding);
124
+
125
+ @include h.defineVar(
126
+ "table-th-current-sort-border-color",
127
+ $table-th-current-sort-border-color
128
+ );
129
+ @include h.defineVar(
130
+ "table-th-current-sort-font-weight",
131
+ $table-th-current-sort-font-weight
132
+ );
133
+ @include h.defineVar(
134
+ "table-th-current-sort-hover-border-color",
135
+ $table-th-current-sort-hover-border-color
136
+ );
137
+
138
+ @include h.defineVar("table-td-border-width", $table-td-border-width);
139
+ @include h.defineVar("table-td-border-style", $table-td-border-style);
140
+ @include h.defineVar("table-td-border-color", $table-td-border-color);
141
+ @include h.defineVar("table-td-padding", $table-td-padding);
142
+
143
+ @include h.defineVar(
144
+ "table-tr-detail-background-color",
145
+ $table-tr-detail-background-color
146
+ );
147
+ @include h.defineVar(
148
+ "table-tr-detail-box-shadow",
149
+ $table-tr-detail-box-shadow
150
+ );
151
+ @include h.defineVar(
152
+ "table-tr-detail-padding",
153
+ $table-tr-detail-padding
154
+ );
155
+ @include h.defineVar(
156
+ "table-td-detail-chevron-color",
157
+ $table-td-detail-chevron-color
158
+ );
159
+ @include h.defineVar(
160
+ "table-td-detail-chevron-width",
161
+ $table-td-detail-chevron-width
162
+ );
163
+
164
+ @include h.defineVar("table-tr-empty-padding", $table-tr-empty-padding);
165
+
166
+ @include h.defineVar(
167
+ "table-pagination-padding",
168
+ $table-pagination-padding
169
+ );
170
+
171
+ &--mobile {
172
+ @include h.defineVar(
173
+ "table-card-box-shadow",
174
+ $table-card-box-shadow
175
+ );
176
+ @include h.defineVar(
177
+ "table-card-cell-font-weight",
178
+ $table-card-cell-font-weight
179
+ );
180
+ @include h.defineVar(
181
+ "table-card-cell-padding",
182
+ $table-card-cell-padding
183
+ );
184
+ @include h.defineVar(
185
+ "table-card-cell-text-align",
186
+ $table-card-cell-text-align
187
+ );
188
+ @include h.defineVar(
189
+ "table-card-detail-margin",
190
+ $table-card-detail-margin
191
+ );
192
+ @include h.defineVar("table-card-margin", $table-card-margin);
193
+ }
194
+
195
+ position: relative;
196
+ }
197
+
46
198
  display: table;
47
199
  width: 100%;
48
200
  border-collapse: separate;
49
201
  border-spacing: 0;
50
- border: var(--#{$prefix}table-boder, $table-boder);
51
- border-radius: var(--#{$prefix}table-border-radius, $table-border-radius);
52
- background-color: var(
53
- --#{$prefix}table-background-color,
54
- $table-background-color
55
- );
56
- color: var(--#{$prefix}table-color, $table-color);
57
202
 
58
- &__root {
59
- position: relative;
203
+ color: h.useVar("table-color");
204
+
205
+ border-width: h.useVar("table-border-width");
206
+ border-style: h.useVar("table-border-style");
207
+ border-color: h.useVar("table-border-color");
208
+ border-radius: h.useVar("table-border-radius");
209
+ background-color: h.useVar("table-background-color");
210
+
211
+ &:focus {
212
+ border-color: h.useVar("table-focus-border-color");
213
+ box-shadow: h.useVar("table-focus-box-shadow");
214
+ }
215
+
216
+ &--bordered {
217
+ td,
218
+ th {
219
+ border-width: h.useVar("table-td-border-width");
220
+ border-style: h.useVar("table-td-border-style");
221
+ border-color: h.useVar("table-td-border-color");
222
+ }
223
+ }
224
+
225
+ &--striped {
226
+ tr:nth-child(2n) {
227
+ background-color: h.useVar("table-tr-striped-background-color");
228
+ }
229
+ }
230
+
231
+ &--narrowed {
232
+ td,
233
+ th {
234
+ padding: h.useVar("table-tr-narrow-padding");
235
+ }
236
+ }
237
+
238
+ &--hoverable {
239
+ tr:not(.o-table__tr--selected):hover {
240
+ background-color: h.useVar("table-tr-hover-background-color");
241
+ }
242
+ }
243
+
244
+ &__mobile-sort {
245
+ display: none;
60
246
  }
61
247
 
62
248
  &__wrapper {
63
- transition: opacity $animation-speed-fast $animation-timing;
249
+ transition: opacity h.useVar("animation-speed")
250
+ h.useVar("animation-timing");
64
251
  position: relative;
65
252
 
66
253
  &--sticky-header {
67
- height: var(
68
- --#{$prefix}table-sticky-header-height,
69
- $table-sticky-header-height
70
- );
254
+ height: h.useVar("table-sticky-header-height");
71
255
  overflow-y: auto;
72
256
 
73
- .o-table__th {
257
+ .o-table__th:not(.o-table__th--sticky) {
74
258
  position: -webkit-sticky;
75
259
  position: sticky;
76
260
  top: 0;
77
- background: var(
78
- --#{$prefix}table-background-color,
79
- $table-background-color
80
- );
81
- z-index: calc(
82
- var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex) +
83
- 1
84
- );
85
-
86
- &--sticky {
87
- z-index: calc(
88
- var(
89
- --#{$prefix}table-sticky-zindex,
90
- $table-sticky-zindex
91
- ) +
92
- 2
93
- );
94
- }
261
+ background: h.useVar("table-background-color");
262
+ z-index: calc(h.useVar("table-sticky-zindex") + 1);
95
263
  }
96
264
  }
97
265
 
@@ -139,10 +307,7 @@ $table-pagination-padding: 0.5em 0 !default;
139
307
  }
140
308
 
141
309
  tr {
142
- box-shadow: var(
143
- --#{$prefix}table-card-box-shadow,
144
- $table-card-box-shadow
145
- );
310
+ box-shadow: h.useVar("table-card-box-shadow");
146
311
  max-width: 100%;
147
312
  position: relative;
148
313
  display: block;
@@ -157,27 +322,15 @@ $table-pagination-padding: 0.5em 0 !default;
157
322
  }
158
323
 
159
324
  &:not(:last-child) {
160
- margin: var(
161
- --#{$prefix}table-card-margin,
162
- $table-card-margin
163
- );
325
+ margin: h.useVar("table-card-margin");
164
326
  }
165
327
 
166
328
  &:not(.o-table__tr--selected) {
167
- background: inherit;
168
- background: $table-background-color;
169
-
170
- &:hover {
171
- background-color: inherit;
172
- background-color: $table-background-color;
173
- }
329
+ background: h.useVar("table-background-color");
174
330
  }
175
331
 
176
332
  &.o-table__tr-detail {
177
- margin: var(
178
- --#{$prefix}table-card-detail-margin,
179
- $table-card-detail-margin
180
- );
333
+ margin: h.useVar("table-card-detail-margin");
181
334
  }
182
335
  }
183
336
 
@@ -189,46 +342,69 @@ $table-pagination-padding: 0.5em 0 !default;
189
342
  width: auto;
190
343
  justify-content: space-between;
191
344
  text-align: right;
192
- border-bottom: var(
193
- --#{$prefix}table-background,
194
- ($table-background 1px solid)
195
- );
345
+ border-bottom-color: h.useVar("table-background");
196
346
 
197
347
  &:before {
198
348
  content: attr(data-label);
199
- font-weight: var(
200
- --#{$prefix}table-card-cell-font-weight,
201
- $table-card-cell-font-weight
202
- );
203
- padding-right: var(
204
- --#{$prefix}table-card-cell-padding,
205
- $table-card-cell-padding
206
- );
207
- text-align: var(
208
- --#{$prefix}table-card-cell-text-align,
209
- $table-card-cell-text-align
210
- );
349
+ font-weight: h.useVar("table-card-cell-font-weight");
350
+ padding-right: h.useVar("table-card-cell-padding");
351
+ text-align: h.useVar("table-card-cell-text-align");
211
352
  }
212
353
  }
213
354
  }
214
355
  }
215
356
  }
216
357
 
217
- &__mobile-sort {
218
- display: none;
358
+ &__tr {
359
+ &-empty > td {
360
+ text-align: center;
361
+ padding: h.useVar("table-tr-empty-padding");
362
+ }
363
+
364
+ &-detail {
365
+ box-shadow: h.useVar("table-tr-detail-box-shadow");
366
+ background-color: h.useVar("table-tr-detail-background");
367
+
368
+ & > td {
369
+ padding: h.useVar("table-tr-detail-padding");
370
+ }
371
+ }
372
+
373
+ &--selected {
374
+ background-color: h.useVar("table-tr-selected-background-color");
375
+ color: h.useVar("table-tr-selected-color");
376
+
377
+ // color variants
378
+ @each $name, $pair in vars.$colors {
379
+ &-#{$name} {
380
+ @include h.defineVar(
381
+ "table-tr-selected-background-color",
382
+ h.useVar($name)
383
+ );
384
+ @include h.defineVar(
385
+ "table-tr-selected-color",
386
+ h.useVar("#{$name}-invert")
387
+ );
388
+ }
389
+ }
390
+ }
219
391
  }
220
392
 
221
393
  &__th {
222
394
  vertical-align: top;
223
395
  text-align: left;
224
396
  position: relative;
225
- font-weight: var(
226
- --#{$prefix}table-th-font-weight,
227
- $table-th-font-weight
228
- );
229
- color: var(--#{$prefix}table-th-color, $table-th-color);
230
- border-bottom: var(--#{$prefix}table-th-border, $table-th-border);
231
- padding: var(--#{$prefix}table-th-padding, $table-th-padding);
397
+
398
+ color: h.useVar("table-th-color");
399
+ font-size: h.useVar("table-th-font-size");
400
+ font-weight: h.useVar("table-th-font-weight");
401
+ line-height: h.useVar("table-th-line-height");
402
+
403
+ border-bottom-width: h.useVar("table-th-border-width");
404
+ border-bottom-style: h.useVar("table-th-border-style");
405
+ border-bottom-color: h.useVar("table-th-border-color");
406
+
407
+ padding: h.useVar("table-th-padding");
232
408
 
233
409
  &--centered {
234
410
  text-align: center;
@@ -244,30 +420,22 @@ $table-pagination-padding: 0.5em 0 !default;
244
420
  }
245
421
 
246
422
  &-checkbox {
247
- width: var(
248
- --#{$prefix}table-th-checkbox-width,
249
- $table-th-checkbox-width
250
- );
423
+ width: h.useVar("table-th-checkbox-width");
251
424
  }
252
425
 
253
- &-current-sort {
254
- border-color: var(
255
- --#{$prefix}table-current-sort-border-color,
256
- $table-current-sort-border-color
257
- );
258
- font-weight: var(
259
- --#{$prefix}table-current-sort-font-weight,
260
- $table-current-sort-font-weight
261
- );
426
+ &-current-sort,
427
+ &--current-sort {
428
+ border-color: h.useVar("table-th-current-sort-border-color");
429
+ font-weight: h.useVar("table-th-current-sort-font-weight");
262
430
  }
263
431
 
264
432
  &--sortable {
265
- cursor: pointer;
433
+ // add clickable cursor
434
+ @include h.clickable;
266
435
 
267
436
  &:hover {
268
- border-color: var(
269
- --#{$prefix}table-current-sort-hover-border-color,
270
- $table-current-sort-hover-border-color
437
+ border-color: h.useVar(
438
+ "table-th-current-sort-hover-border-color"
271
439
  );
272
440
  }
273
441
  }
@@ -276,40 +444,29 @@ $table-pagination-padding: 0.5em 0 !default;
276
444
  position: -webkit-sticky;
277
445
  position: sticky;
278
446
  left: 0;
279
- z-index: var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex);
280
- background: var(
281
- --#{$prefix}table-background-color,
282
- $table-background-color
283
- );
284
- }
285
-
286
- &--unselectable {
287
- @include unselectable;
447
+ z-index: calc(h.useVar("table-sticky-zindex") + 1);
448
+ background-color: h.useVar("table-background-color");
288
449
  }
289
450
 
290
451
  &-detailed {
291
- width: var(
292
- --#{$prefix}table-th-detail-width,
293
- $table-th-detail-width
294
- );
452
+ width: h.useVar("table-th-detail-width");
295
453
  }
296
454
  }
297
455
 
298
456
  &__td {
299
457
  vertical-align: top;
300
458
  text-align: left;
301
- border-bottom: var(--#{$prefix}table-td-border, $table-td-border);
302
- padding: var(--#{$prefix}table-td-padding, $table-td-padding);
459
+ border-bottom-width: h.useVar("table-td-border-width");
460
+ border-bottom-style: h.useVar("table-td-border-style");
461
+ border-bottom-color: h.useVar("table-td-border-color");
462
+ padding: h.useVar("table-td-padding");
303
463
 
304
464
  &--sticky {
305
465
  position: -webkit-sticky;
306
466
  position: sticky;
307
467
  left: 0;
308
- z-index: var(--#{$prefix}table-sticky-zindex, $table-sticky-zindex);
309
- background: var(
310
- --#{$prefix}table-background-color,
311
- $table-background-color
312
- );
468
+ z-index: h.useVar("table-sticky-zindex");
469
+ background-color: h.useVar("table-background-color");
313
470
  }
314
471
 
315
472
  &--right {
@@ -322,106 +479,8 @@ $table-pagination-padding: 0.5em 0 !default;
322
479
 
323
480
  &-chevron {
324
481
  vertical-align: middle;
325
- width: var(
326
- --#{$prefix}table-detail-chevron-width,
327
- $table-detail-chevron-width
328
- );
329
- color: var(
330
- --#{$prefix}table-detail-chevron-color,
331
- $table-detail-chevron-color
332
- );
333
- }
334
- }
335
-
336
- &__tr {
337
- &-empty > td {
338
- text-align: center;
339
- padding: 2em;
340
- }
341
-
342
- &-detail {
343
- box-shadow: var(
344
- --#{$prefix}table-detail-box-shadow,
345
- $table-detail-box-shadow
346
- );
347
- background: var(
348
- --#{$prefix}table-detail-background,
349
- $table-detail-background
350
- );
351
-
352
- & > td {
353
- padding: var(
354
- --#{$prefix}table-detail-padding,
355
- $table-detail-padding
356
- );
357
- }
358
- }
359
- }
360
-
361
- &:focus {
362
- border-color: var(
363
- --#{$prefix}table-focus-border-color,
364
- $table-focus-border-color
365
- );
366
- box-shadow: var(
367
- --#{$prefix}table-focus-box-shadow,
368
- $table-focus-box-shadow
369
- );
370
- }
371
-
372
- &--bordered {
373
- tr:last-child {
374
- td,
375
- th {
376
- border: var(--#{$prefix}table-td-border, $table-td-border);
377
- }
378
- }
379
-
380
- td,
381
- th {
382
- border: var(--#{$prefix}table-td-border, $table-td-border);
383
- }
384
- }
385
-
386
- &--striped {
387
- tbody tr:not(.o-table__tr--selected):nth-child(2n) {
388
- background-color: var(
389
- --#{$prefix}table-striped-background-color,
390
- $table-striped-background-color
391
- );
392
- }
393
- }
394
-
395
- &--narrowed {
396
- td,
397
- th {
398
- padding: var(
399
- --#{$prefix}table-narrow-padding,
400
- $table-narrow-padding
401
- );
402
- }
403
- }
404
-
405
- &--hoverable {
406
- tbody tr:not(.o-table__tr--selected):hover {
407
- background-color: var(
408
- --#{$prefix}table-hoverable-background-color,
409
- $table-hoverable-background-color
410
- );
411
- }
412
- }
413
-
414
- &__tr--selected {
415
- background-color: $table-row-active-background-color;
416
- color: $table-row-active-color;
417
-
418
- @each $name, $pair in $colors {
419
- $color: list.nth($pair, 1);
420
- $color-invert: list.nth($pair, 2);
421
- &-#{$name} {
422
- background-color: $color;
423
- color: $color-invert;
424
- }
482
+ width: h.useVar("table-td-detail-chevron-width");
483
+ color: h.useVar("table-td-detail-chevron-color");
425
484
  }
426
485
  }
427
486
 
@@ -429,10 +488,7 @@ $table-pagination-padding: 0.5em 0 !default;
429
488
  align-items: center;
430
489
  justify-content: space-between;
431
490
  display: flex;
432
- padding: var(
433
- --#{$prefix}table-pagination-padding,
434
- $table-pagination-padding
435
- );
491
+ padding: h.useVar("table-pagination-padding");
436
492
 
437
493
  // left - right
438
494
  > div {