@itwin/itwinui-css 0.43.0 → 0.45.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 (71) hide show
  1. package/css/alert.css +46 -61
  2. package/css/all.css +1065 -907
  3. package/css/breadcrumbs.css +7 -20
  4. package/css/button.css +48 -91
  5. package/css/carousel.css +97 -0
  6. package/css/code.css +6 -9
  7. package/css/color-picker.css +14 -14
  8. package/css/date-picker.css +91 -85
  9. package/css/expandable-block.css +13 -9
  10. package/css/file-upload.css +4 -3
  11. package/css/footer.css +7 -20
  12. package/css/global.css +7 -9
  13. package/css/header.css +4 -24
  14. package/css/inputs.css +121 -89
  15. package/css/popover.css +12 -0
  16. package/css/side-navigation.css +1 -16
  17. package/css/slider.css +7 -10
  18. package/css/table.css +160 -29
  19. package/css/tabs.css +8 -3
  20. package/css/tag.css +17 -18
  21. package/css/tile.css +340 -314
  22. package/css/time-picker.css +26 -18
  23. package/css/toast-notification.css +12 -49
  24. package/css/toggle-switch.css +7 -4
  25. package/css/tree.css +12 -8
  26. package/css/wizard.css +4 -4
  27. package/package.json +10 -9
  28. package/scss/alert/alert.scss +4 -2
  29. package/scss/button/borderless.scss +10 -26
  30. package/scss/button/button-group.scss +2 -2
  31. package/scss/button/cta.scss +10 -25
  32. package/scss/button/default.scss +22 -32
  33. package/scss/button/high-visibility.scss +10 -25
  34. package/scss/carousel/carousel.scss +119 -0
  35. package/scss/carousel/classes.scss +15 -0
  36. package/scss/carousel/index.scss +3 -0
  37. package/scss/classes.scss +2 -0
  38. package/scss/color-picker/color-picker.scss +2 -25
  39. package/scss/date-picker/classes.scss +20 -0
  40. package/scss/date-picker/date-picker.scss +88 -100
  41. package/scss/expandable-block/block.scss +1 -0
  42. package/scss/file-upload/file-upload.scss +2 -2
  43. package/scss/footer/footer.scss +0 -2
  44. package/scss/header/header.scss +1 -15
  45. package/scss/index.scss +2 -0
  46. package/scss/inputs/checkbox-radio.scss +28 -18
  47. package/scss/inputs/checkbox.scss +9 -8
  48. package/scss/inputs/input.scss +1 -14
  49. package/scss/inputs/labeled-inputs.scss +2 -1
  50. package/scss/inputs/radio-tile.scss +9 -4
  51. package/scss/inputs/select.scss +2 -1
  52. package/scss/popover/classes.scss +7 -0
  53. package/scss/popover/index.scss +3 -0
  54. package/scss/popover/popover.scss +22 -0
  55. package/scss/side-navigation/side-navigation.scss +1 -33
  56. package/scss/slider/slider.scss +1 -2
  57. package/scss/style/mixins.scss +14 -16
  58. package/scss/table/classes.scss +12 -0
  59. package/scss/table/paginator.scss +39 -31
  60. package/scss/table/table.scss +1 -1
  61. package/scss/tabs/default.scss +5 -0
  62. package/scss/tabs/tabs.scss +1 -8
  63. package/scss/tag/tag.scss +9 -1
  64. package/scss/tile/classes.scss +28 -0
  65. package/scss/tile/tile.scss +230 -235
  66. package/scss/time-picker/time-picker.scss +1 -0
  67. package/scss/toast-notification/categories.scss +5 -2
  68. package/scss/toast-notification/toast.scss +0 -1
  69. package/scss/toggle-switch/toggle-switch.scss +7 -3
  70. package/scss/tree/tree.scss +2 -14
  71. package/scss/wizard/wizard.scss +3 -3
@@ -0,0 +1,22 @@
1
+ // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
+ // See LICENSE.md in the project root for license terms and full copyright notice.
3
+ @import '../style/index';
4
+
5
+ // tippy.js helper class to hide Popover when it is scrolled out of view
6
+ @mixin iui-popover {
7
+ &[data-reference-hidden] {
8
+ visibility: hidden;
9
+ pointer-events: none;
10
+ }
11
+
12
+ // Resets tippy.js default stylings that interfere with our own
13
+ /* stylelint-disable-next-line selector-class-pattern */
14
+ &.tippy-box {
15
+ all: revert;
16
+ }
17
+
18
+ /* stylelint-disable-next-line selector-class-pattern */
19
+ .tippy-content {
20
+ all: revert;
21
+ }
22
+ }
@@ -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
+ }
@@ -135,7 +135,7 @@
135
135
  background-color: t(iui-color-background-1);
136
136
  }
137
137
 
138
- &.iui-zebra-striping > .iui-row:nth-child(even):not(.iui-selected) {
138
+ &.iui-zebra-striping .iui-row:nth-child(even):not(.iui-selected) {
139
139
  @include themed {
140
140
  background-color: rgba(t(iui-color-foreground-body-rgb), 0.02);
141
141
  }
@@ -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
  }
@@ -5,3 +5,31 @@
5
5
  .iui-tile {
6
6
  @include iui-tile;
7
7
  }
8
+
9
+ .iui-tile-thumbnail-type-indicator {
10
+ @include iui-tile-thumbnail-type-indicator;
11
+ }
12
+
13
+ .iui-tile-thumbnail-quick-action {
14
+ @include iui-tile-thumbnail-quick-action;
15
+ }
16
+
17
+ .iui-tile-thumbnail-badge-container {
18
+ @include iui-tile-thumbnail-badge;
19
+ }
20
+
21
+ .iui-tile-buttons {
22
+ @include iui-tile-buttons;
23
+ }
24
+
25
+ .iui-tile-thumbnail {
26
+ @include iui-tile-thumbnail;
27
+ }
28
+
29
+ .iui-tile-thumbnail-picture {
30
+ @include iui-tile-thumbnail-picture;
31
+ }
32
+
33
+ .iui-tile-content {
34
+ @include iui-tile-content;
35
+ }