@odx/ui 5.5.0 → 6.0.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 (206) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +0 -10
  3. package/ag-grid-theme.css +1 -1
  4. package/charts-theme.css +1 -1
  5. package/core-theme.css +1 -1
  6. package/package.json +4 -1
  7. package/scss/3rdparty/ag-grid/theme.scss +9 -7
  8. package/scss/_application.scss +5 -5
  9. package/scss/_base.scss +1 -1
  10. package/scss/_breakpoints.scss +15 -3
  11. package/scss/_color-palettes.scss +32 -32
  12. package/scss/_colors-dark.scss +31 -37
  13. package/scss/_colors.scss +94 -95
  14. package/scss/_controls.scss +45 -45
  15. package/scss/_description-list.scss +7 -13
  16. package/scss/_dimensions.scss +23 -10
  17. package/scss/_helpers.scss +44 -22
  18. package/scss/_layout.scss +2 -4
  19. package/scss/_skeleton.scss +1 -1
  20. package/scss/_text-list.scss +4 -7
  21. package/scss/_typography.scss +3 -6
  22. package/scss/_utils.scss +13 -0
  23. package/scss/_vertical-rythm.scss +1 -1
  24. package/scss/_visuals.scss +6 -6
  25. package/scss/abstract/_breakpoints.scss +15 -3
  26. package/scss/abstract/_dimensions.scss +23 -10
  27. package/scss/abstract/_utils.scss +13 -0
  28. package/scss/accordion-item.component.scss +22 -23
  29. package/scss/action-group.component.scss +6 -6
  30. package/scss/active-indicator.scss +3 -5
  31. package/scss/ag-grid/theme.scss +9 -7
  32. package/scss/anchor-navigation.component.scss +7 -10
  33. package/scss/area-header.component.scss +33 -31
  34. package/scss/autocomplete.component.scss +1 -4
  35. package/scss/avatar.component.scss +52 -11
  36. package/scss/badge.component.scss +11 -13
  37. package/scss/bar.component.scss +14 -18
  38. package/scss/brand-logo.component.scss +2 -4
  39. package/scss/breadcrumbs.component.scss +10 -14
  40. package/scss/button-group.component.scss +4 -8
  41. package/scss/button.component.scss +39 -36
  42. package/scss/calendar.component.scss +60 -56
  43. package/scss/card.component.scss +33 -35
  44. package/scss/cdk/active-indicator.scss +3 -5
  45. package/scss/cdk/connected-overlay.scss +4 -10
  46. package/scss/chart-footer.component.scss +21 -21
  47. package/scss/chart-header.component.scss +49 -49
  48. package/scss/charts/colors/_color-palettes.scss +32 -32
  49. package/scss/charts/components/chart-footer.component.scss +21 -21
  50. package/scss/charts/components/chart-header.component.scss +49 -49
  51. package/scss/charts/components/circle-chart-table.component.scss +1 -1
  52. package/scss/charts/components/line-timeframes-chart.component.scss +4 -4
  53. package/scss/charts/components/mirror-bar-chart.component.scss +2 -2
  54. package/scss/charts/components/multi-axis-box-plot.component.scss +2 -2
  55. package/scss/checkbox.component.scss +29 -30
  56. package/scss/chip-list.component.scss +5 -6
  57. package/scss/chip.component.scss +30 -17
  58. package/scss/circle-chart-table.component.scss +1 -1
  59. package/scss/circular-progress.component.scss +7 -8
  60. package/scss/colors/_color-palettes.scss +32 -32
  61. package/scss/components/accordion-item.component.scss +22 -23
  62. package/scss/components/action-group.component.scss +6 -6
  63. package/scss/components/anchor-navigation.component.scss +7 -10
  64. package/scss/components/area-header.component.scss +33 -31
  65. package/scss/components/autocomplete.component.scss +1 -4
  66. package/scss/components/avatar.component.scss +52 -11
  67. package/scss/components/badge.component.scss +11 -13
  68. package/scss/components/bar.component.scss +14 -18
  69. package/scss/components/brand-logo.component.scss +2 -4
  70. package/scss/components/breadcrumbs.component.scss +10 -14
  71. package/scss/components/button-group.component.scss +4 -8
  72. package/scss/components/button.component.scss +39 -36
  73. package/scss/components/calendar.component.scss +60 -56
  74. package/scss/components/card.component.scss +33 -35
  75. package/scss/components/chart-footer.component.scss +21 -21
  76. package/scss/components/chart-header.component.scss +49 -49
  77. package/scss/components/checkbox.component.scss +29 -30
  78. package/scss/components/chip-list.component.scss +5 -6
  79. package/scss/components/chip.component.scss +30 -17
  80. package/scss/components/circle-chart-table.component.scss +1 -1
  81. package/scss/components/circular-progress.component.scss +7 -8
  82. package/scss/components/content-box.component.scss +10 -7
  83. package/scss/components/datepicker.component.scss +1 -3
  84. package/scss/components/daterangepicker.component.scss +6 -3
  85. package/scss/components/dropdown.component.scss +5 -9
  86. package/scss/components/error-page.component.scss +5 -12
  87. package/scss/components/expandable-list-item.component.scss +6 -6
  88. package/scss/components/footer.component.scss +5 -7
  89. package/scss/components/form-field.component.scss +65 -58
  90. package/scss/components/header-navigation.component.scss +2 -10
  91. package/scss/components/header.component.scss +11 -13
  92. package/scss/components/icon.component.scss +8 -8
  93. package/scss/components/inline-message.component.scss +9 -15
  94. package/scss/components/line-timeframes-chart.component.scss +4 -4
  95. package/scss/components/link.component.scss +5 -5
  96. package/scss/components/list-item.component.scss +16 -18
  97. package/scss/components/list.component.scss +1 -3
  98. package/scss/components/loading-spinner.component.scss +4 -6
  99. package/scss/components/logo.component.scss +6 -10
  100. package/scss/components/main-menu-item.component.scss +15 -24
  101. package/scss/components/main-menu.component.scss +28 -41
  102. package/scss/components/mainfilter-group.component.scss +23 -27
  103. package/scss/components/menu.component.scss +7 -11
  104. package/scss/components/mirror-bar-chart.component.scss +2 -2
  105. package/scss/components/modal.component.scss +37 -43
  106. package/scss/components/multi-axis-box-plot.component.scss +2 -2
  107. package/scss/components/navigation-back.component.scss +5 -6
  108. package/scss/components/notification-center.component.scss +14 -18
  109. package/scss/components/notification-item.component.scss +6 -11
  110. package/scss/components/option.component.scss +11 -15
  111. package/scss/components/paginator.component.scss +5 -8
  112. package/scss/components/progress.component.scss +4 -8
  113. package/scss/components/radio-button.component.scss +23 -23
  114. package/scss/components/radio-group.component.scss +2 -4
  115. package/scss/components/rail-navigation-item.component.scss +19 -22
  116. package/scss/components/rail-navigation.component.scss +7 -12
  117. package/scss/components/rich-list-item-header.component.scss +4 -9
  118. package/scss/components/rich-list-item.component.scss +9 -17
  119. package/scss/components/search-bar.component.scss +13 -15
  120. package/scss/components/select.component.scss +9 -12
  121. package/scss/components/slider.component.scss +11 -14
  122. package/scss/components/spinbox.component.scss +23 -25
  123. package/scss/components/switch.component.scss +98 -123
  124. package/scss/components/tab-bar-item.component.scss +17 -19
  125. package/scss/components/tab-bar.component.scss +23 -28
  126. package/scss/components/table.component.scss +12 -19
  127. package/scss/components/timepicker.component.scss +5 -10
  128. package/scss/components/toast-item.component.scss +9 -15
  129. package/scss/components/toast.component.scss +5 -8
  130. package/scss/components/toggle-button-group.component.scss +13 -14
  131. package/scss/components/toggle-button.component.scss +15 -17
  132. package/scss/components/tooltip.component.scss +8 -13
  133. package/scss/components/wizard-step.component.scss +13 -17
  134. package/scss/components/wizard.component.scss +2 -4
  135. package/scss/connected-overlay.scss +4 -10
  136. package/scss/content-box.component.scss +10 -7
  137. package/scss/core.scss +2 -0
  138. package/scss/datepicker.component.scss +1 -3
  139. package/scss/daterangepicker.component.scss +6 -3
  140. package/scss/dropdown.component.scss +5 -9
  141. package/scss/error-page.component.scss +5 -12
  142. package/scss/expandable-list-item.component.scss +6 -6
  143. package/scss/footer.component.scss +5 -7
  144. package/scss/form-field.component.scss +65 -58
  145. package/scss/header-navigation.component.scss +2 -10
  146. package/scss/header.component.scss +11 -13
  147. package/scss/icon.component.scss +8 -8
  148. package/scss/inline-message.component.scss +9 -15
  149. package/scss/layout/_application.scss +5 -5
  150. package/scss/layout/_base.scss +1 -1
  151. package/scss/layout/_description-list.scss +7 -13
  152. package/scss/layout/_helpers.scss +44 -22
  153. package/scss/layout/_layout.scss +2 -4
  154. package/scss/layout/_text-list.scss +4 -7
  155. package/scss/layout/_typography.scss +62 -70
  156. package/scss/line-timeframes-chart.component.scss +4 -4
  157. package/scss/link.component.scss +5 -5
  158. package/scss/list-item.component.scss +16 -18
  159. package/scss/list.component.scss +1 -3
  160. package/scss/loading-spinner.component.scss +4 -6
  161. package/scss/logo.component.scss +6 -10
  162. package/scss/main-menu-item.component.scss +15 -24
  163. package/scss/main-menu.component.scss +28 -41
  164. package/scss/mainfilter-group.component.scss +23 -27
  165. package/scss/menu.component.scss +7 -11
  166. package/scss/mirror-bar-chart.component.scss +2 -2
  167. package/scss/modal.component.scss +37 -43
  168. package/scss/multi-axis-box-plot.component.scss +2 -2
  169. package/scss/navigation-back.component.scss +5 -6
  170. package/scss/notification-center.component.scss +14 -18
  171. package/scss/notification-item.component.scss +6 -11
  172. package/scss/option.component.scss +11 -15
  173. package/scss/paginator.component.scss +5 -8
  174. package/scss/progress.component.scss +4 -8
  175. package/scss/radio-button.component.scss +23 -23
  176. package/scss/radio-group.component.scss +2 -4
  177. package/scss/rail-navigation-item.component.scss +19 -22
  178. package/scss/rail-navigation.component.scss +7 -12
  179. package/scss/rich-list-item-header.component.scss +4 -9
  180. package/scss/rich-list-item.component.scss +9 -17
  181. package/scss/search-bar.component.scss +13 -15
  182. package/scss/select.component.scss +9 -12
  183. package/scss/skeleton/_skeleton.scss +1 -1
  184. package/scss/slider.component.scss +11 -14
  185. package/scss/spinbox.component.scss +23 -25
  186. package/scss/switch.component.scss +98 -123
  187. package/scss/tab-bar-item.component.scss +17 -19
  188. package/scss/tab-bar.component.scss +23 -28
  189. package/scss/table.component.scss +12 -19
  190. package/scss/theme.scss +9 -7
  191. package/scss/timepicker.component.scss +5 -10
  192. package/scss/toast-item.component.scss +9 -15
  193. package/scss/toast.component.scss +5 -8
  194. package/scss/toggle-button-group.component.scss +13 -14
  195. package/scss/toggle-button.component.scss +15 -17
  196. package/scss/tooltip.component.scss +8 -13
  197. package/scss/variables/_color-palettes-dark.scss +49 -49
  198. package/scss/variables/_color-palettes.scss +105 -84
  199. package/scss/variables/_colors-dark.scss +31 -37
  200. package/scss/variables/_colors.scss +94 -95
  201. package/scss/variables/_controls.scss +45 -45
  202. package/scss/variables/_typography.scss +3 -6
  203. package/scss/variables/_vertical-rythm.scss +1 -1
  204. package/scss/variables/_visuals.scss +6 -6
  205. package/scss/wizard-step.component.scss +13 -17
  206. package/scss/wizard.component.scss +2 -4
