@itwin/itwinui-css 0.43.0 → 0.44.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.
Files changed (58) hide show
  1. package/css/alert.css +46 -61
  2. package/css/all.css +593 -589
  3. package/css/breadcrumbs.css +7 -20
  4. package/css/button.css +40 -88
  5. package/css/code.css +6 -9
  6. package/css/color-picker.css +14 -14
  7. package/css/date-picker.css +91 -85
  8. package/css/expandable-block.css +13 -9
  9. package/css/file-upload.css +4 -3
  10. package/css/footer.css +7 -20
  11. package/css/global.css +7 -9
  12. package/css/header.css +4 -24
  13. package/css/inputs.css +111 -80
  14. package/css/side-navigation.css +1 -16
  15. package/css/slider.css +7 -10
  16. package/css/table.css +159 -28
  17. package/css/tabs.css +8 -3
  18. package/css/tag.css +17 -18
  19. package/css/tile.css +0 -14
  20. package/css/time-picker.css +26 -18
  21. package/css/toast-notification.css +12 -49
  22. package/css/toggle-switch.css +7 -4
  23. package/css/tree.css +2 -3
  24. package/css/wizard.css +4 -4
  25. package/package.json +3 -3
  26. package/scss/alert/alert.scss +4 -2
  27. package/scss/button/borderless.scss +10 -26
  28. package/scss/button/button-group.scss +2 -2
  29. package/scss/button/cta.scss +10 -25
  30. package/scss/button/default.scss +11 -26
  31. package/scss/button/high-visibility.scss +10 -25
  32. package/scss/color-picker/color-picker.scss +2 -25
  33. package/scss/date-picker/classes.scss +20 -0
  34. package/scss/date-picker/date-picker.scss +88 -100
  35. package/scss/expandable-block/block.scss +1 -0
  36. package/scss/file-upload/file-upload.scss +2 -2
  37. package/scss/footer/footer.scss +0 -2
  38. package/scss/header/header.scss +1 -15
  39. package/scss/inputs/checkbox-radio.scss +28 -18
  40. package/scss/inputs/checkbox.scss +9 -8
  41. package/scss/inputs/input.scss +1 -14
  42. package/scss/inputs/labeled-inputs.scss +2 -1
  43. package/scss/inputs/radio-tile.scss +9 -4
  44. package/scss/inputs/select.scss +1 -1
  45. package/scss/side-navigation/side-navigation.scss +1 -33
  46. package/scss/slider/slider.scss +1 -2
  47. package/scss/style/mixins.scss +14 -16
  48. package/scss/table/classes.scss +12 -0
  49. package/scss/table/paginator.scss +39 -31
  50. package/scss/tabs/default.scss +5 -0
  51. package/scss/tabs/tabs.scss +1 -8
  52. package/scss/tag/tag.scss +9 -1
  53. package/scss/time-picker/time-picker.scss +1 -0
  54. package/scss/toast-notification/categories.scss +5 -2
  55. package/scss/toast-notification/toast.scss +0 -1
  56. package/scss/toggle-switch/toggle-switch.scss +7 -3
  57. package/scss/tree/tree.scss +2 -2
  58. package/scss/wizard/wizard.scss +3 -3
@@ -4,6 +4,7 @@
4
4
 
5
5
  @mixin iui-input {
6
6
  @include iui-reset;
7
+ @include iui-focus($offset: -2px, $thickness: 2px);
7
8
  width: 100%;
8
9
  font-family: inherit;
9
10
  font-size: $iui-font-size;
@@ -43,11 +44,6 @@
43
44
  }
44
45
  }
45
46
 
46
- &:-webkit-autofill {
47
- @include iui-input-autofill;
48
- }
49
-
50
- // stylelint-disable-next-line selector-pseudo-class-no-unknown
51
47
  &:autofill {
52
48
  @include iui-input-autofill;
53
49
  }
@@ -68,15 +64,6 @@
68
64
  }
69
65
  cursor: not-allowed;
70
66
  }
71
-
72
- &:focus {
73
- outline: 0;
74
-
75
- @include themed {
76
- border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
77
- box-shadow: t(iui-focus-box-shadow);
78
- }
79
- }
80
67
  }
81
68
 
