@capra/core 1.8.2 → 1.10.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.
Files changed (50) hide show
  1. package/dist/index.cjs +294 -46
  2. package/dist/index.d.cts +132 -20
  3. package/dist/index.d.mts +132 -20
  4. package/dist/index.mjs +295 -49
  5. package/dist/style.css +251 -72
  6. package/docs/core-alert--usage.md +2 -0
  7. package/docs/core-anchor--usage.md +2 -0
  8. package/docs/core-autocompletefield--usage.md +2 -0
  9. package/docs/core-badge--design.md +10 -5
  10. package/docs/core-badge--usage.md +5 -2
  11. package/docs/core-breadcrumbs--usage.md +2 -0
  12. package/docs/core-button--usage.md +2 -0
  13. package/docs/core-buttonlink--usage.md +2 -0
  14. package/docs/core-checkbox--usage.md +2 -0
  15. package/docs/core-collapse--usage.md +2 -0
  16. package/docs/core-datepickerfield--usage.md +2 -0
  17. package/docs/core-daterangepickerfield--usage.md +2 -0
  18. package/docs/core-divider--usage.md +2 -0
  19. package/docs/core-emptystate--usage.md +2 -0
  20. package/docs/core-helpertext--usage.md +2 -0
  21. package/docs/core-iconbutton--usage.md +2 -0
  22. package/docs/core-inputrow--usage.md +2 -0
  23. package/docs/core-label--usage.md +2 -0
  24. package/docs/core-link--usage.md +2 -0
  25. package/docs/core-listitem--usage.md +2 -0
  26. package/docs/core-menu--usage.md +2 -0
  27. package/docs/core-modal--usage.md +2 -0
  28. package/docs/core-pagination--usage.md +2 -0
  29. package/docs/core-pill--usage.md +2 -0
  30. package/docs/core-radio--usage.md +2 -0
  31. package/docs/core-radiogroup--usage.md +2 -0
  32. package/docs/core-radiotile--usage.md +2 -0
  33. package/docs/core-ribbon--usage.md +2 -0
  34. package/docs/core-skeleton--usage.md +1 -2
  35. package/docs/core-skeletongroup--usage.md +0 -1
  36. package/docs/core-spinner--usage.md +2 -0
  37. package/docs/core-switch--usage.md +2 -0
  38. package/docs/core-tabnav--usage.md +2 -0
  39. package/docs/core-tag--usage.md +2 -0
  40. package/docs/core-text--usage.md +2 -0
  41. package/docs/core-textarea--usage.md +2 -0
  42. package/docs/core-textinput--usage.md +2 -0
  43. package/docs/core-tooltip--usage.md +2 -0
  44. package/docs/core-topnav--usage.md +2 -0
  45. package/docs/core-tree--design.md +31 -0
  46. package/docs/core-tree--usage.md +102 -0
  47. package/docs/core-verticalnavigation--usage.md +2 -0
  48. package/docs/history-changelogs-capra-core--docs.md +34 -0
  49. package/docs/index.md +2 -0
  50. package/package.json +7 -7
package/dist/style.css CHANGED
@@ -628,22 +628,33 @@
628
628
  align-items: center;
629
629
  display: flex;
630
630
  }
