@itwin/itwinui-css 0.57.0 → 0.58.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.
@@ -0,0 +1,213 @@
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
+ @import '../icon/index';
5
+
6
+ @mixin iui-dialog-backdrop {
7
+ @include iui-reset;
8
+ z-index: 999;
9
+ isolation: isolate;
10
+ position: fixed;
11
+ top: 0;
12
+ left: 0;
13
+ width: 100%;
14
+ height: 100%;
15
+ @include themed {
16
+ background-color: rgba(0, 0, 0, t(iui-opacity-4));
17
+ }
18
+
19
+ // Small/Resizable Dialog Animations for CSS
20
+ visibility: hidden;
21
+ opacity: 0;
22
+ transition: visibility $iui-speed-instant linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
23
+
24
+ &.iui-dialog-visible {
25
+ visibility: visible;
26
+ opacity: 1;
27
+ // remove delay for entry animation so dialog is instantly visible
28
+ transition-delay: $iui-speed-instant;
29
+ }
30
+ }
31
+
32
+ @mixin iui-dialog-backdrop-relative {
33
+ position: relative;
34
+ overflow: hidden;
35
+ }
36
+
37
+ @mixin iui-dialog {
38
+ border-radius: $iui-border-radius;
39
+ box-shadow: $iui-elevation-24;
40
+ box-sizing: border-box;
41
+ position: absolute;
42
+ padding: $iui-baseline $iui-m;
43
+ box-sizing: border-box;
44
+ padding: $iui-baseline $iui-m;
45
+ overflow: hidden;
46
+ @include themed {
47
+ background-color: t(iui-color-background-1);
48
+ }
49
+ @media (forced-colors: active) {
50
+ border: 1px solid;
51
+ }
52
+ }
53
+
54
+ @mixin iui-dialog-default {
55
+ .iui-dialog {
56
+ left: 50%;
57
+ top: 33%;
58
+ transform: translate(-50%, -33%);
59
+ max-width: 50%;
60
+ min-width: 380px;
61
+ max-height: 100vh;
62
+
63
+ @media screen and (max-width: 400px) {
64
+ max-width: 95%;
65
+ width: 95%;
66
+ min-width: 95%;
67
+ }
68
+ }
69
+ }
70
+
71
+ @mixin iui-dialog-full-page {
72
+ @media (prefers-reduced-motion: no-preference) {
73
+ transition: visibility $iui-speed-instant linear $iui-speed-slow, opacity $iui-speed ease-out $iui-speed-fast;
74
+ }
75
+
76
+ .iui-dialog {
77
+ border-radius: 0;
78
+ height: 100vh;
79
+ width: 100vw;
80
+ top: 0;
81
+ left: 0;
82
+ max-width: initial;
83
+ min-width: initial;
84
+ display: flex;
85
+ flex-direction: column;
86
+ will-change: transform;
87
+ @media (prefers-reduced-motion: no-preference) {
88
+ transform: translateY(100%);
89
+ transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
90
+ transform $iui-speed-fast ease-in;
91
+ }
92
+ }
93
+
94
+ &.iui-dialog-visible .iui-dialog {
95
+ transform: translateY(0);
96
+ @media (prefers-reduced-motion: no-preference) {
97
+ transition: transform $iui-speed ease-out;
98
+ }
99
+ }
100
+ }
101
+
102
+ @mixin iui-dialog-draggable {
103
+ background-color: transparent;
104
+ pointer-events: none;
105
+ z-index: 998;
106
+
107
+ .iui-dialog {
108
+ pointer-events: initial;
109
+ max-width: 100vw;
110
+ max-height: 100vh;
111
+ min-width: 380px;
112
+ min-height: 144px;
113
+ display: flex;
114
+ flex-direction: column;
115
+ padding: 0;
116
+ @include themed {
117
+ border: 1px solid t(iui-color-background-border);
118
+ }
119
+ }
120
+ }
121
+
122
+ @mixin iui-dialog-animation {
123
+ // Full Page Dialog Animations for React
124
+ &-enter .iui-dialog-full-page .iui-dialog {
125
+ transform: translateY(100%);
126
+ opacity: 0;
127
+ }
128
+
129
+ &-enter-active .iui-dialog-full-page .iui-dialog {
130
+ transform: translateY(0);
131
+ opacity: 1;
132
+ }
133
+
134
+ // Small Dialog Animations for React
135
+ &-enter .iui-dialog-backdrop {
136
+ visibility: hidden;
137
+ opacity: 0;
138
+ }
139
+
140
+ &-enter-active .iui-dialog-backdrop {
141
+ visibility: visible;
142
+ opacity: 1;
143
+ }
144
+ }
145
+
146
+ @mixin iui-dialog-title {
147
+ font-size: inherit;
148
+ white-space: nowrap;
149
+ overflow: hidden;
150
+ text-overflow: ellipsis;
151
+ line-height: 1.5;
152
+ }
153
+
154
+ @mixin iui-dialog-title-bar {
155
+ display: flex;
156
+ align-items: center;
157
+ margin-bottom: $iui-baseline;
158
+ justify-content: space-between;
159
+ box-sizing: border-box;
160
+ font-size: $iui-font-size-subheading;
161
+
162
+ @at-root .iui-dialog-draggable & {
163
+ user-select: none;
164
+ font-size: $iui-font-size-leading;
165
+ padding: round($iui-baseline * 0.5) $iui-m;
166
+ cursor: grab;
167
+ @include themed {
168
+ background-color: t(iui-color-background-3);
169
+ border-bottom: 1px solid t(iui-color-background-border);
170
+ }
171
+
172
+ &:active {
173
+ cursor: grabbing;
174
+ }
175
+ }
176
+ }
177
+
178
+ @mixin iui-dialog-content {
179
+ flex-grow: 2;
180
+ margin: 0 -#{$iui-m};
181
+ padding: 0 $iui-m;
182
+ overflow-y: auto;
183
+ overflow-y: overlay;
184
+
185
+ @at-root .iui-dialog-draggable & {
186
+ margin: 0;
187
+ }
188
+ }
189
+
190
+ @mixin iui-dialog-button-bar {
191
+ margin-top: $iui-baseline;
192
+ display: flex;
193
+ align-items: center;
194
+ justify-content: flex-end;
195
+
196
+ @at-root .iui-dialog-draggable & {
197
+ padding: 0 $iui-m $iui-baseline $iui-m;
198
+ }
199
+
200
+ // #region IE support
201
+ > .iui-button:not(:last-child) {
202
+ margin-right: $iui-s;
203
+ }
204
+
205
+ @supports (column-gap: $iui-s) {
206
+ column-gap: $iui-s;
207
+
208
+ > .iui-button:not(:last-child) {
209
+ margin-right: 0;
210
+ }
211
+ }
212
+ // #endregion IE support
213
+ }
@@ -1,3 +1,3 @@
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
- @import './modal';
3
+ @import './dialog';
package/scss/index.scss CHANGED
@@ -11,6 +11,7 @@
11
11
  @import './code/index';