82
69
  @mixin iui-input-autofill {
@@ -339,7 +339,8 @@
339
339
  &:focus {
340
340
  @include themed {
341
341
  border-bottom: $iui-xxs solid t(iui-color-foreground-#{$status});
342
- box-shadow: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-5)) 0 0 0 $iui-xxs;
342
+ outline: 2px solid t(iui-color-foreground-#{$status});
343
+ outline-offset: -2px;
343
344
  }
344
345
  }
345
346
  }
@@ -105,11 +105,16 @@
105
105
  }
106
106
 
107
107
  // Adds focus to enabled radio tiles
108
- input:enabled:focus ~ .iui-radio-tile {
109
- outline: 0;
108
+ input:enabled {
109
+ &:focus ~ .iui-radio-tile {
110
+ @include themed {
111
+ outline: 2px solid t(iui-color-foreground-primary);
112
+ outline-offset: -4px;
113
+ }
114
+ }
110
115
 
111
- @include themed {
112
- box-shadow: t(iui-focus-box-shadow);
116
+ &:focus:not(:focus-visible) ~ .iui-radio-tile {
117
+ outline: none;
113
118
  }
114
119
  }
115
120
 
@@ -14,7 +14,7 @@ $iui-after-border: 5px solid;
14
14
 
15
15
  > .iui-select-button {
16
16
  @include iui-input;
17
- @include iui-focus;
17
+ @include iui-focus($offset: -2px, $thickness: 2px);
18
18
  display: flex;
19
19
  align-items: center;
20
20
  min-height: $iui-component-height;
@@ -100,15 +100,7 @@
100
100
 
101
101
  &,
102
102
  &:hover,
103
- &[disabled],
104
- &:focus {
105
- @include themed {
106
- border-color: t(iui-color-background-5);
107
- }
108
- }
109
-
110
- // Overriding border from default button
111
- &:focus:not(:focus-visible) {
103
+ &[disabled] {
112
104
  @include themed {
113
105
  border-color: t(iui-color-background-5);
114
106
  }
@@ -130,19 +122,6 @@
130
122
  @include themed {
131
123
  box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
132
124
  }
133
-
134
- &:focus {
135
- @include themed {
136
- box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3)),
137
- inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
138
- }
139
- }
140
-
141
- &:focus:not(:focus-visible) {
142
- @include themed {
143
- box-shadow: inset $iui-xxs 0 0 0 t(iui-icons-color-primary);
144
- }
145
- }
146
125
  }
147
126
 
148
127
  &[disabled],
@@ -152,17 +131,6 @@
152
131
  }
153
132
  }
154
133
 
155
- &:focus {
156
- outline: 0;
157
- @include themed {
158
- box-shadow: inset 0 0 $iui-xs rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-3));
159
- }
160
- }
161
-
162
- &:focus:not(:focus-visible) {
163
- box-shadow: none;
164
- }
165
-
166
134
  &.iui-expand {
167
135
  height: $iui-line-height;
168
136
  justify-content: center;
@@ -68,6 +68,7 @@ $tick-height: $iui-baseline; // 11px
68
68
  ); // Adjust the left (set in code) by radius of thumb so thumb center is at value position
69
69
  z-index: 1;
70
70
  cursor: grab;
71
+ @include iui-focus($thickness: 2px);
71
72
  @include themed {
72
73
  background: t(iui-color-background-1);
73
74
  border: 1px solid t(iui-color-background-5);
@@ -76,8 +77,6 @@ $tick-height: $iui-baseline; // 11px
76
77
  &:active {
77
78
  cursor: grabbing;
78
79
  }
79
-
80
- @include iui-focus();
81
80
  }
82
81
 
83
82
  @mixin iui-slider-track {
@@ -20,25 +20,22 @@
20
20
  }
21
21
  }
22
22
 
