@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 @@
|
|
|
1
|
+
{"version":3,"file":"description.js","sources":["../../../../src/components/hds/alert/description.hbs","../../../../src/components/hds/alert/description.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-alert__description hds-font-weight-regular hds-foreground-primary\\\" ...attributes>{{yield}}</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kMAAkM;;ACApO,kBAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { a as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
|
|
2
|
+
import Component from '@glimmer/component';
|
|
3
|
+
import { action } from '@ember/object';
|
|
4
|
+
import { assert } from '@ember/debug';
|
|
5
|
+
import { guidFor } from '@ember/object/internals';
|
|
6
|
+
import { tracked } from '@glimmer/tracking';
|
|
7
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
8
|
+
import { setComponentTemplate } from '@ember/component';
|
|
9
|
+
|
|
10
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div\n class={{this.classNames}}\n role={{this.role}}\n aria-live=\"polite\"\n aria-labelledby={{this.ariaLabelledBy}}\n {{did-insert this.didInsert}}\n ...attributes\n>\n {{#if this.icon}}\n <div class=\"hds-alert__icon\">\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} @isInlineBlock={{false}} />\n </div>\n {{/if}}\n\n <div class=\"hds-alert__content\">\n <div class=\"hds-alert__text {{if (eq @type \'compact\') \'hds-typography-body-100\' \'hds-typography-body-200\'}}\">\n {{yield (hash Title=(component \"hds/alert/title\"))}}\n {{yield (hash Description=(component \"hds/alert/description\"))}}\n </div>\n\n <div class=\"hds-alert__actions\">\n {{yield\n (hash\n Button=(component \"hds/button\" size=\"small\") LinkStandalone=(component \"hds/link/standalone\" size=\"small\")\n )\n }}\n </div>\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </div>\n\n {{#if this.onDismiss}}\n <Hds::DismissButton class=\"hds-alert__dismiss\" {{on \"click\" this.onDismiss}} />\n {{/if}}\n</div>");
|
|
11
|
+
|
|
12
|
+
var _class, _descriptor, _descriptor2;
|
|
13
|
+
const TYPES = ['page', 'inline', 'compact'];
|
|
14
|
+
const DEFAULT_COLOR = 'neutral';
|
|
15
|
+
const COLORS = ['neutral', 'highlight', 'success', 'warning', 'critical'];
|
|
16
|
+
const MAPPING_COLORS_TO_ICONS = {
|
|
17
|
+
neutral: 'info',
|
|
18
|
+
highlight: 'info',
|
|
19
|
+
success: 'check-circle',
|
|
20
|
+
warning: 'alert-triangle',
|
|
21
|
+
critical: 'alert-diamond'
|
|
22
|
+
};
|
|
23
|
+
const CONTENT_ELEMENT_SELECTOR = '.hds-alert__content';
|
|
24
|
+
const TITLE_ELEMENT_SELECTOR = '.hds-alert__title';
|
|
25
|
+
const DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description';
|
|
26
|
+
let HdsAlertIndexComponent = (_class = class HdsAlertIndexComponent extends Component {
|
|
27
|
+
constructor() {
|
|
28
|
+
super(...arguments);
|
|
29
|
+
_initializerDefineProperty(this, "role", _descriptor, this);
|
|
30
|
+
_initializerDefineProperty(this, "ariaLabelledBy", _descriptor2, this);
|
|
31
|
+
assert(`@type for "Hds::Alert" must be one of the following: ${TYPES.join(', ')}; received: ${this.args.type}`, TYPES.includes(this.args.type));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @param color
|
|
36
|
+
* @type {enum}
|
|
37
|
+
* @default neutral
|
|
38
|
+
* @description Determines the color scheme for the alert.
|
|
39
|
+
*/
|
|
40
|
+
get color() {
|
|
41
|
+
let {
|
|
42
|
+
color = DEFAULT_COLOR
|
|
43
|
+
} = this.args;
|
|
44
|
+
assert(`@color for "Hds::Alert" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
|
|
45
|
+
return color;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* @param icon
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @default null
|
|
52
|
+
* @description The name of the icon to be used.
|
|
53
|
+
*/
|
|
54
|
+
get icon() {
|
|
55
|
+
let {
|
|
56
|
+
icon
|
|
57
|
+
} = this.args;
|
|
58
|
+
|
|
59
|
+
// If `icon` isn't passed, use the pre-defined one from `color`
|
|
60
|
+
if (icon === undefined) {
|
|
61
|
+
if (this.args.type === 'compact') {
|
|
62
|
+
// for the "compact" type by default we use filled icons
|
|
63
|
+
return `${MAPPING_COLORS_TO_ICONS[this.color]}-fill`;
|
|
64
|
+
} else {
|
|
65
|
+
// for all the other types by default we use outlined icons
|
|
66
|
+
return MAPPING_COLORS_TO_ICONS[this.color];
|
|
67
|
+
}
|
|
68
|
+
// If `icon` is set explicitly to false, user doesn't want any icon in the alert
|
|
69
|
+
} else if (icon === false) {
|
|
70
|
+
assert(`@icon for "Hds::Alert" with @type "compact" is required`, this.args.type !== 'compact');
|
|
71
|
+
return false;
|
|
72
|
+
} else {
|
|
73
|
+
// If a name for `icon` is passed, set FlightIcon to that name
|
|
74
|
+
return icon;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @param onDismiss
|
|
80
|
+
* @type {function}
|
|
81
|
+
* @default () => {}
|
|
82
|
+
*/
|
|
83
|
+
get onDismiss() {
|
|
84
|
+
let {
|
|
85
|
+
onDismiss
|
|
86
|
+
} = this.args;
|
|
87
|
+
if (typeof onDismiss === 'function') {
|
|
88
|
+
return onDismiss;
|
|
89
|
+
} else {
|
|
90
|
+
return false;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* @param iconSize
|
|
96
|
+
* @type {string}
|
|
97
|
+
* @description ensures that the correct icon size is used. Automatically calculated.
|
|
98
|
+
*/
|
|
99
|
+
get iconSize() {
|
|
100
|
+
if (this.args.type === 'compact') {
|
|
101
|
+
return '16';
|
|
102
|
+
} else {
|
|
103
|
+
return '24';
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Get the class names to apply to the component.
|
|
109
|
+
* @method Alert#classNames
|
|
110
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
111
|
+
*/
|
|
112
|
+
get classNames() {
|
|
113
|
+
let classes = ['hds-alert'];
|
|
114
|
+
|
|
115
|
+
// Add a class based on the @type argument
|
|
116
|
+
classes.push(`hds-alert--type-${this.args.type}`);
|
|
117
|
+
|
|
118
|
+
// Add a class based on the @color argument
|
|
119
|
+
classes.push(`hds-alert--color-${this.color}`);
|
|
120
|
+
return classes.join(' ');
|
|
121
|
+
}
|
|
122
|
+
didInsert(element) {
|
|
123
|
+
let actions = element.querySelectorAll(`${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`);
|
|
124
|
+
if (actions.length) {
|
|
125
|
+
this.role = 'alertdialog';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// `alertdialog` must have an accessible name so we use either the
|
|
129
|
+
// title or the description as label for the alert
|
|
130
|
+
let label = element.querySelector(TITLE_ELEMENT_SELECTOR) || element.querySelector(DESCRIPTION_ELEMENT_SELECTOR);
|
|
131
|
+
if (label) {
|
|
132
|
+
let labelId = label.getAttribute('id') || guidFor(element);
|
|
133
|
+
label.setAttribute('id', labelId);
|
|
134
|
+
this.ariaLabelledBy = labelId;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "role", [tracked], {
|
|
138
|
+
configurable: true,
|
|
139
|
+
enumerable: true,
|
|
140
|
+
writable: true,
|
|
141
|
+
initializer: function () {
|
|
142
|
+
return 'alert';
|
|
143
|
+
}
|
|
144
|
+
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "ariaLabelledBy", [tracked], {
|
|
145
|
+
configurable: true,
|
|
146
|
+
enumerable: true,
|
|
147
|
+
writable: true,
|
|
148
|
+
initializer: null
|
|
149
|
+
}), _applyDecoratedDescriptor(_class.prototype, "didInsert", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsert"), _class.prototype)), _class);
|
|
150
|
+
setComponentTemplate(TEMPLATE, HdsAlertIndexComponent);
|
|
151
|
+
|
|
152
|
+
export { COLORS, DEFAULT_COLOR, MAPPING_COLORS_TO_ICONS, TYPES, HdsAlertIndexComponent as default };
|
|
153
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/alert/index.hbs","../../../../src/components/hds/alert/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\\n class={{this.classNames}}\\n role={{this.role}}\\n aria-live=\\\"polite\\\"\\n aria-labelledby={{this.ariaLabelledBy}}\\n {{did-insert this.didInsert}}\\n ...attributes\\n>\\n {{#if this.icon}}\\n <div class=\\\"hds-alert__icon\\\">\\n <FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} @isInlineBlock={{false}} />\\n </div>\\n {{/if}}\\n\\n <div class=\\\"hds-alert__content\\\">\\n <div class=\\\"hds-alert__text {{if (eq @type \\'compact\\') \\'hds-typography-body-100\\' \\'hds-typography-body-200\\'}}\\\">\\n {{yield (hash Title=(component \\\"hds/alert/title\\\"))}}\\n {{yield (hash Description=(component \\\"hds/alert/description\\\"))}}\\n </div>\\n\\n <div class=\\\"hds-alert__actions\\\">\\n {{yield\\n (hash\\n Button=(component \\\"hds/button\\\" size=\\\"small\\\") LinkStandalone=(component \\\"hds/link/standalone\\\" size=\\\"small\\\")\\n )\\n }}\\n </div>\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </div>\\n\\n {{#if this.onDismiss}}\\n <Hds::DismissButton class=\\\"hds-alert__dismiss\\\" {{on \\\"click\\\" this.onDismiss}} />\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\nimport { tracked } from '@glimmer/tracking';\n\nexport const TYPES = ['page', 'inline', 'compact'];\nexport const DEFAULT_COLOR = 'neutral';\nexport const COLORS = [\n 'neutral',\n 'highlight',\n 'success',\n 'warning',\n 'critical',\n];\nexport const MAPPING_COLORS_TO_ICONS = {\n neutral: 'info',\n highlight: 'info',\n success: 'check-circle',\n warning: 'alert-triangle',\n critical: 'alert-diamond',\n};\n\nconst CONTENT_ELEMENT_SELECTOR = '.hds-alert__content';\nconst TITLE_ELEMENT_SELECTOR = '.hds-alert__title';\nconst DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description';\n\nexport default class HdsAlertIndexComponent extends Component {\n @tracked role = 'alert';\n @tracked ariaLabelledBy;\n\n constructor() {\n super(...arguments);\n\n assert(\n `@type for \"Hds::Alert\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${this.args.type}`,\n TYPES.includes(this.args.type)\n );\n }\n\n /**\n * @param color\n * @type {enum}\n * @default neutral\n * @description Determines the color scheme for the alert.\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Alert\" 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}\n * @default null\n * @description The name of the icon to be used.\n */\n get icon() {\n let { icon } = this.args;\n\n // If `icon` isn't passed, use the pre-defined one from `color`\n if (icon === undefined) {\n if (this.args.type === 'compact') {\n // for the \"compact\" type by default we use filled icons\n return `${MAPPING_COLORS_TO_ICONS[this.color]}-fill`;\n } else {\n // for all the other types by default we use outlined icons\n return MAPPING_COLORS_TO_ICONS[this.color];\n }\n // If `icon` is set explicitly to false, user doesn't want any icon in the alert\n } else if (icon === false) {\n assert(\n `@icon for \"Hds::Alert\" with @type \"compact\" is required`,\n this.args.type !== 'compact'\n );\n\n return false;\n } else {\n // If a name for `icon` is passed, set FlightIcon to that name\n return icon;\n }\n }\n\n /**\n * @param onDismiss\n * @type {function}\n * @default () => {}\n */\n get onDismiss() {\n let { onDismiss } = this.args;\n\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return false;\n }\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @description ensures that the correct icon size is used. Automatically calculated.\n */\n get iconSize() {\n if (this.args.type === 'compact') {\n return '16';\n } else {\n return '24';\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Alert#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-alert'];\n\n // Add a class based on the @type argument\n classes.push(`hds-alert--type-${this.args.type}`);\n\n // Add a class based on the @color argument\n classes.push(`hds-alert--color-${this.color}`);\n\n return classes.join(' ');\n }\n\n @action\n didInsert(element) {\n let actions = element.querySelectorAll(\n `${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`\n );\n if (actions.length) {\n this.role = 'alertdialog';\n }\n\n // `alertdialog` must have an accessible name so we use either the\n // title or the description as label for the alert\n let label =\n element.querySelector(TITLE_ELEMENT_SELECTOR) ||\n element.querySelector(DESCRIPTION_ELEMENT_SELECTOR);\n if (label) {\n let labelId = label.getAttribute('id') || guidFor(element);\n label.setAttribute('id', labelId);\n this.ariaLabelledBy = labelId;\n }\n }\n}\n"],"names":["TYPES","DEFAULT_COLOR","COLORS","MAPPING_COLORS_TO_ICONS","neutral","highlight","success","warning","critical","CONTENT_ELEMENT_SELECTOR","TITLE_ELEMENT_SELECTOR","DESCRIPTION_ELEMENT_SELECTOR","HdsAlertIndexComponent","_class","Component","constructor","arguments","_initializerDefineProperty","_descriptor","_descriptor2","assert","join","args","type","includes","color","icon","undefined","onDismiss","iconSize","classNames","classes","push","didInsert","element","actions","querySelectorAll","length","role","label","querySelector","labelId","getAttribute","guidFor","setAttribute","ariaLabelledBy","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":"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"}
|
|
@@ -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-alert__title hds-font-weight-semibold\" ...attributes>{{yield}}</div>");
|
|
6
|
+
|
|
7
|
+
var title = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { title as default };
|
|
10
|
+
//# sourceMappingURL=title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title.js","sources":["../../../../src/components/hds/alert/title.hbs","../../../../src/components/hds/alert/title.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-alert__title hds-font-weight-semibold\\\" ...attributes>{{yield}}</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,sKAAsK;;ACAxM,YAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
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\n<div class=\"hds-app-footer__copyright\" ...attributes>\n <FlightIcon @name=\"hashicorp\" />\n <Hds::Text::Body @tag=\"span\" @size=\"100\">© {{this.year}} HashiCorp</Hds::Text::Body>\n</div>");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class HdsAppFooterCopyrightComponent extends Component {
|
|
13
|
+
/**
|
|
14
|
+
* @param year
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @description The copyright year
|
|
17
|
+
* @default The current year (calculated via `Date()`)
|
|
18
|
+
*/
|
|
19
|
+
get year() {
|
|
20
|
+
return this.args.year ?? new Date().getFullYear();
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
setComponentTemplate(TEMPLATE, HdsAppFooterCopyrightComponent);
|
|
24
|
+
|
|
25
|
+
export { HdsAppFooterCopyrightComponent as default };
|
|
26
|
+
//# sourceMappingURL=copyright.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"copyright.js","sources":["../../../../src/components/hds/app-footer/copyright.hbs","../../../../src/components/hds/app-footer/copyright.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\\n<div class=\\\"hds-app-footer__copyright\\\" ...attributes>\\n <FlightIcon @name=\\\"hashicorp\\\" />\\n <Hds::Text::Body @tag=\\\"span\\\" @size=\\\"100\\\">© {{this.year}} HashiCorp</Hds::Text::Body>\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsAppFooterCopyrightComponent extends Component {\n /**\n * @param year\n * @type {string}\n * @description The copyright year\n * @default The current year (calculated via `Date()`)\n */\n get year() {\n return this.args.year ?? new Date().getFullYear();\n }\n}\n"],"names":["HdsAppFooterCopyrightComponent","Component","year","args","Date","getFullYear","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mRAAmR;;ACDrT;AACA;AACA;AACA;;AAIe,MAAMA,8BAA8B,SAASC,SAAS,CAAC;AACpE;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAG;AACT,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,IAAI,IAAI,IAAIE,IAAI,EAAE,CAACC,WAAW,EAAE,CAAA;AACnD,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAVoBP,8BAA8B,CAAA;;;;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
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\n<div class={{this.classNames}} ...attributes>\n {{yield (hash ExtraBefore=(component \"hds/yield\"))}}\n <ul class=\"hds-app-footer__list\" aria-label={{this.ariaLabel}}>\n {{yield (hash StatusLink=(component \"hds/app-footer/status-link\"))}}\n {{yield\n (hash\n Link=(component \"hds/app-footer/link\")\n LegalLinks=(component \"hds/app-footer/legal-links\")\n Item=(component \"hds/app-footer/item\")\n )\n }}\n </ul>\n {{yield (hash ExtraAfter=(component \"hds/yield\"))}}\n <Hds::AppFooter::Copyright @year={{@copyrightYear}} />\n</div>");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class HdsAppFooterIndexComponent extends Component {
|
|
13
|
+
/**
|
|
14
|
+
* @param ariaLabel
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @default 'Footer items'
|
|
17
|
+
*/
|
|
18
|
+
get ariaLabel() {
|
|
19
|
+
return this.args.ariaLabel ?? 'Footer items';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param theme
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @description The component theme
|
|
26
|
+
* @default 'light'
|
|
27
|
+
*/
|
|
28
|
+
get theme() {
|
|
29
|
+
return this.args.theme ?? 'light';
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Get the class names to apply to the component.
|
|
34
|
+
* @method classNames
|
|
35
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
36
|
+
*/
|
|
37
|
+
get classNames() {
|
|
38
|
+
let classes = ['hds-app-footer'];
|
|
39
|
+
|
|
40
|
+
// add a class based on the @theme argument
|
|
41
|
+
classes.push(`hds-app-footer--theme-${this.theme}`);
|
|
42
|
+
return classes.join(' ');
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
setComponentTemplate(TEMPLATE, HdsAppFooterIndexComponent);
|
|
46
|
+
|
|
47
|
+
export { HdsAppFooterIndexComponent as default };
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-footer/index.hbs","../../../../src/components/hds/app-footer/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\\n<div class={{this.classNames}} ...attributes>\\n {{yield (hash ExtraBefore=(component \\\"hds/yield\\\"))}}\\n <ul class=\\\"hds-app-footer__list\\\" aria-label={{this.ariaLabel}}>\\n {{yield (hash StatusLink=(component \\\"hds/app-footer/status-link\\\"))}}\\n {{yield\\n (hash\\n Link=(component \\\"hds/app-footer/link\\\")\\n LegalLinks=(component \\\"hds/app-footer/legal-links\\\")\\n Item=(component \\\"hds/app-footer/item\\\")\\n )\\n }}\\n </ul>\\n {{yield (hash ExtraAfter=(component \\\"hds/yield\\\"))}}\\n <Hds::AppFooter::Copyright @year={{@copyrightYear}} />\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsAppFooterIndexComponent extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Footer items'\n */\n get ariaLabel() {\n return this.args.ariaLabel ?? 'Footer items';\n }\n\n /**\n * @param theme\n * @type {string}\n * @description The component theme\n * @default 'light'\n */\n get theme() {\n return this.args.theme ?? 'light';\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-app-footer'];\n\n // add a class based on the @theme argument\n classes.push(`hds-app-footer--theme-${this.theme}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsAppFooterIndexComponent","Component","ariaLabel","args","theme","classNames","classes","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4pBAA4pB;;ACD9rB;AACA;AACA;AACA;;AAIe,MAAMA,0BAA0B,SAASC,SAAS,CAAC;AAChE;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,cAAc,CAAA;AAC9C,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,KAAKA,GAAG;AACV,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,KAAK,IAAI,OAAO,CAAA;AACnC,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAEhC;IACAA,OAAO,CAACC,IAAI,CAAE,CAAA,sBAAA,EAAwB,IAAI,CAACH,KAAM,EAAC,CAAC,CAAA;AAEnD,IAAA,OAAOE,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAjCoBV,0BAA0B,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\n<li class=\"hds-app-footer__list-item\" ...attributes>\n {{yield}}\n</li>");
|
|
6
|
+
|
|
7
|
+
var item = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { item as default };
|
|
10
|
+
//# sourceMappingURL=item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item.js","sources":["../../../../src/components/hds/app-footer/item.hbs","../../../../src/components/hds/app-footer/item.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\\n<li class=\\\"hds-app-footer__list-item\\\" ...attributes>\\n {{yield}}\\n</li>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4JAA4J;;ACA9L,WAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
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\n<Hds::AppFooter::Item>\n <ul class=\"hds-app-footer__legal-links\" aria-label={{this.ariaLabel}} ...attributes>\n <Hds::AppFooter::Link @href={{this.hrefForSupport}}>Support</Hds::AppFooter::Link>\n <Hds::AppFooter::Link @href={{this.hrefForTerms}}>Terms</Hds::AppFooter::Link>\n <Hds::AppFooter::Link @href={{this.hrefForPrivacy}}>Privacy</Hds::AppFooter::Link>\n <Hds::AppFooter::Link @href={{this.hrefForSecurity}}>Security</Hds::AppFooter::Link>\n <Hds::AppFooter::Link @href={{this.hrefForAccessibility}}>Accessibility</Hds::AppFooter::Link>\n </ul>\n</Hds::AppFooter::Item>");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class HdsAppFooterLegalLinksComponent extends Component {
|
|
13
|
+
/**
|
|
14
|
+
* @param ariaLabel
|
|
15
|
+
* @type {string}
|
|
16
|
+
* @default 'Legal links'
|
|
17
|
+
*/
|
|
18
|
+
get ariaLabel() {
|
|
19
|
+
return this.args.ariaLabel ?? 'Legal links';
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param hrefForSupport
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @description The href value of the "Support" link
|
|
26
|
+
*/
|
|
27
|
+
get hrefForSupport() {
|
|
28
|
+
return this.args.hrefForSupport ?? 'https://www.hashicorp.com/support';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* @param hrefForTerms
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @description The href value of the "Terms" link
|
|
35
|
+
*/
|
|
36
|
+
get hrefForTerms() {
|
|
37
|
+
return this.args.hrefForTerms ?? 'https://www.hashicorp.com/terms-of-service';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @param hrefForPrivacy
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @description The href value of the "Privacy" link
|
|
44
|
+
*/
|
|
45
|
+
get hrefForPrivacy() {
|
|
46
|
+
return this.args.hrefForPrivacy ?? 'https://www.hashicorp.com/privacy';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param hrefForSecurity
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @description The href value of the "Security" link
|
|
53
|
+
*/
|
|
54
|
+
get hrefForSecurity() {
|
|
55
|
+
return this.args.hrefForSecurity ?? 'https://www.hashicorp.com/security';
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @param hrefForAccessibility
|
|
60
|
+
* @type {string}
|
|
61
|
+
* @description The href value of the "Accessibility" link
|
|
62
|
+
*/
|
|
63
|
+
get hrefForAccessibility() {
|
|
64
|
+
return this.args.hrefForAccessibility ?? 'https://www.hashicorp.com/accessibility';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
setComponentTemplate(TEMPLATE, HdsAppFooterLegalLinksComponent);
|
|
68
|
+
|
|
69
|
+
export { HdsAppFooterLegalLinksComponent as default };
|
|
70
|
+
//# sourceMappingURL=legal-links.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"legal-links.js","sources":["../../../../src/components/hds/app-footer/legal-links.hbs","../../../../src/components/hds/app-footer/legal-links.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\\n<Hds::AppFooter::Item>\\n <ul class=\\\"hds-app-footer__legal-links\\\" aria-label={{this.ariaLabel}} ...attributes>\\n <Hds::AppFooter::Link @href={{this.hrefForSupport}}>Support</Hds::AppFooter::Link>\\n <Hds::AppFooter::Link @href={{this.hrefForTerms}}>Terms</Hds::AppFooter::Link>\\n <Hds::AppFooter::Link @href={{this.hrefForPrivacy}}>Privacy</Hds::AppFooter::Link>\\n <Hds::AppFooter::Link @href={{this.hrefForSecurity}}>Security</Hds::AppFooter::Link>\\n <Hds::AppFooter::Link @href={{this.hrefForAccessibility}}>Accessibility</Hds::AppFooter::Link>\\n </ul>\\n</Hds::AppFooter::Item>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsAppFooterLegalLinksComponent extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Legal links'\n */\n get ariaLabel() {\n return this.args.ariaLabel ?? 'Legal links';\n }\n\n /**\n * @param hrefForSupport\n * @type {string}\n * @description The href value of the \"Support\" link\n */\n get hrefForSupport() {\n return this.args.hrefForSupport ?? 'https://www.hashicorp.com/support';\n }\n\n /**\n * @param hrefForTerms\n * @type {string}\n * @description The href value of the \"Terms\" link\n */\n get hrefForTerms() {\n return (\n this.args.hrefForTerms ?? 'https://www.hashicorp.com/terms-of-service'\n );\n }\n\n /**\n * @param hrefForPrivacy\n * @type {string}\n * @description The href value of the \"Privacy\" link\n */\n get hrefForPrivacy() {\n return this.args.hrefForPrivacy ?? 'https://www.hashicorp.com/privacy';\n }\n\n /**\n * @param hrefForSecurity\n * @type {string}\n * @description The href value of the \"Security\" link\n */\n get hrefForSecurity() {\n return this.args.hrefForSecurity ?? 'https://www.hashicorp.com/security';\n }\n\n /**\n * @param hrefForAccessibility\n * @type {string}\n * @description The href value of the \"Accessibility\" link\n */\n get hrefForAccessibility() {\n return (\n this.args.hrefForAccessibility ??\n 'https://www.hashicorp.com/accessibility'\n );\n }\n}\n"],"names":["HdsAppFooterLegalLinksComponent","Component","ariaLabel","args","hrefForSupport","hrefForTerms","hrefForPrivacy","hrefForSecurity","hrefForAccessibility","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,sqBAAsqB;;ACDxsB;AACA;AACA;AACA;;AAIe,MAAMA,+BAA+B,SAASC,SAAS,CAAC;AACrE;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,aAAa,CAAA;AAC7C,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,cAAcA,GAAG;AACnB,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,cAAc,IAAI,mCAAmC,CAAA;AACxE,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,YAAYA,GAAG;AACjB,IAAA,OACE,IAAI,CAACF,IAAI,CAACE,YAAY,IAAI,4CAA4C,CAAA;AAE1E,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,cAAcA,GAAG;AACnB,IAAA,OAAO,IAAI,CAACH,IAAI,CAACG,cAAc,IAAI,mCAAmC,CAAA;AACxE,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,eAAeA,GAAG;AACpB,IAAA,OAAO,IAAI,CAACJ,IAAI,CAACI,eAAe,IAAI,oCAAoC,CAAA;AAC1E,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,oBAAoBA,GAAG;AACzB,IAAA,OACE,IAAI,CAACL,IAAI,CAACK,oBAAoB,IAC9B,yCAAyC,CAAA;AAE7C,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA3DoBV,+BAA+B,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\n<Hds::AppFooter::Item>\n <Hds::Link::Inline\n class=\"hds-app-footer__link\"\n @color=\"secondary\"\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 @icon={{@icon}}\n @iconPosition={{@iconPosition}}\n ...attributes\n ><Hds::Text::Body @tag=\"span\" @size=\"100\">{{yield}}</Hds::Text::Body></Hds::Link::Inline>\n</Hds::AppFooter::Item>");
|
|
6
|
+
|
|
7
|
+
var link = setComponentTemplate(TEMPLATE, templateOnly());
|
|
8
|
+
|
|
9
|
+
export { link as default };
|
|
10
|
+
//# sourceMappingURL=link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"link.js","sources":["../../../../src/components/hds/app-footer/link.hbs","../../../../src/components/hds/app-footer/link.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\\n<Hds::AppFooter::Item>\\n <Hds::Link::Inline\\n class=\\\"hds-app-footer__link\\\"\\n @color=\\\"secondary\\\"\\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 @icon={{@icon}}\\n @iconPosition={{@iconPosition}}\\n ...attributes\\n ><Hds::Text::Body @tag=\\\"span\\\" @size=\\\"100\\\">{{yield}}</Hds::Text::Body></Hds::Link::Inline>\\n</Hds::AppFooter::Item>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+pBAA+pB;;ACAjsB,WAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { htmlSafe } from '@ember/template';
|
|
3
|
+
import { assert } from '@ember/debug';
|
|
4
|
+
import { precompileTemplate } from '@ember/template-compilation';
|
|
5
|
+
import { setComponentTemplate } from '@ember/component';
|
|
6
|
+
|
|
7
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n<Hds::AppFooter::Link\n class={{this.classNames}}\n style={{this.itemStyle}}\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={{this.href}}\n @isHrefExternal={{@isHrefExternal}}\n @icon={{this.statusIcon}}\n @iconPosition=\"leading\"\n ...attributes\n>{{this.text}}</Hds::AppFooter::Link>");
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Copyright (c) HashiCorp, Inc.
|
|
11
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const STATUSES = {
|
|
15
|
+
operational: {
|
|
16
|
+
text: 'System operational',
|
|
17
|
+
iconName: 'check-circle'
|
|
18
|
+
},
|
|
19
|
+
degraded: {
|
|
20
|
+
text: 'System degraded',
|
|
21
|
+
iconName: 'alert-triangle'
|
|
22
|
+
},
|
|
23
|
+
maintenance: {
|
|
24
|
+
text: 'System maintenance',
|
|
25
|
+
iconName: 'alert-triangle'
|
|
26
|
+
},
|
|
27
|
+
outage: {
|
|
28
|
+
text: 'System outage',
|
|
29
|
+
iconName: 'x-circle'
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
class HdsAppFooterStatusLinkComponent extends Component {
|
|
33
|
+
constructor() {
|
|
34
|
+
super(...arguments);
|
|
35
|
+
assert('Either @status or @text for "Hds::AppFooter::StatusLink" must have a valid value', this.args.text !== undefined || this.args.status);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* @param status
|
|
40
|
+
* @type {string}
|
|
41
|
+
* @description The name of the status which the StatusLink is being set to
|
|
42
|
+
*/
|
|
43
|
+
get status() {
|
|
44
|
+
let status;
|
|
45
|
+
if (this.args.status) {
|
|
46
|
+
status = this.args.status.toLowerCase();
|
|
47
|
+
assert(`@status for "Hds::AppFooter" must be one of the following: ${Object.keys(STATUSES).join(', ')} received: ${this.args.status}`, Object.keys(STATUSES).includes(status));
|
|
48
|
+
}
|
|
49
|
+
return status;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* @param statusIcon
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @description The name for the StatusLink icon
|
|
56
|
+
*/
|
|
57
|
+
get statusIcon() {
|
|
58
|
+
if (this.status && !this.args.statusIcon) {
|
|
59
|
+
return STATUSES[this.status].iconName;
|
|
60
|
+
}
|
|
61
|
+
return this.args.statusIcon;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Get the inline style to apply to the item.
|
|
66
|
+
* @method StatusLink#itemStyle
|
|
67
|
+
* @return {string} The "style" attribute to apply to the item.
|
|
68
|
+
*/
|
|
69
|
+
get itemStyle() {
|
|
70
|
+
if (this.args.statusIconColor) {
|
|
71
|
+
return htmlSafe(`--hds-app-footer-status-icon-color: ${this.args.statusIconColor}`);
|
|
72
|
+
} else {
|
|
73
|
+
return undefined;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @param text
|
|
79
|
+
* @type {string}
|
|
80
|
+
* @description The text content of the StatusLink
|
|
81
|
+
*/
|
|
82
|
+
get text() {
|
|
83
|
+
if (!this.args.text) {
|
|
84
|
+
return STATUSES[this.status].text;
|
|
85
|
+
}
|
|
86
|
+
return this.args.text;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* @param href
|
|
91
|
+
* @type {string}
|
|
92
|
+
* @description The href value of the StatusLink
|
|
93
|
+
*/
|
|
94
|
+
get href() {
|
|
95
|
+
return this.args.href ?? 'https://status.hashicorp.com';
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get the class names to apply to the component.
|
|
100
|
+
* @method classNames
|
|
101
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
102
|
+
*/
|
|
103
|
+
get classNames() {
|
|
104
|
+
let classes = ['hds-app-footer__status-link'];
|
|
105
|
+
|
|
106
|
+
// add a class based on status if no statusIconColor is explicitly specified
|
|
107
|
+
if (this.status && !this.args.statusIconColor) {
|
|
108
|
+
classes.push(`hds-app-footer__status-link--${this.status}`);
|
|
109
|
+
}
|
|
110
|
+
return classes.join(' ');
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
setComponentTemplate(TEMPLATE, HdsAppFooterStatusLinkComponent);
|
|
114
|
+
|
|
115
|
+
export { STATUSES, HdsAppFooterStatusLinkComponent as default };
|
|
116
|
+
//# sourceMappingURL=status-link.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-link.js","sources":["../../../../src/components/hds/app-footer/status-link.hbs","../../../../src/components/hds/app-footer/status-link.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\\n<Hds::AppFooter::Link\\n class={{this.classNames}}\\n style={{this.itemStyle}}\\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={{this.href}}\\n @isHrefExternal={{@isHrefExternal}}\\n @icon={{this.statusIcon}}\\n @iconPosition=\\\"leading\\\"\\n ...attributes\\n>{{this.text}}</Hds::AppFooter::Link>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { htmlSafe } from '@ember/template';\nimport { assert } from '@ember/debug';\n\nexport const STATUSES = {\n operational: {\n text: 'System operational',\n iconName: 'check-circle',\n },\n degraded: {\n text: 'System degraded',\n iconName: 'alert-triangle',\n },\n maintenance: {\n text: 'System maintenance',\n iconName: 'alert-triangle',\n },\n outage: {\n text: 'System outage',\n iconName: 'x-circle',\n },\n};\n\nexport default class HdsAppFooterStatusLinkComponent extends Component {\n constructor() {\n super(...arguments);\n\n assert(\n 'Either @status or @text for \"Hds::AppFooter::StatusLink\" must have a valid value',\n this.args.text !== undefined || this.args.status\n );\n }\n\n /**\n * @param status\n * @type {string}\n * @description The name of the status which the StatusLink is being set to\n */\n get status() {\n let status;\n if (this.args.status) {\n status = this.args.status.toLowerCase();\n assert(\n `@status for \"Hds::AppFooter\" must be one of the following: ${Object.keys(\n STATUSES\n ).join(', ')} received: ${this.args.status}`,\n Object.keys(STATUSES).includes(status)\n );\n }\n return status;\n }\n\n /**\n * @param statusIcon\n * @type {string}\n * @description The name for the StatusLink icon\n */\n get statusIcon() {\n if (this.status && !this.args.statusIcon) {\n return STATUSES[this.status].iconName;\n }\n return this.args.statusIcon;\n }\n\n /**\n * Get the inline style to apply to the item.\n * @method StatusLink#itemStyle\n * @return {string} The \"style\" attribute to apply to the item.\n */\n get itemStyle() {\n if (this.args.statusIconColor) {\n return htmlSafe(\n `--hds-app-footer-status-icon-color: ${this.args.statusIconColor}`\n );\n } else {\n return undefined;\n }\n }\n\n /**\n * @param text\n * @type {string}\n * @description The text content of the StatusLink\n */\n get text() {\n if (!this.args.text) {\n return STATUSES[this.status].text;\n }\n return this.args.text;\n }\n\n /**\n * @param href\n * @type {string}\n * @description The href value of the StatusLink\n */\n get href() {\n return this.args.href ?? 'https://status.hashicorp.com';\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-app-footer__status-link'];\n\n // add a class based on status if no statusIconColor is explicitly specified\n if (this.status && !this.args.statusIconColor) {\n classes.push(`hds-app-footer__status-link--${this.status}`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["STATUSES","operational","text","iconName","degraded","maintenance","outage","HdsAppFooterStatusLinkComponent","Component","constructor","arguments","assert","args","undefined","status","toLowerCase","Object","keys","join","includes","statusIcon","itemStyle","statusIconColor","htmlSafe","href","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":"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"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
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-app-frame\" ...attributes>\n {{#if this.hasHeader}}\n {{yield (hash Header=(component \"hds/app-frame/parts/header\"))}}\n {{/if}}\n {{#if this.hasSidebar}}\n {{yield (hash Sidebar=(component \"hds/app-frame/parts/sidebar\"))}}\n {{/if}}\n {{!\n IMPORTANT: since the modals may be injected via portal or `in-element` with code that lives in the \"main\" container,\n the \"modal\" container needs to be present in the DOM _before_ the \"main\" block, otherwise it may cause errors\n where the target DOM element is not found (for example in tests where the modal may be immediately opened on first render).\n }}\n {{#if this.hasModals}}\n {{yield (hash Modals=(component \"hds/app-frame/parts/modals\"))}}\n {{/if}}\n {{yield (hash Main=(component \"hds/app-frame/parts/main\"))}}\n {{#if this.hasFooter}}\n {{yield (hash Footer=(component \"hds/app-frame/parts/footer\"))}}\n {{/if}}\n</div>");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
class HdsAppFrameIndexComponent extends Component {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates if the "header" container should be displayed
|
|
15
|
+
*
|
|
16
|
+
* @param hasHeader
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
* @default true
|
|
19
|
+
*/
|
|
20
|
+
get hasHeader() {
|
|
21
|
+
return this.args.hasHeader ?? true;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Indicates if the "sidebar" container should be displayed
|
|
26
|
+
*
|
|
27
|
+
* @param hasSidebar
|
|
28
|
+
* @type {boolean}
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
get hasSidebar() {
|
|
32
|
+
return this.args.hasSidebar ?? true;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Indicates if the "footer" container should be displayed
|
|
37
|
+
*
|
|
38
|
+
* @param hasFooter
|
|
39
|
+
* @type {boolean}
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
get hasFooter() {
|
|
43
|
+
return this.args.hasFooter ?? true;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Indicates if the "modals" container should be displayed
|
|
48
|
+
*
|
|
49
|
+
* @param hasModals
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
get hasModals() {
|
|
54
|
+
return this.args.hasModals ?? true;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
setComponentTemplate(TEMPLATE, HdsAppFrameIndexComponent);
|
|
58
|
+
|
|
59
|
+
export { HdsAppFrameIndexComponent as default };
|
|
60
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-frame/index.hbs","../../../../src/components/hds/app-frame/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=\\\"hds-app-frame\\\" ...attributes>\\n {{#if this.hasHeader}}\\n {{yield (hash Header=(component \\\"hds/app-frame/parts/header\\\"))}}\\n {{/if}}\\n {{#if this.hasSidebar}}\\n {{yield (hash Sidebar=(component \\\"hds/app-frame/parts/sidebar\\\"))}}\\n {{/if}}\\n {{!\\n IMPORTANT: since the modals may be injected via portal or `in-element` with code that lives in the \\\"main\\\" container,\\n the \\\"modal\\\" container needs to be present in the DOM _before_ the \\\"main\\\" block, otherwise it may cause errors\\n where the target DOM element is not found (for example in tests where the modal may be immediately opened on first render).\\n }}\\n {{#if this.hasModals}}\\n {{yield (hash Modals=(component \\\"hds/app-frame/parts/modals\\\"))}}\\n {{/if}}\\n {{yield (hash Main=(component \\\"hds/app-frame/parts/main\\\"))}}\\n {{#if this.hasFooter}}\\n {{yield (hash Footer=(component \\\"hds/app-frame/parts/footer\\\"))}}\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsAppFrameIndexComponent extends Component {\n /**\n * Indicates if the \"header\" container should be displayed\n *\n * @param hasHeader\n * @type {boolean}\n * @default true\n */\n get hasHeader() {\n return this.args.hasHeader ?? true;\n }\n\n /**\n * Indicates if the \"sidebar\" container should be displayed\n *\n * @param hasSidebar\n * @type {boolean}\n * @default true\n */\n get hasSidebar() {\n return this.args.hasSidebar ?? true;\n }\n\n /**\n * Indicates if the \"footer\" container should be displayed\n *\n * @param hasFooter\n * @type {boolean}\n * @default true\n */\n get hasFooter() {\n return this.args.hasFooter ?? true;\n }\n\n /**\n * Indicates if the \"modals\" container should be displayed\n *\n * @param hasModals\n * @type {boolean}\n * @default true\n */\n get hasModals() {\n return this.args.hasModals ?? true;\n }\n}\n"],"names":["HdsAppFrameIndexComponent","Component","hasHeader","args","hasSidebar","hasFooter","hasModals","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6/BAA6/B;;ACD/hC;AACA;AACA;AACA;;AAIe,MAAMA,yBAAyB,SAASC,SAAS,CAAC;AAC/D;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,IAAI,CAAA;AACpC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIE,UAAUA,GAAG;AACf,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,UAAU,IAAI,IAAI,CAAA;AACrC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACF,IAAI,CAACE,SAAS,IAAI,IAAI,CAAA;AACpC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACH,IAAI,CAACG,SAAS,IAAI,IAAI,CAAA;AACpC,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA5CoBR,yBAAyB,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<footer class=\"hds-app-frame__footer\" ...attributes>\n {{yield}}\n</footer>");
|
|
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/app-frame/parts/footer.hbs","../../../../../src/components/hds/app-frame/parts/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<footer class=\\\"hds-app-frame__footer\\\" ...attributes>\\n {{yield}}\\n</footer>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8JAA8J;;ACAhM,aAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
|