@@ -1,30 +1,24 @@
1
- @use 'sass:math';
2
- @use '../abstract/dimensions';
3
- @use '../abstract/typography';
4
-
5
1
  .odx-description-list {
6
- $gap: dimensions.get-size(math.div(8, 24));
7
-
8
- @include dimensions.margin-y(0.5);
9
-
10
- column-gap: $gap;
2
+ column-gap: var(--odx-spacing-50);
11
3
  display: flex;
12
4
  flex: 0 0 100%;
13
5
  flex-wrap: wrap;
14
- row-gap: calc(#{$gap} / 2);
6
+ margin-block: var(--odx-spacing-75);
7
+ row-gap: calc(var(--odx-spacing-50) / 2);
15
8
 
16
9
  dt,
17
10
  dd {
18
11
  align-items: flex-end;
19
12
  display: inline-flex;
20
- flex: 0 0 calc(50% - #{$gap} / 2);
13
+ flex: 0 0 calc(50% - var(--odx-spacing-50) / 2);
21
14
  }
22
15
 
23
16
  dt {
24
- @include typography.font-size(-1);
17
+ font-size: var(--odx-typography-font-size-text-sm);
25
18
  }
26
19
 
27
20
  dd {
28
- @include typography.font-weight(medium);
21
+ font-weight: var(--odx-typography-font-weight-medium);
22
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
29
23
  }
30
24
  }
@@ -1,4 +1,6 @@
1
1
  @use 'sass:math';
2
+ @use 'sass:map';
3
+ @warn 'DEPRECATED: The dimension helpers in "_dimensions.scss" are deprecated and will be removed in the next version. Please migrate off these mixins and functions.';
2
4
 
3
5
  @function _get-line-height-factor($factor, $line-height-factor) {
4
6
  @if not $line-height-factor {
@@ -24,39 +26,50 @@
24
26
  @return calc(var(--odx-vertical-rythm-base-size) * $factor);
25
27
  }
26
28
 
29
+ $sides-map: (
30
+ top: block-start,
31
+ right: inline-end,
32
+ bottom: block-end,
33
+ left: inline-start,
34
+ );
35
+
27
36
  @mixin margin($factor, $directions: ('top', 'right', 'bottom', 'left')) {
37
+ $size: get-size($factor);
38
+
28
39
  @each $side in $directions {
29
- margin-#{$side}: get-size($factor);
40
+ $logical-side: map.get($sides-map, $side);
41
+
42
+ @if $logical-side {
43
+ margin-#{$logical-side}: $size;
44
+ }
30
45
  }
31
46
  }
32
47
 
33
48
  @mixin margin-x($factor: 1) {
34
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
35
-
36
49
  @include margin($factor, ('right', 'left'));
37
50
  }
38
51
 
39
52
  @mixin margin-y($factor: 1) {
40
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
41
-
42
53
  @include margin($factor, ('top', 'bottom'));
43
54
  }
44
55
 
45
56
  @mixin padding($factor, $directions: ('top', 'right', 'bottom', 'left')) {
57
+ $size: get-size($factor);
58
+
46
59
  @each $side in $directions {
47
- padding-#{$side}: get-size($factor);
60
+ $logical-side: map.get($sides-map, $side);
61
+
62
+ @if $logical-side {
63
+ padding-#{$logical-side}: $size;
64
+ }
48
65
  }
49
66
  }
50
67
 
51
68
  @mixin padding-x($factor: 1) {
52
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
53
-
54
69
  @include padding($factor, ('right', 'left'));
55
70
  }
56
71
 
57
72
  @mixin padding-y($factor: 1) {
58
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
59
-
60
73
  @include padding($factor, ('top', 'bottom'));
61
74
  }
62
75
 
@@ -1,54 +1,73 @@
1
- @use 'sass:math';
2
- @use '../abstract/dimensions';
3
- @use '../abstract/typography';
4
1
  @use '../abstract/utils';
5
2
 
3
+ $spacing-token-map: (
4
+ 4: var(--odx-spacing-25),
5
+ 8: var(--odx-spacing-50),
6
+ 12: var(--odx-spacing-75),
7
+ 16: var(--odx-spacing-100),
8
+ 24: var(--odx-spacing-150),
9
+ 36: var(--odx-size-225),
10
+ 48: var(--odx-size-300)
11
+ );
12
+
6
13
  html body {
7
14
  .odx-no-margin {
8
15
  margin: 0;
9
16
  }
10
17
 
11
- @each $size in (4, 8, 12, 16, 24, 36, 48) {
12
- $factor: math.div($size, 24);
13
-
18
+ @each $size, $token in $spacing-token-map {
14
19
  @each $direction in (top, right, bottom, left) {
15
20
  .odx-margin-#{$direction}-#{$size} {
16
- @include dimensions.margin($factor, $direction);
21
+ @if $direction == top {
22
+ margin-block-start: $token;
23
+ } @else if $direction == bottom {
24
+ margin-block-end: $token;
25
+ } @else if $direction == left {
26
+ margin-inline-start: $token;
27
+ } @else if $direction == right {
28
+ margin-inline-end: $token;
29
+ }
17
30
  }
18
31
  }
19
32
 
20
33
  .odx-margin-x-#{$size} {
21
- @include dimensions.margin-x($factor);
34
+ margin-inline: $token;
22
35
  }
23
36
 
24
37
  .odx-margin-y-#{$size} {
25
- @include dimensions.margin-y($factor);
38
+ margin-block: $token;
26
39
  }
27
40
 
28
41
  .odx-margin-#{$size} {
29
- @include dimensions.margin($factor);
42
+ margin: $token;
30
43
  }
31
44
  }
32
45
 
33
- @each $size in (4, 8, 12, 16, 24, 36, 48) {
34
- $factor: math.div($size, 24);
35
-
46
+ @each $size, $token in $spacing-token-map {
36
47
  @each $direction in (top, right, bottom, left) {
37
48
  .odx-padding-#{$direction}-#{$size} {
38
- @include dimensions.padding($factor, $direction);
49
+ @if $direction == top {
50
+ padding-block-start: $token;
51
+ } @else if $direction == bottom {
52
+ padding-block-end: $token;
53
+ } @else if $direction == left {
54
+ padding-inline-start: $token;
55
+ } @else if $direction == right {
56
+ padding-inline-end: $token;
57
+ }
39
58
  }
40
59
  }
41
60
 
42
61
  .odx-padding-x-#{$size} {
43
- @include dimensions.padding-x($factor);
62
+ padding-inline: $token;
44
63
  }
45
64
 
46
65
  .odx-padding-y-#{$size} {
47
- @include dimensions.padding-y($factor);
66
+ padding-block: $token;
48
67
  }