23
- @mixin iui-focus($box-shadow-value: iui-focus-box-shadow) {
24
- &:focus {
25
- outline: 0;
26
-
27
- @include themed {
28
- box-shadow: t($box-shadow-value);
29
- }
23
+ @mixin focus-visible {
24
+ &:focus-visible {
25
+ @content;
30
26
  }
31
27
 
32
- &:focus:not(:focus-visible) {
33
- box-shadow: none;
28
+ @supports #{'not selector(*:focus-visible)'} {
29
+ &:focus {
30
+ @content;
31
+ }
34
32
  }
33
+ }
35
34
 
36
- &:focus-visible {
37
- outline: 0;
38
-
39
- @include themed {
40
- box-shadow: t($box-shadow-value);
41
- }
35
+ @mixin iui-focus($color: var(--iui-color-foreground-primary), $offset: -1px, $thickness: 1px) {
36
+ @include focus-visible {
37
+ outline: $thickness solid $color;
38
+ outline-offset: $offset;
42
39
  }
43
40
  }
44
41
 
@@ -50,7 +47,8 @@
50
47
  }
51
48
 
52
49
  @mixin iui-anchor {
53
- @include iui-focus;
50
+ @include iui-focus($offset: 2px);
51
+ border-radius: $iui-border-radius;
54
52
  text-decoration: none;
55
53
  cursor: pointer;
56
54
  @include themed {
@@ -30,6 +30,18 @@
30
30
  @include iui-paginator;
31
31
  }
32
32
 
33
+ .iui-paginator-ellipsis {
34
+ @include iui-paginator-ellipsis;
35
+ }
36
+
37
+ .iui-paginator-pages-group {
38
+ @include iui-paginator-pages-group;
39
+ }
40
+
41
+ .iui-paginator-page-button {
42
+ @include iui-paginator-page-button;
43
+ }
44
+
33
45
  .iui-column-filter {
34
46
  @include iui-column-filter;
35
47
  }
@@ -34,37 +34,6 @@
34
34
  @include themed {
35
35
  color: t(iui-text-color);
36
36
  }
37
-
38
- .iui-button-group {
39
- margin: 0 $iui-s;
40
-
41
- > * {
42
- margin-right: 0; // unset negative margin from button-group
43
-
44
- > .iui-button,
45
- > .iui-ellipsis {
46
- width: $iui-component-height;
47
-
48
- &.iui-small {
49
- width: $iui-component-height-small;
50
- }
51
- }
52
-
53
- > .iui-ellipsis {
54
- display: flex;
55
- justify-content: center;
56
- align-items: center;
57
- @include themed {
58
- color: t(iui-text-color-muted);
59
- }
60
- }
61
-
62
- > .iui-active::after {
63
- top: auto;
64
- bottom: $iui-xxs;
65
- }
66
- }
67
- }
68
37
  }
69
38
 
70
39
  > .iui-right {
@@ -78,3 +47,42 @@
78
47
  text-overflow: ellipsis;
79
48
  }
80
49
  }
50
+
51
+ @mixin iui-paginator-ellipsis {
52
+ display: flex;
53
+ justify-content: center;
54
+ align-items: center;
55
+ width: $iui-component-height;
56
+ @include themed {
57
+ color: t(iui-text-color-muted);
58
+ }
59
+
60
+ &-small {
61
+ width: $iui-component-height-small;
62
+ }
63
+ }
64
+
65
+ @mixin iui-paginator-pages-group {
66
+ @include iui-button-group;
67
+ margin: 0 $iui-s;
68
+
69
+ > * + * {
70
+ margin-left: 0; // unset negative margin from button-group
71
+ }
72
+
73
+ button.iui-active::after {
74
+ top: auto;
75
+ bottom: $iui-xxs;
76
+ }
77
+ }
78
+
79
+ @mixin iui-paginator-page-button {
80
+ @include iui-button;
81
+ @include iui-button-borderless;
82
+ width: $iui-component-height;
83
+
84
+ &-small {
85
+ @include iui-button-size(small);
86
+ width: $iui-component-height-small;
87
+ }
88
+ }
@@ -37,6 +37,11 @@
37
37
  background-color: t(iui-color-background-3);
38
38
  }
39
39
  }
40
+
41
+ &:focus {
42
+ outline-width: 2px;
43
+ outline-offset: -2px;
44
+ }
40
45
  }
41
46
 
42
47
  @at-root {
@@ -49,14 +49,7 @@
49
49
  }
50
50
  }
51
51
 
52
- &:focus {
53
- outline: 1px solid t(iui-color-foreground-primary);
54
- outline-offset: -1px;
55
- }
56
-
57
- &:focus:not(:focus-visible) {
58
- outline: none;
59
- }
52
+ @include iui-focus;
60
53
  }
