@hashicorp/design-system-components 3.6.0 → 4.0.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/README.md +2 -0
- package/addon-main.js +7 -0
- package/dist/LICENSE.md +375 -0
- package/dist/README.md +69 -0
- package/dist/_app_/components/hds/accordion/index.js +1 -0
- package/dist/_app_/components/hds/accordion/item/button.js +1 -0
- package/dist/_app_/components/hds/accordion/item/index.js +1 -0
- package/dist/_app_/components/hds/alert/description.js +1 -0
- package/dist/_app_/components/hds/alert/index.js +1 -0
- package/dist/_app_/components/hds/alert/title.js +1 -0
- package/dist/_app_/components/hds/app-footer/copyright.js +1 -0
- package/dist/_app_/components/hds/app-footer/index.js +1 -0
- package/dist/_app_/components/hds/app-footer/item.js +1 -0
- package/dist/_app_/components/hds/app-footer/legal-links.js +1 -0
- package/dist/_app_/components/hds/app-footer/link.js +1 -0
- package/dist/_app_/components/hds/app-footer/status-link.js +1 -0
- package/dist/_app_/components/hds/app-frame/index.js +1 -0
- package/dist/_app_/components/hds/app-frame/parts/footer.js +1 -0
- package/dist/_app_/components/hds/app-frame/parts/header.js +1 -0
- package/dist/_app_/components/hds/app-frame/parts/main.js +1 -0
- package/dist/_app_/components/hds/app-frame/parts/modals.js +1 -0
- package/dist/_app_/components/hds/app-frame/parts/sidebar.js +1 -0
- package/dist/_app_/components/hds/application-state/body.js +1 -0
- package/dist/_app_/components/hds/application-state/footer.js +1 -0
- package/dist/_app_/components/hds/application-state/header.js +1 -0
- package/dist/_app_/components/hds/application-state/index.js +1 -0
- package/dist/_app_/components/hds/badge/index.js +1 -0
- package/dist/_app_/components/hds/badge-count/index.js +1 -0
- package/dist/_app_/components/hds/breadcrumb/index.js +1 -0
- package/dist/_app_/components/hds/breadcrumb/item.js +1 -0
- package/dist/_app_/components/hds/breadcrumb/truncation.js +1 -0
- package/dist/_app_/components/hds/button/index.js +1 -0
- package/dist/_app_/components/hds/button-set/index.js +1 -0
- package/dist/_app_/components/hds/card/container.js +1 -0
- package/dist/_app_/components/hds/code-block/copy-button.js +1 -0
- package/dist/_app_/components/hds/code-block/description.js +1 -0
- package/dist/_app_/components/hds/code-block/index.js +1 -0
- package/dist/_app_/components/hds/code-block/title.js +1 -0
- package/dist/_app_/components/hds/copy/button/index.js +1 -0
- package/dist/_app_/components/hds/copy/snippet/index.js +1 -0
- package/dist/_app_/components/hds/disclosure-primitive/index.js +1 -0
- package/dist/_app_/components/hds/dismiss-button/index.js +1 -0
- package/dist/_app_/components/hds/dropdown/footer.js +1 -0
- package/dist/_app_/components/hds/dropdown/header.js +1 -0
- package/dist/_app_/components/hds/dropdown/index.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/checkbox.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/checkmark.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/copy-item.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/description.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/generic.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/interactive.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/radio.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/separator.js +1 -0
- package/dist/_app_/components/hds/dropdown/list-item/title.js +1 -0
- package/dist/_app_/components/hds/dropdown/toggle/button.js +1 -0
- package/dist/_app_/components/hds/dropdown/toggle/chevron.js +1 -0
- package/dist/_app_/components/hds/dropdown/toggle/icon.js +1 -0
- package/dist/_app_/components/hds/flyout/body.js +1 -0
- package/dist/_app_/components/hds/flyout/description.js +1 -0
- package/dist/_app_/components/hds/flyout/footer.js +1 -0
- package/dist/_app_/components/hds/flyout/header.js +1 -0
- package/dist/_app_/components/hds/flyout/index.js +1 -0
- package/dist/_app_/components/hds/form/character-count/index.js +1 -0
- package/dist/_app_/components/hds/form/checkbox/base.js +1 -0
- package/dist/_app_/components/hds/form/checkbox/field.js +1 -0
- package/dist/_app_/components/hds/form/checkbox/group.js +1 -0
- package/dist/_app_/components/hds/form/error/index.js +1 -0
- package/dist/_app_/components/hds/form/error/message.js +1 -0
- package/dist/_app_/components/hds/form/field/index.js +1 -0
- package/dist/_app_/components/hds/form/fieldset/index.js +1 -0
- package/dist/_app_/components/hds/form/file-input/base.js +1 -0
- package/dist/_app_/components/hds/form/file-input/field.js +1 -0
- package/dist/_app_/components/hds/form/helper-text/index.js +1 -0
- package/dist/_app_/components/hds/form/indicator/index.js +1 -0
- package/dist/_app_/components/hds/form/label/index.js +1 -0
- package/dist/_app_/components/hds/form/legend/index.js +1 -0
- package/dist/_app_/components/hds/form/masked-input/base.js +1 -0
- package/dist/_app_/components/hds/form/masked-input/field.js +1 -0
- package/dist/_app_/components/hds/form/radio/base.js +1 -0
- package/dist/_app_/components/hds/form/radio/field.js +1 -0
- package/dist/_app_/components/hds/form/radio/group.js +1 -0
- package/dist/_app_/components/hds/form/radio-card/description.js +1 -0
- package/dist/_app_/components/hds/form/radio-card/group.js +1 -0
- package/dist/_app_/components/hds/form/radio-card/index.js +1 -0
- package/dist/_app_/components/hds/form/radio-card/label.js +1 -0
- package/dist/_app_/components/hds/form/select/base.js +1 -0
- package/dist/_app_/components/hds/form/select/field.js +1 -0
- package/dist/_app_/components/hds/form/text-input/base.js +1 -0
- package/dist/_app_/components/hds/form/text-input/field.js +1 -0
- package/dist/_app_/components/hds/form/textarea/base.js +1 -0
- package/dist/_app_/components/hds/form/textarea/field.js +1 -0
- package/dist/_app_/components/hds/form/toggle/base.js +1 -0
- package/dist/_app_/components/hds/form/toggle/field.js +1 -0
- package/dist/_app_/components/hds/form/toggle/group.js +1 -0
- package/dist/_app_/components/hds/form/visibility-toggle/index.js +1 -0
- package/dist/_app_/components/hds/icon-tile/index.js +1 -0
- package/dist/_app_/components/hds/interactive/index.js +1 -0
- package/dist/_app_/components/hds/link/inline.js +1 -0
- package/dist/_app_/components/hds/link/standalone.js +1 -0
- package/dist/_app_/components/hds/menu-primitive/index.js +1 -0
- package/dist/_app_/components/hds/modal/body.js +1 -0
- package/dist/_app_/components/hds/modal/footer.js +1 -0
- package/dist/_app_/components/hds/modal/header.js +1 -0
- package/dist/_app_/components/hds/modal/index.js +1 -0
- package/dist/_app_/components/hds/page-header/actions.js +1 -0
- package/dist/_app_/components/hds/page-header/badges.js +1 -0
- package/dist/_app_/components/hds/page-header/description.js +1 -0
- package/dist/_app_/components/hds/page-header/index.js +1 -0
- package/dist/_app_/components/hds/page-header/subtitle.js +1 -0
- package/dist/_app_/components/hds/page-header/title.js +1 -0
- package/dist/_app_/components/hds/pagination/compact/index.js +1 -0
- package/dist/_app_/components/hds/pagination/info/index.js +1 -0
- package/dist/_app_/components/hds/pagination/nav/arrow.js +1 -0
- package/dist/_app_/components/hds/pagination/nav/ellipsis.js +1 -0
- package/dist/_app_/components/hds/pagination/nav/number.js +1 -0
- package/dist/_app_/components/hds/pagination/numbered/index.js +1 -0
- package/dist/_app_/components/hds/pagination/size-selector/index.js +1 -0
- package/dist/_app_/components/hds/reveal/index.js +1 -0
- package/dist/_app_/components/hds/reveal/toggle/button.js +1 -0
- package/dist/_app_/components/hds/segmented-group/index.js +1 -0
- package/dist/_app_/components/hds/separator/index.js +1 -0
- package/dist/_app_/components/hds/side-nav/base.js +1 -0
- package/dist/_app_/components/hds/side-nav/header/home-link.js +1 -0
- package/dist/_app_/components/hds/side-nav/header/icon-button.js +1 -0
- package/dist/_app_/components/hds/side-nav/header/index.js +1 -0
- package/dist/_app_/components/hds/side-nav/index.js +1 -0
- package/dist/_app_/components/hds/side-nav/list/back-link.js +1 -0
- package/dist/_app_/components/hds/side-nav/list/index.js +1 -0
- package/dist/_app_/components/hds/side-nav/list/item.js +1 -0
- package/dist/_app_/components/hds/side-nav/list/link.js +1 -0
- package/dist/_app_/components/hds/side-nav/list/title.js +1 -0
- package/dist/_app_/components/hds/side-nav/portal/index.js +1 -0
- package/dist/_app_/components/hds/side-nav/portal/target.js +1 -0
- package/dist/_app_/components/hds/side-nav/toggle-button.js +1 -0
- package/dist/_app_/components/hds/stepper/step/indicator.js +1 -0
- package/dist/_app_/components/hds/stepper/task/indicator.js +1 -0
- package/dist/_app_/components/hds/table/index.js +1 -0
- package/dist/_app_/components/hds/table/td.js +1 -0
- package/dist/_app_/components/hds/table/th-button-sort.js +1 -0
- package/dist/_app_/components/hds/table/th-button-tooltip.js +1 -0
- package/dist/_app_/components/hds/table/th-selectable.js +1 -0
- package/dist/_app_/components/hds/table/th-sort.js +1 -0
- package/dist/_app_/components/hds/table/th.js +1 -0
- package/dist/_app_/components/hds/table/tr.js +1 -0
- package/dist/_app_/components/hds/tabs/index.js +1 -0
- package/dist/_app_/components/hds/tabs/panel.js +1 -0
- package/dist/_app_/components/hds/tabs/tab.js +1 -0
- package/dist/_app_/components/hds/tag/index.js +1 -0
- package/dist/_app_/components/hds/text/body.js +1 -0
- package/dist/_app_/components/hds/text/code.js +1 -0
- package/dist/_app_/components/hds/text/display.js +1 -0
- package/dist/_app_/components/hds/text/index.js +1 -0
- package/dist/_app_/components/hds/toast/index.js +1 -0
- package/dist/_app_/components/hds/tooltip-button/index.js +1 -0
- package/dist/_app_/components/hds/yield/index.js +1 -0
- package/dist/_app_/helpers/hds-link-to-models.js +1 -0
- package/dist/_app_/helpers/hds-link-to-query.js +1 -0
- package/dist/_app_/modifiers/hds-clipboard.js +1 -0
- package/dist/_app_/modifiers/hds-tooltip.js +1 -0
- package/dist/_rollupPluginBabelHelpers-lqPQKyNs.js +78 -0
- package/dist/_rollupPluginBabelHelpers-lqPQKyNs.js.map +1 -0
- package/dist/components/hds/accordion/index.js +10 -0
- package/dist/components/hds/accordion/index.js.map +1 -0
- package/dist/components/hds/accordion/item/button.js +36 -0
- package/dist/components/hds/accordion/item/button.js.map +1 -0
- package/dist/components/hds/accordion/item/index.js +62 -0
- package/dist/components/hds/accordion/item/index.js.map +1 -0
- package/dist/components/hds/alert/description.js +10 -0
- package/dist/components/hds/alert/description.js.map +1 -0
- package/dist/components/hds/alert/index.js +153 -0
- package/dist/components/hds/alert/index.js.map +1 -0
- package/dist/components/hds/alert/title.js +10 -0
- package/dist/components/hds/alert/title.js.map +1 -0
- package/dist/components/hds/app-footer/copyright.js +26 -0
- package/dist/components/hds/app-footer/copyright.js.map +1 -0
- package/dist/components/hds/app-footer/index.js +48 -0
- package/dist/components/hds/app-footer/index.js.map +1 -0
- package/dist/components/hds/app-footer/item.js +10 -0
- package/dist/components/hds/app-footer/item.js.map +1 -0
- package/dist/components/hds/app-footer/legal-links.js +70 -0
- package/dist/components/hds/app-footer/legal-links.js.map +1 -0
- package/dist/components/hds/app-footer/link.js +10 -0
- package/dist/components/hds/app-footer/link.js.map +1 -0
- package/dist/components/hds/app-footer/status-link.js +116 -0
- package/dist/components/hds/app-footer/status-link.js.map +1 -0
- package/dist/components/hds/app-frame/index.js +60 -0
- package/dist/components/hds/app-frame/index.js.map +1 -0
- package/dist/components/hds/app-frame/parts/footer.js +10 -0
- package/dist/components/hds/app-frame/parts/footer.js.map +1 -0
- package/dist/components/hds/app-frame/parts/header.js +10 -0
- package/dist/components/hds/app-frame/parts/header.js.map +1 -0
- package/dist/components/hds/app-frame/parts/main.js +10 -0
- package/dist/components/hds/app-frame/parts/main.js.map +1 -0
- package/dist/components/hds/app-frame/parts/modals.js +10 -0
- package/dist/components/hds/app-frame/parts/modals.js.map +1 -0
- package/dist/components/hds/app-frame/parts/sidebar.js +10 -0
- package/dist/components/hds/app-frame/parts/sidebar.js.map +1 -0
- package/dist/components/hds/application-state/body.js +10 -0
- package/dist/components/hds/application-state/body.js.map +1 -0
- package/dist/components/hds/application-state/footer.js +42 -0
- package/dist/components/hds/application-state/footer.js.map +1 -0
- package/dist/components/hds/application-state/header.js +10 -0
- package/dist/components/hds/application-state/header.js.map +1 -0
- package/dist/components/hds/application-state/index.js +10 -0
- package/dist/components/hds/application-state/index.js.map +1 -0
- package/dist/components/hds/badge/index.js +127 -0
- package/dist/components/hds/badge/index.js.map +1 -0
- package/dist/components/hds/badge-count/index.js +90 -0
- package/dist/components/hds/badge-count/index.js.map +1 -0
- package/dist/components/hds/breadcrumb/index.js +66 -0
- package/dist/components/hds/breadcrumb/index.js.map +1 -0
- package/dist/components/hds/breadcrumb/item.js +59 -0
- package/dist/components/hds/breadcrumb/item.js.map +1 -0
- package/dist/components/hds/breadcrumb/truncation.js +25 -0
- package/dist/components/hds/breadcrumb/truncation.js.map +1 -0
- package/dist/components/hds/button/index.js +157 -0
- package/dist/components/hds/button/index.js.map +1 -0
- package/dist/components/hds/button-set/index.js +10 -0
- package/dist/components/hds/button-set/index.js.map +1 -0
- package/dist/components/hds/card/container.js +130 -0
- package/dist/components/hds/card/container.js.map +1 -0
- package/dist/components/hds/code-block/copy-button.js +10 -0
- package/dist/components/hds/code-block/copy-button.js.map +1 -0
- package/dist/components/hds/code-block/description.js +10 -0
- package/dist/components/hds/code-block/description.js.map +1 -0
- package/dist/components/hds/code-block/index.js +160 -0
- package/dist/components/hds/code-block/index.js.map +1 -0
- package/dist/components/hds/code-block/title.js +10 -0
- package/dist/components/hds/code-block/title.js.map +1 -0
- package/dist/components/hds/copy/button/index.js +109 -0
- package/dist/components/hds/copy/button/index.js.map +1 -0
- package/dist/components/hds/copy/snippet/index.js +142 -0
- package/dist/components/hds/copy/snippet/index.js.map +1 -0
- package/dist/components/hds/disclosure-primitive/index.js +41 -0
- package/dist/components/hds/disclosure-primitive/index.js.map +1 -0
- package/dist/components/hds/dismiss-button/index.js +25 -0
- package/dist/components/hds/dismiss-button/index.js.map +1 -0
- package/dist/components/hds/dropdown/footer.js +10 -0
- package/dist/components/hds/dropdown/footer.js.map +1 -0
- package/dist/components/hds/dropdown/header.js +10 -0
- package/dist/components/hds/dropdown/header.js.map +1 -0
- package/dist/components/hds/dropdown/index.js +72 -0
- package/dist/components/hds/dropdown/index.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/checkbox.js +24 -0
- package/dist/components/hds/dropdown/list-item/checkbox.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/checkmark.js +31 -0
- package/dist/components/hds/dropdown/list-item/checkmark.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/copy-item.js +53 -0
- package/dist/components/hds/dropdown/list-item/copy-item.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/description.js +30 -0
- package/dist/components/hds/dropdown/list-item/description.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/generic.js +10 -0
- package/dist/components/hds/dropdown/list-item/generic.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/interactive.js +59 -0
- package/dist/components/hds/dropdown/list-item/interactive.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/radio.js +24 -0
- package/dist/components/hds/dropdown/list-item/radio.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/separator.js +10 -0
- package/dist/components/hds/dropdown/list-item/separator.js.map +1 -0
- package/dist/components/hds/dropdown/list-item/title.js +30 -0
- package/dist/components/hds/dropdown/list-item/title.js.map +1 -0
- package/dist/components/hds/dropdown/toggle/button.js +134 -0
- package/dist/components/hds/dropdown/toggle/button.js.map +1 -0
- package/dist/components/hds/dropdown/toggle/chevron.js +10 -0
- package/dist/components/hds/dropdown/toggle/chevron.js.map +1 -0
- package/dist/components/hds/dropdown/toggle/icon.js +116 -0
- package/dist/components/hds/dropdown/toggle/icon.js.map +1 -0
- package/dist/components/hds/flyout/body.js +10 -0
- package/dist/components/hds/flyout/body.js.map +1 -0
- package/dist/components/hds/flyout/description.js +10 -0
- package/dist/components/hds/flyout/description.js.map +1 -0
- package/dist/components/hds/flyout/footer.js +10 -0
- package/dist/components/hds/flyout/footer.js.map +1 -0
- package/dist/components/hds/flyout/header.js +10 -0
- package/dist/components/hds/flyout/header.js.map +1 -0
- package/dist/components/hds/flyout/index.js +156 -0
- package/dist/components/hds/flyout/index.js.map +1 -0
- package/dist/components/hds/form/character-count/index.js +149 -0
- package/dist/components/hds/form/character-count/index.js.map +1 -0
- package/dist/components/hds/form/checkbox/base.js +10 -0
- package/dist/components/hds/form/checkbox/base.js.map +1 -0
- package/dist/components/hds/form/checkbox/field.js +10 -0
- package/dist/components/hds/form/checkbox/field.js.map +1 -0
- package/dist/components/hds/form/checkbox/group.js +10 -0
- package/dist/components/hds/form/checkbox/group.js.map +1 -0
- package/dist/components/hds/form/error/index.js +68 -0
- package/dist/components/hds/form/error/index.js.map +1 -0
- package/dist/components/hds/form/error/message.js +10 -0
- package/dist/components/hds/form/error/message.js.map +1 -0
- package/dist/components/hds/form/field/index.js +107 -0
- package/dist/components/hds/form/field/index.js.map +1 -0
- package/dist/components/hds/form/fieldset/index.js +93 -0
- package/dist/components/hds/form/fieldset/index.js.map +1 -0
- package/dist/components/hds/form/file-input/base.js +10 -0
- package/dist/components/hds/form/file-input/base.js.map +1 -0
- package/dist/components/hds/form/file-input/field.js +10 -0
- package/dist/components/hds/form/file-input/field.js.map +1 -0
- package/dist/components/hds/form/helper-text/index.js +68 -0
- package/dist/components/hds/form/helper-text/index.js.map +1 -0
- package/dist/components/hds/form/indicator/index.js +30 -0
- package/dist/components/hds/form/indicator/index.js.map +1 -0
- package/dist/components/hds/form/label/index.js +36 -0
- package/dist/components/hds/form/label/index.js.map +1 -0
- package/dist/components/hds/form/legend/index.js +36 -0
- package/dist/components/hds/form/legend/index.js.map +1 -0
- package/dist/components/hds/form/masked-input/base.js +96 -0
- package/dist/components/hds/form/masked-input/base.js.map +1 -0
- package/dist/components/hds/form/masked-input/field.js +10 -0
- package/dist/components/hds/form/masked-input/field.js.map +1 -0
- package/dist/components/hds/form/radio/base.js +10 -0
- package/dist/components/hds/form/radio/base.js.map +1 -0
- package/dist/components/hds/form/radio/field.js +10 -0
- package/dist/components/hds/form/radio/field.js.map +1 -0
- package/dist/components/hds/form/radio/group.js +10 -0
- package/dist/components/hds/form/radio/group.js.map +1 -0
- package/dist/components/hds/form/radio-card/description.js +10 -0
- package/dist/components/hds/form/radio-card/description.js.map +1 -0
- package/dist/components/hds/form/radio-card/group.js +10 -0
- package/dist/components/hds/form/radio-card/group.js.map +1 -0
- package/dist/components/hds/form/radio-card/index.js +107 -0
- package/dist/components/hds/form/radio-card/index.js.map +1 -0
- package/dist/components/hds/form/radio-card/label.js +10 -0
- package/dist/components/hds/form/radio-card/label.js.map +1 -0
- package/dist/components/hds/form/select/base.js +34 -0
- package/dist/components/hds/form/select/base.js.map +1 -0
- package/dist/components/hds/form/select/field.js +10 -0
- package/dist/components/hds/form/select/field.js.map +1 -0
- package/dist/components/hds/form/text-input/base.js +62 -0
- package/dist/components/hds/form/text-input/base.js.map +1 -0
- package/dist/components/hds/form/text-input/field.js +85 -0
- package/dist/components/hds/form/text-input/field.js.map +1 -0
- package/dist/components/hds/form/textarea/base.js +34 -0
- package/dist/components/hds/form/textarea/base.js.map +1 -0
- package/dist/components/hds/form/textarea/field.js +10 -0
- package/dist/components/hds/form/textarea/field.js.map +1 -0
- package/dist/components/hds/form/toggle/base.js +10 -0
- package/dist/components/hds/form/toggle/base.js.map +1 -0
- package/dist/components/hds/form/toggle/field.js +10 -0
- package/dist/components/hds/form/toggle/field.js.map +1 -0
- package/dist/components/hds/form/toggle/group.js +10 -0
- package/dist/components/hds/form/toggle/group.js.map +1 -0
- package/dist/components/hds/form/visibility-toggle/index.js +10 -0
- package/dist/components/hds/form/visibility-toggle/index.js.map +1 -0
- package/dist/components/hds/icon-tile/index.js +158 -0
- package/dist/components/hds/icon-tile/index.js.map +1 -0
- package/dist/components/hds/interactive/index.js +41 -0
- package/dist/components/hds/interactive/index.js.map +1 -0
- package/dist/components/hds/link/inline.js +72 -0
- package/dist/components/hds/link/inline.js.map +1 -0
- package/dist/components/hds/link/standalone.js +132 -0
- package/dist/components/hds/link/standalone.js.map +1 -0
- package/dist/components/hds/menu-primitive/index.js +68 -0
- package/dist/components/hds/menu-primitive/index.js.map +1 -0
- package/dist/components/hds/modal/body.js +10 -0
- package/dist/components/hds/modal/body.js.map +1 -0
- package/dist/components/hds/modal/footer.js +10 -0
- package/dist/components/hds/modal/footer.js.map +1 -0
- package/dist/components/hds/modal/header.js +10 -0
- package/dist/components/hds/modal/header.js.map +1 -0
- package/dist/components/hds/modal/index.js +196 -0
- package/dist/components/hds/modal/index.js.map +1 -0
- package/dist/components/hds/page-header/actions.js +10 -0
- package/dist/components/hds/page-header/actions.js.map +1 -0
- package/dist/components/hds/page-header/badges.js +10 -0
- package/dist/components/hds/page-header/badges.js.map +1 -0
- package/dist/components/hds/page-header/description.js +10 -0
- package/dist/components/hds/page-header/description.js.map +1 -0
- package/dist/components/hds/page-header/index.js +10 -0
- package/dist/components/hds/page-header/index.js.map +1 -0
- package/dist/components/hds/page-header/subtitle.js +10 -0
- package/dist/components/hds/page-header/subtitle.js.map +1 -0
- package/dist/components/hds/page-header/title.js +10 -0
- package/dist/components/hds/page-header/title.js.map +1 -0
- package/dist/components/hds/pagination/compact/index.js +159 -0
- package/dist/components/hds/pagination/compact/index.js.map +1 -0
- package/dist/components/hds/pagination/info/index.js +25 -0
- package/dist/components/hds/pagination/info/index.js.map +1 -0
- package/dist/components/hds/pagination/nav/arrow.js +70 -0
- package/dist/components/hds/pagination/nav/arrow.js.map +1 -0
- package/dist/components/hds/pagination/nav/ellipsis.js +10 -0
- package/dist/components/hds/pagination/nav/ellipsis.js.map +1 -0
- package/dist/components/hds/pagination/nav/number.js +44 -0
- package/dist/components/hds/pagination/nav/number.js.map +1 -0
- package/dist/components/hds/pagination/numbered/index.js +305 -0
- package/dist/components/hds/pagination/numbered/index.js.map +1 -0
- package/dist/components/hds/pagination/size-selector/index.js +72 -0
- package/dist/components/hds/pagination/size-selector/index.js.map +1 -0
- package/dist/components/hds/reveal/index.js +36 -0
- package/dist/components/hds/reveal/index.js.map +1 -0
- package/dist/components/hds/reveal/toggle/button.js +31 -0
- package/dist/components/hds/reveal/toggle/button.js.map +1 -0
- package/dist/components/hds/segmented-group/index.js +10 -0
- package/dist/components/hds/segmented-group/index.js.map +1 -0
- package/dist/components/hds/separator/index.js +48 -0
- package/dist/components/hds/separator/index.js.map +1 -0
- package/dist/components/hds/side-nav/base.js +10 -0
- package/dist/components/hds/side-nav/base.js.map +1 -0
- package/dist/components/hds/side-nav/header/home-link.js +30 -0
- package/dist/components/hds/side-nav/header/home-link.js.map +1 -0
- package/dist/components/hds/side-nav/header/icon-button.js +30 -0
- package/dist/components/hds/side-nav/header/icon-button.js.map +1 -0
- package/dist/components/hds/side-nav/header/index.js +10 -0
- package/dist/components/hds/side-nav/header/index.js.map +1 -0
- package/dist/components/hds/side-nav/index.js +176 -0
- package/dist/components/hds/side-nav/index.js.map +1 -0
- package/dist/components/hds/side-nav/list/back-link.js +10 -0
- package/dist/components/hds/side-nav/list/back-link.js.map +1 -0
- package/dist/components/hds/side-nav/list/index.js +10 -0
- package/dist/components/hds/side-nav/list/index.js.map +1 -0
- package/dist/components/hds/side-nav/list/item.js +10 -0
- package/dist/components/hds/side-nav/list/item.js.map +1 -0
- package/dist/components/hds/side-nav/list/link.js +10 -0
- package/dist/components/hds/side-nav/list/link.js.map +1 -0
- package/dist/components/hds/side-nav/list/title.js +10 -0
- package/dist/components/hds/side-nav/list/title.js.map +1 -0
- package/dist/components/hds/side-nav/portal/index.js +10 -0
- package/dist/components/hds/side-nav/portal/index.js.map +1 -0
- package/dist/components/hds/side-nav/portal/target.js +173 -0
- package/dist/components/hds/side-nav/portal/target.js.map +1 -0
- package/dist/components/hds/side-nav/toggle-button.js +10 -0
- package/dist/components/hds/side-nav/toggle-button.js.map +1 -0
- package/dist/components/hds/stepper/step/indicator.js +59 -0
- package/dist/components/hds/stepper/step/indicator.js.map +1 -0
- package/dist/components/hds/stepper/task/indicator.js +74 -0
- package/dist/components/hds/stepper/task/indicator.js.map +1 -0
- package/dist/components/hds/table/index.js +269 -0
- package/dist/components/hds/table/index.js.map +1 -0
- package/dist/components/hds/table/td.js +48 -0
- package/dist/components/hds/table/td.js.map +1 -0
- package/dist/components/hds/table/th-button-sort.js +82 -0
- package/dist/components/hds/table/th-button-sort.js.map +1 -0
- package/dist/components/hds/table/th-button-tooltip.js +32 -0
- package/dist/components/hds/table/th-button-tooltip.js.map +1 -0
- package/dist/components/hds/table/th-selectable.js +81 -0
- package/dist/components/hds/table/th-selectable.js.map +1 -0
- package/dist/components/hds/table/th-sort.js +73 -0
- package/dist/components/hds/table/th-sort.js.map +1 -0
- package/dist/components/hds/table/th.js +54 -0
- package/dist/components/hds/table/th.js.map +1 -0
- package/dist/components/hds/table/tr.js +30 -0
- package/dist/components/hds/table/tr.js.map +1 -0
- package/dist/components/hds/tabs/index.js +242 -0
- package/dist/components/hds/tabs/index.js.map +1 -0
- package/dist/components/hds/tabs/panel.js +60 -0
- package/dist/components/hds/tabs/panel.js.map +1 -0
- package/dist/components/hds/tabs/tab.js +94 -0
- package/dist/components/hds/tabs/tab.js.map +1 -0
- package/dist/components/hds/tag/index.js +92 -0
- package/dist/components/hds/tag/index.js.map +1 -0
- package/dist/components/hds/text/body.js +63 -0
- package/dist/components/hds/text/body.js.map +1 -0
- package/dist/components/hds/text/code.js +63 -0
- package/dist/components/hds/text/code.js.map +1 -0
- package/dist/components/hds/text/display.js +76 -0
- package/dist/components/hds/text/display.js.map +1 -0
- package/dist/components/hds/text/index.js +131 -0
- package/dist/components/hds/text/index.js.map +1 -0
- package/dist/components/hds/toast/index.js +10 -0
- package/dist/components/hds/toast/index.js.map +1 -0
- package/dist/components/hds/tooltip-button/index.js +74 -0
- package/dist/components/hds/tooltip-button/index.js.map +1 -0
- package/dist/components/hds/yield/index.js +10 -0
- package/dist/components/hds/yield/index.js.map +1 -0
- package/dist/helpers/hds-link-to-models.js +34 -0
- package/dist/helpers/hds-link-to-models.js.map +1 -0
- package/dist/helpers/hds-link-to-query.js +29 -0
- package/dist/helpers/hds-link-to-query.js.map +1 -0
- package/dist/modifiers/hds-clipboard.js +152 -0
- package/dist/modifiers/hds-clipboard.js.map +1 -0
- package/dist/modifiers/hds-tooltip.js +153 -0
- package/dist/modifiers/hds-tooltip.js.map +1 -0
- package/dist/styles/@hashicorp/design-system-components.css +6600 -0
- package/dist/styles/@hashicorp/design-system-components.scss +67 -0
- package/dist/styles/@hashicorp/design-system-components.scss.map +1 -0
- package/dist/styles/components/flyout.scss +113 -0
- package/dist/styles/components/table.scss +277 -0
- package/dist/styles/components/tabs.scss +152 -0
- package/dist/template-registry.js +2 -0
- package/dist/template-registry.js.map +1 -0
- package/dist/utils/hds-get-element-id.js +22 -0
- package/dist/utils/hds-get-element-id.js.map +1 -0
- package/dist/utils/hds-set-aria-described-by.js +17 -0
- package/dist/utils/hds-set-aria-described-by.js.map +1 -0
- package/package.json +196 -62
- package/.stylelintignore +0 -26
- package/CHANGELOG-FIGMA-COMPONENTS.md +0 -191
- package/CHANGELOG-FIGMA-FOUNDATIONS.md +0 -13
- package/CHANGELOG.md +0 -1609
- package/HOW-TO-TEST-A-COMPONENT-IN-CLOUD-UI.md +0 -100
- package/NEW-COMPONENT-CHECKLIST.md +0 -166
- package/RELEASE.md +0 -40
- package/addon/components/hds/accordion/index.hbs +0 -8
- package/addon/components/hds/accordion/item/button.hbs +0 -16
- package/addon/components/hds/accordion/item/button.js +0 -31
- package/addon/components/hds/accordion/item/index.hbs +0 -41
- package/addon/components/hds/accordion/item/index.js +0 -58
- package/addon/components/hds/alert/description.hbs +0 -5
- package/addon/components/hds/alert/index.hbs +0 -38
- package/addon/components/hds/alert/index.js +0 -164
- package/addon/components/hds/alert/title.hbs +0 -5
- package/addon/components/hds/app-footer/copyright.hbs +0 -9
- package/addon/components/hds/app-footer/copyright.js +0 -18
- package/addon/components/hds/app-footer/index.hbs +0 -20
- package/addon/components/hds/app-footer/index.js +0 -41
- package/addon/components/hds/app-footer/item.hbs +0 -8
- package/addon/components/hds/app-footer/legal-links.hbs +0 -14
- package/addon/components/hds/app-footer/legal-links.js +0 -67
- package/addon/components/hds/app-footer/link.hbs +0 -22
- package/addon/components/hds/app-footer/status-link.hbs +0 -20
- package/addon/components/hds/app-footer/status-link.js +0 -121
- package/addon/components/hds/app-frame/index.hbs +0 -24
- package/addon/components/hds/app-frame/index.js +0 -52
- package/addon/components/hds/app-frame/parts/footer.hbs +0 -7
- package/addon/components/hds/app-frame/parts/header.hbs +0 -7
- package/addon/components/hds/app-frame/parts/main.hbs +0 -7
- package/addon/components/hds/app-frame/parts/modals.hbs +0 -6
- package/addon/components/hds/app-frame/parts/sidebar.hbs +0 -7
- package/addon/components/hds/application-state/body.hbs +0 -13
- package/addon/components/hds/application-state/footer.hbs +0 -7
- package/addon/components/hds/application-state/footer.js +0 -35
- package/addon/components/hds/application-state/header.hbs +0 -20
- package/addon/components/hds/application-state/index.hbs +0 -13
- package/addon/components/hds/badge/index.hbs +0 -18
- package/addon/components/hds/badge/index.js +0 -146
- package/addon/components/hds/badge-count/index.hbs +0 -7
- package/addon/components/hds/badge-count/index.js +0 -99
- package/addon/components/hds/breadcrumb/index.hbs +0 -9
- package/addon/components/hds/breadcrumb/index.js +0 -59
- package/addon/components/hds/breadcrumb/item.hbs +0 -50
- package/addon/components/hds/breadcrumb/item.js +0 -55
- package/addon/components/hds/breadcrumb/truncation.hbs +0 -26
- package/addon/components/hds/breadcrumb/truncation.js +0 -17
- package/addon/components/hds/button/index.hbs +0 -45
- package/addon/components/hds/button/index.ts +0 -199
- package/addon/components/hds/button-set/index.hbs +0 -7
- package/addon/components/hds/card/container.hbs +0 -7
- package/addon/components/hds/card/container.js +0 -161
- package/addon/components/hds/code-block/copy-button.hbs +0 -13
- package/addon/components/hds/code-block/description.hbs +0 -8
- package/addon/components/hds/code-block/index.hbs +0 -27
- package/addon/components/hds/code-block/index.js +0 -167
- package/addon/components/hds/code-block/title.hbs +0 -8
- package/addon/components/hds/copy/button/index.hbs +0 -16
- package/addon/components/hds/copy/button/index.js +0 -103
- package/addon/components/hds/copy/snippet/index.hbs +0 -15
- package/addon/components/hds/copy/snippet/index.js +0 -135
- package/addon/components/hds/disclosure-primitive/index.hbs +0 -14
- package/addon/components/hds/disclosure-primitive/index.js +0 -30
- package/addon/components/hds/dismiss-button/index.hbs +0 -7
- package/addon/components/hds/dismiss-button/index.js +0 -17
- package/addon/components/hds/dropdown/footer.hbs +0 -8
- package/addon/components/hds/dropdown/header.hbs +0 -8
- package/addon/components/hds/dropdown/index.hbs +0 -36
- package/addon/components/hds/dropdown/index.js +0 -80
- package/addon/components/hds/dropdown/list-item/checkbox.hbs +0 -20
- package/addon/components/hds/dropdown/list-item/checkbox.js +0 -16
- package/addon/components/hds/dropdown/list-item/checkmark.hbs +0 -46
- package/addon/components/hds/dropdown/list-item/checkmark.js +0 -28
- package/addon/components/hds/dropdown/list-item/copy-item.hbs +0 -16
- package/addon/components/hds/dropdown/list-item/copy-item.js +0 -51
- package/addon/components/hds/dropdown/list-item/description.hbs +0 -14
- package/addon/components/hds/dropdown/list-item/description.js +0 -25
- package/addon/components/hds/dropdown/list-item/generic.hbs +0 -7
- package/addon/components/hds/dropdown/list-item/interactive.hbs +0 -37
- package/addon/components/hds/dropdown/list-item/interactive.js +0 -64
- package/addon/components/hds/dropdown/list-item/radio.hbs +0 -25
- package/addon/components/hds/dropdown/list-item/radio.js +0 -16
- package/addon/components/hds/dropdown/list-item/separator.hbs +0 -10
- package/addon/components/hds/dropdown/list-item/title.hbs +0 -14
- package/addon/components/hds/dropdown/list-item/title.js +0 -25
- package/addon/components/hds/dropdown/toggle/button.hbs +0 -38
- package/addon/components/hds/dropdown/toggle/button.js +0 -134
- package/addon/components/hds/dropdown/toggle/chevron.hbs +0 -8
- package/addon/components/hds/dropdown/toggle/icon.hbs +0 -23
- package/addon/components/hds/dropdown/toggle/icon.js +0 -119
- package/addon/components/hds/flyout/body.hbs +0 -7
- package/addon/components/hds/flyout/description.hbs +0 -7
- package/addon/components/hds/flyout/footer.hbs +0 -7
- package/addon/components/hds/flyout/header.hbs +0 -18
- package/addon/components/hds/flyout/index.hbs +0 -20
- package/addon/components/hds/flyout/index.js +0 -168
- package/addon/components/hds/form/character-count/index.hbs +0 -28
- package/addon/components/hds/form/character-count/index.js +0 -178
- package/addon/components/hds/form/checkbox/base.hbs +0 -5
- package/addon/components/hds/form/checkbox/field.hbs +0 -24
- package/addon/components/hds/form/checkbox/group.hbs +0 -29
- package/addon/components/hds/form/error/index.hbs +0 -10
- package/addon/components/hds/form/error/index.js +0 -58
- package/addon/components/hds/form/error/message.hbs +0 -7
- package/addon/components/hds/form/field/index.hbs +0 -47
- package/addon/components/hds/form/field/index.js +0 -97
- package/addon/components/hds/form/fieldset/index.hbs +0 -33
- package/addon/components/hds/form/fieldset/index.js +0 -76
- package/addon/components/hds/form/file-input/base.hbs +0 -6
- package/addon/components/hds/form/file-input/field.hbs +0 -24
- package/addon/components/hds/form/helper-text/index.hbs +0 -15
- package/addon/components/hds/form/helper-text/index.js +0 -58
- package/addon/components/hds/form/indicator/index.hbs +0 -10
- package/addon/components/hds/form/indicator/index.js +0 -24
- package/addon/components/hds/form/label/index.hbs +0 -8
- package/addon/components/hds/form/label/index.js +0 -29
- package/addon/components/hds/form/legend/index.hbs +0 -8
- package/addon/components/hds/form/legend/index.js +0 -29
- package/addon/components/hds/form/masked-input/base.hbs +0 -40
- package/addon/components/hds/form/masked-input/base.js +0 -85
- package/addon/components/hds/form/masked-input/field.hbs +0 -33
- package/addon/components/hds/form/radio/base.hbs +0 -5
- package/addon/components/hds/form/radio/field.hbs +0 -24
- package/addon/components/hds/form/radio/group.hbs +0 -29
- package/addon/components/hds/form/radio-card/description.hbs +0 -10
- package/addon/components/hds/form/radio-card/group.hbs +0 -30
- package/addon/components/hds/form/radio-card/index.hbs +0 -24
- package/addon/components/hds/form/radio-card/index.js +0 -100
- package/addon/components/hds/form/radio-card/label.hbs +0 -11
- package/addon/components/hds/form/select/base.hbs +0 -7
- package/addon/components/hds/form/select/base.js +0 -27
- package/addon/components/hds/form/select/field.hbs +0 -30
- package/addon/components/hds/form/text-input/base.hbs +0 -5
- package/addon/components/hds/form/text-input/base.js +0 -72
- package/addon/components/hds/form/text-input/field.hbs +0 -41
- package/addon/components/hds/form/text-input/field.js +0 -59
- package/addon/components/hds/form/textarea/base.hbs +0 -6
- package/addon/components/hds/form/textarea/base.js +0 -27
- package/addon/components/hds/form/textarea/field.hbs +0 -28
- package/addon/components/hds/form/toggle/base.hbs +0 -8
- package/addon/components/hds/form/toggle/field.hbs +0 -23
- package/addon/components/hds/form/toggle/group.hbs +0 -21
- package/addon/components/hds/form/visibility-toggle/index.hbs +0 -8
- package/addon/components/hds/icon-tile/index.hbs +0 -23
- package/addon/components/hds/icon-tile/index.js +0 -189
- package/addon/components/hds/interactive/index.hbs +0 -32
- package/addon/components/hds/interactive/index.ts +0 -63
- package/addon/components/hds/link/inline.hbs +0 -22
- package/addon/components/hds/link/inline.js +0 -76
- package/addon/components/hds/link/standalone.hbs +0 -28
- package/addon/components/hds/link/standalone.js +0 -147
- package/addon/components/hds/menu-primitive/index.hbs +0 -22
- package/addon/components/hds/menu-primitive/index.js +0 -59
- package/addon/components/hds/modal/body.hbs +0 -7
- package/addon/components/hds/modal/footer.hbs +0 -7
- package/addon/components/hds/modal/header.hbs +0 -18
- package/addon/components/hds/modal/index.hbs +0 -19
- package/addon/components/hds/modal/index.js +0 -209
- package/addon/components/hds/page-header/actions.hbs +0 -5
- package/addon/components/hds/page-header/badges.hbs +0 -5
- package/addon/components/hds/page-header/description.hbs +0 -11
- package/addon/components/hds/page-header/index.hbs +0 -28
- package/addon/components/hds/page-header/subtitle.hbs +0 -11
- package/addon/components/hds/page-header/title.hbs +0 -11
- package/addon/components/hds/pagination/compact/index.hbs +0 -39
- package/addon/components/hds/pagination/compact/index.js +0 -163
- package/addon/components/hds/pagination/info/index.hbs +0 -11
- package/addon/components/hds/pagination/info/index.js +0 -17
- package/addon/components/hds/pagination/nav/arrow.hbs +0 -44
- package/addon/components/hds/pagination/nav/arrow.js +0 -77
- package/addon/components/hds/pagination/nav/ellipsis.hbs +0 -5
- package/addon/components/hds/pagination/nav/number.hbs +0 -17
- package/addon/components/hds/pagination/nav/number.js +0 -45
- package/addon/components/hds/pagination/numbered/index.hbs +0 -70
- package/addon/components/hds/pagination/numbered/index.js +0 -341
- package/addon/components/hds/pagination/size-selector/index.hbs +0 -16
- package/addon/components/hds/pagination/size-selector/index.js +0 -73
- package/addon/components/hds/reveal/index.hbs +0 -21
- package/addon/components/hds/reveal/index.js +0 -33
- package/addon/components/hds/reveal/toggle/button.hbs +0 -13
- package/addon/components/hds/reveal/toggle/button.js +0 -24
- package/addon/components/hds/segmented-group/index.hbs +0 -15
- package/addon/components/hds/separator/index.hbs +0 -5
- package/addon/components/hds/separator/index.js +0 -47
- package/addon/components/hds/side-nav/base.hbs +0 -19
- package/addon/components/hds/side-nav/header/home-link.hbs +0 -20
- package/addon/components/hds/side-nav/header/home-link.js +0 -25
- package/addon/components/hds/side-nav/header/icon-button.hbs +0 -20
- package/addon/components/hds/side-nav/header/icon-button.js +0 -25
- package/addon/components/hds/side-nav/header/index.hbs +0 -13
- package/addon/components/hds/side-nav/index.hbs +0 -42
- package/addon/components/hds/side-nav/index.js +0 -147
- package/addon/components/hds/side-nav/list/back-link.hbs +0 -24
- package/addon/components/hds/side-nav/list/index.hbs +0 -19
- package/addon/components/hds/side-nav/list/item.hbs +0 -8
- package/addon/components/hds/side-nav/list/link.hbs +0 -50
- package/addon/components/hds/side-nav/list/title.hbs +0 -8
- package/addon/components/hds/side-nav/portal/index.hbs +0 -12
- package/addon/components/hds/side-nav/portal/target.hbs +0 -14
- package/addon/components/hds/side-nav/portal/target.js +0 -162
- package/addon/components/hds/side-nav/toggle-button.hbs +0 -7
- package/addon/components/hds/stepper/step/indicator.hbs +0 -28
- package/addon/components/hds/stepper/step/indicator.js +0 -59
- package/addon/components/hds/stepper/task/indicator.hbs +0 -7
- package/addon/components/hds/stepper/task/indicator.js +0 -74
- package/addon/components/hds/table/index.hbs +0 -78
- package/addon/components/hds/table/index.js +0 -182
- package/addon/components/hds/table/td.hbs +0 -7
- package/addon/components/hds/table/td.js +0 -50
- package/addon/components/hds/table/th-sort.hbs +0 -18
- package/addon/components/hds/table/th-sort.js +0 -94
- package/addon/components/hds/table/th.hbs +0 -11
- package/addon/components/hds/table/th.js +0 -50
- package/addon/components/hds/table/tr.hbs +0 -7
- package/addon/components/hds/tabs/index.hbs +0 -47
- package/addon/components/hds/tabs/index.js +0 -211
- package/addon/components/hds/tabs/panel.hbs +0 -16
- package/addon/components/hds/tabs/panel.js +0 -59
- package/addon/components/hds/tabs/tab.hbs +0 -31
- package/addon/components/hds/tabs/tab.js +0 -98
- package/addon/components/hds/tag/index.hbs +0 -30
- package/addon/components/hds/tag/index.js +0 -91
- package/addon/components/hds/text/body.hbs +0 -13
- package/addon/components/hds/text/body.js +0 -73
- package/addon/components/hds/text/code.hbs +0 -13
- package/addon/components/hds/text/code.js +0 -73
- package/addon/components/hds/text/display.hbs +0 -13
- package/addon/components/hds/text/display.js +0 -85
- package/addon/components/hds/text/index.hbs +0 -10
- package/addon/components/hds/text/index.js +0 -146
- package/addon/components/hds/toast/index.hbs +0 -17
- package/addon/components/hds/tooltip-button/index.hbs +0 -11
- package/addon/components/hds/tooltip-button/index.js +0 -86
- package/addon/components/hds/yield/index.hbs +0 -6
- package/addon/helpers/hds-link-to-models.js +0 -35
- package/addon/helpers/hds-link-to-query.js +0 -26
- package/addon/modifiers/hds-clipboard.js +0 -163
- package/addon/modifiers/hds-tooltip.js +0 -164
- package/addon/template-registry.ts +0 -12
- package/addon/utils/hds-get-element-id.js +0 -19
- package/addon/utils/hds-set-aria-described-by.js +0 -15
- package/app/components/hds/accordion/index.js +0 -6
- package/app/components/hds/accordion/item/button.js +0 -6
- package/app/components/hds/accordion/item/index.js +0 -6
- package/app/components/hds/alert/description.js +0 -6
- package/app/components/hds/alert/index.js +0 -6
- package/app/components/hds/alert/title.js +0 -6
- package/app/components/hds/app-footer/copyright.js +0 -6
- package/app/components/hds/app-footer/index.js +0 -6
- package/app/components/hds/app-footer/item.js +0 -6
- package/app/components/hds/app-footer/legal-links.js +0 -6
- package/app/components/hds/app-footer/link.js +0 -6
- package/app/components/hds/app-footer/status-link.js +0 -6
- package/app/components/hds/app-frame/index.js +0 -6
- package/app/components/hds/app-frame/parts/footer.js +0 -6
- package/app/components/hds/app-frame/parts/header.js +0 -6
- package/app/components/hds/app-frame/parts/main.js +0 -6
- package/app/components/hds/app-frame/parts/modals.js +0 -6
- package/app/components/hds/app-frame/parts/sidebar.js +0 -6
- package/app/components/hds/application-state/body.js +0 -6
- package/app/components/hds/application-state/footer.js +0 -6
- package/app/components/hds/application-state/header.js +0 -6
- package/app/components/hds/application-state/index.js +0 -6
- package/app/components/hds/badge/index.js +0 -6
- package/app/components/hds/badge-count/index.js +0 -6
- package/app/components/hds/breadcrumb/index.js +0 -6
- package/app/components/hds/breadcrumb/item.js +0 -6
- package/app/components/hds/breadcrumb/truncation.js +0 -6
- package/app/components/hds/button/index.js +0 -6
- package/app/components/hds/button-set/index.js +0 -6
- package/app/components/hds/card/container.js +0 -6
- package/app/components/hds/code-block/copy-button.js +0 -6
- package/app/components/hds/code-block/description.js +0 -6
- package/app/components/hds/code-block/index.js +0 -6
- package/app/components/hds/code-block/title.js +0 -6
- package/app/components/hds/copy/button/index.js +0 -6
- package/app/components/hds/copy/snippet/index.js +0 -6
- package/app/components/hds/disclosure-primitive/index.js +0 -6
- package/app/components/hds/dismiss-button/index.js +0 -6
- package/app/components/hds/dropdown/footer.js +0 -6
- package/app/components/hds/dropdown/header.js +0 -6
- package/app/components/hds/dropdown/index.js +0 -6
- package/app/components/hds/dropdown/list-item/checkbox.js +0 -6
- package/app/components/hds/dropdown/list-item/checkmark.js +0 -6
- package/app/components/hds/dropdown/list-item/copy-item.js +0 -6
- package/app/components/hds/dropdown/list-item/description.js +0 -6
- package/app/components/hds/dropdown/list-item/generic.js +0 -6
- package/app/components/hds/dropdown/list-item/interactive.js +0 -6
- package/app/components/hds/dropdown/list-item/radio.js +0 -6
- package/app/components/hds/dropdown/list-item/separator.js +0 -6
- package/app/components/hds/dropdown/list-item/title.js +0 -6
- package/app/components/hds/dropdown/toggle/button.js +0 -6
- package/app/components/hds/dropdown/toggle/chevron.js +0 -6
- package/app/components/hds/dropdown/toggle/icon.js +0 -6
- package/app/components/hds/flyout/body.js +0 -6
- package/app/components/hds/flyout/description.js +0 -6
- package/app/components/hds/flyout/footer.js +0 -6
- package/app/components/hds/flyout/header.js +0 -6
- package/app/components/hds/flyout/index.js +0 -6
- package/app/components/hds/form/character-count/index.js +0 -6
- package/app/components/hds/form/checkbox/base.js +0 -6
- package/app/components/hds/form/checkbox/field.js +0 -6
- package/app/components/hds/form/checkbox/group.js +0 -6
- package/app/components/hds/form/error/index.js +0 -6
- package/app/components/hds/form/error/message.js +0 -6
- package/app/components/hds/form/field/index.js +0 -6
- package/app/components/hds/form/fieldset/index.js +0 -6
- package/app/components/hds/form/file-input/base.js +0 -6
- package/app/components/hds/form/file-input/field.js +0 -6
- package/app/components/hds/form/helper-text/index.js +0 -6
- package/app/components/hds/form/indicator/index.js +0 -6
- package/app/components/hds/form/label/index.js +0 -6
- package/app/components/hds/form/legend/index.js +0 -6
- package/app/components/hds/form/masked-input/base.js +0 -6
- package/app/components/hds/form/masked-input/field.js +0 -6
- package/app/components/hds/form/radio/base.js +0 -6
- package/app/components/hds/form/radio/field.js +0 -6
- package/app/components/hds/form/radio/group.js +0 -6
- package/app/components/hds/form/radio-card/description.js +0 -6
- package/app/components/hds/form/radio-card/group.js +0 -6
- package/app/components/hds/form/radio-card/index.js +0 -6
- package/app/components/hds/form/radio-card/label.js +0 -6
- package/app/components/hds/form/select/base.js +0 -6
- package/app/components/hds/form/select/field.js +0 -6
- package/app/components/hds/form/text-input/base.js +0 -6
- package/app/components/hds/form/text-input/field.js +0 -6
- package/app/components/hds/form/textarea/base.js +0 -6
- package/app/components/hds/form/textarea/field.js +0 -6
- package/app/components/hds/form/toggle/base.js +0 -6
- package/app/components/hds/form/toggle/field.js +0 -6
- package/app/components/hds/form/toggle/group.js +0 -6
- package/app/components/hds/form/visibility-toggle/index.js +0 -6
- package/app/components/hds/icon-tile/index.js +0 -6
- package/app/components/hds/interactive/index.js +0 -6
- package/app/components/hds/link/inline.js +0 -6
- package/app/components/hds/link/standalone.js +0 -6
- package/app/components/hds/menu-primitive/index.js +0 -6
- package/app/components/hds/modal/body.js +0 -6
- package/app/components/hds/modal/footer.js +0 -6
- package/app/components/hds/modal/header.js +0 -6
- package/app/components/hds/modal/index.js +0 -6
- package/app/components/hds/page-header/actions.js +0 -6
- package/app/components/hds/page-header/badges.js +0 -6
- package/app/components/hds/page-header/description.js +0 -6
- package/app/components/hds/page-header/index.js +0 -6
- package/app/components/hds/page-header/subtitle.js +0 -6
- package/app/components/hds/page-header/title.js +0 -6
- package/app/components/hds/pagination/compact/index.js +0 -6
- package/app/components/hds/pagination/info.js +0 -6
- package/app/components/hds/pagination/nav/arrow.js +0 -6
- package/app/components/hds/pagination/nav/ellipsis.js +0 -6
- package/app/components/hds/pagination/nav/number.js +0 -6
- package/app/components/hds/pagination/numbered/index.js +0 -6
- package/app/components/hds/pagination/size-selector.js +0 -6
- package/app/components/hds/reveal/index.js +0 -6
- package/app/components/hds/reveal/toggle/button.js +0 -6
- package/app/components/hds/segmented-group/index.js +0 -6
- package/app/components/hds/separator/index.js +0 -6
- package/app/components/hds/side-nav/base.js +0 -6
- package/app/components/hds/side-nav/header/home-link.js +0 -6
- package/app/components/hds/side-nav/header/icon-button.js +0 -6
- package/app/components/hds/side-nav/header/index.js +0 -6
- package/app/components/hds/side-nav/index.js +0 -6
- package/app/components/hds/side-nav/list/back-link.js +0 -6
- package/app/components/hds/side-nav/list/index.js +0 -6
- package/app/components/hds/side-nav/list/item.js +0 -6
- package/app/components/hds/side-nav/list/link.js +0 -6
- package/app/components/hds/side-nav/list/title.js +0 -6
- package/app/components/hds/side-nav/portal/index.js +0 -6
- package/app/components/hds/side-nav/portal/target.js +0 -6
- package/app/components/hds/side-nav/toggle-button.js +0 -6
- package/app/components/hds/stepper/step/indicator.js +0 -6
- package/app/components/hds/stepper/task/indicator.js +0 -6
- package/app/components/hds/table/index.js +0 -6
- package/app/components/hds/table/td.js +0 -6
- package/app/components/hds/table/th-sort.js +0 -6
- package/app/components/hds/table/th.js +0 -6
- package/app/components/hds/table/tr.js +0 -6
- package/app/components/hds/tabs/index.js +0 -6
- package/app/components/hds/tabs/panel.js +0 -6
- package/app/components/hds/tabs/tab.js +0 -6
- package/app/components/hds/tag/index.js +0 -6
- package/app/components/hds/text/body.js +0 -6
- package/app/components/hds/text/code.js +0 -6
- package/app/components/hds/text/display.js +0 -6
- package/app/components/hds/text/index.js +0 -6
- package/app/components/hds/toast/index.js +0 -6
- package/app/components/hds/tooltip-button/index.js +0 -6
- package/app/components/hds/yield/index.js +0 -6
- package/app/helpers/hds-link-to-models.js +0 -6
- package/app/helpers/hds-link-to-query.js +0 -6
- package/app/modifiers/hds-clipboard.js +0 -6
- package/app/modifiers/hds-tooltip.js +0 -6
- package/app/styles/@hashicorp/design-system-components.scss +0 -64
- package/app/styles/components/flyout.scss +0 -111
- package/app/styles/components/table.scss +0 -208
- package/app/styles/components/tabs.scss +0 -117
- package/blueprints/hds-component/files/addon/components/hds/__name__/index.hbs +0 -8
- package/blueprints/hds-component/files/addon/components/hds/__name__/index.js +0 -28
- package/blueprints/hds-component/files/app/components/hds/__name__/index.js +0 -6
- package/blueprints/hds-component/files/app/styles/components/__name__.scss +0 -12
- package/blueprints/hds-component/index.js +0 -65
- package/blueprints/hds-component-test/files/tests/acceptance/components/hds/__name__.js +0 -21
- package/blueprints/hds-component-test/files/tests/dummy/app/routes/components/__name__.js +0 -8
- package/blueprints/hds-component-test/files/tests/dummy/app/styles/showcase-pages/__dummyCSSFileName__.scss +0 -6
- package/blueprints/hds-component-test/files/tests/dummy/app/templates/components/__name__.hbs +0 -17
- package/blueprints/hds-component-test/files/tests/integration/components/hds/__name__/index-test.js +0 -25
- package/blueprints/hds-component-test/index.js +0 -151
- package/config/environment.js +0 -10
- package/index.js +0 -32
- package/tsconfig.declarations.json +0 -10
- package/tsconfig.json +0 -47
- package/types/dummy/index.d.ts +0 -7
- package/types/global.d.ts +0 -12
- package/vercel.json +0 -13
- /package/{app → dist}/styles/@hashicorp/design-system-power-select-overrides.scss +0 -0
- /package/{app → dist}/styles/components/accordion.scss +0 -0
- /package/{app → dist}/styles/components/alert.scss +0 -0
- /package/{app → dist}/styles/components/app-footer.scss +0 -0
- /package/{app → dist}/styles/components/app-frame.scss +0 -0
- /package/{app → dist}/styles/components/application-state.scss +0 -0
- /package/{app → dist}/styles/components/badge-count.scss +0 -0
- /package/{app → dist}/styles/components/badge.scss +0 -0
- /package/{app → dist}/styles/components/breadcrumb.scss +0 -0
- /package/{app → dist}/styles/components/button-set.scss +0 -0
- /package/{app → dist}/styles/components/button.scss +0 -0
- /package/{app → dist}/styles/components/card/container.scss +0 -0
- /package/{app → dist}/styles/components/card/index.scss +0 -0
- /package/{app → dist}/styles/components/code-block/index.scss +0 -0
- /package/{app → dist}/styles/components/code-block/theme.scss +0 -0
- /package/{app → dist}/styles/components/copy/button.scss +0 -0
- /package/{app → dist}/styles/components/copy/index.scss +0 -0
- /package/{app → dist}/styles/components/copy/snippet.scss +0 -0
- /package/{app → dist}/styles/components/disclosure-primitive.scss +0 -0
- /package/{app → dist}/styles/components/dismiss-button.scss +0 -0
- /package/{app → dist}/styles/components/dropdown.scss +0 -0
- /package/{app → dist}/styles/components/form/character-count.scss +0 -0
- /package/{app → dist}/styles/components/form/checkbox.scss +0 -0
- /package/{app → dist}/styles/components/form/error.scss +0 -0
- /package/{app → dist}/styles/components/form/field.scss +0 -0
- /package/{app → dist}/styles/components/form/file-input.scss +0 -0
- /package/{app → dist}/styles/components/form/group.scss +0 -0
- /package/{app → dist}/styles/components/form/helper-text.scss +0 -0
- /package/{app → dist}/styles/components/form/index.scss +0 -0
- /package/{app → dist}/styles/components/form/indicator.scss +0 -0
- /package/{app → dist}/styles/components/form/label.scss +0 -0
- /package/{app → dist}/styles/components/form/legend.scss +0 -0
- /package/{app → dist}/styles/components/form/masked-input.scss +0 -0
- /package/{app → dist}/styles/components/form/radio-card.scss +0 -0
- /package/{app → dist}/styles/components/form/radio.scss +0 -0
- /package/{app → dist}/styles/components/form/select.scss +0 -0
- /package/{app → dist}/styles/components/form/text-input.scss +0 -0
- /package/{app → dist}/styles/components/form/textarea.scss +0 -0
- /package/{app → dist}/styles/components/form/toggle.scss +0 -0
- /package/{app → dist}/styles/components/form/visibility-toggle.scss +0 -0
- /package/{app → dist}/styles/components/icon-tile.scss +0 -0
- /package/{app → dist}/styles/components/link/index.scss +0 -0
- /package/{app → dist}/styles/components/link/inline.scss +0 -0
- /package/{app → dist}/styles/components/link/standalone.scss +0 -0
- /package/{app → dist}/styles/components/menu-primitive.scss +0 -0
- /package/{app → dist}/styles/components/modal.scss +0 -0
- /package/{app → dist}/styles/components/page-header.scss +0 -0
- /package/{app → dist}/styles/components/pagination.scss +0 -0
- /package/{app → dist}/styles/components/reveal.scss +0 -0
- /package/{app → dist}/styles/components/segmented-group.scss +0 -0
- /package/{app → dist}/styles/components/separator.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/a11y-refocus.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/content.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/header.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/index.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/main.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/toggle-button.scss +0 -0
- /package/{app → dist}/styles/components/side-nav/vars.scss +0 -0
- /package/{app → dist}/styles/components/stepper/index.scss +0 -0
- /package/{app → dist}/styles/components/stepper/step-indicator.scss +0 -0
- /package/{app → dist}/styles/components/stepper/task-indicator.scss +0 -0
- /package/{app → dist}/styles/components/tag.scss +0 -0
- /package/{app → dist}/styles/components/text.scss +0 -0
- /package/{app → dist}/styles/components/toast.scss +0 -0
- /package/{app → dist}/styles/components/tooltip.scss +0 -0
- /package/{app → dist}/styles/mixins/_button.scss +0 -0
- /package/{app → dist}/styles/mixins/_focus-ring.scss +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { assert } from '@ember/debug';
|
|
3
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
+
import { setComponentTemplate } from '@ember/component';
|
|
5
|
+
|
|
6
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} aria-hidden=\"true\" ...attributes>\n {{#if @icon}}\n <div class=\"hds-icon-tile__icon\">\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </div>\n {{/if}}\n {{#if @logo}}\n <div class=\"hds-icon-tile__logo\">\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </div>\n {{/if}}\n {{#if this.iconSecondary}}\n <div class=\"hds-icon-tile__extra\">\n <div class=\"hds-icon-tile__extra-icon\">\n <FlightIcon @name={{this.iconSecondary}} @size=\"16\" @stretched={{true}} />\n </div>\n </div>\n {{/if}}\n</div>");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) HashiCorp, Inc.
|
|
10
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const DEFAULT_SIZE = 'medium';
|
|
14
|
+
const DEFAULT_COLOR = 'neutral';
|
|
15
|
+
const SIZES = ['small', 'medium', 'large'];
|
|
16
|
+
const PRODUCTS = ['boundary', 'consul', 'hcp', 'nomad', 'packer', 'terraform', 'vagrant', 'vault', 'vault-secrets', 'vault-radar', 'waypoint'];
|
|
17
|
+
const COLORS = ['neutral', ...PRODUCTS];
|
|
18
|
+
class HdsIconTileIndexComponent extends Component {
|
|
19
|
+
/**
|
|
20
|
+
* Sets the size for the component
|
|
21
|
+
* Accepted values: small, medium, large
|
|
22
|
+
*
|
|
23
|
+
* @param size
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @default 'medium'
|
|
26
|
+
*/
|
|
27
|
+
get size() {
|
|
28
|
+
let {
|
|
29
|
+
size = DEFAULT_SIZE
|
|
30
|
+
} = this.args;
|
|
31
|
+
assert(`@size for "Hds::IconTile" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size));
|
|
32
|
+
return size;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Sets the color scheme for the component
|
|
37
|
+
* Accepted values: see THE COLORS LIST
|
|
38
|
+
*
|
|
39
|
+
* @param color
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @default 'neutral'
|
|
42
|
+
*/
|
|
43
|
+
get color() {
|
|
44
|
+
let {
|
|
45
|
+
color = DEFAULT_COLOR
|
|
46
|
+
} = this.args;
|
|
47
|
+
|
|
48
|
+
// if it's a "logo" then we overwrite any @color parameter passed
|
|
49
|
+
// and just use the product "brand" color
|
|
50
|
+
if (this.logo) {
|
|
51
|
+
color = this.logo;
|
|
52
|
+
}
|
|
53
|
+
assert(`@color for "Hds::IconTile" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
|
|
54
|
+
return color;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Sets the icon name (one of the FlightIcons)
|
|
59
|
+
*
|
|
60
|
+
* @param icon
|
|
61
|
+
* @type {string|null}
|
|
62
|
+
* @default null
|
|
63
|
+
*/
|
|
64
|
+
get icon() {
|
|
65
|
+
if (this.args.logo) {
|
|
66
|
+
// for the logo version we use the colored versions directly
|
|
67
|
+
return `${this.args.logo}-color`;
|
|
68
|
+
} else if (this.args.icon) {
|
|
69
|
+
return this.args.icon;
|
|
70
|
+
} else {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* @param iconSize
|
|
77
|
+
* @type {string}
|
|
78
|
+
* @default 16
|
|
79
|
+
* @description ensures that the correct icon size is used. Automatically calculated.
|
|
80
|
+
*/
|
|
81
|
+
get iconSize() {
|
|
82
|
+
if (this.args.size === 'small') {
|
|
83
|
+
return '16';
|
|
84
|
+
} else {
|
|
85
|
+
return '24';
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Sets the logo name if there is one
|
|
91
|
+
*
|
|
92
|
+
* @param logo
|
|
93
|
+
* @type {string|null}
|
|
94
|
+
* @default null
|
|
95
|
+
*/
|
|
96
|
+
get logo() {
|
|
97
|
+
let {
|
|
98
|
+
logo
|
|
99
|
+
} = this.args;
|
|
100
|
+
if (logo) {
|
|
101
|
+
assert(`@logo for "Hds::IconTile" must be one of the following: ${PRODUCTS.join(', ')}; received: ${logo}`, PRODUCTS.includes(logo));
|
|
102
|
+
}
|
|
103
|
+
return logo ?? null;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* We need to differentiate between a logo and an icon
|
|
108
|
+
* @method IconTile#entity
|
|
109
|
+
* @return {string} The kind of entity we're dealing with ("logo" or "icon")
|
|
110
|
+
*/
|
|
111
|
+
get entity() {
|
|
112
|
+
let entity;
|
|
113
|
+
assert(`you can't pass both @logo and @icon properties to the "Hds::IconTile" component`, !(this.args.logo && this.args.icon));
|
|
114
|
+
assert(`you need to pass @logo or @icon to the "Hds::IconTile" component`, !(this.args.logo === undefined && this.args.icon === undefined));
|
|
115
|
+
if (this.args.logo) {
|
|
116
|
+
entity = 'logo';
|
|
117
|
+
}
|
|
118
|
+
if (this.args.icon) {
|
|
119
|
+
entity = 'icon';
|
|
120
|
+
}
|
|
121
|
+
return entity;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Sets the "secondary" icon name (one of the FlightIcons)
|
|
126
|
+
*
|
|
127
|
+
* @param iconSecondary
|
|
128
|
+
* @type {string|null}
|
|
129
|
+
* @default null
|
|
130
|
+
*/
|
|
131
|
+
get iconSecondary() {
|
|
132
|
+
return this.args.iconSecondary ?? null;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Get the class names to apply to the component.
|
|
137
|
+
* @method IconTile#classNames
|
|
138
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
139
|
+
*/
|
|
140
|
+
// hds-icon-tile {{this.entityClass}} {{this.sizeClass}} {{this.colorClass}}"
|
|
141
|
+
get classNames() {
|
|
142
|
+
let classes = ['hds-icon-tile'];
|
|
143
|
+
|
|
144
|
+
// add a class based on its entity argument
|
|
145
|
+
classes.push(`hds-icon-tile--${this.entity}`);
|
|
146
|
+
|
|
147
|
+
// add a class based on the @size argument
|
|
148
|
+
classes.push(`hds-icon-tile--size-${this.size}`);
|
|
149
|
+
|
|
150
|
+
// add a class based on the @color argument
|
|
151
|
+
classes.push(`hds-icon-tile--color-${this.color}`);
|
|
152
|
+
return classes.join(' ');
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
setComponentTemplate(TEMPLATE, HdsIconTileIndexComponent);
|
|
156
|
+
|
|
157
|
+
export { COLORS, DEFAULT_COLOR, DEFAULT_SIZE, PRODUCTS, SIZES, HdsIconTileIndexComponent as default };
|
|
158
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/icon-tile/index.hbs","../../../../src/components/hds/icon-tile/index.js"],"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={{this.classNames}} aria-hidden=\\\"true\\\" ...attributes>\\n {{#if @icon}}\\n <div class=\\\"hds-icon-tile__icon\\\">\\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </div>\\n {{/if}}\\n {{#if @logo}}\\n <div class=\\\"hds-icon-tile__logo\\\">\\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </div>\\n {{/if}}\\n {{#if this.iconSecondary}}\\n <div class=\\\"hds-icon-tile__extra\\\">\\n <div class=\\\"hds-icon-tile__extra-icon\\\">\\n <FlightIcon @name={{this.iconSecondary}} @size=\\\"16\\\" @stretched={{true}} />\\n </div>\\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 { assert } from '@ember/debug';\n\nexport const DEFAULT_SIZE = 'medium';\nexport const DEFAULT_COLOR = 'neutral';\nexport const SIZES = ['small', 'medium', 'large'];\nexport const PRODUCTS = [\n 'boundary',\n 'consul',\n 'hcp',\n 'nomad',\n 'packer',\n 'terraform',\n 'vagrant',\n 'vault',\n 'vault-secrets',\n 'vault-radar',\n 'waypoint',\n];\nexport const COLORS = ['neutral', ...PRODUCTS];\n\nexport default class HdsIconTileIndexComponent extends Component {\n /**\n * Sets the size for the component\n * Accepted values: small, medium, large\n *\n * @param size\n * @type {string}\n * @default 'medium'\n */\n get size() {\n let { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::IconTile\" 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 * Sets the color scheme for the component\n * Accepted values: see THE COLORS LIST\n *\n * @param color\n * @type {string}\n * @default 'neutral'\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n // if it's a \"logo\" then we overwrite any @color parameter passed\n // and just use the product \"brand\" color\n if (this.logo) {\n color = this.logo;\n }\n\n assert(\n `@color for \"Hds::IconTile\" 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 * Sets the icon name (one of the FlightIcons)\n *\n * @param icon\n * @type {string|null}\n * @default null\n */\n get icon() {\n if (this.args.logo) {\n // for the logo version we use the colored versions directly\n return `${this.args.logo}-color`;\n } else if (this.args.icon) {\n return this.args.icon;\n } else {\n return null;\n }\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @default 16\n * @description ensures that the correct icon size is used. Automatically calculated.\n */\n get iconSize() {\n if (this.args.size === 'small') {\n return '16';\n } else {\n return '24';\n }\n }\n\n /**\n * Sets the logo name if there is one\n *\n * @param logo\n * @type {string|null}\n * @default null\n */\n get logo() {\n let { logo } = this.args;\n\n if (logo) {\n assert(\n `@logo for \"Hds::IconTile\" must be one of the following: ${PRODUCTS.join(\n ', '\n )}; received: ${logo}`,\n PRODUCTS.includes(logo)\n );\n }\n\n return logo ?? null;\n }\n\n /**\n * We need to differentiate between a logo and an icon\n * @method IconTile#entity\n * @return {string} The kind of entity we're dealing with (\"logo\" or \"icon\")\n */\n get entity() {\n let entity;\n\n assert(\n `you can't pass both @logo and @icon properties to the \"Hds::IconTile\" component`,\n !(this.args.logo && this.args.icon)\n );\n\n assert(\n `you need to pass @logo or @icon to the \"Hds::IconTile\" component`,\n !(this.args.logo === undefined && this.args.icon === undefined)\n );\n\n if (this.args.logo) {\n entity = 'logo';\n }\n if (this.args.icon) {\n entity = 'icon';\n }\n\n return entity;\n }\n\n /**\n * Sets the \"secondary\" icon name (one of the FlightIcons)\n *\n * @param iconSecondary\n * @type {string|null}\n * @default null\n */\n get iconSecondary() {\n return this.args.iconSecondary ?? null;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method IconTile#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n // hds-icon-tile {{this.entityClass}} {{this.sizeClass}} {{this.colorClass}}\"\n get classNames() {\n let classes = ['hds-icon-tile'];\n\n // add a class based on its entity argument\n classes.push(`hds-icon-tile--${this.entity}`);\n\n // add a class based on the @size argument\n classes.push(`hds-icon-tile--size-${this.size}`);\n\n // add a class based on the @color argument\n classes.push(`hds-icon-tile--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_SIZE","DEFAULT_COLOR","SIZES","PRODUCTS","COLORS","HdsIconTileIndexComponent","Component","size","args","assert","join","includes","color","logo","icon","iconSize","entity","undefined","iconSecondary","classNames","classes","push","setComponent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../_rollupPluginBabelHelpers-lqPQKyNs.js';
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
|
+
import { setComponentTemplate } from '@ember/component';
|
|
6
|
+
|
|
7
|
+
var TEMPLATE = precompileTemplate("{{! IMPORTANT: we removed the newlines before/after the yield to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/231#issuecomment-1123502499) }}\n{{! IMPORTANT: we need to add \"squishies\" here (~) because otherwise the whitespace added by Ember becomes visible in the link (being an inline element) - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\n{{! NOTICE: we can\'t support the direct use of the \"href\" HTML attribute via ...attributes in the <a> elements, because we need to rely on the \"@href\" Ember argument to differentiate between different types of generated output }}\n{{~#if @route~}}\n {{~#if this.isRouteExternal~}}\n <LinkToExternal\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 ...attributes\n >{{yield}}</LinkToExternal>\n {{~else~}}\n <LinkTo\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 ...attributes\n >{{yield}}</LinkTo>\n {{~/if~}}\n{{~else if @href~}}\n {{~#if this.isHrefExternal~}}\n <a target=\"_blank\" rel=\"noopener noreferrer\" ...attributes href={{@href}} {{on \"keyup\" this.onKeyUp}}>{{yield}}</a>\n {{~else~}}\n <a ...attributes href={{@href}} {{on \"keyup\" this.onKeyUp}}>{{yield}}</a>\n {{~/if~}}\n{{~else~}}\n <button type=\"button\" ...attributes>{{yield}}</button>\n{{~/if~}}");
|
|
8
|
+
|
|
9
|
+
var _class;
|
|
10
|
+
let HdsInteractiveIndexComponent = (_class = class HdsInteractiveIndexComponent extends Component {
|
|
11
|
+
/**
|
|
12
|
+
* Determines if a @href value is "external" (it adds target="_blank" rel="noopener noreferrer")
|
|
13
|
+
*
|
|
14
|
+
* @param isHrefExternal
|
|
15
|
+
* @type boolean
|
|
16
|
+
* @default true
|
|
17
|
+
*/
|
|
18
|
+
get isHrefExternal() {
|
|
19
|
+
return this.args.isHrefExternal ?? true;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Determines if a @route value is "external" (uses the LinkToExternal component instead of LinkTo)
|
|
24
|
+
*
|
|
25
|
+
* @param isRouteExternal
|
|
26
|
+
* @type boolean
|
|
27
|
+
* @default false
|
|
28
|
+
*/
|
|
29
|
+
get isRouteExternal() {
|
|
30
|
+
return this.args.isRouteExternal ?? false;
|
|
31
|
+
}
|
|
32
|
+
onKeyUp(event) {
|
|
33
|
+
if (event.key === ' ' || event.code === 'Space') {
|
|
34
|
+
event.target.click();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, (_applyDecoratedDescriptor(_class.prototype, "onKeyUp", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onKeyUp"), _class.prototype)), _class);
|
|
38
|
+
setComponentTemplate(TEMPLATE, HdsInteractiveIndexComponent);
|
|
39
|
+
|
|
40
|
+
export { HdsInteractiveIndexComponent as default };
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/interactive/index.hbs","../../../../src/components/hds/interactive/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! IMPORTANT: we removed the newlines before/after the yield to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/231#issuecomment-1123502499) }}\\n{{! IMPORTANT: we need to add \\\"squishies\\\" here (~) because otherwise the whitespace added by Ember becomes visible in the link (being an inline element) - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\\n{{! NOTICE: we can\\'t support the direct use of the \\\"href\\\" HTML attribute via ...attributes in the <a> elements, because we need to rely on the \\\"@href\\\" Ember argument to differentiate between different types of generated output }}\\n{{~#if @route~}}\\n {{~#if this.isRouteExternal~}}\\n <LinkToExternal\\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 ...attributes\\n >{{yield}}</LinkToExternal>\\n {{~else~}}\\n <LinkTo\\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 ...attributes\\n >{{yield}}</LinkTo>\\n {{~/if~}}\\n{{~else if @href~}}\\n {{~#if this.isHrefExternal~}}\\n <a target=\\\"_blank\\\" rel=\\\"noopener noreferrer\\\" ...attributes href={{@href}} {{on \\\"keyup\\\" this.onKeyUp}}>{{yield}}</a>\\n {{~else~}}\\n <a ...attributes href={{@href}} {{on \\\"keyup\\\" this.onKeyUp}}>{{yield}}</a>\\n {{~/if~}}\\n{{~else~}}\\n <button type=\\\"button\\\" ...attributes>{{yield}}</button>\\n{{~/if~}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nexport interface HdsInteractiveSignature {\n Args: {\n href?: string;\n isHrefExternal?: boolean;\n isRouteExternal?: boolean;\n route?: unknown;\n models?: unknown;\n model?: unknown;\n query?: unknown;\n 'current-when'?: unknown;\n replace?: unknown;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLAnchorElement | HTMLButtonElement;\n}\n\nexport default class HdsInteractiveIndexComponent extends Component<HdsInteractiveSignature> {\n /**\n * Determines if a @href value is \"external\" (it adds target=\"_blank\" rel=\"noopener noreferrer\")\n *\n * @param isHrefExternal\n * @type boolean\n * @default true\n */\n get isHrefExternal() {\n return this.args.isHrefExternal ?? true;\n }\n\n /**\n * Determines if a @route value is \"external\" (uses the LinkToExternal component instead of LinkTo)\n *\n * @param isRouteExternal\n * @type boolean\n * @default false\n */\n get isRouteExternal() {\n return this.args.isRouteExternal ?? false;\n }\n\n @action\n onKeyUp(event: KeyboardEvent) {\n if (event.key === ' ' || event.code === 'Space') {\n (event.target as HTMLElement).click();\n }\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'Hds::Interactive': typeof HdsInteractiveIndexComponent;\n 'hds/interactive': typeof HdsInteractiveIndexComponent;\n }\n}\n"],"names":["HdsInteractiveIndexComponent","_class","Component","isHrefExternal","args","isRouteExternal","onKeyUp","event","key","code","target","click","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,4lDAA4lD;;;ACyBzmDA,IAAAA,4BAA4B,IAAAC,MAAA,GAAlC,MAAMD,4BAA4B,SAASE,SAAS,CAA0B;AAC3F;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,cAAcA,GAAG;AACnB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,cAAc,IAAI,IAAI,CAAA;AACzC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIE,eAAeA,GAAG;AACpB,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,eAAe,IAAI,KAAK,CAAA;AAC3C,GAAA;EAGAC,OAAOA,CAACC,KAAoB,EAAE;IAC5B,IAAIA,KAAK,CAACC,GAAG,KAAK,GAAG,IAAID,KAAK,CAACE,IAAI,KAAK,OAAO,EAAE;AAC9CF,MAAAA,KAAK,CAACG,MAAM,CAAiBC,KAAK,EAAE,CAAA;AACvC,KAAA;AACF,GAAA;AACF,CAAC,GAAAC,yBAAA,CAAAX,MAAA,CAAAY,SAAA,EAAA,SAAA,EAAA,CANEC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAf,MAAA,CAAAY,SAAA,cAAAZ,MAAA,CAAAY,SAAA,CAAA,GAAAZ,MAAA,EAAA;AAvBwCgB,oBAAA,CAAAC,QAAA,EAAAlB,4BAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { assert } from '@ember/debug';
|
|
3
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
+
import { setComponentTemplate } from '@ember/component';
|
|
5
|
+
|
|
6
|
+
var TEMPLATE = precompileTemplate("{{! IMPORTANT: we removed the newlines before/after the yield to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/231#issuecomment-1123502499) }}\n{{! IMPORTANT: we need to add \"squishies\" here (~) because otherwise the whitespace added by Ember becomes visible in the link (being an inline element) - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\n<Hds::Interactive\n class={{this.classNames}}\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>{{#if (and @icon (eq this.iconPosition \"leading\"))~}}\n <span class=\"hds-link-inline__icon hds-link-inline__icon--leading\">\n <FlightIcon @name={{@icon}} @size=\"16\" @stretched={{true}} />\n </span>\n {{~/if~}}{{yield}}{{~#if (and @icon (eq this.iconPosition \"trailing\"))~}}\n <span class=\"hds-link-inline__icon hds-link-inline__icon--trailing\">\n <FlightIcon @name={{@icon}} @size=\"16\" @stretched={{true}} />\n </span>\n {{~/if}}</Hds::Interactive>");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) HashiCorp, Inc.
|
|
10
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const DEFAULT_ICONPOSITION = 'trailing';
|
|
14
|
+
const DEFAULT_COLOR = 'primary';
|
|
15
|
+
const ICONPOSITIONS = ['leading', 'trailing'];
|
|
16
|
+
const COLORS = ['primary', 'secondary'];
|
|
17
|
+
class HdsLinkInlineComponent extends Component {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
if (!(this.args.href || this.args.route)) {
|
|
21
|
+
assert('@href or @route must be defined for <Hds::Link::Inline>');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param color
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @default primary
|
|
29
|
+
* @description Determines the color of link to be used; acceptable values are `primary` and `secondary`
|
|
30
|
+
*/
|
|
31
|
+
get color() {
|
|
32
|
+
let {
|
|
33
|
+
color = DEFAULT_COLOR
|
|
34
|
+
} = this.args;
|
|
35
|
+
assert(`@color for "Hds::Link::Inline" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
|
|
36
|
+
return color;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* @param iconPosition
|
|
41
|
+
* @type {string}
|
|
42
|
+
* @default leading
|
|
43
|
+
* @description Positions the icon before or after the text; allowed values are `leading` or `trailing`
|
|
44
|
+
*/
|
|
45
|
+
get iconPosition() {
|
|
46
|
+
let {
|
|
47
|
+
iconPosition = DEFAULT_ICONPOSITION
|
|
48
|
+
} = this.args;
|
|
49
|
+
assert(`@iconPosition for "Hds::Link::Inline" must be one of the following: ${ICONPOSITIONS.join(', ')}; received: ${iconPosition}`, ICONPOSITIONS.includes(iconPosition));
|
|
50
|
+
return iconPosition;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get the class names to apply to the component.
|
|
55
|
+
* @method LinkInline#classNames
|
|
56
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
57
|
+
*/
|
|
58
|
+
get classNames() {
|
|
59
|
+
let classes = ['hds-link-inline'];
|
|
60
|
+
|
|
61
|
+
// add a class based on the @color argument
|
|
62
|
+
classes.push(`hds-link-inline--color-${this.color}`);
|
|
63
|
+
|
|
64
|
+
// add a class based on the @iconPosition argument
|
|
65
|
+
classes.push(`hds-link-inline--icon-${this.iconPosition}`);
|
|
66
|
+
return classes.join(' ');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
setComponentTemplate(TEMPLATE, HdsLinkInlineComponent);
|
|
70
|
+
|
|
71
|
+
export { COLORS, DEFAULT_COLOR, DEFAULT_ICONPOSITION, ICONPOSITIONS, HdsLinkInlineComponent as default };
|
|
72
|
+
//# sourceMappingURL=inline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inline.js","sources":["../../../../src/components/hds/link/inline.hbs","../../../../src/components/hds/link/inline.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! IMPORTANT: we removed the newlines before/after the yield to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/231#issuecomment-1123502499) }}\\n{{! IMPORTANT: we need to add \\\"squishies\\\" here (~) because otherwise the whitespace added by Ember becomes visible in the link (being an inline element) - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\\n<Hds::Interactive\\n class={{this.classNames}}\\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>{{#if (and @icon (eq this.iconPosition \\\"leading\\\"))~}}\\n <span class=\\\"hds-link-inline__icon hds-link-inline__icon--leading\\\">\\n <FlightIcon @name={{@icon}} @size=\\\"16\\\" @stretched={{true}} />\\n </span>\\n {{~/if~}}{{yield}}{{~#if (and @icon (eq this.iconPosition \\\"trailing\\\"))~}}\\n <span class=\\\"hds-link-inline__icon hds-link-inline__icon--trailing\\\">\\n <FlightIcon @name={{@icon}} @size=\\\"16\\\" @stretched={{true}} />\\n </span>\\n {{~/if}}</Hds::Interactive>\")","/**\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_ICONPOSITION = 'trailing';\nexport const DEFAULT_COLOR = 'primary';\nexport const ICONPOSITIONS = ['leading', 'trailing'];\nexport const COLORS = ['primary', 'secondary'];\n\nexport default class HdsLinkInlineComponent extends Component {\n constructor() {\n super(...arguments);\n if (!(this.args.href || this.args.route)) {\n assert('@href or @route must be defined for <Hds::Link::Inline>');\n }\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of link to be used; acceptable values are `primary` and `secondary`\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Link::Inline\" 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 iconPosition\n * @type {string}\n * @default leading\n * @description Positions the icon before or after the text; allowed values are `leading` or `trailing`\n */\n get iconPosition() {\n let { iconPosition = DEFAULT_ICONPOSITION } = this.args;\n\n assert(\n `@iconPosition for \"Hds::Link::Inline\" must be one of the following: ${ICONPOSITIONS.join(\n ', '\n )}; received: ${iconPosition}`,\n ICONPOSITIONS.includes(iconPosition)\n );\n\n return iconPosition;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method LinkInline#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-link-inline'];\n\n // add a class based on the @color argument\n classes.push(`hds-link-inline--color-${this.color}`);\n\n // add a class based on the @iconPosition argument\n classes.push(`hds-link-inline--icon-${this.iconPosition}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_ICONPOSITION","DEFAULT_COLOR","ICONPOSITIONS","COLORS","HdsLinkInlineComponent","Component","constructor","arguments","args","href","route","assert","color","join","includes","iconPosition","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,iuCAAiuC;;ACDnwC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G;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,iBAAiB,CAAC,CAAA;;AAEjC;IACAA,OAAO,CAACC,IAAI,CAAE,CAAA,uBAAA,EAAyB,IAAI,CAACN,KAAM,EAAC,CAAC,CAAA;;AAEpD;IACAK,OAAO,CAACC,IAAI,CAAE,CAAA,sBAAA,EAAwB,IAAI,CAACH,YAAa,EAAC,CAAC,CAAA;AAE1D,IAAA,OAAOE,OAAO,CAACJ,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACM,oBAAA,CAAAC,QAAA,EA9DoBhB,sBAAsB,CAAA;;;;"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { assert } from '@ember/debug';
|
|
3
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
+
import { setComponentTemplate } from '@ember/component';
|
|
5
|
+
|
|
6
|
+
var TEMPLATE = precompileTemplate("<Hds::Interactive\n class={{this.classNames}}\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 (eq this.iconPosition \"leading\")}}\n <span class=\"hds-link-standalone__icon\">\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </span>\n <span class=\"hds-link-standalone__text\">\n {{this.text}}\n </span>\n {{else}}\n <span class=\"hds-link-standalone__text\">\n {{this.text}}\n </span>\n <span class=\"hds-link-standalone__icon\">\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </span>\n {{/if}}\n</Hds::Interactive>");
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Copyright (c) HashiCorp, Inc.
|
|
10
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const DEFAULT_ICONPOSITION = 'leading';
|
|
14
|
+
const DEFAULT_COLOR = 'primary';
|
|
15
|
+
const DEFAULT_SIZE = 'medium';
|
|
16
|
+
const ICONPOSITIONS = ['leading', 'trailing'];
|
|
17
|
+
const COLORS = ['primary', 'secondary'];
|
|
18
|
+
const SIZES = ['small', 'medium', 'large'];
|
|
19
|
+
class HdsLinkStandaloneComponent extends Component {
|
|
20
|
+
constructor() {
|
|
21
|
+
super(...arguments);
|
|
22
|
+
if (!(this.args.href || this.args.route)) {
|
|
23
|
+
assert('@href or @route must be defined for <Hds::Link::Standalone>');
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* @param text
|
|
29
|
+
* @type {string}
|
|
30
|
+
* @description The text of the link. If no text value is defined an error will be thrown.
|
|
31
|
+
*/
|
|
32
|
+
get text() {
|
|
33
|
+
let {
|
|
34
|
+
text
|
|
35
|
+
} = this.args;
|
|
36
|
+
assert('@text for "Hds::Link::Standalone" must have a valid value', text !== undefined);
|
|
37
|
+
return text;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param color
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @default primary
|
|
44
|
+
* @description Determines the color of link to be used; acceptable values are `primary` and `secondary`
|
|
45
|
+
*/
|
|
46
|
+
get color() {
|
|
47
|
+
let {
|
|
48
|
+
color = DEFAULT_COLOR
|
|
49
|
+
} = this.args;
|
|
50
|
+
assert(`@color for "Hds::Link::Standalone" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
|
|
51
|
+
return color;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* @param icon
|
|
56
|
+
* @type {string|null}
|
|
57
|
+
* @default null
|
|
58
|
+
* @description The name of the icon to be used. An icon name must be defined.
|
|
59
|
+
*/
|
|
60
|
+
get icon() {
|
|
61
|
+
let {
|
|
62
|
+
icon
|
|
63
|
+
} = this.args;
|
|
64
|
+
assert('@icon for "Hds::Link::Standalone" must have a valid value', icon !== undefined);
|
|
65
|
+
return icon;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @param iconPosition
|
|
70
|
+
* @type {string}
|
|
71
|
+
* @default leading
|
|
72
|
+
* @description Positions the icon before or after the text; allowed values are `leading` or `trailing`
|
|
73
|
+
*/
|
|
74
|
+
get iconPosition() {
|
|
75
|
+
let {
|
|
76
|
+
iconPosition = DEFAULT_ICONPOSITION
|
|
77
|
+
} = this.args;
|
|
78
|
+
assert(`@iconPosition for "Hds::Link::Standalone" must be one of the following: ${ICONPOSITIONS.join(', ')}; received: ${iconPosition}`, ICONPOSITIONS.includes(iconPosition));
|
|
79
|
+
return iconPosition;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @param size
|
|
84
|
+
* @type {string}
|
|
85
|
+
* @default medium
|
|
86
|
+
* @description The size of the standalone link; acceptable values are `small`, `medium`, and `large`
|
|
87
|
+
*/
|
|
88
|
+
get size() {
|
|
89
|
+
let {
|
|
90
|
+
size = DEFAULT_SIZE
|
|
91
|
+
} = this.args;
|
|
92
|
+
assert(`@size for "Hds::Link::Standalone" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size));
|
|
93
|
+
return size;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @param iconSize
|
|
98
|
+
* @type {string}
|
|
99
|
+
* @default 16
|
|
100
|
+
* @description ensures that the correct icon size is used. Automatically calculated.
|
|
101
|
+
*/
|
|
102
|
+
get iconSize() {
|
|
103
|
+
if (this.args.size === 'large') {
|
|
104
|
+
return '24';
|
|
105
|
+
} else {
|
|
106
|
+
return '16';
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Get the class names to apply to the component.
|
|
112
|
+
* @method LinkStandalone#classNames
|
|
113
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
114
|
+
*/
|
|
115
|
+
get classNames() {
|
|
116
|
+
let classes = ['hds-link-standalone'];
|
|
117
|
+
|
|
118
|
+
// add a class based on the @size argument
|
|
119
|
+
classes.push(`hds-link-standalone--size-${this.size}`);
|
|
120
|
+
|
|
121
|
+
// add a class based on the @color argument
|
|
122
|
+
classes.push(`hds-link-standalone--color-${this.color}`);
|
|
123
|
+
|
|
124
|
+
// add a class based on the @iconPosition argument
|
|
125
|
+
classes.push(`hds-link-standalone--icon-position-${this.iconPosition}`);
|
|
126
|
+
return classes.join(' ');
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
setComponentTemplate(TEMPLATE, HdsLinkStandaloneComponent);
|
|
130
|
+
|
|
131
|
+
export { COLORS, DEFAULT_COLOR, DEFAULT_ICONPOSITION, DEFAULT_SIZE, ICONPOSITIONS, SIZES, HdsLinkStandaloneComponent as default };
|
|
132
|
+
//# sourceMappingURL=standalone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standalone.js","sources":["../../../../src/components/hds/link/standalone.hbs","../../../../src/components/hds/link/standalone.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"<Hds::Interactive\\n class={{this.classNames}}\\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 (eq this.iconPosition \\\"leading\\\")}}\\n <span class=\\\"hds-link-standalone__icon\\\">\\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </span>\\n <span class=\\\"hds-link-standalone__text\\\">\\n {{this.text}}\\n </span>\\n {{else}}\\n <span class=\\\"hds-link-standalone__text\\\">\\n {{this.text}}\\n </span>\\n <span class=\\\"hds-link-standalone__icon\\\">\\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </span>\\n {{/if}}\\n</Hds::Interactive>\")","/**\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_ICONPOSITION = 'leading';\nexport const DEFAULT_COLOR = 'primary';\nexport const DEFAULT_SIZE = 'medium';\nexport const ICONPOSITIONS = ['leading', 'trailing'];\nexport const COLORS = ['primary', 'secondary'];\nexport const SIZES = ['small', 'medium', 'large'];\n\nexport default class HdsLinkStandaloneComponent extends Component {\n constructor() {\n super(...arguments);\n if (!(this.args.href || this.args.route)) {\n assert('@href or @route must be defined for <Hds::Link::Standalone>');\n }\n }\n\n /**\n * @param text\n * @type {string}\n * @description The text of the link. 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::Link::Standalone\" 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 link to be used; acceptable values are `primary` and `secondary`\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Link::Standalone\" 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 icon\n * @type {string|null}\n * @default null\n * @description The name of the icon to be used. An icon name must be defined.\n */\n get icon() {\n let { icon } = this.args;\n\n assert(\n '@icon for \"Hds::Link::Standalone\" must have a valid value',\n icon !== undefined\n );\n\n return icon;\n }\n\n /**\n * @param iconPosition\n * @type {string}\n * @default leading\n * @description Positions the icon before or after the text; allowed values are `leading` or `trailing`\n */\n get iconPosition() {\n let { iconPosition = DEFAULT_ICONPOSITION } = this.args;\n\n assert(\n `@iconPosition for \"Hds::Link::Standalone\" must be one of the following: ${ICONPOSITIONS.join(\n ', '\n )}; received: ${iconPosition}`,\n ICONPOSITIONS.includes(iconPosition)\n );\n\n return iconPosition;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the standalone link; acceptable values are `small`, `medium`, and `large`\n */\n get size() {\n let { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Link::Standalone\" 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 16\n * @description ensures that the correct icon size is used. Automatically calculated.\n */\n get iconSize() {\n if (this.args.size === 'large') {\n return '24';\n } else {\n return '16';\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method LinkStandalone#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-link-standalone'];\n\n // add a class based on the @size argument\n classes.push(`hds-link-standalone--size-${this.size}`);\n\n // add a class based on the @color argument\n classes.push(`hds-link-standalone--color-${this.color}`);\n\n // add a class based on the @iconPosition argument\n classes.push(`hds-link-standalone--icon-position-${this.iconPosition}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_ICONPOSITION","DEFAULT_COLOR","DEFAULT_SIZE","ICONPOSITIONS","COLORS","SIZES","HdsLinkStandaloneComponent","Component","constructor","arguments","args","href","route","assert","text","undefined","color","join","includes","icon","iconPosition","size","iconSize","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,o3BAAo3B;;ACDt5B;AACA;AACA;AACA;;AAKO,MAAMA,oBAAoB,GAAG,UAAS;AACtC,MAAMC,aAAa,GAAG,UAAS;AAC/B,MAAMC,YAAY,GAAG,SAAQ;MACvBC,aAAa,GAAG,CAAC,SAAS,EAAE,UAAU,EAAC;MACvCC,MAAM,GAAG,CAAC,SAAS,EAAE,WAAW,EAAC;AACvC,MAAMC,KAAK,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAC;AAElC,MAAMC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,OAAO,CAACP,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACS,oBAAA,CAAAC,QAAA,EAnIoBrB,0BAA0B,CAAA;;;;"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { a as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { tracked } from '@glimmer/tracking';
|
|
4
|
+
import { action } from '@ember/object';
|
|
5
|
+
import { schedule } from '@ember/runloop';
|
|
6
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
|
+
import { setComponentTemplate } from '@ember/component';
|
|
8
|
+
|
|
9
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! template-lint-disable no-invalid-interactive }}\n<div\n class=\"hds-menu-primitive\"\n ...attributes\n {{did-insert this.didInsert}}\n {{on \"focusout\" this.onFocusOut}}\n {{on \"keyup\" this.onKeyUp}}\n>\n <div class=\"hds-menu-primitive__toggle\" tabindex=\"-1\">\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\"toggle\"}}\n </div>\n {{#if this.isOpen}}\n <div class=\"hds-menu-primitive__content\" tabindex=\"-1\">\n {{yield (hash close=this.close) to=\"content\"}}\n </div>\n {{/if}}\n</div>\n{{! template-lint-enable no-invalid-interactive }}");
|
|
10
|
+
|
|
11
|
+
var _class, _descriptor, _descriptor2;
|
|
12
|
+
let HdsMenuPrimitiveComponent = (_class = class HdsMenuPrimitiveComponent extends Component {
|
|
13
|
+
constructor(...args) {
|
|
14
|
+
super(...args);
|
|
15
|
+
_initializerDefineProperty(this, "isOpen", _descriptor, this);
|
|
16
|
+
// notice: if in the future we need to add a "@isOpen" prop to control the status from outside (eg to have the MenuPrimitive opened on render) just add "this.args.isOpen" here to initalize the variable
|
|
17
|
+
_initializerDefineProperty(this, "toggleRef", _descriptor2, this);
|
|
18
|
+
}
|
|
19
|
+
didInsert(element) {
|
|
20
|
+
this.element = element;
|
|
21
|
+
}
|
|
22
|
+
onClickToggle(event) {
|
|
23
|
+
// we store a reference to the DOM node that has the "onClickToggle" event associated with it
|
|
24
|
+
if (!this.toggleRef) {
|
|
25
|
+
this.toggleRef = event.currentTarget;
|
|
26
|
+
}
|
|
27
|
+
this.isOpen = !this.isOpen;
|
|
28
|
+
// we explicitly apply a focus state to the toggle element to overcome a bug in WebKit (see https://github.com/hashicorp/design-system/commit/40cd7f6b3cb15c45f9a1235fafd0fb3ed58e6e62)
|
|
29
|
+
this.toggleRef.focus();
|
|
30
|
+
}
|
|
31
|
+
onFocusOut(event) {
|
|
32
|
+
// due to inconsistent implementation of relatedTarget across browsers we use the activeElement as a fallback
|
|
33
|
+
// if the related target is not part of the disclosed content we close the disclosed container
|
|
34
|
+
if (!this.element.contains(event.relatedTarget || document.activeElement)) {
|
|
35
|
+
this.close();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
onKeyUp(event) {
|
|
39
|
+
if (event.key === 'Escape') {
|
|
40
|
+
this.close();
|
|
41
|
+
this.toggleRef.focus();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
close() {
|
|
45
|
+
// we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation
|
|
46
|
+
schedule('afterRender', () => {
|
|
47
|
+
this.isOpen = false;
|
|
48
|
+
// we call the "onClose" callback if it exists (and is a function)
|
|
49
|
+
if (this.args.onClose && typeof this.args.onClose === 'function') {
|
|
50
|
+
this.args.onClose();
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "isOpen", [tracked], {
|
|
55
|
+
configurable: true,
|
|
56
|
+
enumerable: true,
|
|
57
|
+
writable: true,
|
|
58
|
+
initializer: null
|
|
59
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "toggleRef", [tracked], {
|
|
60
|
+
configurable: true,
|
|
61
|
+
enumerable: true,
|
|
62
|
+
writable: true,
|
|
63
|
+
initializer: null
|
|
64
|
+
}), _applyDecoratedDescriptor(_class.prototype, "didInsert", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsert"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onClickToggle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickToggle"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onFocusOut", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onFocusOut"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onKeyUp", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onKeyUp"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "close", [action], Object.getOwnPropertyDescriptor(_class.prototype, "close"), _class.prototype)), _class);
|
|
65
|
+
setComponentTemplate(TEMPLATE, HdsMenuPrimitiveComponent);
|
|
66
|
+
|
|
67
|
+
export { HdsMenuPrimitiveComponent as default };
|
|
68
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/menu-primitive/index.hbs","../../../../src/components/hds/menu-primitive/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! template-lint-disable no-invalid-interactive }}\\n<div\\n class=\\\"hds-menu-primitive\\\"\\n ...attributes\\n {{did-insert this.didInsert}}\\n {{on \\\"focusout\\\" this.onFocusOut}}\\n {{on \\\"keyup\\\" this.onKeyUp}}\\n>\\n <div class=\\\"hds-menu-primitive__toggle\\\" tabindex=\\\"-1\\\">\\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\\\"toggle\\\"}}\\n </div>\\n {{#if this.isOpen}}\\n <div class=\\\"hds-menu-primitive__content\\\" tabindex=\\\"-1\\\">\\n {{yield (hash close=this.close) to=\\\"content\\\"}}\\n </div>\\n {{/if}}\\n</div>\\n{{! template-lint-enable no-invalid-interactive }}\")","/**\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 default class HdsMenuPrimitiveComponent extends Component {\n @tracked isOpen; // notice: if in the future we need to add a \"@isOpen\" prop to control the status from outside (eg to have the MenuPrimitive opened on render) just add \"this.args.isOpen\" here to initalize the variable\n @tracked toggleRef;\n\n @action\n didInsert(element) {\n this.element = element;\n }\n\n @action\n onClickToggle(event) {\n // we store a reference to the DOM node that has the \"onClickToggle\" event associated with it\n if (!this.toggleRef) {\n this.toggleRef = event.currentTarget;\n }\n this.isOpen = !this.isOpen;\n // we explicitly apply a focus state to the toggle element to overcome a bug in WebKit (see https://github.com/hashicorp/design-system/commit/40cd7f6b3cb15c45f9a1235fafd0fb3ed58e6e62)\n this.toggleRef.focus();\n }\n\n @action\n onFocusOut(event) {\n // due to inconsistent implementation of relatedTarget across browsers we use the activeElement as a fallback\n // if the related target is not part of the disclosed content we close the disclosed container\n if (!this.element.contains(event.relatedTarget || document.activeElement)) {\n this.close();\n }\n }\n\n @action\n onKeyUp(event) {\n if (event.key === 'Escape') {\n this.close();\n this.toggleRef.focus();\n }\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":["HdsMenuPrimitiveComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","didInsert","element","onClickToggle","event","toggleRef","currentTarget","isOpen","focus","onFocusOut","contains","relatedTarget","document","activeElement","close","onKeyUp","key","schedule","onClose","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,yqBAAyqB;;;ACStrBA,IAAAA,yBAAyB,IAAAC,MAAA,GAA/B,MAAMD,yBAAyB,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAC9C;AAAAD,IAAAA,0BAAA,oBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;EAIjBC,SAASA,CAACC,OAAO,EAAE;IACjB,IAAI,CAACA,OAAO,GAAGA,OAAO,CAAA;AACxB,GAAA;EAGAC,aAAaA,CAACC,KAAK,EAAE;AACnB;AACA,IAAA,IAAI,CAAC,IAAI,CAACC,SAAS,EAAE;AACnB,MAAA,IAAI,CAACA,SAAS,GAAGD,KAAK,CAACE,aAAa,CAAA;AACtC,KAAA;AACA,IAAA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAI,CAACA,MAAM,CAAA;AAC1B;AACA,IAAA,IAAI,CAACF,SAAS,CAACG,KAAK,EAAE,CAAA;AACxB,GAAA;EAGAC,UAAUA,CAACL,KAAK,EAAE;AAChB;AACA;AACA,IAAA,IAAI,CAAC,IAAI,CAACF,OAAO,CAACQ,QAAQ,CAACN,KAAK,CAACO,aAAa,IAAIC,QAAQ,CAACC,aAAa,CAAC,EAAE;MACzE,IAAI,CAACC,KAAK,EAAE,CAAA;AACd,KAAA;AACF,GAAA;EAGAC,OAAOA,CAACX,KAAK,EAAE;AACb,IAAA,IAAIA,KAAK,CAACY,GAAG,KAAK,QAAQ,EAAE;MAC1B,IAAI,CAACF,KAAK,EAAE,CAAA;AACZ,MAAA,I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AD,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,EAAA,YAAA,EAAA,CAWNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,EAAA,YAAA,CAAA,EAAA1B,MAAA,CAAA0B,SAAA,CAAAD,EAAAA,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,EAAA,SAAA,EAAA,CASNM,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,EAAA,SAAA,CAAA,EAAA1B,MAAA,CAAA0B,SAAA,GAAAD,yBAAA,CAAAzB,MAAA,CAAA0B,SAAA,EAQNM,OAAAA,EAAAA,CAAAA,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAA0B,SAAA,YAAA1B,MAAA,CAAA0B,SAAA,CAAA,GAAA1B,MAAA,EAAA;AArCqCmC,oBAAA,CAAAC,QAAA,EAAArC,yBAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import templateOnly from '@ember/component/template-only';
|
|
2
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
|
+
import { setComponentTemplate } from '@ember/component';
|
|
4
|
+
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class=\"hds-modal__body\" ...attributes>\n {{yield}}\n</div>");
|
|
6
|
+
|
|
7
|
+
var body = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { body as default };
|
|
10
|
+
//# sourceMappingURL=body.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"body.js","sources":["../../../../src/components/hds/modal/body.hbs","../../../../src/components/hds/modal/body.js"],"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-modal__body\\\" ...attributes>\\n {{yield}}\\n</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kJAAkJ;;ACApL,WAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import templateOnly from '@ember/component/template-only';
|
|
2
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
|
+
import { setComponentTemplate } from '@ember/component';
|
|
4
|
+
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class=\"hds-modal__footer\" ...attributes>\n {{yield (hash close=@onDismiss)}}\n</div>");
|
|
6
|
+
|
|
7
|
+
var footer = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { footer as default };
|
|
10
|
+
//# sourceMappingURL=footer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/modal/footer.hbs","../../../../src/components/hds/modal/footer.js"],"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-modal__footer\\\" ...attributes>\\n {{yield (hash close=@onDismiss)}}\\n</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4KAA4K;;ACA9M,aAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import templateOnly from '@ember/component/template-only';
|
|
2
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
|
+
import { setComponentTemplate } from '@ember/component';
|
|
4
|
+
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class=\"hds-modal__header\" ...attributes>\n {{#if @icon}}\n <FlightIcon class=\"hds-modal__icon\" @name={{@icon}} @size=\"24\" @isInlineBlock={{false}} />\n {{/if}}\n <Hds::Text::Display class=\"hds-modal__title\" @tag=\"div\" @size=\"300\" @weight=\"semibold\" id={{@id}}>\n {{#if @tagline}}\n <Hds::Text::Body class=\"hds-modal__tagline\" @tag=\"div\" @size=\"100\" @weight=\"regular\">\n {{@tagline}}\n </Hds::Text::Body>\n {{/if}}\n {{yield}}\n </Hds::Text::Display>\n <Hds::DismissButton class=\"hds-modal__dismiss\" {{on \"click\" @onDismiss}} />\n</div>");
|
|
6
|
+
|
|
7
|
+
var header = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { header as default };
|
|
10
|
+
//# sourceMappingURL=header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"header.js","sources":["../../../../src/components/hds/modal/header.hbs","../../../../src/components/hds/modal/header.js"],"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-modal__header\\\" ...attributes>\\n {{#if @icon}}\\n <FlightIcon class=\\\"hds-modal__icon\\\" @name={{@icon}} @size=\\\"24\\\" @isInlineBlock={{false}} />\\n {{/if}}\\n <Hds::Text::Display class=\\\"hds-modal__title\\\" @tag=\\\"div\\\" @size=\\\"300\\\" @weight=\\\"semibold\\\" id={{@id}}>\\n {{#if @tagline}}\\n <Hds::Text::Body class=\\\"hds-modal__tagline\\\" @tag=\\\"div\\\" @size=\\\"100\\\" @weight=\\\"regular\\\">\\n {{@tagline}}\\n </Hds::Text::Body>\\n {{/if}}\\n {{yield}}\\n </Hds::Text::Display>\\n <Hds::DismissButton class=\\\"hds-modal__dismiss\\\" {{on \\\"click\\\" @onDismiss}} />\\n</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wqBAAwqB;;ACA1sB,aAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|