@box/blueprint-web 12.99.1 → 12.100.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/dist/lib-esm/index.css
CHANGED
|
@@ -6977,7 +6977,7 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
6977
6977
|
display:inline;
|
|
6978
6978
|
}
|
|
6979
6979
|
|
|
6980
|
-
.bp_modal_module_overlay--
|
|
6980
|
+
.bp_modal_module_overlay--86b04[data-modern=false]{
|
|
6981
6981
|
--modal-body-text-color:var(--text-text-on-light);
|
|
6982
6982
|
--modal-overlay-background:var(--overlay-modal-overlay);
|
|
6983
6983
|
--modal-content-background:var(--gray-white);
|
|
@@ -7018,7 +7018,7 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7018
7018
|
--modal-loading-animation:var(--animation-duration-2) cubic-bezier(.25, .46, .45, .94);
|
|
7019
7019
|
}
|
|
7020
7020
|
|
|
7021
|
-
.bp_modal_module_overlay--
|
|
7021
|
+
.bp_modal_module_overlay--86b04[data-modern=true]{
|
|
7022
7022
|
--modal-overlay-background:var(--bp-overlay-modal-overlay);
|
|
7023
7023
|
--modal-content-background:var(--bp-surface-modal-surface);
|
|
7024
7024
|
--modal-min-width-non-fullscreen:calc(460px - var(--bp-space-080)*2);
|
|
@@ -7027,6 +7027,9 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7027
7027
|
--modal-max-width-medium:540px;
|
|
7028
7028
|
--modal-max-width-large:620px;
|
|
7029
7029
|
--modal-max-width-xlarge:768px;
|
|
7030
|
+
--modal-max-width-loading:var(--modal-min-width-non-fullscreen);
|
|
7031
|
+
--modal-max-height-loading:min(300px, var(--modal-max-height-non-fullscreen));
|
|
7032
|
+
--modal-loading-height:148px;
|
|
7030
7033
|
--modal-margin:0 var(--bp-space-080);
|
|
7031
7034
|
--modal-border-radius:var(--bp-radius-16);
|
|
7032
7035
|
--modal-body-text-color:var(--bp-text-text-on-light);
|
|
@@ -7056,7 +7059,7 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7056
7059
|
--modal-loading-animation:var(--animation-duration-2) cubic-bezier(.25, .46, .45, .94);
|
|
7057
7060
|
}
|
|
7058
7061
|
|
|
7059
|
-
.bp_modal_module_overlay--
|
|
7062
|
+
.bp_modal_module_overlay--86b04{
|
|
7060
7063
|
background-color:var(--modal-overlay-background);
|
|
7061
7064
|
bottom:0;
|
|
7062
7065
|
display:grid;
|
|
@@ -7068,15 +7071,15 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7068
7071
|
z-index:370;
|
|
7069
7072
|
}
|
|
7070
7073
|
@media (width > 459px){
|
|
7071
|
-
.bp_modal_module_overlay--
|
|
7074
|
+
.bp_modal_module_overlay--86b04{
|
|
7072
7075
|
place-items:center;
|
|
7073
7076
|
}
|
|
7074
7077
|
}
|
|
7075
7078
|
|
|
7076
|
-
.bp_modal_module_headerDividerLine--
|
|
7079
|
+
.bp_modal_module_headerDividerLine--86b04{
|
|
7077
7080
|
position:relative;
|
|
7078
7081
|
}
|
|
7079
|
-
.bp_modal_module_headerDividerLine--
|
|
7082
|
+
.bp_modal_module_headerDividerLine--86b04::after{
|
|
7080
7083
|
border-bottom:var(--modal-divider-line-border);
|
|
7081
7084
|
bottom:0;
|
|
7082
7085
|
content:"";
|
|
@@ -7085,16 +7088,16 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7085
7088
|
right:var(--modal-divider-line-offset-right);
|
|
7086
7089
|
}
|
|
7087
7090
|
@media (width > 459px){
|
|
7088
|
-
.bp_modal_module_headerDividerLine--
|
|
7091
|
+
.bp_modal_module_headerDividerLine--86b04::after{
|
|
7089
7092
|
left:var(--modal-divider-line-offset-left-non-fullscreen);
|
|
7090
7093
|
right:var(--modal-divider-line-offset-right-non-fullscreen);
|
|
7091
7094
|
}
|
|
7092
7095
|
}
|
|
7093
7096
|
|
|
7094
|
-
.bp_modal_module_footerDividerLine--
|
|
7097
|
+
.bp_modal_module_footerDividerLine--86b04{
|
|
7095
7098
|
position:relative;
|
|
7096
7099
|
}
|
|
7097
|
-
.bp_modal_module_footerDividerLine--
|
|
7100
|
+
.bp_modal_module_footerDividerLine--86b04::before{
|
|
7098
7101
|
border-bottom:var(--modal-divider-line-border);
|
|
7099
7102
|
content:"";
|
|
7100
7103
|
left:var(--modal-divider-line-offset-left);
|
|
@@ -7103,14 +7106,14 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7103
7106
|
top:0;
|
|
7104
7107
|
}
|
|
7105
7108
|
@media (width > 459px){
|
|
7106
|
-
.bp_modal_module_footerDividerLine--
|
|
7109
|
+
.bp_modal_module_footerDividerLine--86b04::before{
|
|
7107
7110
|
left:var(--modal-divider-line-offset-left-non-fullscreen);
|
|
7108
7111
|
right:var(--modal-divider-line-offset-right-non-fullscreen);
|
|
7109
7112
|
}
|
|
7110
7113
|
}
|
|
7111
7114
|
|
|
7112
|
-
.bp_modal_module_content--
|
|
7113
|
-
animation:bp_modal_module_popup_bounce_in--
|
|
7115
|
+
.bp_modal_module_content--86b04{
|
|
7116
|
+
animation:bp_modal_module_popup_bounce_in--86b04 var(--animation-duration-3);
|
|
7114
7117
|
background-color:var(--modal-content-background);
|
|
7115
7118
|
display:flex;
|
|
7116
7119
|
flex-direction:column;
|
|
@@ -7119,12 +7122,12 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7119
7122
|
position:relative;
|
|
7120
7123
|
}
|
|
7121
7124
|
@media (width > 374px){
|
|
7122
|
-
.bp_modal_module_content--
|
|
7125
|
+
.bp_modal_module_content--86b04{
|
|
7123
7126
|
overflow:hidden;
|
|
7124
7127
|
}
|
|
7125
7128
|
}
|
|
7126
7129
|
@media (width > 459px){
|
|
7127
|
-
.bp_modal_module_content--
|
|
7130
|
+
.bp_modal_module_content--86b04{
|
|
7128
7131
|
border-radius:var(--modal-border-radius);
|
|
7129
7132
|
height:auto;
|
|
7130
7133
|
margin:var(--modal-margin);
|
|
@@ -7132,77 +7135,77 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7132
7135
|
min-width:var(--modal-min-width-non-fullscreen);
|
|
7133
7136
|
transition:max-width var(--modal-loading-animation), max-height var(--modal-loading-animation);
|
|
7134
7137
|
}
|
|
7135
|
-
.bp_modal_module_content--
|
|
7138
|
+
.bp_modal_module_content--86b04.bp_modal_module_smallSizeModal--86b04{
|
|
7136
7139
|
max-width:var(--modal-max-width-small);
|
|
7137
7140
|
}
|
|
7138
|
-
.bp_modal_module_content--
|
|
7141
|
+
.bp_modal_module_content--86b04.bp_modal_module_mediumSizeModal--86b04{
|
|
7139
7142
|
max-width:var(--modal-max-width-medium);
|
|
7140
7143
|
}
|
|
7141
|
-
.bp_modal_module_content--
|
|
7144
|
+
.bp_modal_module_content--86b04.bp_modal_module_largeSizeModal--86b04{
|
|
7142
7145
|
max-width:var(--modal-max-width-large);
|
|
7143
7146
|
}
|
|
7144
|
-
.bp_modal_module_content--
|
|
7147
|
+
.bp_modal_module_content--86b04.bp_modal_module_xlargeSizeModal--86b04{
|
|
7145
7148
|
max-width:var(--modal-max-width-xlarge);
|
|
7146
7149
|
}
|
|
7147
7150
|
}
|
|
7148
|
-
.bp_modal_module_content--
|
|
7151
|
+
.bp_modal_module_content--86b04:has(.bp_modal_module_loadingContainerActive--86b04) .bp_modal_module_footerDividerLine--86b04::before,.bp_modal_module_content--86b04:has(.bp_modal_module_loadingContainerActive--86b04) .bp_modal_module_headerDividerLine--86b04::after{
|
|
7149
7152
|
display:none;
|
|
7150
7153
|
}
|
|
7151
7154
|
@media (width > 459px){
|
|
7152
|
-
.bp_modal_module_content--
|
|
7155
|
+
.bp_modal_module_content--86b04:has(.bp_modal_module_loadingContainerActive--86b04){
|
|
7153
7156
|
max-height:var(--modal-max-height-loading);
|
|
7154
7157
|
max-width:var(--modal-max-width-loading);
|
|
7155
7158
|
}
|
|
7156
7159
|
}
|
|
7157
7160
|
|
|
7158
|
-
.bp_modal_module_scrollableContainer--
|
|
7161
|
+
.bp_modal_module_scrollableContainer--86b04{
|
|
7159
7162
|
flex-grow:1;
|
|
7160
7163
|
}
|
|
7161
7164
|
@media (width > 374px){
|
|
7162
|
-
.bp_modal_module_scrollableContainer--
|
|
7165
|
+
.bp_modal_module_scrollableContainer--86b04{
|
|
7163
7166
|
overflow-y:auto;
|
|
7164
7167
|
}
|
|
7165
7168
|
}
|
|
7166
7169
|
|
|
7167
|
-
.bp_modal_module_content--
|
|
7170
|
+
.bp_modal_module_content--86b04 .bp_modal_module_close--86b04{
|
|
7168
7171
|
color:var(--modal-close-button-color);
|
|
7169
7172
|
position:fixed;
|
|
7170
7173
|
right:var(--modal-close-button-offset-right);
|
|
7171
7174
|
top:var(--modal-close-button-offset-top);
|
|
7172
7175
|
}
|
|
7173
7176
|
@media (width > 374px){
|
|
7174
|
-
.bp_modal_module_content--
|
|
7177
|
+
.bp_modal_module_content--86b04 .bp_modal_module_close--86b04{
|
|
7175
7178
|
position:absolute;
|
|
7176
7179
|
}
|
|
7177
7180
|
}
|
|
7178
7181
|
|
|
7179
|
-
.bp_modal_module_close--
|
|
7182
|
+
.bp_modal_module_close--86b04.bp_modal_module_onColor--86b04{
|
|
7180
7183
|
background-color:var(--modal-close-button-on-color-background);
|
|
7181
7184
|
}
|
|
7182
|
-
.bp_modal_module_close--
|
|
7185
|
+
.bp_modal_module_close--86b04.bp_modal_module_onColor--86b04:hover{
|
|
7183
7186
|
background-color:var(--modal-close-button-on-color-background-hover);
|
|
7184
7187
|
}
|
|
7185
|
-
.bp_modal_module_close--
|
|
7188
|
+
.bp_modal_module_close--86b04.bp_modal_module_onColor--86b04:active{
|
|
7186
7189
|
background-color:var(--modal-close-button-on-color-background-pressed);
|
|
7187
7190
|
}
|
|
7188
7191
|
|
|
7189
|
-
.bp_modal_module_content--
|
|
7192
|
+
.bp_modal_module_content--86b04 .bp_modal_module_backButton--86b04{
|
|
7190
7193
|
color:var(--modal-back-button-color);
|
|
7191
7194
|
margin-block-start:var(--modal-back-button-margin-top-start);
|
|
7192
7195
|
margin-inline-start:var(--modal-back-button-margin-inline-start);
|
|
7193
7196
|
}
|
|
7194
7197
|
@media (width > 459px){
|
|
7195
|
-
.bp_modal_module_content--
|
|
7198
|
+
.bp_modal_module_content--86b04 .bp_modal_module_backButton--86b04{
|
|
7196
7199
|
height:var(--modal-back-button-size-non-fullscreen);
|
|
7197
7200
|
width:var(--modal-back-button-size-non-fullscreen);
|
|
7198
7201
|
}
|
|
7199
7202
|
}
|
|
7200
7203
|
|
|
7201
|
-
.bp_modal_module_modalHeader--
|
|
7204
|
+
.bp_modal_module_modalHeader--86b04{
|
|
7202
7205
|
display:flex;
|
|
7203
7206
|
}
|
|
7204
7207
|
|
|
7205
|
-
.bp_modal_module_modalTitle--
|
|
7208
|
+
.bp_modal_module_modalTitle--86b04{
|
|
7206
7209
|
display:flex;
|
|
7207
7210
|
flex-direction:column;
|
|
7208
7211
|
gap:var(--modal-title-gap);
|
|
@@ -7210,78 +7213,83 @@ table.bp_inline_table_module_inlineTable--17192[data-modern=true] td:last-child,
|
|
|
7210
7213
|
padding:var(--modal-title-padding);
|
|
7211
7214
|
}
|
|
7212
7215
|
@media (width > 459px){
|
|
7213
|
-
.bp_modal_module_modalTitle--
|
|
7216
|
+
.bp_modal_module_modalTitle--86b04{
|
|
7214
7217
|
padding:var(--modal-title-padding-non-fullscreen);
|
|
7215
7218
|
}
|
|
7216
7219
|
}
|
|
7217
7220
|
|
|
7218
|
-
.bp_modal_module_body--
|
|
7221
|
+
.bp_modal_module_body--86b04{
|
|
7219
7222
|
color:var(--modal-body-text-color);
|
|
7220
7223
|
padding:var(--modal-body-padding-fullscreen);
|
|
7221
7224
|
}
|
|
7222
7225
|
@media (width > 459px){
|
|
7223
|
-
.bp_modal_module_body--
|
|
7226
|
+
.bp_modal_module_body--86b04{
|
|
7224
7227
|
padding:var(--modal-body-padding-non-fullscreen);
|
|
7225
7228
|
}
|
|
7226
7229
|
}
|
|
7227
7230
|
|
|
7228
|
-
.bp_modal_module_footer--
|
|
7231
|
+
.bp_modal_module_footer--86b04{
|
|
7229
7232
|
display:flex;
|
|
7230
7233
|
justify-content:flex-end;
|
|
7231
7234
|
padding:var(--modal-footer-padding);
|
|
7232
7235
|
}
|
|
7233
7236
|
@media (width > 459px){
|
|
7234
|
-
.bp_modal_module_footer--
|
|
7237
|
+
.bp_modal_module_footer--86b04{
|
|
7235
7238
|
padding:var(--modal-footer-padding-non-fullscreen);
|
|
7236
7239
|
}
|
|
7237
7240
|
}
|
|
7238
7241
|
|
|
7239
|
-
.bp_modal_module_footerButton--
|
|
7242
|
+
.bp_modal_module_footerButton--86b04 + .bp_modal_module_footerButton--86b04{
|
|
7240
7243
|
margin-inline-start:var(--modal-footer-button-margin-inline-start);
|
|
7241
7244
|
}
|
|
7242
7245
|
|
|
7243
|
-
.bp_modal_module_loadingContainer--
|
|
7246
|
+
.bp_modal_module_loadingContainer--86b04{
|
|
7244
7247
|
display:flex;
|
|
7245
|
-
|
|
7248
|
+
flex-direction:column;
|
|
7249
|
+
flex-grow:1;
|
|
7246
7250
|
position:relative;
|
|
7247
|
-
|
|
7251
|
+
}
|
|
7252
|
+
@media (width > 374px){
|
|
7253
|
+
.bp_modal_module_loadingContainer--86b04{
|
|
7254
|
+
min-height:0;
|
|
7255
|
+
}
|
|
7248
7256
|
}
|
|
7249
7257
|
|
|
7250
|
-
.bp_modal_module_loadingContainerActive--
|
|
7251
|
-
height:var(--modal-loading-height);
|
|
7258
|
+
.bp_modal_module_loadingContainerActive--86b04{
|
|
7252
7259
|
overflow:hidden;
|
|
7253
7260
|
}
|
|
7254
7261
|
|
|
7255
|
-
.bp_modal_module_loading--
|
|
7262
|
+
.bp_modal_module_loading--86b04{
|
|
7256
7263
|
align-items:center;
|
|
7257
7264
|
display:flex;
|
|
7258
7265
|
}
|
|
7259
7266
|
|
|
7260
|
-
.
|
|
7261
|
-
height:var(--modal-loading-height);
|
|
7262
|
-
}
|
|
7263
|
-
|
|
7264
|
-
.bp_modal_module_loadingOverlay--c23ce{
|
|
7267
|
+
.bp_modal_module_loadingOverlay--86b04{
|
|
7265
7268
|
background-color:var(--modal-content-background);
|
|
7266
7269
|
bottom:0;
|
|
7267
7270
|
left:0;
|
|
7268
|
-
min-height:var(--modal-loading-height);
|
|
7269
7271
|
position:absolute;
|
|
7270
7272
|
right:0;
|
|
7271
7273
|
top:0;
|
|
7272
7274
|
z-index:1;
|
|
7273
7275
|
}
|
|
7274
7276
|
|
|
7275
|
-
.bp_modal_module_loadingContent--
|
|
7277
|
+
.bp_modal_module_loadingContent--86b04{
|
|
7276
7278
|
display:flex;
|
|
7279
|
+
flex-direction:column;
|
|
7277
7280
|
visibility:hidden;
|
|
7278
7281
|
}
|
|
7282
|
+
@media (width > 374px){
|
|
7283
|
+
.bp_modal_module_loadingContent--86b04{
|
|
7284
|
+
min-height:0;
|
|
7285
|
+
}
|
|
7286
|
+
}
|
|
7279
7287
|
|
|
7280
|
-
.bp_modal_module_loadingContentVisible--
|
|
7288
|
+
.bp_modal_module_loadingContentVisible--86b04{
|
|
7281
7289
|
visibility:visible;
|
|
7282
7290
|
}
|
|
7283
7291
|
|
|
7284
|
-
@keyframes bp_modal_module_popup_bounce_in--
|
|
7292
|
+
@keyframes bp_modal_module_popup_bounce_in--86b04{
|
|
7285
7293
|
0%{
|
|
7286
7294
|
transform:scale3d(.1, .1, 1);
|
|
7287
7295
|
}
|
|
@@ -2,6 +2,7 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { forwardRef, useState, useEffect } from 'react';
|
|
3
3
|
import { clsx } from 'clsx';
|
|
4
4
|
import { LoadingIndicator } from '../loading-indicator/loading-indicator.js';
|
|
5
|
+
import { useMedia } from '../utils/useMedia.js';
|
|
5
6
|
import { MODAL_LOADING_ANIMATION_DURATION } from './constants.js';
|
|
6
7
|
import styles from './modal.module.js';
|
|
7
8
|
|
|
@@ -18,6 +19,7 @@ const ModalLoading = /*#__PURE__*/forwardRef(({
|
|
|
18
19
|
children,
|
|
19
20
|
...rest
|
|
20
21
|
}, forwardedRef) => {
|
|
22
|
+
const isAboveModalFullscreen = useMedia('(width > 459px)');
|
|
21
23
|
const [loadingState, setLoadingState] = useState(isLoading ? LoadingState.Loading : LoadingState.ShowingContent);
|
|
22
24
|
useEffect(() => {
|
|
23
25
|
if (isLoading) {
|
|
@@ -25,7 +27,12 @@ const ModalLoading = /*#__PURE__*/forwardRef(({
|
|
|
25
27
|
setLoadingState(LoadingState.Loading);
|
|
26
28
|
return undefined;
|
|
27
29
|
}
|
|
28
|
-
//
|
|
30
|
+
// Skip animation below fullscreen breakpoint (mobile)
|
|
31
|
+
if (!isAboveModalFullscreen) {
|
|
32
|
+
setLoadingState(LoadingState.ShowingContent);
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
// Start animating when loading completes (for larger screens)
|
|
29
36
|
setLoadingState(LoadingState.Animating);
|
|
30
37
|
// Show content after modal resize completes
|
|
31
38
|
const showTimer = setTimeout(() => {
|
|
@@ -34,7 +41,7 @@ const ModalLoading = /*#__PURE__*/forwardRef(({
|
|
|
34
41
|
return () => {
|
|
35
42
|
clearTimeout(showTimer);
|
|
36
43
|
};
|
|
37
|
-
}, [isLoading]);
|
|
44
|
+
}, [isLoading, isAboveModalFullscreen]);
|
|
38
45
|
const shouldShowLoading = loadingState === LoadingState.Loading;
|
|
39
46
|
const shouldShowContent = loadingState === LoadingState.ShowingContent;
|
|
40
47
|
return jsxs("div", {
|
|
@@ -46,6 +53,7 @@ const ModalLoading = /*#__PURE__*/forwardRef(({
|
|
|
46
53
|
className: clsx(styles.loadingContent, {
|
|
47
54
|
[styles.loadingContentVisible]: shouldShowContent
|
|
48
55
|
}),
|
|
56
|
+
"data-testid": "modal-loading-content",
|
|
49
57
|
children: children
|
|
50
58
|
}), shouldShowLoading && jsx("div", {
|
|
51
59
|
...rest,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"overlay":"bp_modal_module_overlay--
|
|
2
|
+
var styles = {"overlay":"bp_modal_module_overlay--86b04","headerDividerLine":"bp_modal_module_headerDividerLine--86b04","footerDividerLine":"bp_modal_module_footerDividerLine--86b04","content":"bp_modal_module_content--86b04","popup_bounce_in":"bp_modal_module_popup_bounce_in--86b04","smallSizeModal":"bp_modal_module_smallSizeModal--86b04","mediumSizeModal":"bp_modal_module_mediumSizeModal--86b04","largeSizeModal":"bp_modal_module_largeSizeModal--86b04","xlargeSizeModal":"bp_modal_module_xlargeSizeModal--86b04","loadingContainerActive":"bp_modal_module_loadingContainerActive--86b04","scrollableContainer":"bp_modal_module_scrollableContainer--86b04","close":"bp_modal_module_close--86b04","onColor":"bp_modal_module_onColor--86b04","backButton":"bp_modal_module_backButton--86b04","modalHeader":"bp_modal_module_modalHeader--86b04","modalTitle":"bp_modal_module_modalTitle--86b04","body":"bp_modal_module_body--86b04","footer":"bp_modal_module_footer--86b04","footerButton":"bp_modal_module_footerButton--86b04","loadingContainer":"bp_modal_module_loadingContainer--86b04","loading":"bp_modal_module_loading--86b04","loadingOverlay":"bp_modal_module_loadingOverlay--86b04","loadingContent":"bp_modal_module_loadingContent--86b04","loadingContentVisible":"bp_modal_module_loadingContentVisible--86b04"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|