61
54
 
62
55
  .iui-tab-icon {
package/scss/tag/tag.scss CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  @mixin iui-tag {
8
8
  @include iui-reset;
9
- @include iui-focus;
9
+ @include iui-focus($offset: -2px, $thickness: 2px);
10
10
  user-select: all;
11
11
  text-transform: lowercase;
12
12
  display: inline-flex;
@@ -58,6 +58,10 @@
58
58
  }
59
59
  }
60
60
  }
61
+
62
+ &.iui-basic {
63
+ outline-offset: 1px;
64
+ }
61
65
  }
62
66
 
63
67
  @mixin iui-tag-container {
@@ -65,6 +69,10 @@
65
69
  color: t(iui-text-color-muted);
66
70
  }
67
71
 
72
+ > a.iui-basic {
73
+ margin: $iui-xxs;
74
+ }
75
+
68
76
  > .iui-tag:not(:last-child) {
69
77
  margin-right: $iui-xs;
70
78
  }
@@ -56,6 +56,7 @@
56
56
  &.iui-selected {
57
57
  font-weight: $iui-font-weight-semibold;
58
58
  cursor: default;
59
+ @include iui-focus($color: var(--iui-color-foreground-accessory), $offset: -3px);
59
60
  @include themed {
60
61
  background-color: t(iui-color-background-primary);
61
62
  color: t(iui-color-foreground-accessory);
@@ -36,9 +36,12 @@
36
36
  }
37
37
  }
38
38
 
39
- > .iui-anchor,
39
+ > .iui-anchor {
40
+ outline-color: var(--iui-color-foreground-#{$category});
41
+ }
42
+
40
43
  > .iui-button {
41
- @include iui-focus(iui-focus-#{$category}-box-shadow);
44
+ outline-color: var(--iui-color-foreground-#{$category});
42
45
  }
43
46
  }
44
47
  }
@@ -59,7 +59,6 @@
59
59
  user-select: none;
60
60
  text-decoration: underline;
61
61
  white-space: nowrap;
62
- @include iui-focus;
63
62
 
64
63
  &:hover {
65
64
  text-decoration: none;
@@ -109,8 +109,7 @@
109
109
  }
110
110
  }
111
111
 
112
- &:hover:not(:disabled),
113
- &:focus {
112
+ &:hover:not(:disabled) {
114
113
  ~ .iui-toggle {
115
114
  @include themed {
116
115
  border-color: t(iui-color-background-primary);
@@ -168,8 +167,13 @@
168
167
  // Focus on non-disabled toggle switch
169
168
  &:enabled:focus ~ .iui-toggle {
170
169
  @include themed {
171
- box-shadow: t(iui-focus-box-shadow);
170
+ outline: 1px solid t(iui-color-foreground-primary);
172
171
  }
172
+ outline-offset: 1px;
173
+ }
174
+
175
+ &:enabled:focus:not(:focus-visible) ~ .iui-toggle {
176
+ outline: none;
173
177
  }
174
178
  }
175
179
 
@@ -85,9 +85,9 @@ $iui-expander-button-width: ($iui-icons-default) + ($iui-expander-inline-padding
85
85
 
86
86
  &:focus {
87
87
  @include themed {
88
- outline: thin solid rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-4));
89
- outline-offset: -1px;
88
+ outline: 1px solid t(iui-color-foreground-primary);
90
89
  }
90
+ outline-offset: -1px;
91
91
  }
92
92
 
93
93
  &:focus:not(:focus-visible) {
@@ -115,16 +115,16 @@
115
115
  outline: 0;
116
116
 
117
117
  .iui-wizard-circle {
118
- outline: 0;
119
118
  @include themed {
120
- box-shadow: t(iui-focus-positive-box-shadow);
119
+ outline: 2px solid t(iui-color-foreground-positive);
121
120
  }
121
+ outline-offset: -1px;
122
122
  }
123
123
  }
124
124
 
125
125
  &:focus:not(:focus-visible) {
126
126
  .iui-wizard-circle {
127
- box-shadow: none;
127
+ outline: none;
128
128
  }
129
129
  }
130
130
  }