@box/blueprint-web 12.68.1 → 12.69.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/accordion/accordion.js +12 -6
- package/dist/lib-esm/accordion/types.d.ts +1 -1
- package/dist/lib-esm/combobox-group/combobox-group-combobox.js +1 -1
- package/dist/lib-esm/combobox-group/combobox-group.module.js +1 -1
- package/dist/lib-esm/index.css +60 -36
- package/dist/lib-esm/primitives/page-header/page-header.js +5 -0
- package/dist/lib-esm/primitives/page-header/page-header.module.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { PointerChevron, Alert, ClockBadge } from '@box/blueprint-web-assets/icons/Fill';
|
|
3
|
-
import { SurfaceStatusSurfaceRed, SurfaceStatusSurfaceLightBlue, GrayWhite, SurfaceBadgeErrorSurface, Orange100 } from '@box/blueprint-web-assets/tokens/tokens';
|
|
3
|
+
import { SurfaceStatusSurfaceRed, SurfaceStatusSurfaceLightBlue, GrayWhite, SurfaceBadgeErrorSurface, Orange100, bpSurfaceBadgeSurfaceModified } from '@box/blueprint-web-assets/tokens/tokens';
|
|
4
4
|
import * as RadixAccordion from '@radix-ui/react-accordion';
|
|
5
5
|
import clsx from 'clsx';
|
|
6
6
|
import { createElement } from 'react';
|
|
@@ -21,6 +21,9 @@ const accordionIconVariantToIconProps = {
|
|
|
21
21
|
icon: ClockBadge,
|
|
22
22
|
iconColor: GrayWhite,
|
|
23
23
|
backgroundColor: Orange100
|
|
24
|
+
},
|
|
25
|
+
'status-modified': {
|
|
26
|
+
backgroundColor: bpSurfaceBadgeSurfaceModified
|
|
24
27
|
}
|
|
25
28
|
};
|
|
26
29
|
/**
|
|
@@ -98,11 +101,12 @@ const Item = props => {
|
|
|
98
101
|
errorIconAriaLabel,
|
|
99
102
|
...itemRest
|
|
100
103
|
} = props;
|
|
104
|
+
const iconProps = iconVariant ? accordionIconVariantToIconProps[iconVariant] : undefined;
|
|
101
105
|
const {
|
|
102
106
|
backgroundColor,
|
|
103
107
|
iconColor,
|
|
104
108
|
icon
|
|
105
|
-
} =
|
|
109
|
+
} = iconProps ?? {};
|
|
106
110
|
return jsxs(RadixAccordion.Item, {
|
|
107
111
|
...itemRest,
|
|
108
112
|
className: accordionItemClasses,
|
|
@@ -122,16 +126,18 @@ const Item = props => {
|
|
|
122
126
|
className: styles.accordionStatus,
|
|
123
127
|
color: error ? statusColors.error : statusColors.default,
|
|
124
128
|
text: `${status}`
|
|
125
|
-
}),
|
|
129
|
+
}), isDefined(backgroundColor) && jsx("div", {
|
|
130
|
+
"aria-label": iconAriaLabel,
|
|
126
131
|
className: styles.accordionIconWrapper,
|
|
132
|
+
role: "img",
|
|
127
133
|
style: {
|
|
128
134
|
backgroundColor
|
|
129
135
|
},
|
|
130
|
-
children: /*#__PURE__*/createElement(icon, {
|
|
136
|
+
children: icon && /*#__PURE__*/createElement(icon, {
|
|
131
137
|
color: iconColor,
|
|
132
138
|
role: 'img',
|
|
133
|
-
height: '0.
|
|
134
|
-
width: '0.
|
|
139
|
+
height: '0.75rem',
|
|
140
|
+
width: '0.75rem',
|
|
135
141
|
'aria-label': iconAriaLabel
|
|
136
142
|
})
|
|
137
143
|
}), jsx(PointerChevron, {
|
|
@@ -20,7 +20,7 @@ interface IconProps {
|
|
|
20
20
|
/**
|
|
21
21
|
* Variant of icon displayed next to the title
|
|
22
22
|
* */
|
|
23
|
-
iconVariant: 'alert-error' | 'status-pending';
|
|
23
|
+
iconVariant: 'alert-error' | 'status-pending' | 'status-modified';
|
|
24
24
|
/**
|
|
25
25
|
* ARIA label of icon displayed next to the title
|
|
26
26
|
* */
|
|
@@ -46,7 +46,7 @@ const ComboboxGroupCombobox = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
46
46
|
ref: forwardedRef,
|
|
47
47
|
"aria-describedby": comboboxHasError ? inlineErrorId : undefined,
|
|
48
48
|
"aria-invalid": comboboxHasError,
|
|
49
|
-
className: clsx(borderStyles, {
|
|
49
|
+
className: clsx(borderStyles, styles.comboboxContainer, {
|
|
50
50
|
[styles.errorSelect]: selectHasError
|
|
51
51
|
}, {
|
|
52
52
|
[styles.errorCombobox]: comboboxHasError
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"container":"bp_combobox_group_module_container--
|
|
2
|
+
var styles = {"container":"bp_combobox_group_module_container--9375b","trailing":"bp_combobox_group_module_trailing--9375b","leading":"bp_combobox_group_module_leading--9375b","comboboxContainer":"bp_combobox_group_module_comboboxContainer--9375b","comboboxGroupcontainer":"bp_combobox_group_module_comboboxGroupcontainer--9375b","disabled":"bp_combobox_group_module_disabled--9375b","label":"bp_combobox_group_module_label--9375b","errorCombobox":"bp_combobox_group_module_errorCombobox--9375b","errorSelect":"bp_combobox_group_module_errorSelect--9375b","selectHasFocus":"bp_combobox_group_module_selectHasFocus--9375b","comboboxHasFocus":"bp_combobox_group_module_comboboxHasFocus--9375b"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -2874,59 +2874,62 @@
|
|
|
2874
2874
|
user-select:none;
|
|
2875
2875
|
}
|
|
2876
2876
|
|
|
2877
|
-
.bp_combobox_group_module_container--
|
|
2877
|
+
.bp_combobox_group_module_container--9375b[data-modern=false]{
|
|
2878
2878
|
--combobox-group-container-gap:var(--space-2);
|
|
2879
|
-
--combobox-group-container-max-width:358px;
|
|
2880
2879
|
--combobox-group-disabled-opacity:60%;
|
|
2881
2880
|
--combobox-group-label-color:var(--text-text-on-light);
|
|
2882
2881
|
}
|
|
2883
|
-
.bp_combobox_group_module_container--
|
|
2882
|
+
.bp_combobox_group_module_container--9375b[data-modern=false] .bp_combobox_group_module_trailing--9375b{
|
|
2884
2883
|
--blueprint-combobox-input-radius:0 var(--radius-2) var(--radius-2) 0;
|
|
2885
2884
|
--blueprint-select-trigger-radius:0 var(--radius-2) var(--radius-2) 0;
|
|
2886
2885
|
--blueprint-combobox-border-left-width:none;
|
|
2887
2886
|
--blueprint-select-border-left-width:none;
|
|
2888
2887
|
}
|
|
2889
|
-
.bp_combobox_group_module_container--
|
|
2888
|
+
.bp_combobox_group_module_container--9375b[data-modern=false] .bp_combobox_group_module_leading--9375b{
|
|
2890
2889
|
--blueprint-combobox-input-radius:var(--radius-2) 0 0 var(--radius-2);
|
|
2891
2890
|
--blueprint-select-trigger-radius:var(--radius-2) 0 0 var(--radius-2);
|
|
2892
2891
|
}
|
|
2893
2892
|
|
|
2894
|
-
.bp_combobox_group_module_container--
|
|
2893
|
+
.bp_combobox_group_module_container--9375b[data-modern=true]{
|
|
2895
2894
|
--combobox-group-container-gap:var(--bp-space-020);
|
|
2896
|
-
--combobox-group-container-max-width:358px;
|
|
2897
2895
|
--combobox-group-disabled-opacity:60%;
|
|
2898
2896
|
--combobox-group-label-color:var(--bp-text-text-on-light);
|
|
2899
2897
|
}
|
|
2900
|
-
.bp_combobox_group_module_container--
|
|
2898
|
+
.bp_combobox_group_module_container--9375b[data-modern=true] .bp_combobox_group_module_trailing--9375b{
|
|
2901
2899
|
--blueprint-combobox-input-radius:0 var(--bp-radius-06) var(--bp-radius-06) 0;
|
|
2902
2900
|
--blueprint-select-trigger-radius:0 var(--bp-radius-06) var(--bp-radius-06) 0;
|
|
2903
2901
|
--blueprint-combobox-border-left-width:none;
|
|
2904
2902
|
--blueprint-select-border-left-width:none;
|
|
2905
2903
|
}
|
|
2906
|
-
.bp_combobox_group_module_container--
|
|
2904
|
+
.bp_combobox_group_module_container--9375b[data-modern=true] .bp_combobox_group_module_leading--9375b{
|
|
2907
2905
|
--blueprint-combobox-input-radius:var(--bp-radius-06) 0 0 var(--bp-radius-06);
|
|
2908
2906
|
--blueprint-select-trigger-radius:var(--bp-radius-06) 0 0 var(--bp-radius-06);
|
|
2909
2907
|
}
|
|
2910
2908
|
|
|
2911
|
-
.bp_combobox_group_module_container--
|
|
2909
|
+
.bp_combobox_group_module_container--9375b{
|
|
2912
2910
|
align-items:flex-start;
|
|
2913
2911
|
display:flex;
|
|
2914
2912
|
flex-direction:column;
|
|
2915
2913
|
gap:var(--combobox-group-container-gap);
|
|
2916
|
-
|
|
2914
|
+
width:100%;
|
|
2915
|
+
}
|
|
2916
|
+
|
|
2917
|
+
.bp_combobox_group_module_comboboxContainer--9375b{
|
|
2918
|
+
flex:1;
|
|
2917
2919
|
}
|
|
2918
2920
|
|
|
2919
|
-
.bp_combobox_group_module_comboboxGroupcontainer--
|
|
2921
|
+
.bp_combobox_group_module_comboboxGroupcontainer--9375b{
|
|
2920
2922
|
display:flex;
|
|
2921
2923
|
flex-direction:row;
|
|
2924
|
+
width:100%;
|
|
2922
2925
|
}
|
|
2923
2926
|
|
|
2924
|
-
.bp_combobox_group_module_disabled--
|
|
2927
|
+
.bp_combobox_group_module_disabled--9375b{
|
|
2925
2928
|
opacity:var(--combobox-group-disabled-opacity);
|
|
2926
2929
|
pointer-events:none;
|
|
2927
2930
|
}
|
|
2928
2931
|
|
|
2929
|
-
.bp_combobox_group_module_label--
|
|
2932
|
+
.bp_combobox_group_module_label--9375b{
|
|
2930
2933
|
color:var(--combobox-group-label-color);
|
|
2931
2934
|
flex:0 0 fit-content;
|
|
2932
2935
|
font-family:var(--body-default-bold-font-family);
|
|
@@ -2940,43 +2943,43 @@
|
|
|
2940
2943
|
text-transform:var(--body-default-bold-text-case);
|
|
2941
2944
|
}
|
|
2942
2945
|
|
|
2943
|
-
.bp_combobox_group_module_errorCombobox--
|
|
2946
|
+
.bp_combobox_group_module_errorCombobox--9375b.bp_combobox_group_module_leading--9375b{
|
|
2944
2947
|
--blueprint-select-border-right-width:none;
|
|
2945
2948
|
}
|
|
2946
2949
|
|
|
2947
|
-
.bp_combobox_group_module_errorSelect--
|
|
2950
|
+
.bp_combobox_group_module_errorSelect--9375b.bp_combobox_group_module_leading--9375b{
|
|
2948
2951
|
--blueprint-combobox-border-right-width:none;
|
|
2949
2952
|
}
|
|
2950
2953
|
|
|
2951
|
-
.bp_combobox_group_module_errorCombobox--
|
|
2954
|
+
.bp_combobox_group_module_errorCombobox--9375b.bp_combobox_group_module_errorSelect--9375b.bp_combobox_group_module_trailing--9375b{
|
|
2952
2955
|
--blueprint-select-border-error-left-width:none;
|
|
2953
2956
|
}
|
|
2954
2957
|
|
|
2955
|
-
.bp_combobox_group_module_errorCombobox--
|
|
2958
|
+
.bp_combobox_group_module_errorCombobox--9375b.bp_combobox_group_module_errorSelect--9375b.bp_combobox_group_module_leading--9375b{
|
|
2956
2959
|
--blueprint-select-border-error-right-width:none;
|
|
2957
2960
|
}
|
|
2958
2961
|
|
|
2959
|
-
.bp_combobox_group_module_selectHasFocus--
|
|
2962
|
+
.bp_combobox_group_module_selectHasFocus--9375b.bp_combobox_group_module_leading--9375b{
|
|
2960
2963
|
--blueprint-combobox-border-right-width:none;
|
|
2961
2964
|
}
|
|
2962
2965
|
|
|
2963
|
-
.bp_combobox_group_module_selectHasFocus--
|
|
2966
|
+
.bp_combobox_group_module_selectHasFocus--9375b.bp_combobox_group_module_errorCombobox--9375b.bp_combobox_group_module_leading--9375b{
|
|
2964
2967
|
--blueprint-combobox-border-error-right-width:none;
|
|
2965
2968
|
}
|
|
2966
2969
|
|
|
2967
|
-
.bp_combobox_group_module_selectHasFocus--
|
|
2970
|
+
.bp_combobox_group_module_selectHasFocus--9375b.bp_combobox_group_module_errorCombobox--9375b.bp_combobox_group_module_trailing--9375b{
|
|
2968
2971
|
--blueprint-combobox-border-error-left-width:none;
|
|
2969
2972
|
}
|
|
2970
2973
|
|
|
2971
|
-
.bp_combobox_group_module_comboboxHasFocus--
|
|
2974
|
+
.bp_combobox_group_module_comboboxHasFocus--9375b.bp_combobox_group_module_leading--9375b{
|
|
2972
2975
|
--blueprint-select-border-right-width:none;
|
|
2973
2976
|
}
|
|
2974
2977
|
|
|
2975
|
-
.bp_combobox_group_module_comboboxHasFocus--
|
|
2978
|
+
.bp_combobox_group_module_comboboxHasFocus--9375b.bp_combobox_group_module_errorSelect--9375b.bp_combobox_group_module_leading--9375b{
|
|
2976
2979
|
--blueprint-select-border-error-right-width:none;
|
|
2977
2980
|
}
|
|
2978
2981
|
|
|
2979
|
-
.bp_combobox_group_module_comboboxHasFocus--
|
|
2982
|
+
.bp_combobox_group_module_comboboxHasFocus--9375b.bp_combobox_group_module_errorSelect--9375b.bp_combobox_group_module_trailing--9375b{
|
|
2980
2983
|
--blueprint-select-border-error-left-width:none;
|
|
2981
2984
|
}
|
|
2982
2985
|
|
|
@@ -6405,45 +6408,66 @@ table.bp_inline_table_module_inlineTable--14908[data-modern=true] td:last-child,
|
|
|
6405
6408
|
.bp_page_module_portalEntry--41d33{
|
|
6406
6409
|
display:contents;
|
|
6407
6410
|
}
|
|
6408
|
-
.bp_page_header_module_pageHeader--
|
|
6411
|
+
.bp_page_header_module_pageHeader--2768d[data-modern=false]{
|
|
6412
|
+
--page-header-min-height:var(--size-10);
|
|
6413
|
+
--page-header-max-height:var(--size-16);
|
|
6414
|
+
--page-header-background:var(--surface-surface);
|
|
6415
|
+
--page-header-default-height:var(--size-16);
|
|
6416
|
+
--page-header-default-padding-inline:var(--space-2);
|
|
6417
|
+
--page-header-inline-height:var(--size-10);
|
|
6418
|
+
}
|
|
6419
|
+
|
|
6420
|
+
.bp_page_header_module_pageHeader--2768d[data-modern=true]{
|
|
6421
|
+
--page-header-min-height:var(--bp-size-100);
|
|
6422
|
+
--page-header-max-height:var(--bp-size-160);
|
|
6423
|
+
--page-header-background:var(--bp-surface-surface);
|
|
6424
|
+
--page-header-default-height:var(--bp-size-160);
|
|
6425
|
+
--page-header-default-padding-inline:var(--bp-space-020);
|
|
6426
|
+
--page-header-inline-height:var(--bp-size-100);
|
|
6427
|
+
}
|
|
6428
|
+
.bp_page_header_module_pageHeader--2768d[data-modern=true]:not(.bp_page_header_module_inline--2768d){
|
|
6429
|
+
border-bottom:var(--bp-border-01) solid var(--bp-border-header-border);
|
|
6430
|
+
}
|
|
6431
|
+
|
|
6432
|
+
.bp_page_header_module_pageHeader--2768d{
|
|
6409
6433
|
align-items:center;
|
|
6410
|
-
background:var(--
|
|
6434
|
+
background:var(--page-header-background);
|
|
6411
6435
|
display:flex;
|
|
6412
6436
|
flex-direction:row;
|
|
6413
6437
|
justify-content:space-between;
|
|
6414
|
-
max-height:var(--
|
|
6415
|
-
min-height:var(--
|
|
6438
|
+
max-height:var(--page-header-max-height);
|
|
6439
|
+
min-height:var(--page-header-min-height);
|
|
6416
6440
|
width:100%;
|
|
6417
6441
|
}
|
|
6418
|
-
.bp_page_header_module_pageHeader--
|
|
6442
|
+
.bp_page_header_module_pageHeader--2768d.bp_page_header_module_sticky--2768d{
|
|
6419
6443
|
bottom:var(--blueprint-page-header-bottom, 0);
|
|
6420
6444
|
left:var(--blueprint-page-header-left, 0);
|
|
6421
6445
|
position:sticky;
|
|
6422
6446
|
right:var(--blueprint-page-header-right, 0);
|
|
6423
6447
|
top:var(--blueprint-page-header-top, 0);
|
|
6424
6448
|
}
|
|
6425
|
-
.bp_page_header_module_pageHeader--
|
|
6426
|
-
height:var(--
|
|
6427
|
-
padding-inline:var(--
|
|
6449
|
+
.bp_page_header_module_pageHeader--2768d.bp_page_header_module_default--2768d{
|
|
6450
|
+
height:var(--page-header-default-height);
|
|
6451
|
+
padding-inline:var(--page-header-default-padding-inline);
|
|
6428
6452
|
}
|
|
6429
|
-
.bp_page_header_module_pageHeader--
|
|
6430
|
-
height:var(--
|
|
6453
|
+
.bp_page_header_module_pageHeader--2768d.bp_page_header_module_inline--2768d{
|
|
6454
|
+
height:var(--page-header-inline-height);
|
|
6431
6455
|
}
|
|
6432
|
-
.bp_page_header_module_pageHeader--
|
|
6456
|
+
.bp_page_header_module_pageHeader--2768d .bp_page_header_module_corner--2768d{
|
|
6433
6457
|
align-items:center;
|
|
6434
6458
|
display:flex;
|
|
6435
6459
|
flex-basis:content;
|
|
6436
6460
|
flex-grow:0;
|
|
6437
6461
|
flex-shrink:0;
|
|
6438
6462
|
}
|
|
6439
|
-
.bp_page_header_module_pageHeader--
|
|
6463
|
+
.bp_page_header_module_pageHeader--2768d .bp_page_header_module_startElements--2768d{
|
|
6440
6464
|
align-items:center;
|
|
6441
6465
|
display:flex;
|
|
6442
6466
|
flex-grow:1;
|
|
6443
6467
|
justify-content:flex-start;
|
|
6444
6468
|
overflow:hidden;
|
|
6445
6469
|
}
|
|
6446
|
-
.bp_page_header_module_pageHeader--
|
|
6470
|
+
.bp_page_header_module_pageHeader--2768d .bp_page_header_module_endElements--2768d{
|
|
6447
6471
|
align-items:center;
|
|
6448
6472
|
display:flex;
|
|
6449
6473
|
flex-direction:row;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { forwardRef, createElement } from 'react';
|
|
4
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
5
|
import styles from './page-header.module.js';
|
|
5
6
|
|
|
6
7
|
const PageHeaderRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
@@ -12,9 +13,13 @@ const PageHeaderRoot = /*#__PURE__*/forwardRef((props, forwardedRef) => {
|
|
|
12
13
|
sticky = true,
|
|
13
14
|
...rest
|
|
14
15
|
} = props;
|
|
16
|
+
const {
|
|
17
|
+
enableModernizedComponents
|
|
18
|
+
} = useBlueprintModernization();
|
|
15
19
|
return /*#__PURE__*/createElement(as, {
|
|
16
20
|
...rest,
|
|
17
21
|
ref: forwardedRef,
|
|
22
|
+
'data-modern': enableModernizedComponents,
|
|
18
23
|
className: clsx(styles.pageHeader, className, {
|
|
19
24
|
[styles.default]: variant === 'default'
|
|
20
25
|
}, {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"pageHeader":"bp_page_header_module_pageHeader--
|
|
2
|
+
var styles = {"pageHeader":"bp_page_header_module_pageHeader--2768d","inline":"bp_page_header_module_inline--2768d","sticky":"bp_page_header_module_sticky--2768d","default":"bp_page_header_module_default--2768d","corner":"bp_page_header_module_corner--2768d","startElements":"bp_page_header_module_startElements--2768d","endElements":"bp_page_header_module_endElements--2768d"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|