@box/blueprint-web 12.53.0 → 12.54.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/blueprint-modernization-context/consts.d.ts +1 -1
- package/dist/lib-esm/blueprint-modernization-context/consts.js +1 -1
- package/dist/lib-esm/index.css +20 -6
- package/dist/lib-esm/modal/types.d.ts +2 -0
- package/dist/lib-esm/primitives/inline-error/inline-error.js +17 -3
- package/dist/lib-esm/primitives/inline-error/inline-error.module.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const BLUEPRINT_UPLIFT_FEATURE_FLAG = "
|
|
1
|
+
export declare const BLUEPRINT_UPLIFT_FEATURE_FLAG = "launchpad_blueprint_ui_uplift";
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -2213,25 +2213,39 @@
|
|
|
2213
2213
|
.bp_input_chip_module_container--9324d .bp_input_chip_module_avatar--9324d.bp_input_chip_module_modern--9324d *{
|
|
2214
2214
|
border-radius:unset;
|
|
2215
2215
|
}
|
|
2216
|
-
.bp_inline_error_module_inlineError--
|
|
2216
|
+
.bp_inline_error_module_inlineError--3217d[data-modern=false]{
|
|
2217
|
+
--inline-error-gap:var(--size-1);
|
|
2218
|
+
--inline-error-height:var(--size-4);
|
|
2219
|
+
--inline-error-text-color:var(--text-text-error-on-light);
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
.bp_inline_error_module_inlineError--3217d[data-modern=true]{
|
|
2223
|
+
--inline-error-gap:var(--bp-space-010);
|
|
2224
|
+
--inline-error-height:var(--bp-size-040);
|
|
2225
|
+
--inline-error-text-color:var(--bp-text-text-error-on-light);
|
|
2226
|
+
--inline-font-size:var(--bp-font-size-05);
|
|
2227
|
+
font-size:var(--inline-font-size);
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
.bp_inline_error_module_inlineError--3217d{
|
|
2217
2231
|
align-items:center;
|
|
2218
|
-
color:var(--
|
|
2232
|
+
color:var(--inline-error-text-color);
|
|
2219
2233
|
display:flex;
|
|
2220
2234
|
font-family:var(--body-default-bold-font-family);
|
|
2221
2235
|
font-size:var(--body-default-bold-font-size);
|
|
2222
2236
|
font-weight:var(--body-default-bold-font-weight);
|
|
2223
|
-
gap:var(--
|
|
2237
|
+
gap:var(--inline-error-gap);
|
|
2224
2238
|
letter-spacing:var(--body-default-bold-letter-spacing);
|
|
2225
2239
|
line-height:var(--body-default-bold-line-height);
|
|
2226
|
-
line-height:var(--
|
|
2240
|
+
line-height:var(--inline-error-height);
|
|
2227
2241
|
-webkit-text-decoration:var(--body-default-bold-text-decoration);
|
|
2228
2242
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
2229
2243
|
text-transform:var(--body-default-bold-text-case);
|
|
2230
2244
|
}
|
|
2231
|
-
.bp_inline_error_module_inlineError--
|
|
2245
|
+
.bp_inline_error_module_inlineError--3217d.bp_inline_error_module_empty--3217d{
|
|
2232
2246
|
display:none;
|
|
2233
2247
|
}
|
|
2234
|
-
.bp_inline_error_module_inlineError--
|
|
2248
|
+
.bp_inline_error_module_inlineError--3217d .bp_inline_error_module_errorIcon--3217d{
|
|
2235
2249
|
align-self:flex-start;
|
|
2236
2250
|
flex-grow:0;
|
|
2237
2251
|
flex-shrink:0;
|
|
@@ -23,6 +23,8 @@ export interface ModalCloseProps {
|
|
|
23
23
|
variant?: 'default' | 'onColor';
|
|
24
24
|
/** The size of the button. Default: 'large'. */
|
|
25
25
|
size?: IconButtonProps['size'];
|
|
26
|
+
/** Determines if the close button is disabled */
|
|
27
|
+
disabled?: boolean;
|
|
26
28
|
}
|
|
27
29
|
export interface ModalTriggerProps {
|
|
28
30
|
/** Content of the Trigger element */
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import { AlertBadge } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
-
import {
|
|
3
|
+
import { AlertCircle } from '@box/blueprint-web-assets/icons/Medium';
|
|
4
|
+
import { IconIconErrorOnLight, Size4, bpSize050 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
5
|
import clsx from 'clsx';
|
|
5
6
|
import { forwardRef } from 'react';
|
|
7
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
6
8
|
import styles from './inline-error.module.js';
|
|
7
9
|
|
|
8
10
|
/** Renders an inline error message and icon, used to show error state in form elements. */
|
|
@@ -12,13 +14,17 @@ const InlineError = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
12
14
|
className,
|
|
13
15
|
...rest
|
|
14
16
|
} = props;
|
|
17
|
+
const {
|
|
18
|
+
enableModernizedComponents
|
|
19
|
+
} = useBlueprintModernization();
|
|
15
20
|
return jsx("span", {
|
|
16
21
|
...rest,
|
|
17
22
|
ref: forwardedRef,
|
|
18
23
|
className: clsx([className, styles.inlineError, {
|
|
19
24
|
[styles.empty]: !children
|
|
20
25
|
}]),
|
|
21
|
-
|
|
26
|
+
"data-modern": enableModernizedComponents,
|
|
27
|
+
children: children && (!enableModernizedComponents ? jsxs(Fragment, {
|
|
22
28
|
children: [jsx(AlertBadge, {
|
|
23
29
|
className: styles.errorIcon,
|
|
24
30
|
color: IconIconErrorOnLight,
|
|
@@ -26,7 +32,15 @@ const InlineError = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
26
32
|
role: "presentation",
|
|
27
33
|
width: Size4
|
|
28
34
|
}), children]
|
|
29
|
-
})
|
|
35
|
+
}) : jsxs(Fragment, {
|
|
36
|
+
children: [jsx(AlertCircle, {
|
|
37
|
+
className: styles.errorIcon,
|
|
38
|
+
color: IconIconErrorOnLight,
|
|
39
|
+
height: bpSize050,
|
|
40
|
+
role: "presentation",
|
|
41
|
+
width: bpSize050
|
|
42
|
+
}), children]
|
|
43
|
+
}))
|
|
30
44
|
});
|
|
31
45
|
});
|
|
32
46
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"inlineError":"bp_inline_error_module_inlineError--
|
|
2
|
+
var styles = {"inlineError":"bp_inline_error_module_inlineError--3217d","empty":"bp_inline_error_module_empty--3217d","errorIcon":"bp_inline_error_module_errorIcon--3217d"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|