@odx/ui 5.2.5 → 5.3.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.
- package/CHANGELOG.md +12 -0
- package/core-theme.css +1 -1
- package/package.json +1 -1
- package/scss/components/switch.component.scss +32 -28
- package/scss/components/tab-bar-item.component.scss +1 -0
- package/scss/components/tab-bar.component.scss +6 -1
- package/scss/switch.component.scss +32 -28
- package/scss/tab-bar-item.component.scss +1 -0
- package/scss/tab-bar.component.scss +6 -1
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use '../abstract/utils';
|
|
6
6
|
@use '../abstract/motion';
|
|
7
7
|
|
|
8
|
-
@mixin
|
|
8
|
+
@mixin track-color($background, $stroke: null) {
|
|
9
9
|
background-color: $background;
|
|
10
10
|
|
|
11
11
|
@if $stroke {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
@include utils.visually-hidden();
|
|
59
59
|
|
|
60
60
|
&:focus-visible {
|
|
61
|
-
~ #{$root}
|
|
61
|
+
~ #{$root}__track #{$root}__thumb {
|
|
62
62
|
border-width: 0;
|
|
63
63
|
box-shadow: inset 0 0 0 calc(var(--odx-v-outline-box-shadow-width)) var(--odx-c-focus-inner);
|
|
64
64
|
outline-color: var(--odx-c-focus-outline);
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
&
|
|
72
|
-
$
|
|
73
|
-
$
|
|
71
|
+
&__track {
|
|
72
|
+
$track-width: dimensions.get-size(1.5);
|
|
73
|
+
$track-height: dimensions.get-size(math.div(1, 6));
|
|
74
74
|
$track-size: dimensions.get-size(math.div(20, 24));
|
|
75
75
|
$border: 1px solid var(--odx-control-outline-color);
|
|
76
76
|
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
|
|
79
79
|
background-color: var(--odx-control-background-color);
|
|
80
80
|
border: $border;
|
|
81
|
-
border-radius: calc(#{$
|
|
82
|
-
height: $
|
|
81
|
+
border-radius: calc(#{$track-height} / 2);
|
|
82
|
+
height: $track-height;
|
|
83
83
|
position: relative;
|
|
84
|
-
width: $
|
|
84
|
+
width: $track-width;
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
#{$root}__thumb {
|
|
87
87
|
@include motion.transition(background-color transform border-color);
|
|
88
88
|
|
|
89
89
|
@include utils.with-outline() {
|
|
@@ -103,34 +103,38 @@
|
|
|
103
103
|
top: calc(#{$track-size} / -2 + 50%);
|
|
104
104
|
transform: translateX(-1px);
|
|
105
105
|
width: $track-size;
|
|
106
|
+
|
|
107
|
+
#{$root}__icon {
|
|
108
|
+
font-size: dimensions.get-size(math.div(12, 24));
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
|
|
108
|
-
#{$root}:hover
|
|
112
|
+
#{$root}:hover & #{$root}__thumb {
|
|
109
113
|
background-color: var(--odx-control-background-color-hover);
|
|
110
114
|
}
|
|
111
115
|
|
|
112
|
-
#{$root}.is-active:not(.is-disabled):hover
|
|
113
|
-
@include
|
|
116
|
+
#{$root}.is-active:not(.is-disabled):hover & #{$root}__thumb {
|
|
117
|
+
@include track-color(var(--odx-c-highlight-hover));
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
#{$root}.is-active &,
|
|
117
121
|
#{$root}__input:indeterminate ~ &,
|
|
118
122
|
#{$root}__input:checked ~ & {
|
|
119
|
-
@include
|
|
123
|
+
@include track-color(var(--odx-control-background-color-selected));
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
@include
|
|
125
|
+
#{$root}__thumb {
|
|
126
|
+
@include track-color(var(--odx-control-background-color-selected));
|
|
123
127
|
|
|
124
128
|
color: var(--odx-control-color-selected);
|
|
125
|
-
transform: translateX(calc((#{$
|
|
129
|
+
transform: translateX(calc((#{$track-width} - #{$track-size}) - 1px));
|
|
126
130
|
}
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
#{$root}.has-error & {
|
|
130
|
-
@include
|
|
134
|
+
@include track-color(var(--odx-control-background-color-error));
|
|
131
135
|
|
|
132
|
-
|
|
133
|
-
@include
|
|
136
|
+
#{$root}__thumb {
|
|
137
|
+
@include track-color(var(--odx-control-background-color-error));
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
|
|
@@ -139,10 +143,10 @@
|
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
#{$root}.is-disabled & {
|
|
142
|
-
@include
|
|
146
|
+
@include track-color(var(--odx-c-secondary-disabled));
|
|
143
147
|
|
|
144
|
-
|
|
145
|
-
@include
|
|
148
|
+
#{$root}__thumb {
|
|
149
|
+
@include track-color(var(--odx-c-secondary-disabled));
|
|
146
150
|
|
|
147
151
|
outline-color: transparent;
|
|
148
152
|
}
|
|
@@ -151,18 +155,18 @@
|
|
|
151
155
|
#{$root}.is-disabled.is-active &,
|
|
152
156
|
#{$root}.is-disabled ~ #{$root}__input:checked,
|
|
153
157
|
#{$root}.is-disabled ~ #{$root}__input:indeterminate {
|
|
154
|
-
@include
|
|
158
|
+
@include track-color(var(--odx-control-background-color-disabled-selected));
|
|
155
159
|
|
|
156
|
-
|
|
157
|
-
@include
|
|
160
|
+
#{$root}__thumb {
|
|
161
|
+
@include track-color(var(--odx-control-background-color-disabled-selected));
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
#{$root}.is-disabled:not(.is-active) & {
|
|
162
|
-
@include
|
|
166
|
+
@include track-color(var(--odx-control-background-color-disabled));
|
|
163
167
|
|
|
164
|
-
|
|
165
|
-
@include
|
|
168
|
+
#{$root}__thumb {
|
|
169
|
+
@include track-color(var(--odx-control-background-color-disabled));
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
$mask-color: #000000;
|
|
21
21
|
|
|
22
22
|
display: flex;
|
|
23
|
+
overflow-x: scroll;
|
|
24
|
+
scroll-behavior: smooth;
|
|
25
|
+
scroll-snap-stop: always;
|
|
26
|
+
scroll-snap-type: x mandatory;
|
|
27
|
+
scrollbar-width: none;
|
|
23
28
|
width: 100%;
|
|
24
29
|
|
|
25
30
|
#{$root}--overflow-left & {
|
|
@@ -66,7 +71,7 @@
|
|
|
66
71
|
top: 0;
|
|
67
72
|
user-select: none;
|
|
68
73
|
width: 0;
|
|
69
|
-
z-index: var(--odx-v-layer-
|
|
74
|
+
z-index: var(--odx-v-layer-2);
|
|
70
75
|
|
|
71
76
|
&.is-active {
|
|
72
77
|
@include dimensions.padding(math.div(8, 24), (right, left));
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
@use '../abstract/utils';
|
|
6
6
|
@use '../abstract/motion';
|
|
7
7
|
|
|
8
|
-
@mixin
|
|
8
|
+
@mixin track-color($background, $stroke: null) {
|
|
9
9
|
background-color: $background;
|
|
10
10
|
|
|
11
11
|
@if $stroke {
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
@include utils.visually-hidden();
|
|
59
59
|
|
|
60
60
|
&:focus-visible {
|
|
61
|
-
~ #{$root}
|
|
61
|
+
~ #{$root}__track #{$root}__thumb {
|
|
62
62
|
border-width: 0;
|
|
63
63
|
box-shadow: inset 0 0 0 calc(var(--odx-v-outline-box-shadow-width)) var(--odx-c-focus-inner);
|
|
64
64
|
outline-color: var(--odx-c-focus-outline);
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
&
|
|
72
|
-
$
|
|
73
|
-
$
|
|
71
|
+
&__track {
|
|
72
|
+
$track-width: dimensions.get-size(1.5);
|
|
73
|
+
$track-height: dimensions.get-size(math.div(1, 6));
|
|
74
74
|
$track-size: dimensions.get-size(math.div(20, 24));
|
|
75
75
|
$border: 1px solid var(--odx-control-outline-color);
|
|
76
76
|
|
|
@@ -78,12 +78,12 @@
|
|
|
78
78
|
|
|
79
79
|
background-color: var(--odx-control-background-color);
|
|
80
80
|
border: $border;
|
|
81
|
-
border-radius: calc(#{$
|
|
82
|
-
height: $
|
|
81
|
+
border-radius: calc(#{$track-height} / 2);
|
|
82
|
+
height: $track-height;
|
|
83
83
|
position: relative;
|
|
84
|
-
width: $
|
|
84
|
+
width: $track-width;
|
|
85
85
|
|
|
86
|
-
|
|
86
|
+
#{$root}__thumb {
|
|
87
87
|
@include motion.transition(background-color transform border-color);
|
|
88
88
|
|
|
89
89
|
@include utils.with-outline() {
|
|
@@ -103,34 +103,38 @@
|
|
|
103
103
|
top: calc(#{$track-size} / -2 + 50%);
|
|
104
104
|
transform: translateX(-1px);
|
|
105
105
|
width: $track-size;
|
|
106
|
+
|
|
107
|
+
#{$root}__icon {
|
|
108
|
+
font-size: dimensions.get-size(math.div(12, 24));
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
|
|
108
|
-
#{$root}:hover
|
|
112
|
+
#{$root}:hover & #{$root}__thumb {
|
|
109
113
|
background-color: var(--odx-control-background-color-hover);
|
|
110
114
|
}
|
|
111
115
|
|
|
112
|
-
#{$root}.is-active:not(.is-disabled):hover
|
|
113
|
-
@include
|
|
116
|
+
#{$root}.is-active:not(.is-disabled):hover & #{$root}__thumb {
|
|
117
|
+
@include track-color(var(--odx-c-highlight-hover));
|
|
114
118
|
}
|
|
115
119
|
|
|
116
120
|
#{$root}.is-active &,
|
|
117
121
|
#{$root}__input:indeterminate ~ &,
|
|
118
122
|
#{$root}__input:checked ~ & {
|
|
119
|
-
@include
|
|
123
|
+
@include track-color(var(--odx-control-background-color-selected));
|
|
120
124
|
|
|
121
|
-
|
|
122
|
-
@include
|
|
125
|
+
#{$root}__thumb {
|
|
126
|
+
@include track-color(var(--odx-control-background-color-selected));
|
|
123
127
|
|
|
124
128
|
color: var(--odx-control-color-selected);
|
|
125
|
-
transform: translateX(calc((#{$
|
|
129
|
+
transform: translateX(calc((#{$track-width} - #{$track-size}) - 1px));
|
|
126
130
|
}
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
#{$root}.has-error & {
|
|
130
|
-
@include
|
|
134
|
+
@include track-color(var(--odx-control-background-color-error));
|
|
131
135
|
|
|
132
|
-
|
|
133
|
-
@include
|
|
136
|
+
#{$root}__thumb {
|
|
137
|
+
@include track-color(var(--odx-control-background-color-error));
|
|
134
138
|
}
|
|
135
139
|
}
|
|
136
140
|
|
|
@@ -139,10 +143,10 @@
|
|
|
139
143
|
}
|
|
140
144
|
|
|
141
145
|
#{$root}.is-disabled & {
|
|
142
|
-
@include
|
|
146
|
+
@include track-color(var(--odx-c-secondary-disabled));
|
|
143
147
|
|
|
144
|
-
|
|
145
|
-
@include
|
|
148
|
+
#{$root}__thumb {
|
|
149
|
+
@include track-color(var(--odx-c-secondary-disabled));
|
|
146
150
|
|
|
147
151
|
outline-color: transparent;
|
|
148
152
|
}
|
|
@@ -151,18 +155,18 @@
|
|
|
151
155
|
#{$root}.is-disabled.is-active &,
|
|
152
156
|
#{$root}.is-disabled ~ #{$root}__input:checked,
|
|
153
157
|
#{$root}.is-disabled ~ #{$root}__input:indeterminate {
|
|
154
|
-
@include
|
|
158
|
+
@include track-color(var(--odx-control-background-color-disabled-selected));
|
|
155
159
|
|
|
156
|
-
|
|
157
|
-
@include
|
|
160
|
+
#{$root}__thumb {
|
|
161
|
+
@include track-color(var(--odx-control-background-color-disabled-selected));
|
|
158
162
|
}
|
|
159
163
|
}
|
|
160
164
|
|
|
161
165
|
#{$root}.is-disabled:not(.is-active) & {
|
|
162
|
-
@include
|
|
166
|
+
@include track-color(var(--odx-control-background-color-disabled));
|
|
163
167
|
|
|
164
|
-
|
|
165
|
-
@include
|
|
168
|
+
#{$root}__thumb {
|
|
169
|
+
@include track-color(var(--odx-control-background-color-disabled));
|
|
166
170
|
}
|
|
167
171
|
}
|
|
168
172
|
}
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
$mask-color: #000000;
|
|
21
21
|
|
|
22
22
|
display: flex;
|
|
23
|
+
overflow-x: scroll;
|
|
24
|
+
scroll-behavior: smooth;
|
|
25
|
+
scroll-snap-stop: always;
|
|
26
|
+
scroll-snap-type: x mandatory;
|
|
27
|
+
scrollbar-width: none;
|
|
23
28
|
width: 100%;
|
|
24
29
|
|
|
25
30
|
#{$root}--overflow-left & {
|
|
@@ -66,7 +71,7 @@
|
|
|
66
71
|
top: 0;
|
|
67
72
|
user-select: none;
|
|
68
73
|
width: 0;
|
|
69
|
-
z-index: var(--odx-v-layer-
|
|
74
|
+
z-index: var(--odx-v-layer-2);
|
|
70
75
|
|
|
71
76
|
&.is-active {
|
|
72
77
|
@include dimensions.padding(math.div(8, 24), (right, left));
|