@hashicorp/design-system-components 4.2.0 → 4.4.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 +20 -0
- package/declarations/components/hds/accordion/index.d.ts.map +1 -0
- package/declarations/components/hds/accordion/item/button.d.ts +26 -0
- package/declarations/components/hds/accordion/item/button.d.ts.map +1 -0
- package/declarations/components/hds/accordion/item/index.d.ts +44 -0
- package/declarations/components/hds/accordion/item/index.d.ts.map +1 -0
- package/declarations/components/hds/alert/description.d.ts +14 -0
- package/declarations/components/hds/alert/description.d.ts.map +1 -0
- package/declarations/components/hds/alert/index.d.ts +82 -0
- package/declarations/components/hds/alert/index.d.ts.map +1 -0
- package/declarations/components/hds/alert/title.d.ts +14 -0
- package/declarations/components/hds/alert/title.d.ts.map +1 -0
- package/declarations/components/hds/alert/types.d.ts +19 -0
- package/declarations/components/hds/alert/types.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/copyright.d.ts +21 -0
- package/declarations/components/hds/app-footer/copyright.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/index.d.ts +54 -0
- package/declarations/components/hds/app-footer/index.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/item.d.ts +14 -0
- package/declarations/components/hds/app-footer/item.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/legal-links.d.ts +55 -0
- package/declarations/components/hds/app-footer/legal-links.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/link.d.ts +22 -0
- package/declarations/components/hds/app-footer/link.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/status-link.d.ts +63 -0
- package/declarations/components/hds/app-footer/status-link.d.ts.map +1 -0
- package/declarations/components/hds/app-footer/types.d.ts +21 -0
- package/declarations/components/hds/app-footer/types.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/index.d.ts +67 -0
- package/declarations/components/hds/app-frame/index.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/parts/footer.d.ts +14 -0
- package/declarations/components/hds/app-frame/parts/footer.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/parts/header.d.ts +14 -0
- package/declarations/components/hds/app-frame/parts/header.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/parts/main.d.ts +14 -0
- package/declarations/components/hds/app-frame/parts/main.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/parts/modals.d.ts +14 -0
- package/declarations/components/hds/app-frame/parts/modals.d.ts.map +1 -0
- package/declarations/components/hds/app-frame/parts/sidebar.d.ts +14 -0
- package/declarations/components/hds/app-frame/parts/sidebar.d.ts.map +1 -0
- package/declarations/components/hds/application-state/body.d.ts +2 -0
- package/declarations/components/hds/application-state/body.d.ts.map +1 -0
- package/declarations/components/hds/application-state/footer.d.ts +19 -0
- package/declarations/components/hds/application-state/footer.d.ts.map +1 -0
- package/declarations/components/hds/application-state/header.d.ts +2 -0
- package/declarations/components/hds/application-state/header.d.ts.map +1 -0
- package/declarations/components/hds/application-state/index.d.ts +2 -0
- package/declarations/components/hds/application-state/index.d.ts.map +1 -0
- package/declarations/components/hds/badge/index.d.ts +81 -0
- package/declarations/components/hds/badge/index.d.ts.map +1 -0
- package/declarations/components/hds/badge/types.d.ts +26 -0
- package/declarations/components/hds/badge/types.d.ts.map +1 -0
- package/declarations/components/hds/badge-count/index.d.ts +59 -0
- package/declarations/components/hds/badge-count/index.d.ts.map +1 -0
- package/declarations/components/hds/badge-count/types.d.ts +22 -0
- package/declarations/components/hds/badge-count/types.d.ts.map +1 -0
- package/declarations/components/hds/breadcrumb/index.d.ts +29 -0
- package/declarations/components/hds/breadcrumb/index.d.ts.map +1 -0
- package/declarations/components/hds/breadcrumb/item.d.ts +24 -0
- package/declarations/components/hds/breadcrumb/item.d.ts.map +1 -0
- package/declarations/components/hds/breadcrumb/truncation.d.ts +11 -0
- package/declarations/components/hds/breadcrumb/truncation.d.ts.map +1 -0
- package/declarations/components/hds/button/index.d.ts +92 -0
- package/declarations/components/hds/button/index.d.ts.map +1 -0
- package/declarations/components/hds/button-set/index.d.ts +14 -0
- package/declarations/components/hds/button-set/index.d.ts.map +1 -0
- package/declarations/components/hds/card/container.d.ts +79 -0
- package/declarations/components/hds/card/container.d.ts.map +1 -0
- package/declarations/components/hds/card/types.d.ts +21 -0
- package/declarations/components/hds/card/types.d.ts.map +1 -0
- package/declarations/components/hds/code-block/copy-button.d.ts +2 -0
- package/declarations/components/hds/code-block/copy-button.d.ts.map +1 -0
- package/declarations/components/hds/code-block/description.d.ts +2 -0
- package/declarations/components/hds/code-block/description.d.ts.map +1 -0
- package/declarations/components/hds/code-block/index.d.ts +53 -0
- package/declarations/components/hds/code-block/index.d.ts.map +1 -0
- package/declarations/components/hds/code-block/title.d.ts +2 -0
- package/declarations/components/hds/code-block/title.d.ts.map +1 -0
- package/declarations/components/hds/copy/button/index.d.ts +52 -0
- package/declarations/components/hds/copy/button/index.d.ts.map +1 -0
- package/declarations/components/hds/copy/button/types.d.ts +10 -0
- package/declarations/components/hds/copy/button/types.d.ts.map +1 -0
- package/declarations/components/hds/copy/snippet/index.d.ts +73 -0
- package/declarations/components/hds/copy/snippet/index.d.ts.map +1 -0
- package/declarations/components/hds/copy/snippet/types.d.ts +10 -0
- package/declarations/components/hds/copy/snippet/types.d.ts.map +1 -0
- package/declarations/components/hds/disclosure-primitive/index.d.ts +31 -0
- package/declarations/components/hds/disclosure-primitive/index.d.ts.map +1 -0
- package/declarations/components/hds/dismiss-button/index.d.ts +20 -0
- package/declarations/components/hds/dismiss-button/index.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/footer.d.ts +2 -0
- package/declarations/components/hds/dropdown/footer.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/header.d.ts +2 -0
- package/declarations/components/hds/dropdown/header.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/index.d.ts +27 -0
- package/declarations/components/hds/dropdown/index.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/checkbox.d.ts +9 -0
- package/declarations/components/hds/dropdown/list-item/checkbox.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/checkmark.d.ts +11 -0
- package/declarations/components/hds/dropdown/list-item/checkmark.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/copy-item.d.ts +24 -0
- package/declarations/components/hds/dropdown/list-item/copy-item.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/description.d.ts +11 -0
- package/declarations/components/hds/dropdown/list-item/description.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/generic.d.ts +2 -0
- package/declarations/components/hds/dropdown/list-item/generic.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/interactive.d.ts +26 -0
- package/declarations/components/hds/dropdown/list-item/interactive.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/radio.d.ts +9 -0
- package/declarations/components/hds/dropdown/list-item/radio.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/separator.d.ts +2 -0
- package/declarations/components/hds/dropdown/list-item/separator.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/title.d.ts +11 -0
- package/declarations/components/hds/dropdown/list-item/title.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/toggle/button.d.ts +61 -0
- package/declarations/components/hds/dropdown/toggle/button.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/toggle/chevron.d.ts +2 -0
- package/declarations/components/hds/dropdown/toggle/chevron.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/toggle/icon.d.ts +50 -0
- package/declarations/components/hds/dropdown/toggle/icon.d.ts.map +1 -0
- package/declarations/components/hds/flyout/body.d.ts +2 -0
- package/declarations/components/hds/flyout/body.d.ts.map +1 -0
- package/declarations/components/hds/flyout/description.d.ts +2 -0
- package/declarations/components/hds/flyout/description.d.ts.map +1 -0
- package/declarations/components/hds/flyout/footer.d.ts +2 -0
- package/declarations/components/hds/flyout/footer.d.ts.map +1 -0
- package/declarations/components/hds/flyout/header.d.ts +2 -0
- package/declarations/components/hds/flyout/header.d.ts.map +1 -0
- package/declarations/components/hds/flyout/index.d.ts +35 -0
- package/declarations/components/hds/flyout/index.d.ts.map +1 -0
- package/declarations/components/hds/form/character-count/index.d.ts +60 -0
- package/declarations/components/hds/form/character-count/index.d.ts.map +1 -0
- package/declarations/components/hds/form/checkbox/base.d.ts +2 -0
- package/declarations/components/hds/form/checkbox/base.d.ts.map +1 -0
- package/declarations/components/hds/form/checkbox/field.d.ts +2 -0
- package/declarations/components/hds/form/checkbox/field.d.ts.map +1 -0
- package/declarations/components/hds/form/checkbox/group.d.ts +2 -0
- package/declarations/components/hds/form/checkbox/group.d.ts.map +1 -0
- package/declarations/components/hds/form/error/index.d.ts +24 -0
- package/declarations/components/hds/form/error/index.d.ts.map +1 -0
- package/declarations/components/hds/form/error/message.d.ts +2 -0
- package/declarations/components/hds/form/error/message.d.ts.map +1 -0
- package/declarations/components/hds/form/field/index.d.ts +39 -0
- package/declarations/components/hds/form/field/index.d.ts.map +1 -0
- package/declarations/components/hds/form/fieldset/index.d.ts +39 -0
- package/declarations/components/hds/form/fieldset/index.d.ts.map +1 -0
- package/declarations/components/hds/form/file-input/base.d.ts +2 -0
- package/declarations/components/hds/form/file-input/base.d.ts.map +1 -0
- package/declarations/components/hds/form/file-input/field.d.ts +2 -0
- package/declarations/components/hds/form/file-input/field.d.ts.map +1 -0
- package/declarations/components/hds/form/helper-text/index.d.ts +24 -0
- package/declarations/components/hds/form/helper-text/index.d.ts.map +1 -0
- package/declarations/components/hds/form/indicator/index.d.ts +11 -0
- package/declarations/components/hds/form/indicator/index.d.ts.map +1 -0
- package/declarations/components/hds/form/label/index.d.ts +18 -0
- package/declarations/components/hds/form/label/index.d.ts.map +1 -0
- package/declarations/components/hds/form/legend/index.d.ts +11 -0
- package/declarations/components/hds/form/legend/index.d.ts.map +1 -0
- package/declarations/components/hds/form/masked-input/base.d.ts +35 -0
- package/declarations/components/hds/form/masked-input/base.d.ts.map +1 -0
- package/declarations/components/hds/form/masked-input/field.d.ts +2 -0
- package/declarations/components/hds/form/masked-input/field.d.ts.map +1 -0
- package/declarations/components/hds/form/radio/base.d.ts +2 -0
- package/declarations/components/hds/form/radio/base.d.ts.map +1 -0
- package/declarations/components/hds/form/radio/field.d.ts +2 -0
- package/declarations/components/hds/form/radio/field.d.ts.map +1 -0
- package/declarations/components/hds/form/radio/group.d.ts +2 -0
- package/declarations/components/hds/form/radio/group.d.ts.map +1 -0
- package/declarations/components/hds/form/radio-card/description.d.ts +2 -0
- package/declarations/components/hds/form/radio-card/description.d.ts.map +1 -0
- package/declarations/components/hds/form/radio-card/group.d.ts +2 -0
- package/declarations/components/hds/form/radio-card/group.d.ts.map +1 -0
- package/declarations/components/hds/form/radio-card/index.d.ts +36 -0
- package/declarations/components/hds/form/radio-card/index.d.ts.map +1 -0
- package/declarations/components/hds/form/radio-card/label.d.ts +2 -0
- package/declarations/components/hds/form/radio-card/label.d.ts.map +1 -0
- package/declarations/components/hds/form/select/base.d.ts +11 -0
- package/declarations/components/hds/form/select/base.d.ts.map +1 -0
- package/declarations/components/hds/form/select/field.d.ts +2 -0
- package/declarations/components/hds/form/select/field.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/after-options.d.ts +2 -0
- package/declarations/components/hds/form/super-select/after-options.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/multiple/base.d.ts +52 -0
- package/declarations/components/hds/form/super-select/multiple/base.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/multiple/field.d.ts +5 -0
- package/declarations/components/hds/form/super-select/multiple/field.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/option-group.d.ts +10 -0
- package/declarations/components/hds/form/super-select/option-group.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/placeholder.d.ts +2 -0
- package/declarations/components/hds/form/super-select/placeholder.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/single/base.d.ts +32 -0
- package/declarations/components/hds/form/super-select/single/base.d.ts.map +1 -0
- package/declarations/components/hds/form/super-select/single/field.d.ts +5 -0
- package/declarations/components/hds/form/super-select/single/field.d.ts.map +1 -0
- package/declarations/components/hds/form/text-input/base.d.ts +21 -0
- package/declarations/components/hds/form/text-input/base.d.ts.map +1 -0
- package/declarations/components/hds/form/text-input/field.d.ts +27 -0
- package/declarations/components/hds/form/text-input/field.d.ts.map +1 -0
- package/declarations/components/hds/form/textarea/base.d.ts +11 -0
- package/declarations/components/hds/form/textarea/base.d.ts.map +1 -0
- package/declarations/components/hds/form/textarea/field.d.ts +2 -0
- package/declarations/components/hds/form/textarea/field.d.ts.map +1 -0
- package/declarations/components/hds/form/toggle/base.d.ts +2 -0
- package/declarations/components/hds/form/toggle/base.d.ts.map +1 -0
- package/declarations/components/hds/form/toggle/field.d.ts +2 -0
- package/declarations/components/hds/form/toggle/field.d.ts.map +1 -0
- package/declarations/components/hds/form/toggle/group.d.ts +2 -0
- package/declarations/components/hds/form/toggle/group.d.ts.map +1 -0
- package/declarations/components/hds/form/visibility-toggle/index.d.ts +2 -0
- package/declarations/components/hds/form/visibility-toggle/index.d.ts.map +1 -0
- package/declarations/components/hds/icon-tile/index.d.ts +85 -0
- package/declarations/components/hds/icon-tile/index.d.ts.map +1 -0
- package/declarations/components/hds/icon-tile/types.d.ts +29 -0
- package/declarations/components/hds/icon-tile/types.d.ts.map +1 -0
- package/declarations/components/hds/interactive/index.d.ts +42 -0
- package/declarations/components/hds/interactive/index.d.ts.map +1 -0
- package/declarations/components/hds/link/inline.d.ts +47 -0
- package/declarations/components/hds/link/inline.d.ts.map +1 -0
- package/declarations/components/hds/link/standalone.d.ts +75 -0
- package/declarations/components/hds/link/standalone.d.ts.map +1 -0
- package/declarations/components/hds/link/types.d.ts +21 -0
- package/declarations/components/hds/link/types.d.ts.map +1 -0
- package/declarations/components/hds/menu-primitive/index.d.ts +12 -0
- package/declarations/components/hds/menu-primitive/index.d.ts.map +1 -0
- package/declarations/components/hds/modal/body.d.ts +2 -0
- package/declarations/components/hds/modal/body.d.ts.map +1 -0
- package/declarations/components/hds/modal/footer.d.ts +2 -0
- package/declarations/components/hds/modal/footer.d.ts.map +1 -0
- package/declarations/components/hds/modal/header.d.ts +2 -0
- package/declarations/components/hds/modal/header.d.ts.map +1 -0
- package/declarations/components/hds/modal/index.d.ts +46 -0
- package/declarations/components/hds/modal/index.d.ts.map +1 -0
- package/declarations/components/hds/page-header/actions.d.ts +2 -0
- package/declarations/components/hds/page-header/actions.d.ts.map +1 -0
- package/declarations/components/hds/page-header/badges.d.ts +2 -0
- package/declarations/components/hds/page-header/badges.d.ts.map +1 -0
- package/declarations/components/hds/page-header/description.d.ts +2 -0
- package/declarations/components/hds/page-header/description.d.ts.map +1 -0
- package/declarations/components/hds/page-header/index.d.ts +2 -0
- package/declarations/components/hds/page-header/index.d.ts.map +1 -0
- package/declarations/components/hds/page-header/subtitle.d.ts +2 -0
- package/declarations/components/hds/page-header/subtitle.d.ts.map +1 -0
- package/declarations/components/hds/page-header/title.d.ts +2 -0
- package/declarations/components/hds/page-header/title.d.ts.map +1 -0
- package/declarations/components/hds/pagination/compact/index.d.ts +35 -0
- package/declarations/components/hds/pagination/compact/index.d.ts.map +1 -0
- package/declarations/components/hds/pagination/info/index.d.ts +11 -0
- package/declarations/components/hds/pagination/info/index.d.ts.map +1 -0
- package/declarations/components/hds/pagination/nav/arrow.d.ts +25 -0
- package/declarations/components/hds/pagination/nav/arrow.d.ts.map +1 -0
- package/declarations/components/hds/pagination/nav/ellipsis.d.ts +2 -0
- package/declarations/components/hds/pagination/nav/ellipsis.d.ts.map +1 -0
- package/declarations/components/hds/pagination/nav/number.d.ts +13 -0
- package/declarations/components/hds/pagination/nav/number.d.ts.map +1 -0
- package/declarations/components/hds/pagination/numbered/index.d.ts +51 -0
- package/declarations/components/hds/pagination/numbered/index.d.ts.map +1 -0
- package/declarations/components/hds/pagination/size-selector/index.d.ts +31 -0
- package/declarations/components/hds/pagination/size-selector/index.d.ts.map +1 -0
- package/declarations/components/hds/popover-primitive/index.d.ts +44 -0
- package/declarations/components/hds/popover-primitive/index.d.ts.map +1 -0
- package/declarations/components/hds/reveal/index.d.ts +34 -0
- package/declarations/components/hds/reveal/index.d.ts.map +1 -0
- package/declarations/components/hds/reveal/toggle/button.d.ts +22 -0
- package/declarations/components/hds/reveal/toggle/button.d.ts.map +1 -0
- package/declarations/components/hds/rich-tooltip/bubble.d.ts +27 -0
- package/declarations/components/hds/rich-tooltip/bubble.d.ts.map +1 -0
- package/declarations/components/hds/rich-tooltip/index.d.ts +10 -0
- package/declarations/components/hds/rich-tooltip/index.d.ts.map +1 -0
- package/declarations/components/hds/rich-tooltip/toggle.d.ts +34 -0
- package/declarations/components/hds/rich-tooltip/toggle.d.ts.map +1 -0
- package/declarations/components/hds/segmented-group/index.d.ts +2 -0
- package/declarations/components/hds/segmented-group/index.d.ts.map +1 -0
- package/declarations/components/hds/separator/index.d.ts +34 -0
- package/declarations/components/hds/separator/index.d.ts.map +1 -0
- package/declarations/components/hds/separator/types.d.ts +10 -0
- package/declarations/components/hds/separator/types.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/base.d.ts +2 -0
- package/declarations/components/hds/side-nav/base.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/header/home-link.d.ts +11 -0
- package/declarations/components/hds/side-nav/header/home-link.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/header/icon-button.d.ts +11 -0
- package/declarations/components/hds/side-nav/header/icon-button.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/header/index.d.ts +2 -0
- package/declarations/components/hds/side-nav/header/index.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/index.d.ts +30 -0
- package/declarations/components/hds/side-nav/index.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/list/back-link.d.ts +2 -0
- package/declarations/components/hds/side-nav/list/back-link.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/list/index.d.ts +2 -0
- package/declarations/components/hds/side-nav/list/index.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/list/item.d.ts +2 -0
- package/declarations/components/hds/side-nav/list/item.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/list/link.d.ts +2 -0
- package/declarations/components/hds/side-nav/list/link.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/list/title.d.ts +2 -0
- package/declarations/components/hds/side-nav/list/title.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/portal/index.d.ts +2 -0
- package/declarations/components/hds/side-nav/portal/index.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/portal/target.d.ts +14 -0
- package/declarations/components/hds/side-nav/portal/target.d.ts.map +1 -0
- package/declarations/components/hds/side-nav/toggle-button.d.ts +2 -0
- package/declarations/components/hds/side-nav/toggle-button.d.ts.map +1 -0
- package/declarations/components/hds/stepper/step/indicator.d.ts +39 -0
- package/declarations/components/hds/stepper/step/indicator.d.ts.map +1 -0
- package/declarations/components/hds/stepper/task/indicator.d.ts +44 -0
- package/declarations/components/hds/stepper/task/indicator.d.ts.map +1 -0
- package/declarations/components/hds/stepper/types.d.ts +13 -0
- package/declarations/components/hds/stepper/types.d.ts.map +1 -0
- package/declarations/components/hds/table/index.d.ts +76 -0
- package/declarations/components/hds/table/index.d.ts.map +1 -0
- package/declarations/components/hds/table/td.d.ts +18 -0
- package/declarations/components/hds/table/td.d.ts.map +1 -0
- package/declarations/components/hds/table/th-button-sort.d.ts +38 -0
- package/declarations/components/hds/table/th-button-sort.d.ts.map +1 -0
- package/declarations/components/hds/table/th-button-tooltip.d.ts +17 -0
- package/declarations/components/hds/table/th-button-tooltip.d.ts.map +1 -0
- package/declarations/components/hds/table/th-selectable.d.ts +16 -0
- package/declarations/components/hds/table/th-selectable.d.ts.map +1 -0
- package/declarations/components/hds/table/th-sort.d.ts +32 -0
- package/declarations/components/hds/table/th-sort.d.ts.map +1 -0
- package/declarations/components/hds/table/th.d.ts +24 -0
- package/declarations/components/hds/table/th.d.ts.map +1 -0
- package/declarations/components/hds/table/tr.d.ts +11 -0
- package/declarations/components/hds/table/tr.d.ts.map +1 -0
- package/declarations/components/hds/tabs/index.d.ts +45 -0
- package/declarations/components/hds/tabs/index.d.ts.map +1 -0
- package/declarations/components/hds/tabs/panel.d.ts +24 -0
- package/declarations/components/hds/tabs/panel.d.ts.map +1 -0
- package/declarations/components/hds/tabs/tab.d.ts +28 -0
- package/declarations/components/hds/tabs/tab.d.ts.map +1 -0
- package/declarations/components/hds/tag/index.d.ts +54 -0
- package/declarations/components/hds/tag/index.d.ts.map +1 -0
- package/declarations/components/hds/tag/types.d.ts +10 -0
- package/declarations/components/hds/tag/types.d.ts.map +1 -0
- package/declarations/components/hds/text/body.d.ts +50 -0
- package/declarations/components/hds/text/body.d.ts.map +1 -0
- package/declarations/components/hds/text/code.d.ts +50 -0
- package/declarations/components/hds/text/code.d.ts.map +1 -0
- package/declarations/components/hds/text/display.d.ts +46 -0
- package/declarations/components/hds/text/display.d.ts.map +1 -0
- package/declarations/components/hds/text/index.d.ts +72 -0
- package/declarations/components/hds/text/index.d.ts.map +1 -0
- package/declarations/components/hds/text/types.d.ts +59 -0
- package/declarations/components/hds/text/types.d.ts.map +1 -0
- package/declarations/components/hds/toast/index.d.ts +12 -0
- package/declarations/components/hds/toast/index.d.ts.map +1 -0
- package/declarations/components/hds/tooltip-button/index.d.ts +26 -0
- package/declarations/components/hds/tooltip-button/index.d.ts.map +1 -0
- package/declarations/components/hds/yield/index.d.ts +13 -0
- package/declarations/components/hds/yield/index.d.ts.map +1 -0
- package/declarations/components.d.ts +29 -0
- package/declarations/components.d.ts.map +1 -0
- package/declarations/helpers/hds-link-to-models.d.ts +11 -0
- package/declarations/helpers/hds-link-to-models.d.ts.map +1 -0
- package/declarations/helpers/hds-link-to-query.d.ts +8 -0
- package/declarations/helpers/hds-link-to-query.d.ts.map +1 -0
- package/declarations/helpers.d.ts +1 -0
- package/declarations/helpers.d.ts.map +1 -0
- package/declarations/modifiers/hds-anchored-position.d.ts +16 -0
- package/declarations/modifiers/hds-anchored-position.d.ts.map +1 -0
- package/declarations/modifiers/hds-clipboard.d.ts +36 -0
- package/declarations/modifiers/hds-clipboard.d.ts.map +1 -0
- package/declarations/modifiers/hds-register-event.d.ts +9 -0
- package/declarations/modifiers/hds-register-event.d.ts.map +1 -0
- package/declarations/modifiers/hds-tooltip.d.ts +34 -0
- package/declarations/modifiers/hds-tooltip.d.ts.map +1 -0
- package/declarations/modifiers.d.ts +1 -0
- package/declarations/modifiers.d.ts.map +1 -0
- package/declarations/template-registry.d.ts +142 -0
- package/declarations/template-registry.d.ts.map +1 -0
- package/declarations/utils/hds-get-element-id.d.ts +2 -0
- package/declarations/utils/hds-get-element-id.d.ts.map +1 -0
- package/declarations/utils/hds-set-aria-described-by.d.ts +6 -0
- package/declarations/utils/hds-set-aria-described-by.d.ts.map +1 -0
- package/dist/_app_/components/hds/form/super-select/after-options.js +1 -0
- package/dist/_app_/components/hds/form/super-select/multiple/base.js +1 -0
- package/dist/_app_/components/hds/form/super-select/multiple/field.js +1 -0
- package/dist/_app_/components/hds/form/super-select/option-group.js +1 -0
- package/dist/_app_/components/hds/form/super-select/placeholder.js +1 -0
- package/dist/_app_/components/hds/form/super-select/single/base.js +1 -0
- package/dist/_app_/components/hds/form/super-select/single/field.js +1 -0
- package/dist/_app_/components/hds/{interactive/types.js → popover-primitive/index.js} +1 -1
- package/dist/_app_/components/hds/{alert/types.js → rich-tooltip/bubble.js} +1 -1
- package/dist/_app_/components/hds/{link/types.js → rich-tooltip/index.js} +1 -1
- package/dist/_app_/components/hds/{card/types.js → rich-tooltip/toggle.js} +1 -1
- package/dist/_app_/modifiers/hds-anchored-position.js +1 -0
- package/dist/_app_/modifiers/hds-register-event.js +1 -0
- package/dist/{_rollupPluginBabelHelpers-lqPQKyNs.js → _rollupPluginBabelHelpers-NoJJJNhk.js} +7 -9
- package/dist/{_rollupPluginBabelHelpers-lqPQKyNs.js.map → _rollupPluginBabelHelpers-NoJJJNhk.js.map} +1 -1
- package/dist/components/hds/accordion/index.js +8 -2
- package/dist/components/hds/accordion/index.js.map +1 -1
- package/dist/components/hds/accordion/item/button.js +12 -8
- package/dist/components/hds/accordion/item/button.js.map +1 -1
- package/dist/components/hds/accordion/item/index.js +6 -6
- package/dist/components/hds/accordion/item/index.js.map +1 -1
- package/dist/components/hds/alert/description.js +9 -4
- package/dist/components/hds/alert/description.js.map +1 -1
- package/dist/components/hds/alert/index.js +4 -6
- package/dist/components/hds/alert/index.js.map +1 -1
- package/dist/components/hds/alert/title.js +9 -4
- package/dist/components/hds/alert/title.js.map +1 -1
- package/dist/components/hds/alert/types.js +5 -0
- package/dist/components/hds/alert/types.js.map +1 -1
- package/dist/components/hds/app-footer/copyright.js +1 -1
- package/dist/components/hds/app-footer/copyright.js.map +1 -1
- package/dist/components/hds/app-footer/index.js +6 -6
- package/dist/components/hds/app-footer/index.js.map +1 -1
- package/dist/components/hds/app-footer/item.js +10 -4
- package/dist/components/hds/app-footer/item.js.map +1 -1
- package/dist/components/hds/app-footer/legal-links.js +1 -1
- package/dist/components/hds/app-footer/legal-links.js.map +1 -1
- package/dist/components/hds/app-footer/link.js +10 -4
- package/dist/components/hds/app-footer/link.js.map +1 -1
- package/dist/components/hds/app-footer/status-link.js +12 -27
- package/dist/components/hds/app-footer/status-link.js.map +1 -1
- package/dist/components/hds/app-footer/types.js +38 -0
- package/dist/components/hds/app-footer/types.js.map +1 -0
- package/dist/components/hds/app-frame/index.js +4 -4
- package/dist/components/hds/app-frame/index.js.map +1 -1
- package/dist/components/hds/app-frame/parts/footer.js +10 -4
- package/dist/components/hds/app-frame/parts/footer.js.map +1 -1
- package/dist/components/hds/app-frame/parts/header.js +10 -4
- package/dist/components/hds/app-frame/parts/header.js.map +1 -1
- package/dist/components/hds/app-frame/parts/main.js +10 -4
- package/dist/components/hds/app-frame/parts/main.js.map +1 -1
- package/dist/components/hds/app-frame/parts/modals.js +10 -4
- package/dist/components/hds/app-frame/parts/modals.js.map +1 -1
- package/dist/components/hds/app-frame/parts/sidebar.js +10 -4
- package/dist/components/hds/app-frame/parts/sidebar.js.map +1 -1
- package/dist/components/hds/badge/index.js +19 -18
- package/dist/components/hds/badge/index.js.map +1 -1
- package/dist/components/hds/badge/types.js +29 -0
- package/dist/components/hds/badge/types.js.map +1 -0
- package/dist/components/hds/badge-count/index.js +15 -14
- package/dist/components/hds/badge-count/index.js.map +1 -1
- package/dist/components/hds/badge-count/types.js +25 -0
- package/dist/components/hds/badge-count/types.js.map +1 -0
- package/dist/components/hds/button/index.js +3 -3
- package/dist/components/hds/button/index.js.map +1 -1
- package/dist/components/hds/button-set/index.js +8 -2
- package/dist/components/hds/button-set/index.js.map +1 -1
- package/dist/components/hds/card/container.js.map +1 -1
- package/dist/components/hds/card/types.js +5 -0
- package/dist/components/hds/card/types.js.map +1 -1
- package/dist/components/hds/code-block/index.js +1 -1
- package/dist/components/hds/code-block/index.js.map +1 -1
- package/dist/components/hds/copy/button/index.js +9 -8
- package/dist/components/hds/copy/button/index.js.map +1 -1
- package/dist/components/hds/copy/button/types.js +13 -0
- package/dist/components/hds/copy/button/types.js.map +1 -0
- package/dist/components/hds/copy/snippet/index.js +27 -11
- package/dist/components/hds/copy/snippet/index.js.map +1 -1
- package/dist/components/hds/copy/snippet/types.js +13 -0
- package/dist/components/hds/copy/snippet/types.js.map +1 -0
- package/dist/components/hds/disclosure-primitive/index.js +2 -2
- package/dist/components/hds/disclosure-primitive/index.js.map +1 -1
- package/dist/components/hds/dismiss-button/index.js +3 -3
- package/dist/components/hds/dismiss-button/index.js.map +1 -1
- package/dist/components/hds/dropdown/index.js +1 -1
- package/dist/components/hds/dropdown/index.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/checkbox.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/checkmark.js +1 -1
- package/dist/components/hds/dropdown/list-item/checkmark.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/interactive.js +1 -1
- package/dist/components/hds/dropdown/list-item/interactive.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/radio.js.map +1 -1
- package/dist/components/hds/dropdown/toggle/button.js +1 -1
- package/dist/components/hds/dropdown/toggle/icon.js +1 -1
- package/dist/components/hds/dropdown/toggle/icon.js.map +1 -1
- package/dist/components/hds/flyout/index.js +1 -1
- package/dist/components/hds/flyout/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/label/index.js +18 -2
- package/dist/components/hds/form/label/index.js.map +1 -1
- package/dist/components/hds/form/masked-input/base.js +1 -1
- package/dist/components/hds/form/masked-input/base.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/after-options.js +10 -0
- package/dist/components/hds/form/super-select/after-options.js.map +1 -0
- package/dist/components/hds/form/super-select/multiple/base.js +159 -0
- package/dist/components/hds/form/super-select/multiple/base.js.map +1 -0
- package/dist/components/hds/form/super-select/multiple/field.js +21 -0
- package/dist/components/hds/form/super-select/multiple/field.js.map +1 -0
- package/dist/components/hds/form/super-select/option-group.js +22 -0
- package/dist/components/hds/form/super-select/option-group.js.map +1 -0
- package/dist/components/hds/form/super-select/placeholder.js +10 -0
- package/dist/components/hds/form/super-select/placeholder.js.map +1 -0
- package/dist/components/hds/form/super-select/single/base.js +86 -0
- package/dist/components/hds/form/super-select/single/base.js.map +1 -0
- package/dist/components/hds/form/super-select/single/field.js +21 -0
- package/dist/components/hds/form/super-select/single/field.js.map +1 -0
- package/dist/components/hds/form/text-input/field.js +1 -1
- package/dist/components/hds/form/text-input/field.js.map +1 -1
- package/dist/components/hds/icon-tile/index.js +15 -11
- package/dist/components/hds/icon-tile/index.js.map +1 -1
- package/dist/components/hds/icon-tile/types.js +32 -0
- package/dist/components/hds/icon-tile/types.js.map +1 -0
- package/dist/components/hds/interactive/index.js +4 -4
- package/dist/components/hds/interactive/index.js.map +1 -1
- package/dist/components/hds/link/inline.js.map +1 -1
- package/dist/components/hds/link/standalone.js.map +1 -1
- package/dist/components/hds/link/types.js +5 -0
- package/dist/components/hds/link/types.js.map +1 -1
- package/dist/components/hds/menu-primitive/index.js +1 -1
- package/dist/components/hds/menu-primitive/index.js.map +1 -1
- package/dist/components/hds/modal/index.js +1 -1
- package/dist/components/hds/modal/index.js.map +1 -1
- package/dist/components/hds/pagination/compact/index.js +1 -1
- package/dist/components/hds/pagination/compact/index.js.map +1 -1
- package/dist/components/hds/pagination/nav/arrow.js +1 -1
- package/dist/components/hds/pagination/nav/arrow.js.map +1 -1
- package/dist/components/hds/pagination/nav/number.js +1 -1
- package/dist/components/hds/pagination/nav/number.js.map +1 -1
- package/dist/components/hds/pagination/numbered/index.js +1 -1
- package/dist/components/hds/pagination/numbered/index.js.map +1 -1
- package/dist/components/hds/pagination/size-selector/index.js +1 -1
- package/dist/components/hds/pagination/size-selector/index.js.map +1 -1
- package/dist/components/hds/popover-primitive/index.js +238 -0
- package/dist/components/hds/popover-primitive/index.js.map +1 -0
- package/dist/components/hds/reveal/index.js +21 -17
- package/dist/components/hds/reveal/index.js.map +1 -1
- package/dist/components/hds/reveal/toggle/button.js +5 -5
- package/dist/components/hds/reveal/toggle/button.js.map +1 -1
- package/dist/components/hds/rich-tooltip/bubble.js +60 -0
- package/dist/components/hds/rich-tooltip/bubble.js.map +1 -0
- package/dist/components/hds/rich-tooltip/index.js +26 -0
- package/dist/components/hds/rich-tooltip/index.js.map +1 -0
- package/dist/components/hds/rich-tooltip/toggle.js +85 -0
- package/dist/components/hds/rich-tooltip/toggle.js.map +1 -0
- package/dist/components/hds/separator/index.js +9 -8
- package/dist/components/hds/separator/index.js.map +1 -1
- package/dist/components/hds/separator/types.js +13 -0
- package/dist/components/hds/separator/types.js.map +1 -0
- package/dist/components/hds/side-nav/index.js +1 -1
- package/dist/components/hds/side-nav/index.js.map +1 -1
- package/dist/components/hds/side-nav/portal/target.js +1 -1
- package/dist/components/hds/side-nav/portal/target.js.map +1 -1
- package/dist/components/hds/stepper/step/indicator.js +9 -8
- package/dist/components/hds/stepper/step/indicator.js.map +1 -1
- package/dist/components/hds/stepper/task/indicator.js +10 -14
- package/dist/components/hds/stepper/task/indicator.js.map +1 -1
- package/dist/components/hds/stepper/types.js +21 -0
- package/dist/components/hds/stepper/types.js.map +1 -0
- package/dist/components/hds/table/index.js +1 -1
- package/dist/components/hds/table/index.js.map +1 -1
- package/dist/components/hds/table/th-button-sort.js +1 -1
- package/dist/components/hds/table/th-button-tooltip.js +1 -1
- package/dist/components/hds/table/th-selectable.js +1 -1
- package/dist/components/hds/table/th-selectable.js.map +1 -1
- package/dist/components/hds/table/th-sort.js +1 -1
- package/dist/components/hds/table/th.js +1 -1
- package/dist/components/hds/tabs/index.js +1 -1
- package/dist/components/hds/tabs/index.js.map +1 -1
- package/dist/components/hds/tabs/panel.js +1 -1
- package/dist/components/hds/tabs/panel.js.map +1 -1
- package/dist/components/hds/tabs/tab.js +1 -1
- package/dist/components/hds/tabs/tab.js.map +1 -1
- package/dist/components/hds/tag/index.js +11 -10
- package/dist/components/hds/tag/index.js.map +1 -1
- package/dist/components/hds/tag/types.js +13 -0
- package/dist/components/hds/tag/types.js.map +1 -0
- package/dist/components/hds/text/body.js.map +1 -1
- package/dist/components/hds/text/code.js.map +1 -1
- package/dist/components/hds/text/display.js.map +1 -1
- package/dist/components/hds/text/index.js +3 -3
- package/dist/components/hds/text/index.js.map +1 -1
- package/dist/components/hds/toast/index.js +8 -2
- package/dist/components/hds/toast/index.js.map +1 -1
- package/dist/components/hds/yield/index.js +4 -4
- package/dist/components/hds/yield/index.js.map +1 -1
- package/dist/components.js +28 -0
- package/dist/components.js.map +1 -0
- package/dist/helpers.js +2 -0
- package/dist/helpers.js.map +1 -0
- package/dist/modifiers/hds-anchored-position.js +175 -0
- package/dist/modifiers/hds-anchored-position.js.map +1 -0
- package/dist/modifiers/hds-clipboard.js +9 -7
- package/dist/modifiers/hds-clipboard.js.map +1 -1
- package/dist/modifiers/hds-register-event.js +40 -0
- package/dist/modifiers/hds-register-event.js.map +1 -0
- package/dist/modifiers/hds-tooltip.js +10 -14
- package/dist/modifiers/hds-tooltip.js.map +1 -1
- package/dist/modifiers.js +2 -0
- package/dist/modifiers.js.map +1 -0
- package/dist/styles/@hashicorp/design-system-components.css +565 -3
- package/dist/styles/@hashicorp/design-system-components.scss +1 -0
- package/dist/styles/@hashicorp/design-system-power-select-overrides.scss +0 -1
- package/dist/styles/components/code-block/theme.scss +1 -1
- package/dist/styles/components/dropdown.scss +7 -0
- package/dist/styles/components/form/index.scss +1 -0
- package/dist/styles/components/form/select.scss +0 -1
- package/dist/styles/components/form/super-select.scss +515 -0
- package/dist/styles/components/form/text-input.scss +0 -1
- package/dist/styles/components/form/textarea.scss +0 -1
- package/dist/styles/components/page-header.scss +1 -0
- package/dist/styles/components/rich-tooltip.scss +247 -0
- package/dist/styles/components/tabs.scss +2 -1
- package/dist/styles/components/tooltip.scss +1 -1
- package/package.json +60 -33
- package/dist/_app_/components/hds/text/types.js +0 -1
- package/dist/_app_/components/hds/yield/types.js +0 -1
- package/dist/components/hds/interactive/types.js +0 -2
- package/dist/components/hds/interactive/types.js.map +0 -1
- package/dist/components/hds/yield/types.js +0 -2
- package/dist/components/hds/yield/types.js.map +0 -1
- /package/{addon-main.js → addon-main.cjs} +0 -0
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
4
|
import { tracked } from '@glimmer/tracking';
|
|
5
5
|
import { action } from '@ember/object';
|
|
6
|
+
import { HdsCopyButtonSizeValues } from './types.js';
|
|
6
7
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
8
|
import { setComponentTemplate } from '@ember/component';
|
|
8
9
|
|
|
9
|
-
var TEMPLATE = precompileTemplate("{{
|
|
10
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Button\n class={{this.classNames}}\n @size={{this.size}}\n @isFullWidth={{@isFullWidth}}\n @text={{@text}}\n @icon={{this.icon}}\n @isIconOnly={{@isIconOnly}}\n @color=\"secondary\"\n @iconPosition=\"trailing\"\n {{hds-clipboard text=@textToCopy target=@targetToCopy onSuccess=this.onSuccess onError=this.onError}}\n ...attributes\n/>");
|
|
10
11
|
|
|
11
12
|
var _class, _descriptor, _descriptor2;
|
|
12
|
-
const DEFAULT_SIZE =
|
|
13
|
-
const SIZES =
|
|
13
|
+
const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium;
|
|
14
|
+
const SIZES = Object.values(HdsCopyButtonSizeValues);
|
|
14
15
|
const DEFAULT_ICON = 'clipboard-copy';
|
|
15
16
|
const SUCCESS_ICON = 'clipboard-checked';
|
|
16
17
|
const ERROR_ICON = 'clipboard-x';
|
|
@@ -43,7 +44,7 @@ let HdsCopyButtonComponent = (_class = class HdsCopyButtonComponent extends Comp
|
|
|
43
44
|
* @description The size of the copy/button; acceptable values are `small` and `medium`
|
|
44
45
|
*/
|
|
45
46
|
get size() {
|
|
46
|
-
|
|
47
|
+
const {
|
|
47
48
|
size = DEFAULT_SIZE
|
|
48
49
|
} = this.args;
|
|
49
50
|
assert(`@size for "Hds::Copy::Button" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size));
|
|
@@ -56,7 +57,7 @@ let HdsCopyButtonComponent = (_class = class HdsCopyButtonComponent extends Comp
|
|
|
56
57
|
* @return {string} The "class" attribute to apply to the component.
|
|
57
58
|
*/
|
|
58
59
|
get classNames() {
|
|
59
|
-
|
|
60
|
+
const classes = ['hds-copy-button'];
|
|
60
61
|
|
|
61
62
|
// add a class based on the @size argument
|
|
62
63
|
classes.push(`hds-button--size-${this.size}`);
|
|
@@ -66,7 +67,7 @@ let HdsCopyButtonComponent = (_class = class HdsCopyButtonComponent extends Comp
|
|
|
66
67
|
onSuccess(args) {
|
|
67
68
|
this.status = 'success';
|
|
68
69
|
this.resetStatusDelayed();
|
|
69
|
-
|
|
70
|
+
const {
|
|
70
71
|
onSuccess
|
|
71
72
|
} = this.args;
|
|
72
73
|
if (typeof onSuccess === 'function') {
|
|
@@ -76,7 +77,7 @@ let HdsCopyButtonComponent = (_class = class HdsCopyButtonComponent extends Comp
|
|
|
76
77
|
onError(args) {
|
|
77
78
|
this.status = 'error';
|
|
78
79
|
this.resetStatusDelayed();
|
|
79
|
-
|
|
80
|
+
const {
|
|
80
81
|
onError
|
|
81
82
|
} = this.args;
|
|
82
83
|
if (typeof onError === 'function') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/button/index.hbs","../../../../../src/components/hds/copy/button/index.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/button/index.hbs","../../../../../src/components/hds/copy/button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Button\\n class={{this.classNames}}\\n @size={{this.size}}\\n @isFullWidth={{@isFullWidth}}\\n @text={{@text}}\\n @icon={{this.icon}}\\n @isIconOnly={{@isIconOnly}}\\n @color=\\\"secondary\\\"\\n @iconPosition=\\\"trailing\\\"\\n {{hds-clipboard text=@textToCopy target=@targetToCopy onSuccess=this.onSuccess onError=this.onError}}\\n ...attributes\\n/>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { HdsCopyButtonSizeValues } from './types.ts';\nimport type { HdsCopyButtonSizes } from './types.ts';\nimport type { HdsButtonSignature } from '../../button/';\nimport type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts';\n\nexport const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium;\nexport const SIZES: string[] = Object.values(HdsCopyButtonSizeValues);\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\nexport interface HdsCopyButtonSignature {\n Args: HdsButtonSignature['Args'] & {\n size?: HdsCopyButtonSizes;\n textToCopy?: HdsClipboardModifierSignature['Args']['Named']['text'];\n targetToCopy?: HdsClipboardModifierSignature['Args']['Named']['target'];\n onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess'];\n onError?: HdsClipboardModifierSignature['Args']['Named']['onError'];\n };\n Element: HdsButtonSignature['Element'];\n}\n\nexport default class HdsCopyButtonComponent extends Component<HdsCopyButtonSignature> {\n @tracked status = DEFAULT_STATUS;\n @tracked timer: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * @param icon\n * @type {string}\n * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`.\n */\n get icon() {\n let icon = DEFAULT_ICON;\n if (this.status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this.status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the copy/button; acceptable values are `small` and `medium`\n */\n get size() {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Copy::Button\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopyButton#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n const classes = ['hds-copy-button'];\n\n // add a class based on the @size argument\n classes.push(`hds-button--size-${this.size}`);\n\n classes.push(`hds-copy-button--status-${this.status}`);\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']) {\n this.status = 'success';\n this.resetStatusDelayed();\n\n const { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(args: HdsClipboardModifierSignature['Args']['Named']['onError']) {\n this.status = 'error';\n this.resetStatusDelayed();\n\n const { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed() {\n clearTimeout(this.timer);\n // make it fade back to the default state\n this.timer = setTimeout(() => {\n this.status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_SIZE","HdsCopyButtonSizeValues","Medium","SIZES","Object","values","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopyButtonComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","icon","status","size","assert","join","includes","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,8aAA8a;;;ACancA,MAAAA,YAAY,GAAGC,uBAAuB,CAACC,OAAM;AACnD,MAAMC,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACJ,uBAAuB,EAAC;AAC9D,MAAMK,YAAY,GAAG,iBAAgB;AACrC,MAAMC,YAAY,GAAG,oBAAmB;AACxC,MAAMC,UAAU,GAAG,cAAa;AAChC,MAAMC,cAAc,GAAG,OAAM;AAafC,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,CAAyB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AA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AtB,MAAA,CAAAuB,SAAA,EAAA,WAAA,EAAA,CAoDPM,MAAM,CAAApC,EAAAA,MAAA,CAAAqC,wBAAA,CAAA9B,MAAA,CAAAuB,SAAA,EAAAvB,WAAAA,CAAAA,EAAAA,MAAA,CAAAuB,SAAA,CAAA,EAAAD,yBAAA,CAAAtB,MAAA,CAAAuB,SAAA,cAYNM,MAAM,CAAA,EAAApC,MAAA,CAAAqC,wBAAA,CAAA9B,MAAA,CAAAuB,SAAA,EAAA,SAAA,CAAA,EAAAvB,MAAA,CAAAuB,SAAA,IAAAvB,MAAA,EAAA;AAlEkC+B,oBAAA,CAAAC,QAAA,EAAtBjC,sBAAsB,CAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let HdsCopyButtonSizeValues = /*#__PURE__*/function (HdsCopyButtonSizeValues) {
|
|
7
|
+
HdsCopyButtonSizeValues["Small"] = "small";
|
|
8
|
+
HdsCopyButtonSizeValues["Medium"] = "medium";
|
|
9
|
+
return HdsCopyButtonSizeValues;
|
|
10
|
+
}({});
|
|
11
|
+
|
|
12
|
+
export { HdsCopyButtonSizeValues };
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/copy/button/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCopyButtonSizeValues {\n Small = 'small',\n Medium = 'medium',\n}\nexport type HdsCopyButtonSizes = `${HdsCopyButtonSizeValues}`;\n"],"names":["HdsCopyButtonSizeValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,OAAA,CAAA,GAAA,OAAA,CAAA;EAAvBA,uBAAuB,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAAA,EAAA,OAAvBA,uBAAuB,CAAA;AAAA,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -1,26 +1,42 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
4
|
import { tracked } from '@glimmer/tracking';
|
|
5
5
|
import { action } from '@ember/object';
|
|
6
|
+
import { HdsCopySnippetColorValues } from './types.js';
|
|
6
7
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
8
|
import { setComponentTemplate } from '@ember/component';
|
|
8
9
|
|
|
9
|
-
var TEMPLATE = precompileTemplate("{{
|
|
10
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<button\n type=\"button\"\n class={{this.classNames}}\n {{hds-clipboard text=@textToCopy onSuccess=this.onSuccess onError=this.onError}}\n aria-label={{concat \"copy \" @textToCopy}}\n ...attributes\n>\n <Hds::Text::Code class=\"hds-copy-snippet__text\" @tag=\"span\" @size=\"100\">\n {{this.textToShow}}\n </Hds::Text::Code>\n <FlightIcon @name={{this.icon}} class=\"hds-copy-snippet__icon\" />\n</button>");
|
|
10
11
|
|
|
11
12
|
var _class, _descriptor, _descriptor2;
|
|
12
|
-
const DEFAULT_COLOR =
|
|
13
|
-
const COLORS =
|
|
13
|
+
const DEFAULT_COLOR = HdsCopySnippetColorValues.Primary;
|
|
14
|
+
const COLORS = Object.values(HdsCopySnippetColorValues);
|
|
14
15
|
const DEFAULT_ICON = 'clipboard-copy';
|
|
15
16
|
const SUCCESS_ICON = 'clipboard-checked';
|
|
16
17
|
const ERROR_ICON = 'clipboard-x';
|
|
17
18
|
const DEFAULT_STATUS = 'idle';
|
|
18
|
-
let
|
|
19
|
+
let HdsCopySnippetComponent = (_class = class HdsCopySnippetComponent extends Component {
|
|
19
20
|
constructor(...args) {
|
|
20
21
|
super(...args);
|
|
21
22
|
_initializerDefineProperty(this, "status", _descriptor, this);
|
|
22
23
|
_initializerDefineProperty(this, "timer", _descriptor2, this);
|
|
23
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @param textToCopy
|
|
27
|
+
* @type {string | number | bigint | undefined} ???
|
|
28
|
+
*/
|
|
29
|
+
get textToShow() {
|
|
30
|
+
const {
|
|
31
|
+
textToCopy = ''
|
|
32
|
+
} = this.args;
|
|
33
|
+
if (typeof textToCopy === 'string') {
|
|
34
|
+
return textToCopy;
|
|
35
|
+
} else {
|
|
36
|
+
return textToCopy.toString();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
/**
|
|
25
41
|
* @param icon
|
|
26
42
|
* @type {string}
|
|
@@ -44,7 +60,7 @@ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent
|
|
|
44
60
|
* @description Determines the color of button to be used; acceptable values are `primary` and `secondary`
|
|
45
61
|
*/
|
|
46
62
|
get color() {
|
|
47
|
-
|
|
63
|
+
const {
|
|
48
64
|
color = DEFAULT_COLOR
|
|
49
65
|
} = this.args;
|
|
50
66
|
assert(`@color for "Hds::Copy::Snippet" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
|
|
@@ -77,7 +93,7 @@ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent
|
|
|
77
93
|
* @return {string} The "class" attribute to apply to the component.
|
|
78
94
|
*/
|
|
79
95
|
get classNames() {
|
|
80
|
-
|
|
96
|
+
const classes = ['hds-copy-snippet'];
|
|
81
97
|
|
|
82
98
|
// add a class based on the @color argument
|
|
83
99
|
classes.push(`hds-copy-snippet--color-${this.color}`);
|
|
@@ -99,7 +115,7 @@ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent
|
|
|
99
115
|
onSuccess(args) {
|
|
100
116
|
this.status = 'success';
|
|
101
117
|
this.resetStatusDelayed();
|
|
102
|
-
|
|
118
|
+
const {
|
|
103
119
|
onSuccess
|
|
104
120
|
} = this.args;
|
|
105
121
|
if (typeof onSuccess === 'function') {
|
|
@@ -109,7 +125,7 @@ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent
|
|
|
109
125
|
onError(args) {
|
|
110
126
|
this.status = 'error';
|
|
111
127
|
this.resetStatusDelayed();
|
|
112
|
-
|
|
128
|
+
const {
|
|
113
129
|
onError
|
|
114
130
|
} = this.args;
|
|
115
131
|
if (typeof onError === 'function') {
|
|
@@ -136,7 +152,7 @@ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent
|
|
|
136
152
|
writable: true,
|
|
137
153
|
initializer: null
|
|
138
154
|
}), _applyDecoratedDescriptor(_class.prototype, "onSuccess", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onSuccess"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onError"), _class.prototype)), _class);
|
|
139
|
-
setComponentTemplate(TEMPLATE,
|
|
155
|
+
setComponentTemplate(TEMPLATE, HdsCopySnippetComponent);
|
|
140
156
|
|
|
141
|
-
export { COLORS, DEFAULT_COLOR, DEFAULT_ICON, DEFAULT_STATUS, ERROR_ICON, SUCCESS_ICON,
|
|
157
|
+
export { COLORS, DEFAULT_COLOR, DEFAULT_ICON, DEFAULT_STATUS, ERROR_ICON, SUCCESS_ICON, HdsCopySnippetComponent as default };
|
|
142
158
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/snippet/index.hbs","../../../../../src/components/hds/copy/snippet/index.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/snippet/index.hbs","../../../../../src/components/hds/copy/snippet/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button\\n type=\\\"button\\\"\\n class={{this.classNames}}\\n {{hds-clipboard text=@textToCopy onSuccess=this.onSuccess onError=this.onError}}\\n aria-label={{concat \\\"copy \\\" @textToCopy}}\\n ...attributes\\n>\\n <Hds::Text::Code class=\\\"hds-copy-snippet__text\\\" @tag=\\\"span\\\" @size=\\\"100\\\">\\n {{this.textToShow}}\\n </Hds::Text::Code>\\n <FlightIcon @name={{this.icon}} class=\\\"hds-copy-snippet__icon\\\" />\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { HdsCopySnippetColorValues } from './types.ts';\nimport type { HdsCopySnippetColors } from './types.ts';\nimport type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts';\n\nexport const DEFAULT_COLOR = HdsCopySnippetColorValues.Primary;\nexport const COLORS: string[] = Object.values(HdsCopySnippetColorValues);\n\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\ninterface HdsCopySnippetSignature {\n Args: {\n color?: HdsCopySnippetColors;\n isFullWidth?: boolean;\n textToCopy: HdsClipboardModifierSignature['Args']['Named']['text'];\n isTruncated?: boolean;\n onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess'];\n onError?: HdsClipboardModifierSignature['Args']['Named']['onError'];\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsCopySnippetComponent extends Component<HdsCopySnippetSignature> {\n @tracked status = DEFAULT_STATUS;\n @tracked timer: ReturnType<typeof setTimeout> | undefined;\n\n /**\n * @param textToCopy\n * @type {string | number | bigint | undefined} ???\n */\n get textToShow() {\n const { textToCopy = '' } = this.args;\n\n if (typeof textToCopy === 'string') {\n return textToCopy;\n } else {\n return textToCopy.toString();\n }\n }\n\n /**\n * @param icon\n * @type {string}\n * @default DEFAULT_ICON\n * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status).\n */\n get icon() {\n let icon = DEFAULT_ICON;\n if (this.status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this.status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of button to be used; acceptable values are `primary` and `secondary`\n */\n get color() {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Copy::Snippet\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * @param isFullWidth\n * @type {boolean}\n * @default false\n * @description Indicates that the component should take up the full width of the parent container.\n */\n get isFullWidth() {\n return this.args.isFullWidth ?? false;\n }\n\n /**\n * @param isTruncated\n * @type {boolean}\n * @default false\n * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines.\n */\n get isTruncated() {\n return this.args.isTruncated ?? false;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopySnippet#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n const classes = ['hds-copy-snippet'];\n\n // add a class based on the @color argument\n classes.push(`hds-copy-snippet--color-${this.color}`);\n\n // add a class based on the tracked status (idle/success/error)\n classes.push(`hds-copy-snippet--status-${this.status}`);\n\n // add a class based on the @isTruncated argument\n if (this.isTruncated) {\n classes.push('hds-copy-snippet--is-truncated');\n }\n\n // add a class based on the @isFullWidth argument\n if (this.isFullWidth) {\n classes.push('hds-copy-snippet--width-full');\n }\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']) {\n this.status = 'success';\n this.resetStatusDelayed();\n\n const { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(args: HdsClipboardModifierSignature['Args']['Named']['onError']) {\n this.status = 'error';\n this.resetStatusDelayed();\n\n const { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed() {\n clearTimeout(this.timer);\n // make it fade back to the default state\n this.timer = setTimeout(() => {\n this.status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_COLOR","HdsCopySnippetColorValues","Primary","COLORS","Object","values","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopySnippetComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","textToShow","textToCopy","toString","icon","status","color","assert","join","includes","isFullWidth","isTruncated","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,ifAAif;;;ACYtgBA,MAAAA,aAAa,GAAGC,yBAAyB,CAACC,QAAO;AACvD,MAAMC,MAAgB,GAAGC,MAAM,CAACC,MAAM,CAACJ,yBAAyB,EAAC;AAEjE,MAAMK,YAAY,GAAG,iBAAgB;AACrC,MAAMC,YAAY,GAAG,oBAAmB;AACxC,MAAMC,UAAU,GAAG,cAAa;AAChC,MAAMC,cAAc,GAAG,OAAM;AAcfC,IAAAA,uBAAuB,IAAAC,MAAA,GAA7B,MAAMD,uBAAuB,SAASE,SAAS,CAA0B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,C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AA,EAAvBtC,uBAAuB,CAAA;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let HdsCopySnippetColorValues = /*#__PURE__*/function (HdsCopySnippetColorValues) {
|
|
7
|
+
HdsCopySnippetColorValues["Primary"] = "primary";
|
|
8
|
+
HdsCopySnippetColorValues["Secondary"] = "secondary";
|
|
9
|
+
return HdsCopySnippetColorValues;
|
|
10
|
+
}({});
|
|
11
|
+
|
|
12
|
+
export { HdsCopySnippetColorValues };
|
|
13
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/copy/snippet/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCopySnippetColorValues {\n Primary = 'primary',\n Secondary = 'secondary',\n}\nexport type HdsCopySnippetColors = `${HdsCopySnippetColorValues}`;\n"],"names":["HdsCopySnippetColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,yBAAyB,0BAAzBA,yBAAyB,EAAA;EAAzBA,yBAAyB,CAAA,SAAA,CAAA,GAAA,SAAA,CAAA;EAAzBA,yBAAyB,CAAA,WAAA,CAAA,GAAA,WAAA,CAAA;AAAA,EAAA,OAAzBA,yBAAyB,CAAA;AAAA,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
4
|
import { action } from '@ember/object';
|
|
@@ -6,7 +6,7 @@ import { schedule } from '@ember/runloop';
|
|
|
6
6
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
7
|
import { setComponentTemplate } from '@ember/component';
|
|
8
8
|
|
|
9
|
-
var TEMPLATE = precompileTemplate("{{
|
|
9
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class=\"hds-disclosure-primitive\" ...attributes>\n <div class=\"hds-disclosure-primitive__toggle\">\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\"toggle\"}}\n </div>\n {{#if this.isOpen}}\n <div class=\"hds-disclosure-primitive__content\">\n {{yield (hash close=this.close) to=\"content\"}}\n </div>\n {{/if}}\n</div>");
|
|
10
10
|
|
|
11
11
|
var _class, _descriptor;
|
|
12
12
|
let HdsDisclosurePrimitiveComponent = (_class = class HdsDisclosurePrimitiveComponent extends Component {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/disclosure-primitive/index.hbs","../../../../src/components/hds/disclosure-primitive/index.
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/disclosure-primitive/index.hbs","../../../../src/components/hds/disclosure-primitive/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-disclosure-primitive\\\" ...attributes>\\n <div class=\\\"hds-disclosure-primitive__toggle\\\">\\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\\\"toggle\\\"}}\\n </div>\\n {{#if this.isOpen}}\\n <div class=\\\"hds-disclosure-primitive__content\\\">\\n {{yield (hash close=this.close) to=\\\"content\\\"}}\\n </div>\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { schedule } from '@ember/runloop';\n\nexport interface HdsDisclosurePrimitiveSignature {\n Args: {\n isOpen?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClose?: (...args: any[]) => void;\n };\n Blocks: {\n toggle: [\n {\n isOpen: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle: (...args: any[]) => void;\n }\n ];\n content: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n close: (...args: any[]) => void;\n }\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsDisclosurePrimitiveComponent extends Component<HdsDisclosurePrimitiveSignature> {\n @tracked isOpen = this.args.isOpen ?? false;\n\n @action\n onClickToggle() {\n this.isOpen = !this.isOpen;\n }\n\n @action\n close() {\n // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation\n schedule('afterRender', () => {\n this.isOpen = false;\n // we call the \"onClose\" callback if it exists (and is a function)\n if (this.args.onClose && typeof this.args.onClose === 'function') {\n this.args.onClose();\n }\n });\n }\n}\n"],"names":["HdsDisclosurePrimitiveComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","onClickToggle","isOpen","close","schedule","onClose","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,icAAic;;;ACiC9cA,IAAAA,+BAA+B,IAAAC,MAAA,GAArC,MAAMD,+BAA+B,SAASE,SAAS,CAAkC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAItGC,EAAAA,aAAaA,GAAG;AACd,IAAA,IAAI,CAACC,MAAM,G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0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class HdsDismissButtonComponent extends Component {
|
|
13
13
|
/**
|
|
14
14
|
* @param ariaLabel
|
|
15
15
|
* @type {string}
|
|
@@ -19,7 +19,7 @@ class HdsDismissButtonIndexComponent extends Component {
|
|
|
19
19
|
return this.args.ariaLabel ?? 'Dismiss';
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
setComponentTemplate(TEMPLATE,
|
|
22
|
+
setComponentTemplate(TEMPLATE, HdsDismissButtonComponent);
|
|
23
23
|
|
|
24
|
-
export {
|
|
24
|
+
export { HdsDismissButtonComponent as default };
|
|
25
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dismiss-button/index.hbs","../../../../src/components/hds/dismiss-button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button class=\\\"hds-dismiss-button\\\" type=\\\"button\\\" aria-label={{this.ariaLabel}} ...attributes>\\n <FlightIcon @name=\\\"x\\\" @size=\\\"16\\\" @isInlineBlock={{false}} />\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsDismissButtonSignature {\n Args: {\n ariaLabel?: string;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dismiss-button/index.hbs","../../../../src/components/hds/dismiss-button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button class=\\\"hds-dismiss-button\\\" type=\\\"button\\\" aria-label={{this.ariaLabel}} ...attributes>\\n <FlightIcon @name=\\\"x\\\" @size=\\\"16\\\" @isInlineBlock={{false}} />\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsDismissButtonSignature {\n Args: {\n ariaLabel?: string;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsDismissButtonComponent extends Component<HdsDismissButtonSignature> {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Dismiss'\n */\n get ariaLabel() {\n return this.args.ariaLabel ?? 'Dismiss';\n }\n}\n"],"names":["HdsDismissButtonComponent","Component","ariaLabel","args","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ySAAyS;;ACD3U;AACA;AACA;AACA;;AAWe,MAAMA,yBAAyB,SAASC,SAAS,CAA4B;AAC1F;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,SAAS,CAAA;AACzC,GAAA;AACF,CAAA;AAACE,oBAAA,CAAAC,QAAA,EAToBL,yBAAyB,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor } from '../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { assert } from '@ember/debug';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dropdown/index.hbs","../../../../src/components/hds/dropdown/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::MenuPrimitive class={{this.classNames}} @onClose={{@onClose}} ...attributes>\\n <:toggle as |t|>\\n {{yield\\n (hash\\n ToggleButton=(component \\\"hds/dropdown/toggle/button\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n ToggleIcon=(component \\\"hds/dropdown/toggle/icon\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n )\\n }}\\n </:toggle>\\n <:content as |c|>\\n <div class={{this.classNamesContent}} {{style width=@width max-height=@height}}>\\n {{yield (hash Header=(component \\\"hds/dropdown/header\\\"))}}\\n <ul class=\\\"hds-dropdown__list\\\" {{did-insert this.didInsertList}}>\\n {{yield\\n (hash\\n close=c.close\\n Checkbox=(component \\\"hds/dropdown/list-item/checkbox\\\")\\n Checkmark=(component \\\"hds/dropdown/list-item/checkmark\\\")\\n CopyItem=(component \\\"hds/dropdown/list-item/copy-item\\\")\\n Description=(component \\\"hds/dropdown/list-item/description\\\")\\n Generic=(component \\\"hds/dropdown/list-item/generic\\\")\\n Interactive=(component \\\"hds/dropdown/list-item/interactive\\\")\\n Radio=(component \\\"hds/dropdown/list-item/radio\\\")\\n Separator=(component \\\"hds/dropdown/list-item/separator\\\")\\n Title=(component \\\"hds/dropdown/list-item/title\\\")\\n )\\n }}\\n </ul>\\n {{yield (hash close=c.close Footer=(component \\\"hds/dropdown/footer\\\"))}}\\n </div>\\n </:content>\\n</Hds::MenuPrimitive>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_POSITION = 'bottom-right';\nexport const POSITIONS = [\n 'bottom-left',\n 'bottom-right',\n 'top-left',\n 'top-right',\n];\n\nexport default class HdsDropdownIndexComponent extends Component {\n /**\n * @param listPosition\n * @type {string}\n * @default bottom-right\n * @description Determines the position of the \"list\"\n */\n get listPosition() {\n let { listPosition = DEFAULT_POSITION } = this.args;\n\n assert(\n `@listPosition for \"Hds::Dropdown::Index\" must be one of the following: ${POSITIONS.join(\n ', '\n )}; received: ${listPosition}`,\n POSITIONS.includes(listPosition)\n );\n\n return listPosition;\n }\n\n /**\n * Get the class names to apply to the element\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the root element\n */\n get classNames() {\n let classes = ['hds-dropdown'];\n\n // add a class based on the @isInline argument\n if (this.args.isInline) {\n classes.push('hds-dropdown--is-inline');\n }\n\n return classes.join(' ');\n }\n\n /**\n * Get the class names to apply to the content\n * @method classNamesContent\n * @return {string} The \"class\" attribute to apply to the disclosed content\n */\n get classNamesContent() {\n let classes = ['hds-dropdown__content'];\n\n // add a class based on the @listPosition argument\n classes.push(`hds-dropdown__content--position-${this.listPosition}`);\n\n // add a class based on the @width argument\n if (this.args.width) {\n classes.push('hds-dropdown__content--fixed-width');\n }\n\n return classes.join(' ');\n }\n\n @action\n didInsertList(element) {\n const checkmarkItems = element.querySelectorAll(`[role=\"option\"]`);\n if (checkmarkItems.length) {\n const toggleButtonId = element\n .closest('.hds-dropdown')\n ?.querySelector('.hds-dropdown-toggle-button')\n ?.getAttribute('id');\n element.setAttribute('role', 'listbox');\n element.setAttribute('aria-labelledby', toggleButtonId);\n }\n }\n}\n"],"names":["DEFAULT_POSITION","POSITIONS","HdsDropdownIndexComponent","_class","Component","listPosition","args","assert","join","includes","classNames","classes","isInline","push","classNamesContent","width","didInsertList","element","checkmarkItems","querySelectorAll","length","toggleButtonId","closest","querySelector","getAttribute","setAttribute","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,8jDAA8jD;;;ACQzlD,MAAMA,gBAAgB,GAAG,eAAc;AACvC,MAAMC,SAAS,GAAG,CACvB,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACZ;AAEoBC,IAAAA,yBAAyB,IAAAC,MAAA,GAA/B,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CAAC,CAAA;IAClE,IAAID,cAAc,CAACE,MAAM,EAAE;AACzB,MAAA,MAAMC,cAAc,GAAGJ,OAAO,CAC3BK,OAAO,CAAC,eAAe,CAAC,EACvBC,aAAa,CAAC,6BAA6B,CAAC,EAC5CC,YAAY,CAAC,IAAI,CAAC,CAAA;AACtBP,MAAAA,OAAO,CAACQ,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACvCR,MAAAA,OAAO,CAACQ,YAAY,CAAC,iBAAiB,EAAEJ,cAAc,CAAC,CAAA;AACzD,KAAA;AACF,GAAA;AACF,CAAC,GAAAK,yBAAA,CAAAvB,MAAA,CAAAwB,SAAA,EAAA,eAAA,EAAA,CAZEC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA3B,MAAA,CAAAwB,SAAA,oBAAAxB,MAAA,CAAAwB,SAAA,CAAA,GAAAxB,MAAA,EAAA;AAvDqC4B,oBAAA,CAAAC,QAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dropdown/index.hbs","../../../../src/components/hds/dropdown/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::MenuPrimitive class={{this.classNames}} @onClose={{@onClose}} ...attributes>\\n <:toggle as |t|>\\n {{yield\\n (hash\\n ToggleButton=(component \\\"hds/dropdown/toggle/button\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n ToggleIcon=(component \\\"hds/dropdown/toggle/icon\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n )\\n }}\\n </:toggle>\\n <:content as |c|>\\n <div class={{this.classNamesContent}} {{style width=@width max-height=@height}}>\\n {{yield (hash Header=(component \\\"hds/dropdown/header\\\"))}}\\n <ul class=\\\"hds-dropdown__list\\\" {{did-insert this.didInsertList}}>\\n {{yield\\n (hash\\n close=c.close\\n Checkbox=(component \\\"hds/dropdown/list-item/checkbox\\\")\\n Checkmark=(component \\\"hds/dropdown/list-item/checkmark\\\")\\n CopyItem=(component \\\"hds/dropdown/list-item/copy-item\\\")\\n Description=(component \\\"hds/dropdown/list-item/description\\\")\\n Generic=(component \\\"hds/dropdown/list-item/generic\\\")\\n Interactive=(component \\\"hds/dropdown/list-item/interactive\\\")\\n Radio=(component \\\"hds/dropdown/list-item/radio\\\")\\n Separator=(component \\\"hds/dropdown/list-item/separator\\\")\\n Title=(component \\\"hds/dropdown/list-item/title\\\")\\n )\\n }}\\n </ul>\\n {{yield (hash close=c.close Footer=(component \\\"hds/dropdown/footer\\\"))}}\\n </div>\\n </:content>\\n</Hds::MenuPrimitive>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_POSITION = 'bottom-right';\nexport const POSITIONS = [\n 'bottom-left',\n 'bottom-right',\n 'top-left',\n 'top-right',\n];\n\nexport default class HdsDropdownIndexComponent extends Component {\n /**\n * @param listPosition\n * @type {string}\n * @default bottom-right\n * @description Determines the position of the \"list\"\n */\n get listPosition() {\n let { listPosition = DEFAULT_POSITION } = this.args;\n\n assert(\n `@listPosition for \"Hds::Dropdown::Index\" must be one of the following: ${POSITIONS.join(\n ', '\n )}; received: ${listPosition}`,\n POSITIONS.includes(listPosition)\n );\n\n return listPosition;\n }\n\n /**\n * Get the class names to apply to the element\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the root element\n */\n get classNames() {\n let classes = ['hds-dropdown'];\n\n // add a class based on the @isInline argument\n if (this.args.isInline) {\n classes.push('hds-dropdown--is-inline');\n }\n\n return classes.join(' ');\n }\n\n /**\n * Get the class names to apply to the content\n * @method classNamesContent\n * @return {string} The \"class\" attribute to apply to the disclosed content\n */\n get classNamesContent() {\n let classes = ['hds-dropdown__content'];\n\n // add a class based on the @listPosition argument\n classes.push(`hds-dropdown__content--position-${this.listPosition}`);\n\n // add a class based on the @width argument\n if (this.args.width) {\n classes.push('hds-dropdown__content--fixed-width');\n }\n\n return classes.join(' ');\n }\n\n @action\n didInsertList(element) {\n const checkmarkItems = element.querySelectorAll(`[role=\"option\"]`);\n if (checkmarkItems.length) {\n const toggleButtonId = element\n .closest('.hds-dropdown')\n ?.querySelector('.hds-dropdown-toggle-button')\n ?.getAttribute('id');\n element.setAttribute('role', 'listbox');\n element.setAttribute('aria-labelledby', toggleButtonId);\n }\n }\n}\n"],"names":["DEFAULT_POSITION","POSITIONS","HdsDropdownIndexComponent","_class","Component","listPosition","args","assert","join","includes","classNames","classes","isInline","push","classNamesContent","width","didInsertList","element","checkmarkItems","querySelectorAll","length","toggleButtonId","closest","querySelector","getAttribute","setAttribute","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,8jDAA8jD;;;ACQzlD,MAAMA,gBAAgB,GAAG,eAAc;AACvC,MAAMC,SAAS,GAAG,CACvB,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACZ;AAEoBC,IAAAA,yBAAyB,IAAAC,MAAA,GAA/B,MAAMD,yBAAyB,SAASE,SAAS,CAAC;AAC/D;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,YAAYA,GAAG;IACjB,IAAI;AAAEA,MAAAA,YAAY,GAAGL,gBAAAA;KAAkB,GAAG,IAAI,CAACM,IAAI,CAAA;AAEnDC,IAAAA,MAAM,CACH,CAAyEN,uEAAAA,EAAAA,SAAS,CAACO,IAAI,CACtF,IACF,CAAE,CAAA,YAAA,EAAcH,YAAa,CAAA,CAAC,EAC9BJ,SAAS,CAACQ,QAAQ,CAACJ,YAAY,CACjC,CAAC,CAAA;AAED,IAAA,OAAOA,YAAY,CAAA;AACrB,GAAA;;AAEA;AACF;AACA;AACA;AACA;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AA,CAZEC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA3B,MAAA,CAAAwB,SAAA,oBAAAxB,MAAA,CAAAwB,SAAA,CAAA,GAAAxB,MAAA,EAAA;AAvDqC4B,oBAAA,CAAAC,QAAA,EAAzB9B,yBAAyB,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkbox.hbs","../../../../../src/components/hds/dropdown/list-item/checkbox.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<li class=\\\"hds-dropdown-list-item hds-dropdown-list-item--variant-checkbox\\\">\\n <label class=\\\"hds-dropdown-list-item__label hds-typography-body-200\\\" for={{this.id}}>\\n <Hds::Form::Checkbox::Base class=\\\"hds-dropdown-list-item__control\\\" id={{this.id}} @value={{@value}} ...attributes />\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__text-content\\\">{{yield}}</span>\\n\\n {{#if @count}}\\n <span class=\\\"hds-dropdown-list-item__count hds-typography-body-100 hds-font-weight-medium\\\">{{@count}}</span>\\n {{/if}}\\n </label>\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id';\n\nexport default class HdsDropdownListItemCheckboxComponent extends Component {\n /**\n * Determines the unique ID to assign to the checkbox control\n */\n get id() {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemCheckboxComponent","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,4zBAA4zB;;ACD91B;AACA;AACA;AACA;;AAKe,MAAMA,oCAAoC,SAASC,SAAS,CAAC;AAC1E;AACF;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,oCAAoC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"checkbox.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkbox.hbs","../../../../../src/components/hds/dropdown/list-item/checkbox.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<li class=\\\"hds-dropdown-list-item hds-dropdown-list-item--variant-checkbox\\\">\\n <label class=\\\"hds-dropdown-list-item__label hds-typography-body-200\\\" for={{this.id}}>\\n <Hds::Form::Checkbox::Base class=\\\"hds-dropdown-list-item__control\\\" id={{this.id}} @value={{@value}} ...attributes />\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__text-content\\\">{{yield}}</span>\\n\\n {{#if @count}}\\n <span class=\\\"hds-dropdown-list-item__count hds-typography-body-100 hds-font-weight-medium\\\">{{@count}}</span>\\n {{/if}}\\n </label>\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\n\nexport default class HdsDropdownListItemCheckboxComponent extends Component {\n /**\n * Determines the unique ID to assign to the checkbox control\n */\n get id() {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemCheckboxComponent","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,4zBAA4zB;;ACD91B;AACA;AACA;AACA;;AAKe,MAAMA,oCAAoC,SAASC,SAAS,CAAC;AAC1E;AACF;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,oCAAoC,CAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\n<li class={{this.classNames}} role=\"none\">\n <Hds::Interactive\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n class=\"hds-dropdown-list-item__interactive\"\n ...attributes\n role=\"option\"\n aria-selected={{if @selected \"true\" \"false\"}}\n >\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__interactive-icon\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <Hds::Text::Body @tag=\"span\" @size=\"200\" @weight=\"medium\" class=\"hds-dropdown-list-item__interactive-text\">\n {{yield}}\n </Hds::Text::Body>\n {{#if @count}}\n <Hds::Text::Body\n class=\"hds-dropdown-list-item__count\"\n @tag=\"span\"\n @size=\"100\"\n @weight=\"medium\"\n @color=\"faint\"\n >{{@count}}</Hds::Text::Body>\n {{/if}}\n <span class=\"hds-dropdown-list-item__checkmark\">\n {{#if @selected}}\n <FlightIcon class=\"hds-dropdown-list-item__checkmark-icon\" @name=\"check\" @isInlineBlock={{false}} />\n {{/if}}\n </span>\n </Hds::Interactive>\n</li>\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}");
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\n<li class={{this.classNames}} role=\"none\">\n <Hds::Interactive\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n class=\"hds-dropdown-list-item__interactive\"\n ...attributes\n role=\"option\"\n aria-selected={{if @selected \"true\" \"false\"}}\n >\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <Hds::Text::Body @tag=\"span\" @size=\"200\" @weight=\"medium\" class=\"hds-dropdown-list-item__interactive-text\">\n {{yield}}\n </Hds::Text::Body>\n {{#if @count}}\n <Hds::Text::Body\n class=\"hds-dropdown-list-item__count\"\n @tag=\"span\"\n @size=\"100\"\n @weight=\"medium\"\n @color=\"faint\"\n >{{@count}}</Hds::Text::Body>\n {{/if}}\n <span class=\"hds-dropdown-list-item__checkmark\">\n {{#if @selected}}\n <FlightIcon class=\"hds-dropdown-list-item__checkmark-icon\" @name=\"check\" @isInlineBlock={{false}} />\n {{/if}}\n </span>\n </Hds::Interactive>\n</li>\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}");
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkmark.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkmark.hbs","../../../../../src/components/hds/dropdown/list-item/checkmark.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\\n<li class={{this.classNames}} role=\\\"none\\\">\\n <Hds::Interactive\\n @current-when={{@current-when}}\\n @models={{hds-link-to-models @model @models}}\\n @query={{hds-link-to-query @query}}\\n @replace={{@replace}}\\n @route={{@route}}\\n @isRouteExternal={{@isRouteExternal}}\\n @href={{@href}}\\n @isHrefExternal={{@isHrefExternal}}\\n class=\\\"hds-dropdown-list-item__interactive\\\"\\n ...attributes\\n role=\\\"option\\\"\\n aria-selected={{if @selected \\\"true\\\" \\\"false\\\"}}\\n >\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <Hds::Text::Body @tag=\\\"span\\\" @size=\\\"200\\\" @weight=\\\"medium\\\" class=\\\"hds-dropdown-list-item__interactive-text\\\">\\n {{yield}}\\n </Hds::Text::Body>\\n {{#if @count}}\\n <Hds::Text::Body\\n class=\\\"hds-dropdown-list-item__count\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"medium\\\"\\n @color=\\\"faint\\\"\\n >{{@count}}</Hds::Text::Body>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__checkmark\\\">\\n {{#if @selected}}\\n <FlightIcon class=\\\"hds-dropdown-list-item__checkmark-icon\\\" @name=\\\"check\\\" @isInlineBlock={{false}} />\\n {{/if}}\\n </span>\\n </Hds::Interactive>\\n</li>\\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsDropdownListItemCheckmarkComponent extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--color-action',\n 'hds-dropdown-list-item--variant-checkmark',\n ];\n\n // add a class based on the @selected argument\n if (this.args.selected) {\n classes.push('hds-dropdown-list-item--variant-checkmark-selected');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsDropdownListItemCheckmarkComponent","Component","classNames","classes","args","selected","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"checkmark.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkmark.hbs","../../../../../src/components/hds/dropdown/list-item/checkmark.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\\n<li class={{this.classNames}} role=\\\"none\\\">\\n <Hds::Interactive\\n @current-when={{@current-when}}\\n @models={{hds-link-to-models @model @models}}\\n @query={{hds-link-to-query @query}}\\n @replace={{@replace}}\\n @route={{@route}}\\n @isRouteExternal={{@isRouteExternal}}\\n @href={{@href}}\\n @isHrefExternal={{@isHrefExternal}}\\n class=\\\"hds-dropdown-list-item__interactive\\\"\\n ...attributes\\n role=\\\"option\\\"\\n aria-selected={{if @selected \\\"true\\\" \\\"false\\\"}}\\n >\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <Hds::Text::Body @tag=\\\"span\\\" @size=\\\"200\\\" @weight=\\\"medium\\\" class=\\\"hds-dropdown-list-item__interactive-text\\\">\\n {{yield}}\\n </Hds::Text::Body>\\n {{#if @count}}\\n <Hds::Text::Body\\n class=\\\"hds-dropdown-list-item__count\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"medium\\\"\\n @color=\\\"faint\\\"\\n >{{@count}}</Hds::Text::Body>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__checkmark\\\">\\n {{#if @selected}}\\n <FlightIcon class=\\\"hds-dropdown-list-item__checkmark-icon\\\" @name=\\\"check\\\" @isInlineBlock={{false}} />\\n {{/if}}\\n </span>\\n </Hds::Interactive>\\n</li>\\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsDropdownListItemCheckmarkComponent extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--color-action',\n 'hds-dropdown-list-item--variant-checkmark',\n ];\n\n // add a class based on the @selected argument\n if (this.args.selected) {\n classes.push('hds-dropdown-list-item--variant-checkmark-selected');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsDropdownListItemCheckmarkComponent","Component","classNames","classes","args","selected","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,yqDAAyqD;;ACD3sD;AACA;AACA;AACA;;AAIe,MAAMA,qCAAqC,SAASC,SAAS,CAAC;AAC3E;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;IACf,IAAIC,OAAO,GAAG,CACZ,wBAAwB,EACxB,sCAAsC,EACtC,2CAA2C,CAC5C,CAAA;;AAED;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;AACtBF,MAAAA,OAAO,CAACG,IAAI,CAAC,oDAAoD,CAAC,CAAA;AACpE,KAAA;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EApBoBT,qCAAqC,CAAA;;;;"}
|
|
@@ -3,7 +3,7 @@ import { assert } from '@ember/debug';
|
|
|
3
3
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
4
|
import { setComponentTemplate } from '@ember/component';
|
|
5
5
|
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<li class={{this.classNames}}>\n {{#if @isLoading}}\n <div class=\"hds-dropdown-list-item__interactive-loading-wrapper\" ...attributes>\n <div class=\"hds-dropdown-list-item__interactive-icon\">\n <FlightIcon @name=\"loading\" @isInlineBlock={{false}} />\n </div>\n <Hds::Text::Body @tag=\"div\" @size=\"100\" @weight=\"regular\" class=\"hds-dropdown-list-item__interactive-text\">\n {{this.text}}\n </Hds::Text::Body>\n </div>\n {{else}}\n <Hds::Interactive\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n ...attributes\n >\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__interactive-icon\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <Hds::Text::Body class=\"hds-dropdown-list-item__interactive-text\" @tag=\"span\" @size=\"200\" @weight=\"medium\">\n {{this.text}}\n </Hds::Text::Body>\n </Hds::Interactive>\n {{/if}}\n</li>");
|
|
6
|
+
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<li class={{this.classNames}}>\n {{#if @isLoading}}\n <div class=\"hds-dropdown-list-item__interactive-loading-wrapper\" ...attributes>\n <div class=\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\">\n <FlightIcon @name=\"loading\" @isInlineBlock={{false}} />\n </div>\n <Hds::Text::Body @tag=\"div\" @size=\"100\" @weight=\"regular\" class=\"hds-dropdown-list-item__interactive-text\">\n {{this.text}}\n </Hds::Text::Body>\n </div>\n {{else}}\n <Hds::Interactive\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n ...attributes\n >\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <Hds::Text::Body class=\"hds-dropdown-list-item__interactive-text\" @tag=\"span\" @size=\"200\" @weight=\"medium\">\n {{this.text}}\n </Hds::Text::Body>\n {{#if @trailingIcon}}\n <span class=\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--trailing\">\n <FlightIcon @name={{@trailingIcon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n </Hds::Interactive>\n {{/if}}\n</li>");
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.js","sources":["../../../../../src/components/hds/dropdown/list-item/interactive.hbs","../../../../../src/components/hds/dropdown/list-item/interactive.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<li class={{this.classNames}}>\\n {{#if @isLoading}}\\n <div class=\\\"hds-dropdown-list-item__interactive-loading-wrapper\\\" ...attributes>\\n <div class=\\\"hds-dropdown-list-item__interactive-icon\\\">\\n <FlightIcon @name=\\\"loading\\\" @isInlineBlock={{false}} />\\n </div>\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" @weight=\\\"regular\\\" class=\\\"hds-dropdown-list-item__interactive-text\\\">\\n {{this.text}}\\n </Hds::Text::Body>\\n </div>\\n {{else}}\\n <Hds::Interactive\\n @current-when={{@current-when}}\\n @models={{hds-link-to-models @model @models}}\\n @query={{hds-link-to-query @query}}\\n @replace={{@replace}}\\n @route={{@route}}\\n @isRouteExternal={{@isRouteExternal}}\\n @href={{@href}}\\n @isHrefExternal={{@isHrefExternal}}\\n ...attributes\\n >\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <Hds::Text::Body class=\\\"hds-dropdown-list-item__interactive-text\\\" @tag=\\\"span\\\" @size=\\\"200\\\" @weight=\\\"medium\\\">\\n {{this.text}}\\n </Hds::Text::Body>\\n </Hds::Interactive>\\n {{/if}}\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_COLOR = 'action';\nexport const COLORS = ['action', 'critical'];\n\nexport default class HdsDropdownListItemInteractiveComponent extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the item. If no text value is defined an error will be thrown\n */\n get text() {\n let { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::Interactive\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of the item (when item is set to interactive)\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Dropdown::ListItem::Interactive\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--variant-interactive',\n ];\n\n // add a class based on the @color argument\n classes.push(`hds-dropdown-list-item--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_COLOR","COLORS","HdsDropdownListItemInteractiveComponent","Component","text","args","assert","undefined","color","join","includes","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,
|
|
1
|
+
{"version":3,"file":"interactive.js","sources":["../../../../../src/components/hds/dropdown/list-item/interactive.hbs","../../../../../src/components/hds/dropdown/list-item/interactive.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<li class={{this.classNames}}>\\n {{#if @isLoading}}\\n <div class=\\\"hds-dropdown-list-item__interactive-loading-wrapper\\\" ...attributes>\\n <div class=\\\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\\\">\\n <FlightIcon @name=\\\"loading\\\" @isInlineBlock={{false}} />\\n </div>\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" @weight=\\\"regular\\\" class=\\\"hds-dropdown-list-item__interactive-text\\\">\\n {{this.text}}\\n </Hds::Text::Body>\\n </div>\\n {{else}}\\n <Hds::Interactive\\n @current-when={{@current-when}}\\n @models={{hds-link-to-models @model @models}}\\n @query={{hds-link-to-query @query}}\\n @replace={{@replace}}\\n @route={{@route}}\\n @isRouteExternal={{@isRouteExternal}}\\n @href={{@href}}\\n @isHrefExternal={{@isHrefExternal}}\\n ...attributes\\n >\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--leading\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <Hds::Text::Body class=\\\"hds-dropdown-list-item__interactive-text\\\" @tag=\\\"span\\\" @size=\\\"200\\\" @weight=\\\"medium\\\">\\n {{this.text}}\\n </Hds::Text::Body>\\n {{#if @trailingIcon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon hds-dropdown-list-item__interactive-icon--trailing\\\">\\n <FlightIcon @name={{@trailingIcon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n </Hds::Interactive>\\n {{/if}}\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_COLOR = 'action';\nexport const COLORS = ['action', 'critical'];\n\nexport default class HdsDropdownListItemInteractiveComponent extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the item. If no text value is defined an error will be thrown\n */\n get text() {\n let { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::Interactive\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of the item (when item is set to interactive)\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Dropdown::ListItem::Interactive\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--variant-interactive',\n ];\n\n // add a class based on the @color argument\n classes.push(`hds-dropdown-list-item--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_COLOR","COLORS","HdsDropdownListItemInteractiveComponent","Component","text","args","assert","undefined","color","join","includes","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,4qDAA4qD;;ACD9sD;AACA;AACA;AACA;;AAKO,MAAMA,aAAa,GAAG,SAAQ;MACxBC,MAAM,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAC;AAE7B,MAAMC,uCAAuC,SAASC,SAAS,CAAC;AAC7E;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAG;IACT,IAAI;AAAEA,MAAAA,IAAAA;KAAM,GAAG,IAAI,CAACC,IAAI,CAAA;AAExBC,IAAAA,MAAM,CACJ,0EAA0E,EAC1EF,IAAI,KAAKG,SACX,CAAC,CAAA;AAED,IAAA,OAAOH,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAII,KAAKA,GAAG;IACV,IAAI;AAAEA,MAAAA,KAAK,GAAGR,aAAAA;KAAe,GAAG,IAAI,CAACK,IAAI,CAAA;AAEzCC,IAAAA,MAAM,CACH,CAAkFL,gFAAAA,EAAAA,MAAM,CAACQ,IAAI,CAC5F,IACF,CAAE,CAAA,YAAA,EAAcD,KAAM,CAAA,CAAC,EACvBP,MAAM,CAACS,QAAQ,CAACF,KAAK,CACvB,CAAC,CAAA;AAED,IAAA,OAAOA,KAAK,CAAA;AACd,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIG,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CACZ,wBAAwB,EACxB,6CAA6C,CAC9C,CAAA;;AAED;IACAA,OAAO,CAACC,IAAI,CAAE,CAAA,8BAAA,EAAgC,IAAI,CAACL,KAAM,EAAC,CAAC,CAAA;AAE3D,IAAA,OAAOI,OAAO,CAACH,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACK,oBAAA,CAAAC,QAAA,EApDoBb,uCAAuC,CAAA;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio.js","sources":["../../../../../src/components/hds/dropdown/list-item/radio.hbs","../../../../../src/components/hds/dropdown/list-item/radio.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<li class=\\\"hds-dropdown-list-item hds-dropdown-list-item--variant-radio\\\">\\n <label class=\\\"hds-dropdown-list-item__label hds-typography-body-200\\\" for={{this.id}}>\\n <Hds::Form::Radio::Base class=\\\"hds-dropdown-list-item__control\\\" id={{this.id}} @value={{@value}} ...attributes />\\n {{#if @icon}}\\n <div class=\\\"hds-dropdown-list-item__icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </div>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__text-content\\\">{{yield}}</span>\\n\\n {{#if @count}}\\n <Hds::Text::Body\\n class=\\\"hds-dropdown-list-item__count\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"medium\\\"\\n >{{@count}}</Hds::Text::Body>\\n {{/if}}\\n </label>\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id';\n\nexport default class HdsDropdownListItemRadioComponent extends Component {\n /**\n * Determines the unique ID to assign to the radio control\n */\n get id() {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemRadioComponent","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,s3BAAs3B;;ACDx5B;AACA;AACA;AACA;;AAKe,MAAMA,iCAAiC,SAASC,SAAS,CAAC;AACvE;AACF;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,iCAAiC,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"radio.js","sources":["../../../../../src/components/hds/dropdown/list-item/radio.hbs","../../../../../src/components/hds/dropdown/list-item/radio.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<li class=\\\"hds-dropdown-list-item hds-dropdown-list-item--variant-radio\\\">\\n <label class=\\\"hds-dropdown-list-item__label hds-typography-body-200\\\" for={{this.id}}>\\n <Hds::Form::Radio::Base class=\\\"hds-dropdown-list-item__control\\\" id={{this.id}} @value={{@value}} ...attributes />\\n {{#if @icon}}\\n <div class=\\\"hds-dropdown-list-item__icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </div>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__text-content\\\">{{yield}}</span>\\n\\n {{#if @count}}\\n <Hds::Text::Body\\n class=\\\"hds-dropdown-list-item__count\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"medium\\\"\\n >{{@count}}</Hds::Text::Body>\\n {{/if}}\\n </label>\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\n\nexport default class HdsDropdownListItemRadioComponent extends Component {\n /**\n * Determines the unique ID to assign to the radio control\n */\n get id() {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemRadioComponent","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,s3BAAs3B;;ACDx5B;AACA;AACA;AACA;;AAKe,MAAMA,iCAAiC,SAASC,SAAS,CAAC;AACvE;AACF;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,iCAAiC,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { assert } from '@ember/debug';
|
|
4
4
|
import { guidFor } from '@ember/object/internals';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { action } from '@ember/object';
|
|
4
4
|
import { assert } from '@ember/debug';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.js","sources":["../../../../../src/components/hds/dropdown/toggle/icon.hbs","../../../../../src/components/hds/dropdown/toggle/icon.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button\\n class={{this.classNames}}\\n aria-label={{this.text}}\\n ...attributes\\n aria-expanded={{if @isOpen \\\"true\\\" \\\"false\\\"}}\\n {{on \\\"click\\\" this.onClick}}\\n {{did-update this.onDidUpdateImageSrc @imageSrc}}\\n type=\\\"button\\\"\\n>\\n <div class=\\\"hds-dropdown-toggle-icon__wrapper\\\">\\n {{#if @imageSrc}}\\n {{#if this.hasImage}}\\n <img src={{@imageSrc}} alt=\\\"\\\" role=\\\"presentation\\\" {{on \\\"error\\\" this.onImageLoadError}} />\\n {{else}}\\n <FlightIcon @name=\\\"user\\\" @size={{this.iconSize}} />\\n {{/if}}\\n {{else if @icon}}\\n <FlightIcon @name={{@icon}} @size={{this.iconSize}} />\\n {{/if}}\\n </div>\\n {{#if this.hasChevron}}\\n <Hds::Dropdown::Toggle::Chevron />\\n {{/if}}\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\n\nexport const DEFAULT_SIZE = 'medium';\nexport const SIZES = ['small', 'medium'];\n\nconst NOOP = () => {};\n\nexport default class HdsDropdownToggleIconComponent extends Component {\n @tracked hasImage = true;\n\n constructor() {\n super(...arguments);\n if (!(this.args.icon || this.args.imageSrc)) {\n assert(\n '@icon or @imageSrc must be defined for \"Hds::Dropdown::Toggle::Icon\"'\n );\n }\n }\n\n @action\n onDidUpdateImageSrc() {\n this.hasImage = true;\n }\n\n @action\n onImageLoadError() {\n this.hasImage = false;\n }\n\n /**\n * @param text\n * @type {string}\n * @description The text of the `aria-label` applied to the toggle\n */\n get text() {\n let { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::Toggle::Icon\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the button; acceptable values are `small` and `medium`\n */\n get size() {\n let { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Dropdown::Toggle::Icon\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @default 24\n * @description ensures that the correct icon size is used\n */\n get iconSize() {\n if (this.args.size === 'small') {\n return '16';\n } else {\n return '24';\n }\n }\n\n /**\n * Indicates if a dropdown chevron icon should be displayed; should be displayed unless the \"more-horizontal\" icon is used.\n *\n * @param hasChevron\n * @type {boolean}\n * @default true\n */\n get hasChevron() {\n return this.args.hasChevron ?? true;\n }\n\n /**\n * @param onClick\n * @type {function}\n * @default () => {}\n */\n get onClick() {\n let { onClick } = this.args;\n\n // notice: this is a guard used in case the toggle is used as standalone element (eg. in the showcase)\n // in reality it's always used inside the Dropdown main component as yielded component, so the onClick handler is always defined\n if (typeof onClick === 'function') {\n return onClick;\n } else {\n return NOOP;\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method ToggleIcon#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-dropdown-toggle-icon'];\n\n // add a class based on the @size argument\n classes.push(`hds-dropdown-toggle-icon--size-${this.size}`);\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-dropdown-toggle-icon--is-open');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_SIZE","SIZES","NOOP","HdsDropdownToggleIconComponent","_class","Component","constructor","arguments","_initializerDefineProperty","_descriptor","args","icon","imageSrc","assert","onDidUpdateImageSrc","hasImage","onImageLoadError","text","undefined","size","join","includes","iconSize","hasChevron","onClick","classNames","classes","push","isOpen","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,81BAA81B;;;ACSz3B,MAAMA,YAAY,GAAG,SAAQ;MACvBC,KAAK,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAC;AAExC,MAAMC,IAAI,GAAGA,MAAM,EAAE,CAAA;AAEAC,IAAAA,8BAA8B,IAAAC,MAAA,GAApC,MAAMD,8BAA8B,SAASE,SAAS,CAAC;AAGpEC,EAAAA,WAAWA,GAAG;IACZ,KAAK,CAAC,GAAGC,SAAS,CAAC,CAAA;AAACC,IA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BAAAA,CAAAA,EAAAA,MAAA,CAAA0B,SAAA,CAAA,EAAAD,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,uBAKNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,EAAA,kBAAA,CAAA,EAAA1B,MAAA,CAAA0B,SAAA,IAAA1B,MAAA,EAAA;AAjB0CmC,oBAAA,CAAAC,QAAA,
|
|
1
|
+
{"version":3,"file":"icon.js","sources":["../../../../../src/components/hds/dropdown/toggle/icon.hbs","../../../../../src/components/hds/dropdown/toggle/icon.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button\\n class={{this.classNames}}\\n aria-label={{this.text}}\\n ...attributes\\n aria-expanded={{if @isOpen \\\"true\\\" \\\"false\\\"}}\\n {{on \\\"click\\\" this.onClick}}\\n {{did-update this.onDidUpdateImageSrc @imageSrc}}\\n type=\\\"button\\\"\\n>\\n <div class=\\\"hds-dropdown-toggle-icon__wrapper\\\">\\n {{#if @imageSrc}}\\n {{#if this.hasImage}}\\n <img src={{@imageSrc}} alt=\\\"\\\" role=\\\"presentation\\\" {{on \\\"error\\\" this.onImageLoadError}} />\\n {{else}}\\n <FlightIcon @name=\\\"user\\\" @size={{this.iconSize}} />\\n {{/if}}\\n {{else if @icon}}\\n <FlightIcon @name={{@icon}} @size={{this.iconSize}} />\\n {{/if}}\\n </div>\\n {{#if this.hasChevron}}\\n <Hds::Dropdown::Toggle::Chevron />\\n {{/if}}\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\n\nexport const DEFAULT_SIZE = 'medium';\nexport const SIZES = ['small', 'medium'];\n\nconst NOOP = () => {};\n\nexport default class HdsDropdownToggleIconComponent extends Component {\n @tracked hasImage = true;\n\n constructor() {\n super(...arguments);\n if (!(this.args.icon || this.args.imageSrc)) {\n assert(\n '@icon or @imageSrc must be defined for \"Hds::Dropdown::Toggle::Icon\"'\n );\n }\n }\n\n @action\n onDidUpdateImageSrc() {\n this.hasImage = true;\n }\n\n @action\n onImageLoadError() {\n this.hasImage = false;\n }\n\n /**\n * @param text\n * @type {string}\n * @description The text of the `aria-label` applied to the toggle\n */\n get text() {\n let { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::Toggle::Icon\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the button; acceptable values are `small` and `medium`\n */\n get size() {\n let { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Dropdown::Toggle::Icon\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @default 24\n * @description ensures that the correct icon size is used\n */\n get iconSize() {\n if (this.args.size === 'small') {\n return '16';\n } else {\n return '24';\n }\n }\n\n /**\n * Indicates if a dropdown chevron icon should be displayed; should be displayed unless the \"more-horizontal\" icon is used.\n *\n * @param hasChevron\n * @type {boolean}\n * @default true\n */\n get hasChevron() {\n return this.args.hasChevron ?? true;\n }\n\n /**\n * @param onClick\n * @type {function}\n * @default () => {}\n */\n get onClick() {\n let { onClick } = this.args;\n\n // notice: this is a guard used in case the toggle is used as standalone element (eg. in the showcase)\n // in reality it's always used inside the Dropdown main component as yielded component, so the onClick handler is always defined\n if (typeof onClick === 'function') {\n return onClick;\n } else {\n return NOOP;\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method ToggleIcon#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-dropdown-toggle-icon'];\n\n // add a class based on the @size argument\n classes.push(`hds-dropdown-toggle-icon--size-${this.size}`);\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-dropdown-toggle-icon--is-open');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_SIZE","SIZES","NOOP","HdsDropdownToggleIconComponent","_class","Component","constructor","arguments","_initializerDefineProperty","_descriptor","args","icon","imageSrc","assert","onDidUpdateImageSrc","hasImage","onImageLoadError","text","undefined","size","join","includes","iconSize","hasChevron","onClick","classNames","classes","push","isOpen","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,81BAA81B;;;ACSz3B,MAAMA,YAAY,GAAG,SAAQ;MACvBC,KAAK,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAC;AAExC,MAAMC,IAAI,GAAGA,MAAM,EAAE,CAAA;AAEAC,IAAAA,8BAA8B,IAAAC,MAAA,GAApC,MAAMD,8BAA8B,SAASE,SAAS,CAAC;AAGpEC,EAAAA,WAAWA,GAAG;IACZ,KAAK,CAAC,GAAGC,SAAS,CAAC,CAAA;AAACC,IAAAA,0BAAA,mBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AACpB,IAAA,IAAI,EAAE,IAAI,CAACC,IAAI,CAACC,IAAI,IAAI,IAAI,CAACD,IAAI,CAACE,QAAQ,CAAC,EAAE;MAC3CC,MAAM,CACJ,sEACF,CAAC,CAAA;AACH,KAAA;AACF,GAAA;AAGAC,EAAAA,mBAAmBA,GAAG;IACpB,IAAI,CAACC,QAAQ,GAAG,IAAI,CAAA;AACtB,GAAA;AAGAC,EAAAA,gBAAgBA,GAAG;IACjB,IAAI,CAACD,QAAQ,GAAG,KAAK,CAAA;AACvB,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,IAAIA,GAAG;IACT,IAAI;AAAEA,MAAAA,IAAAA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AO,GAAG,CAAC,0BAA0B,CAAC,CAAA;;AAE1C;IACAA,OAAO,CAACC,IAAI,CAAE,CAAA,+BAAA,EAAiC,IAAI,CAACR,IAAK,EAAC,CAAC,CAAA;;AAE3D;AACA,IAAA,IAAI,IAAI,CAACT,IAAI,CAACkB,MAAM,EAAE;AACpBF,MAAAA,OAAO,CAACC,IAAI,CAAC,mCAAmC,CAAC,CAAA;AACnD,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACN,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAC,GAAAX,WAAA,GAAAoB,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,EAAA,UAAA,EAAA,CApHEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAY,IAAI,CAAA;AAAA,GAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,EAAA,qBAAA,EAAA,CAWvBM,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,EAAA1B,qBAAAA,CAAAA,EAAAA,MAAA,CAAA0B,SAAA,CAAA,EAAAD,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,uBAKNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,EAAA,kBAAA,CAAA,EAAA1B,MAAA,CAAA0B,SAAA,IAAA1B,MAAA,EAAA;AAjB0CmC,oBAAA,CAAAC,QAAA,EAA9BrC,8BAA8B,CAAA;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-NoJJJNhk.js';
|
|
2
2
|
import Component from '@glimmer/component';
|
|
3
3
|
import { tracked } from '@glimmer/tracking';
|
|
4
4
|
import { action } from '@ember/object';
|