12
12
  @import './color-picker/index';
13
13
  @import './date-picker/index';
14
+ @import './dialog/index';
14
15
  @import './expandable-block/index';
15
16
  @import './file-upload/index';
16
17
  @import './footer/index';
@@ -21,7 +22,6 @@
21
22
  @import './keyboard/index';
22
23
  @import './location-marker/index';
23
24
  @import './menu/index';
24
- @import './modal/index';
25
25
  @import './non-ideal-state/index';
26
26
  @import './notification-marker/index';
27
27
  @import './popover/index';
@@ -18,6 +18,10 @@
18
18
  @include iui-table-header;
19
19
  }
20
20
 
21
+ .iui-table-header-actions-container {
22
+ @include iui-table-header-actions-container;
23
+ }
24
+
21
25
  .iui-table-body {
22
26
  @include iui-table-body;
23
27
  }
@@ -37,6 +37,8 @@
37
37
 
38
38
  .iui-cell:not(.iui-slot) {
39
39
  @include iui-focus;
40
+ flex-wrap: wrap;
41
+ column-gap: $iui-xs;
40
42
 
41
43
  &.iui-actionable {
42
44
  cursor: pointer;
@@ -46,8 +48,7 @@
46
48
  cursor: grabbing;
47
49
  }
48
50
 
49
- > .iui-filter-button {
50
- margin-left: $iui-xs;
51
+ .iui-filter-button {
51
52
  margin-right: $iui-s;
52
53
 
53
54
  &:not(.iui-active) {
@@ -155,6 +156,12 @@
155
156
  }
156
157
  }
157
158
 
159
+ @mixin iui-table-header-actions-container {
160
+ display: flex;
161
+ flex-grow: 1;
162
+ align-items: center;
163
+ }
164
+
158
165
  @mixin iui-table-body {
159
166
  overflow-y: scroll;
160
167
  overflow: overlay;
package/css/modal.css DELETED
@@ -1,132 +0,0 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- .iui-modal{
6
- margin:0;
7
- padding:0;
8
- border:none;
9
- vertical-align:baseline;
10
- z-index:999;
11
- position:fixed;
12
- top:0;
13
- left:0;
14
- width:100%;
15
- height:100%;
16
- background-color:rgba(0, 0, 0, 0.4);
17
- background-color:rgba(0, 0, 0, var(--iui-opacity-4));
18
- visibility:hidden;
19
- opacity:0;
20
- }
21
- @media (prefers-reduced-motion: no-preference){
22
- .iui-modal{
23
- transition:visibility 0s linear 0.2s, opacity 0.2s ease-out;
24
- }
25
- }
26
- .iui-modal.iui-modal-visible{
27
- visibility:visible;
28
- opacity:1;
29
- transition-delay:0s;
30
- }
31
- .iui-modal > .iui-modal-dialog{
32
- position:absolute;
33
- left:50%;
34
- top:33%;
35
- transform:translate(-50%, -33%);
36
- z-index:1000;
37
- max-width:50%;
38
- min-width:380px;
39
- max-height:100vh;
40
- border-radius:3px;
41
- box-shadow:0 9px 46px rgba(0, 0, 0, 0.25);
42
- padding:11px 16px;
43
- box-sizing:border-box;
44
- background-color:white;
45
- background-color:var(--iui-color-background-1);
46
- }
47
- @media screen and (max-width: 400px){
48
- .iui-modal > .iui-modal-dialog{
49
- max-width:95%;
50
- width:95%;
51
- min-width:95%;
52
- }
53
- }
54
- .iui-modal > .iui-modal-dialog .iui-title-bar{
55
- display:flex;
56
- align-items:center;
57
- margin-bottom:11px;
58
- justify-content:space-between;
59
- }
60
- .iui-modal > .iui-modal-dialog .iui-title-bar > .iui-title{
61
- font-size:18px;
62
- white-space:nowrap;
63
- overflow:hidden;
64
- text-overflow:ellipsis;
65
- line-height:1.5;
66
- }
67
- .iui-modal > .iui-modal-dialog .iui-button-bar{
68
- margin-top:11px;
69
- display:flex;
70
- align-items:center;
71
- justify-content:flex-end;
72
- }
73
- .iui-modal > .iui-modal-dialog .iui-button-bar > .iui-button:not(:last-child){
74
- margin-right:8px;
75
- }
76
- .iui-modal > .iui-modal-dialog .iui-modal-content{
77
- flex-grow:2;
78
- margin:0 -16px;
79
- padding:0 16px;
80
- overflow-y:auto;
81
- overflow-y:overlay;
82
- }
83
- .iui-modal-full-page > .iui-modal-dialog{
84
- display:flex;
85
- flex-direction:column;
86
- height:100vh;
87
- width:100vw;
88
- left:0;
89
- top:0;
90
- transform:none;
91
- max-width:initial;
92
- min-width:initial;
93
- border-radius:0;
94
- will-change:transform;
95
- }
96
- @media (prefers-reduced-motion: no-preference){
97
- .iui-modal-full-page{
98
- transition:visibility 0s linear 0.8s, opacity 0.4s ease-out 0.2s;
99
- }
100
- }
101
- .iui-modal-full-page > .iui-modal-dialog{
102
- transform:translateY(100%);
103
- }
104
- @media (prefers-reduced-motion: no-preference){
105
- .iui-modal-full-page > .iui-modal-dialog{
106
- transition:visibility 0s linear 0.4s, opacity 0s linear 0.4s, transform 0.25s ease-in;
107
- }
108
- }
109
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
110
- transform:translateY(0);
111
- }
112
- @media (prefers-reduced-motion: no-preference){
113
- .iui-modal-full-page.iui-modal-visible > .iui-modal-dialog{
114
- transition:transform 0.3s ease-out;
115
- }
116
- }
117
- .iui-modal-animation-enter .iui-modal-full-page .iui-modal-dialog{
118
- transform:translateY(100%);
119
- opacity:0;
120
- }
121
- .iui-modal-animation-enter-active .iui-modal-full-page .iui-modal-dialog{
122
- transform:translateY(0);
123
- opacity:1;
124
- }
125
- .iui-modal-animation-enter .iui-modal{
126
- visibility:hidden;
127
- opacity:0;
128
- }
129
- .iui-modal-animation-enter-active .iui-modal{
130
- visibility:visible;
131
- opacity:1;
132
- }
@@ -1,15 +0,0 @@
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 './index';
4
-
5
- .iui-modal {
6
- @include iui-modal;
7
-
8
- &-full-page {
9
- @include iui-modal-full-page;
10
- }
11
-
12
- &-animation {
13
- @include iui-modal-animation;
14
- }
15
- }
@@ -1,155 +0,0 @@
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
- @import '../icon/index';
5
-
6
- @mixin iui-modal {
7
- @include iui-reset;
8
- z-index: 999;
9
- position: fixed;
10
- top: 0;
11
- left: 0;
12
- width: 100%;
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
19
- visibility: hidden;
20
- opacity: 0;
21
- @media (prefers-reduced-motion: no-preference) {
22
- transition: visibility $iui-speed-instant linear $iui-speed-fast, opacity $iui-speed-fast ease-out;
23
- }
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;
30
- }
31
- // #endregion Small Modal Animations for CSS
32
-
33
- > .iui-modal-dialog {
34
- position: absolute;
35
- left: 50%;
36
- top: 33%;
37
- transform: translate(-50%, -33%);
38
- z-index: 1000;
39
- max-width: 50%;
40
- min-width: 380px;
41
- max-height: 100vh;
42
- border-radius: $iui-border-radius;
43
- box-shadow: $iui-elevation-24;
44
- padding: $iui-baseline $iui-m;
45
- box-sizing: border-box;
46
-
47
- @include themed {
48
- background-color: t(iui-color-background-1);
49
- }
50
-
51
- @media screen and (max-width: 400px) {
52
- max-width: 95%;
53
- width: 95%;
54
- min-width: 95%;
55
- }
56
-
57
- .iui-title-bar {
58
- display: flex;
59
- align-items: center;
60
- margin-bottom: $iui-baseline;
61
- justify-content: space-between;
62
-
63
- > .iui-title {
64
- font-size: $iui-font-size-subheading;
65
- white-space: nowrap;
66
- overflow: hidden;
67
- text-overflow: ellipsis;
68
- line-height: 1.5;
69
- }
70
- }
71
-
72
- .iui-button-bar {
73
- margin-top: $iui-baseline;
74
- display: flex;
75
- align-items: center;
76
- justify-content: flex-end;
77
-
78
- > .iui-button:not(:last-child) {
79
- margin-right: $iui-s;
80
- }
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
- }
90
- }
91
- }
92
-
93
- @mixin iui-modal-full-page {
94
- $iui-full-page-modal-slide-in-speed: 0.3s;
95
- $iui-full-page-modal-slide-out-speed: 0.25s;
96
-
97
- > .iui-modal-dialog {
98
- display: flex;
99
- flex-direction: column;
100
- height: 100vh;
101
- width: 100vw;
102
- left: 0;
103
- top: 0;
104
- transform: none;
105
- max-width: initial;
106
- min-width: initial;
107
- border-radius: 0;
108
- will-change: transform;
109
- }
110
-
111
- // #region Full Page Modal Animations for CSS
112
- @media (prefers-reduced-motion: no-preference) {
113
- transition: visibility $iui-speed-instant linear $iui-speed-slow, opacity $iui-speed ease-out $iui-speed-fast;
114
- }
115
-
116
- > .iui-modal-dialog {
117
- transform: translateY(100%);
118
- @media (prefers-reduced-motion: no-preference) {
119
- transition: visibility $iui-speed-instant linear $iui-speed, opacity $iui-speed-instant linear $iui-speed,
120
- transform $iui-full-page-modal-slide-out-speed ease-in;
121
- }
122
- }
123
-
124
- &.iui-modal-visible > .iui-modal-dialog {
125
- transform: translateY(0);
126
- @media (prefers-reduced-motion: no-preference) {
127
- transition: transform $iui-full-page-modal-slide-in-speed ease-out;
128
- }
129
- }
130
- // #endregion Full Page Modal Animations for CSS
131
- }
132
-
133
- @mixin iui-modal-animation {
134
- // Full Page Modal Animations for React
135
- &-enter .iui-modal-full-page .iui-modal-dialog {
136
- transform: translateY(100%);
137
- opacity: 0;
138
- }
139
-
140
- &-enter-active .iui-modal-full-page .iui-modal-dialog {
141
- transform: translateY(0);
142
- opacity: 1;
143
- }
144
-
145
- // Small Modal Animations for React
146
- &-enter .iui-modal {
147
- visibility: hidden;
148
- opacity: 0;
149
- }
150
-
151
- &-enter-active .iui-modal {
152
- visibility: visible;
153
- opacity: 1;
154
- }
155
- }