@capra/core 1.9.0 → 1.11.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/index.cjs +54 -35
- package/dist/index.d.cts +14 -4
- package/dist/index.d.mts +14 -4
- package/dist/index.mjs +54 -35
- package/dist/style.css +65 -47
- package/docs/core-badge--design.md +10 -5
- package/docs/core-badge--usage.md +3 -2
- package/docs/history-changelogs-capra-core--docs.md +23 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -577,15 +577,15 @@ const Card = Object.assign(CardRoot, {
|
|
|
577
577
|
//#endregion
|
|
578
578
|
//#region src/components/Badge/Badge.module.css
|
|
579
579
|
var Badge_module_default = {
|
|
580
|
-
"badge": "capra-Badge-module-
|
|
581
|
-
"base": "capra-Badge-module-
|
|
580
|
+
"badge": "capra-Badge-module-_3WihW-badge",
|
|
581
|
+
"base": "capra-Badge-module-_3WihW-base"
|
|
582
582
|
};
|
|
583
583
|
//#endregion
|
|
584
584
|
//#region src/components/Badge/Badge.tsx
|
|
585
585
|
/**
|
|
586
586
|
* Badges display an indicator/counter on an associated component.
|
|
587
587
|
*/
|
|
588
|
-
function Badge({ appearance = "danger", variant, count = 0, showZero = false, overflowCount = 99, FORCE__className, ...props }) {
|
|
588
|
+
function Badge({ appearance = "danger", variant = "counter", size = "md", count = 0, showZero = false, overflowCount = 99, FORCE__className, style, ...props }) {
|
|
589
589
|
if (variant === "counter" && !showZero && !count) return null;
|
|
590
590
|
const getBadgeContent = () => {
|
|
591
591
|
if (variant === "dot") return null;
|
|
@@ -593,18 +593,25 @@ function Badge({ appearance = "danger", variant, count = 0, showZero = false, ov
|
|
|
593
593
|
return value > overflowCount ? `${overflowCount}+` : value;
|
|
594
594
|
};
|
|
595
595
|
return /* @__PURE__ */ react.createElement("span", {
|
|
596
|
-
role: "status",
|
|
597
596
|
className: clsx(Badge_module_default.badge, FORCE__className),
|
|
598
597
|
"data-appearance": appearance,
|
|
598
|
+
"data-size": size,
|
|
599
599
|
"data-variant": variant,
|
|
600
|
+
style,
|
|
600
601
|
...props
|
|
601
602
|
}, getBadgeContent());
|
|
602
603
|
}
|
|
603
604
|
/**
|
|
604
605
|
* A convenience component allowing you to easily attach a badge to another component.
|
|
605
606
|
*/
|
|
606
|
-
function BadgeLayout({ children }) {
|
|
607
|
-
return /* @__PURE__ */ react.createElement("div", {
|
|
607
|
+
function BadgeLayout({ children, offset = [0, 0] }) {
|
|
608
|
+
return /* @__PURE__ */ react.createElement("div", {
|
|
609
|
+
className: Badge_module_default.base,
|
|
610
|
+
style: {
|
|
611
|
+
"--_badge-offset-x": `${offset[0]}px`,
|
|
612
|
+
"--_badge-offset-y": `${offset[1]}px`
|
|
613
|
+
}
|
|
614
|
+
}, children);
|
|
608
615
|
}
|
|
609
616
|
//#endregion
|
|
610
617
|
//#region src/components/ListItem/ListItem.module.css
|
|
@@ -3438,21 +3445,29 @@ function lazyLoad(importFn) {
|
|
|
3438
3445
|
}));
|
|
3439
3446
|
}
|
|
3440
3447
|
const ILLUSTRATIONS = {
|
|
3441
|
-
EmptyFolder: {
|
|
3442
|
-
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolder")),
|
|
3443
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolderDark"))
|
|
3444
|
-
},
|
|
3445
3448
|
ArtSupplies: {
|
|
3446
3449
|
light: lazyLoad(() => import("@capra/icons/esm/images/ArtSupplies")),
|
|
3447
3450
|
dark: lazyLoad(() => import("@capra/icons/esm/images/ArtSuppliesDark"))
|
|
3448
3451
|
},
|
|
3449
|
-
|
|
3450
|
-
light: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3451
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3452
|
+
Attention: {
|
|
3453
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Attention")),
|
|
3454
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/AttentionDark"))
|
|
3455
|
+
},
|
|
3456
|
+
Celebration: {
|
|
3457
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Celebration")),
|
|
3458
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/CelebrationDark"))
|
|
3459
|
+
},
|
|
3460
|
+
Hibernating: {
|
|
3461
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Hibernating")),
|
|
3462
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/HibernatingDark"))
|
|
3452
3463
|
},
|
|
3453
3464
|
EmptyBowl: {
|
|
3454
3465
|
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyBowl")),
|
|
3455
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3466
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyBowlDark"))
|
|
3467
|
+
},
|
|
3468
|
+
EmptyFolder: {
|
|
3469
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolder")),
|
|
3470
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolderDark"))
|
|
3456
3471
|
},
|
|
3457
3472
|
EmptySuitcase: {
|
|
3458
3473
|
light: lazyLoad(() => import("@capra/icons/esm/images/EmptySuitcase")),
|
|
@@ -3460,19 +3475,23 @@ const ILLUSTRATIONS = {
|
|
|
3460
3475
|
},
|
|
3461
3476
|
Envelope: {
|
|
3462
3477
|
light: lazyLoad(() => import("@capra/icons/esm/images/Envelope")),
|
|
3463
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3478
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EnvelopeDark"))
|
|
3464
3479
|
},
|
|
3465
3480
|
MissingSock: {
|
|
3466
3481
|
light: lazyLoad(() => import("@capra/icons/esm/images/MissingSock")),
|
|
3467
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3482
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/MissingSockDark"))
|
|
3468
3483
|
},
|
|
3469
3484
|
PizzaBox: {
|
|
3470
3485
|
light: lazyLoad(() => import("@capra/icons/esm/images/PizzaBox")),
|
|
3471
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3486
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/PizzaBoxDark"))
|
|
3472
3487
|
},
|
|
3473
3488
|
PottedPlant: {
|
|
3474
3489
|
light: lazyLoad(() => import("@capra/icons/esm/images/PottedPlant")),
|
|
3475
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3490
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/PottedPlantDark"))
|
|
3491
|
+
},
|
|
3492
|
+
Sandcastle: {
|
|
3493
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Sandcastle")),
|
|
3494
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/SandcastleDark"))
|
|
3476
3495
|
}
|
|
3477
3496
|
};
|
|
3478
3497
|
/**
|
|
@@ -4385,23 +4404,23 @@ const submenuPanelClassName = Menu_module_default.menu;
|
|
|
4385
4404
|
//#endregion
|
|
4386
4405
|
//#region src/components/TabNav/TabNav.module.css
|
|
4387
4406
|
var TabNav_module_default = {
|
|
4388
|
-
"dropdownIcon": "capra-TabNav-module-
|
|
4389
|
-
"extraContent": "capra-TabNav-module-
|
|
4390
|
-
"indentSpacer": "capra-TabNav-module-
|
|
4391
|
-
"panel": "capra-TabNav-module-
|
|
4392
|
-
"root": "capra-TabNav-module-
|
|
4393
|
-
"subMenu": "capra-TabNav-module-
|
|
4394
|
-
"subMenuItem": "capra-TabNav-module-
|
|
4395
|
-
"subMenuItemActive": "capra-TabNav-module-
|
|
4396
|
-
"subTab": "capra-TabNav-module-
|
|
4397
|
-
"subTabList": "capra-TabNav-module-
|
|
4398
|
-
"subTabListItem": "capra-TabNav-module-
|
|
4399
|
-
"tab": "capra-TabNav-module-
|
|
4400
|
-
"tabBar": "capra-TabNav-module-
|
|
4401
|
-
"tabGroup": "capra-TabNav-module-
|
|
4402
|
-
"tabIcon": "capra-TabNav-module-
|
|
4403
|
-
"tabLabel": "capra-TabNav-module-
|
|
4404
|
-
"tabList": "capra-TabNav-module-
|
|
4407
|
+
"dropdownIcon": "capra-TabNav-module-pLDWhG-dropdownIcon",
|
|
4408
|
+
"extraContent": "capra-TabNav-module-pLDWhG-extraContent",
|
|
4409
|
+
"indentSpacer": "capra-TabNav-module-pLDWhG-indentSpacer",
|
|
4410
|
+
"panel": "capra-TabNav-module-pLDWhG-panel",
|
|
4411
|
+
"root": "capra-TabNav-module-pLDWhG-root",
|
|
4412
|
+
"subMenu": "capra-TabNav-module-pLDWhG-subMenu",
|
|
4413
|
+
"subMenuItem": "capra-TabNav-module-pLDWhG-subMenuItem",
|
|
4414
|
+
"subMenuItemActive": "capra-TabNav-module-pLDWhG-subMenuItemActive",
|
|
4415
|
+
"subTab": "capra-TabNav-module-pLDWhG-subTab",
|
|
4416
|
+
"subTabList": "capra-TabNav-module-pLDWhG-subTabList",
|
|
4417
|
+
"subTabListItem": "capra-TabNav-module-pLDWhG-subTabListItem",
|
|
4418
|
+
"tab": "capra-TabNav-module-pLDWhG-tab",
|
|
4419
|
+
"tabBar": "capra-TabNav-module-pLDWhG-tabBar",
|
|
4420
|
+
"tabGroup": "capra-TabNav-module-pLDWhG-tabGroup",
|
|
4421
|
+
"tabIcon": "capra-TabNav-module-pLDWhG-tabIcon",
|
|
4422
|
+
"tabLabel": "capra-TabNav-module-pLDWhG-tabLabel",
|
|
4423
|
+
"tabList": "capra-TabNav-module-pLDWhG-tabList"
|
|
4405
4424
|
};
|
|
4406
4425
|
//#endregion
|
|
4407
4426
|
//#region src/components/TabNav/TabNav.tsx
|
package/dist/index.d.cts
CHANGED
|
@@ -309,6 +309,8 @@ type AccessibleLabelProps = LabelledByProp | LabelProp;
|
|
|
309
309
|
type AccessibleBadgeProps = AccessibleLabelProps & {
|
|
310
310
|
'aria-live'?: React$2.AriaAttributes['aria-live'];
|
|
311
311
|
};
|
|
312
|
+
declare const badgeSizes: readonly ['sm', 'md'];
|
|
313
|
+
type BadgeSize = (typeof badgeSizes)[number];
|
|
312
314
|
type BadgeProps = {
|
|
313
315
|
/**
|
|
314
316
|
* The variant of the badge. 'counter' displays a count, 'dot' displays only a dot.
|
|
@@ -319,7 +321,12 @@ type BadgeProps = {
|
|
|
319
321
|
* Controls the Badge color.
|
|
320
322
|
* @default 'danger'
|
|
321
323
|
*/
|
|
322
|
-
appearance?: 'danger' | 'info' | 'success' | 'warning';
|
|
324
|
+
appearance?: 'danger' | 'info' | 'success' | 'warning' | 'neutral';
|
|
325
|
+
/**
|
|
326
|
+
* Controls the Badge dimensions.
|
|
327
|
+
* @default 'md'
|
|
328
|
+
*/
|
|
329
|
+
size?: BadgeSize;
|
|
323
330
|
/**
|
|
324
331
|
* The number to display in the badge. Default is 0.
|
|
325
332
|
*/
|
|
@@ -336,11 +343,14 @@ type BadgeProps = {
|
|
|
336
343
|
/**
|
|
337
344
|
* Badges display an indicator/counter on an associated component.
|
|
338
345
|
*/
|
|
339
|
-
declare function Badge({ appearance, variant, count, showZero, overflowCount, FORCE__className, ...props }: BadgeProps): React$2.JSX.Element | null;
|
|
346
|
+
declare function Badge({ appearance, variant, size, count, showZero, overflowCount, FORCE__className, style, ...props }: BadgeProps): React$2.JSX.Element | null;
|
|
347
|
+
type BadgeLayoutProps = React$2.PropsWithChildren<{
|
|
348
|
+
offset?: readonly [x: number, y: number];
|
|
349
|
+
}>;
|
|
340
350
|
/**
|
|
341
351
|
* A convenience component allowing you to easily attach a badge to another component.
|
|
342
352
|
*/
|
|
343
|
-
declare function BadgeLayout({ children }:
|
|
353
|
+
declare function BadgeLayout({ children, offset }: BadgeLayoutProps): React$2.JSX.Element;
|
|
344
354
|
//#endregion
|
|
345
355
|
//#region src/components/ListItem/ListItem.d.ts
|
|
346
356
|
type ListItemProps<As extends React$2.ElementType> = {
|
|
@@ -1427,7 +1437,7 @@ declare const VerticalNavigation: VerticalNavigationComponent;
|
|
|
1427
1437
|
//#endregion
|
|
1428
1438
|
//#region src/components/EmptyState/EmptyState.d.ts
|
|
1429
1439
|
/** Valid illustration slugs for the EmptyState component. */
|
|
1430
|
-
declare const illustrationSlugs: readonly ['
|
|
1440
|
+
declare const illustrationSlugs: readonly ['ArtSupplies', 'Attention', 'Celebration', 'EmptyBowl', 'EmptyFolder', 'EmptySuitcase', 'Envelope', 'Hibernating', 'MissingSock', 'PizzaBox', 'PottedPlant', 'Sandcastle'];
|
|
1431
1441
|
type EmptyStateIllustrationSlug = (typeof illustrationSlugs)[number];
|
|
1432
1442
|
type EmptyStateProps = {
|
|
1433
1443
|
/** The illustration to display, identified by slug. Use theme to switch between light/dark variants when available. @default "EmptyFolder" */
|
package/dist/index.d.mts
CHANGED
|
@@ -309,6 +309,8 @@ type AccessibleLabelProps = LabelledByProp | LabelProp;
|
|
|
309
309
|
type AccessibleBadgeProps = AccessibleLabelProps & {
|
|
310
310
|
'aria-live'?: React$2.AriaAttributes['aria-live'];
|
|
311
311
|
};
|
|
312
|
+
declare const badgeSizes: readonly ['sm', 'md'];
|
|
313
|
+
type BadgeSize = (typeof badgeSizes)[number];
|
|
312
314
|
type BadgeProps = {
|
|
313
315
|
/**
|
|
314
316
|
* The variant of the badge. 'counter' displays a count, 'dot' displays only a dot.
|
|
@@ -319,7 +321,12 @@ type BadgeProps = {
|
|
|
319
321
|
* Controls the Badge color.
|
|
320
322
|
* @default 'danger'
|
|
321
323
|
*/
|
|
322
|
-
appearance?: 'danger' | 'info' | 'success' | 'warning';
|
|
324
|
+
appearance?: 'danger' | 'info' | 'success' | 'warning' | 'neutral';
|
|
325
|
+
/**
|
|
326
|
+
* Controls the Badge dimensions.
|
|
327
|
+
* @default 'md'
|
|
328
|
+
*/
|
|
329
|
+
size?: BadgeSize;
|
|
323
330
|
/**
|
|
324
331
|
* The number to display in the badge. Default is 0.
|
|
325
332
|
*/
|
|
@@ -336,11 +343,14 @@ type BadgeProps = {
|
|
|
336
343
|
/**
|
|
337
344
|
* Badges display an indicator/counter on an associated component.
|
|
338
345
|
*/
|
|
339
|
-
declare function Badge({ appearance, variant, count, showZero, overflowCount, FORCE__className, ...props }: BadgeProps): React$2.JSX.Element | null;
|
|
346
|
+
declare function Badge({ appearance, variant, size, count, showZero, overflowCount, FORCE__className, style, ...props }: BadgeProps): React$2.JSX.Element | null;
|
|
347
|
+
type BadgeLayoutProps = React$2.PropsWithChildren<{
|
|
348
|
+
offset?: readonly [x: number, y: number];
|
|
349
|
+
}>;
|
|
340
350
|
/**
|
|
341
351
|
* A convenience component allowing you to easily attach a badge to another component.
|
|
342
352
|
*/
|
|
343
|
-
declare function BadgeLayout({ children }:
|
|
353
|
+
declare function BadgeLayout({ children, offset }: BadgeLayoutProps): React$2.JSX.Element;
|
|
344
354
|
//#endregion
|
|
345
355
|
//#region src/components/ListItem/ListItem.d.ts
|
|
346
356
|
type ListItemProps<As extends React$2.ElementType> = {
|
|
@@ -1427,7 +1437,7 @@ declare const VerticalNavigation: VerticalNavigationComponent;
|
|
|
1427
1437
|
//#endregion
|
|
1428
1438
|
//#region src/components/EmptyState/EmptyState.d.ts
|
|
1429
1439
|
/** Valid illustration slugs for the EmptyState component. */
|
|
1430
|
-
declare const illustrationSlugs: readonly ['
|
|
1440
|
+
declare const illustrationSlugs: readonly ['ArtSupplies', 'Attention', 'Celebration', 'EmptyBowl', 'EmptyFolder', 'EmptySuitcase', 'Envelope', 'Hibernating', 'MissingSock', 'PizzaBox', 'PottedPlant', 'Sandcastle'];
|
|
1431
1441
|
type EmptyStateIllustrationSlug = (typeof illustrationSlugs)[number];
|
|
1432
1442
|
type EmptyStateProps = {
|
|
1433
1443
|
/** The illustration to display, identified by slug. Use theme to switch between light/dark variants when available. @default "EmptyFolder" */
|
package/dist/index.mjs
CHANGED
|
@@ -554,15 +554,15 @@ const Card = Object.assign(CardRoot, {
|
|
|
554
554
|
//#endregion
|
|
555
555
|
//#region src/components/Badge/Badge.module.css
|
|
556
556
|
var Badge_module_default = {
|
|
557
|
-
"badge": "capra-Badge-module-
|
|
558
|
-
"base": "capra-Badge-module-
|
|
557
|
+
"badge": "capra-Badge-module-_3WihW-badge",
|
|
558
|
+
"base": "capra-Badge-module-_3WihW-base"
|
|
559
559
|
};
|
|
560
560
|
//#endregion
|
|
561
561
|
//#region src/components/Badge/Badge.tsx
|
|
562
562
|
/**
|
|
563
563
|
* Badges display an indicator/counter on an associated component.
|
|
564
564
|
*/
|
|
565
|
-
function Badge({ appearance = "danger", variant, count = 0, showZero = false, overflowCount = 99, FORCE__className, ...props }) {
|
|
565
|
+
function Badge({ appearance = "danger", variant = "counter", size = "md", count = 0, showZero = false, overflowCount = 99, FORCE__className, style, ...props }) {
|
|
566
566
|
if (variant === "counter" && !showZero && !count) return null;
|
|
567
567
|
const getBadgeContent = () => {
|
|
568
568
|
if (variant === "dot") return null;
|
|
@@ -570,18 +570,25 @@ function Badge({ appearance = "danger", variant, count = 0, showZero = false, ov
|
|
|
570
570
|
return value > overflowCount ? `${overflowCount}+` : value;
|
|
571
571
|
};
|
|
572
572
|
return /* @__PURE__ */ React$1.createElement("span", {
|
|
573
|
-
role: "status",
|
|
574
573
|
className: clsx(Badge_module_default.badge, FORCE__className),
|
|
575
574
|
"data-appearance": appearance,
|
|
575
|
+
"data-size": size,
|
|
576
576
|
"data-variant": variant,
|
|
577
|
+
style,
|
|
577
578
|
...props
|
|
578
579
|
}, getBadgeContent());
|
|
579
580
|
}
|
|
580
581
|
/**
|
|
581
582
|
* A convenience component allowing you to easily attach a badge to another component.
|
|
582
583
|
*/
|
|
583
|
-
function BadgeLayout({ children }) {
|
|
584
|
-
return /* @__PURE__ */ React$1.createElement("div", {
|
|
584
|
+
function BadgeLayout({ children, offset = [0, 0] }) {
|
|
585
|
+
return /* @__PURE__ */ React$1.createElement("div", {
|
|
586
|
+
className: Badge_module_default.base,
|
|
587
|
+
style: {
|
|
588
|
+
"--_badge-offset-x": `${offset[0]}px`,
|
|
589
|
+
"--_badge-offset-y": `${offset[1]}px`
|
|
590
|
+
}
|
|
591
|
+
}, children);
|
|
585
592
|
}
|
|
586
593
|
//#endregion
|
|
587
594
|
//#region src/components/ListItem/ListItem.module.css
|
|
@@ -3415,21 +3422,29 @@ function lazyLoad(importFn) {
|
|
|
3415
3422
|
}));
|
|
3416
3423
|
}
|
|
3417
3424
|
const ILLUSTRATIONS = {
|
|
3418
|
-
EmptyFolder: {
|
|
3419
|
-
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolder")),
|
|
3420
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolderDark"))
|
|
3421
|
-
},
|
|
3422
3425
|
ArtSupplies: {
|
|
3423
3426
|
light: lazyLoad(() => import("@capra/icons/esm/images/ArtSupplies")),
|
|
3424
3427
|
dark: lazyLoad(() => import("@capra/icons/esm/images/ArtSuppliesDark"))
|
|
3425
3428
|
},
|
|
3426
|
-
|
|
3427
|
-
light: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3428
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3429
|
+
Attention: {
|
|
3430
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Attention")),
|
|
3431
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/AttentionDark"))
|
|
3432
|
+
},
|
|
3433
|
+
Celebration: {
|
|
3434
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Celebration")),
|
|
3435
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/CelebrationDark"))
|
|
3436
|
+
},
|
|
3437
|
+
Hibernating: {
|
|
3438
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Hibernating")),
|
|
3439
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/HibernatingDark"))
|
|
3429
3440
|
},
|
|
3430
3441
|
EmptyBowl: {
|
|
3431
3442
|
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyBowl")),
|
|
3432
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3443
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyBowlDark"))
|
|
3444
|
+
},
|
|
3445
|
+
EmptyFolder: {
|
|
3446
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolder")),
|
|
3447
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EmptyFolderDark"))
|
|
3433
3448
|
},
|
|
3434
3449
|
EmptySuitcase: {
|
|
3435
3450
|
light: lazyLoad(() => import("@capra/icons/esm/images/EmptySuitcase")),
|
|
@@ -3437,19 +3452,23 @@ const ILLUSTRATIONS = {
|
|
|
3437
3452
|
},
|
|
3438
3453
|
Envelope: {
|
|
3439
3454
|
light: lazyLoad(() => import("@capra/icons/esm/images/Envelope")),
|
|
3440
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3455
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/EnvelopeDark"))
|
|
3441
3456
|
},
|
|
3442
3457
|
MissingSock: {
|
|
3443
3458
|
light: lazyLoad(() => import("@capra/icons/esm/images/MissingSock")),
|
|
3444
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3459
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/MissingSockDark"))
|
|
3445
3460
|
},
|
|
3446
3461
|
PizzaBox: {
|
|
3447
3462
|
light: lazyLoad(() => import("@capra/icons/esm/images/PizzaBox")),
|
|
3448
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3463
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/PizzaBoxDark"))
|
|
3449
3464
|
},
|
|
3450
3465
|
PottedPlant: {
|
|
3451
3466
|
light: lazyLoad(() => import("@capra/icons/esm/images/PottedPlant")),
|
|
3452
|
-
dark: lazyLoad(() => import("@capra/icons/esm/images/
|
|
3467
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/PottedPlantDark"))
|
|
3468
|
+
},
|
|
3469
|
+
Sandcastle: {
|
|
3470
|
+
light: lazyLoad(() => import("@capra/icons/esm/images/Sandcastle")),
|
|
3471
|
+
dark: lazyLoad(() => import("@capra/icons/esm/images/SandcastleDark"))
|
|
3453
3472
|
}
|
|
3454
3473
|
};
|
|
3455
3474
|
/**
|
|
@@ -4362,23 +4381,23 @@ const submenuPanelClassName = Menu_module_default.menu;
|
|
|
4362
4381
|
//#endregion
|
|
4363
4382
|
//#region src/components/TabNav/TabNav.module.css
|
|
4364
4383
|
var TabNav_module_default = {
|
|
4365
|
-
"dropdownIcon": "capra-TabNav-module-
|
|
4366
|
-
"extraContent": "capra-TabNav-module-
|
|
4367
|
-
"indentSpacer": "capra-TabNav-module-
|
|
4368
|
-
"panel": "capra-TabNav-module-
|
|
4369
|
-
"root": "capra-TabNav-module-
|
|
4370
|
-
"subMenu": "capra-TabNav-module-
|
|
4371
|
-
"subMenuItem": "capra-TabNav-module-
|
|
4372
|
-
"subMenuItemActive": "capra-TabNav-module-
|
|
4373
|
-
"subTab": "capra-TabNav-module-
|
|
4374
|
-
"subTabList": "capra-TabNav-module-
|
|
4375
|
-
"subTabListItem": "capra-TabNav-module-
|
|
4376
|
-
"tab": "capra-TabNav-module-
|
|
4377
|
-
"tabBar": "capra-TabNav-module-
|
|
4378
|
-
"tabGroup": "capra-TabNav-module-
|
|
4379
|
-
"tabIcon": "capra-TabNav-module-
|
|
4380
|
-
"tabLabel": "capra-TabNav-module-
|
|
4381
|
-
"tabList": "capra-TabNav-module-
|
|
4384
|
+
"dropdownIcon": "capra-TabNav-module-pLDWhG-dropdownIcon",
|
|
4385
|
+
"extraContent": "capra-TabNav-module-pLDWhG-extraContent",
|
|
4386
|
+
"indentSpacer": "capra-TabNav-module-pLDWhG-indentSpacer",
|
|
4387
|
+
"panel": "capra-TabNav-module-pLDWhG-panel",
|
|
4388
|
+
"root": "capra-TabNav-module-pLDWhG-root",
|
|
4389
|
+
"subMenu": "capra-TabNav-module-pLDWhG-subMenu",
|
|
4390
|
+
"subMenuItem": "capra-TabNav-module-pLDWhG-subMenuItem",
|
|
4391
|
+
"subMenuItemActive": "capra-TabNav-module-pLDWhG-subMenuItemActive",
|
|
4392
|
+
"subTab": "capra-TabNav-module-pLDWhG-subTab",
|
|
4393
|
+
"subTabList": "capra-TabNav-module-pLDWhG-subTabList",
|
|
4394
|
+
"subTabListItem": "capra-TabNav-module-pLDWhG-subTabListItem",
|
|
4395
|
+
"tab": "capra-TabNav-module-pLDWhG-tab",
|
|
4396
|
+
"tabBar": "capra-TabNav-module-pLDWhG-tabBar",
|
|
4397
|
+
"tabGroup": "capra-TabNav-module-pLDWhG-tabGroup",
|
|
4398
|
+
"tabIcon": "capra-TabNav-module-pLDWhG-tabIcon",
|
|
4399
|
+
"tabLabel": "capra-TabNav-module-pLDWhG-tabLabel",
|
|
4400
|
+
"tabList": "capra-TabNav-module-pLDWhG-tabList"
|
|
4382
4401
|
};
|
|
4383
4402
|
//#endregion
|
|
4384
4403
|
//#region src/components/TabNav/TabNav.tsx
|
package/dist/style.css
CHANGED
|
@@ -628,22 +628,33 @@
|
|
|
628
628
|
align-items: center;
|
|
629
629
|
display: flex;
|
|
630
630
|
}
|
|
631
|
-
.capra-Badge-module-
|
|
631
|
+
.capra-Badge-module-_3WihW-badge {
|
|
632
632
|
border: var(--cds2-border-badge);
|
|
633
|
+
border-color: var(--cds2-color-background-application);
|
|
633
634
|
border-radius: var(--cds2-radius-full);
|
|
634
635
|
font: var(--cds2-typography-body-xs-semibold);
|
|
635
|
-
padding: 0 var(--cds2-spacing-sm);
|
|
636
|
-
height: var(--cds2-dimension-component-sm);
|
|
637
|
-
min-width: var(--cds2-dimension-component-sm);
|
|
638
636
|
justify-content: center;
|
|
639
637
|
align-items: center;
|
|
640
638
|
width: fit-content;
|
|
641
639
|
display: flex;
|
|
642
640
|
|
|
641
|
+
&[data-size="md"] {
|
|
642
|
+
height: var(--cds2-dimension-component-sm);
|
|
643
|
+
min-width: var(--cds2-dimension-component-sm);
|
|
644
|
+
padding: 0 var(--cds2-spacing-sm);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
&[data-size="sm"] {
|
|
648
|
+
height: var(--cds2-dimension-component-xs);
|
|
649
|
+
min-width: var(--cds2-dimension-component-xs);
|
|
650
|
+
padding: 0 var(--cds2-spacing-xs);
|
|
651
|
+
}
|
|
652
|
+
|
|
643
653
|
&[data-variant="dot"] {
|
|
644
654
|
height: var(--cds2-dimension-icon-xs);
|
|
645
655
|
min-width: unset;
|
|
646
656
|
width: var(--cds2-dimension-icon-xs);
|
|
657
|
+
padding: 0;
|
|
647
658
|
}
|
|
648
659
|
|
|
649
660
|
&[data-appearance="info"] {
|
|
@@ -665,17 +676,24 @@
|
|
|
665
676
|
background-color: var(--cds2-color-background-danger-solid-default);
|
|
666
677
|
color: var(--cds2-color-foreground-danger-contrast);
|
|
667
678
|
}
|
|
679
|
+
|
|
680
|
+
&[data-appearance="neutral"] {
|
|
681
|
+
background-color: var(--cds2-color-background-neutral-solid-default);
|
|
682
|
+
color: var(--cds2-color-foreground-neutral-contrast);
|
|
683
|
+
}
|
|
668
684
|
}
|
|
669
685
|
|
|
670
|
-
.capra-Badge-module-
|
|
686
|
+
.capra-Badge-module-_3WihW-base {
|
|
687
|
+
--_badge-offset-x: 0px;
|
|
688
|
+
--_badge-offset-y: 0px;
|
|
671
689
|
width: fit-content;
|
|
672
690
|
display: inline-block;
|
|
673
691
|
position: relative;
|
|
674
692
|
|
|
675
|
-
& .capra-Badge-module-
|
|
693
|
+
& .capra-Badge-module-_3WihW-badge {
|
|
694
|
+
top: var(--_badge-offset-y);
|
|
695
|
+
right: var(--_badge-offset-x);
|
|
676
696
|
position: absolute;
|
|
677
|
-
top: 0;
|
|
678
|
-
right: 0;
|
|
679
697
|
transform: translate(50%, -50%);
|
|
680
698
|
}
|
|
681
699
|
}
|
|
@@ -3772,21 +3790,21 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3772
3790
|
.capra-Menu-module-3G4VeG-menuItemListItemShell {
|
|
3773
3791
|
width: 100%;
|
|
3774
3792
|
}
|
|
3775
|
-
.capra-TabNav-module-
|
|
3793
|
+
.capra-TabNav-module-pLDWhG-root {
|
|
3776
3794
|
flex-direction: column;
|
|
3777
3795
|
width: 100%;
|
|
3778
3796
|
display: flex;
|
|
3779
3797
|
}
|
|
3780
3798
|
|
|
3781
|
-
.capra-TabNav-module-
|
|
3799
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] {
|
|
3782
3800
|
flex-direction: column-reverse;
|
|
3783
3801
|
}
|
|
3784
3802
|
|
|
3785
|
-
.capra-TabNav-module-
|
|
3803
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] {
|
|
3786
3804
|
flex-direction: row;
|
|
3787
3805
|
}
|
|
3788
3806
|
|
|
3789
|
-
.capra-TabNav-module-
|
|
3807
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabBar {
|
|
3790
3808
|
border-block-end: none;
|
|
3791
3809
|
border-inline-end: 1px solid var(--cds2-color-border-neutral-subtle);
|
|
3792
3810
|
flex-direction: column;
|
|
@@ -3795,7 +3813,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3795
3813
|
padding-inline-end: var(--cds2-spacing-lg);
|
|
3796
3814
|
}
|
|
3797
3815
|
|
|
3798
|
-
.capra-TabNav-module-
|
|
3816
|
+
.capra-TabNav-module-pLDWhG-tabBar {
|
|
3799
3817
|
justify-content: space-between;
|
|
3800
3818
|
align-items: center;
|
|
3801
3819
|
gap: var(--cds2-spacing-md);
|
|
@@ -3804,41 +3822,41 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3804
3822
|
display: flex;
|
|
3805
3823
|
}
|
|
3806
3824
|
|
|
3807
|
-
.capra-TabNav-module-
|
|
3825
|
+
.capra-TabNav-module-pLDWhG-tabBar:has(.capra-TabNav-module-pLDWhG-extraContent) {
|
|
3808
3826
|
gap: var(--cds2-spacing-xl);
|
|
3809
3827
|
}
|
|
3810
3828
|
|
|
3811
|
-
.capra-TabNav-module-
|
|
3829
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tabBar {
|
|
3812
3830
|
border: none;
|
|
3813
3831
|
margin-block-start: 0;
|
|
3814
3832
|
}
|
|
3815
3833
|
|
|
3816
|
-
.capra-TabNav-module-
|
|
3834
|
+
.capra-TabNav-module-pLDWhG-tabList {
|
|
3817
3835
|
gap: var(--cds2-spacing-xl);
|
|
3818
3836
|
flex-flow: wrap;
|
|
3819
3837
|
display: flex;
|
|
3820
3838
|
}
|
|
3821
3839
|
|
|
3822
|
-
.capra-TabNav-module-
|
|
3840
|
+
.capra-TabNav-module-pLDWhG-root[data-wrap="nowrap"] .capra-TabNav-module-pLDWhG-tabList {
|
|
3823
3841
|
flex-wrap: nowrap;
|
|
3824
3842
|
}
|
|
3825
3843
|
|
|
3826
|
-
.capra-TabNav-module-
|
|
3844
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabList {
|
|
3827
3845
|
flex-flow: column;
|
|
3828
3846
|
gap: 0;
|
|
3829
3847
|
width: 100%;
|
|
3830
3848
|
}
|
|
3831
3849
|
|
|
3832
|
-
.capra-TabNav-module-
|
|
3850
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabList > :not(:last-child), .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabGroup > :not(:last-child), .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-subTabList .capra-TabNav-module-pLDWhG-subTabListItem:not(:last-child) {
|
|
3833
3851
|
margin-block-end: var(--cds2-spacing-md);
|
|
3834
3852
|
}
|
|
3835
3853
|
|
|
3836
|
-
.capra-TabNav-module-
|
|
3854
|
+
.capra-TabNav-module-pLDWhG-root[data-centered="true"] .capra-TabNav-module-pLDWhG-tabList {
|
|
3837
3855
|
flex: 1;
|
|
3838
3856
|
justify-content: center;
|
|
3839
3857
|
}
|
|
3840
3858
|
|
|
3841
|
-
.capra-TabNav-module-
|
|
3859
|
+
.capra-TabNav-module-pLDWhG-tab {
|
|
3842
3860
|
appearance: none;
|
|
3843
3861
|
cursor: pointer;
|
|
3844
3862
|
justify-content: center;
|
|
@@ -3867,59 +3885,59 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3867
3885
|
}
|
|
3868
3886
|
}
|
|
3869
3887
|
|
|
3870
|
-
.capra-TabNav-module-
|
|
3888
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab {
|
|
3871
3889
|
border-bottom: 2px solid #0000;
|
|
3872
3890
|
transition: none;
|
|
3873
3891
|
}
|
|
3874
3892
|
|
|
3875
|
-
.capra-TabNav-module-
|
|
3893
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
|
|
3876
3894
|
border-bottom-color: var(--cds2-color-border-accent-default);
|
|
3877
|
-
color: var(--cds2-color-foreground-
|
|
3895
|
+
color: var(--cds2-color-foreground-accent-default) !important;
|
|
3878
3896
|
}
|
|
3879
3897
|
|
|
3880
|
-
.capra-TabNav-module-
|
|
3898
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab[data-active="true"][data-disabled="true"] {
|
|
3881
3899
|
border-bottom-color: #0000;
|
|
3882
3900
|
}
|
|
3883
3901
|
|
|
3884
|
-
.capra-TabNav-module-
|
|
3902
|
+
.capra-TabNav-module-pLDWhG-tab[data-active="true"] {
|
|
3885
3903
|
color: var(--cds2-color-foreground-accent-default);
|
|
3886
3904
|
}
|
|
3887
3905
|
|
|
3888
|
-
.capra-TabNav-module-
|
|
3906
|
+
.capra-TabNav-module-pLDWhG-tabIcon {
|
|
3889
3907
|
align-items: center;
|
|
3890
3908
|
display: inline-flex;
|
|
3891
3909
|
}
|
|
3892
3910
|
|
|
3893
|
-
.capra-TabNav-module-
|
|
3911
|
+
.capra-TabNav-module-pLDWhG-tabLabel {
|
|
3894
3912
|
white-space: nowrap;
|
|
3895
3913
|
}
|
|
3896
3914
|
|
|
3897
|
-
.capra-TabNav-module-
|
|
3915
|
+
.capra-TabNav-module-pLDWhG-indentSpacer {
|
|
3898
3916
|
flex-shrink: 0;
|
|
3899
3917
|
width: 16px;
|
|
3900
3918
|
min-width: 16px;
|
|
3901
3919
|
}
|
|
3902
3920
|
|
|
3903
|
-
.capra-TabNav-module-
|
|
3921
|
+
.capra-TabNav-module-pLDWhG-dropdownIcon {
|
|
3904
3922
|
color: inherit;
|
|
3905
3923
|
flex-shrink: 0;
|
|
3906
3924
|
align-items: center;
|
|
3907
3925
|
display: inline-flex;
|
|
3908
3926
|
}
|
|
3909
3927
|
|
|
3910
|
-
.capra-TabNav-module-
|
|
3928
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-dropdownIcon {
|
|
3911
3929
|
margin-inline-start: auto;
|
|
3912
3930
|
}
|
|
3913
3931
|
|
|
3914
|
-
.capra-TabNav-module-
|
|
3932
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-expanded="false"] .capra-TabNav-module-pLDWhG-dropdownIcon svg {
|
|
3915
3933
|
transform: rotate(-90deg);
|
|
3916
3934
|
}
|
|
3917
3935
|
|
|
3918
|
-
.capra-TabNav-module-
|
|
3936
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-expanded="true"] .capra-TabNav-module-pLDWhG-dropdownIcon svg {
|
|
3919
3937
|
transform: none;
|
|
3920
3938
|
}
|
|
3921
3939
|
|
|
3922
|
-
.capra-TabNav-module-
|
|
3940
|
+
.capra-TabNav-module-pLDWhG-tabGroup {
|
|
3923
3941
|
flex-direction: column;
|
|
3924
3942
|
align-items: stretch;
|
|
3925
3943
|
gap: 0;
|
|
@@ -3927,7 +3945,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3927
3945
|
display: flex;
|
|
3928
3946
|
}
|
|
3929
3947
|
|
|
3930
|
-
.capra-TabNav-module-
|
|
3948
|
+
.capra-TabNav-module-pLDWhG-subTabList {
|
|
3931
3949
|
flex-flow: column;
|
|
3932
3950
|
gap: 0;
|
|
3933
3951
|
width: 100%;
|
|
@@ -3937,20 +3955,20 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3937
3955
|
display: flex;
|
|
3938
3956
|
}
|
|
3939
3957
|
|
|
3940
|
-
.capra-TabNav-module-
|
|
3958
|
+
.capra-TabNav-module-pLDWhG-subTabListItem {
|
|
3941
3959
|
margin: 0;
|
|
3942
3960
|
padding: 0;
|
|
3943
3961
|
}
|
|
3944
3962
|
|
|
3945
|
-
.capra-TabNav-module-
|
|
3963
|
+
.capra-TabNav-module-pLDWhG-subTab {
|
|
3946
3964
|
width: 100%;
|
|
3947
3965
|
}
|
|
3948
3966
|
|
|
3949
|
-
.capra-TabNav-module-
|
|
3967
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab[data-active="true"], .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab[data-submenu-open="true"] {
|
|
3950
3968
|
border-bottom-color: var(--cds2-color-border-accent-default);
|
|
3951
3969
|
}
|
|
3952
3970
|
|
|
3953
|
-
.capra-TabNav-module-
|
|
3971
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab {
|
|
3954
3972
|
border-bottom: none;
|
|
3955
3973
|
padding-block: 0;
|
|
3956
3974
|
padding-inline: var(--cds2-spacing-md);
|
|
@@ -3959,42 +3977,42 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
3959
3977
|
width: 100%;
|
|
3960
3978
|
}
|
|
3961
3979
|
|
|
3962
|
-
.capra-TabNav-module-
|
|
3980
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-active="true"] {
|
|
3963
3981
|
background-color: var(--cds2-color-background-accent-subtle);
|
|
3964
3982
|
border-inline-end-color: var(--cds2-color-border-accent-default);
|
|
3965
3983
|
}
|
|
3966
3984
|
|
|
3967
|
-
.capra-TabNav-module-
|
|
3985
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
|
|
3968
3986
|
background-color: var(--cds2-color-background-accent-selected);
|
|
3969
3987
|
border-inline-end-color: var(--cds2-color-border-accent-strong);
|
|
3970
3988
|
color: var(--cds2-color-foreground-accent-default);
|
|
3971
3989
|
}
|
|
3972
3990
|
|
|
3973
|
-
.capra-TabNav-module-
|
|
3991
|
+
.capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-active="true"][data-disabled="true"] {
|
|
3974
3992
|
background-color: #0000;
|
|
3975
3993
|
border-inline-end-color: #0000;
|
|
3976
3994
|
}
|
|
3977
3995
|
|
|
3978
|
-
.capra-TabNav-module-
|
|
3996
|
+
.capra-TabNav-module-pLDWhG-extraContent {
|
|
3979
3997
|
align-items: center;
|
|
3980
3998
|
display: flex;
|
|
3981
3999
|
}
|
|
3982
4000
|
|
|
3983
|
-
.capra-TabNav-module-
|
|
4001
|
+
.capra-TabNav-module-pLDWhG-panel {
|
|
3984
4002
|
font: var(--cds2-typography-body-md-normal);
|
|
3985
4003
|
color: var(--cds2-color-foreground-default);
|
|
3986
4004
|
flex: 1;
|
|
3987
4005
|
padding-block-start: var(--cds2-spacing-lg);
|
|
3988
4006
|
}
|
|
3989
4007
|
|
|
3990
|
-
.capra-TabNav-module-
|
|
4008
|
+
.capra-TabNav-module-pLDWhG-subMenu {
|
|
3991
4009
|
padding: var(--cds2-spacing-xs);
|
|
3992
4010
|
min-width: 160px;
|
|
3993
4011
|
margin: 0;
|
|
3994
4012
|
list-style: none;
|
|
3995
4013
|
}
|
|
3996
4014
|
|
|
3997
|
-
.capra-TabNav-module-
|
|
4015
|
+
.capra-TabNav-module-pLDWhG-subMenuItem {
|
|
3998
4016
|
appearance: none;
|
|
3999
4017
|
text-align: start;
|
|
4000
4018
|
width: 100%;
|
|
@@ -4022,7 +4040,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
|
|
|
4022
4040
|
}
|
|
4023
4041
|
}
|
|
4024
4042
|
|
|
4025
|
-
.capra-TabNav-module-
|
|
4043
|
+
.capra-TabNav-module-pLDWhG-subMenuItemActive {
|
|
4026
4044
|
background-color: var(--cds2-color-background-accent-subtle);
|
|
4027
4045
|
color: var(--cds2-color-foreground-accent-default);
|
|
4028
4046
|
font: var(--cds2-typography-body-sm-semibold);
|
|
@@ -10,7 +10,7 @@ A label is required to indicate the number of notifications.
|
|
|
10
10
|
|
|
11
11
|
### Size
|
|
12
12
|
|
|
13
|
-
Badges
|
|
13
|
+
Badges support `md` and `sm` sizes. Use `sm` when composing with smaller controls, such as icon-only buttons, while keeping `md` for standard button and navigation attachments.
|
|
14
14
|
|
|
15
15
|
### Dot
|
|
16
16
|
|
|
@@ -26,7 +26,11 @@ Using color as the only means to communicate status should be avoided (WCAG SC 1
|
|
|
26
26
|
|
|
27
27
|
### Corner attachment
|
|
28
28
|
|
|
29
|
-
Badges are placed in the top-right of the parent component to avoid obscuring the parent content.
|
|
29
|
+
Badges are placed in the top-right of the parent component to avoid obscuring the parent content. Use `BadgeLayout`'s `offset` prop to nudge the badge inward or outward when the anchor component has a tighter visual target.
|
|
30
|
+
|
|
31
|
+
### Icon button composition
|
|
32
|
+
|
|
33
|
+
Use `size="sm"` when attaching badges to `IconButton`. Tertiary icon buttons may need a small `offset` so the badge overlaps the icon rather than floating too far outside the control.
|
|
30
34
|
|
|
31
35
|
### Inline
|
|
32
36
|
|
|
@@ -44,7 +48,7 @@ Do:
|
|
|
44
48
|
|
|
45
49
|
* Do cap displayed values at 99 with a "99+" label.
|
|
46
50
|
* Do use the dot variant for simple presence indicators.
|
|
47
|
-
* Do
|
|
51
|
+
* Do associate interactive anchors with badge count context using `aria-describedby`.
|
|
48
52
|
|
|
49
53
|
Don't:
|
|
50
54
|
|
|
@@ -52,11 +56,12 @@ Don't:
|
|
|
52
56
|
* Don't use Badge for labels or tags — use Tag.
|
|
53
57
|
* Don't place Badge on non-interactive decorative elements.
|
|
54
58
|
* Don't use Badge colors as the only method to communicate status.
|
|
59
|
+
* Don't include badge count context in the anchor's `aria-label`.
|
|
55
60
|
|
|
56
61
|
## Accessibility
|
|
57
62
|
|
|
58
|
-
*
|
|
59
|
-
*
|
|
63
|
+
* Badge requires an accessible label via `aria-label` or `aria-labelledby` that describes the count or status (e.g., "76 unread").
|
|
64
|
+
* When composing with interactive controls such as `Button` or `IconButton`, set `aria-describedby` on the anchor to the badge's `id`. Keep the anchor's accessible name limited to the control action or label (e.g., "Messages"), not the badge content.
|
|
60
65
|
* Use `aria-live="polite"` on the parent for dynamic badge updates.
|
|
61
66
|
|
|
62
67
|
## Content
|
|
@@ -4,8 +4,9 @@ Badges display an indicator/counter on an associated component.
|
|
|
4
4
|
|
|
5
5
|
| Prop | Type | Required | Default | Description |
|
|
6
6
|
| --- | --- | --- | --- | --- |
|
|
7
|
-
| `variant` | `'counter' \| 'dot'` | No |
|
|
8
|
-
| `appearance` | `'danger' \| 'info' \| 'success' \| 'warning'` | No | 'danger' | Controls the Badge color.<br>@default 'danger' |
|
|
7
|
+
| `variant` | `'counter' \| 'dot'` | No | 'counter' | The variant of the badge. 'counter' displays a count, 'dot' displays only a dot.<br>@default 'counter' |
|
|
8
|
+
| `appearance` | `'danger' \| 'info' \| 'success' \| 'warning' \| 'neutral'` | No | 'danger' | Controls the Badge color.<br>@default 'danger' |
|
|
9
|
+
| `size` | `(typeof badgeSizes)[number]` | No | 'md' | Controls the Badge dimensions.<br>@default 'md' |
|
|
9
10
|
| `count` | `number` | No | 0 | The number to display in the badge. Default is 0. |
|
|
10
11
|
| `showZero` | `boolean` | No | false | Whether to display the badge when the count is zero. Default is false. |
|
|
11
12
|
| `overflowCount` | `number` | No | 99 | The number to display in the badge when the count is greater than the overflow count. Default is 99. |
|
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# History/Changelogs/@capra-core
|
|
2
2
|
|
|
3
|
+
### 1.11.0
|
|
4
|
+
|
|
5
|
+
#### Minor Changes
|
|
6
|
+
|
|
7
|
+
* [85ed2f8](https://bitbucket.org/cribl/capra-ui/commits/85ed2f8): Update `EmptyState` to use new images
|
|
8
|
+
|
|
9
|
+
#### Patch Changes
|
|
10
|
+
|
|
11
|
+
* Updated dependencies [85ed2f8](https://bitbucket.org/cribl/capra-ui/commits/85ed2f8) — Add missing dark mode images
|
|
12
|
+
* Updated dependencies [85ed2f8](https://bitbucket.org/cribl/capra-ui/commits/85ed2f8) — Add new `Attention`, `Celebration`, and `Hibernating` images
|
|
13
|
+
* @capra/icons\@1.9.0
|
|
14
|
+
|
|
15
|
+
### 1.10.0
|
|
16
|
+
|
|
17
|
+
#### Minor Changes
|
|
18
|
+
|
|
19
|
+
* [a73a72f](https://bitbucket.org/cribl/capra-ui/commits/a73a72f): Add `Badge` `size` prop and `neutral` appearance.
|
|
20
|
+
* [3d42958](https://bitbucket.org/cribl/capra-ui/commits/3d42958): Add `offset` prop to `BadgeLayout` to support additional positioning options.
|
|
21
|
+
|
|
22
|
+
#### Patch Changes
|
|
23
|
+
|
|
24
|
+
* [0b0e03a](https://bitbucket.org/cribl/capra-ui/commits/0b0e03a): Fix tab hover color
|
|
25
|
+
|
|
3
26
|
### 1.9.0
|
|
4
27
|
|
|
5
28
|
#### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capra/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Core React components for the Capra design system",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"react-aria": "^3.48.0",
|
|
37
37
|
"react-aria-components": "^1.17.0",
|
|
38
|
-
"@capra/icons": "^1.
|
|
38
|
+
"@capra/icons": "^1.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"clsx": "^2.1.1",
|