@itwin/itwinui-css 0.51.0 → 0.53.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 (77) hide show
  1. package/css/alert.css +44 -44
  2. package/css/all.css +1797 -982
  3. package/css/badge.css +1 -1
  4. package/css/blockquote.css +2 -2
  5. package/css/breadcrumbs.css +12 -12
  6. package/css/button.css +40 -39
  7. package/css/carousel.css +24 -36
  8. package/css/code.css +5 -5
  9. package/css/color-picker.css +14 -10
  10. package/css/date-picker.css +402 -46
  11. package/css/expandable-block.css +19 -19
  12. package/css/fieldset.css +4 -4
  13. package/css/file-upload.css +11 -11
  14. package/css/footer.css +2 -2
  15. package/css/global.css +539 -208
  16. package/css/header.css +50 -38
  17. package/css/icon.css +24 -24
  18. package/css/information-panel.css +15 -8
  19. package/css/inputs.css +72 -72
  20. package/css/keyboard.css +4 -4
  21. package/css/location-marker.css +9 -9
  22. package/css/menu.css +25 -12
  23. package/css/modal.css +65 -6
  24. package/css/notification-marker.css +28 -28
  25. package/css/progress-indicator.css +32 -32
  26. package/css/side-navigation.css +18 -18
  27. package/css/skip-to-content.css +1 -1
  28. package/css/slider.css +13 -13
  29. package/css/surface.css +19 -0
  30. package/css/table.css +78 -74
  31. package/css/tabs.css +23 -23
  32. package/css/tag.css +4 -4
  33. package/css/text.css +1 -1
  34. package/css/tile.css +35 -35
  35. package/css/time-picker.css +15 -15
  36. package/css/toast-notification.css +34 -34
  37. package/css/tooltip.css +3 -1
  38. package/css/tree.css +7 -7
  39. package/css/user-icon.css +50 -28
  40. package/css/wizard.css +26 -26
  41. package/package.json +1 -1
  42. package/scss/button/button-group.scss +5 -3
  43. package/scss/button/classes.scss +4 -0
  44. package/scss/carousel/carousel.scss +22 -28
  45. package/scss/classes.scss +1 -0
  46. package/scss/color-picker/color-picker.scss +2 -2
  47. package/scss/date-picker/classes.scss +20 -0
  48. package/scss/date-picker/date-picker.scss +194 -33
  49. package/scss/fieldset/fieldset.scss +1 -1
  50. package/scss/header/header.scss +15 -10
  51. package/scss/index.scss +1 -0
  52. package/scss/information-panel/information-panel.scss +10 -3
  53. package/scss/menu/classes.scss +2 -1
  54. package/scss/menu/menu.scss +8 -11
  55. package/scss/modal/classes.scss +8 -0
  56. package/scss/modal/modal.scss +81 -6
  57. package/scss/progress-indicator/linear.scss +1 -1
  58. package/scss/progress-indicator/radial.scss +1 -1
  59. package/scss/side-navigation/side-navigation.scss +5 -5
  60. package/scss/slider/slider.scss +2 -2
  61. package/scss/style/elevation.scss +5 -5
  62. package/scss/style/global.scss +32 -21
  63. package/scss/style/mixins.scss +1 -1
  64. package/scss/style/ripple.scss +1 -1
  65. package/scss/style/speed.scss +1 -0
  66. package/scss/style/theme.scss +248 -65
  67. package/scss/surface/classes.scss +7 -0
  68. package/scss/surface/index.scss +3 -0
  69. package/scss/surface/surface.scss +18 -0
  70. package/scss/table/column-filter.scss +2 -2
  71. package/scss/table/table.scss +3 -3
  72. package/scss/tile/tile.scss +5 -5
  73. package/scss/time-picker/time-picker.scss +2 -2
  74. package/scss/tooltip/tooltip.scss +2 -1
  75. package/scss/user-icon/sizes.scss +8 -0
  76. package/scss/user-icon/user-icon.scss +40 -21
  77. package/scss/wizard/wizard.scss +1 -1