49
68
 
50
69
  .odx-padding-#{$size} {
51
- @include dimensions.padding($factor);
70
+ padding: $token;
52
71
  }
53
72
  }
54
73
 
@@ -58,24 +77,27 @@ html body {
58
77
 
59
78
  hr,
60
79
  .odx-separator {
61
- @include dimensions.height(1, math.div(1, 24));
62
-
63
80
  background-color: var(--odx-c-separator);
81
+ block-size: var(--odx-border-width-thin);
64
82
  border: 0;
83
+ margin-block: var(--odx-spacing-50);
65
84
  }
66
85
 
67
86
  .odx-fs-normal {
68
- @include typography.font-weight(normal);
87
+ font-weight: var(--odx-typography-font-weight-normal);
88
+ letter-spacing: var(--odx-typography-font-weight-normal-letter-spacing);
69
89
  }
70
90
 
71
91
  .odx-fs-medium {
72
- @include typography.font-weight(medium);
92
+ font-weight: var(--odx-typography-font-weight-medium);
93
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
73
94
  }
74
95
 
75
96
  b,
76
97
  strong,
77
98
  .odx-fs-bold {
78
- @include typography.font-weight(semibold);
99
+ font-weight: var(--odx-typography-font-weight-semibold);
100
+ letter-spacing: var(--odx-typography-font-weight-semibold-letter-spacing);
79
101
  }
80
102
 
81
103
  em,
package/scss/_layout.scss CHANGED
@@ -1,6 +1,4 @@
1
- @use 'sass:math';
2
1
  @use '../abstract/breakpoints';
3
- @use '../abstract/dimensions';
4
2
 
5
3
  $columns: 12 !default;
6
4
 
@@ -9,8 +7,8 @@ $columns: 12 !default;
9
7
  }
