@itwin/itwinui-css 0.50.1 → 0.51.0
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/css/alert.css +232 -174
- package/css/all.css +7242 -5607
- package/css/badge.css +2 -1
- package/css/blockquote.css +10 -7
- package/css/breadcrumbs.css +110 -87
- package/css/button.css +441 -345
- package/css/carousel.css +119 -88
- package/css/code.css +69 -56
- package/css/color-picker.css +150 -103
- package/css/date-picker.css +73 -55
- package/css/expandable-block.css +212 -160
- package/css/fieldset.css +22 -18
- package/css/file-upload.css +93 -79
- package/css/footer.css +64 -53
- package/css/global.css +100 -78
- package/css/header.css +471 -364
- package/css/icon.css +108 -78
- package/css/information-panel.css +174 -137
- package/css/inputs.css +1134 -942
- package/css/keyboard.css +11 -7
- package/css/location-marker.css +68 -58
- package/css/menu.css +105 -80
- package/css/modal.css +54 -43
- package/css/non-ideal-state.css +47 -40
- package/css/notification-marker.css +275 -200
- package/css/popover.css +10 -8
- package/css/progress-indicator.css +315 -237
- package/css/reset-global-styles.css +10 -5
- package/css/side-navigation.css +189 -140
- package/css/skip-to-content.css +41 -27
- package/css/slider.css +112 -87
- package/css/table.css +563 -419
- package/css/tabs.css +324 -238
- package/css/tag.css +111 -84
- package/css/text.css +46 -27
- package/css/tile.css +387 -311
- package/css/time-picker.css +113 -86
- package/css/toast-notification.css +232 -173
- package/css/toggle-switch.css +176 -111
- package/css/tooltip.css +21 -16
- package/css/tree.css +123 -93
- package/css/user-icon.css +204 -162
- package/css/wizard.css +156 -131
- package/package.json +5 -6
- package/scss/alert/alert.scss +1 -5
- package/scss/carousel/carousel.scss +4 -1
- package/scss/code/codeblock.scss +1 -1
- package/scss/inputs/checkbox.scss +1 -0
- package/scss/inputs/labeled-inputs.scss +8 -8
- package/scss/inputs/radio.scss +0 -4
- package/scss/location-marker/data-rich.scss +1 -1
- package/scss/location-marker/me.scss +4 -4
- package/scss/popover/popover.scss +1 -2
- package/scss/progress-indicator/linear.scss +2 -10
- package/scss/style/global.scss +1 -5
- package/scss/style/mixins.scss +9 -0
- package/scss/table/table.scss +23 -14
- package/scss/toast-notification/categories.scss +1 -5
- package/scss/toggle-switch/classes.scss +4 -0
- package/scss/toggle-switch/toggle-switch.scss +141 -162
|
@@ -2,194 +2,173 @@
|
|
|
2
2
|
// See LICENSE.md in the project root for license terms and full copyright notice.
|
|
3
3
|
@import '../style/index';
|
|
4
4
|
|
|
5
|
-
@mixin iui-toggle-switch {
|
|
5
|
+
@mixin iui-toggle-switch-wrapper {
|
|
6
6
|
@include iui-reset;
|
|
7
|
-
display:
|
|
7
|
+
display: grid;
|
|
8
|
+
grid-template-areas: 'toggle';
|
|
8
9
|
align-items: center;
|
|
10
|
+
gap: $iui-s;
|
|
9
11
|
font-size: $iui-font-size;
|
|
10
12
|
width: fit-content;
|
|
11
|
-
padding: ($iui-baseline/2) 0;
|
|
12
13
|
user-select: none;
|
|
13
14
|
cursor: pointer;
|
|
14
|
-
|
|
15
|
+
isolation: isolate;
|
|
15
16
|
@include themed {
|
|
16
17
|
color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
>
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
opacity: 0;
|
|
24
|
-
position: absolute;
|
|
25
|
-
|
|
26
|
-
// Unchecked toggle switch
|
|
27
|
-
~ .iui-toggle {
|
|
28
|
-
display: block;
|
|
29
|
-
position: relative;
|
|
30
|
-
height: $iui-baseline * 2 - $iui-xxs;
|
|
31
|
-
width: ($iui-m * 2) + ($iui-xxs * 3);
|
|
32
|
-
border-radius: $iui-baseline;
|
|
33
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
34
|
-
transition: background-color $iui-speed-fast ease, border-color $iui-speed-fast ease;
|
|
35
|
-
}
|
|
36
|
-
@include themed {
|
|
37
|
-
background-color: t(iui-color-background-1);
|
|
38
|
-
border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
> .iui-icon {
|
|
42
|
-
opacity: 0;
|
|
43
|
-
width: $iui-sm;
|
|
44
|
-
height: $iui-sm;
|
|
45
|
-
display: inline-block;
|
|
46
|
-
position: relative;
|
|
47
|
-
left: $iui-xs;
|
|
48
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
49
|
-
transition: opacity $iui-speed-fast ease;
|
|
50
|
-
}
|
|
51
|
-
@include themed {
|
|
52
|
-
fill: t(iui-color-foreground-accessory);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
> .iui-handle {
|
|
57
|
-
position: absolute;
|
|
58
|
-
height: $iui-m;
|
|
59
|
-
width: $iui-m;
|
|
60
|
-
top: 50%;
|
|
61
|
-
transform: translateY(-50%);
|
|
62
|
-
right: $iui-m + $iui-xs;
|
|
63
|
-
border-radius: 50%;
|
|
64
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
65
|
-
transition: right $iui-speed-fast ease, background-color $iui-speed-fast ease, opacity $iui-speed-fast ease;
|
|
66
|
-
}
|
|
67
|
-
@include themed {
|
|
68
|
-
background-color: t(iui-color-foreground-body);
|
|
69
|
-
opacity: t(iui-opacity-2);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
20
|
+
> * + * {
|
|
21
|
+
margin-left: $iui-s;
|
|
22
|
+
@supports (gap: $iui-s) {
|
|
23
|
+
margin-left: 0;
|
|
72
24
|
}
|
|
25
|
+
}
|
|
73
26
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
> .iui-handle {
|
|
82
|
-
@include themed {
|
|
83
|
-
opacity: t(iui-opacity-1);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
}
|
|
27
|
+
// Disabled
|
|
28
|
+
&.iui-disabled {
|
|
29
|
+
cursor: not-allowed;
|
|
30
|
+
@include themed {
|
|
31
|
+
color: t(iui-text-color-muted);
|
|
87
32
|
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// For labels on the left
|
|
36
|
+
&.iui-label-on-left {
|
|
37
|
+
grid-template-areas: 'label toggle';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// For labels on the right
|
|
41
|
+
&.iui-label-on-right {
|
|
42
|
+
grid-template-areas: 'toggle label';
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@mixin iui-toggle-switch {
|
|
47
|
+
$iui-toggle-switch-handle-size: $iui-icons-default;
|
|
48
|
+
$iui-toggle-switch-handle-offset: $iui-component-offset;
|
|
49
|
+
$iui-toggle-switch-border-thickness: 1px;
|
|
50
|
+
|
|
51
|
+
@include iui-reset;
|
|
52
|
+
@include iui-focus($thickness: $iui-toggle-switch-border-thickness, $offset: $iui-toggle-switch-border-thickness);
|
|
53
|
+
grid-area: toggle;
|
|
54
|
+
display: flex;
|
|
55
|
+
position: relative;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
|
|
58
|
+
// #region IE solution
|
|
59
|
+
width: $iui-toggle-switch-handle-size;
|
|
60
|
+
height: $iui-toggle-switch-handle-size;
|
|
61
|
+
@supports (appearance: none) {
|
|
62
|
+
appearance: none;
|
|
63
|
+
width: ($iui-toggle-switch-handle-size + ($iui-toggle-switch-handle-offset * 2)) * 2;
|
|
64
|
+
height: auto;
|
|
65
|
+
border-radius: $iui-border-radius-round;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
transition: background-color $iui-speed-fast ease-out, border-color $iui-speed-fast ease-out;
|
|
68
|
+
background-color: var(--iui-color-background-1);
|
|
69
|
+
border: $iui-toggle-switch-border-thickness solid rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
|
|
70
|
+
}
|
|
71
|
+
// #endregion IE solution
|
|
72
|
+
|
|
73
|
+
&-label {
|
|
74
|
+
grid-area: label;
|
|
75
|
+
}
|
|
88
76
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
> .iui-handle {
|
|
104
|
-
@include themed {
|
|
105
|
-
background-color: t(iui-color-foreground-accessory);
|
|
106
|
-
opacity: t(iui-opacity-2);
|
|
107
|
-
}
|
|
108
|
-
right: $iui-xxs;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
&:hover:not(:disabled) {
|
|
113
|
-
~ .iui-toggle {
|
|
114
|
-
@include themed {
|
|
115
|
-
border-color: t(iui-color-background-primary);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
> .iui-handle {
|
|
119
|
-
@include themed {
|
|
120
|
-
opacity: t(iui-opacity-1);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
}
|
|
77
|
+
&::after {
|
|
78
|
+
content: '';
|
|
79
|
+
height: $iui-toggle-switch-handle-size;
|
|
80
|
+
width: $iui-toggle-switch-handle-size;
|
|
81
|
+
margin: $iui-toggle-switch-handle-offset;
|
|
82
|
+
aspect-ratio: 1 / 1;
|
|
83
|
+
border-radius: 50%;
|
|
84
|
+
transition: background-color $iui-speed-fast ease-out, opacity $iui-speed-fast ease-out;
|
|
85
|
+
z-index: 2;
|
|
86
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
87
|
+
transition: transform $iui-speed-fast ease-out, background-color $iui-speed-fast ease-out,
|
|
88
|
+
opacity $iui-speed-fast ease-out;
|
|
125
89
|
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// #region Unchecked toggle switch
|
|
93
|
+
background-color: var(--iui-color-background-1);
|
|
94
|
+
border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
|
|
95
|
+
|
|
96
|
+
&::after {
|
|
97
|
+
background-color: var(--iui-color-foreground-body);
|
|
98
|
+
opacity: var(--iui-opacity-2);
|
|
99
|
+
}
|
|
126
100
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
@include themed {
|
|
146
|
-
fill: t(iui-icons-color-actionable);
|
|
147
|
-
}
|
|
148
|
-
opacity: 0;
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
~ .iui-label {
|
|
153
|
-
cursor: not-allowed;
|
|
154
|
-
|
|
155
|
-
@include themed {
|
|
156
|
-
color: t(iui-text-color-muted);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
&:checked ~ .iui-toggle > .iui-icon {
|
|
161
|
-
@include themed {
|
|
162
|
-
opacity: t(iui-opacity-5);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
101
|
+
&:hover {
|
|
102
|
+
border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@include focus-visible {
|
|
106
|
+
border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
|
|
107
|
+
}
|
|
108
|
+
// #endregion Unchecked toggle switch
|
|
109
|
+
|
|
110
|
+
// #region Checked toggle switch
|
|
111
|
+
&:checked {
|
|
112
|
+
background-color: var(--iui-color-background-primary);
|
|
113
|
+
border-color: var(--iui-color-background-primary);
|
|
114
|
+
|
|
115
|
+
&::after {
|
|
116
|
+
transform: translateX($iui-toggle-switch-handle-size + $iui-toggle-switch-handle-offset);
|
|
117
|
+
background-color: var(--iui-color-foreground-accessory);
|
|
118
|
+
opacity: var(--iui-opacity-2);
|
|
165
119
|
}
|
|
166
120
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
@include themed {
|
|
170
|
-
outline: 1px solid t(iui-color-foreground-primary);
|
|
171
|
-
}
|
|
172
|
-
outline-offset: 1px;
|
|
121
|
+
~ .iui-toggle-switch-icon {
|
|
122
|
+
opacity: var(--iui-opacity-1);
|
|
173
123
|
}
|
|
124
|
+
}
|
|
125
|
+
// #endregion Checked toggle switch
|
|
174
126
|
|
|
175
|
-
|
|
176
|
-
|
|
127
|
+
// #region Focused or hovered toggle switch
|
|
128
|
+
&:hover::after {
|
|
129
|
+
opacity: var(--iui-opacity-1);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@include focus-visible {
|
|
133
|
+
&::after {
|
|
134
|
+
opacity: var(--iui-opacity-1);
|
|
177
135
|
}
|
|
178
136
|
}
|
|
137
|
+
// #endregion Focused or hovered toggle switch
|
|
179
138
|
|
|
180
|
-
// Disabled
|
|
181
|
-
|
|
139
|
+
// #region Disabled toggle switch
|
|
140
|
+
&:disabled {
|
|
182
141
|
cursor: not-allowed;
|
|
183
|
-
|
|
142
|
+
background-color: var(--iui-color-background-disabled);
|
|
143
|
+
border-color: var(--iui-color-background-disabled);
|
|
184
144
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
145
|
+
&::after {
|
|
146
|
+
background-color: var(--iui-color-foreground-body);
|
|
147
|
+
opacity: var(--iui-opacity-5);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
~ .iui-toggle-switch-icon {
|
|
151
|
+
opacity: 0;
|
|
152
|
+
fill: var(--iui-icons-color-actionable);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&:checked ~ .iui-toggle-switch-icon {
|
|
156
|
+
opacity: var(--iui-opacity-5);
|
|
157
|
+
}
|
|
188
158
|
}
|
|
159
|
+
// #endregion Disabled toggle switch
|
|
189
160
|
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
161
|
+
&-icon {
|
|
162
|
+
opacity: 0;
|
|
163
|
+
grid-area: toggle;
|
|
164
|
+
width: $iui-toggle-switch-handle-size * 0.75;
|
|
165
|
+
height: $iui-toggle-switch-handle-size * 0.75;
|
|
166
|
+
padding: $iui-toggle-switch-handle-size * 0.125;
|
|
167
|
+
margin: $iui-toggle-switch-handle-offset + $iui-toggle-switch-border-thickness;
|
|
168
|
+
display: flex;
|
|
169
|
+
z-index: 1;
|
|
170
|
+
transition: opacity $iui-speed-fast ease-out;
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
fill: var(--iui-color-foreground-accessory);
|
|
194
173
|
}
|
|
195
174
|
}
|