@box/blueprint-web 12.30.0 → 12.31.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
|
@@ -6389,7 +6389,7 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6389
6389
|
opacity:.3;
|
|
6390
6390
|
}
|
|
6391
6391
|
|
|
6392
|
-
.bp_tabs_module_hiddenWidthSetter--
|
|
6392
|
+
.bp_tabs_module_hiddenWidthSetter--5991e{
|
|
6393
6393
|
display:block;
|
|
6394
6394
|
font-family:var(--body-default-bold-font-family);
|
|
6395
6395
|
font-size:var(--body-default-bold-font-size);
|
|
@@ -6403,46 +6403,77 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6403
6403
|
text-transform:var(--body-default-bold-text-case);
|
|
6404
6404
|
visibility:hidden;
|
|
6405
6405
|
}
|
|
6406
|
-
.bp_tabs_module_hiddenWidthSetter--
|
|
6406
|
+
.bp_tabs_module_hiddenWidthSetter--5991e > *{
|
|
6407
6407
|
visibility:hidden;
|
|
6408
6408
|
}
|
|
6409
6409
|
|
|
6410
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6411
|
-
|
|
6412
|
-
|
|
6410
|
+
.bp_tabs_module_contentSwitchTabList--5991e[data-modern=false]{
|
|
6411
|
+
--content-switch-tab-list-gap:var(--space-1);
|
|
6412
|
+
--content-switch-tab-list-padding:var(--space-1);
|
|
6413
|
+
--content-switch-tab-list-background:var(--surface-contentswitcher-surface);
|
|
6414
|
+
--content-switch-tab-list-border-radius:var(--radius-7);
|
|
6415
|
+
--content-switch-tab-height:var(--size-8);
|
|
6416
|
+
--content-switch-tab-border-radius:var(--radius-6);
|
|
6417
|
+
--content-switch-tab-padding-inline:var(--space-4);
|
|
6418
|
+
--content-switch-tab-selected-color:var(--text-text-on-light);
|
|
6419
|
+
--content-switch-tab-selected-background:var(--surface-cta-surface-secondary);
|
|
6420
|
+
--content-switch-tab-selected-box-shadow:0 0 0 var(--border-1) var(--gray-50);
|
|
6421
|
+
--content-switch-tab-focus-box-shadow:0 0 0 var(--border-2) var(--outline-focus-on-light);
|
|
6422
|
+
--content-switch-tab-hover-background:var(--surface-surface-hover);
|
|
6423
|
+
--content-switch-tab-active-background:var(--surface-cta-surface-secondary-pressed);
|
|
6424
|
+
}
|
|
6425
|
+
|
|
6426
|
+
.bp_tabs_module_contentSwitchTabList--5991e[data-modern=true]{
|
|
6427
|
+
--content-switch-tab-list-gap:var(--bp-space-010);
|
|
6428
|
+
--content-switch-tab-list-padding:var(--bp-space-010);
|
|
6429
|
+
--content-switch-tab-list-background:var(--bp-gray-10);
|
|
6430
|
+
--content-switch-tab-list-border-radius:var(--bp-radius-10);
|
|
6431
|
+
--content-switch-tab-height:var(--bp-size-080);
|
|
6432
|
+
--content-switch-tab-border-radius:var(--bp-radius-10);
|
|
6433
|
+
--content-switch-tab-padding-inline:var(--bp-space-040);
|
|
6434
|
+
--content-switch-tab-selected-color:var(--bp-text-text-on-light);
|
|
6435
|
+
--content-switch-tab-selected-background:var(--bp-gray-white);
|
|
6436
|
+
--content-switch-tab-selected-box-shadow:0 0 0 var(--bp-border-01) var(--bp-gray-50);
|
|
6437
|
+
--content-switch-tab-focus-box-shadow:0 0 0 var(--bp-border-02) var(--bp-outline-focus-on-light);
|
|
6438
|
+
--content-switch-tab-hover-background:var(--bp-gray-05);
|
|
6439
|
+
}
|
|
6440
|
+
|
|
6441
|
+
.bp_tabs_module_contentSwitchTabList--5991e{
|
|
6442
|
+
background:var(--content-switch-tab-list-background);
|
|
6443
|
+
border-radius:var(--content-switch-tab-list-border-radius);
|
|
6413
6444
|
display:grid;
|
|
6414
|
-
gap:var(--
|
|
6445
|
+
gap:var(--content-switch-tab-list-gap);
|
|
6415
6446
|
grid-auto-columns:1fr;
|
|
6416
6447
|
grid-auto-flow:column;
|
|
6417
6448
|
min-width:-moz-fit-content;
|
|
6418
6449
|
min-width:fit-content;
|
|
6419
|
-
padding:var(--
|
|
6450
|
+
padding:var(--content-switch-tab-list-padding);
|
|
6420
6451
|
}
|
|
6421
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6452
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e{
|
|
6422
6453
|
align-items:center;
|
|
6423
6454
|
background:#0000;
|
|
6424
6455
|
border:none;
|
|
6425
|
-
border-radius:var(--radius
|
|
6456
|
+
border-radius:var(--content-switch-tab-border-radius);
|
|
6426
6457
|
display:flex;
|
|
6427
6458
|
flex-direction:column;
|
|
6428
6459
|
font-family:var(--body-default-font-family);
|
|
6429
6460
|
font-size:var(--body-default-font-size);
|
|
6430
6461
|
font-weight:var(--body-default-font-weight);
|
|
6431
|
-
height:var(--
|
|
6462
|
+
height:var(--content-switch-tab-height);
|
|
6432
6463
|
justify-content:center;
|
|
6433
6464
|
letter-spacing:var(--body-default-letter-spacing);
|
|
6434
6465
|
line-height:var(--body-default-line-height);
|
|
6435
6466
|
outline:none;
|
|
6436
|
-
padding-inline:var(--
|
|
6467
|
+
padding-inline:var(--content-switch-tab-padding-inline);
|
|
6437
6468
|
-webkit-text-decoration:var(--body-default-text-decoration);
|
|
6438
6469
|
text-decoration:var(--body-default-text-decoration);
|
|
6439
6470
|
text-transform:var(--body-default-text-case);
|
|
6440
6471
|
white-space:nowrap;
|
|
6441
6472
|
}
|
|
6442
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6443
|
-
background:var(--
|
|
6444
|
-
box-shadow:
|
|
6445
|
-
color:var(--
|
|
6473
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e[aria-selected=true]{
|
|
6474
|
+
background:var(--content-switch-tab-selected-background);
|
|
6475
|
+
box-shadow:var(--content-switch-tab-selected-box-shadow);
|
|
6476
|
+
color:var(--content-switch-tab-selected-color);
|
|
6446
6477
|
font-family:var(--body-default-bold-font-family);
|
|
6447
6478
|
font-size:var(--body-default-bold-font-size);
|
|
6448
6479
|
font-weight:var(--body-default-bold-font-weight);
|
|
@@ -6452,44 +6483,44 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6452
6483
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
6453
6484
|
text-transform:var(--body-default-bold-text-case);
|
|
6454
6485
|
}
|
|
6455
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6486
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e:not([aria-disabled=true])[data-focus-visible]{
|
|
6456
6487
|
border-color:#0000;
|
|
6457
|
-
box-shadow:
|
|
6488
|
+
box-shadow:var(--content-switch-tab-focus-box-shadow);
|
|
6458
6489
|
}
|
|
6459
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6460
|
-
background:var(--
|
|
6490
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e:not([aria-disabled=true]):hover{
|
|
6491
|
+
background:var(--content-switch-tab-hover-background);
|
|
6461
6492
|
}
|
|
6462
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6463
|
-
background:var(--
|
|
6493
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e:not([aria-disabled=true]):active{
|
|
6494
|
+
background:var(--content-switch-tab-active-background);
|
|
6464
6495
|
}
|
|
6465
|
-
.bp_tabs_module_contentSwitchTabList--
|
|
6496
|
+
.bp_tabs_module_contentSwitchTabList--5991e .bp_tabs_module_contentSwitchTab--5991e[aria-disabled=true]{
|
|
6466
6497
|
opacity:.3;
|
|
6467
6498
|
pointer-events:none;
|
|
6468
6499
|
}
|
|
6469
6500
|
|
|
6470
|
-
.bp_tabs_module_tabsListContainer--
|
|
6501
|
+
.bp_tabs_module_tabsListContainer--5991e{
|
|
6471
6502
|
height:calc(var(--size-10) + (var(--border-3) + 1px)*2);
|
|
6472
6503
|
overflow-y:hidden;
|
|
6473
6504
|
scroll-behavior:smooth;
|
|
6474
6505
|
}
|
|
6475
|
-
.bp_tabs_module_tabsListContainer--
|
|
6506
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e{
|
|
6476
6507
|
display:flex;
|
|
6477
6508
|
overflow-x:auto;
|
|
6478
6509
|
padding:calc(var(--border-3) + 1px);
|
|
6479
6510
|
}
|
|
6480
|
-
.bp_tabs_module_tabsListContainer--
|
|
6511
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tabSeparator--5991e{
|
|
6481
6512
|
border-bottom:var(--border-2) solid var(--border-tab-border);
|
|
6482
6513
|
min-width:var(--space-4);
|
|
6483
6514
|
}
|
|
6484
|
-
.bp_tabs_module_tabsListContainer--
|
|
6515
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tabSeparator--5991e:last-child{
|
|
6485
6516
|
display:none;
|
|
6486
6517
|
}
|
|
6487
6518
|
@media only screen and (max-width: 1023px){
|
|
6488
|
-
.bp_tabs_module_tabsListContainer--
|
|
6519
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tabSeparator--5991e{
|
|
6489
6520
|
min-width:calc(var(--border-3) + 1px);
|
|
6490
6521
|
}
|
|
6491
6522
|
}
|
|
6492
|
-
.bp_tabs_module_tabsListContainer--
|
|
6523
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e{
|
|
6493
6524
|
background:var(--background-background);
|
|
6494
6525
|
border-style:none;
|
|
6495
6526
|
border-bottom:var(--border-2) solid var(--border-tab-border);
|
|
@@ -6510,7 +6541,7 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6510
6541
|
text-transform:var(--body-default-text-case);
|
|
6511
6542
|
z-index:2;
|
|
6512
6543
|
}
|
|
6513
|
-
.bp_tabs_module_tabsListContainer--
|
|
6544
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e[aria-selected=true]{
|
|
6514
6545
|
border-bottom:var(--border-2) solid var(--border-tab-border-selected);
|
|
6515
6546
|
color:var(--text-cta-link);
|
|
6516
6547
|
font-family:var(--body-default-bold-font-family);
|
|
@@ -6522,21 +6553,21 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6522
6553
|
text-decoration:var(--body-default-bold-text-decoration);
|
|
6523
6554
|
text-transform:var(--body-default-bold-text-case);
|
|
6524
6555
|
}
|
|
6525
|
-
.bp_tabs_module_tabsListContainer--
|
|
6556
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:hover{
|
|
6526
6557
|
background-color:var(--surface-tab-surface-hover);
|
|
6527
6558
|
color:var(--text-text-on-light-secondary-hover);
|
|
6528
6559
|
}
|
|
6529
|
-
.bp_tabs_module_tabsListContainer--
|
|
6560
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:hover[aria-selected=true]{
|
|
6530
6561
|
color:var(--text-cta-link);
|
|
6531
6562
|
}
|
|
6532
|
-
.bp_tabs_module_tabsListContainer--
|
|
6563
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:active{
|
|
6533
6564
|
background-color:var(--surface-tab-surface-pressed);
|
|
6534
6565
|
color:var(--text-text-on-light-secondary-hover);
|
|
6535
6566
|
}
|
|
6536
|
-
.bp_tabs_module_tabsListContainer--
|
|
6567
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:active[aria-selected=true]{
|
|
6537
6568
|
color:var(--text-cta-link);
|
|
6538
6569
|
}
|
|
6539
|
-
.bp_tabs_module_tabsListContainer--
|
|
6570
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:focus-visible,.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e[data-focus-visible]{
|
|
6540
6571
|
background-color:var(--surface-tab-surface-hover);
|
|
6541
6572
|
border-radius:var(--radius-05);
|
|
6542
6573
|
box-shadow:inset 0 0 0 1px #fff;
|
|
@@ -6544,10 +6575,10 @@ div[data-radix-popper-content-wrapper]:has([role=menu]):has([data-state=open]):h
|
|
|
6544
6575
|
outline:var(--border-3) solid var(--outline-focus-on-light);
|
|
6545
6576
|
outline-offset:1px;
|
|
6546
6577
|
}
|
|
6547
|
-
.bp_tabs_module_tabsListContainer--
|
|
6578
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e:focus-visible[aria-selected=true],.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e[data-focus-visible][aria-selected=true]{
|
|
6548
6579
|
color:var(--text-cta-link);
|
|
6549
6580
|
}
|
|
6550
|
-
.bp_tabs_module_tabsListContainer--
|
|
6581
|
+
.bp_tabs_module_tabsListContainer--5991e .bp_tabs_module_tabList--5991e .bp_tabs_module_tab--5991e[aria-disabled=true]{
|
|
6551
6582
|
opacity:.5;
|
|
6552
6583
|
}
|
|
6553
6584
|
|
|
@@ -2,6 +2,7 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { TabList as TabList$1 } from '@ariakit/react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { forwardRef } from 'react';
|
|
5
|
+
import { useBlueprintModernization } from '../../blueprint-modernization-context/useBlueprintModernization.js';
|
|
5
6
|
import styles from './tabs.module.js';
|
|
6
7
|
import { useTabs } from './use-tabs.js';
|
|
7
8
|
|
|
@@ -13,6 +14,9 @@ const TabList = /*#__PURE__*/forwardRef(function TabList(props, ref) {
|
|
|
13
14
|
...rest
|
|
14
15
|
} = props;
|
|
15
16
|
const tab = useTabs();
|
|
17
|
+
const {
|
|
18
|
+
enableModernizedComponents
|
|
19
|
+
} = useBlueprintModernization();
|
|
16
20
|
if (!tab) {
|
|
17
21
|
throw new Error('TabList must be wrapped in a Tabs component');
|
|
18
22
|
}
|
|
@@ -22,6 +26,7 @@ const TabList = /*#__PURE__*/forwardRef(function TabList(props, ref) {
|
|
|
22
26
|
...rest,
|
|
23
27
|
ref: ref,
|
|
24
28
|
className: clsx(variant === 'contentSwitcher' ? styles.contentSwitchTabList : styles.tabList, className),
|
|
29
|
+
"data-modern": enableModernizedComponents,
|
|
25
30
|
store: tab
|
|
26
31
|
})
|
|
27
32
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import '../../index.css';
|
|
2
|
-
var styles = {"hiddenWidthSetter":"bp_tabs_module_hiddenWidthSetter--
|
|
2
|
+
var styles = {"hiddenWidthSetter":"bp_tabs_module_hiddenWidthSetter--5991e","contentSwitchTabList":"bp_tabs_module_contentSwitchTabList--5991e","contentSwitchTab":"bp_tabs_module_contentSwitchTab--5991e","tabsListContainer":"bp_tabs_module_tabsListContainer--5991e","tabList":"bp_tabs_module_tabList--5991e","tabSeparator":"bp_tabs_module_tabSeparator--5991e","tab":"bp_tabs_module_tab--5991e"};
|
|
3
3
|
|
|
4
4
|
export { styles as default };
|