@box/blueprint-web 12.57.1 → 12.59.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/card/card.module.js +1 -1
- package/dist/lib-esm/combobox/combobox.js +39 -15
- package/dist/lib-esm/combobox/types.d.ts +7 -0
- package/dist/lib-esm/index.css +114 -51
- package/dist/lib-esm/inline-table/inline-table.js +5 -0
- package/dist/lib-esm/inline-table/inline-table.module.js +1 -1
- package/dist/lib-esm/radio-tiles/radio-tiles-option.js +7 -2
- package/dist/lib-esm/radio-tiles/radio-tiles-option.module.js +1 -1
- package/dist/lib-esm/radio-tiles/radio-tiles.js +5 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"card":"bp_card_module_card--
|
|
2
|
+
var styles = {"card":"bp_card_module_card--28a0a","dropshadow-1":"bp_card_module_dropshadow-1--28a0a","dropshadow-3":"bp_card_module_dropshadow-3--28a0a"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -40,6 +40,7 @@ const RootInner = ({
|
|
|
40
40
|
...rest
|
|
41
41
|
} = props;
|
|
42
42
|
const {
|
|
43
|
+
selectOnEnterOrTab = false,
|
|
43
44
|
disabled = false,
|
|
44
45
|
required = false,
|
|
45
46
|
className,
|
|
@@ -136,18 +137,24 @@ const RootInner = ({
|
|
|
136
137
|
}
|
|
137
138
|
return getSelectedOptionValues(valueProp);
|
|
138
139
|
}, [getSelectedOptionValues, valueProp]);
|
|
139
|
-
const setValue =
|
|
140
|
+
const setValue = useCallback((nextSelectedValue, isSelectedFromEnter) => {
|
|
140
141
|
if (!onValueChange) {
|
|
141
142
|
return;
|
|
142
143
|
}
|
|
143
144
|
let selectedOption;
|
|
144
|
-
if (Array.isArray(
|
|
145
|
-
|
|
145
|
+
if (Array.isArray(nextSelectedValue)) {
|
|
146
|
+
if (isSelectedFromEnter) {
|
|
147
|
+
selectedOption = nextSelectedValue.map(value => ({
|
|
148
|
+
value
|
|
149
|
+
}));
|
|
150
|
+
} else {
|
|
151
|
+
selectedOption = nextSelectedValue.map(nextValue => getOptionFromValue(nextValue, options));
|
|
152
|
+
}
|
|
146
153
|
} else {
|
|
147
|
-
selectedOption = getOptionFromValue(
|
|
154
|
+
selectedOption = getOptionFromValue(nextSelectedValue, options);
|
|
148
155
|
}
|
|
149
156
|
onValueChange(selectedOption);
|
|
150
|
-
};
|
|
157
|
+
}, [onValueChange, options]);
|
|
151
158
|
const selectStore = useSelectStore({
|
|
152
159
|
combobox: comboboxStore,
|
|
153
160
|
defaultValue: getDefaultValue(),
|
|
@@ -255,33 +262,50 @@ const RootInner = ({
|
|
|
255
262
|
return prev;
|
|
256
263
|
});
|
|
257
264
|
}, [selectStore, focusInput]);
|
|
265
|
+
const handleSelectOnEnterOrTab = useCallback(() => {
|
|
266
|
+
const currentValues = Array.isArray(selectedValue) ? selectedValue : [];
|
|
267
|
+
const nextValue = inputValue.trim();
|
|
268
|
+
// Check if value already exists to avoid duplicates
|
|
269
|
+
if (!currentValues.includes(nextValue)) {
|
|
270
|
+
const nextValues = [...currentValues, nextValue];
|
|
271
|
+
setValue(nextValues, true);
|
|
272
|
+
}
|
|
273
|
+
}, [selectedValue, inputValue, setValue]);
|
|
274
|
+
const handleEscape = useCallback(() => {
|
|
275
|
+
if (isOpen) {
|
|
276
|
+
setOpen(false);
|
|
277
|
+
} else if (clearOnEscape) {
|
|
278
|
+
setInputValue('');
|
|
279
|
+
resetSelectedValue();
|
|
280
|
+
}
|
|
281
|
+
}, [isOpen, clearOnEscape, setOpen, setInputValue, resetSelectedValue]);
|
|
258
282
|
const handleKeyDown = useCallback(event => {
|
|
259
283
|
// Close menu
|
|
260
284
|
if (event.key === 'Enter' || event.key === 'Tab') {
|
|
261
285
|
if (event.nativeEvent.isComposing) {
|
|
262
286
|
return;
|
|
263
287
|
}
|
|
288
|
+
// We only want to select the input value directly if
|
|
289
|
+
// the user press enter or tab
|
|
290
|
+
// and selectOnEnterOrTab is true
|
|
291
|
+
// and the input value is not empty
|
|
292
|
+
// and the input value is not already selected
|
|
293
|
+
if (selectOnEnterOrTab && inputValue.trim()) {
|
|
294
|
+
handleSelectOnEnterOrTab();
|
|
295
|
+
}
|
|
264
296
|
setOpen(false);
|
|
265
297
|
return;
|
|
266
298
|
}
|
|
267
299
|
// Close menu or clear input
|
|
268
300
|
if (event.key === 'Escape') {
|
|
269
|
-
|
|
270
|
-
setOpen(false);
|
|
271
|
-
} else {
|
|
272
|
-
if (!clearOnEscape) {
|
|
273
|
-
return;
|
|
274
|
-
}
|
|
275
|
-
setInputValue('');
|
|
276
|
-
resetSelectedValue();
|
|
277
|
-
}
|
|
301
|
+
handleEscape();
|
|
278
302
|
}
|
|
279
303
|
if (event.key === 'Backspace') {
|
|
280
304
|
if (deleteChipOnBackspace && multiselect && !inputValue && selectedValue.length) {
|
|
281
305
|
removeMultiSelectInputChip(selectedValue[selectedValue.length - 1]);
|
|
282
306
|
}
|
|
283
307
|
}
|
|
284
|
-
}, [
|
|
308
|
+
}, [deleteChipOnBackspace, handleEscape, handleSelectOnEnterOrTab, inputValue, multiselect, removeMultiSelectInputChip, selectedValue, selectOnEnterOrTab, setOpen]);
|
|
285
309
|
// Reset input on blur
|
|
286
310
|
const handleOnBlur = useCallback(() => {
|
|
287
311
|
if (!clearOnBlur || isOpen) {
|
|
@@ -230,6 +230,13 @@ export interface ComboboxBaseProps<Multiple extends boolean, FreeInput extends b
|
|
|
230
230
|
* @default false
|
|
231
231
|
*/
|
|
232
232
|
displaySingleSelectionAsChip?: boolean;
|
|
233
|
+
/**
|
|
234
|
+
* If `true`, the combobox input will select the input value when the user presses enter or tab.
|
|
235
|
+
* This prop only works on multi-select combobox at the moment.
|
|
236
|
+
*
|
|
237
|
+
* @default false
|
|
238
|
+
*/
|
|
239
|
+
selectOnEnterOrTab?: boolean;
|
|
233
240
|
}
|
|
234
241
|
export type ComboboxTextArea = Pick<TextAreaProps, 'maxRows' | 'minRows' | 'maxLength' | 'aria-describedby'> & {
|
|
235
242
|
as: 'textarea';
|
package/dist/lib-esm/index.css
CHANGED
|
@@ -1471,7 +1471,7 @@
|
|
|
1471
1471
|
.bp_button_wrapper_module_buttonWrapper--b0897{
|
|
1472
1472
|
all:unset;
|
|
1473
1473
|
}
|
|
1474
|
-
.bp_card_module_card--
|
|
1474
|
+
.bp_card_module_card--28a0a[data-modern=true]{
|
|
1475
1475
|
--bp-card-dropshadow-1:var(--dropshadow-1);
|
|
1476
1476
|
--bp-card-dropshadow-3:var(--dropshadow-3);
|
|
1477
1477
|
--card-radius:var(--bp-radius-10);
|
|
@@ -1480,30 +1480,30 @@
|
|
|
1480
1480
|
--card-border:var(--bp-border-01) solid var(--bp-border-card-border);
|
|
1481
1481
|
--card-dropshadow-1:var(--bp-card-dropshadow-1);
|
|
1482
1482
|
--card-dropshadow-3:var(--bp-card-dropshadow-3);
|
|
1483
|
-
--card-backdrop-filter:
|
|
1483
|
+
--card-backdrop-filter:blur(16px);
|
|
1484
1484
|
}
|
|
1485
1485
|
|
|
1486
|
-
.bp_card_module_card--
|
|
1486
|
+
.bp_card_module_card--28a0a[data-modern=false]{
|
|
1487
1487
|
--card-padding:var(--space-4);
|
|
1488
1488
|
--card-background:var(--surface-card-surface);
|
|
1489
1489
|
--card-border:var(--border-1) solid var(--border-card-border);
|
|
1490
1490
|
--card-radius:var(--radius-4);
|
|
1491
1491
|
--card-dropshadow-1:var(--dropshadow-1);
|
|
1492
1492
|
--card-dropshadow-3:var(--dropshadow-3);
|
|
1493
|
-
--card-backdrop-filter:
|
|
1493
|
+
--card-backdrop-filter:none;
|
|
1494
1494
|
}
|
|
1495
1495
|
|
|
1496
|
-
.bp_card_module_card--
|
|
1496
|
+
.bp_card_module_card--28a0a{
|
|
1497
1497
|
backdrop-filter:var(--card-backdrop-filter);
|
|
1498
1498
|
background:var(--card-background);
|
|
1499
1499
|
border:var(--card-border);
|
|
1500
1500
|
border-radius:var(--card-radius);
|
|
1501
1501
|
padding:var(--card-padding);
|
|
1502
1502
|
}
|
|
1503
|
-
.bp_card_module_card--
|
|
1503
|
+
.bp_card_module_card--28a0a.bp_card_module_dropshadow-1--28a0a{
|
|
1504
1504
|
box-shadow:var(--card-dropshadow-1);
|
|
1505
1505
|
}
|
|
1506
|
-
.bp_card_module_card--
|
|
1506
|
+
.bp_card_module_card--28a0a.bp_card_module_dropshadow-3--28a0a{
|
|
1507
1507
|
box-shadow:var(--card-dropshadow-3);
|
|
1508
1508
|
}
|
|
1509
1509
|
|
|
@@ -5775,21 +5775,33 @@
|
|
|
5775
5775
|
height:var(--icon-toogle-button-xsmall-size);
|
|
5776
5776
|
width:var(--icon-toogle-button-xsmall-size);
|
|
5777
5777
|
}
|
|
5778
|
-
table.bp_inline_table_module_inlineTable--
|
|
5779
|
-
background:var(--gray-white);
|
|
5780
|
-
border:var(--border-1) solid var(--gray-10);
|
|
5778
|
+
table.bp_inline_table_module_inlineTable--14908[data-modern=false]{
|
|
5779
|
+
--table-background:var(--gray-white);
|
|
5780
|
+
--table-border:var(--border-1) solid var(--gray-10);
|
|
5781
|
+
--table-border-radius:var(--radius-2);
|
|
5782
|
+
--table-th-color:var(--text-text-on-light-secondary);
|
|
5783
|
+
--table-cell-height:var(--size-12);
|
|
5784
|
+
--table-action-cell-padding-block-start:var(--space-2);
|
|
5785
|
+
--table-action-cell-padding-block-end:var(--space-2);
|
|
5786
|
+
--table-cell-padding-inline-start:var(--space-5);
|
|
5787
|
+
--table-cell-padding-inline-end:var(--space-5);
|
|
5788
|
+
--table-cell-border:var(--border-1) solid var(--gray-10);
|
|
5789
|
+
}
|
|
5790
|
+
|
|
5791
|
+
table.bp_inline_table_module_inlineTable--14908{
|
|
5792
|
+
background:var(--table-background);
|
|
5793
|
+
border:var(--table-border);
|
|
5781
5794
|
border-collapse:initial;
|
|
5782
|
-
border-
|
|
5783
|
-
border-radius:var(--radius-2);
|
|
5795
|
+
border-radius:var(--table-border-radius);
|
|
5784
5796
|
border-spacing:0;
|
|
5785
5797
|
}
|
|
5786
|
-
table.bp_inline_table_module_inlineTable--
|
|
5798
|
+
table.bp_inline_table_module_inlineTable--14908.bp_inline_table_module_borderHidden--14908{
|
|
5787
5799
|
border:none;
|
|
5788
5800
|
}
|
|
5789
|
-
table.bp_inline_table_module_inlineTable--
|
|
5801
|
+
table.bp_inline_table_module_inlineTable--14908.bp_inline_table_module_fullSpan--14908{
|
|
5790
5802
|
width:100%;
|
|
5791
5803
|
}
|
|
5792
|
-
table.bp_inline_table_module_inlineTable--
|
|
5804
|
+
table.bp_inline_table_module_inlineTable--14908 td{
|
|
5793
5805
|
font-family:var(--body-default-font-family);
|
|
5794
5806
|
font-size:var(--body-default-font-size);
|
|
5795
5807
|
font-weight:var(--body-default-font-weight);
|
|
@@ -5799,13 +5811,13 @@ table.bp_inline_table_module_inlineTable--7cffa td{
|
|
|
5799
5811
|
text-decoration:var(--body-default-text-decoration);
|
|
5800
5812
|
text-transform:var(--body-default-text-case);
|
|
5801
5813
|
}
|
|
5802
|
-
table.bp_inline_table_module_inlineTable--
|
|
5803
|
-
padding-block-end:var(--
|
|
5804
|
-
padding-block-start:var(--
|
|
5814
|
+
table.bp_inline_table_module_inlineTable--14908 td.bp_inline_table_module_actionCell--14908{
|
|
5815
|
+
padding-block-end:var(--table-action-cell-padding-block-end);
|
|
5816
|
+
padding-block-start:var(--table-action-cell-padding-block-start);
|
|
5805
5817
|
}
|
|
5806
|
-
table.bp_inline_table_module_inlineTable--
|
|
5807
|
-
border-bottom:var(--
|
|
5808
|
-
color:var(--
|
|
5818
|
+
table.bp_inline_table_module_inlineTable--14908 th{
|
|
5819
|
+
border-bottom:var(--table-cell-border);
|
|
5820
|
+
color:var(--table-th-color);
|
|
5809
5821
|
font-family:var(--caption-default-font-family);
|
|
5810
5822
|
font-size:var(--caption-default-font-size);
|
|
5811
5823
|
font-weight:var(--caption-default-font-weight);
|
|
@@ -5816,17 +5828,40 @@ table.bp_inline_table_module_inlineTable--7cffa th{
|
|
|
5816
5828
|
text-transform:var(--caption-default-text-case);
|
|
5817
5829
|
text-transform:uppercase;
|
|
5818
5830
|
}
|
|
5819
|
-
table.bp_inline_table_module_inlineTable--
|
|
5820
|
-
height:var(--
|
|
5831
|
+
table.bp_inline_table_module_inlineTable--14908 td,table.bp_inline_table_module_inlineTable--14908 th{
|
|
5832
|
+
height:var(--table-cell-height);
|
|
5833
|
+
}
|
|
5834
|
+
table.bp_inline_table_module_inlineTable--14908 td:first-child,table.bp_inline_table_module_inlineTable--14908 th:first-child{
|
|
5835
|
+
padding-inline-start:var(--table-cell-padding-inline-start);
|
|
5836
|
+
}
|
|
5837
|
+
table.bp_inline_table_module_inlineTable--14908 td:last-child,table.bp_inline_table_module_inlineTable--14908 td:not(:only-child),table.bp_inline_table_module_inlineTable--14908 th:last-child,table.bp_inline_table_module_inlineTable--14908 th:not(:only-child){
|
|
5838
|
+
padding-inline-end:var(--table-cell-padding-inline-end);
|
|
5821
5839
|
}
|
|
5822
|
-
table.bp_inline_table_module_inlineTable--
|
|
5823
|
-
|
|
5840
|
+
table.bp_inline_table_module_inlineTable--14908 tr:not(:last-child) td{
|
|
5841
|
+
border-block-end:var(--table-cell-border);
|
|
5824
5842
|
}
|
|
5825
|
-
|
|
5826
|
-
|
|
5843
|
+
|
|
5844
|
+
table.bp_inline_table_module_inlineTable--14908[data-modern=true]{
|
|
5845
|
+
--table-background:var(--bp-surface-inline-table-surface);
|
|
5846
|
+
--table-border:var(--bp-border-01) solid var(--bp-border-inline-table-border);
|
|
5847
|
+
--table-border-radius:var(--bp-radius-06);
|
|
5848
|
+
--table-th-color:var(--bp-text-text-on-light-secondary);
|
|
5849
|
+
--table-cell-height:var(--bp-size-120);
|
|
5850
|
+
--table-action-cell-padding-block-start:var(--bp-space-020);
|
|
5851
|
+
--table-cell-padding-inline-default:var(--bp-space-020);
|
|
5852
|
+
--table-action-cell-padding-block-end:var(--bp-space-020);
|
|
5853
|
+
--table-cell-padding-inline-start:var(--bp-space-050);
|
|
5854
|
+
--table-cell-padding-inline-end:var(--bp-space-050);
|
|
5855
|
+
--table-cell-border:var(--bp-border-01) solid var(--bp-border-divider-border);
|
|
5856
|
+
}
|
|
5857
|
+
table.bp_inline_table_module_inlineTable--14908[data-modern=true] td,table.bp_inline_table_module_inlineTable--14908[data-modern=true] th{
|
|
5858
|
+
padding-inline:var(--table-cell-padding-inline-default);
|
|
5827
5859
|
}
|
|
5828
|
-
table.bp_inline_table_module_inlineTable--
|
|
5829
|
-
|
|
5860
|
+
table.bp_inline_table_module_inlineTable--14908[data-modern=true] td:first-child,table.bp_inline_table_module_inlineTable--14908[data-modern=true] th:first-child{
|
|
5861
|
+
padding-inline-start:var(--table-cell-padding-inline-start);
|
|
5862
|
+
}
|
|
5863
|
+
table.bp_inline_table_module_inlineTable--14908[data-modern=true] td:last-child,table.bp_inline_table_module_inlineTable--14908[data-modern=true] th:last-child{
|
|
5864
|
+
padding-inline-end:var(--table-cell-padding-inline-end);
|
|
5830
5865
|
}
|
|
5831
5866
|
.bp_search_term_string_module_searchTerm--28ab8{
|
|
5832
5867
|
background-color:var(--surface-text-highlight-surface);
|
|
@@ -7784,10 +7819,38 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7784
7819
|
.bp_radio_group_module_radioButton--ed12f:not([data-disabled]):focus-visible[data-state=checked] .bp_radio_group_module_indicator--ed12f,.bp_radio_group_module_radioButton--ed12f:not([data-disabled]):hover[data-state=checked] .bp_radio_group_module_indicator--ed12f{
|
|
7785
7820
|
background-color:var(--surface-radio-surface-selected-hover);
|
|
7786
7821
|
}
|
|
7787
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7788
|
-
background
|
|
7789
|
-
border:var(--border-1) solid var(--border-radiotile-border);
|
|
7790
|
-
border-radius:var(--radius-3);
|
|
7822
|
+
.bp_radio_tiles_option_module_radioTileOption--de970[data-modern=false]{
|
|
7823
|
+
--radio-tile-background:var(--surface-radiotile-surface);
|
|
7824
|
+
--radio-tile-border:var(--border-1) solid var(--border-radiotile-border);
|
|
7825
|
+
--radio-tile-border-radius:var(--radius-3);
|
|
7826
|
+
--radio-tile-icon-color:var(--icon-icon-on-light-secondary);
|
|
7827
|
+
--radio-tile-checked-background:var(--surface-radiotile-surface-selected);
|
|
7828
|
+
--radio-tile-checked-box-shadow:0 0 0 var(--border-2) var(--border-radiotile-border-selected);
|
|
7829
|
+
--radio-tile-hover-background:var(--surface-radiotile-surface-hover);
|
|
7830
|
+
--radio-tile-hover-border:var(--border-1) solid var(--border-radiotile-border-hover);
|
|
7831
|
+
--radio-tile-focus-outline:var(--border-2) solid var(--border-input-border-focus);
|
|
7832
|
+
--radio-tile-focus-outline-offset:var(--border-2);
|
|
7833
|
+
--radio-tile-checked-focus-outline-offset:var(--border-3);
|
|
7834
|
+
}
|
|
7835
|
+
|
|
7836
|
+
.bp_radio_tiles_option_module_radioTileOption--de970[data-modern=true]{
|
|
7837
|
+
--radio-tile-background:var(--bp-surface-radio-tile-surface);
|
|
7838
|
+
--radio-tile-border:var(--bp-border-01) solid var(--bp-border-radio-tile-border);
|
|
7839
|
+
--radio-tile-border-radius:var(--bp-radius-06);
|
|
7840
|
+
--radio-tile-icon-color:var(--bp-icon-icon-on-light-secondary);
|
|
7841
|
+
--radio-tile-checked-background:var(--bp-surface-radio-tile-surface-selected);
|
|
7842
|
+
--radio-tile-checked-box-shadow:0 0 0 var(--bp-border-02) var(--bp-border-radio-tile-border-selected);
|
|
7843
|
+
--radio-tile-hover-background:var(--bp-surface-radio-tile-surface-hover);
|
|
7844
|
+
--radio-tile-hover-border:var(--bp-border-01) solid var(--bp-border-radio-tile-border-hover);
|
|
7845
|
+
--radio-tile-focus-outline:var(--bp-border-02) solid var(--bp-outline-focus-on-light);
|
|
7846
|
+
--radio-tile-focus-outline-offset:var(--bp-border-02);
|
|
7847
|
+
--radio-tile-checked-focus-outline-offset:var(--bp-border-03);
|
|
7848
|
+
}
|
|
7849
|
+
|
|
7850
|
+
.bp_radio_tiles_option_module_radioTileOption--de970{
|
|
7851
|
+
background-color:var(--radio-tile-background);
|
|
7852
|
+
border:var(--radio-tile-border);
|
|
7853
|
+
border-radius:var(--radio-tile-border-radius);
|
|
7791
7854
|
box-sizing:border-box;
|
|
7792
7855
|
cursor:pointer;
|
|
7793
7856
|
display:inline-flex;
|
|
@@ -7800,35 +7863,35 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7800
7863
|
-webkit-user-select:none;
|
|
7801
7864
|
user-select:none;
|
|
7802
7865
|
}
|
|
7803
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7866
|
+
.bp_radio_tiles_option_module_radioTileOption--de970 .bp_radio_tiles_option_module_icon--de970{
|
|
7804
7867
|
display:inline-flex;
|
|
7805
7868
|
}
|
|
7806
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7807
|
-
fill:var(--
|
|
7869
|
+
.bp_radio_tiles_option_module_radioTileOption--de970 .bp_radio_tiles_option_module_icon--de970 > svg > path{
|
|
7870
|
+
fill:var(--radio-tile-icon-color);
|
|
7808
7871
|
}
|
|
7809
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7872
|
+
.bp_radio_tiles_option_module_radioTileOption--de970.bp_radio_tiles_option_module_disabled--de970{
|
|
7810
7873
|
opacity:.6;
|
|
7811
7874
|
}
|
|
7812
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7813
|
-
outline:
|
|
7814
|
-
outline-offset:var(--
|
|
7875
|
+
.bp_radio_tiles_option_module_radioTileOption--de970:has(:focus-visible){
|
|
7876
|
+
outline:var(--radio-tile-focus-outline);
|
|
7877
|
+
outline-offset:var(--radio-tile-focus-outline-offset);
|
|
7815
7878
|
}
|
|
7816
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7817
|
-
background-color:var(--
|
|
7879
|
+
.bp_radio_tiles_option_module_radioTileOption--de970.bp_radio_tiles_option_module_checked--de970{
|
|
7880
|
+
background-color:var(--radio-tile-checked-background);
|
|
7818
7881
|
border-color:#0000;
|
|
7819
|
-
box-shadow:
|
|
7882
|
+
box-shadow:var(--radio-tile-checked-box-shadow);
|
|
7820
7883
|
}
|
|
7821
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7822
|
-
outline-offset:var(--
|
|
7884
|
+
.bp_radio_tiles_option_module_radioTileOption--de970.bp_radio_tiles_option_module_checked--de970:focus-within{
|
|
7885
|
+
outline-offset:var(--radio-tile-checked-focus-outline-offset);
|
|
7823
7886
|
}
|
|
7824
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7887
|
+
.bp_radio_tiles_option_module_radioTileOption--de970.bp_radio_tiles_option_module_checked--de970 .bp_radio_tiles_option_module_icon--de970 > svg > path{
|
|
7825
7888
|
fill:var(--icon-icon-blue);
|
|
7826
7889
|
}
|
|
7827
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7828
|
-
background-color:var(--
|
|
7829
|
-
border:var(--
|
|
7890
|
+
.bp_radio_tiles_option_module_radioTileOption--de970:hover:not(.bp_radio_tiles_option_module_disabled--de970, .bp_radio_tiles_option_module_checked--de970){
|
|
7891
|
+
background-color:var(--radio-tile-hover-background);
|
|
7892
|
+
border:var(--radio-tile-hover-border);
|
|
7830
7893
|
}
|
|
7831
|
-
.bp_radio_tiles_option_module_radioTileOption--
|
|
7894
|
+
.bp_radio_tiles_option_module_radioTileOption--de970 > label{
|
|
7832
7895
|
align-items:center;
|
|
7833
7896
|
box-sizing:border-box;
|
|
7834
7897
|
cursor:inherit;
|
|
@@ -7840,7 +7903,7 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
7840
7903
|
width:100%;
|
|
7841
7904
|
}
|
|
7842
7905
|
|
|
7843
|
-
.bp_radio_tiles_option_module_radioTileLabel--
|
|
7906
|
+
.bp_radio_tiles_option_module_radioTileLabel--de970{
|
|
7844
7907
|
max-width:100%;
|
|
7845
7908
|
overflow:hidden;
|
|
7846
7909
|
text-align:center;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
5
|
import styles from './inline-table.module.js';
|
|
5
6
|
|
|
6
7
|
const Table = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
@@ -10,8 +11,12 @@ const Table = /*#__PURE__*/React__default.forwardRef((props, ref) => {
|
|
|
10
11
|
className,
|
|
11
12
|
...rest
|
|
12
13
|
} = props;
|
|
14
|
+
const {
|
|
15
|
+
enableModernizedComponents
|
|
16
|
+
} = useBlueprintModernization();
|
|
13
17
|
return jsx("table", {
|
|
14
18
|
className: clsx(hideBorder && styles.borderHidden, fullSpan && styles.fullSpan, styles.inlineTable, className),
|
|
19
|
+
"data-modern": enableModernizedComponents,
|
|
15
20
|
...rest,
|
|
16
21
|
ref: ref
|
|
17
22
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"inlineTable":"bp_inline_table_module_inlineTable--
|
|
2
|
+
var styles = {"inlineTable":"bp_inline_table_module_inlineTable--14908","borderHidden":"bp_inline_table_module_borderHidden--14908","fullSpan":"bp_inline_table_module_fullSpan--14908","actionCell":"bp_inline_table_module_actionCell--14908"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { useRef } from 'react';
|
|
3
2
|
import clsx from 'clsx';
|
|
3
|
+
import React__default, { useRef } from 'react';
|
|
4
4
|
import { Text } from '../text/text.js';
|
|
5
5
|
import { useRadioTilesContext } from './radio-tiles.context.js';
|
|
6
|
-
import
|
|
6
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
7
7
|
import { useFullTextTooltip } from '../utils/useFullTextTooltip.js';
|
|
8
8
|
import { VisuallyHidden } from '../visually-hidden/visually-hidden.js';
|
|
9
|
+
import styles from './radio-tiles-option.module.js';
|
|
9
10
|
|
|
10
11
|
const RadioTilesOption = function RadioTilesOption({
|
|
11
12
|
children,
|
|
@@ -43,12 +44,16 @@ const RadioTilesOption = function RadioTilesOption({
|
|
|
43
44
|
[styles.checked]: isSelected,
|
|
44
45
|
[styles.disabled]: isDisabled
|
|
45
46
|
}, className);
|
|
47
|
+
const {
|
|
48
|
+
enableModernizedComponents
|
|
49
|
+
} = useBlueprintModernization();
|
|
46
50
|
return (
|
|
47
51
|
// @ts-expect-error Fix this type error - DSYS-1597
|
|
48
52
|
jsx(Tooltip, {
|
|
49
53
|
...wrapperProps,
|
|
50
54
|
children: jsx("div", {
|
|
51
55
|
className: radioTileClassNames,
|
|
56
|
+
"data-modern": enableModernizedComponents,
|
|
52
57
|
children: jsxs("label", {
|
|
53
58
|
children: [jsx(VisuallyHidden, {
|
|
54
59
|
children: jsx("input", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../index.css';
|
|
2
|
-
var styles = {"radioTileOption":"bp_radio_tiles_option_module_radioTileOption--
|
|
2
|
+
var styles = {"radioTileOption":"bp_radio_tiles_option_module_radioTileOption--de970","icon":"bp_radio_tiles_option_module_icon--de970","disabled":"bp_radio_tiles_option_module_disabled--de970","checked":"bp_radio_tiles_option_module_checked--de970","radioTileLabel":"bp_radio_tiles_option_module_radioTileLabel--de970"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
|
+
import { useBlueprintModernization } from '../blueprint-modernization-context/useBlueprintModernization.js';
|
|
4
5
|
import { RadioTilesOption } from './radio-tiles-option.js';
|
|
5
6
|
import { RadioTilesContext } from './radio-tiles.context.js';
|
|
6
7
|
import styles from './radio-tiles.module.js';
|
|
@@ -24,6 +25,9 @@ const RadioTilesRoot = ({
|
|
|
24
25
|
[styles.hasColumns]: Number(columns) > 0,
|
|
25
26
|
[variant === 'compact' ? styles.compact : styles.default]: true
|
|
26
27
|
}, className);
|
|
28
|
+
const {
|
|
29
|
+
enableModernizedComponents
|
|
30
|
+
} = useBlueprintModernization();
|
|
27
31
|
const contextValue = useMemo(() => ({
|
|
28
32
|
name,
|
|
29
33
|
selectedValue: value,
|
|
@@ -36,6 +40,7 @@ const RadioTilesRoot = ({
|
|
|
36
40
|
"aria-label": ariaLabel,
|
|
37
41
|
"aria-labelledby": ariaLabelledBy,
|
|
38
42
|
className: containerClassNames,
|
|
43
|
+
"data-modern": enableModernizedComponents,
|
|
39
44
|
role: "radiogroup",
|
|
40
45
|
style: containerStyles,
|
|
41
46
|
children: children
|