@hashicorp/design-system-components 4.5.2 → 4.6.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/declarations/components/hds/accordion/index.d.ts +32 -3
- package/declarations/components/hds/accordion/index.d.ts.map +1 -1
- package/declarations/components/hds/accordion/item/button.d.ts +2 -0
- package/declarations/components/hds/accordion/item/button.d.ts.map +1 -1
- package/declarations/components/hds/accordion/item/index.d.ts +39 -2
- package/declarations/components/hds/accordion/item/index.d.ts.map +1 -1
- package/declarations/components/hds/accordion/types.d.ts +21 -0
- package/declarations/components/hds/accordion/types.d.ts.map +1 -0
- package/declarations/components/hds/alert/index.d.ts +4 -4
- package/declarations/components/hds/alert/index.d.ts.map +1 -1
- package/declarations/components/hds/app-footer/copyright.d.ts.map +1 -1
- package/declarations/components/hds/app-footer/index.d.ts +1 -1
- package/declarations/components/hds/app-footer/index.d.ts.map +1 -1
- package/declarations/components/hds/app-footer/legal-links.d.ts.map +1 -1
- package/declarations/components/hds/app-footer/status-link.d.ts +3 -3
- package/declarations/components/hds/app-footer/status-link.d.ts.map +1 -1
- package/declarations/components/hds/app-frame/index.d.ts.map +1 -1
- package/declarations/components/hds/application-state/footer.d.ts.map +1 -1
- package/declarations/components/hds/badge/index.d.ts +4 -4
- package/declarations/components/hds/badge/index.d.ts.map +1 -1
- package/declarations/components/hds/badge-count/index.d.ts +6 -6
- package/declarations/components/hds/badge-count/index.d.ts.map +1 -1
- package/declarations/components/hds/badge-count/types.d.ts +2 -2
- package/declarations/components/hds/badge-count/types.d.ts.map +1 -1
- package/declarations/components/hds/button/index.d.ts +1 -1
- package/declarations/components/hds/copy/button/index.d.ts +3 -2
- package/declarations/components/hds/copy/button/index.d.ts.map +1 -1
- package/declarations/components/hds/copy/snippet/index.d.ts +6 -5
- package/declarations/components/hds/copy/snippet/index.d.ts.map +1 -1
- package/declarations/components/hds/disclosure-primitive/index.d.ts +6 -1
- package/declarations/components/hds/disclosure-primitive/index.d.ts.map +1 -1
- package/declarations/components/hds/dismiss-button/index.d.ts.map +1 -1
- package/declarations/components/hds/form/super-select/single/base.d.ts.map +1 -1
- package/declarations/components/hds/icon-tile/index.d.ts +4 -4
- package/declarations/components/hds/icon-tile/index.d.ts.map +1 -1
- package/declarations/components/hds/interactive/index.d.ts.map +1 -1
- package/declarations/components/hds/link/inline.d.ts +3 -3
- package/declarations/components/hds/link/inline.d.ts.map +1 -1
- package/declarations/components/hds/link/standalone.d.ts +7 -7
- package/declarations/components/hds/link/standalone.d.ts.map +1 -1
- package/declarations/components/hds/popover-primitive/index.d.ts +66 -20
- package/declarations/components/hds/popover-primitive/index.d.ts.map +1 -1
- package/declarations/components/hds/reveal/toggle/button.d.ts.map +1 -1
- package/declarations/components/hds/rich-tooltip/bubble.d.ts +33 -17
- package/declarations/components/hds/rich-tooltip/bubble.d.ts.map +1 -1
- package/declarations/components/hds/rich-tooltip/index.d.ts +27 -5
- package/declarations/components/hds/rich-tooltip/index.d.ts.map +1 -1
- package/declarations/components/hds/rich-tooltip/toggle.d.ts +32 -8
- package/declarations/components/hds/rich-tooltip/toggle.d.ts.map +1 -1
- package/declarations/components/hds/rich-tooltip/types.d.ts +16 -0
- package/declarations/components/hds/rich-tooltip/types.d.ts.map +1 -0
- package/declarations/components/hds/separator/index.d.ts +3 -3
- package/declarations/components/hds/separator/index.d.ts.map +1 -1
- package/declarations/components/hds/side-nav/header/home-link.d.ts.map +1 -1
- package/declarations/components/hds/side-nav/header/icon-button.d.ts.map +1 -1
- package/declarations/components/hds/side-nav/index.d.ts.map +1 -1
- package/declarations/components/hds/side-nav/portal/target.d.ts.map +1 -1
- package/declarations/components/hds/stepper/step/indicator.d.ts +1 -1
- package/declarations/components/hds/stepper/step/indicator.d.ts.map +1 -1
- package/declarations/components/hds/stepper/task/indicator.d.ts +4 -3
- package/declarations/components/hds/stepper/task/indicator.d.ts.map +1 -1
- package/declarations/components/hds/tabs/index.d.ts.map +1 -1
- package/declarations/components/hds/tabs/panel.d.ts.map +1 -1
- package/declarations/components/hds/tabs/tab.d.ts +1 -1
- package/declarations/components/hds/tabs/tab.d.ts.map +1 -1
- package/declarations/components/hds/tabs/types.d.ts +4 -0
- package/declarations/components/hds/tabs/types.d.ts.map +1 -1
- package/declarations/components/hds/tag/index.d.ts +2 -2
- package/declarations/components/hds/tag/index.d.ts.map +1 -1
- package/declarations/components/hds/text/body.d.ts +6 -6
- package/declarations/components/hds/text/body.d.ts.map +1 -1
- package/declarations/components/hds/text/code.d.ts +3 -3
- package/declarations/components/hds/text/code.d.ts.map +1 -1
- package/declarations/components/hds/text/display.d.ts +3 -3
- package/declarations/components/hds/text/display.d.ts.map +1 -1
- package/declarations/components/hds/text/index.d.ts +7 -8
- package/declarations/components/hds/text/index.d.ts.map +1 -1
- package/declarations/helpers/hds-link-to-query.d.ts +3 -1
- package/declarations/helpers/hds-link-to-query.d.ts.map +1 -1
- package/declarations/modifiers/hds-anchored-position.d.ts +28 -9
- package/declarations/modifiers/hds-anchored-position.d.ts.map +1 -1
- package/declarations/modifiers/hds-clipboard.d.ts.map +1 -1
- package/declarations/modifiers/hds-register-event.d.ts +9 -3
- package/declarations/modifiers/hds-register-event.d.ts.map +1 -1
- package/declarations/template-registry.d.ts +19 -0
- package/declarations/template-registry.d.ts.map +1 -1
- package/dist/components/hds/accordion/index.js +53 -5
- package/dist/components/hds/accordion/index.js.map +1 -1
- package/dist/components/hds/accordion/item/button.js +6 -1
- package/dist/components/hds/accordion/item/button.js.map +1 -1
- package/dist/components/hds/accordion/item/index.js +64 -2
- package/dist/components/hds/accordion/item/index.js.map +1 -1
- package/dist/components/hds/accordion/types.js +24 -0
- package/dist/components/hds/accordion/types.js.map +1 -0
- package/dist/components/hds/alert/index.js +2 -1
- package/dist/components/hds/alert/index.js.map +1 -1
- package/dist/components/hds/app-footer/copyright.js.map +1 -1
- package/dist/components/hds/app-footer/index.js.map +1 -1
- package/dist/components/hds/app-footer/legal-links.js.map +1 -1
- package/dist/components/hds/app-footer/status-link.js.map +1 -1
- package/dist/components/hds/app-frame/index.js.map +1 -1
- package/dist/components/hds/application-state/footer.js.map +1 -1
- package/dist/components/hds/application-state/index.js.map +1 -1
- package/dist/components/hds/badge/index.js.map +1 -1
- package/dist/components/hds/badge-count/index.js.map +1 -1
- package/dist/components/hds/badge-count/types.js.map +1 -1
- package/dist/components/hds/copy/button/index.js.map +1 -1
- package/dist/components/hds/copy/snippet/index.js +3 -3
- package/dist/components/hds/copy/snippet/index.js.map +1 -1
- package/dist/components/hds/disclosure-primitive/index.js +37 -6
- package/dist/components/hds/disclosure-primitive/index.js.map +1 -1
- package/dist/components/hds/dismiss-button/index.js.map +1 -1
- package/dist/components/hds/form/error/index.js +1 -1
- package/dist/components/hds/form/error/index.js.map +1 -1
- package/dist/components/hds/form/field/index.js +1 -1
- package/dist/components/hds/form/field/index.js.map +1 -1
- package/dist/components/hds/form/fieldset/index.js +1 -1
- package/dist/components/hds/form/fieldset/index.js.map +1 -1
- package/dist/components/hds/form/radio-card/index.js +1 -1
- package/dist/components/hds/form/radio-card/index.js.map +1 -1
- package/dist/components/hds/form/super-select/multiple/base.js.map +1 -1
- package/dist/components/hds/form/super-select/single/base.js.map +1 -1
- package/dist/components/hds/icon-tile/index.js.map +1 -1
- package/dist/components/hds/interactive/index.js.map +1 -1
- package/dist/components/hds/link/inline.js +1 -1
- package/dist/components/hds/link/inline.js.map +1 -1
- package/dist/components/hds/link/standalone.js +2 -2
- package/dist/components/hds/link/standalone.js.map +1 -1
- package/dist/components/hds/page-header/index.js.map +1 -1
- package/dist/components/hds/popover-primitive/index.js +53 -51
- package/dist/components/hds/popover-primitive/index.js.map +1 -1
- package/dist/components/hds/reveal/toggle/button.js.map +1 -1
- package/dist/components/hds/rich-tooltip/bubble.js +3 -6
- package/dist/components/hds/rich-tooltip/bubble.js.map +1 -1
- package/dist/components/hds/rich-tooltip/index.js +6 -4
- package/dist/components/hds/rich-tooltip/index.js.map +1 -1
- package/dist/components/hds/rich-tooltip/toggle.js +6 -5
- package/dist/components/hds/rich-tooltip/toggle.js.map +1 -1
- package/dist/components/hds/rich-tooltip/types.js +19 -0
- package/dist/components/hds/rich-tooltip/types.js.map +1 -0
- package/dist/components/hds/separator/index.js +2 -2
- package/dist/components/hds/separator/index.js.map +1 -1
- package/dist/components/hds/side-nav/header/home-link.js.map +1 -1
- package/dist/components/hds/side-nav/header/icon-button.js.map +1 -1
- package/dist/components/hds/side-nav/index.js.map +1 -1
- package/dist/components/hds/side-nav/list/index.js.map +1 -1
- package/dist/components/hds/side-nav/portal/target.js.map +1 -1
- package/dist/components/hds/stepper/step/indicator.js.map +1 -1
- package/dist/components/hds/stepper/task/indicator.js.map +1 -1
- package/dist/components/hds/tabs/index.js.map +1 -1
- package/dist/components/hds/tabs/panel.js.map +1 -1
- package/dist/components/hds/tabs/tab.js +0 -2
- package/dist/components/hds/tabs/tab.js.map +1 -1
- package/dist/components/hds/tabs/types.js +5 -0
- package/dist/components/hds/tabs/types.js.map +1 -1
- package/dist/components/hds/tag/index.js +1 -0
- package/dist/components/hds/tag/index.js.map +1 -1
- package/dist/components/hds/text/body.js +4 -4
- package/dist/components/hds/text/body.js.map +1 -1
- package/dist/components/hds/text/code.js +1 -1
- package/dist/components/hds/text/code.js.map +1 -1
- package/dist/components/hds/text/display.js +2 -2
- package/dist/components/hds/text/display.js.map +1 -1
- package/dist/components/hds/text/index.js +4 -5
- package/dist/components/hds/text/index.js.map +1 -1
- package/dist/helpers/hds-link-to-models.js.map +1 -1
- package/dist/helpers/hds-link-to-query.js.map +1 -1
- package/dist/modifiers/hds-anchored-position.js +8 -6
- package/dist/modifiers/hds-anchored-position.js.map +1 -1
- package/dist/modifiers/hds-clipboard.js.map +1 -1
- package/dist/modifiers/hds-register-event.js +0 -1
- package/dist/modifiers/hds-register-event.js.map +1 -1
- package/dist/styles/@hashicorp/design-system-components.css +109 -45
- package/dist/styles/components/accordion.scss +131 -53
- package/dist/styles/components/rich-tooltip.scss +0 -5
- package/package.json +6 -7
|
@@ -779,29 +779,83 @@
|
|
|
779
779
|
.hds-accordion {
|
|
780
780
|
display: flex;
|
|
781
781
|
flex-direction: column;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
.hds-accordion--type-card.hds-accordion--size-small {
|
|
785
|
+
gap: 4px;
|
|
786
|
+
}
|
|
787
|
+
.hds-accordion--type-card.hds-accordion--size-medium {
|
|
788
|
+
gap: 8px;
|
|
789
|
+
}
|
|
790
|
+
.hds-accordion--type-card.hds-accordion--size-large {
|
|
782
791
|
gap: 12px;
|
|
783
792
|
}
|
|
784
793
|
|
|
785
|
-
.hds-accordion-item {
|
|
794
|
+
.hds-accordion-item--size-small {
|
|
795
|
+
--hds-accordion-item-toggle-padding: 8px;
|
|
796
|
+
--hds-accordion-item-toggle-padding-left: 8px;
|
|
797
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
798
|
+
--hds-accordion-item-content-padding-right: 8px;
|
|
799
|
+
--hds-accordion-item-content-padding-bottom: 8px;
|
|
800
|
+
--hds-accordion-item-content-padding-left: 12px;
|
|
801
|
+
--hds-accordion-item-gap: 8px;
|
|
802
|
+
--hds-accordion-item-icon-size: 16px;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
.hds-accordion-item--size-medium {
|
|
806
|
+
--hds-accordion-item-toggle-padding: 12px;
|
|
807
|
+
--hds-accordion-item-toggle-padding-left: 8px;
|
|
808
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
809
|
+
--hds-accordion-item-content-padding-right: 12px;
|
|
810
|
+
--hds-accordion-item-content-padding-bottom: 12px;
|
|
811
|
+
--hds-accordion-item-content-padding-left: 12px;
|
|
812
|
+
--hds-accordion-item-gap: 12px;
|
|
813
|
+
--hds-accordion-item-icon-size: 20px;
|
|
814
|
+
}
|
|
815
|
+
|
|
816
|
+
.hds-accordion-item--size-large {
|
|
817
|
+
--hds-accordion-item-toggle-padding: 16px;
|
|
818
|
+
--hds-accordion-item-toggle-padding-left: 12px;
|
|
819
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
820
|
+
--hds-accordion-item-content-padding-right: 16px;
|
|
821
|
+
--hds-accordion-item-content-padding-bottom: 16px;
|
|
822
|
+
--hds-accordion-item-content-padding-left: 16px;
|
|
823
|
+
--hds-accordion-item-gap: 12px;
|
|
824
|
+
--hds-accordion-item-icon-size: 24px;
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
.hds-accordion-item--type-card {
|
|
828
|
+
--hds-accordion-item-focus-ring-offset: 0;
|
|
786
829
|
background: var(--token-color-surface-primary);
|
|
787
830
|
border-radius: 6px;
|
|
788
831
|
}
|
|
789
|
-
.hds-accordion-item.hds-accordion-item--does-not-contain-interactive {
|
|
832
|
+
.hds-accordion-item--type-card.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) {
|
|
790
833
|
box-shadow: var(--token-surface-mid-box-shadow);
|
|
791
834
|
}
|
|
792
|
-
.hds-accordion-item.hds-accordion-item--does-not-contain-interactive:hover, .hds-accordion-item.hds-accordion-item--does-not-contain-interactive.mock-hover {
|
|
835
|
+
.hds-accordion-item--type-card.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static):hover, .hds-accordion-item--type-card.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static).mock-hover {
|
|
793
836
|
box-shadow: var(--token-surface-high-box-shadow);
|
|
794
837
|
}
|
|
795
|
-
.hds-accordion-item.hds-accordion-item--contains-interactive {
|
|
838
|
+
.hds-accordion-item--type-card.hds-accordion-item--contains-interactive, .hds-accordion-item--type-card.hds-accordion-item--is-static {
|
|
796
839
|
box-shadow: var(--token-surface-base-box-shadow);
|
|
797
840
|
}
|
|
798
841
|
|
|
842
|
+
.hds-accordion-item--type-flush {
|
|
843
|
+
--hds-accordion-item-focus-ring-offset: 3px;
|
|
844
|
+
border-bottom: 1px solid var(--token-color-border-primary);
|
|
845
|
+
}
|
|
846
|
+
.hds-accordion-item--type-flush.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) > .hds-disclosure-primitive__toggle:hover .hds-accordion-item__toggle, .hds-accordion-item--type-flush.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) > .hds-disclosure-primitive__toggle.mock-hover .hds-accordion-item__toggle {
|
|
847
|
+
background: var(--token-color-surface-interactive-hover);
|
|
848
|
+
}
|
|
849
|
+
.hds-accordion-item--type-flush.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) > .hds-disclosure-primitive__toggle:active .hds-accordion-item__toggle, .hds-accordion-item--type-flush.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) > .hds-disclosure-primitive__toggle.mock-active .hds-accordion-item__toggle {
|
|
850
|
+
background: var(--token-color-surface-interactive-active);
|
|
851
|
+
}
|
|
852
|
+
|
|
799
853
|
.hds-accordion-item__toggle {
|
|
800
854
|
position: relative;
|
|
801
855
|
display: flex;
|
|
802
|
-
gap:
|
|
856
|
+
gap: var(--hds-accordion-item-gap);
|
|
803
857
|
align-items: center;
|
|
804
|
-
padding:
|
|
858
|
+
padding: var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding-left);
|
|
805
859
|
}
|
|
806
860
|
|
|
807
861
|
.hds-accordion-item__button {
|
|
@@ -810,47 +864,53 @@
|
|
|
810
864
|
.hds-accordion-item__button:hover {
|
|
811
865
|
cursor: pointer;
|
|
812
866
|
}
|
|
813
|
-
|
|
867
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
868
|
+
.hds-accordion-item__button .flight-icon {
|
|
869
|
+
transition: transform 0.3s;
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
.hds-accordion-item--is-static.hds-accordion-item .hds-accordion-item__button {
|
|
873
|
+
visibility: hidden;
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive {
|
|
814
877
|
position: relative;
|
|
815
878
|
outline-style: solid;
|
|
816
879
|
outline-color: transparent;
|
|
817
880
|
isolation: isolate;
|
|
818
881
|
position: static;
|
|
882
|
+
display: flex;
|
|
883
|
+
align-items: center;
|
|
884
|
+
justify-content: center;
|
|
819
885
|
margin: -1px 0;
|
|
820
886
|
color: var(--token-color-foreground-primary);
|
|
821
887
|
background: transparent;
|
|
822
|
-
border:
|
|
888
|
+
border: 0;
|
|
823
889
|
}
|
|
824
|
-
.hds-accordion-item__button
|
|
890
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive::before {
|
|
825
891
|
position: absolute;
|
|
826
|
-
top:
|
|
827
|
-
right:
|
|
828
|
-
bottom:
|
|
829
|
-
left:
|
|
892
|
+
top: var(--hds-accordion-item-focus-ring-offset);
|
|
893
|
+
right: var(--hds-accordion-item-focus-ring-offset);
|
|
894
|
+
bottom: var(--hds-accordion-item-focus-ring-offset);
|
|
895
|
+
left: var(--hds-accordion-item-focus-ring-offset);
|
|
830
896
|
z-index: -1;
|
|
831
897
|
border-radius: 5px;
|
|
832
898
|
content: "";
|
|
833
899
|
}
|
|
834
|
-
.hds-accordion-item__button
|
|
900
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive:focus::before, .hds-accordion-item__button--parent-does-not-contain-interactive.mock-focus::before {
|
|
835
901
|
box-shadow: var(--token-focus-ring-action-box-shadow);
|
|
836
902
|
}
|
|
837
|
-
.hds-accordion-item__button
|
|
903
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive:focus:not(:focus-visible)::before {
|
|
838
904
|
box-shadow: none;
|
|
839
905
|
}
|
|
840
|
-
.hds-accordion-item__button
|
|
906
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive:focus-visible::before {
|
|
841
907
|
box-shadow: var(--token-focus-ring-action-box-shadow);
|
|
842
908
|
}
|
|
843
|
-
.hds-accordion-item__button
|
|
909
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive:focus:active::before, .hds-accordion-item__button--parent-does-not-contain-interactive.mock-focus.mock-active::before {
|
|
844
910
|
box-shadow: none;
|
|
845
911
|
}
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
display: block;
|
|
849
|
-
border-radius: 6px;
|
|
850
|
-
content: "";
|
|
851
|
-
inset: 0;
|
|
852
|
-
}
|
|
853
|
-
.hds-accordion-item__button.hds-accordion-item__button--parent-contains-interactive {
|
|
912
|
+
|
|
913
|
+
.hds-accordion-item__button--parent-contains-interactive {
|
|
854
914
|
position: relative;
|
|
855
915
|
display: flex;
|
|
856
916
|
gap: 0.375rem;
|
|
@@ -865,17 +925,15 @@
|
|
|
865
925
|
outline-style: solid;
|
|
866
926
|
outline-color: transparent;
|
|
867
927
|
isolation: isolate;
|
|
868
|
-
width: 24px;
|
|
869
|
-
height: 24px;
|
|
870
928
|
color: var(--token-color-foreground-primary);
|
|
871
929
|
background-color: var(--token-color-surface-faint);
|
|
872
930
|
border-color: var(--token-color-border-strong);
|
|
873
931
|
box-shadow: var(--token-elevation-low-box-shadow);
|
|
874
932
|
}
|
|
875
|
-
.hds-accordion-item__button
|
|
933
|
+
.hds-accordion-item__button--parent-contains-interactive:focus, .hds-accordion-item__button--parent-contains-interactive.mock-focus {
|
|
876
934
|
box-shadow: none;
|
|
877
935
|
}
|
|
878
|
-
.hds-accordion-item__button
|
|
936
|
+
.hds-accordion-item__button--parent-contains-interactive:focus::before, .hds-accordion-item__button--parent-contains-interactive.mock-focus::before {
|
|
879
937
|
position: absolute;
|
|
880
938
|
top: -4px;
|
|
881
939
|
right: -4px;
|
|
@@ -886,44 +944,53 @@
|
|
|
886
944
|
border-radius: 8px;
|
|
887
945
|
content: "";
|
|
888
946
|
}
|
|
889
|
-
.hds-accordion-item__button
|
|
947
|
+
.hds-accordion-item__button--parent-contains-interactive:hover, .hds-accordion-item__button--parent-contains-interactive.mock-hover {
|
|
890
948
|
color: var(--token-color-foreground-primary);
|
|
891
949
|
background-color: var(--token-color-surface-primary);
|
|
892
950
|
border-color: var(--token-color-border-strong);
|
|
893
951
|
cursor: pointer;
|
|
894
952
|
}
|
|
895
|
-
.hds-accordion-item__button
|
|
953
|
+
.hds-accordion-item__button--parent-contains-interactive:focus, .hds-accordion-item__button--parent-contains-interactive.mock-focus {
|
|
896
954
|
color: var(--token-color-foreground-primary);
|
|
897
955
|
background-color: var(--token-color-surface-faint);
|
|
898
956
|
border-color: var(--token-color-focus-action-internal);
|
|
899
957
|
}
|
|
900
|
-
.hds-accordion-item__button
|
|
958
|
+
.hds-accordion-item__button--parent-contains-interactive:focus::before, .hds-accordion-item__button--parent-contains-interactive.mock-focus::before {
|
|
901
959
|
border-color: var(--token-color-focus-action-external);
|
|
902
960
|
}
|
|
903
|
-
.hds-accordion-item__button
|
|
961
|
+
.hds-accordion-item__button--parent-contains-interactive:active, .hds-accordion-item__button--parent-contains-interactive.mock-active {
|
|
904
962
|
color: var(--token-color-foreground-primary);
|
|
905
963
|
background-color: var(--token-color-surface-interactive-active);
|
|
906
964
|
border-color: var(--token-color-border-strong);
|
|
907
965
|
box-shadow: none;
|
|
908
966
|
}
|
|
909
|
-
.hds-accordion-item__button
|
|
967
|
+
.hds-accordion-item__button--parent-contains-interactive:active::before, .hds-accordion-item__button--parent-contains-interactive.mock-active::before {
|
|
910
968
|
border-color: transparent;
|
|
911
969
|
}
|
|
912
|
-
|
|
913
|
-
|
|
970
|
+
|
|
971
|
+
.hds-accordion-item__button {
|
|
972
|
+
width: var(--hds-accordion-item-icon-size);
|
|
973
|
+
height: var(--hds-accordion-item-icon-size);
|
|
914
974
|
}
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
}
|
|
975
|
+
|
|
976
|
+
.hds-accordion-item__button--is-open .flight-icon-chevron-down {
|
|
977
|
+
transform: rotate(-180deg);
|
|
919
978
|
}
|
|
920
979
|
|
|
921
980
|
.hds-accordion-item__toggle-content {
|
|
922
981
|
flex: 1;
|
|
923
982
|
}
|
|
924
983
|
|
|
925
|
-
.hds-accordion-item__content {
|
|
926
|
-
padding:
|
|
984
|
+
.hds-accordion-item .hds-accordion-item__content {
|
|
985
|
+
padding: var(--hds-accordion-item-content-padding-top) var(--hds-accordion-item-content-padding-right) var(--hds-accordion-item-content-padding-bottom) var(--hds-accordion-item-content-padding-left);
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
.hds-accordion-item--type-flush .hds-accordion-item__content:has(> .hds-accordion--type-flush) {
|
|
989
|
+
padding: 0 var(--hds-accordion-item-content-padding-right) 0 var(--hds-accordion-item-content-padding-left);
|
|
990
|
+
border-top: 1px solid var(--token-color-border-primary);
|
|
991
|
+
}
|
|
992
|
+
.hds-accordion-item--type-flush .hds-accordion-item__content:has(> .hds-accordion--type-flush) .hds-accordion-item--type-flush:last-child {
|
|
993
|
+
border-bottom: none;
|
|
927
994
|
}
|
|
928
995
|
|
|
929
996
|
/**
|
|
@@ -5703,9 +5770,6 @@ button.hds-button[href]::after {
|
|
|
5703
5770
|
opacity: 0;
|
|
5704
5771
|
}
|
|
5705
5772
|
}
|
|
5706
|
-
.hds-rich-tooltip__bubble[popover].\:popover-open {
|
|
5707
|
-
opacity: 1;
|
|
5708
|
-
}
|
|
5709
5773
|
@starting-style {
|
|
5710
5774
|
.hds-rich-tooltip__bubble[popover].\:popover-open {
|
|
5711
5775
|
opacity: 0;
|
|
@@ -10,24 +10,66 @@
|
|
|
10
10
|
@use "../mixins/button" as *;
|
|
11
11
|
@use "../mixins/focus-ring" as *;
|
|
12
12
|
|
|
13
|
-
$hds-accordion-item-padding: 16px;
|
|
14
|
-
$hds-accordion-item-border-radius: 6px;
|
|
15
|
-
|
|
16
|
-
// ACCORDION COMPONENT (wrapper)
|
|
17
|
-
|
|
18
13
|
.hds-accordion {
|
|
19
14
|
display: flex;
|
|
20
15
|
flex-direction: column;
|
|
21
|
-
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.hds-accordion--type-card {
|
|
19
|
+
&.hds-accordion--size-small {
|
|
20
|
+
gap: 4px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.hds-accordion--size-medium {
|
|
24
|
+
gap: 8px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.hds-accordion--size-large {
|
|
28
|
+
gap: 12px;
|
|
29
|
+
}
|
|
22
30
|
}
|
|
23
31
|
|
|
24
32
|
// ACCORDION ITEM COMPONENT (nested child)
|
|
25
33
|
|
|
26
|
-
.hds-accordion-item {
|
|
34
|
+
.hds-accordion-item--size-small {
|
|
35
|
+
--hds-accordion-item-toggle-padding: 8px;
|
|
36
|
+
--hds-accordion-item-toggle-padding-left: 8px;
|
|
37
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
38
|
+
--hds-accordion-item-content-padding-right: 8px;
|
|
39
|
+
--hds-accordion-item-content-padding-bottom: 8px;
|
|
40
|
+
--hds-accordion-item-content-padding-left: 12px;
|
|
41
|
+
--hds-accordion-item-gap: 8px;
|
|
42
|
+
--hds-accordion-item-icon-size: 16px;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.hds-accordion-item--size-medium {
|
|
46
|
+
--hds-accordion-item-toggle-padding: 12px;
|
|
47
|
+
--hds-accordion-item-toggle-padding-left: 8px;
|
|
48
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
49
|
+
--hds-accordion-item-content-padding-right: 12px;
|
|
50
|
+
--hds-accordion-item-content-padding-bottom: 12px;
|
|
51
|
+
--hds-accordion-item-content-padding-left: 12px;
|
|
52
|
+
--hds-accordion-item-gap: 12px;
|
|
53
|
+
--hds-accordion-item-icon-size: 20px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.hds-accordion-item--size-large {
|
|
57
|
+
--hds-accordion-item-toggle-padding: 16px;
|
|
58
|
+
--hds-accordion-item-toggle-padding-left: 12px;
|
|
59
|
+
--hds-accordion-item-content-padding-top: 4px;
|
|
60
|
+
--hds-accordion-item-content-padding-right: 16px;
|
|
61
|
+
--hds-accordion-item-content-padding-bottom: 16px;
|
|
62
|
+
--hds-accordion-item-content-padding-left: 16px;
|
|
63
|
+
--hds-accordion-item-gap: 12px;
|
|
64
|
+
--hds-accordion-item-icon-size: 24px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.hds-accordion-item--type-card {
|
|
68
|
+
--hds-accordion-item-focus-ring-offset: 0;
|
|
27
69
|
background: var(--token-color-surface-primary);
|
|
28
|
-
border-radius:
|
|
70
|
+
border-radius: 6px;
|
|
29
71
|
|
|
30
|
-
&.hds-accordion-item--does-not-contain-interactive {
|
|
72
|
+
&.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) {
|
|
31
73
|
box-shadow: var(--token-surface-mid-box-shadow);
|
|
32
74
|
|
|
33
75
|
&:hover,
|
|
@@ -36,23 +78,41 @@ $hds-accordion-item-border-radius: 6px;
|
|
|
36
78
|
}
|
|
37
79
|
}
|
|
38
80
|
|
|
39
|
-
&.hds-accordion-item--contains-interactive
|
|
81
|
+
&.hds-accordion-item--contains-interactive,
|
|
82
|
+
&.hds-accordion-item--is-static {
|
|
40
83
|
box-shadow: var(--token-surface-base-box-shadow);
|
|
41
84
|
}
|
|
42
85
|
}
|
|
43
86
|
|
|
87
|
+
.hds-accordion-item--type-flush {
|
|
88
|
+
--hds-accordion-item-focus-ring-offset: 3px;
|
|
89
|
+
border-bottom: 1px solid var(--token-color-border-primary);
|
|
90
|
+
|
|
91
|
+
&.hds-accordion-item--does-not-contain-interactive:not(.hds-accordion-item--is-static) > .hds-disclosure-primitive__toggle {
|
|
92
|
+
&:hover,
|
|
93
|
+
&.mock-hover {
|
|
94
|
+
.hds-accordion-item__toggle {
|
|
95
|
+
background: var(--token-color-surface-interactive-hover);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:active,
|
|
100
|
+
&.mock-active {
|
|
101
|
+
.hds-accordion-item__toggle {
|
|
102
|
+
background: var(--token-color-surface-interactive-active);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
44
108
|
// TOGGLE BLOCK
|
|
45
109
|
|
|
46
110
|
.hds-accordion-item__toggle {
|
|
47
111
|
position: relative;
|
|
48
112
|
display: flex;
|
|
49
|
-
gap:
|
|
113
|
+
gap: var(--hds-accordion-item-gap);
|
|
50
114
|
align-items: center;
|
|
51
|
-
padding:
|
|
52
|
-
$hds-accordion-item-padding
|
|
53
|
-
$hds-accordion-item-padding
|
|
54
|
-
$hds-accordion-item-padding
|
|
55
|
-
12px; // by design
|
|
115
|
+
padding: var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding) var(--hds-accordion-item-toggle-padding-left);
|
|
56
116
|
}
|
|
57
117
|
|
|
58
118
|
.hds-accordion-item__button {
|
|
@@ -60,51 +120,54 @@ $hds-accordion-item-border-radius: 6px;
|
|
|
60
120
|
|
|
61
121
|
&:hover { cursor: pointer; }
|
|
62
122
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
position: static;
|
|
67
|
-
margin: -1px 0;
|
|
68
|
-
color: var(--token-color-foreground-primary);
|
|
69
|
-
background: transparent;
|
|
70
|
-
border: 1px solid transparent;
|
|
71
|
-
|
|
72
|
-
// expand button target to cover entire AccordionItem Toggle block (depending on the `@containsInteractive/@parentContainsInteractive` argument)
|
|
73
|
-
&::after {
|
|
74
|
-
position: absolute;
|
|
75
|
-
display: block;
|
|
76
|
-
border-radius: $hds-accordion-item-border-radius;
|
|
77
|
-
content: "";
|
|
78
|
-
inset: 0;
|
|
123
|
+
.flight-icon {
|
|
124
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
125
|
+
transition: transform 0.3s;
|
|
79
126
|
}
|
|
80
127
|
}
|
|
81
128
|
|
|
82
|
-
//
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
129
|
+
// we hide it instead of not rendering it at all, to preserve the visual layout of the item, without requiring special CSS workarounds to compensate for the missing element
|
|
130
|
+
.hds-accordion-item--is-static.hds-accordion-item & {
|
|
131
|
+
visibility: hidden;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
87
134
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}
|
|
135
|
+
// entire toggle area is interactive
|
|
136
|
+
.hds-accordion-item__button--parent-does-not-contain-interactive {
|
|
137
|
+
@include hds-focus-ring-with-pseudo-element($top: var(--hds-accordion-item-focus-ring-offset), $right: var(--hds-accordion-item-focus-ring-offset), $bottom: var(--hds-accordion-item-focus-ring-offset), $left: var(--hds-accordion-item-focus-ring-offset));
|
|
92
138
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
139
|
+
position: static;
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
margin: -1px 0;
|
|
144
|
+
color: var(--token-color-foreground-primary);
|
|
145
|
+
background: transparent;
|
|
146
|
+
border: 0;
|
|
147
|
+
}
|
|
96
148
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
149
|
+
// only chevron button area is interactive
|
|
150
|
+
.hds-accordion-item__button--parent-contains-interactive {
|
|
151
|
+
@include hds-button();
|
|
152
|
+
|
|
153
|
+
&:focus,
|
|
154
|
+
&.mock-focus {
|
|
155
|
+
@include hds-button-state-focus();
|
|
102
156
|
}
|
|
103
157
|
|
|
158
|
+
// `hds-button-color-secondary` determines the focus color and needs to be placed after `hds-button-state-focus`
|
|
159
|
+
@include hds-button-color-secondary();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.hds-accordion-item__button {
|
|
163
|
+
width: var(--hds-accordion-item-icon-size);
|
|
164
|
+
height: var(--hds-accordion-item-icon-size);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
// animate chevron icon
|
|
168
|
+
.hds-accordion-item__button--is-open {
|
|
104
169
|
.flight-icon-chevron-down {
|
|
105
|
-
|
|
106
|
-
transition: transform 0.3s;
|
|
107
|
-
}
|
|
170
|
+
transform: rotate(-180deg);
|
|
108
171
|
}
|
|
109
172
|
}
|
|
110
173
|
|
|
@@ -116,5 +179,20 @@ $hds-accordion-item-border-radius: 6px;
|
|
|
116
179
|
// CONTENT BLOCK
|
|
117
180
|
|
|
118
181
|
.hds-accordion-item__content {
|
|
119
|
-
|
|
182
|
+
.hds-accordion-item & {
|
|
183
|
+
padding: var(--hds-accordion-item-content-padding-top) var(--hds-accordion-item-content-padding-right) var(--hds-accordion-item-content-padding-bottom) var(--hds-accordion-item-content-padding-left);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
// Adjust content padding and border for nested flush accordions
|
|
188
|
+
|
|
189
|
+
.hds-accordion-item--type-flush .hds-accordion-item__content:has(> .hds-accordion--type-flush) {
|
|
190
|
+
padding: 0 var(--hds-accordion-item-content-padding-right) 0 var(--hds-accordion-item-content-padding-left);
|
|
191
|
+
border-top: 1px solid var(--token-color-border-primary);
|
|
192
|
+
|
|
193
|
+
.hds-accordion-item--type-flush {
|
|
194
|
+
&:last-child {
|
|
195
|
+
border-bottom: none;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
120
198
|
}
|
|
@@ -231,11 +231,6 @@
|
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
// polyfilled `:popover-open` selector
|
|
235
|
-
// see: https://github.com/oddbird/popover-polyfill?tab=readme-ov-file#caveats
|
|
236
|
-
&[popover].\:popover-open {
|
|
237
|
-
opacity: 1;
|
|
238
|
-
}
|
|
239
234
|
|
|
240
235
|
@starting-style {
|
|
241
236
|
&[popover].\:popover-open {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -39,8 +39,7 @@
|
|
|
39
39
|
"@embroider/addon-shim": "^1.8.7",
|
|
40
40
|
"@floating-ui/dom": "^1.6.3",
|
|
41
41
|
"@hashicorp/design-system-tokens": "^2.1.0",
|
|
42
|
-
"@hashicorp/ember-flight-icons": "^5.1.
|
|
43
|
-
"@oddbird/popover-polyfill": "^0.4.3",
|
|
42
|
+
"@hashicorp/ember-flight-icons": "^5.1.2",
|
|
44
43
|
"decorator-transforms": "^1.1.0",
|
|
45
44
|
"ember-a11y-refocus": "^4.1.0",
|
|
46
45
|
"ember-cli-sass": "^11.0.1",
|
|
@@ -84,16 +83,16 @@
|
|
|
84
83
|
"concurrently": "^8.2.2",
|
|
85
84
|
"ember-basic-dropdown": "^8.1.0",
|
|
86
85
|
"ember-concurrency": "^4.0.2",
|
|
87
|
-
"ember-template-lint": "^
|
|
88
|
-
"ember-template-lint-plugin-prettier": "^
|
|
86
|
+
"ember-template-lint": "^6.0.0",
|
|
87
|
+
"ember-template-lint-plugin-prettier": "^5.0.0",
|
|
89
88
|
"eslint": "^8.57.0",
|
|
90
89
|
"eslint-config-prettier": "^9.1.0",
|
|
91
90
|
"eslint-plugin-ember": "^11.12.0",
|
|
92
91
|
"eslint-plugin-import": "^2.29.1",
|
|
93
92
|
"eslint-plugin-n": "^17.7.0",
|
|
94
|
-
"eslint-plugin-prettier": "^
|
|
93
|
+
"eslint-plugin-prettier": "^5.1.3",
|
|
95
94
|
"eslint-plugin-qunit": "^8.1.1",
|
|
96
|
-
"prettier": "^
|
|
95
|
+
"prettier": "^3.3.2",
|
|
97
96
|
"rollup": "^4.17.2",
|
|
98
97
|
"rollup-plugin-copy": "^3.5.0",
|
|
99
98
|
"rollup-plugin-scss": "^4.0.0",
|