@@ -11,6 +11,7 @@
11
11
  @mixin iui-information-panel {
12
12
  position: absolute;
13
13
  opacity: 0;
14
+ visibility: hidden;
14
15
  display: flex;
15
16
  flex-direction: column;
16
17
  box-sizing: border-box;
@@ -18,7 +19,8 @@
18
19
  max-height: 100%;
19
20
  z-index: 2; // Needs to be higher than table's column resizers.
20
21
  @media (prefers-reduced-motion: no-preference) {
21
- transition: transform $iui-speed-fast ease-out, opacity $iui-speed-fast ease;
22
+ transition: visibility $iui-speed-instant $iui-speed-fast ease-in, transform $iui-speed-fast ease-out,
23
+ opacity $iui-speed-fast ease;
22
24
  }
23
25
 
24
26
  @include themed {
@@ -32,7 +34,7 @@
32
34
 
33
35
  > .iui-resizer-bar {
34
36
  @include themed {
35
- background-color: t(iui-color-background-5);
37
+ background-color: t(iui-color-background-border);
36
38
  }
37
39
  }
38
40
 
@@ -100,7 +102,7 @@
100
102
 
101
103
  > hr {
102
104
  @include themed {
103
- border-color: t(iui-color-background-4);
105
+ border-color: t(iui-color-background-border);
104
106
  }
105
107
  }
106
108
  }
@@ -108,8 +110,13 @@
108
110
 
109
111
  @mixin iui-information-panel-visible {
110
112
  opacity: 1;
113
+ visibility: visible;
111
114
  transform: translate(0);
112
115
 
116
+ @media (prefers-reduced-motion: no-preference) {
117
+ transition: transform $iui-speed-fast ease-out, opacity $iui-speed-fast ease;
118
+ }
119
+
113
120
  > .iui-resizer {
114
121
  display: flex;
115
122
  }
@@ -1,9 +1,10 @@
1
1
  // Copyright (c) Bentley Systems, Incorporated. All rights reserved.
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './index';
4
+ @import '../surface/index';
4
5
 
5
6
  .iui-menu {
6
- @include iui-dropdown;
7
+ @include iui-surface;
7
8
  @include iui-list-menu;
8
9
  }
9
10
 
@@ -5,16 +5,8 @@
5
5
 
6
6
  $iui-active-outline: thin solid t(iui-color-foreground-primary);
7
7
 
8
- @mixin iui-dropdown {
9
- @include iui-reset;
10
- box-shadow: $iui-elevation-2;
11
- @include themed {
12
- background-color: t(iui-color-background-1);
13
- color: t(iui-text-color);
14
- }
15
- }
16
-
17
8
  @mixin iui-list-menu {
9
+ @include iui-reset;
18
10
  list-style-type: none;
19
11
  user-select: none;
20
12
  width: 100%;
@@ -111,12 +103,17 @@ $iui-active-outline: thin solid t(iui-color-foreground-primary);
111
103
  &,
112
104
  &:hover {
113
105
  @include themed {
114
- background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-5));
106
+ background-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
107
+ color: t(iui-color-foreground-primary);
115
108
  outline: $iui-active-outline;
116
109
  outline-offset: -1px;
117
110
  }
118
111
  }
119
112
 
113
+ .iui-menu-description {
114
+ opacity: 1;
115
+ }
116
+
120
117
  > .iui-icon {
121
118
  @include themed {
122
119
  fill: t(iui-icons-color-primary);
@@ -163,7 +160,7 @@ $iui-active-outline: thin solid t(iui-color-foreground-primary);
163
160
  width: calc(100% - #{$iui-l});
164
161
  margin: 1px auto;
165
162
  @include themed {
166
- background-color: t(iui-color-background-4);
163
+ background-color: t(iui-color-background-border);
167
164
  }
168
165
  }
169
166
 
@@ -4,4 +4,12 @@
4
4
 
5
5
  .iui-modal {
6
6
  @include iui-modal;
7
+
8
+ &-full-page {
9
+ @include iui-modal-full-page;
10
+ }
11
+
12
+ &-animation {
13
+ @include iui-modal-animation;
14
+ }
7
15
  }
@@ -11,14 +11,24 @@
11
11
  left: 0;
12
12
  width: 100%;
13
13
  height: 100%;
14
+ @include themed {
15
+ background-color: rgba(0, 0, 0, t(iui-opacity-4));
16
+ }
17
+
18
+ // #region Small Modal Animations for CSS
14
19
  visibility: hidden;
15
20
  opacity: 0;
16
21
  @media (prefers-reduced-motion: no-preference) {
17
- transition: visibility 0s linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
22
+ transition: visibility $iui-speed-instant linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
18
23
  }
19
- @include themed {
20
- background-color: rgba(0, 0, 0, t(iui-opacity-4));
24
+
25
+ &.iui-modal-visible {
26
+ visibility: visible;
27
+ opacity: 1;
28
+ // remove delay for entry animation so it's instantly visible
29
+ transition-delay: $iui-speed-instant;
21
30
  }
31
+ // #endregion Small Modal Animations for CSS
22
32
 
23
33
  > .iui-modal-dialog {
24
34
  position: absolute;
@@ -27,10 +37,12 @@
27
37
  transform: translate(-50%, -33%);
28
38
  z-index: 1000;
29
39
  max-width: 50%;
30
- min-width: 400px;
40
+ min-width: 380px;
41
+ max-height: 100vh;
31
42
  border-radius: $iui-border-radius;
32
43
  box-shadow: $iui-elevation-24;
33
44
  padding: $iui-baseline $iui-m;
45
+ box-sizing: border-box;
34
46
 
35
47
  @include themed {
36
48
  background-color: t(iui-color-background-1);
@@ -67,11 +79,74 @@
67
79
  margin-right: $iui-s;
68
80
  }
69
81
  }
82
+
83
+ .iui-modal-content {
84
+ flex-grow: 2;
85
+ margin: 0 -#{$iui-m};
86
+ padding: 0 $iui-m;
87
+ overflow-y: auto;
88
+ overflow-y: overlay;
89
+ }
70
90
  }
91
+ }
71
92
 
72
- &.iui-modal-visible {
93
+ @mixin iui-modal-full-page {
94
+ > .iui-modal-dialog {
95
+ display: flex;
96
+ flex-direction: column;
97
+ height: 100vh;
98
+ width: 100vw;
99
+ left: 0;
100
+ top: 0;
101
+ transform: none;
102
+ max-width: initial;
103
+ min-width: initial;
104
+ border-radius: 0;
105
+ will-change: transform;
106
+ }
107
+
108
+ // #region Full Page Modal Animations for CSS
109
+ @media (prefers-reduced-motion: no-preference) {
110
+ transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed ease-out $iui-speed-fast;
111
+ }
112
+
113
+ > .iui-modal-dialog {
114
+ transform: translateY(100%);
115
+ @media (prefers-reduced-motion: no-preference) {
116
+ transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
117
+ transform $iui-speed ease-in;
118
+ }
119
+ }
120
+
121
+ &.iui-modal-visible > .iui-modal-dialog {
122
+ transform: translateY(0);
123
+ @media (prefers-reduced-motion: no-preference) {
124
+ transition: transform $iui-speed ease-out;
125
+ }
126
+ }
127
+ // #endregion Full Page Modal Animations for CSS
128
+ }
129
+
130
+ @mixin iui-modal-animation {
131
+ // Full Page Modal Animations for React
132
+ &-enter .iui-modal .iui-modal-dialog {
133
+ transform: translateY(100%);
134
+ opacity: 0;
135
+ }
136
+
137
+ &-enter-active .iui-modal .iui-modal-dialog {
138
+ transform: translateY(0);
139
+ opacity: 1;
140
+ }
141
+
142
+ // Small Modal Animations for React
143
+ &-enter .iui-modal {
144
+ visibility: hidden;
145
+ opacity: 0;
146
+ }
147
+
148
+ &-enter-active .iui-modal {
73
149
  visibility: visible;
74
150
  opacity: 1;
75
- transition-delay: 0s;
76
151
  }
77
152
  }
@@ -13,7 +13,7 @@
13
13
  overflow: hidden;
14
14
 
15
15
  @include themed {
16
- background-color: t(iui-color-background-5);
16
+ background-color: t(iui-color-background-border);
17
17
  }
18
18
 
19
19
  > .iui-fill {
@@ -27,7 +27,7 @@
27
27
  animation: dash $iui-speed-slow linear infinite;
28
28
 
29
29
  @include themed {
30
- border-bottom-color: t(iui-color-background-5);
30
+ border-bottom-color: t(iui-color-background-border);
31
31
  }
32
32
  }
33
33
 
@@ -14,7 +14,7 @@
14
14
  }
15
15
  @include themed {
16
16
  background-color: t(iui-color-background-3);
17
- border-right: 1px solid t(iui-color-background-5);
17
+ border-right: 1px solid t(iui-color-background-border);
18
18
  }
19
19
 
20
20
  > .iui-sidenav-content {
@@ -51,7 +51,7 @@
51
51
  + .iui-sidenav-button.iui-expand {
52
52
  border: none;
53
53
  @include themed {
54
- border-top: 1px solid t(iui-color-background-5);
54
+ border-top: 1px solid t(iui-color-background-border);
55
55
  }
56
56
  }
57
57
  }
@@ -105,7 +105,7 @@
105
105
  &:hover,
106
106
  &[disabled] {
107
107
  @include themed {
108
- border-color: t(iui-color-background-5);
108
+ border-color: t(iui-color-background-border);
109
109
  }
110
110
  }
111
111
 
@@ -133,7 +133,7 @@
133
133
  justify-content: center;
134
134
  border: none;
135
135
  @include themed {
136
- border-bottom: 1px solid t(iui-color-background-5);
136
+ border-bottom: 1px solid t(iui-color-background-border);
137
137
  }
138
138
 
139
139
  > .iui-button-icon {
@@ -157,7 +157,7 @@
157
157
  resize: horizontal;
158
158
  @include themed {
159
159
  background-color: t(iui-color-background-1);
160
- border-right: 1px solid t(iui-color-background-5);
160
+ border-right: 1px solid t(iui-color-background-border);
161
161
  }
162
162
 
163
163
  @include iui-transition-group;
@@ -53,7 +53,7 @@ $tick-height: $iui-baseline; // 11px
53
53
  height: $track-height;
54
54
  top: $iui-sm;
55
55
  @include themed {
56
- background-color: t(iui-color-background-4);
56
+ background-color: t(iui-color-background-border);
57
57
  }
58
58
  }
59
59
 
@@ -71,7 +71,7 @@ $tick-height: $iui-baseline; // 11px
71
71
  @include iui-focus($thickness: 2px);
72
72
  @include themed {
73
73
  background: t(iui-color-background-1);
74
- border: 1px solid t(iui-color-background-5);
74
+ border: 1px solid t(iui-color-background-border);
75
75
  }
76
76
 
77
77
  &:active {
@@ -3,8 +3,8 @@
3
3
  /// Elevations:
4
4
 
5
5
  $iui-elevation-0: 0;
6
- $iui-elevation-2: 0 1px 5px rgba(0, 0, 0, 0.25);
7
- $iui-elevation-4: 0 1px 10px rgba(0, 0, 0, 0.25);
8
- $iui-elevation-8: 0 3px 14px rgba(0, 0, 0, 0.25);
9
- $iui-elevation-16: 0 6px 30px rgba(0, 0, 0, 0.25);
10
- $iui-elevation-24: 0 9px 46px rgba(0, 0, 0, 0.25);
6
+ $iui-elevation-2: 0 1px 5px hsla(200, 12%, 0%, 0.25);
7
+ $iui-elevation-4: 0 1px 10px hsla(200, 12%, 0%, 0.25);
8
+ $iui-elevation-8: 0 3px 14px hsla(200, 12%, 0%, 0.25);
9
+ $iui-elevation-16: 0 6px 30px hsla(200, 12%, 0%, 0.25);
10
+ $iui-elevation-24: 0 9px 46px hsla(200, 12%, 0%, 0.25);
@@ -2,6 +2,38 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  @import './index';
4
4
 
5
+ html {
6
+ @include theme-variables(light);
7
+
8
+ @media (prefers-color-scheme: dark) {
9
+ @include theme-variables(dark);
10
+ }
11
+
12
+ @media (prefers-color-scheme: light) and (prefers-contrast: more) {
13
+ @include theme-variables(light-hc);
14
+ }
15
+
16
+ @media (prefers-color-scheme: dark) and (prefers-contrast: more) {
17
+ @include theme-variables(dark-hc);
18
+ }
19
+
20
+ &.iui-theme-light {
21
+ @include theme-variables(light);
22
+ }
23
+
24
+ &.iui-theme-dark {
25
+ @include theme-variables(dark);
26
+ }
27
+
28
+ &.iui-theme-light-hc {
29
+ @include theme-variables(light-hc);
30
+ }
31
+
32
+ &.iui-theme-dark-hc {
33
+ @include theme-variables(dark-hc);
34
+ }
35
+ }
36
+
5
37
  .iui-body {
6
38
  @include themed {
7
39
  background-color: t(iui-color-background-2);
@@ -31,24 +63,3 @@
31
63
  // Scrollbar
32
64
  @include iui-scrollbar;
33
65
  }
34
-
35
- html {
36
- &,
37
- &.iui-theme-light {
38
- @include theme-variables(light);
39
- }
40
-
41
- &.iui-theme-dark {
42
- @include theme-variables(dark);
43
- }
44
-
45
- @media (prefers-color-scheme: light) {
46
- // fall back to default - light theme variables
47
- }
48
-
49
- @media (prefers-color-scheme: dark) {
50
- &:not([class*='iui-theme-']) {
51
- @include theme-variables(dark);
52
- }
53
- }
54
- }
@@ -67,7 +67,7 @@
67
67
  &::selection,
68
68
  *::selection {
69
69
  @include themed {
70
- background-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-4));
70
+ background-color: rgba(t(iui-color-foreground-#{$status}-rgb), t(iui-opacity-5));
71
71
  }
72
72
  }
73
73
  }
@@ -13,6 +13,6 @@
13
13
  &:active {
14
14
  background-color: $rippleColor;
15
15
  background-size: 100%;
16
- transition: background 0s;
16
+ transition: background $iui-speed-instant;
17
17
  }
18
18
  }
@@ -2,6 +2,7 @@
2
2
  // See LICENSE.md in the project root for license terms and full copyright notice.
3
3
  /// Animation speed:
4
4
 
5
+ $iui-speed-instant: 0s;
5
6
  $iui-speed-fast: 0.2s;
6
7
  $iui-speed: 0.4s;
7
8
  $iui-speed-slow: 0.8s;