631
- .capra-Badge-module-yecu4W-badge {
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,86 +676,88 @@
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-yecu4W-base {
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-yecu4W-badge {
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
  }
682
- .capra-ListItem-module-VUh15W-listItem {
683
- color: var(--cds2-color-foreground-default);
684
- font: var(--cds2-typography-body-md-normal);
700
+ .capra-ListItem-module-QN6vFW-__listItem-layout {
685
701
  padding: var(--cds2-spacing-sm) var(--cds2-spacing-md);
686
702
  gap: var(--cds2-spacing-md);
687
703
  grid-template-columns: auto 1fr auto;
688
- grid-template-areas: "capra-ListItem-module-VUh15W-leading capra-ListItem-module-VUh15W-content capra-ListItem-module-VUh15W-trailing";
689
- width: 100%;
704
+ grid-template-areas: "capra-ListItem-module-QN6vFW-leading capra-ListItem-module-QN6vFW-content capra-ListItem-module-QN6vFW-trailing";
690
705
  display: grid;
691
706
  }
692
707
 
693
- .capra-ListItem-module-VUh15W-slots:not(:empty):not([data-trailing="true"]) {
694
- margin-inline-end: var(--cds-spacing-md);
695
- }
696
-
697
- .capra-ListItem-module-VUh15W-slots[data-trailing="true"]:not(:empty) {
698
- margin-inline-start: var(--cds-spacing-md);
708
+ .capra-ListItem-module-QN6vFW-listItem {
709
+ color: var(--cds2-color-foreground-default);
710
+ font: var(--cds2-typography-body-md-normal);
711
+ width: 100%;
699
712
  }
700
713
 
701
- .capra-ListItem-module-VUh15W-slots {
714
+ .capra-ListItem-module-QN6vFW-slots {
702
715
  font: var(--cds2-typography-body-md-normal);
703
716
  align-items: center;
704
717
  gap: var(--cds2-spacing-md);
705
718
  min-height: var(--cds2-dimension-component-sm);
706
- grid-column: capra-ListItem-module-VUh15W-leading;
719
+ grid-column: capra-ListItem-module-QN6vFW-leading;
707
720
  display: flex;
708
721
 
709
722
  &[data-trailing="true"] {
710
- grid-column: capra-ListItem-module-VUh15W-trailing;
723
+ grid-column: capra-ListItem-module-QN6vFW-trailing;
711
724
  }
712
725
  }
713
726
 
714
- .capra-ListItem-module-VUh15W-slot {
727
+ .capra-ListItem-module-QN6vFW-slot {
715
728
  min-width: var(--cds2-dimension-component-xs);
716
729
  justify-content: center;
717
730
  align-items: center;
718
731
  display: flex;
719
732
  }
720
733
 
721
- .capra-ListItem-module-VUh15W-content {
734
+ .capra-ListItem-module-QN6vFW-content {
722
735
  column-gap: var(--cds2-spacing-md);
723
- grid-template: "capra-ListItem-module-VUh15W-label capra-ListItem-module-VUh15W-suffix"
724
- "capra-ListItem-module-VUh15W-description capra-ListItem-module-VUh15W-description"
736
+ grid-template: "capra-ListItem-module-QN6vFW-label capra-ListItem-module-QN6vFW-suffix"
737
+ "capra-ListItem-module-QN6vFW-description capra-ListItem-module-QN6vFW-description"
725
738
  / 1fr auto;
726
- grid-column: capra-ListItem-module-VUh15W-content;
739
+ grid-column: capra-ListItem-module-QN6vFW-content;
727
740
  display: grid;
728
741
  }
729
742
 
730
- .capra-ListItem-module-VUh15W-label {
743
+ .capra-ListItem-module-QN6vFW-label {
731
744
  color: var(--cds2-color-foreground-default);
732
745
  font: var(--cds2-typography-body-md-normal);
733
- grid-area: capra-ListItem-module-VUh15W-label;
746
+ grid-area: capra-ListItem-module-QN6vFW-label;
734
747
  overflow: hidden;
735
748
  }
736
749
 
737
- .capra-ListItem-module-VUh15W-suffix {
750
+ .capra-ListItem-module-QN6vFW-suffix {
738
751
  color: var(--cds2-color-foreground-subtle);
739
752
  font: var(--cds2-typography-body-sm-normal);
740
- grid-area: capra-ListItem-module-VUh15W-suffix;
753
+ grid-area: capra-ListItem-module-QN6vFW-suffix;
741
754
  justify-self: end;
742
755
  }
743
756
 
744
- .capra-ListItem-module-VUh15W-description {
757
+ .capra-ListItem-module-QN6vFW-description {
745
758
  color: var(--cds2-color-foreground-subtle);
746
759
  font: var(--cds2-typography-body-sm-normal);
747
- grid-area: capra-ListItem-module-VUh15W-description;
760
+ grid-area: capra-ListItem-module-QN6vFW-description;
748
761
  }
749
762
  .capra-Pill-module-xa3pfa-pill {
750
763
  align-items: center;
@@ -3777,21 +3790,21 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3777
3790
  .capra-Menu-module-3G4VeG-menuItemListItemShell {
3778
3791
  width: 100%;
3779
3792
  }
3780
- .capra-TabNav-module-qqfvea-root {
3793
+ .capra-TabNav-module-pLDWhG-root {
3781
3794
  flex-direction: column;
3782
3795
  width: 100%;
3783
3796
  display: flex;
3784
3797
  }
3785
3798
 
3786
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] {
3799
+ .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] {
3787
3800
  flex-direction: column-reverse;
3788
3801
  }
3789
3802
 
3790
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] {
3803
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] {
3791
3804
  flex-direction: row;
3792
3805
  }
3793
3806
 
3794
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tabBar {
3807
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabBar {
3795
3808
  border-block-end: none;
3796
3809
  border-inline-end: 1px solid var(--cds2-color-border-neutral-subtle);
3797
3810
  flex-direction: column;
@@ -3800,7 +3813,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3800
3813
  padding-inline-end: var(--cds2-spacing-lg);
3801
3814
  }
3802
3815
 
3803
- .capra-TabNav-module-qqfvea-tabBar {
3816
+ .capra-TabNav-module-pLDWhG-tabBar {
3804
3817
  justify-content: space-between;
3805
3818
  align-items: center;
3806
3819
  gap: var(--cds2-spacing-md);
@@ -3809,41 +3822,41 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3809
3822
  display: flex;
3810
3823
  }
3811
3824
 
3812
- .capra-TabNav-module-qqfvea-tabBar:has(.capra-TabNav-module-qqfvea-extraContent) {
3825
+ .capra-TabNav-module-pLDWhG-tabBar:has(.capra-TabNav-module-pLDWhG-extraContent) {
3813
3826
  gap: var(--cds2-spacing-xl);
3814
3827
  }
3815
3828
 
3816
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tabBar {
3829
+ .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tabBar {
3817
3830
  border: none;
3818
3831
  margin-block-start: 0;
3819
3832
  }
3820
3833
 
3821
- .capra-TabNav-module-qqfvea-tabList {
3834
+ .capra-TabNav-module-pLDWhG-tabList {
3822
3835
  gap: var(--cds2-spacing-xl);
3823
3836
  flex-flow: wrap;
3824
3837
  display: flex;
3825
3838
  }
3826
3839
 
3827
- .capra-TabNav-module-qqfvea-root[data-wrap="nowrap"] .capra-TabNav-module-qqfvea-tabList {
3840
+ .capra-TabNav-module-pLDWhG-root[data-wrap="nowrap"] .capra-TabNav-module-pLDWhG-tabList {
3828
3841
  flex-wrap: nowrap;
3829
3842
  }
3830
3843
 
3831
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tabList {
3844
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tabList {
3832
3845
  flex-flow: column;
3833
3846
  gap: 0;
3834
3847
  width: 100%;
3835
3848
  }
3836
3849
 
3837
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tabList > :not(:last-child), .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tabGroup > :not(:last-child), .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-subTabList .capra-TabNav-module-qqfvea-subTabListItem:not(:last-child) {
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) {
3838
3851
  margin-block-end: var(--cds2-spacing-md);
3839
3852
  }
3840
3853
 
3841
- .capra-TabNav-module-qqfvea-root[data-centered="true"] .capra-TabNav-module-qqfvea-tabList {
3854
+ .capra-TabNav-module-pLDWhG-root[data-centered="true"] .capra-TabNav-module-pLDWhG-tabList {
3842
3855
  flex: 1;
3843
3856
  justify-content: center;
3844
3857
  }
3845
3858
 
3846
- .capra-TabNav-module-qqfvea-tab {
3859
+ .capra-TabNav-module-pLDWhG-tab {
3847
3860
  appearance: none;
3848
3861
  cursor: pointer;
3849
3862
  justify-content: center;
@@ -3872,59 +3885,59 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3872
3885
  }
3873
3886
  }
3874
3887
 
3875
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tab {
3888
+ .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab {
3876
3889
  border-bottom: 2px solid #0000;
3877
3890
  transition: none;
3878
3891
  }
3879
3892
 
3880
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
3893
+ .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
3881
3894
  border-bottom-color: var(--cds2-color-border-accent-default);
3882
- color: var(--cds2-color-foreground-neutral-default) !important;
3895
+ color: var(--cds2-color-foreground-accent-default) !important;
3883
3896
  }
3884
3897
 
3885
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tab[data-active="true"][data-disabled="true"] {
3898
+ .capra-TabNav-module-pLDWhG-root[data-placement="horizontal"] .capra-TabNav-module-pLDWhG-tab[data-active="true"][data-disabled="true"] {
3886
3899
  border-bottom-color: #0000;
3887
3900
  }
3888
3901
 
3889
- .capra-TabNav-module-qqfvea-tab[data-active="true"] {
3902
+ .capra-TabNav-module-pLDWhG-tab[data-active="true"] {
3890
3903
  color: var(--cds2-color-foreground-accent-default);
3891
3904
  }
3892
3905
 
3893
- .capra-TabNav-module-qqfvea-tabIcon {
3906
+ .capra-TabNav-module-pLDWhG-tabIcon {
3894
3907
  align-items: center;
3895
3908
  display: inline-flex;
3896
3909
  }
3897
3910
 
3898
- .capra-TabNav-module-qqfvea-tabLabel {
3911
+ .capra-TabNav-module-pLDWhG-tabLabel {
3899
3912
  white-space: nowrap;
3900
3913
  }
3901
3914
 
3902
- .capra-TabNav-module-qqfvea-indentSpacer {
3915
+ .capra-TabNav-module-pLDWhG-indentSpacer {
3903
3916
  flex-shrink: 0;
3904
3917
  width: 16px;
3905
3918
  min-width: 16px;
3906
3919
  }
3907
3920
 
3908
- .capra-TabNav-module-qqfvea-dropdownIcon {
3921
+ .capra-TabNav-module-pLDWhG-dropdownIcon {
3909
3922
  color: inherit;
3910
3923
  flex-shrink: 0;
3911
3924
  align-items: center;
3912
3925
  display: inline-flex;
3913
3926
  }
3914
3927
 
3915
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-dropdownIcon {
3928
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-dropdownIcon {
3916
3929
  margin-inline-start: auto;
3917
3930
  }
3918
3931
 
3919
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab[data-expanded="false"] .capra-TabNav-module-qqfvea-dropdownIcon svg {
3932
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-expanded="false"] .capra-TabNav-module-pLDWhG-dropdownIcon svg {
3920
3933
  transform: rotate(-90deg);
3921
3934
  }
3922
3935
 
3923
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab[data-expanded="true"] .capra-TabNav-module-qqfvea-dropdownIcon svg {
3936
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-expanded="true"] .capra-TabNav-module-pLDWhG-dropdownIcon svg {
3924
3937
  transform: none;
3925
3938
  }
3926
3939
 
3927
- .capra-TabNav-module-qqfvea-tabGroup {
3940
+ .capra-TabNav-module-pLDWhG-tabGroup {
3928
3941
  flex-direction: column;
3929
3942
  align-items: stretch;
3930
3943
  gap: 0;
@@ -3932,7 +3945,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3932
3945
  display: flex;
3933
3946
  }
3934
3947
 
3935
- .capra-TabNav-module-qqfvea-subTabList {
3948
+ .capra-TabNav-module-pLDWhG-subTabList {
3936
3949
  flex-flow: column;
3937
3950
  gap: 0;
3938
3951
  width: 100%;
@@ -3942,20 +3955,20 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3942
3955
  display: flex;
3943
3956
  }
3944
3957
 
3945
- .capra-TabNav-module-qqfvea-subTabListItem {
3958
+ .capra-TabNav-module-pLDWhG-subTabListItem {
3946
3959
  margin: 0;
3947
3960
  padding: 0;
3948
3961
  }
3949
3962
 
3950
- .capra-TabNav-module-qqfvea-subTab {
3963
+ .capra-TabNav-module-pLDWhG-subTab {
3951
3964
  width: 100%;
3952
3965
  }
3953
3966
 
3954
- .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tab[data-active="true"], .capra-TabNav-module-qqfvea-root[data-placement="horizontal"] .capra-TabNav-module-qqfvea-tab[data-submenu-open="true"] {
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"] {
3955
3968
  border-bottom-color: var(--cds2-color-border-accent-default);
3956
3969
  }
3957
3970
 
3958
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab {
3971
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab {
3959
3972
  border-bottom: none;
3960
3973
  padding-block: 0;
3961
3974
  padding-inline: var(--cds2-spacing-md);
@@ -3964,42 +3977,42 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
3964
3977
  width: 100%;
3965
3978
  }
3966
3979
 
3967
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab[data-active="true"] {
3980
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-active="true"] {
3968
3981
  background-color: var(--cds2-color-background-accent-subtle);
3969
3982
  border-inline-end-color: var(--cds2-color-border-accent-default);
3970
3983
  }
3971
3984
 
3972
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
3985
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab:hover:not(:is(:disabled, [data-disabled="true"])) {
3973
3986
  background-color: var(--cds2-color-background-accent-selected);
3974
3987
  border-inline-end-color: var(--cds2-color-border-accent-strong);
3975
3988
  color: var(--cds2-color-foreground-accent-default);
3976
3989
  }
3977
3990
 
3978
- .capra-TabNav-module-qqfvea-root[data-placement="vertical"] .capra-TabNav-module-qqfvea-tab[data-active="true"][data-disabled="true"] {
3991
+ .capra-TabNav-module-pLDWhG-root[data-placement="vertical"] .capra-TabNav-module-pLDWhG-tab[data-active="true"][data-disabled="true"] {
3979
3992
  background-color: #0000;
3980
3993
  border-inline-end-color: #0000;
3981
3994
  }
3982
3995
 
3983
- .capra-TabNav-module-qqfvea-extraContent {
3996
+ .capra-TabNav-module-pLDWhG-extraContent {
3984
3997
  align-items: center;
3985
3998
  display: flex;
3986
3999
  }
3987
4000
 
3988
- .capra-TabNav-module-qqfvea-panel {
4001
+ .capra-TabNav-module-pLDWhG-panel {
3989
4002
  font: var(--cds2-typography-body-md-normal);
3990
4003
  color: var(--cds2-color-foreground-default);
3991
4004
  flex: 1;
3992
4005
  padding-block-start: var(--cds2-spacing-lg);
3993
4006
  }
3994
4007
 
3995
- .capra-TabNav-module-qqfvea-subMenu {
4008
+ .capra-TabNav-module-pLDWhG-subMenu {
3996
4009
  padding: var(--cds2-spacing-xs);
3997
4010
  min-width: 160px;
3998
4011
  margin: 0;
3999
4012
  list-style: none;
4000
4013
  }
4001
4014
 
4002
- .capra-TabNav-module-qqfvea-subMenuItem {
4015
+ .capra-TabNav-module-pLDWhG-subMenuItem {
4003
4016
  appearance: none;
4004
4017
  text-align: start;
4005
4018
  width: 100%;
@@ -4027,7 +4040,7 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
4027
4040
  }
4028
4041
  }
4029
4042
 
4030
- .capra-TabNav-module-qqfvea-subMenuItemActive {
4043
+ .capra-TabNav-module-pLDWhG-subMenuItemActive {
4031
4044
  background-color: var(--cds2-color-background-accent-subtle);
4032
4045
  color: var(--cds2-color-foreground-accent-default);
4033
4046
  font: var(--cds2-typography-body-sm-semibold);
@@ -4129,3 +4142,169 @@ input:disabled + .capra-Radio-module-ZI7rzq-inner:after {
4129
4142
  gap: var(--cds2-spacing-md);
4130
4143
  display: inline-flex;
4131
4144
  }
4145
+ .capra-ListItem-module-QN6vFW-__listItem-layout {
4146
+ padding: var(--cds2-spacing-sm) var(--cds2-spacing-md);
4147
+ gap: var(--cds2-spacing-md);
4148
+ grid-template-columns: auto 1fr auto;
4149
+ grid-template-areas: "capra-ListItem-module-QN6vFW-leading capra-ListItem-module-QN6vFW-content capra-ListItem-module-QN6vFW-trailing";
4150
+ display: grid;
4151
+ }
4152
+
4153
+ .capra-ListItem-module-QN6vFW-listItem {
4154
+ color: var(--cds2-color-foreground-default);
4155
+ font: var(--cds2-typography-body-md-normal);
4156
+ width: 100%;
4157
+ }
4158
+
4159
+ .capra-ListItem-module-QN6vFW-slots {
4160
+ font: var(--cds2-typography-body-md-normal);
4161
+ align-items: center;
4162
+ gap: var(--cds2-spacing-md);
4163
+ min-height: var(--cds2-dimension-component-sm);
4164
+ grid-column: capra-ListItem-module-QN6vFW-leading;
4165
+ display: flex;
4166
+
4167
+ &[data-trailing="true"] {
4168
+ grid-column: capra-ListItem-module-QN6vFW-trailing;
4169
+ }
4170
+ }
4171
+
4172
+ .capra-ListItem-module-QN6vFW-slot {
4173
+ min-width: var(--cds2-dimension-component-xs);
4174
+ justify-content: center;
4175
+ align-items: center;
4176
+ display: flex;
4177
+ }
4178
+
4179
+ .capra-ListItem-module-QN6vFW-content {
4180
+ column-gap: var(--cds2-spacing-md);
4181
+ grid-template: "capra-ListItem-module-QN6vFW-label capra-ListItem-module-QN6vFW-suffix"
4182
+ "capra-ListItem-module-QN6vFW-description capra-ListItem-module-QN6vFW-description"
4183
+ / 1fr auto;
4184
+ grid-column: capra-ListItem-module-QN6vFW-content;
4185
+ display: grid;
4186
+ }
4187
+
4188
+ .capra-ListItem-module-QN6vFW-label {
4189
+ color: var(--cds2-color-foreground-default);
4190
+ font: var(--cds2-typography-body-md-normal);
4191
+ grid-area: capra-ListItem-module-QN6vFW-label;
4192
+ overflow: hidden;
4193
+ }
4194
+
4195
+ .capra-ListItem-module-QN6vFW-suffix {
4196
+ color: var(--cds2-color-foreground-subtle);
4197
+ font: var(--cds2-typography-body-sm-normal);
4198
+ grid-area: capra-ListItem-module-QN6vFW-suffix;
4199
+ justify-self: end;
4200
+ }
4201
+
4202
+ .capra-ListItem-module-QN6vFW-description {
4203
+ color: var(--cds2-color-foreground-subtle);
4204
+ font: var(--cds2-typography-body-sm-normal);
4205
+ grid-area: capra-ListItem-module-QN6vFW-description;
4206
+ }
4207
+
4208
+ .capra-Tree-module--hXpBa-root {
4209
+ width: 100%;
4210
+ padding: var(--cds2-spacing-xs);
4211
+ }
4212
+
4213
+ .capra-Tree-module--hXpBa-item {
4214
+ border-radius: var(--cds2-radius-md);
4215
+ color: var(--cds2-color-foreground-default);
4216
+ min-height: var(--cds2-dimension-component-sm);
4217
+
4218
+ &[data-hovered="true"]:not([data-disabled="true"]) {
4219
+ background-color: var(--cds2-color-background-accent-hover);
4220
+ }
4221
+
4222
+ &[data-focus-visible="true"] {
4223
+ outline: var(--cds2-border-focus);
4224
+ outline-offset: var(--cds2-spacing-xs);
4225
+ }
4226
+
4227
+ &[data-disabled="true"] {
4228
+ color: var(--cds2-color-foreground-disabled);
4229
+ cursor: not-allowed;
4230
+
4231
+ & .capra-Tree-module--hXpBa-itemLabel, & .capra-Tree-module--hXpBa-itemSuffix, & .capra-Tree-module--hXpBa-chevronButton {
4232
+ color: var(--cds2-color-foreground-disabled);
4233
+ }
4234
+ }
4235
+ }
4236
+
4237
+ .capra-Tree-module--hXpBa-indentSpacer {
4238
+ flex: 0 0 var(--cds2-dimension-component-xs);
4239
+ height: var(--cds2-dimension-component-md);
4240
+ width: var(--cds2-dimension-component-xs);
4241
+ margin-block: calc(-1 * var(--cds2-spacing-sm));
4242
+ display: block;
4243
+ position: relative;
4244
+
4245
+ &:before {
4246
+ content: "";
4247
+ border-right: var(--cds2-border-default);
4248
+ z-index: -1;
4249
+ height: 100%;
4250
+ position: absolute;
4251
+ top: 0;
4252
+ left: calc(50% - .5px);
4253
+ }
4254
+ }
4255
+
4256
+ .capra-Tree-module--hXpBa-chevronButton {
4257
+ all: unset;
4258
+ border-radius: var(--cds2-radius-md);
4259
+ cursor: pointer;
4260
+ flex: 0 0 var(--cds2-dimension-component-sm);
4261
+ height: var(--cds2-dimension-component-sm);
4262
+ width: var(--cds2-dimension-component-sm);
4263
+ margin: calc(-1 * var(--cds2-spacing-sm));
4264
+ justify-content: center;
4265
+ align-items: center;
4266
+ display: inline-flex;
4267
+
4268
+ &[data-focus-visible="true"] {
4269
+ outline: var(--cds2-border-focus);
4270
+ outline-offset: var(--cds2-spacing-xs);
4271
+ }
4272
+ }
4273
+
4274
+ .capra-Tree-module--hXpBa-chevronIcon {
4275
+ transition: transform var(--cds2-motion-duration-medium-2) ease;
4276
+ justify-content: center;
4277
+ align-items: center;
4278
+ display: inline-flex;
4279
+ }
4280
+
4281
+ .capra-Tree-module--hXpBa-item[data-expanded="true"] .capra-Tree-module--hXpBa-chevronIcon {
4282
+ transform: rotate(90deg);
4283
+ }
4284
+
4285
+ .capra-Tree-module--hXpBa-selectionCheckbox {
4286
+ flex: 0 0 var(--cds2-dimension-component-xs);
4287
+ justify-content: center;
4288
+ align-items: center;
4289
+ display: inline-flex;
4290
+ }
4291
+
4292
+ .capra-Tree-module--hXpBa-itemContent {
4293
+ grid-template-areas: "capra-Tree-module--hXpBa-label capra-Tree-module--hXpBa-suffix";
4294
+ grid-template-rows: unset;
4295
+ align-items: center;
4296
+ }
4297
+
4298
+ .capra-Tree-module--hXpBa-itemLabel {
4299
+ color: var(--cds2-color-foreground-default);
4300
+ }
4301
+
4302
+ .capra-Tree-module--hXpBa-itemSuffix {
4303
+ color: var(--cds2-color-foreground-subtle);
4304
+ }
4305
+
4306
+ @media (prefers-reduced-motion: reduce) {
4307
+ .capra-Tree-module--hXpBa-chevronIcon {
4308
+ transition: none;
4309
+ }
4310
+ }
@@ -10,4 +10,6 @@ Alerts are used to communicate important information to the user.
10
10
  | `children` | `React.ReactNode` | Yes | `--` | The description of the alert. This is required.<br><br>@required |
11
11
  | `action` | `{ label: string; onClick: (e: React.MouseEvent<HTMLButtonElement>) => void; } \| React.ReactElement` | No | `--` | The configuration of the action button. The object must contain a label displayed on the button and an onClick callback function. This is optional.<br><br>When the object is not provided, the alert will not render the action button. |
12
12
  | `onDismiss` | `true \| (() => void)` | No | `--` | Optional function to call when the user dismisses the alert.<br><br>If this is not provided, the alert will not render the dismiss button.<br><br>Alerts with `appearance="danger"` cannot be dismissed and will not render the dismiss button.<br><br>**Integration note:** while the `Alert` will handle its own dismissal, this is non-persistent.<br>Persistent dismissal should be handled by the parent component. |
13
+ | `className` | `never` | No | `--` | Use `FORCE__className` instead. |
14
+ | `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
13
15
  | `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
@@ -7,6 +7,8 @@
7
7
  | `isActive` | `boolean` | No | `--` | Whether the anchor is active. |
8
8
  | `isDisabled` | `boolean` | No | `--` | Whether the anchor is disabled. |
9
9
  | `as` | `As` | No | `--` | The underlying element rendered by the anchor. Defaults to `a`. |
10
+ | `className` | `never` | No | `--` | Use `FORCE__className` instead. |
11
+ | `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
10
12
  | `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
11
13
 
12
14
  ## Usage
@@ -12,6 +12,8 @@ AutocompleteField combines a text field with a suggestions list. Consumers can s
12
12
  | `items` | `AutocompleteItem[]` | No | `--` | The items to display in the dropdown. |
13
13
  | `value` | `AutocompleteItem['value']` | No | `--` | The value of the input. |
14
14
  | `shouldAutoSizeDropdown` | `boolean` | No | `--` | Whether to automatically size the dropdown to the width of the input. Defaults to `true` |
15
+ | `className` | `never` | No | `--` | Use `FORCE__className` instead. |
16
+ | `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
15
17
  | `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
16
18
  | `helperText` | `string` | No | `--` | Helper text below the field. Replaced by error message when status is error. Use for requirements, disclaimers. |
17
19
  | `label` | `string` | No | `--` | Label for the field. Required for accessibility; use aria-label if another element acts as label. |
@@ -10,7 +10,7 @@ A label is required to indicate the number of notifications.
10
10
 
11
11
  ### Size
12
12
 
13
- Badges come in 3 sizes to support ones, tens, and values above 100.
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 include count context in the parent's accessible label.
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
- * The badge is a nested static element; it is announced as part of its parent.
59
- * The parent element's accessible label should include the count context (e.g., "Notifications, 5 unread").
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,10 +4,13 @@ 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 | `--` | The variant of the badge. 'counter' displays a count, 'dot' displays only a dot.<br>@default 'counter' |
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. |
13
+ | `className` | `never` | No | `--` | Use `FORCE__className` instead. |
14
+ | `style` | `never` | No | `--` | Inline styles are not supported; use component props or `FORCE__className`. |
12
15
  | `FORCE__className` | `string` | No | `--` | 🚨 This prop is meant to be an escape hatch. 🚨<br><br>If the desired style cannot be achieved using component props, use this as a last resort. The inner workings of Capra components are implementation details and this escape hatch gives one access to those implementation details. We cannot make any guarantees that styles will applied correctly across version updates. Please use it responsibly.<br><br>Add a CSS class to the component. |
13
16
  | `aria-live` | `React.AriaAttributes['aria-live']` | No | `--` | `--` |