10
8
 
11
9
  :root {
12
- --odx-grid-gutter: #{dimensions.get-size(1)};
13
- --odx-grid-gutter-small: #{dimensions.get-size(math.div(8, 24))};
10
+ --odx-grid-gutter: var(--odx-size-150);
11
+ --odx-grid-gutter-small: var(--odx-size-50);
14
12
 
15
13
  @include breakpoints.down(phone) {
16
14
  --odx-grid-gutter: var(--odx-grid-gutter-small);
@@ -18,7 +18,7 @@
18
18
  &::after {
19
19
  animation: skeleton-animation ease-in-out 1s infinite alternate;
20
20
  background-color: var(--gray-200);
21
- border-radius: var(--odx-v-border-radius);
21
+ border-radius: var(--odx-border-radius-md);
22
22
  content: '';
23
23
  height: 100%;
24
24
  left: 0;
@@ -1,18 +1,15 @@
1
- @use 'sass:math';
2
- @use '../abstract/dimensions';
3
-
4
1
  .odx-text-list,
5
2
  .odx-text-list ol,
6
3
  .odx-text-list ul {
7
- @include dimensions.margin-y(0.5);
8
- @include dimensions.padding(1, left);
4
+ margin-block: var(--odx-spacing-75);
5
+ padding-inline-start: var(--odx-spacing-150);
9
6
 
10
7
  ul,
11
8
  ol {
12
- @include dimensions.margin(0);
9
+ margin: 0;
13
10
  }
14
11
 
15
12
  li {
16
- @include dimensions.margin(math.div(-1, 24), left);
13
+ margin-inline-start: calc(var(--odx-vertical-rythm-base-size) * -1 / 24);
17
14
  }
18
15
  }
@@ -1,14 +1,11 @@
1
1
  @use '../abstract/breakpoints';
2
2
 
3
3
  :root {
4
- --odx-typography-font-family: 'Draeger Pangea Text', 'Arial', sans-serif;
5
- --odx-typography-base-size: 1.6rem; // clamp(1.4rem, 0.667vw + 1rem, 1.6rem);
6
- --odx-typography-base-line-height: 1.5;
7
- --odx-typography-font-weight-normal: 400;
4
+ --odx-typography-font-family: var(--odx-typography-font-family-base), 'Arial', sans-serif;
5
+ --odx-typography-base-size: var(--odx-typography-font-size-base);
6
+ --odx-typography-base-line-height: var(--odx-typography-line-height-base);
8
7
  --odx-typography-font-weight-normal-letter-spacing: 0;
9
- --odx-typography-font-weight-medium: 500;
10
8
  --odx-typography-font-weight-medium-letter-spacing: -0.19px;
11
- --odx-typography-font-weight-semibold: 600;
12
9
  --odx-typography-font-weight-semibold-letter-spacing: 0;
13
10
  --odx-typography-font-weight-bold: var(--odx-typography-font-weight-semibold);
14
11
  --odx-typography-font-weight-bold-letter-spacing: var(--odx-typography-font-weight-semibold-letter-spacing);
package/scss/_utils.scss CHANGED
@@ -1,4 +1,6 @@
1
+ @use 'sass:list';
1
2
  @use 'sass:math';
3
+ @use 'sass:meta';
2
4
 
3
5
  @function css-pow($value, $exponent) {
4
6
  $css-value: 1;
@@ -79,6 +81,16 @@
79
81
 
80
82
  @if $focus-within {
81
83
  @if $focus-within-selector {
84
+ @if meta.type-of($focus-within-selector) == 'list' {
85
+ $selector-list: $focus-within-selector;
86
+
87
+ @if list.separator($selector-list) != comma {
88
+ $selector-list: list.join((), $selector-list, $separator: comma);
89
+ }
90
+
91
+ $focus-within-selector: ':is(#{$selector-list})';
92
+ }
93
+
82
94
  $focus-within-selector: '#{$focus-within-selector}:focus-visible';
83
95
  } @else {
84
96
  $focus-within-selector: ':focus-visible';
@@ -122,6 +134,7 @@
122
134
 
123
135
  @mixin theme-selector($theme: dark) {
124
136
  :root:has([odxTheme='#{$theme}']),
137
+ :root:has(.odx-#{$theme}-mode),
125
138
  :root:has(.odx-theme-#{$theme}) {
126
139
  @content;
127
140
  }
@@ -1,3 +1,3 @@
1
1
  :root {
2
- --odx-vertical-rythm-base-size: calc(var(--odx-typography-base-line-height) * var(--odx-typography-base-size));
2
+ --odx-vertical-rythm-base-size: var(--odx-typography-base-line-height);
3
3
  }
@@ -3,10 +3,10 @@
3
3
  --odx-v-border-radius: calc(var(--odx-typography-base-size) * 0.375);
4
4
  --odx-v-border-radius-controls: calc(var(--odx-typography-base-size) * 0.19);
5
5
 
6
- --odx-v-backdrop-blur: 3px;
6
+ --odx-v-backdrop-blur: var(--odx-elevation-backdrop-blur);
7
7
 
8
- --odx-v-box-shadow-layer-1: 0 2px 6px 0 var(--odx-c-box-shadow);
9
- --odx-v-box-shadow-layer-2: 0 4px 12px 0 var(--odx-c-box-shadow);
8
+ --odx-v-box-shadow-layer-1: var(--odx-elevation-shadow-level-1);
9
+ --odx-v-box-shadow-layer-2: var(--odx-elevation-shadow-level-2);
10
10
 
11
11
  --odx-v-layer-1: 0;
12
12
  --odx-v-layer-2: 10;
@@ -15,10 +15,10 @@
15
15
  --odx-v-layer-5: 9500;
16
16
  --odx-v-layer-6: 9900;
17
17
 
18
- --odx-v-transition-duration: 250ms;
18
+ --odx-v-transition-duration: var(--odx-motion-duration-default);
19
19
  --odx-v-transition-easing-fn: ease;
20
- --odx-v-outline-width: 1px;
21
- --odx-v-outline-width-bold: 2px;
20
+ --odx-v-outline-width: var(--odx-border-width-thin);
21
+ --odx-v-outline-width-bold: var(--odx-border-width-thick);
22
22
  --odx-v-outline-box-shadow-width: 1px;
23
23
 
24
24
  --odx-v-scrollbar-track-color: transparent;
@@ -30,19 +30,31 @@ $breakpoints: (
30
30
  $keys: get-breakpoint-names();
31
31
  $index: list.index($keys, $breakpoint);
32
32
 
33
- @return if($index < list.length($keys), list.nth($keys, $index + 1), null);
33
+ @if $index < list.length($keys) {
34
+ @return list.nth($keys, $index + 1);
35
+ }
36
+
37
+ @return null;
34
38
  }
35
39
 
36
40
  @function _get-min-value($breakpoint) {
37
41
  $value: get-breakpoint-value($breakpoint);
38
42
 
39
- @return if($value != 0, $value, null);
43
+ @if $value != 0 {
44
+ @return $value;
45
+ }
46
+
47
+ @return null;
40
48
  }
41
49
 
42
50
  @function _get-max-value($breakpoint) {
43
51
  $value: get-breakpoint-value($breakpoint);
44
52
 
45
- @return if($value > 0, $value - 1, null);
53
+ @if $value > 0 {
54
+ @return $value - 1;
55
+ }
56
+
57
+ @return null;
46
58
  }
47
59
 
48
60
  @mixin up($breakpoint) {
@@ -1,4 +1,6 @@
1
1
  @use 'sass:math';
2
+ @use 'sass:map';
3
+ @warn 'DEPRECATED: The dimension helpers in "_dimensions.scss" are deprecated and will be removed in the next version. Please migrate off these mixins and functions.';
2
4
 
3
5
  @function _get-line-height-factor($factor, $line-height-factor) {
4
6
  @if not $line-height-factor {
@@ -24,39 +26,50 @@
24
26
  @return calc(var(--odx-vertical-rythm-base-size) * $factor);
25
27
  }
26
28
 
29
+ $sides-map: (
30
+ top: block-start,
31
+ right: inline-end,
32
+ bottom: block-end,
33
+ left: inline-start,
34
+ );
35
+
27
36
  @mixin margin($factor, $directions: ('top', 'right', 'bottom', 'left')) {
37
+ $size: get-size($factor);
38
+
28
39
  @each $side in $directions {
29
- margin-#{$side}: get-size($factor);
40
+ $logical-side: map.get($sides-map, $side);
41
+
42
+ @if $logical-side {
43
+ margin-#{$logical-side}: $size;
44
+ }
30
45
  }
31
46
  }
32
47
 
33
48
  @mixin margin-x($factor: 1) {
34
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
35
-
36
49
  @include margin($factor, ('right', 'left'));
37
50
  }
38
51
 
39
52
  @mixin margin-y($factor: 1) {
40
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
41
-
42
53
  @include margin($factor, ('top', 'bottom'));
43
54
  }
44
55
 
45
56
  @mixin padding($factor, $directions: ('top', 'right', 'bottom', 'left')) {
57
+ $size: get-size($factor);
58
+
46
59
  @each $side in $directions {
47
- padding-#{$side}: get-size($factor);
60
+ $logical-side: map.get($sides-map, $side);
61
+
62
+ @if $logical-side {
63
+ padding-#{$logical-side}: $size;
64
+ }
48
65
  }
49
66
  }
50
67
 
51
68
  @mixin padding-x($factor: 1) {
52
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
53
-
54
69
  @include padding($factor, ('right', 'left'));
55
70
  }
56
71
 
57
72
  @mixin padding-y($factor: 1) {
58
- $spacing: calc(var(--odx-vertical-rythm-base-size) * $factor);
59
-
60
73
  @include padding($factor, ('top', 'bottom'));
61
74
  }
62
75
 
@@ -1,4 +1,6 @@
1
+ @use 'sass:list';
1
2
  @use 'sass:math';
3
+ @use 'sass:meta';
2
4
 
3
5
  @function css-pow($value, $exponent) {
4
6
  $css-value: 1;
@@ -79,6 +81,16 @@
79
81
 
80
82
  @if $focus-within {
81
83
  @if $focus-within-selector {
84
+ @if meta.type-of($focus-within-selector) == 'list' {
85
+ $selector-list: $focus-within-selector;
86
+
87
+ @if list.separator($selector-list) != comma {
88
+ $selector-list: list.join((), $selector-list, $separator: comma);
89
+ }
90
+
91
+ $focus-within-selector: ':is(#{$selector-list})';
92
+ }
93
+
82
94
  $focus-within-selector: '#{$focus-within-selector}:focus-visible';
83
95
  } @else {
84
96
  $focus-within-selector: ':focus-visible';
@@ -122,6 +134,7 @@
122
134
 
123
135
  @mixin theme-selector($theme: dark) {
124
136
  :root:has([odxTheme='#{$theme}']),
137
+ :root:has(.odx-#{$theme}-mode),
125
138
  :root:has(.odx-theme-#{$theme}) {
126
139
  @content;
127
140
  }
@@ -1,35 +1,34 @@
1
- @use 'sass:math';
2
- @use '../abstract/dimensions';
3
- @use '../abstract/motion';
4
- @use '../abstract/typography';
5
1
  @use '../abstract/utils';
6
2
 
7
3
  .odx-accordion-item {
8
4
  $root: &;
9
5
 
10
- @include motion.transition(color);
11
- @include dimensions.padding(math.div(6, 24), top);
12
- @include dimensions.padding(math.div(5, 24), bottom);
13
-
14
- border-bottom: 1px solid var(--odx-input-control-outline-color);
6
+ border-bottom: var(--odx-border-width-thin) solid var(--odx-input-control-outline-color);
15
7
  display: block;
8
+ padding-block-end: calc(var(--odx-control-spacing-md) - var(--odx-border-width-thin));
9
+ padding-block-start: var(--odx-control-spacing-md);
10
+ transition: var(--odx-motion-transition-default);
11
+ transition-property: color;
16
12
 
17
13
  &__panel {
18
- @include dimensions.padding-x(math.div(8, 24));
19
- @include dimensions.line-height(1.5, 1);
20
- @include motion.transition(background-color);
21
14
  @include utils.interactive();
22
15
 
23
- border-radius: var(--odx-v-border-radius-controls);
16
+ border-radius: var(--odx-border-radius-control);
24
17
  display: grid;
25
18
  grid-template-columns: 1fr auto;
19
+ line-height: var(--odx-typography-line-height-text-md);
20
+ padding-block: var(--odx-control-spacing-inline-md);
21
+ padding-inline: var(--odx-control-spacing-inline-lg);
22
+ transition: var(--odx-motion-transition-default);
23
+ transition-property: background-color;
26
24
 
27
25
  &:hover {
28
- background-color: var(--blue-700-5);
26
+ background-color: var(--odx-color-background-transparent-hover);
29
27
  }
30
28
 
31
29
  #{$root}--expanded > & {
32
- @include typography.font-weight(medium);
30
+ font-weight: var(--odx-typography-font-weight-medium);
31
+ letter-spacing: var(--odx-typography-font-weight-medium-letter-spacing);
33
32
 
34
33
  #{$root}__icon {
35
34
  transform: rotateX(180deg);
@@ -38,18 +37,18 @@
38
37
  }
39
38
 
40
39
  &__icon {
41
- @include motion.transition(transform);
42
-
43
40
  transform: rotate(0deg);
41
+ transition: var(--odx-motion-transition-default);
42
+ transition-property: transform;
44
43
  }
45
44
 
46
45
  &__slot {
47
- @include motion.transition(grid-template-rows);
48
- @include dimensions.padding-x(math.div(8, 24));
49
-
50
46
  display: grid;
51
47
  grid-template-rows: 0fr;
52
48
  overflow: hidden;
49
+ padding-inline: var(--odx-control-spacing-inline-md);
50
+ transition: var(--odx-motion-transition-default);
51
+ transition-property: grid-template-rows;
53
52
 
54
53
  #{$root}--expanded > & {
55
54
  grid-template-rows: 1fr;
@@ -61,17 +60,17 @@
61
60
  }
62
61
 
63
62
  &-content {
64
- @include motion.transition(opacity visibility);
65
-
66
63
  min-height: 0;
67
64
  opacity: 0;
65
+ transition: var(--odx-motion-transition-default);
66
+ transition-property: opacity, visibility;
68
67
  visibility: hidden;
69
68
 
70
69
  &::before,
71
70
  &::after {
72
71
  content: '';
73
72
  display: block;
74
- height: dimensions.get-size(math.div(8, 24));
73
+ height: var(--odx-spacing-37);
75
74
  width: 100%;
76
75
  }
77
76
  }
@@ -1,12 +1,12 @@
1
- @use '../abstract/dimensions';
2
1
  @use '../abstract/utils';
3
2
  @use 'button.component';
4
3
 
5
4
  .odx-action-group {
6
- @include dimensions.height(2, 1.5);
7
- @include utils.vertical-center-content(true);
5
+ block-size: var(--odx-control-height-md);
6
+ gap: var(--odx-spacing-layout-sm);
7
+ margin-block: var(--odx-spacing-37);
8
8
 
9
- gap: dimensions.get-size(0.25);
9
+ @include utils.vertical-center-content(true);
10
10
 
11
11
  &--reverse {
12
12
  flex-direction: row-reverse;
@@ -16,10 +16,10 @@
16
16
  /* stylelint-disable-next-line scss/at-extend-no-missing-placeholder */
17
17
  @extend .odx-button--ghost;
18
18
 
19
- color: var(--odx-c-text);
19
+ color: inherit;
20
20
 
21
21
  &:hover {
22
- color: var(--odx-c-text);
22
+ color: inherit;
23
23
  }
24
24
  }
25
25
  }
@@ -1,13 +1,11 @@
1
- @use '../abstract/motion';
2
-
3
1
  .odx-cdk-active-indicator {
4
- @include motion.transition(all);
5
-
6
2
  opacity: 0;
7
3
  pointer-events: none;
8
4
  position: absolute;
9
5
  transform-origin: 0 0;
10
- z-index: var(--odx-v-layer-1);
6
+ transition: var(--odx-motion-transition-default);
7
+ transition-property: all;
8
+ z-index: var(--odx-z-level-foreground);
11
9
 
12
10
  &--horizontal {
13
11
  left: 0;