diff --git a/.changeset/happy-readers-notice.md b/.changeset/happy-readers-notice.md new file mode 100644 index 0000000000..5438ea16e0 --- /dev/null +++ b/.changeset/happy-readers-notice.md @@ -0,0 +1,5 @@ +--- +"@hashicorp/design-system-components": minor +--- + +`Time` - Added Time component and Time service. diff --git a/packages/components/.gitignore b/packages/components/.gitignore index 666662ae2f..68eed204ca 100644 --- a/packages/components/.gitignore +++ b/packages/components/.gitignore @@ -1,8 +1,8 @@ # See https://help.github.com/ignore-files/ for more about ignoring files. # compiled output -/dist/ -/declarations/ +# /dist/ +# /declarations/ # dependencies /bower_components/ diff --git a/packages/components/declarations/components.d.ts b/packages/components/declarations/components.d.ts new file mode 100644 index 0000000000..7d1770594f --- /dev/null +++ b/packages/components/declarations/components.d.ts @@ -0,0 +1,204 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export { default as HdsAccordion } from './components/hds/accordion/index.ts'; +export { default as HdsAccordionItem } from './components/hds/accordion/item/index.ts'; +export * from './components/hds/accordion/types.ts'; +export { default as HdsAlert } from './components/hds/alert/index.ts'; +export { default as HdsAlertDescription } from './components/hds/alert/description.ts'; +export { default as HdsAlertTitle } from './components/hds/alert/title.ts'; +export * from './components/hds/alert/types.ts'; +export { default as HdsAppFooter } from './components/hds/app-footer/index.ts'; +export { default as HdsAppFooterCopyright } from './components/hds/app-footer/copyright.ts'; +export { default as HdsAppFooterItem } from './components/hds/app-footer/item.ts'; +export { default as HdsAppFooterLegalLinks } from './components/hds/app-footer/legal-links.ts'; +export { default as HdsAppFooterLink } from './components/hds/app-footer/link.ts'; +export { default as HdsAppFooterStatusLink } from './components/hds/app-footer/status-link.ts'; +export * from './components/hds/app-footer/types.ts'; +export { default as HdsAppHeader } from './components/hds/app-header/index.ts'; +export { default as HdsAppHeaderHomeLink } from './components/hds/app-header/home-link.ts'; +export { default as HdsAppHeaderMenuButton } from './components/hds/app-header/menu-button.ts'; +export { default as HdsApplicationState } from './components/hds/application-state/index.ts'; +export { default as HdsApplicationStateBody } from './components/hds/application-state/body.ts'; +export { default as HdsApplicationStateFooter } from './components/hds/application-state/footer.ts'; +export { default as HdsApplicationStateHeader } from './components/hds/application-state/header.ts'; +export { default as HdsApplicationStateMedia } from './components/hds/application-state/media.ts'; +export * from './components/hds/application-state/types.ts'; +export { default as HdsBadge } from './components/hds/badge/index.ts'; +export * from './components/hds/badge/types.ts'; +export { default as HdsBadgeCount } from './components/hds/badge-count/index.ts'; +export * from './components/hds/badge-count/types.ts'; +export { default as HdsBreadcrumb } from './components/hds/breadcrumb/index.ts'; +export { default as HdsBreadcrumbItem } from './components/hds/breadcrumb/item.ts'; +export { default as HdsBreadcrumbTruncation } from './components/hds/breadcrumb/truncation.ts'; +export { default as HdsButton } from './components/hds/button/index.ts'; +export { default as HdsButtonSet } from './components/hds/button-set/index.ts'; +export { default as HdsCardContainer } from './components/hds/card/container.ts'; +export * from './components/hds/card/types.ts'; +export { default as HdsCodeBlock } from './components/hds/code-block/index.ts'; +export { default as HdsCodeBlockCopyButton } from './components/hds/code-block/copy-button.ts'; +export { default as HdsCodeBlockDescription } from './components/hds/code-block/description.ts'; +export { default as HdsCodeBlockTitle } from './components/hds/code-block/title.ts'; +export * from './components/hds/code-block/types.ts'; +export { default as HdsCopyButton } from './components/hds/copy/button/index.ts'; +export * from './components/hds/copy/button/types.ts'; +export { default as HdsCopySnippet } from './components/hds/copy/snippet/index.ts'; +export * from './components/hds/copy/snippet/types.ts'; +export { default as HdsDropdown } from './components/hds/dropdown/index.ts'; +export { default as HdsDropdownFooter } from './components/hds/dropdown/footer.ts'; +export { default as HdsDropdownHeader } from './components/hds/dropdown/header.ts'; +export { default as HdsDropdownListItemCheckbox } from './components/hds/dropdown/list-item/checkbox.ts'; +export { default as HdsDropdownListItemCheckmark } from './components/hds/dropdown/list-item/checkmark.ts'; +export { default as HdsDropdownListItemCopyItem } from './components/hds/dropdown/list-item/copy-item.ts'; +export { default as HdsDropdownListItemDescription } from './components/hds/dropdown/list-item/description.ts'; +export { default as HdsDropdownListItemGeneric } from './components/hds/dropdown/list-item/generic.ts'; +export { default as HdsDropdownListItemInteractive } from './components/hds/dropdown/list-item/interactive.ts'; +export { default as HdsDropdownListItemRadio } from './components/hds/dropdown/list-item/radio.ts'; +export { default as HdsDropdownListItemSeparator } from './components/hds/dropdown/list-item/separator.ts'; +export { default as HdsDropdownListItemTitle } from './components/hds/dropdown/list-item/title.ts'; +export { default as HdsDropdownToggleButton } from './components/hds/dropdown/toggle/button.ts'; +export { default as HdsDropdownToggleIcon } from './components/hds/dropdown/toggle/icon.ts'; +export * from './components/hds/dropdown/list-item/types.ts'; +export * from './components/hds/dropdown/toggle/types.ts'; +export * from './components/hds/dropdown/types.ts'; +export { default as HdsFlyout } from './components/hds/flyout/index.ts'; +export * from './components/hds/flyout/types.ts'; +export { default as HdsFormCharacterCount } from './components/hds/form/character-count/index.ts'; +export { default as HdsFormError } from './components/hds/form/error/index.ts'; +export { default as HdsFormErrorMessage } from './components/hds/form/error/message.ts'; +export { default as HdsFormField } from './components/hds/form/field/index.ts'; +export { default as HdsFormFieldset } from './components/hds/form/fieldset/index.ts'; +export { default as HdsFormHelperText } from './components/hds/form/helper-text/index.ts'; +export { default as HdsFormIndicator } from './components/hds/form/indicator/index.ts'; +export { default as HdsFormLabel } from './components/hds/form/label/index.ts'; +export { default as HdsFormLegend } from './components/hds/form/legend/index.ts'; +export { default as HdsFormVisibilityToggle } from './components/hds/form/visibility-toggle/index.ts'; +export * from './components/hds/form/field/types.ts'; +export * from './components/hds/form/fieldset/types.ts'; +export { default as HdsFormCheckboxBase } from './components/hds/form/checkbox/base.ts'; +export { default as HdsFormCheckboxField } from './components/hds/form/checkbox/field.ts'; +export { default as HdsFormCheckboxGroup } from './components/hds/form/checkbox/group.ts'; +export { default as HdsFormFileInputBase } from './components/hds/form/file-input/base.ts'; +export { default as HdsFormFileInputField } from './components/hds/form/file-input/field.ts'; +export { default as HdsFormMaskedInputBase } from './components/hds/form/masked-input/base.ts'; +export { default as HdsFormMaskedInputField } from './components/hds/form/masked-input/field.ts'; +export { default as HdsFormRadioBase } from './components/hds/form/radio/base.ts'; +export { default as HdsFormRadioField } from './components/hds/form/radio/field.ts'; +export { default as HdsFormRadioGroup } from './components/hds/form/radio/group.ts'; +export { default as HdsFormRadioCard } from './components/hds/form/radio-card/index.ts'; +export { default as HdsFormRadioCardGroup } from './components/hds/form/radio-card/group.ts'; +export { default as HdsFormRadioCardDescription } from './components/hds/form/radio-card/description.ts'; +export { default as HdsFormRadioCardLabel } from './components/hds/form/radio-card/label.ts'; +export * from './components/hds/form/radio-card/types.ts'; +export { default as HdsFormSelectBase } from './components/hds/form/select/base.ts'; +export { default as HdsFormSelectField } from './components/hds/form/select/field.ts'; +export { default as HdsFormSuperSelectSingleBase } from './components/hds/form/super-select/single/base.ts'; +export { default as HdsFormSuperSelectSingleField } from './components/hds/form/super-select/single/field.ts'; +export { default as HdsFormSuperSelectMultipleBase } from './components/hds/form/super-select/multiple/base.ts'; +export { default as HdsFormSuperSelectMultipleField } from './components/hds/form/super-select/multiple/field.ts'; +export { default as HdsFormSuperSelectAfterOptions } from './components/hds/form/super-select/after-options.ts'; +export { default as HdsFormSuperSelectOptionGroup } from './components/hds/form/super-select/option-group.ts'; +export { default as HdsFormSuperSelectPlaceholder } from './components/hds/form/super-select/placeholder.ts'; +export * from './components/hds/form/super-select/types.ts'; +export { default as HdsFormTextareaBase } from './components/hds/form/textarea/base.ts'; +export { default as HdsFormTextareaField } from './components/hds/form/textarea/field.ts'; +export { default as HdsFormTextInputBase } from './components/hds/form/text-input/base.ts'; +export { default as HdsFormTextInputField } from './components/hds/form/text-input/field.ts'; +export * from './components/hds/form/text-input/types.ts'; +export { default as HdsFormToggleBase } from './components/hds/form/toggle/base.ts'; +export { default as HdsFormToggleField } from './components/hds/form/toggle/field.ts'; +export { default as HdsFormToggleGroup } from './components/hds/form/toggle/group.ts'; +export { default as HdsIcon } from './components/hds/icon/index.ts'; +export * from './components/hds/icon/types.ts'; +export { default as HdsIconTile } from './components/hds/icon-tile/index.ts'; +export * from './components/hds/icon-tile/types.ts'; +export { default as HdsLinkInline } from './components/hds/link/inline.ts'; +export { default as HdsLinkStandalone } from './components/hds/link/standalone.ts'; +export * from './components/hds/link/types.ts'; +export { default as HdsModal } from './components/hds/modal/index.ts'; +export * from './components/hds/modal/types.ts'; +export { default as HdsPageHeader } from './components/hds/page-header/index.ts'; +export { default as HdsPageHeaderActions } from './components/hds/page-header/actions.ts'; +export { default as HdsPageHeaderBadges } from './components/hds/page-header/badges.ts'; +export { default as HdsPageHeaderDescription } from './components/hds/page-header/description.ts'; +export { default as HdsPageHeaderSubtitle } from './components/hds/page-header/subtitle.ts'; +export { default as HdsPageHeaderTitle } from './components/hds/page-header/title.ts'; +export { default as HdsPaginationCompact } from './components/hds/pagination/compact/index.ts'; +export { default as HdsPaginationInfo } from './components/hds/pagination/info/index.ts'; +export { default as HdsPaginationNavArrow } from './components/hds/pagination/nav/arrow.ts'; +export { default as HdsPaginationNavEllipsis } from './components/hds/pagination/nav/ellipsis.ts'; +export { default as HdsPaginationNavNumber } from './components/hds/pagination/nav/number.ts'; +export { default as HdsPaginationNumbered } from './components/hds/pagination/numbered/index.ts'; +export { default as HdsPaginationSizeSelector } from './components/hds/pagination/size-selector/index.ts'; +export * from './components/hds/pagination/types.ts'; +export { default as HdsReveal } from './components/hds/reveal/index.ts'; +export { default as HdsRevealToggleButton } from './components/hds/reveal/toggle/button.ts'; +export { default as HdsRichTooltip } from './components/hds/rich-tooltip/index.ts'; +export { default as HdsRichTooltipBubble } from './components/hds/rich-tooltip/bubble.ts'; +export { default as HdsRichTooltipToggle } from './components/hds/rich-tooltip/toggle.ts'; +export * from './components/hds/rich-tooltip/types.ts'; +export { default as HdsSegmentedGroup } from './components/hds/segmented-group/index.ts'; +export { default as HdsSeparator } from './components/hds/separator/index.ts'; +export * from './components/hds/separator/types.ts'; +export { default as HdsSideNav } from './components/hds/side-nav/index.ts'; +export { default as HdsSideNavBase } from './components/hds/side-nav/base.ts'; +export { default as HdsSideNavHeader } from './components/hds/side-nav/header/index.ts'; +export { default as HdsSideNavHeaderHomeLink } from './components/hds/side-nav/header/home-link.ts'; +export { default as HdsSideNavHeaderIconButton } from './components/hds/side-nav/header/icon-button.ts'; +export { default as HdsSideNavList } from './components/hds/side-nav/list/index.ts'; +export { default as HdsSideNavListBackLink } from './components/hds/side-nav/list/back-link.ts'; +export { default as HdsSideNavListItem } from './components/hds/side-nav/list/item.ts'; +export { default as HdsSideNavListLink } from './components/hds/side-nav/list/link.ts'; +export { default as HdsSideNavListTitle } from './components/hds/side-nav/list/title.ts'; +export { default as HdsSideNavPortal } from './components/hds/side-nav/portal/index.ts'; +export { default as HdsSideNavPortalTarget } from './components/hds/side-nav/portal/target.ts'; +export { default as HdsSideNavToggleButton } from './components/hds/side-nav/toggle-button.ts'; +export { default as HdsStepperStepIndicator } from './components/hds/stepper/step/indicator.ts'; +export { default as HdsStepperTaskIndicator } from './components/hds/stepper/task/indicator.ts'; +export * from './components/hds/stepper/types.ts'; +export { default as HdsTable } from './components/hds/table/index.ts'; +export { default as HdsTableTd } from './components/hds/table/td.ts'; +export { default as HdsTableTh } from './components/hds/table/th.ts'; +export { default as HdsTableThButtonSort } from './components/hds/table/th-button-sort.ts'; +export { default as HdsTableThButtonTooltip } from './components/hds/table/th-button-tooltip.ts'; +export { default as HdsTableThSelectable } from './components/hds/table/th-selectable.ts'; +export { default as HdsTableThSort } from './components/hds/table/th-sort.ts'; +export { default as HdsTableTr } from './components/hds/table/tr.ts'; +export * from './components/hds/table/types.ts'; +export { default as HdsTabs } from './components/hds/tabs/index.ts'; +export { default as HdsTabsPanel } from './components/hds/tabs/panel.ts'; +export { default as HdsTabsTab } from './components/hds/tabs/tab.ts'; +export * from './components/hds/tabs/types.ts'; +export { default as HdsTag } from './components/hds/tag/index.ts'; +export * from './components/hds/tag/types.ts'; +export { default as HdsText } from './components/hds/text/index.ts'; +export { default as HdsTextBody } from './components/hds/text/body.ts'; +export { default as HdsTextCode } from './components/hds/text/code.ts'; +export { default as HdsTextDisplay } from './components/hds/text/display.ts'; +export * from './components/hds/text/types.ts'; +export { default as HdsTime } from './components/hds/time/index.ts'; +export { default as HdsTimeRange } from './components/hds/time/range.ts'; +export * from './services/hds-time-types.ts'; +export { default as HdsToast } from './components/hds/toast/index.ts'; +export { default as HdsTooltipButton } from './components/hds/tooltip-button/index.ts'; +export * from './components/hds/tooltip-button/types.ts'; +export { default as HdsAppFrame } from './components/hds/app-frame/index.ts'; +export { default as HdsAppFrameFooter } from './components/hds/app-frame/parts/footer.ts'; +export { default as HdsAppFrameHeader } from './components/hds/app-frame/parts/header.ts'; +export { default as HdsAppFrameMain } from './components/hds/app-frame/parts/main.ts'; +export { default as HdsAppFrameModals } from './components/hds/app-frame/parts/modals.ts'; +export { default as HdsAppFrameSidebar } from './components/hds/app-frame/parts/sidebar.ts'; +export { default as HdsDialogPrimitiveBody } from './components/hds/dialog-primitive/body.ts'; +export { default as HdsDialogPrimitiveDescription } from './components/hds/dialog-primitive/description.ts'; +export { default as HdsDialogPrimitiveFooter } from './components/hds/dialog-primitive/footer.ts'; +export { default as HdsDialogPrimitiveHeader } from './components/hds/dialog-primitive/header.ts'; +export { default as HdsDialogPrimitiveOverlay } from './components/hds/dialog-primitive/overlay.ts'; +export { default as HdsDialogPrimitiveWrapper } from './components/hds/dialog-primitive/wrapper.ts'; +export * from './components/hds/dialog-primitive/types.ts'; +export { default as HdsDisclosurePrimitive } from './components/hds/disclosure-primitive/index.ts'; +export { default as HdsDismissButton } from './components/hds/dismiss-button/index.ts'; +export { default as HdsInteractive } from './components/hds/interactive/index.ts'; +export { default as HdsMenuPrimitive } from './components/hds/menu-primitive/index.ts'; +export { default as HdsPopoverPrimitive } from './components/hds/popover-primitive/index.ts'; +//# sourceMappingURL=components.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components.d.ts.map b/packages/components/declarations/components.d.ts.map new file mode 100644 index 0000000000..845a4118a6 --- /dev/null +++ b/packages/components/declarations/components.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"components.d.ts","sourceRoot":"","sources":["../src/components.ts"],"names":[],"mappings":"AAAA;;;GAGG;AASH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AACvF,cAAc,qCAAqC,CAAC;AAGpD,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uCAAuC,CAAC;AACvF,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAC3E,cAAc,iCAAiC,CAAC;AAGhD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAC/F,cAAc,sCAAsC,CAAC;AAGrD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AAC3F,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AAG/F,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6CAA6C,CAAC;AAC7F,OAAO,EAAE,OAAO,IAAI,uBA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C,CAAC;AAC9F,OAAO,EAAE,OAAO,IAAI,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AAC5G,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AAClG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,OAAO,IAAI,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACpG,cAAc,4CAA4C,CAAC;AAG3D,OAAO,EAAE,OAAO,IAAI,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAGnG,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAGvF,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAGlF,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAGvF,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,6CAA6C,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/index.d.ts b/packages/components/declarations/components/hds/accordion/index.d.ts new file mode 100644 index 0000000000..156081b373 --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/index.d.ts @@ -0,0 +1,50 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsAccordionItemSignature } from './item/index.ts'; +import type { HdsAccordionForceStates, HdsAccordionSizes, HdsAccordionTypes, HdsAccordionItemTitleTags } from './types.ts'; +export interface HdsAccordionSignature { + Args: { + size?: HdsAccordionSizes; + type?: HdsAccordionTypes; + forceState?: HdsAccordionForceStates; + titleTag?: HdsAccordionItemTitleTags; + }; + Blocks: { + default: [ + { + Item?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsAccordion extends Component { + /** + * Sets the size for the component + * + * @param size + * @type {HdsAccordionSizes} + * @default 'medium' + */ + get size(): HdsAccordionSizes; + get titleTag(): HdsAccordionItemTitleTags; + /** + * Sets the type of the component + * + * @param type + * @type {HdsAccordionTypes} + * @default 'card' + */ + get type(): HdsAccordionTypes; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/index.d.ts.map b/packages/components/declarations/components/hds/accordion/index.d.ts.map new file mode 100644 index 0000000000..51289b9085 --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/accordion/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,iBAAiB,CAAC;QACzB,IAAI,CAAC,EAAE,iBAAiB,CAAC;QACzB,UAAU,CAAC,EAAE,uBAAuB,CAAC;QACrC,QAAQ,CAAC,EAAE,yBAAyB,CAAC;KACtC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,IAAI,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;aACjD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,iBAAiB,CAW5B;IAED,IAAI,QAAQ,IAAI,yBAAyB,CAExC;IAED;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,iBAAiB,CAW5B;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAUvB;CAeF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/item/button.d.ts b/packages/components/declarations/components/hds/accordion/item/button.d.ts new file mode 100644 index 0000000000..fd307daf4d --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/item/button.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsAccordionSizes } from '../types.ts'; +export interface HdsAccordionItemButtonSignature { + Args: { + ariaLabel?: string; + ariaLabelledBy?: string; + contentId?: string; + isOpen?: boolean; + onClickToggle?: (event: MouseEvent, ...args: any[]) => void; + parentContainsInteractive?: boolean; + size?: HdsAccordionSizes; + id?: string; + }; + Element: HTMLButtonElement; +} +export default class HdsAccordionItemButton extends Component { + onClick(event: MouseEvent): void; + /** + * Get the class names to apply to the component. + * @method ItemButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/item/button.d.ts.map b/packages/components/declarations/components/hds/accordion/item/button.d.ts.map new file mode 100644 index 0000000000..27d8bbad91 --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/item/button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/accordion/item/button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAC;QAEjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAC5D,yBAAyB,CAAC,EAAE,OAAO,CAAC;QACpC,IAAI,CAAC,EAAE,iBAAiB,CAAC;QACzB,EAAE,CAAC,EAAE,MAAM,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IAE5F,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAMhC;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAqBvB;CAsBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/item/index.d.ts b/packages/components/declarations/components/hds/accordion/item/index.d.ts new file mode 100644 index 0000000000..6cf64abf9d --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/item/index.d.ts @@ -0,0 +1,79 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsAccordionSizeValues, HdsAccordionTypeValues } from '../types.ts'; +import type { HdsAccordionForceStates, HdsAccordionSizes, HdsAccordionTypes, HdsAccordionItemTitleTags } from '../types.ts'; +export declare const SIZES: string[]; +export declare const DEFAULT_SIZE = HdsAccordionSizeValues.Medium; +export declare const TYPES: string[]; +export declare const DEFAULT_TYPE = HdsAccordionTypeValues.Card; +export interface HdsAccordionItemSignature { + Args: { + ariaLabel?: string; + containsInteractive?: boolean; + forceState?: HdsAccordionForceStates; + isOpen?: boolean; + isStatic?: boolean; + onClickToggle?: (event: MouseEvent, ...args: any[]) => void; + size?: HdsAccordionSizes; + titleTag?: HdsAccordionItemTitleTags; + type?: HdsAccordionTypes; + }; + Blocks: { + toggle?: []; + content: [ + { + close: (...args: any[]) => void; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsAccordionItem extends Component { + /** + * Generates a unique ID for the Content + * + * @param _contentId + */ + private _contentId; + private _titleId; + get ariaLabelledBy(): string | undefined; + /** + * @param containsInteractive + * @type {boolean} + * @default false + */ + get containsInteractive(): boolean; + /** + * @param toggleTextSize + * @type {HdsTextSizes} + * @default 'medium' + */ + get toggleTextSize(): number; + /** + * Sets the size for the component + * + * @param size + * @type {HdsAccordionSizes} + * @default 'medium' + */ + get size(): HdsAccordionSizes; + /** + * Sets the type of the component + * + * @param type + * @type {HdsAccordionTypes} + * @default 'card' + */ + get type(): HdsAccordionTypes; + get titleTag(): HdsAccordionItemTitleTags; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/item/index.d.ts.map b/packages/components/declarations/components/hds/accordion/item/index.d.ts.map new file mode 100644 index 0000000000..a3c78e101f --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/item/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/accordion/item/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EACV,uBAAuB,EACvB,iBAAiB,EACjB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,aAAa,CAAC;AAErB,eAAO,MAAM,KAAK,EAAE,MAAM,EAA0C,CAAC;AACrE,eAAO,MAAM,YAAY,gCAAgC,CAAC;AAE1D,eAAO,MAAM,KAAK,EAA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M,CA4BvB;CAuDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/types.d.ts b/packages/components/declarations/components/hds/accordion/types.d.ts new file mode 100644 index 0000000000..bb8c81ea20 --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/types.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsAccordionTypeValues { + Card = "card", + Flush = "flush" +} +export type HdsAccordionTypes = `${HdsAccordionTypeValues}`; +export declare enum HdsAccordionSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsAccordionSizes = `${HdsAccordionSizeValues}`; +export declare enum HdsAccordionForceStateValues { + Open = "open", + Close = "close" +} +export type HdsAccordionForceStates = `${HdsAccordionForceStateValues}`; +export declare enum HdsAccordionItemTitleTagValues { + Div = "div", + H1 = "h1", + H2 = "h2", + H3 = "h3", + H4 = "h4", + H5 = "h5", + H6 = "h6" +} +export type HdsAccordionItemTitleTags = `${HdsAccordionItemTitleTagValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/accordion/types.d.ts.map b/packages/components/declarations/components/hds/accordion/types.d.ts.map new file mode 100644 index 0000000000..e420e594ba --- /dev/null +++ b/packages/components/declarations/components/hds/accordion/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/accordion/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,sBAAsB;IAChC,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,iBAAiB,GAAG,GAAG,sBAAsB,EAAE,CAAC;AAE5D,oBAAY,sBAAsB;IAChC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,iBAAiB,GAAG,GAAG,sBAAsB,EAAE,CAAC;AAE5D,oBAAY,4BAA4B;IACtC,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,uBAAuB,GAAG,GAAG,4BAA4B,EAAE,CAAC;AAExE,oBAAY,8BAA8B;IACxC,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,MAAM,yBAAyB,GAAG,GAAG,8BAA8B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/description.d.ts b/packages/components/declarations/components/hds/alert/description.d.ts new file mode 100644 index 0000000000..6e2de04389 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/description.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAlertDescriptionSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsAlertDescription: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAlertDescription; +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/description.d.ts.map b/packages/components/declarations/components/hds/alert/description.d.ts.map new file mode 100644 index 0000000000..67176f60b5 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/alert/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,8FAC8B,CAAC;AAExD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/index.d.ts b/packages/components/declarations/components/hds/alert/index.d.ts new file mode 100644 index 0000000000..91c3188094 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/index.d.ts @@ -0,0 +1,56 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsAlertColorValues } from './types.ts'; +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type HdsButtonComponent from '../button'; +import type HdsLinkStandaloneComponent from '../link/standalone'; +import type { HdsYieldSignature } from '../yield'; +import type { HdsAlertColors, HdsAlertTypes } from './types.ts'; +import type { HdsAlertTitleSignature } from './title.ts'; +import type { HdsAlertDescriptionSignature } from './description.ts'; +import type { HdsIconSignature } from '../icon'; +export declare const TYPES: string[]; +export declare const DEFAULT_COLOR = HdsAlertColorValues.Neutral; +export declare const COLORS: string[]; +export declare const MAPPING_COLORS_TO_ICONS: { + readonly neutral: "info"; + readonly highlight: "info"; + readonly success: "check-circle"; + readonly warning: "alert-triangle"; + readonly critical: "alert-diamond"; +}; +export interface HdsAlertSignature { + Args: { + type: HdsAlertTypes; + color?: HdsAlertColors; + icon?: HdsIconSignature['Args']['name'] | false; + onDismiss?: (event: MouseEvent, ...args: any[]) => void; + }; + Blocks: { + default: [ + { + Title?: ComponentLike; + Description?: ComponentLike; + Generic?: ComponentLike; + LinkStandalone?: WithBoundArgs; + Button?: WithBoundArgs; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsAlert extends Component { + private _role?; + private _ariaLabelledBy?; + constructor(owner: unknown, args: HdsAlertSignature['Args']); + get color(): HdsAlertColors; + get icon(): HdsIconSignature['Args']['name'] | false; + get onDismiss(): ((event: MouseEvent, ...args: any[]) => void) | false; + get iconSize(): HdsIconSignature['Args']['size']; + get classNames(): string; + didInsert(element: HTMLDivElement): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/index.d.ts.map b/packages/components/declarations/components/hds/alert/index.d.ts.map new file mode 100644 index 0000000000..505de6b747 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/index.d.ts.map @@ -0,0 +1 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gBAC9C,WAAW,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;gBAC1D,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,cAAc,CAAC,EAAE,aAAa,CAC5B,OAAO,0BAA0B,EACjC,MAAM,CACP,CAAC;gBACF,MAAM,CAAC,EAAE,aAAa,CAAC,OAAO,kBAAkB,EAAE,MAAM,CAAC,CAAC;aAC3D;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IACvD,OAAO,CAAC,KAAK,CAAC,CAAS;IACvB,OAAO,CAAC,eAAe,CAAC,CAAS;gBAE9B,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,CAAC,MAAM,CAAC;IAY3D,IAAI,KAAK,IAAI,cAAc,CAW1B;IAGD,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,KAAK,CAwBnD;IAGD,IAAI,SAAS,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,GAAG,KAAK,CAQrE;IAGD,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAM/C;IAED,IAAI,UAAU,IAAI,MAAM,CAUvB;IAGD,SAAS,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI;CA+FzC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/title.d.ts b/packages/components/declarations/components/hds/alert/title.d.ts new file mode 100644 index 0000000000..e5466ddbc7 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/title.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsAlertTitleTags } from './types'; +export interface HdsAlertTitleSignature { + Args: { + tag?: HdsAlertTitleTags; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsAlertTitle extends Component { + get componentTag(): HdsAlertTitleTags; +} +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/title.d.ts.map b/packages/components/declarations/components/hds/alert/title.d.ts.map new file mode 100644 index 0000000000..a7726383a5 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/alert/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,GAAG,CAAC,EAAE,iBAAiB,CAAC;KACzB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E,IAAI,YAAY,IAAI,iBAAiB,CAEpC;CAwBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/types.d.ts b/packages/components/declarations/components/hds/alert/types.d.ts new file mode 100644 index 0000000000..240ade7340 --- /dev/null +++ b/packages/components/declarations/components/hds/alert/types.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsAlertTypeValues { + Page = "page", + Inline = "inline", + Compact = "compact" +} +export type HdsAlertTypes = `${HdsAlertTypeValues}`; +export declare enum HdsAlertColorValues { + Neutral = "neutral", + Highlight = "highlight", + Success = "success", + Warning = "warning", + Critical = "critical" +} +export type HdsAlertColors = `${HdsAlertColorValues}`; +export declare enum HdsAlertTitleTagValues { + Div = "div", + H1 = "h1", + H2 = "h2", + H3 = "h3", + H4 = "h4", + H5 = "h5", + H6 = "h6" +} +export type HdsAlertTitleTags = `${HdsAlertTitleTagValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/alert/types.d.ts.map b/packages/components/declarations/components/hds/alert/types.d.ts.map new file mode 100644 index 0000000000..c5171268db --- /dev/null +++ b/packages/components/declarations/components/hds/alert/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/alert/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAEtD,oBAAY,sBAAsB;IAChC,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,MAAM,iBAAiB,GAAG,GAAG,sBAAsB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/copyright.d.ts b/packages/components/declarations/components/hds/app-footer/copyright.d.ts new file mode 100644 index 0000000000..22de1de502 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/copyright.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsAppFooterCopyrightSignature { + Args: { + year?: string; + }; + Element: HTMLDivElement; +} +export default class HdsAppFooterCopyright extends Component { + /** + * @param year + * @type {string} + * @description The copyright year + * @default The current year (calculated via `Date()`) + */ + get year(): string | number; +} +//# sourceMappingURL=copyright.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/copyright.d.ts.map b/packages/components/declarations/components/hds/app-footer/copyright.d.ts.map new file mode 100644 index 0000000000..f0f1a42516 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/copyright.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"copyright.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/copyright.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,SAAS,CAAC,8BAA8B,CAAC;IAC1F;;;;;OAKG;IACH,IAAI,IAAI,IAAI,MAAM,GAAG,MAAM,CAE1B;CAyBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/index.d.ts b/packages/components/declarations/components/hds/app-footer/index.d.ts new file mode 100644 index 0000000000..292c7ee7a1 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/index.d.ts @@ -0,0 +1,54 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsYieldSignature } from '../yield'; +import type { HdsAppFooterItemSignature } from './item.ts'; +import type { HdsAppFooterLegalLinksSignature } from './legal-links'; +import type { HdsAppFooterLinkSignature } from './link'; +import type { HdsAppFooterStatusLinkSignature } from './status-link'; +import type { HdsAppFooterThemeTypes } from './types.ts'; +export interface HdsAppFooterSignature { + Args: { + ariaLabel?: string; + copyrightYear?: string; + theme?: HdsAppFooterThemeTypes; + }; + Blocks: { + default: [ + { + ExtraBefore?: ComponentLike; + StatusLink?: ComponentLike; + LegalLinks?: ComponentLike; + Link?: ComponentLike; + Item?: ComponentLike; + ExtraAfter?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsAppFooter extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Footer items' + */ + get ariaLabel(): string; + /** + * @param theme + * @type {HdsAppFooterThemeTypes} + * @description The component theme + * @default 'light' + */ + get theme(): HdsAppFooterThemeTypes; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/index.d.ts.map b/packages/components/declarations/components/hds/app-footer/index.d.ts.map new file mode 100644 index 0000000000..6c0b1d3e5a --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AACxD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,KAAK,CAAC,EAAE,sBAAsB,CAAC;KAChC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,WAAW,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;gBAC5D,UAAU,CAAC,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;gBAC5D,IAAI,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;gBAChD,IAAI,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;gBAChD,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC/C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;;OAKG;IACH,IAAI,KAAK,IAAI,sBAAsB,CAElC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAOvB;CAqCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/item.d.ts b/packages/components/declarations/components/hds/app-footer/item.d.ts new file mode 100644 index 0000000000..5e9c9aff0e --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/item.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFooterItemSignature { + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +declare const HdsAppFooterItem: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFooterItem; +//# sourceMappingURL=item.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/item.d.ts.map b/packages/components/declarations/components/hds/app-footer/item.d.ts.map new file mode 100644 index 0000000000..bafc9d0248 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/item.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,gBAAgB,2FAAqD,CAAC;AAE5E,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/legal-links.d.ts b/packages/components/declarations/components/hds/app-footer/legal-links.d.ts new file mode 100644 index 0000000000..57fa58e613 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/legal-links.d.ts @@ -0,0 +1,55 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsAppFooterLegalLinksSignature { + Args: { + ariaLabel?: string; + hrefForTerms?: string; + hrefForPrivacy?: string; + hrefForSecurity?: string; + hrefForSupport?: string; + hrefForAccessibility?: string; + }; + Element: HTMLUListElement; +} +export default class HdsAppFooterLegalLinks extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Legal links' + */ + get ariaLabel(): string; + /** + * @param hrefForSupport + * @type {string} + * @description The href value of the "Support" link + */ + get hrefForSupport(): string; + /** + * @param hrefForTerms + * @type {string} + * @description The href value of the "Terms" link + */ + get hrefForTerms(): string; + /** + * @param hrefForPrivacy + * @type {string} + * @description The href value of the "Privacy" link + */ + get hrefForPrivacy(): string; + /** + * @param hrefForSecurity + * @type {string} + * @description The href value of the "Security" link + */ + get hrefForSecurity(): string; + /** + * @param hrefForAccessibility + * @type {string} + * @description The href value of the "Accessibility" link + */ + get hrefForAccessibility(): string; +} +//# sourceMappingURL=legal-links.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/legal-links.d.ts.map b/packages/components/declarations/components/hds/app-footer/legal-links.d.ts.map new file mode 100644 index 0000000000..ed431f2329 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/legal-links.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"legal-links.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/legal-links.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IAC5F;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;OAIG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,MAAM,CAIzB;IAED;;;;OAIG;IACH,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;;OAIG;IACH,IAAI,eAAe,IAAI,MAAM,CAE5B;IAED;;;;OAIG;IACH,IAAI,oBAAoB,IAAI,MAAM,CAKjC;CA6DF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/link.d.ts b/packages/components/declarations/components/hds/app-footer/link.d.ts new file mode 100644 index 0000000000..b0d6d0d5e4 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/link.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsInteractiveSignature } from '../interactive/'; +import type { HdsLinkColors, HdsLinkIconPositions } from '../link/types.ts'; +import type { HdsLinkInlineSignature } from '../link/inline.ts'; +import type { HdsIconSignature } from '../icon'; +export interface HdsAppFooterLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + color?: HdsLinkColors; + icon?: HdsIconSignature['Args']['name']; + iconPosition?: HdsLinkIconPositions; + }; + Blocks: { + default: []; + }; + Element: HdsLinkInlineSignature['Element']; +} +declare const HdsAppFooterLink: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFooterLink; +//# sourceMappingURL=link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/link.d.ts.map b/packages/components/declarations/components/hds/app-footer/link.d.ts.map new file mode 100644 index 0000000000..2845d3e103 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,YAAY,CAAC,EAAE,oBAAoB,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;CAC5C;AAED,QAAA,MAAM,gBAAgB,2FAAqD,CAAC;AAE5E,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/status-link.d.ts b/packages/components/declarations/components/hds/app-footer/status-link.d.ts new file mode 100644 index 0000000000..550706c0ed --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/status-link.d.ts @@ -0,0 +1,59 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { SafeString } from '@ember/template/-private/handlebars'; +import type { HdsInteractiveSignature } from '../interactive/'; +import type { HdsAppFooterStatusTypes } from './types.ts'; +import type { HdsAppFooterLinkSignature } from './link.ts'; +import type { HdsIconSignature } from '../icon'; +export declare const STATUSES: Record; +export interface HdsAppFooterStatusLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + itemStyle?: SafeString; + status?: HdsAppFooterStatusTypes; + statusIcon?: HdsIconSignature['Args']['name']; + statusIconColor?: string; + text?: string; + }; + Element: HdsAppFooterLinkSignature['Element']; +} +export default class HdsAppFooterStatusLink extends Component { + constructor(owner: unknown, args: HdsInteractiveSignature['Args']); + /** + * @param status + * @type {HdsAppFooterStatusTypes} + * @description The name of the status which the StatusLink is being set to + */ + get status(): HdsAppFooterStatusTypes | undefined; + get statusIcon(): HdsIconSignature['Args']['name'] | undefined; + /** + * Get the inline style to apply to the item. + * @method StatusLink#itemStyle + * @return {string} The "style" attribute to apply to the item. + */ + get itemStyle(): SafeString | undefined; + /** + * @param text + * @type {string} + * @description The text content of the StatusLink + */ + get text(): string | undefined; + /** + * @param href + * @type {string} + * @description The href value of the StatusLink + */ + get href(): string; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=status-link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/status-link.d.ts.map b/packages/components/declarations/components/hds/app-footer/status-link.d.ts.map new file mode 100644 index 0000000000..c1cabc8f9b --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/status-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"status-link.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/status-link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AAGtE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAC3D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,QAAQ;;cAHnB,wBAAyB;EAG+B,CAAC;AAE3D,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,SAAS,CAAC,EAAE,UAAU,CAAC;QACvB,MAAM,CAAC,EAAE,uBAAuB,CAAC;QACjC,UAAU,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAC9C,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,EAAE,yBAAyB,CAAC,SAAS,CAAC,CAAC;CAC/C;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;gBAChF,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC;IASjE;;;;OAIG;IACH,IAAI,MAAM,IAAI,uBAAuB,GAAG,SAAS,CAchD;IAED,IAAI,UAAU,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAK7D;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,UAAU,GAAG,SAAS,CAQtC;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,GAAG,SAAS,CAK7B;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAkBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/types.d.ts b/packages/components/declarations/components/hds/app-footer/types.d.ts new file mode 100644 index 0000000000..c9722e8828 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/types.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../icon'; +export declare enum HdsAppFooterStatusValues { + Operational = "operational", + Degraded = "degraded", + Maintenance = "maintenance", + Outage = "outage" +} +export type HdsAppFooterStatusTypes = `${HdsAppFooterStatusValues}`; +export declare const HdsAppFooterStatusLinkStatusValues: Record; +export declare enum HdsAppFooterThemeValues { + Light = "light", + Dark = "dark" +} +export type HdsAppFooterThemeTypes = `${HdsAppFooterThemeValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-footer/types.d.ts.map b/packages/components/declarations/components/hds/app-footer/types.d.ts.map new file mode 100644 index 0000000000..0319183688 --- /dev/null +++ b/packages/components/declarations/components/hds/app-footer/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-footer/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,oBAAY,wBAAwB;IAClC,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,uBAAuB,GAAG,GAAG,wBAAwB,EAAE,CAAC;AAEpE,eAAO,MAAM,kCAAkC,EAAE,MAAM,CACrD,wBAAwB,EACxB;IACE,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;CAC5C,CAkBF,CAAC;AAEF,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,sBAAsB,GAAG,GAAG,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/index.d.ts b/packages/components/declarations/components/hds/app-frame/index.d.ts new file mode 100644 index 0000000000..f34d36367e --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/index.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsAppFrameFooterSignature } from './parts/footer.ts'; +import type { HdsAppFrameHeaderSignature } from './parts/header.ts'; +import type { HdsAppFrameMainSignature } from './parts/main.ts'; +import type { HdsAppFrameModalsSignature } from './parts/modals.ts'; +import type { HdsAppFrameSidebarSignature } from './parts/sidebar.ts'; +export interface HdsAppFrameSignature { + Args: { + hasFooter?: boolean; + hasHeader?: boolean; + hasMain?: boolean; + hasModals?: boolean; + hasSidebar?: boolean; + }; + Blocks: { + default: [ + { + Footer?: ComponentLike; + Header?: ComponentLike; + Main?: ComponentLike; + Modals?: ComponentLike; + Sidebar?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsAppFrame extends Component { + get hasHeader(): boolean; + get hasSidebar(): boolean; + get hasFooter(): boolean; + get hasModals(): boolean; + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/index.d.ts.map b/packages/components/declarations/components/hds/app-frame/index.d.ts.map new file mode 100644 index 0000000000..1a5a7d2163 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-frame/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACtE,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACnD,MAAM,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACnD,IAAI,CAAC,EAAE,aAAa,CAAC,wBAAwB,CAAC,CAAC;gBAC/C,MAAM,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACnD,OAAO,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;aACtD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IAEtE,IAAI,SAAS,IAAI,OAAO,CAEvB;IAGD,IAAI,UAAU,IAAI,OAAO,CAExB;IAGD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAGD,IAAI,SAAS,IAAI,OAAO,CAEvB;IAGD,IAAI,UAAU,IAAI,MAAM,CAQvB;CAmCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts b/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts new file mode 100644 index 0000000000..ba24820067 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFrameFooterSignature { + Blocks: { + default: []; + }; + Element: HTMLElement; +} +declare const HdsAppFrameFooter: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFrameFooter; +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts.map b/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts.map new file mode 100644 index 0000000000..dc38140ec3 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-frame/parts/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/header.d.ts b/packages/components/declarations/components/hds/app-frame/parts/header.d.ts new file mode 100644 index 0000000000..7c044447c8 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/header.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFrameHeaderSignature { + Blocks: { + default: []; + }; + Element: HTMLElement; +} +declare const HdsAppFrameHeader: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFrameHeader; +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/header.d.ts.map b/packages/components/declarations/components/hds/app-frame/parts/header.d.ts.map new file mode 100644 index 0000000000..85d2077920 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-frame/parts/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/main.d.ts b/packages/components/declarations/components/hds/app-frame/parts/main.d.ts new file mode 100644 index 0000000000..95487b0cbb --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/main.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFrameMainSignature { + Blocks: { + default: []; + }; + Element: HTMLElement; +} +declare const HdsAppFrameMain: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFrameMain; +//# sourceMappingURL=main.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/main.d.ts.map b/packages/components/declarations/components/hds/app-frame/parts/main.d.ts.map new file mode 100644 index 0000000000..1b378e3f91 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/main.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-frame/parts/main.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,wBAAwB;IACvC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,eAAe,0FAAoD,CAAC;AAE1E,eAAe,eAAe,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts b/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts new file mode 100644 index 0000000000..c0bb5028ac --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFrameModalsSignature { + Blocks: { + default: []; + }; + Element: HTMLElement; +} +declare const HdsAppFrameModals: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFrameModals; +//# sourceMappingURL=modals.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts.map b/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts.map new file mode 100644 index 0000000000..a8b82ac7cf --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/modals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-frame/parts/modals.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts b/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts new file mode 100644 index 0000000000..a1ecaef35e --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppFrameSidebarSignature { + Blocks: { + default: []; + }; + Element: HTMLElement; +} +declare const HdsAppFrameSidebar: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppFrameSidebar; +//# sourceMappingURL=sidebar.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts.map b/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts.map new file mode 100644 index 0000000000..290aea35d9 --- /dev/null +++ b/packages/components/declarations/components/hds/app-frame/parts/sidebar.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-frame/parts/sidebar.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/home-link.d.ts b/packages/components/declarations/components/hds/app-header/home-link.d.ts new file mode 100644 index 0000000000..20e893a82d --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/home-link.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../icon'; +import type { HdsInteractiveSignature } from '../interactive/'; +export interface HdsAppHeaderHomeLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + icon: HdsIconSignature['Args']['name']; + color?: string; + ariaLabel: string; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsAppHeaderHomeLink extends Component { + get ariaLabel(): string; +} +//# sourceMappingURL=home-link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/home-link.d.ts.map b/packages/components/declarations/components/hds/app-header/home-link.d.ts.map new file mode 100644 index 0000000000..aa830230cf --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/home-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"home-link.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-header/home-link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAS,CAAC,6BAA6B,CAAC;IACxF,IAAI,SAAS,IAAI,MAAM,CAStB;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/index.d.ts b/packages/components/declarations/components/hds/app-header/index.d.ts new file mode 100644 index 0000000000..656a2dad06 --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/index.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsAppHeaderSignature { + Args: { + breakpoint?: string; + hasA11yRefocus?: boolean; + a11yRefocusSkipTo?: string; + a11yRefocusSkipText?: string; + a11yRefocusNavigationText?: string; + a11yRefocusRouteChangeValidator?: string; + a11yRefocusExcludeAllQueryParams?: boolean; + }; + Blocks: { + logo?: []; + globalActions?: []; + utilityActions?: []; + }; + Element: HTMLDivElement; +} +export default class HdsAppHeader extends Component { + private _isOpen; + private _isDesktop; + private _hasOverflowContent; + private _desktopMQ; + hasA11yRefocus: boolean; + a11yRefocusSkipTo: string; + private _menuContentId; + private _breakpoint; + private _desktopMQVal; + constructor(owner: unknown, args: Record); + addEventListeners(): void; + removeEventListeners(): void; + get shouldTrapFocus(): boolean; + get classNames(): string; + escapePress(event: KeyboardEvent): void; + onClickToggle(): void; + updateDesktopVariable(event: MediaQueryListEvent): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/index.d.ts.map b/packages/components/declarations/components/hds/app-header/index.d.ts.map new file mode 100644 index 0000000000..ebe5bb785d --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-header/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,+BAA+B,CAAC,EAAE,MAAM,CAAC;QACzC,gCAAgC,CAAC,EAAE,OAAO,CAAC;KAC5C,CAAC;IACF,MAAM,EAAE;QACN,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,aAAa,CAAC,EAAE,EAAE,CAAC;QACnB,cAAc,CAAC,EAAE,EAAE,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IAC/D,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,UAAU,CAAQ;IAC1B,OAAO,CAAC,mBAAmB,CAAS;IAC7C,OAAO,CAAC,UAAU,CAAiB;IACnC,cAAc,UAAoC;IAClD,iBAAiB,SAAqD;IAGtE,OAAO,CAAC,cAAc,CAAuC;IAE7D,OAAO,CAAC,WAAW,CAIjB;IAEF,OAAO,CAAC,aAAa,CAIjB;gBAEQ,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;IASvD,iBAAiB,IAAI,IAAI;IAgBzB,oBAAoB,IAAI,IAAI;IAU5B,IAAI,eAAe,IAAI,OAAO,CAE7B;IAGD,IAAI,UAAU,IAAI,MAAM,CAiBvB;IAGD,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAOvC,aAAa,IAAI,IAAI;IAKrB,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;CAyDxD"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/menu-button.d.ts b/packages/components/declarations/components/hds/app-header/menu-button.d.ts new file mode 100644 index 0000000000..ee6f27f743 --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/menu-button.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsButtonSignature } from '../button/'; +export interface HdsAppHeaderMenuButtonSignature { + Args: { + isOpen?: boolean; + menuContentId: string; + onClickToggle?: () => void; + }; + Element: HdsButtonSignature['Element']; +} +export default class HdsAppHeaderMenuButton extends Component { + get icon(): 'x' | 'menu'; + onClick(): void; +} +//# sourceMappingURL=menu-button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-header/menu-button.d.ts.map b/packages/components/declarations/components/hds/app-header/menu-button.d.ts.map new file mode 100644 index 0000000000..e9831002f9 --- /dev/null +++ b/packages/components/declarations/components/hds/app-header/menu-button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"menu-button.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-header/menu-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;KAC5B,CAAC;IACF,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IAC5F,IAAI,IAAI,IAAI,GAAG,GAAG,MAAM,CAEvB;IAGD,OAAO,IAAI,IAAI;CAqBhB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/index.d.ts b/packages/components/declarations/components/hds/app-side-nav/index.d.ts new file mode 100644 index 0000000000..f10dbf1b0e --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/index.d.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsAppSideNavSignature { + Args: { + isResponsive?: boolean; + isCollapsible?: boolean; + isMinimized?: boolean; + onToggleMinimizedStatus?: (arg: boolean) => void; + onDesktopViewportChange?: (arg: boolean) => void; + }; + Blocks: { + default?: []; + }; + Element: HTMLDivElement; +} +export default class HdsAppSideNav extends Component { + private _isMinimized; + private _isAnimating; + private _isDesktop; + private _body; + private _bodyInitialOverflowValue; + private _desktopMQ; + private _containersToHide; + private _desktopMQVal; + constructor(owner: unknown, args: HdsAppSideNavSignature['Args']); + addEventListeners(): void; + removeEventListeners(): void; + get isResponsive(): boolean; + get isCollapsible(): boolean; + get shouldTrapFocus(): boolean; + get showToggleButton(): boolean; + get classNames(): string; + synchronizeInert(): void; + lockBodyScroll(): void; + unlockBodyScroll(): void; + escapePress(event: KeyboardEvent): void; + toggleMinimizedStatus(): void; + didInsert(element: HTMLElement): void; + setTransition(phase: string, event: TransitionEvent): void; + updateDesktopVariable(event: MediaQueryListEvent): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/index.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/index.d.ts.map new file mode 100644 index 0000000000..7ea1fd593b --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-side-nav/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;QACjD,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;KAClD,CAAC;IACF,MAAM,EAAE;QACN,OAAO,CAAC,EAAE,EAAE,CAAC;KACd,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IACjE,OAAO,CAAC,YAAY,CAAC;IACrB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,UAAU,CAAQ;IAEnC,OAAO,CAAC,KAAK,CAAe;IAC5B,OAAO,CAAC,yBAAyB,CAAM;IACvC,OAAO,CAAC,UAAU,CAAiB;IACnC,OAAO,CAAC,iBAAiB,CAAuB;IAEhD,OAAO,CAAC,aAAa,CAE8B;gBAEvC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAUhE,iBAAiB,IAAI,IAAI;IAkBzB,oBAAoB,IAAI,IAAI;IAU5B,IAAI,YAAY,IAAI,OAAO,CAE1B;IAGD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,UAAU,IAAI,MAAM,CAsBvB;IAED,gBAAgB,IAAI,IAAI;IAUxB,cAAc,IAAI,IAAI;IAOtB,gBAAgB,IAAI,IAAI;IAkBxB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAQvC,qBAAqB,IAAI,IAAI;IAkB7B,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAWrC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;IAa1D,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;CAmExD"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts b/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts new file mode 100644 index 0000000000..9c104f9089 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsInteractiveSignature } from '../../interactive'; +export interface HdsAppSideNavListBackLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + text: string; + }; + Element: HdsInteractiveSignature['Element']; +} +declare const HdsAppSideNavListBackLink: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppSideNavListBackLink; +//# sourceMappingURL=back-link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts.map new file mode 100644 index 0000000000..2504f270a5 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/back-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"back-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/list/back-link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,yBAAyB,oGAC8B,CAAC;AAE9D,eAAe,yBAAyB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts b/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts new file mode 100644 index 0000000000..7116420f6a --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsYieldSignature } from '../../yield'; +import type { HdsAppSideNavListItemSignature } from './item'; +import type { HdsAppSideNavListBackLinkSignature } from './back-link'; +import type { HdsAppSideNavListTitleSignature } from './title'; +import type { HdsAppSideNavListLinkSignature } from './link'; +export interface HdsAppSideNavListSignature { + Blocks: { + default: [ + { + ExtraBefore?: ComponentLike; + Item?: ComponentLike; + BackLink?: ComponentLike; + Title?: ComponentLike; + Link?: ComponentLike; + ExtraAfter?: ComponentLike; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsAppSideNavList extends Component { + private _titleIds; + get titleIds(): string; + didInsertTitle(titleId: string): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts.map new file mode 100644 index 0000000000..f78c8048db --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/list/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,QAAQ,CAAC;AAC7D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,aAAa,CAAC;AACtE,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,QAAQ,CAAC;AAE7D,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,WAAW,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC/C,IAAI,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;gBACrD,QAAQ,CAAC,EAAE,aAAa,CAAC,kCAAkC,CAAC,CAAC;gBAC7D,KAAK,CAAC,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;gBACvD,IAAI,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;gBACrD,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC/C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IACzE,OAAO,CAAC,SAAS,CAAgB;IAE1C,IAAI,QAAQ,IAAI,MAAM,CAErB;IAGD,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAmCtC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts b/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts new file mode 100644 index 0000000000..f7ca23db2b --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsAppSideNavListItemSignature { + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +declare const HdsAppSideNavListItem: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppSideNavListItem; +//# sourceMappingURL=item.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts.map new file mode 100644 index 0000000000..a8c8459863 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/list/item.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts b/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts new file mode 100644 index 0000000000..4237c3f1db --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive'; +export interface HdsAppSideNavListLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + icon?: HdsIconSignature['Args']['name']; + text?: string; + badge?: string; + count?: string; + hasSubItems?: boolean; + isActive?: boolean; + }; + Blocks: { + default: []; + }; + Element: HdsInteractiveSignature['Element']; +} +declare const HdsAppSideNavListLink: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppSideNavListLink; +//# sourceMappingURL=link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts.map new file mode 100644 index 0000000000..5599469dbe --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/list/link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts b/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts new file mode 100644 index 0000000000..4d058fa4e4 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsAppSideNavListTitleSignature { + Args: { + didInsertTitle?: (titleId: string) => void; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsAppSideNavListTitle extends Component { + private _titleId; + didInsertTitle(element: HTMLElement): void; +} +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts.map new file mode 100644 index 0000000000..98047b8143 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/list/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/list/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;KAC5C,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IAE5F,OAAO,CAAC,QAAQ,CAA4B;IAG5C,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CA6B3C"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts b/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts new file mode 100644 index 0000000000..f0d5a1080a --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsAppSideNavListSignature } from '../list/index'; +interface PortalSignature { + Args: { + target: string; + renderInPlace?: boolean; + fallback?: 'inplace'; + }; + Blocks: { + default: []; + }; +} +export interface HdsAppSideNavPortalSignature { + Args: PortalSignature['Args'] & { + ariaLabel?: string; + targetName?: string; + }; + Blocks: HdsAppSideNavListSignature['Blocks']; + Element: HTMLDivElement; +} +declare const HdsAppSideNavPortal: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppSideNavPortal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts.map new file mode 100644 index 0000000000..7bc7b4c7e8 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/portal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/portal/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAIhE,UAAU,eAAe;IACvB,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,0BAA0B,CAAC,QAAQ,CAAC,CAAC;IAC7C,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,8FAC8B,CAAC;AAExD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts b/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts new file mode 100644 index 0000000000..007e53b7c0 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsAppSideNavPortalSignature } from './index'; +interface PortalTargetSignature { + Element: HTMLDivElement; + Args: { + name: string; + multiple?: boolean; + onChange?: (count: number) => void; + }; + Blocks: { + default: [number]; + }; +} +import type { Registry as Services } from '@ember/service'; +interface HdsAppSideNavPortalTargetSignature { + Args: PortalTargetSignature['Args'] & { + targetName?: HdsAppSideNavPortalSignature['Args']['targetName']; + }; + Element: HTMLDivElement; +} +export default class HdsAppSideNavPortalTarget extends Component { + router: Services['router']; + private _numSubnavs; + private _lastPanelEl; + static get prefersReducedMotionOverride(): boolean; + private _prefersReducedMotionMQ; + get prefersReducedMotion(): boolean; + panelsChanged(portalCount: number): void; + didUpdateSubnav(element: HTMLElement, [count]: [number]): void; + animateSubnav(element: HTMLElement, [count]: [number]): void; +} +export {}; +//# sourceMappingURL=target.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts.map new file mode 100644 index 0000000000..467fe5e774 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/portal/target.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/app-side-nav/portal/target.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAG5D,UAAU,qBAAqB;IAC7B,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;KACpC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;KACnB,CAAC;CACH;AAED,OAAO,KAAK,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3D,UAAU,kCAAkC;IAC1C,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,GAAG;QACpC,UAAU,CAAC,EAAE,4BAA4B,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KACjE,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,SAAS,CAAC,kCAAkC,CAAC;IACzF,MAAM,EAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,YAAY,CAAsB;IAEnD,MAAM,KAAK,4BAA4B,IAAI,OAAO,CAEjD;IAED,OAAO,CAAC,uBAAuB,CAE7B;IAEF,IAAI,oBAAoB,IAAI,OAAO,CAKlC;IAGD,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKxC,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI;IAK9D,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI;CA8I7D"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts b/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts new file mode 100644 index 0000000000..1cca03e18f --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../icon'; +interface HdsAppSideNavToggleButtonSignature { + Args: { + icon: HdsIconSignature['Args']['name']; + }; + Element: HTMLButtonElement; +} +declare const HdsAppSideNavToggleButton: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsAppSideNavToggleButton; +//# sourceMappingURL=toggle-button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts.map b/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts.map new file mode 100644 index 0000000000..78890454f7 --- /dev/null +++ b/packages/components/declarations/components/hds/app-side-nav/toggle-button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/app-side-nav/toggle-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,UAAU,kCAAkC;IAC1C,IAAI,EAAE;QACJ,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACxC,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,QAAA,MAAM,yBAAyB,oGAC8B,CAAC;AAE9D,eAAe,yBAAyB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/body.d.ts b/packages/components/declarations/components/hds/application-state/body.d.ts new file mode 100644 index 0000000000..60161e9f06 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/body.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsApplicationStateBodySignature { + Args: { + text?: string; + }; + Blocks: { + default?: []; + }; + Element: HTMLDivElement; +} +declare const HdsApplicationStateBody: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsApplicationStateBody; +//# sourceMappingURL=body.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/body.d.ts.map b/packages/components/declarations/components/hds/application-state/body.d.ts.map new file mode 100644 index 0000000000..40a924df42 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/body.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,CAAC,EAAE,EAAE,CAAC;KACd,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,uBAAuB,kGAC8B,CAAC;AAE5D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/footer.d.ts b/packages/components/declarations/components/hds/application-state/footer.d.ts new file mode 100644 index 0000000000..974699bd4c --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/footer.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike } from '@glint/template'; +import type { HdsLinkStandaloneSignature } from '../link/standalone'; +import type { HdsButtonSignature } from '../button'; +import type { HdsDropdownSignature } from '../dropdown'; +export interface HdsApplicationStateFooterSignature { + Args: { + hasDivider?: boolean; + }; + Blocks: { + default?: [ + { + Button?: ComponentLike; + Dropdown?: ComponentLike; + LinkStandalone?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +declare const HdsApplicationStateFooter: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsApplicationStateFooter; +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/footer.d.ts.map b/packages/components/declarations/components/hds/application-state/footer.d.ts.map new file mode 100644 index 0000000000..7aa4c1b12c --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAExD,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,CAAC,EAAE;YACR;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;gBAC3C,QAAQ,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;gBAC/C,cAAc,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;aAC5D;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,yBAAyB,oGAC8B,CAAC;AAE9D,eAAe,yBAAyB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/header.d.ts b/packages/components/declarations/components/hds/application-state/header.d.ts new file mode 100644 index 0000000000..1d0a21675e --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/header.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../icon'; +import type { HdsApplicationStateTitleTags } from './types'; +export interface HdsApplicationStateHeaderSignature { + Args: { + title?: string; + titleTag?: HdsApplicationStateTitleTags; + errorCode?: string; + icon?: HdsIconSignature['Args']['name']; + }; + Element: HTMLDivElement; +} +export default class HdsApplicationStateHeader extends Component { + get titleTag(): HdsApplicationStateTitleTags; +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/header.d.ts.map b/packages/components/declarations/components/hds/application-state/header.d.ts.map new file mode 100644 index 0000000000..ce2f68316c --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAC5D,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,4BAA4B,CAAC;QACxC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,SAAS,CAAC,kCAAkC,CAAC;IAClG,IAAI,QAAQ,IAAI,4BAA4B,CAE3C;CAgDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/index.d.ts b/packages/components/declarations/components/hds/application-state/index.d.ts new file mode 100644 index 0000000000..3376e6fb0b --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/index.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsApplicationStateAligns } from './types'; +import type { HdsApplicationStateMediaSignature } from './media'; +import type { HdsApplicationStateHeaderSignature } from './header'; +import type { HdsApplicationStateBodySignature } from './body'; +import type { HdsApplicationStateFooterSignature } from './footer'; +export declare const ALIGNS: string[]; +export interface HdsApplicationStateSignature { + Args: { + align?: HdsApplicationStateAligns; + }; + Blocks: { + default: [ + { + Media?: ComponentLike; + Header?: ComponentLike; + Body?: ComponentLike; + Footer?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsApplicationState extends Component { + get align(): HdsApplicationStateAligns; + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/index.d.ts.map b/packages/components/declarations/components/hds/application-state/index.d.ts.map new file mode 100644 index 0000000000..75b5683910 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AACnE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,QAAQ,CAAC;AAC/D,OAAO,KAAK,EAAE,kCAAkC,EAAE,MAAM,UAAU,CAAC;AAEnE,eAAO,MAAM,MAAM,EAAE,MAAM,EAAkD,CAAC;AAC9E,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,yBAAyB,CAAC;KACnC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;gBACzD,MAAM,CAAC,EAAE,aAAa,CAAC,kCAAkC,CAAC,CAAC;gBAC3D,IAAI,CAAC,EAAE,aAAa,CAAC,gCAAgC,CAAC,CAAC;gBACvD,MAAM,CAAC,EAAE,aAAa,CAAC,kCAAkC,CAAC,CAAC;aAC5D;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAS,CAAC,4BAA4B,CAAC;IACtF,IAAI,KAAK,IAAI,yBAAyB,CAarC;IAED,IAAI,UAAU,IAAI,MAAM,CAOvB;CAkBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/media.d.ts b/packages/components/declarations/components/hds/application-state/media.d.ts new file mode 100644 index 0000000000..ed655ed511 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/media.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsApplicationStateMediaSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsApplicationStateMedia: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsApplicationStateMedia; +//# sourceMappingURL=media.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/media.d.ts.map b/packages/components/declarations/components/hds/application-state/media.d.ts.map new file mode 100644 index 0000000000..2a810e8907 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/media.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"media.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/media.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,iCAAiC;IAChD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,wBAAwB,mGAC8B,CAAC;AAE7D,eAAe,wBAAwB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/types.d.ts b/packages/components/declarations/components/hds/application-state/types.d.ts new file mode 100644 index 0000000000..c507f68d9a --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/types.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsApplicationStateAlignValues { + Left = "left", + Center = "center" +} +export type HdsApplicationStateAligns = `${HdsApplicationStateAlignValues}`; +export declare enum HdsApplicationStateTitleTagValues { + Div = "div", + H1 = "h1", + H2 = "h2", + H3 = "h3", + H4 = "h4", + H5 = "h5", + H6 = "h6" +} +export type HdsApplicationStateTitleTags = `${HdsApplicationStateTitleTagValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/application-state/types.d.ts.map b/packages/components/declarations/components/hds/application-state/types.d.ts.map new file mode 100644 index 0000000000..32021b2888 --- /dev/null +++ b/packages/components/declarations/components/hds/application-state/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/application-state/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,8BAA8B;IACxC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,yBAAyB,GAAG,GAAG,8BAA8B,EAAE,CAAC;AAE5E,oBAAY,iCAAiC;IAC3C,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,MAAM,4BAA4B,GACtC,GAAG,iCAAiC,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge-count/index.d.ts b/packages/components/declarations/components/hds/badge-count/index.d.ts new file mode 100644 index 0000000000..e583c6aaea --- /dev/null +++ b/packages/components/declarations/components/hds/badge-count/index.d.ts @@ -0,0 +1,58 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsBadgeCountColorValues, HdsBadgeCountSizeValues, HdsBadgeCountTypeValues } from './types.ts'; +import type { HdsBadgeCountColors, HdsBadgeCountSizes, HdsBadgeCountTypes } from './types.ts'; +export declare const SIZES: string[]; +export declare const TYPES: string[]; +export declare const COLORS: string[]; +export declare const DEFAULT_SIZE = HdsBadgeCountSizeValues.Medium; +export declare const DEFAULT_TYPE = HdsBadgeCountTypeValues.Filled; +export declare const DEFAULT_COLOR = HdsBadgeCountColorValues.Neutral; +export interface HdsBadgeCountSignature { + Args: { + size?: HdsBadgeCountSizes; + type?: HdsBadgeCountTypes; + color?: HdsBadgeCountColors; + text: string | number; + }; + Element: HTMLDivElement; +} +export default class HdsBadgeCount extends Component { + /** + * Sets the size for the component + * Accepted sizes: small, medium, large + * + * @param size + * @type {string} + * @default 'medium' + */ + get size(): HdsBadgeCountSizes; + /** + * Sets the type of the component + * Accepted values: filled, inverted, outlined + * + * @param type + * @type {string} + * @default 'filled' + */ + get type(): HdsBadgeCountTypes; + /** + * Sets the color scheme for the component + * Accepted colors: neutral, neutral-dark-mode + * + * @param color + * @type {string} + * @default 'neutral' + */ + get color(): HdsBadgeCountColors; + /** + * Get the class names to apply to the component. + * @method BadgeCount#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge-count/index.d.ts.map b/packages/components/declarations/components/hds/badge-count/index.d.ts.map new file mode 100644 index 0000000000..70635a26f5 --- /dev/null +++ b/packages/components/declarations/components/hds/badge-count/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/badge-count/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,KAAK,EAAE,MAAM,EAA2C,CAAC;AACtE,eAAO,MAAM,KAAK,EAAE,MAAM,EAA2C,CAAC;AACtE,eAAO,MAAM,MAAM,EAAE,MAAM,EAA4C,CAAC;AACxE,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAC3D,eAAO,MAAM,YAAY,iCAAiC,CAAC;AAC3D,eAAO,MAAM,aAAa,mCAAmC,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,kBAAkB,CAAC;QAC1B,IAAI,CAAC,EAAE,kBAAkB,CAAC;QAC1B,KAAK,CAAC,EAAE,mBAAmB,CAAC;QAC5B,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;KACvB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,kBAAkB,CAW7B;IAED;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,kBAAkB,CAW7B;IAED;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,mBAAmB,CAW/B;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAavB;CAaF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge-count/types.d.ts b/packages/components/declarations/components/hds/badge-count/types.d.ts new file mode 100644 index 0000000000..83cb06ee0a --- /dev/null +++ b/packages/components/declarations/components/hds/badge-count/types.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsBadgeCountSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsBadgeCountSizes = `${HdsBadgeCountSizeValues}`; +export declare enum HdsBadgeCountTypeValues { + Filled = "filled", + Inverted = "inverted", + Outlined = "outlined" +} +export type HdsBadgeCountTypes = `${HdsBadgeCountTypeValues}`; +export declare enum HdsBadgeCountColorValues { + Neutral = "neutral", + NeutralDarkMode = "neutral-dark-mode" +} +export type HdsBadgeCountColors = `${HdsBadgeCountColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge-count/types.d.ts.map b/packages/components/declarations/components/hds/badge-count/types.d.ts.map new file mode 100644 index 0000000000..b2585c7982 --- /dev/null +++ b/packages/components/declarations/components/hds/badge-count/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/badge-count/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,kBAAkB,GAAG,GAAG,uBAAuB,EAAE,CAAC;AAE9D,oBAAY,uBAAuB;IACjC,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,kBAAkB,GAAG,GAAG,uBAAuB,EAAE,CAAC;AAE9D,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,eAAe,sBAAsB;CACtC;AACD,MAAM,MAAM,mBAAmB,GAAG,GAAG,wBAAwB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge/index.d.ts b/packages/components/declarations/components/hds/badge/index.d.ts new file mode 100644 index 0000000000..81e65e4aca --- /dev/null +++ b/packages/components/declarations/components/hds/badge/index.d.ts @@ -0,0 +1,74 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsBadgeColorValues, HdsBadgeSizeValues, HdsBadgeTypeValues } from './types.ts'; +import type { HdsBadgeColors, HdsBadgeSizes, HdsBadgeTypes } from './types.ts'; +import type { HdsIconSignature } from '../icon'; +export declare const SIZES: string[]; +export declare const TYPES: string[]; +export declare const COLORS: string[]; +export declare const DEFAULT_SIZE = HdsBadgeSizeValues.Medium; +export declare const DEFAULT_TYPE = HdsBadgeTypeValues.Filled; +export declare const DEFAULT_COLOR = HdsBadgeColorValues.Neutral; +export interface HdsBadgeSignature { + Args: { + size?: HdsBadgeSizes; + type?: HdsBadgeTypes; + color?: HdsBadgeColors; + text: string | number; + icon?: HdsIconSignature['Args']['name']; + isIconOnly?: boolean; + }; + Element: HTMLDivElement; +} +export default class HdsBadge extends Component { + /** + * Sets the size for the component + * Accepted values: small, medium, large + * + * @param size + * @type {HdsBadgeSizes} + * @default 'medium' + */ + get size(): HdsBadgeSizes; + /** + * Sets the type of the component + * Accepted values: filled, inverted, outlined + * + * @param type + * @type {HdsBadgeTypes} + * @default 'filled' + */ + get type(): HdsBadgeTypes; + /** + * Sets the color scheme for the component + * Accepted values: neutral, neutral-dark-mode, highlight, success, warning, critical + * + * @param color + * @type {HdsBadgeColors} + * @default 'neutral' + */ + get color(): HdsBadgeColors; + /** + * @param text + * @type {string} + * @description The text of the badge. If `isIconOnly` is set to `true`, the text will be visually hidden but still available to assistive technology. If no text value is defined, an error will be thrown. + */ + get text(): string | number; + /** + * @param isIconOnly + * @type {boolean} + * @default false + * @description Indicates if the badge will only contain an icon; component will also ensure that accessible text is still applied to the component. + */ + get isIconOnly(): boolean; + /** + * Get the class names to apply to the component. + * @method Badge#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge/index.d.ts.map b/packages/components/declarations/components/hds/badge/index.d.ts.map new file mode 100644 index 0000000000..d4c203dd2e --- /dev/null +++ b/packages/components/declarations/components/hds/badge/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/badge/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,KAAK,EAAE,MAAM,EAAsC,CAAC;AACjE,eAAO,MAAM,KAAK,EAAE,MAAM,EAAsC,CAAC;AACjE,eAAO,MAAM,MAAM,EAAE,MAAM,EAAuC,CAAC;AACnE,eAAO,MAAM,YAAY,4BAA4B,CAAC;AACtD,eAAO,MAAM,YAAY,4BAA4B,CAAC;AACtD,eAAO,MAAM,aAAa,8BAA8B,CAAC;AAEzD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,IAAI,CAAC,EAAE,aAAa,CAAC;QACrB,KAAK,CAAC,EAAE,cAAc,CAAC;QACvB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;QACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAChE;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,aAAa,CAWxB;IAED;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,aAAa,CAWxB;IAED;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,cAAc,CAW1B;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,GAAG,MAAM,CAS1B;IAED;;;;;OAKG;IACH,IAAI,UAAU,IAAI,OAAO,CAMxB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAavB;CAyCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge/types.d.ts b/packages/components/declarations/components/hds/badge/types.d.ts new file mode 100644 index 0000000000..28661618f4 --- /dev/null +++ b/packages/components/declarations/components/hds/badge/types.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsBadgeSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsBadgeSizes = `${HdsBadgeSizeValues}`; +export declare enum HdsBadgeTypeValues { + Filled = "filled", + Inverted = "inverted", + Outlined = "outlined" +} +export type HdsBadgeTypes = `${HdsBadgeTypeValues}`; +export declare enum HdsBadgeColorValues { + Neutral = "neutral", + NeutralDarkMode = "neutral-dark-mode", + Highlight = "highlight", + Success = "success", + Warning = "warning", + Critical = "critical" +} +export type HdsBadgeColors = `${HdsBadgeColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/badge/types.d.ts.map b/packages/components/declarations/components/hds/badge/types.d.ts.map new file mode 100644 index 0000000000..98cf812ee7 --- /dev/null +++ b/packages/components/declarations/components/hds/badge/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/badge/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,kBAAkB;IAC5B,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,eAAe,sBAAsB;IACrC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/index.d.ts b/packages/components/declarations/components/hds/breadcrumb/index.d.ts new file mode 100644 index 0000000000..62d795677a --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/index.d.ts @@ -0,0 +1,43 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsBreadcrumbSignature { + Args: { + ariaLabel?: string; + itemsCanWrap?: boolean; + didInsert?: () => void; + }; + Blocks: { + default: []; + }; + Element: HTMLElement; +} +export default class HdsBreadcrumb extends Component { + /** + * @param onDidInsert + * @type {function} + * @default () => {} + */ + get didInsert(): () => void; + /** + * @param itemsCanWrap + * @type {boolean} + * @default true + */ + get itemsCanWrap(): boolean; + /** + * @param ariaLabel + * @type {string} + * @default 'breadcrumbs' + */ + get ariaLabel(): string; + /** + * Get the class names to apply to the component. + * @method Breadcrumb#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/index.d.ts.map b/packages/components/declarations/components/hds/breadcrumb/index.d.ts.map new file mode 100644 index 0000000000..508326c160 --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/breadcrumb/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;KACxB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,IAAI,CAQ1B;IAED;;;;OAIG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/item.d.ts b/packages/components/declarations/components/hds/breadcrumb/item.d.ts new file mode 100644 index 0000000000..0e4ceaef55 --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/item.d.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { SafeString } from '@ember/template/-private/handlebars'; +import type { HdsIconSignature } from '../icon'; +export interface HdsBreadcrumbItemSignature { + Args: { + current?: boolean; + maxWidth?: string; + text: string; + isRouteExternal?: boolean; + icon?: HdsIconSignature['Args']['name']; + route?: string; + models?: Array; + model?: string | number; + query?: Record; + 'current-when'?: string; + replace?: boolean; + }; + Element: HTMLLIElement; +} +export default class HdsBreadcrumbItem extends Component { + /** + * @param maxWidth + * @type {string} + * @default undefined + * @description A parameter that can be applied to an "item" to limit its max-width + */ + get maxWidth(): string | undefined; + /** + * Get the inline style to apply to the item. + * @method BreadcrumbItem#itemStyle + * @return {string} The "style" attribute to apply to the item. + */ + get itemStyle(): SafeString | undefined; + /** + * Get the class names to apply to the component. + * @method BreadcrumbItem#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=item.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/item.d.ts.map b/packages/components/declarations/components/hds/breadcrumb/item.d.ts.map new file mode 100644 index 0000000000..ab53925f95 --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/breadcrumb/item.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,IAAI,EAAE,MAAM,CAAC;QACb,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,MAAM,GAAG,SAAS,CAajC;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,UAAU,GAAG,SAAS,CAMtC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAIvB;CAsGF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts b/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts new file mode 100644 index 0000000000..359aaa5c9a --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsBreadcrumbTruncationSignature { + Args: { + ariaLabel?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +export default class HdsBreadcrumbTruncation extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'show more' + */ + get ariaLabel(): string; +} +//# sourceMappingURL=truncation.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts.map b/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts.map new file mode 100644 index 0000000000..bc7bddc0d1 --- /dev/null +++ b/packages/components/declarations/components/hds/breadcrumb/truncation.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"truncation.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/breadcrumb/truncation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAS,CAAC,gCAAgC,CAAC;IAC9F;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;CAuDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button-set/index.d.ts b/packages/components/declarations/components/hds/button-set/index.d.ts new file mode 100644 index 0000000000..cde46f178e --- /dev/null +++ b/packages/components/declarations/components/hds/button-set/index.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsButtonSetSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsButtonSet: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsButtonSet; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button-set/index.d.ts.map b/packages/components/declarations/components/hds/button-set/index.d.ts.map new file mode 100644 index 0000000000..0258914e49 --- /dev/null +++ b/packages/components/declarations/components/hds/button-set/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/button-set/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE;QAAE,OAAO,EAAE,EAAE,CAAA;KAAE,CAAC;IACxB,OAAO,EAAE,cAAc,CAAC;CACzB;AACD,QAAA,MAAM,YAAY,uFAAiD,CAAC;AAEpE,eAAe,YAAY,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button/index.d.ts b/packages/components/declarations/components/hds/button/index.d.ts new file mode 100644 index 0000000000..0a73c60248 --- /dev/null +++ b/packages/components/declarations/components/hds/button/index.d.ts @@ -0,0 +1,86 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsButtonSizeValues, HdsButtonColorValues, HdsButtonIconPositionValues } from './types.ts'; +import type { HdsButtonSizes, HdsButtonColors, HdsButtonIconPositions } from './types.ts'; +import type { HdsInteractiveSignature } from '../interactive/'; +import type { HdsIconSignature } from '../icon'; +export declare const SIZES: string[]; +export declare const COLORS: string[]; +export declare const ICONPOSITIONS: string[]; +export declare const DEFAULT_SIZE = HdsButtonSizeValues.Medium; +export declare const DEFAULT_COLOR = HdsButtonColorValues.Primary; +export declare const DEFAULT_ICONPOSITION = HdsButtonIconPositionValues.Leading; +export interface HdsButtonSignature { + Args: HdsInteractiveSignature['Args'] & { + size?: HdsButtonSizes; + color?: HdsButtonColors; + text: string; + icon?: HdsIconSignature['Args']['name']; + iconPosition?: HdsButtonIconPositions; + isIconOnly?: boolean; + isFullWidth?: boolean; + isInline?: boolean; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsButton extends Component { + /** + * @param text + * @type {string} + * @description The text of the button or value of `aria-label` if `isIconOnly` is set to `true`. If no text value is defined an error will be thrown. + */ + get text(): string; + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small`, `medium`, and `large` + */ + get size(): HdsButtonSizes; + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary`, `secondary`, and `critical` + */ + get color(): HdsButtonColors; + get icon(): HdsIconSignature['Args']['name'] | undefined; + /** + * @param isIconOnly + * @type {boolean} + * @default false + * @description Indicates if the button will only contain an icon; component will also ensure that accessible text is still applied to the component. + */ + get isIconOnly(): boolean; + /** + * @param iconPosition + * @type {string} + * @default leading + * @description Positions the icon before or after the text; allowed values are `leading` or `trailing` + */ + get iconPosition(): HdsButtonIconPositions; + /** + * @param iconSize + * @type {string} + * @default 16 + * @description ensures that the correct icon size is used. Automatically calculated. + */ + get iconSize(): HdsIconSignature['Args']['size']; + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that a button should take up the full width of the parent container. The default is false. + */ + get isFullWidth(): boolean; + /** + * Get the class names to apply to the component. + * @method Button#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button/index.d.ts.map b/packages/components/declarations/components/hds/button/index.d.ts.map new file mode 100644 index 0000000000..e4da67e5f5 --- /dev/null +++ b/packages/components/declarations/components/hds/button/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/button/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,2BAA2B,EAC5B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACvB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,KAAK,EAAE,MAAM,EAAuC,CAAC;AAClE,eAAO,MAAM,MAAM,EAAE,MAAM,EAAwC,CAAC;AACpE,eAAO,MAAM,aAAa,EAAE,MAAM,EAEjC,CAAC;AACF,eAAO,MAAM,YAAY,6BAA6B,CAAC;AACvD,eAAO,MAAM,aAAa,+BAA+B,CAAC;AAC1D,eAAO,MAAM,oBAAoB,sCAAsC,CAAC;AAExE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,CAAC,EAAE,cAAc,CAAC;QACtB,KAAK,CAAC,EAAE,eAAe,CAAC;QACxB,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,YAAY,CAAC,EAAE,sBAAsB,CAAC;QACtC,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAClE;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CASjB;IAED;;;;;OAKG;IACH,IAAI,IAAI,IAAI,cAAc,CAWzB;IAED;;;;;OAKG;IACH,IAAI,KAAK,IAAI,eAAe,CAW3B;IAED,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,SAAS,CAOvD;IAED;;;;;OAKG;IACH,IAAI,UAAU,IAAI,OAAO,CAKxB;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,sBAAsB,CAWzC;IAED;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAM/C;IAED;;;;;OAKG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAyBvB;CA+EF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button/types.d.ts b/packages/components/declarations/components/hds/button/types.d.ts new file mode 100644 index 0000000000..1676009512 --- /dev/null +++ b/packages/components/declarations/components/hds/button/types.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsButtonSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsButtonSizes = `${HdsButtonSizeValues}`; +export declare enum HdsButtonColorValues { + Primary = "primary", + Secondary = "secondary", + Tertiary = "tertiary", + Critical = "critical" +} +export type HdsButtonColors = `${HdsButtonColorValues}`; +export declare enum HdsButtonIconPositionValues { + Leading = "leading", + Trailing = "trailing" +} +export type HdsButtonIconPositions = `${HdsButtonIconPositionValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/button/types.d.ts.map b/packages/components/declarations/components/hds/button/types.d.ts.map new file mode 100644 index 0000000000..38eae1fe62 --- /dev/null +++ b/packages/components/declarations/components/hds/button/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,mBAAmB;IAC7B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAEtD,oBAAY,oBAAoB;IAC9B,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,eAAe,GAAG,GAAG,oBAAoB,EAAE,CAAC;AAExD,oBAAY,2BAA2B;IACrC,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,sBAAsB,GAAG,GAAG,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/card/container.d.ts b/packages/components/declarations/components/hds/card/container.d.ts new file mode 100644 index 0000000000..242a739d5b --- /dev/null +++ b/packages/components/declarations/components/hds/card/container.d.ts @@ -0,0 +1,79 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsCardBackgroundValues, HdsCardLevelValues, HdsCardOverflowValues } from './types.ts'; +import type { HdsCardBackground, HdsCardLevel, HdsCardOverflow } from './types.ts'; +export declare const DEFAULT_LEVEL = HdsCardLevelValues.Base; +export declare const DEFAULT_BACKGROUND = HdsCardBackgroundValues.NeutralPrimary; +export declare const DEFAULT_OVERFLOW = HdsCardOverflowValues.Visible; +export declare const AVAILABLE_LEVELS: string[]; +export declare const AVAILABLE_BACKGROUNDS: string[]; +export declare const AVAILABLE_OVERFLOWS: string[]; +export interface HdsCardContainerSignature { + Args: { + level?: HdsCardLevel; + levelActive?: HdsCardLevel; + levelHover?: HdsCardLevel; + background?: HdsCardBackground; + hasBorder?: boolean; + overflow?: HdsCardOverflow; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsCardContainer extends Component { + /** + * Sets the "elevation" level for the component + * Accepted values: base, mid, high + * + * @param level + * @type {HdsCardLevel} + * @default 'base' + */ + get level(): HdsCardLevel; + /** + * Sets the "elevation" level for the component on ":hover" state + * Accepted values: base, mid, high + * + * @param levelHover + * @type {HdsCardLevel} + */ + get levelHover(): HdsCardLevel | undefined; + /** + * Sets the "elevation" level for the component on ":active" state + * Accepted values: base, mid, high + * + * @param levelActive + * @type {HdsCardLevel} + */ + get levelActive(): HdsCardLevel | undefined; + /** + * Sets the background for the component + * Accepted values: neutral-primary, neutral-secondary + * + * @param background + * @type {HdsCardBackground} + * @default 'base' + */ + get background(): HdsCardBackground; + /** + * Sets the level for the card + * Accepted values: visible, hidden + * + * @param overflow + * @type {HdsCardOverflow} + * @default 'visible' + */ + get overflow(): HdsCardOverflow; + /** + * Get the class names to apply to the component. + * @method Card#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=container.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/card/container.d.ts.map b/packages/components/declarations/components/hds/card/container.d.ts.map new file mode 100644 index 0000000000..bf90f9e504 --- /dev/null +++ b/packages/components/declarations/components/hds/card/container.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"container.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/card/container.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACtB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,iBAAiB,EACjB,YAAY,EACZ,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,aAAa,0BAA0B,CAAC;AACrD,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AACzE,eAAO,MAAM,gBAAgB,gCAAgC,CAAC;AAC9D,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAsC,CAAC;AAC5E,eAAO,MAAM,qBAAqB,EAAE,MAAM,EAEzC,CAAC;AACF,eAAO,MAAM,mBAAmB,EAAE,MAAM,EAEvC,CAAC;AAEF,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,WAAW,CAAC,EAAE,YAAY,CAAC;QAC3B,UAAU,CAAC,EAAE,YAAY,CAAC;QAC1B,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,eAAe,CAAC;KAC5B,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IAChF;;;;;;;OAOG;IACH,IAAI,KAAK,IAAI,YAAY,CAWxB;IAED;;;;;;OAMG;IACH,IAAI,UAAU,IAAI,YAAY,GAAG,SAAS,CAazC;IAED;;;;;;OAMG;IACH,IAAI,WAAW,IAAI,YAAY,GAAG,SAAS,CAa1C;IAED;;;;;;;OAOG;IACH,IAAI,UAAU,IAAI,iBAAiB,CAWlC;IAED;;;;;;;OAOG;IACH,IAAI,QAAQ,IAAI,eAAe,CAW9B;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CA+BvB;CAaF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/card/types.d.ts b/packages/components/declarations/components/hds/card/types.d.ts new file mode 100644 index 0000000000..4ec5ad53d7 --- /dev/null +++ b/packages/components/declarations/components/hds/card/types.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsCardBackgroundValues { + NeutralPrimary = "neutral-primary", + NeutralSecondary = "neutral-secondary" +} +export type HdsCardBackground = HdsCardBackgroundValues.NeutralSecondary | HdsCardBackgroundValues.NeutralPrimary; +export declare enum HdsCardLevelValues { + Base = "base", + Mid = "mid", + High = "high" +} +export type HdsCardLevel = HdsCardLevelValues.Base | HdsCardLevelValues.Mid | HdsCardLevelValues.High; +export declare enum HdsCardOverflowValues { + Hidden = "hidden", + Visible = "visible" +} +export type HdsCardOverflow = HdsCardOverflowValues.Hidden | HdsCardOverflowValues.Visible; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/card/types.d.ts.map b/packages/components/declarations/components/hds/card/types.d.ts.map new file mode 100644 index 0000000000..7f7c7daf51 --- /dev/null +++ b/packages/components/declarations/components/hds/card/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/card/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,uBAAuB;IACjC,cAAc,oBAAoB;IAClC,gBAAgB,sBAAsB;CACvC;AAED,MAAM,MAAM,iBAAiB,GACzB,uBAAuB,CAAC,gBAAgB,GACxC,uBAAuB,CAAC,cAAc,CAAC;AAE3C,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,MAAM,MAAM,YAAY,GACpB,kBAAkB,CAAC,IAAI,GACvB,kBAAkB,CAAC,GAAG,GACtB,kBAAkB,CAAC,IAAI,CAAC;AAE5B,oBAAY,qBAAqB;IAC/B,MAAM,WAAW;IACjB,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,eAAe,GACvB,qBAAqB,CAAC,MAAM,GAC5B,qBAAqB,CAAC,OAAO,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/copy-button.d.ts b/packages/components/declarations/components/hds/code-block/copy-button.d.ts new file mode 100644 index 0000000000..e69174d8ba --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/copy-button.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsCopyButtonSignature } from '../copy/button'; +export interface HdsCodeBlockCopyButtonSignature { + Args: { + targetToCopy?: HdsCopyButtonSignature['Args']['targetToCopy']; + }; + Blocks: { + default: []; + }; + Element: HdsCopyButtonSignature['Element']; +} +declare const HdsCodeBlockCopyButton: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsCodeBlockCopyButton; +//# sourceMappingURL=copy-button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/copy-button.d.ts.map b/packages/components/declarations/components/hds/code-block/copy-button.d.ts.map new file mode 100644 index 0000000000..f822e3770d --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/copy-button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"copy-button.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/code-block/copy-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,YAAY,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC;KAC/D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,sBAAsB,CAAC,SAAS,CAAC,CAAC;CAC5C;AAED,QAAA,MAAM,sBAAsB,iGAC8B,CAAC;AAE3D,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/description.d.ts b/packages/components/declarations/components/hds/code-block/description.d.ts new file mode 100644 index 0000000000..9202db52d2 --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/description.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextBodySignature } from '../text/body'; +export interface HdsCodeBlockDescriptionSignature { + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +declare const HdsCodeBlockDescription: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsCodeBlockDescription; +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/description.d.ts.map b/packages/components/declarations/components/hds/code-block/description.d.ts.map new file mode 100644 index 0000000000..cbe6ee78ee --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/code-block/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,gCAAgC;IAC/C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,uBAAuB,kGAC8B,CAAC;AAE5D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/index.d.ts b/packages/components/declarations/components/hds/code-block/index.d.ts new file mode 100644 index 0000000000..79389088a8 --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/index.d.ts @@ -0,0 +1,95 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsCodeBlockTitleSignature } from './title'; +import type { HdsCodeBlockDescriptionSignature } from './description'; +import type { HdsCodeBlockLanguages } from './types.ts'; +import 'prismjs/plugins/line-numbers/prism-line-numbers'; +import 'prismjs/plugins/line-highlight/prism-line-highlight'; +import 'prismjs/components/prism-bash'; +import 'prismjs/components/prism-go'; +import 'prismjs/components/prism-hcl'; +import 'prismjs/components/prism-json'; +import 'prismjs/components/prism-log'; +import 'prismjs/components/prism-ruby'; +import 'prismjs/components/prism-shell-session'; +import 'prismjs/components/prism-yaml'; +import 'prismjs/components/prism-markup-templating'; +import 'prismjs/components/prism-handlebars'; +export declare const LANGUAGES: string[]; +export interface HdsCodeBlockSignature { + Args: { + hasCopyButton?: boolean; + hasLineNumbers?: boolean; + hasLineWrapping?: boolean; + highlightLines?: string; + lineNumberStart?: number; + isStandalone?: boolean; + language?: HdsCodeBlockLanguages; + maxHeight?: string; + value: string; + }; + Blocks: { + default: [ + { + Title?: ComponentLike; + Description?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsCodeBlock extends Component { + private _prismCode; + /** + * Generates a unique ID for the code content + * + * @param _preCodeId + */ + private _preCodeId; + /** + * @param code + * @type {string} + * @description code text content for the CodeBlock + */ + get code(): string; + /** + * @param language + * @type {string} + * @default undefined + * @description name of coding language used within CodeBlock for syntax highlighting + */ + get language(): HdsCodeBlockLanguages | undefined; + /** + * @param hasLineNumbers + * @type {boolean} + * @default true + * @description Displays line numbers if true + */ + get hasLineNumbers(): boolean; + /** + * @param isStandalone + * @type {boolean} + * @default true + * @description Make CodeBlock container corners appear rounded + */ + get isStandalone(): boolean; + /** + * @param hasLineWrapping + * @type {boolean} + * @default false + * @description Make text content wrap on multiple lines + */ + get hasLineWrapping(): boolean; + setPrismCode(element: HTMLElement): void; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/index.d.ts.map b/packages/components/declarations/components/hds/code-block/index.d.ts.map new file mode 100644 index 0000000000..d996fae080 --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/code-block/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAW3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,eAAe,CAAC;AAEtE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAExD,OAAO,iDAAiD,CAAC;AACzD,OAAO,qDAAqD,CAAC;AAE7D,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AACrC,OAAO,8BAA8B,CAAC;AACtC,OAAO,+BAA+B,CAAC;AACvC,OAAO,8BAA8B,CAAC;AACtC,OAAO,+BAA+B,CAAC;AACvC,OAAO,wCAAwC,CAAC;AAChD,OAAO,+BAA+B,CAAC;AAKvC,OAAO,4CAA4C,CAAC;AACpD,OAAO,qCAAqC,CAAC;AAE7C,eAAO,MAAM,SAAS,EAAE,MAAM,EAA8C,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;QACjC,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBAClD,WAAW,CAAC,EAAE,aAAa,CAAC,gCAAgC,CAAC,CAAC;aAC/D;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IAC/D,OAAO,CAAC,UAAU,CAA4B;IAEvD;;;;OAIG;IACH,OAAO,CAAC,UAAU,CAA+B;IAEjD;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAajB;IAED;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,qBAAqB,GAAG,SAAS,CAEhD;IAED;;;;;OAKG;IACH,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED;;;;;OAKG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAGD,YAAY,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAmCxC;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAuBvB;CAuDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/title.d.ts b/packages/components/declarations/components/hds/code-block/title.d.ts new file mode 100644 index 0000000000..85e3c7ed8f --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/title.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsCodeBlockTitleTags } from './types'; +import type { HdsTextBodySignature } from '../text/body'; +export interface HdsCodeBlockTitleSignature { + Args: { + tag?: HdsCodeBlockTitleTags; + }; + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsCodeBlockTitle extends Component { + get componentTag(): HdsCodeBlockTitleTags; +} +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/title.d.ts.map b/packages/components/declarations/components/hds/code-block/title.d.ts.map new file mode 100644 index 0000000000..0385a55526 --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/code-block/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,GAAG,CAAC,EAAE,qBAAqB,CAAC;KAC7B,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF,IAAI,YAAY,IAAI,qBAAqB,CAExC;CAiBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/types.d.ts b/packages/components/declarations/components/hds/code-block/types.d.ts new file mode 100644 index 0000000000..82cb845a2f --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/types.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsCodeBlockLanguageValues { + Bash = "bash", + Go = "go", + Hcl = "hcl", + Json = "json", + Log = "log", + Ruby = "ruby", + ShellSession = "shell-session", + Yaml = "yaml" +} +export type HdsCodeBlockLanguages = `${HdsCodeBlockLanguageValues}`; +export declare enum HdsCodeBlockTitleTagValues { + P = "p", + H1 = "h1", + H2 = "h2", + H3 = "h3", + H4 = "h4", + H5 = "h5", + H6 = "h6" +} +export type HdsCodeBlockTitleTags = `${HdsCodeBlockTitleTagValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/code-block/types.d.ts.map b/packages/components/declarations/components/hds/code-block/types.d.ts.map new file mode 100644 index 0000000000..e8b4825379 --- /dev/null +++ b/packages/components/declarations/components/hds/code-block/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/code-block/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,YAAY,kBAAkB;IAC9B,IAAI,SAAS;CACd;AAED,MAAM,MAAM,qBAAqB,GAAG,GAAG,0BAA0B,EAAE,CAAC;AAEpE,oBAAY,0BAA0B;IACpC,CAAC,MAAM;IACP,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,MAAM,qBAAqB,GAAG,GAAG,0BAA0B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/button/index.d.ts b/packages/components/declarations/components/hds/copy/button/index.d.ts new file mode 100644 index 0000000000..b01e8885c2 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/button/index.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsCopyButtonSizeValues } from './types.ts'; +import type { HdsCopyButtonSizes } from './types.ts'; +import type { HdsButtonSignature } from '../../button/'; +import type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts'; +import type { HdsIconSignature } from '../../icon'; +export declare const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium; +export declare const SIZES: string[]; +export declare const DEFAULT_ICON = "clipboard-copy"; +export declare const SUCCESS_ICON = "clipboard-checked"; +export declare const ERROR_ICON = "clipboard-x"; +export declare const DEFAULT_STATUS = "idle"; +export interface HdsCopyButtonSignature { + Args: HdsButtonSignature['Args'] & { + size?: HdsCopyButtonSizes; + textToCopy?: HdsClipboardModifierSignature['Args']['Named']['text']; + targetToCopy?: HdsClipboardModifierSignature['Args']['Named']['target']; + onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess']; + onError?: HdsClipboardModifierSignature['Args']['Named']['onError']; + }; + Element: HdsButtonSignature['Element']; +} +export default class HdsCopyButton extends Component { + private _status; + private _timer; + /** + * @param icon + * @type {string} + * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`. + */ + get icon(): HdsIconSignature['Args']['name']; + /** + * @param size + * @type {string} + * @default medium + * @description The size of the copy/button; acceptable values are `small` and `medium` + */ + get size(): HdsCopyButtonSizes; + /** + * Get the class names to apply to the component. + * @method CopyButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + onSuccess(args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']): void; + onError(args: HdsClipboardModifierSignature['Args']['Named']['onError']): void; + resetStatusDelayed(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/button/index.d.ts.map b/packages/components/declarations/components/hds/copy/button/index.d.ts.map new file mode 100644 index 0000000000..463cbf49a7 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/button/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/copy/button/index.ts"],"names":[],"mappings":"AAAA;;;GAGG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CAAC,MAAM,CAA4C;IAEnE;;;;OAIG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAQ3C;IAED;;;;;OAKG;IACH,IAAI,IAAI,IAAI,kBAAkB,CAW7B;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;IAGD,SAAS,CACP,IAAI,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,GAChE,IAAI;IAYP,OAAO,CACL,IAAI,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,GAC9D,IAAI;IAWP,kBAAkB,IAAI,IAAI;CAmB3B"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/button/types.d.ts b/packages/components/declarations/components/hds/copy/button/types.d.ts new file mode 100644 index 0000000000..68a84af952 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/button/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsCopyButtonSizeValues { + Small = "small", + Medium = "medium" +} +export type HdsCopyButtonSizes = `${HdsCopyButtonSizeValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/button/types.d.ts.map b/packages/components/declarations/components/hds/copy/button/types.d.ts.map new file mode 100644 index 0000000000..237cc1f679 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/button/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/copy/button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,uBAAuB;IACjC,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,kBAAkB,GAAG,GAAG,uBAAuB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/snippet/index.d.ts b/packages/components/declarations/components/hds/copy/snippet/index.d.ts new file mode 100644 index 0000000000..6ccf0a9245 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/snippet/index.d.ts @@ -0,0 +1,73 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsCopySnippetColorValues } from './types.ts'; +import type { HdsCopySnippetColors } from './types.ts'; +import type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts'; +import type { HdsIconSignature } from '../../icon'; +export declare const DEFAULT_COLOR = HdsCopySnippetColorValues.Primary; +export declare const COLORS: string[]; +export declare const DEFAULT_ICON = "clipboard-copy"; +export declare const SUCCESS_ICON = "clipboard-checked"; +export declare const ERROR_ICON = "clipboard-x"; +export declare const DEFAULT_STATUS = "idle"; +export interface HdsCopySnippetSignature { + Args: { + color?: HdsCopySnippetColors; + isFullWidth?: boolean; + textToCopy: HdsClipboardModifierSignature['Args']['Named']['text']; + isTruncated?: boolean; + onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess']; + onError?: HdsClipboardModifierSignature['Args']['Named']['onError']; + }; + Element: HTMLButtonElement; +} +export default class HdsCopySnippet extends Component { + private _status; + private _timer; + /** + * @method textToShow + * @return {string} + */ + get textToShow(): string; + /** + * @param icon + * @type {string} + * @default clipboard-copy + * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status). + */ + get icon(): HdsIconSignature['Args']['name']; + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary` and `secondary` + */ + get color(): HdsCopySnippetColors; + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that the component should take up the full width of the parent container. + */ + get isFullWidth(): boolean; + /** + * @param isTruncated + * @type {boolean} + * @default false + * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines. + */ + get isTruncated(): boolean; + /** + * Get the class names to apply to the component. + * @method CopySnippet#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + onSuccess(args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']): void; + onError(args: HdsClipboardModifierSignature['Args']['Named']['onError']): void; + resetStatusDelayed(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/snippet/index.d.ts.map b/packages/components/declarations/components/hds/copy/snippet/index.d.ts.map new file mode 100644 index 0000000000..79d14591a5 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/snippet/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/copy/snippet/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AAC5F,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,eAAO,MAAM,aAAa,oCAAoC,CAAC;AAC/D,eAAO,MAAM,MAAM,EAAE,MAAM,EAA6C,CAAC;AAEzE,eAAO,MAAM,YAAY,mBAAmB,CAAC;AAC7C,eAAO,MAAM,YAAY,sBAAsB,CAAC;AAChD,eAAO,MAAM,UAAU,gBAAgB,CAAC;AACxC,eAAO,MAAM,cAAc,SAAS,CAAC;AAErC,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,oBAAoB,CAAC;QAC7B,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,UAAU,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC;QACnE,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,SAAS,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC;QACxE,OAAO,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;KACrE,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IACnE,OAAO,CAAC,OAAO,CAAkB;IACjC,OAAO,CAAC,MAAM,CAA4C;IAEnE;;;OAGG;IACH,IAAI,UAAU,IAAI,MAAM,CAQvB;IAED;;;;;OAKG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAQ3C;IAED;;;;;OAKG;IACH,IAAI,KAAK,IAAI,oBAAoB,CAWhC;IAED;;;;;OAKG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;;OAKG;IACH,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAoBvB;IAGD,SAAS,CACP,IAAI,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,GAChE,IAAI;IAYP,OAAO,CACL,IAAI,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,GAC9D,IAAI;IAWP,kBAAkB,IAAI,IAAI;CAsC3B"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/snippet/types.d.ts b/packages/components/declarations/components/hds/copy/snippet/types.d.ts new file mode 100644 index 0000000000..2e1922d663 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/snippet/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsCopySnippetColorValues { + Primary = "primary", + Secondary = "secondary" +} +export type HdsCopySnippetColors = `${HdsCopySnippetColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/copy/snippet/types.d.ts.map b/packages/components/declarations/components/hds/copy/snippet/types.d.ts.map new file mode 100644 index 0000000000..50854d21a0 --- /dev/null +++ b/packages/components/declarations/components/hds/copy/snippet/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/copy/snippet/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AACD,MAAM,MAAM,oBAAoB,GAAG,GAAG,yBAAyB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/body.d.ts b/packages/components/declarations/components/hds/dialog-primitive/body.d.ts new file mode 100644 index 0000000000..fae3937e3d --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/body.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDialogPrimitiveBodySignature { + Args: { + contextualClass?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsDialogPrimitiveBody: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDialogPrimitiveBody; +//# sourceMappingURL=body.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/body.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/body.d.ts.map new file mode 100644 index 0000000000..0db168361e --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/body.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,sBAAsB,iGAC8B,CAAC;AAE3D,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/description.d.ts b/packages/components/declarations/components/hds/dialog-primitive/description.d.ts new file mode 100644 index 0000000000..fea79ceacd --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/description.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDialogPrimitiveDescriptionSignature { + Args: { + contextualClass?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsDialogPrimitiveDescription: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDialogPrimitiveDescription; +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/description.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/description.d.ts.map new file mode 100644 index 0000000000..2e130bab03 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,6BAA6B,wGAC8B,CAAC;AAElE,eAAe,6BAA6B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts b/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts new file mode 100644 index 0000000000..e02d58b726 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsDialogPrimitiveFooterSignature { + Args: { + contextualClass?: string; + onDismiss?: (event: MouseEvent, ...args: any[]) => void; + }; + Blocks: { + default: [ + { + close: (event: MouseEvent, ...args: any[]) => void; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsDialogPrimitiveFooter extends Component { + get onDismiss(): (event: MouseEvent, ...args: any[]) => void; +} +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts.map new file mode 100644 index 0000000000..10f1f51a4e --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;QAEzB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KACzD,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBAEE,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;aACpD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAID,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IAEhG,IAAI,SAAS,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAU3D;CAeF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/header.d.ts b/packages/components/declarations/components/hds/dialog-primitive/header.d.ts new file mode 100644 index 0000000000..1594440ae8 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/header.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../icon'; +import type { HdsDialogPrimitiveHeaderTitleTags } from './types'; +export interface HdsDialogPrimitiveHeaderSignature { + Args: { + contextualClassPrefix?: string; + id?: string; + icon?: HdsIconSignature['Args']['name']; + onDismiss?: (event: MouseEvent, ...args: any[]) => void; + titleTag?: HdsDialogPrimitiveHeaderTitleTags; + tagline?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsDialogPrimitiveHeader extends Component { + get titleTag(): HdsDialogPrimitiveHeaderTitleTags; + /** + * @param onDismiss + * @type {function} + * @default () => {} + */ + get onDismiss(): (event: MouseEvent, ...args: any[]) => void; +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/header.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/header.d.ts.map new file mode 100644 index 0000000000..0f109f3cff --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,SAAS,CAAC;AAGjE,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE;QACJ,qBAAqB,CAAC,EAAE,MAAM,CAAC;QAC/B,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAExC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QACxD,QAAQ,CAAC,EAAE,iCAAiC,CAAC;QAC7C,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAID,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IAChG,IAAI,QAAQ,IAAI,iCAAiC,CAEhD;IAED;;;;OAIG;IAEH,IAAI,SAAS,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAU3D;CAmEF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts b/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts new file mode 100644 index 0000000000..1a231f2981 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDialogPrimitiveOverlaySignature { + Args: { + contextualClass?: string; + }; + Element: HTMLDivElement; +} +declare const HdsDialogPrimitiveOverlay: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDialogPrimitiveOverlay; +//# sourceMappingURL=overlay.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts.map new file mode 100644 index 0000000000..e0e99c359a --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/overlay.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"overlay.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/overlay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,yBAAyB,oGAC8B,CAAC;AAE9D,eAAe,yBAAyB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/types.d.ts b/packages/components/declarations/components/hds/dialog-primitive/types.d.ts new file mode 100644 index 0000000000..19685d8562 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/types.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsDialogPrimitiveHeaderTitleTagValues { + Div = "div", + H1 = "h1", + H2 = "h2", + H3 = "h3", + H4 = "h4", + H5 = "h5", + H6 = "h6" +} +export type HdsDialogPrimitiveHeaderTitleTags = `${HdsDialogPrimitiveHeaderTitleTagValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/types.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/types.d.ts.map new file mode 100644 index 0000000000..e3d0f34b50 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,sCAAsC;IAChD,GAAG,QAAQ;IACX,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;IACT,EAAE,OAAO;CACV;AAED,MAAM,MAAM,iCAAiC,GAC3C,GAAG,sCAAsC,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts b/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts new file mode 100644 index 0000000000..7805deb528 --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDialogPrimitiveWrapperSignature { + Blocks: { + header?: []; + body?: []; + footer?: []; + }; + Element: HTMLDialogElement; +} +declare const HdsDialogPrimitiveWrapper: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDialogPrimitiveWrapper; +//# sourceMappingURL=wrapper.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts.map b/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts.map new file mode 100644 index 0000000000..d95a8f7a9e --- /dev/null +++ b/packages/components/declarations/components/hds/dialog-primitive/wrapper.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapper.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dialog-primitive/wrapper.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,kCAAkC;IACjD,MAAM,EAAE;QACN,MAAM,CAAC,EAAE,EAAE,CAAC;QACZ,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,MAAM,CAAC,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,QAAA,MAAM,yBAAyB,oGAC8B,CAAC;AAE9D,eAAe,yBAAyB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts b/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts new file mode 100644 index 0000000000..ed93276a6d --- /dev/null +++ b/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsDisclosurePrimitiveSignature { + Args: { + isOpen?: boolean; + onClose?: (...args: any[]) => void; + onClickToggle?: (...args: any[]) => void; + }; + Blocks: { + toggle: [ + { + isOpen: boolean; + onClickToggle: (...args: any[]) => void; + } + ]; + content: [ + { + close: (...args: any[]) => void; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsDisclosurePrimitive extends Component { + private _isOpen; + private _isControlled; + get isOpen(): boolean; + set isOpen(value: boolean); + onClickToggle(): void; + onStateChange(): void; + close(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts.map b/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts.map new file mode 100644 index 0000000000..6e85397537 --- /dev/null +++ b/packages/components/declarations/components/hds/disclosure-primitive/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/disclosure-primitive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,OAAO,CAAC;QAEjB,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAEnC,aAAa,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAC1C,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE;YACN;gBACE,MAAM,EAAE,OAAO,CAAC;gBAEhB,aAAa,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;aACzC;SACF,CAAC;QACF,OAAO,EAAE;YACP;gBAEE,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;aACjC;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IACnF,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,aAAa,CAAkC;IAEhE,IAAI,MAAM,IAAI,OAAO,CAQpB;IAED,IAAI,MAAM,CAAC,KAAK,EAVF,OAUE,EAEf;IAGD,aAAa,IAAI,IAAI;IAarB,aAAa,IAAI,IAAI;IAQrB,KAAK,IAAI,IAAI;CA4Cd"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dismiss-button/index.d.ts b/packages/components/declarations/components/hds/dismiss-button/index.d.ts new file mode 100644 index 0000000000..e099b86cd3 --- /dev/null +++ b/packages/components/declarations/components/hds/dismiss-button/index.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsDismissButtonSignature { + Args: { + ariaLabel?: string; + }; + Element: HTMLButtonElement; +} +export default class HdsDismissButton extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Dismiss' + */ + get ariaLabel(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dismiss-button/index.d.ts.map b/packages/components/declarations/components/hds/dismiss-button/index.d.ts.map new file mode 100644 index 0000000000..698d15f1fb --- /dev/null +++ b/packages/components/declarations/components/hds/dismiss-button/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dismiss-button/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IAChF;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAEtB;CAkBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/footer.d.ts b/packages/components/declarations/components/hds/dropdown/footer.d.ts new file mode 100644 index 0000000000..2719884e92 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/footer.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDropdownFooterSignature { + Args: { + hasDivider?: boolean; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsDropdownFooter: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDropdownFooter; +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/footer.d.ts.map b/packages/components/declarations/components/hds/dropdown/footer.d.ts.map new file mode 100644 index 0000000000..383b4dce95 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dropdown/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/header.d.ts b/packages/components/declarations/components/hds/dropdown/header.d.ts new file mode 100644 index 0000000000..f3ed380f51 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/header.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDropdownHeaderSignature { + Args: { + hasDivider?: boolean; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsDropdownHeader: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDropdownHeader; +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/header.d.ts.map b/packages/components/declarations/components/hds/dropdown/header.d.ts.map new file mode 100644 index 0000000000..2207192994 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dropdown/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/index.d.ts b/packages/components/declarations/components/hds/dropdown/index.d.ts new file mode 100644 index 0000000000..e1b6a4f9cb --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/index.d.ts @@ -0,0 +1,89 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsDropdownPositionValues } from './types.ts'; +import type { ComponentLike } from '@glint/template'; +import type { MenuPrimitiveSignature } from '../menu-primitive'; +import type { HdsDropdownFooterSignature } from './footer'; +import type { HdsDropdownHeaderSignature } from './header'; +import type { HdsDropdownListItemCheckboxSignature } from './list-item/checkbox'; +import type { HdsDropdownListItemCheckmarkSignature } from './list-item/checkmark'; +import type { HdsDropdownListItemCopyItemSignature } from './list-item/copy-item'; +import type { HdsDropdownListItemDescriptionSignature } from './list-item/description'; +import type { HdsDropdownListItemGenericSignature } from './list-item/generic'; +import type { HdsDropdownListItemInteractiveSignature } from './list-item/interactive'; +import type { HdsDropdownListItemRadioSignature } from './list-item/radio'; +import type { HdsDropdownListItemSeparatorSignature } from './list-item/separator'; +import type { HdsDropdownListItemTitleSignature } from './list-item/title'; +import type { HdsDropdownToggleButtonSignature } from './toggle/button'; +import type { HdsDropdownToggleIconSignature } from './toggle/icon'; +import type { HdsDropdownPositions } from './types'; +import type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts'; +export declare const DEFAULT_POSITION = HdsDropdownPositionValues.BottomRight; +export declare const POSITIONS: string[]; +export interface HdsDropdownSignature { + Args: MenuPrimitiveSignature['Args'] & { + height?: string; + isInline?: boolean; + isOpen?: boolean; + listPosition?: HdsDropdownPositions; + width?: string; + enableCollisionDetection?: FloatingUIOptions['enableCollisionDetection']; + preserveContentInDom?: boolean; + matchToggleWidth?: boolean; + }; + Blocks: { + default: [ + { + Footer?: ComponentLike; + Header?: ComponentLike; + Checkbox?: ComponentLike; + Checkmark?: ComponentLike; + CopyItem?: ComponentLike; + Description?: ComponentLike; + Generic?: ComponentLike; + Interactive?: ComponentLike; + Radio?: ComponentLike; + Separator?: ComponentLike; + Title?: ComponentLike; + ToggleButton?: ComponentLike; + ToggleIcon?: ComponentLike; + close?: () => void; + } + ]; + }; + Element: MenuPrimitiveSignature['Element']; +} +export default class HdsDropdown extends Component { + /** + * @param listPosition + * @type {string} + * @default bottom-right + * @description Determines the position of the "list" + */ + get listPosition(): HdsDropdownPositions; + get enableCollisionDetection(): FloatingUIOptions['enableCollisionDetection']; + get matchToggleWidth(): FloatingUIOptions['matchToggleWidth']; + get anchoredPositionOptions(): { + placement: FloatingUIOptions['placement']; + offsetOptions: FloatingUIOptions['offsetOptions']; + enableCollisionDetection: FloatingUIOptions['enableCollisionDetection']; + matchToggleWidth: FloatingUIOptions['matchToggleWidth']; + }; + /** + * Get the class names to apply to the element + * @method classNames + * @return {string} The "class" attribute to apply to the root element + */ + get classNames(): string; + /** + * Get the class names to apply to the content + * @method classNamesContent + * @return {string} The "class" attribute to apply to the disclosed content + */ + get classNamesContent(): string; + didInsertList(element: HTMLUListElement): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/index.d.ts.map b/packages/components/declarations/components/hds/dropdown/index.d.ts.map new file mode 100644 index 0000000000..125e787f8f --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dropdown/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAIL,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,sBAAsB,CAAC;AACjF,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,uBAAuB,CAAC;AAClF,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,yBAAyB,CAAC;AACvF,OAAO,KAAK,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,IAAI;CA4E/C"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts new file mode 100644 index 0000000000..8424359565 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsFormCheckboxBaseSignature } from '../../form/checkbox/base.ts'; +export interface HdsDropdownListItemCheckboxSignature { + Args: HdsFormCheckboxBaseSignature['Args'] & { + count?: string | number; + icon?: HdsIconSignature['Args']['name']; + }; + Blocks: { + default: []; + }; + Element: HdsFormCheckboxBaseSignature['Element']; +} +export default class HdsDropdownListItemCheckbox extends Component { + /** + * Determines the unique ID to assign to the checkbox control + */ + get id(): string; +} +//# sourceMappingURL=checkbox.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts.map new file mode 100644 index 0000000000..0c4a3c6767 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/checkbox.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/checkbox.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,6BAA6B,CAAC;AAEhF,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC,GAAG;QAC3C,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;CAClD;AAED,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,SAAS,CAAC,oCAAoC,CAAC;IACtG;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;CAsDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts new file mode 100644 index 0000000000..dc1348e9a5 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive'; +export interface HdsDropdownListItemCheckmarkSignature { + Args: HdsInteractiveSignature['Args'] & { + count?: string | number; + icon?: HdsIconSignature['Args']['name']; + selected?: boolean; + }; + Blocks: { + default: []; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsDropdownListItemCheckmark extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=checkmark.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts.map new file mode 100644 index 0000000000..087763d122 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/checkmark.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"checkmark.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/checkmark.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,SAAS,CAAC,qCAAqC,CAAC;IACxG;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAavB;CA2EF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts new file mode 100644 index 0000000000..576b7fd4f7 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsCopySnippetSignature } from '../../copy/snippet'; +export interface HdsDropdownListItemCopyItemSignature { + Args: { + copyItemTitle?: string; + isTruncated?: HdsCopySnippetSignature['Args']['isTruncated']; + text: HdsCopySnippetSignature['Args']['textToCopy']; + }; + Element: HTMLLIElement; +} +export default class HdsDropdownListItemCopyItem extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text(): HdsCopySnippetSignature['Args']['textToCopy']; + /** + * @param isTruncated + * @type {boolean} + * @default true + * @description Indicates that the text should be truncated instead of wrapping and using multiple lines. + */ + get isTruncated(): HdsCopySnippetSignature['Args']['isTruncated']; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=copy-item.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts.map new file mode 100644 index 0000000000..2642e23534 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/copy-item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"copy-item.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/copy-item.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,oCAAoC;IACnD,IAAI,EAAE;QACJ,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC;QAC7D,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KACrD,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,SAAS,CAAC,oCAAoC,CAAC;IACtG;;;;OAIG;IACH,IAAI,IAAI,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CASxD;IAED;;;;;OAKG;IACH,IAAI,WAAW,IAAI,uBAAuB,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAIhE;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAOvB;CA6BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts new file mode 100644 index 0000000000..e557b4b28f --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsDropdownListItemDescriptionSignature { + Args: { + text: string; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsDropdownListItemDescription extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text(): string; +} +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts.map new file mode 100644 index 0000000000..c9d4b92f19 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,uCAAuC;IACtD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,SAAS,CAAC,uCAAuC,CAAC;IAC5G;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CASjB;CAiBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts new file mode 100644 index 0000000000..5f1a8dd8c9 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDropdownListItemGenericSignature { + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +declare const HdsDropdownListItemGeneric: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDropdownListItemGeneric; +//# sourceMappingURL=generic.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts.map new file mode 100644 index 0000000000..d1a2dd68c7 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/generic.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/generic.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,mCAAmC;IAClD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,0BAA0B,qGAC8B,CAAC;AAE/D,eAAe,0BAA0B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts new file mode 100644 index 0000000000..432b6f23d0 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts @@ -0,0 +1,40 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsDropdownListItemInteractiveColorValues } from './types.ts'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive'; +import type { HdsDropdownListItemInteractiveColors } from './types.ts'; +import type { ComponentLike } from '@glint/template'; +import type { HdsBadgeSignature } from '../../badge/index.ts'; +export declare const DEFAULT_COLOR = HdsDropdownListItemInteractiveColorValues.Action; +export declare const COLORS: string[]; +export interface HdsDropdownListItemInteractiveSignature { + Args: HdsInteractiveSignature['Args'] & { + color?: HdsDropdownListItemInteractiveColors; + icon?: HdsIconSignature['Args']['name']; + isLoading?: boolean; + /** + * @deprecated The `@text` argument for "Hds::Dropdown::ListItem::Interactive" has been deprecated. Please put text in the yielded block. See: https://helios.hashicorp.design/components/dropdown?tab=version%20history#4100 + */ + text?: string; + trailingIcon?: HdsIconSignature['Args']['name']; + }; + Blocks: { + default?: [ + { + Badge?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement | HdsInteractiveSignature['Element']; +} +export default class HdsDropdownListItemInteractive extends Component { + constructor(owner: unknown, args: HdsDropdownListItemInteractiveSignature['Args']); + get text(): string; + get color(): HdsDropdownListItemInteractiveColors; + get classNames(): string; +} +//# sourceMappingURL=interactive.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts.map new file mode 100644 index 0000000000..a1177699c5 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/interactive.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/interactive.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,yCAAyC,EAAE,MAAM,YAAY,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,YAAY,CAAC;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,eAAO,MAAM,aAAa,mDAAmD,CAAC;AAC9E,eAAO,MAAM,MAAM,EAAE,MAAM,EAE1B,CAAC;AAEF,MAAM,WAAW,uCAAuC;IACtD,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,KAAK,CAAC,EAAE,oCAAoC,CAAC;QAC7C,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACjD,CAAC;IACF,MAAM,EAAE;QACN,OAAO,CAAC,EAAE;YACR;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC1C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,GAAG,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC9D;AAED,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,SAAS,CAAC,uCAAuC,CAAC;gBAE1G,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,uCAAuC,CAAC,MAAM,CAAC;IAsBvD,IAAI,IAAI,IAAI,MAAM,CASjB;IAED,IAAI,KAAK,IAAI,oCAAoC,CAWhD;IAED,IAAI,UAAU,IAAI,MAAM,CAUvB;CAiGF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts new file mode 100644 index 0000000000..ed2968c8ba --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsFormRadioBaseSignature } from '../../form/radio/base.ts'; +export interface HdsDropdownListItemRadioSignature { + Args: HdsFormRadioBaseSignature['Args'] & { + count?: string | number; + icon?: HdsIconSignature['Args']['name']; + }; + Blocks: { + default: []; + }; + Element: HdsFormRadioBaseSignature['Element']; +} +export default class HdsDropdownListItemRadio extends Component { + /** + * Determines the unique ID to assign to the radio control + */ + get id(): string; +} +//# sourceMappingURL=radio.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts.map new file mode 100644 index 0000000000..e79b84ab34 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/radio.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/radio.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1E,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,yBAAyB,CAAC,MAAM,CAAC,GAAG;QACxC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,yBAAyB,CAAC,SAAS,CAAC,CAAC;CAC/C;AAED,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IAChG;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;CA0DF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts new file mode 100644 index 0000000000..982a113b72 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDropdownListItemSeparatorSignature { + Element: HTMLLIElement; +} +declare const HdsDropdownListItemSeparator: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDropdownListItemSeparator; +//# sourceMappingURL=separator.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts.map new file mode 100644 index 0000000000..1432c977b5 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/separator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/separator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,qCAAqC;IACpD,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,4BAA4B,uGAC8B,CAAC;AAEjE,eAAe,4BAA4B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts new file mode 100644 index 0000000000..cd713775c5 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsDropdownListItemTitleSignature { + Args: { + text: string; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsDropdownListItemTitle extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text(): string; +} +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts.map new file mode 100644 index 0000000000..81217c5e78 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IAChG;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CASjB;CAiBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts b/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts new file mode 100644 index 0000000000..7bbf725835 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsDropdownListItemInteractiveColorValues { + Action = "action", + Critical = "critical" +} +export type HdsDropdownListItemInteractiveColors = `${HdsDropdownListItemInteractiveColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts.map b/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts.map new file mode 100644 index 0000000000..d6ded3f356 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/list-item/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/list-item/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,yCAAyC;IACnD,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,oCAAoC,GAC9C,GAAG,yCAAyC,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts b/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts new file mode 100644 index 0000000000..13d74f87fe --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts @@ -0,0 +1,80 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsDropdownToggleButtonSizeValues, HdsDropdownToggleButtonColorValues } from './types.ts'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsBadgeSignature } from '../../badge'; +import type { HdsBadgeCountSignature } from '../../badge-count'; +import type { HdsDropdownToggleButtonSizes, HdsDropdownToggleButtonColors } from './types'; +import type { ModifierLike } from '@glint/template'; +import type { SetupPrimitiveToggleModifier } from '../../popover-primitive/index.ts'; +export declare const DEFAULT_SIZE = HdsDropdownToggleButtonSizeValues.Medium; +export declare const DEFAULT_COLOR = HdsDropdownToggleButtonColorValues.Primary; +export declare const SIZES: string[]; +export declare const COLORS: string[]; +export interface HdsDropdownToggleButtonSignature { + Args: { + badge?: HdsBadgeSignature['Args']['text']; + badgeIcon?: HdsBadgeSignature['Args']['icon']; + color?: HdsDropdownToggleButtonColors; + count?: HdsBadgeCountSignature['Args']['text']; + icon?: HdsIconSignature['Args']['name']; + isFullWidth?: boolean; + isOpen?: boolean; + size?: HdsDropdownToggleButtonSizes; + text: string; + setupPrimitiveToggle?: ModifierLike; + }; + Element: HTMLButtonElement; +} +export default class HdsDropdownToggleButton extends Component { + /** + * Generates a unique ID for the button + * + * @param _toggleButtonId + */ + private _toggleButtonId; + /** + * @param text + * @type {string} + * @description The text of the button. If no text value is defined an error will be thrown. + */ + get text(): string; + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small` and `medium` + */ + get size(): HdsDropdownToggleButtonSizes; + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary` and `secondary` + */ + get color(): HdsDropdownToggleButtonColors; + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that a button should take up the full width of the parent container. The default is false. + */ + get isFullWidth(): boolean; + /** + * @param badgeType + * @type {string} + * @default 'filled' + * @description ensures that the correct Badge/BadgeCount type is used to meet contrast requirements + */ + get badgeType(): HdsBadgeCountSignature['Args']['type']; + /** + * Get the class names to apply to the component. + * @method ToggleButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts.map b/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts.map new file mode 100644 index 0000000000..e2d9e5f41f --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/toggle/button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,iCAAiC,EACjC,kCAAkC,EACnC,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EACV,4BAA4B,EAC5B,6BAA6B,EAC9B,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAErF,eAAO,MAAM,YAAY,2CAA2C,CAA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MAAM,CAoBvB;CAuDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts b/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts new file mode 100644 index 0000000000..7f12c03f95 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsDropdownToggleChevronSignature { + Element: HTMLDivElement; +} +declare const HdsDropdownToggleChevron: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsDropdownToggleChevron; +//# sourceMappingURL=chevron.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts.map b/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts.map new file mode 100644 index 0000000000..4921d6efc5 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/chevron.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"chevron.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/toggle/chevron.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,wBAAwB,mGAC8B,CAAC;AAE7D,eAAe,wBAAwB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts b/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts new file mode 100644 index 0000000000..58d8dfec90 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts @@ -0,0 +1,65 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsDropdownToggleIconSizeValues } from './types.ts'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsDropdownToggleIconSizes } from './types'; +import type { ModifierLike } from '@glint/template'; +import type { SetupPrimitiveToggleModifier } from '../../popover-primitive/index.ts'; +export declare const DEFAULT_SIZE = HdsDropdownToggleIconSizeValues.Medium; +export declare const SIZES: string[]; +export interface HdsDropdownToggleIconSignature { + Args: { + hasChevron?: boolean; + icon?: HdsIconSignature['Args']['name']; + imageSrc?: string; + isOpen?: boolean; + size?: HdsDropdownToggleIconSizes; + text: string; + setupPrimitiveToggle?: ModifierLike; + }; + Element: HTMLButtonElement; +} +export default class HdsDropdownToggleIcon extends Component { + private _hasImage; + constructor(owner: unknown, args: HdsDropdownToggleIconSignature['Args']); + onDidUpdateImageSrc(): void; + onImageLoadError(): void; + /** + * @param text + * @type {string} + * @description The text of the `aria-label` applied to the toggle + */ + get text(): string; + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small` and `medium` + */ + get size(): HdsDropdownToggleIconSizes; + /** + * @param iconSize + * @type {string} + * @default 24 + * @description ensures that the correct icon size is used + */ + get iconSize(): HdsIconSignature['Args']['size']; + /** + * Indicates if a dropdown chevron icon should be displayed; should be displayed unless the "more-horizontal" icon is used. + * + * @param hasChevron + * @type {boolean} + * @default true + */ + get hasChevron(): boolean; + /** + * Get the class names to apply to the component. + * @method ToggleIcon#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=icon.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts.map b/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts.map new file mode 100644 index 0000000000..9575da1c28 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/icon.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/toggle/icon.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,YAAY,CAAC;AAE7D,OAAO,KAAK,EAAE,gB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sDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts b/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts new file mode 100644 index 0000000000..f3dbdc9d2f --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsDropdownToggleIconSizeValues { + Small = "small", + Medium = "medium" +} +export type HdsDropdownToggleIconSizes = `${HdsDropdownToggleIconSizeValues}`; +export declare enum HdsDropdownToggleButtonSizeValues { + Small = "small", + Medium = "medium" +} +export type HdsDropdownToggleButtonSizes = `${HdsDropdownToggleButtonSizeValues}`; +export declare enum HdsDropdownToggleButtonColorValues { + Primary = "primary", + Secondary = "secondary" +} +export type HdsDropdownToggleButtonColors = `${HdsDropdownToggleButtonColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts.map b/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts.map new file mode 100644 index 0000000000..40263a0912 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/toggle/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/dropdown/toggle/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,+BAA+B;IACzC,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,0BAA0B,GAAG,GAAG,+BAA+B,EAAE,CAAC;AAE9E,oBAAY,iCAAiC;IAC3C,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AACD,MAAM,MAAM,4BAA4B,GACtC,GAAG,iCAAiC,EAAE,CAAC;AAEzC,oBAAY,kCAAkC;IAC5C,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AACD,MAAM,MAAM,6BAA6B,GACvC,GAAG,kCAAkC,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/types.d.ts b/packages/components/declarations/components/hds/dropdown/types.d.ts new file mode 100644 index 0000000000..884d81ef32 --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/types.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts'; +export declare enum HdsDropdownPositionValues { + BottomLeft = "bottom-left", + BottomRight = "bottom-right", + TopLeft = "top-left", + TopRight = "top-right" +} +export type HdsDropdownPositions = `${HdsDropdownPositionValues}`; +export declare const HdsDropdownPositionToPlacementValues: Record; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/dropdown/types.d.ts.map b/packages/components/declarations/components/hds/dropdown/types.d.ts.map new file mode 100644 index 0000000000..36e9f9ba2f --- /dev/null +++ b/packages/components/declarations/components/hds/dropdown/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/dropdown/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAErF,oBAAY,yBAAyB;IACnC,UAAU,gBAAgB;IAC1B,WAAW,iBAAiB;IAC5B,OAAO,aAAa;IACpB,QAAQ,cAAc;CACvB;AACD,MAAM,MAAM,oBAAoB,GAAG,GAAG,yBAAyB,EAAE,CAAC;AAGlE,eAAO,MAAM,oCAAoC,EAAE,MAAM,CAEvD,yBAAyB,EACzB,iBAAiB,CAAC,WAAW,CAAC,CAM/B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/body.d.ts b/packages/components/declarations/components/hds/flyout/body.d.ts new file mode 100644 index 0000000000..c41a1312d9 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/body.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsFlyoutBodySignature { + Args: never; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsFlyoutBody extends Component { + constructor(owner: unknown, args: HdsFlyoutBodySignature['Args']); +} +//# sourceMappingURL=body.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/body.d.ts.map b/packages/components/declarations/components/hds/flyout/body.d.ts.map new file mode 100644 index 0000000000..21700d7b84 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/body.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,sBAAsB;IAGrC,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;gBAC9D,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;CA6BjE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/description.d.ts b/packages/components/declarations/components/hds/flyout/description.d.ts new file mode 100644 index 0000000000..bb0133ab83 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/description.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../text/body'; +export interface HdsFlyoutDescriptionSignature { + Args: never; + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsFlyoutDescription extends Component { + constructor(owner: unknown, args: HdsFlyoutDescriptionSignature['Args']); +} +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/description.d.ts.map b/packages/components/declarations/components/hds/flyout/description.d.ts.map new file mode 100644 index 0000000000..e45e973df6 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAS,CAAC,6BAA6B,CAAC;gBAC5E,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,6BAA6B,CAAC,MAAM,CAAC;CAiCxE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/footer.d.ts b/packages/components/declarations/components/hds/flyout/footer.d.ts new file mode 100644 index 0000000000..ca9423d11c --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/footer.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsFlyoutFooterSignature { + Args: { + onDismiss?: (event: MouseEvent) => void; + }; + Blocks: { + default: [{ + close?: (event: MouseEvent) => void; + }]; + }; + Element: HTMLDivElement; +} +export default class HdsFlyoutFooter extends Component { + constructor(owner: unknown, args: HdsFlyoutFooterSignature['Args']); +} +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/footer.d.ts.map b/packages/components/declarations/components/hds/flyout/footer.d.ts.map new file mode 100644 index 0000000000..6ba747943e --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,CAAC;YAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;SAAE,CAAC,CAAC;KACpD,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,SAAS,CAAC,wBAAwB,CAAC;gBAClE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC;CA+BnE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/header.d.ts b/packages/components/declarations/components/hds/flyout/header.d.ts new file mode 100644 index 0000000000..cdbdc70b77 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/header.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../icon'; +export interface HdsFlyoutHeaderSignature { + Args: { + id?: string; + tagline?: string; + onDismiss: (event: MouseEvent) => void; + icon?: HdsIconSignature['Args']['name']; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsFlyoutHeader extends Component { + constructor(owner: unknown, args: HdsFlyoutHeaderSignature['Args']); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/header.d.ts.map b/packages/components/declarations/components/hds/flyout/header.d.ts.map new file mode 100644 index 0000000000..7e72fa0765 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,SAAS,CAAC,wBAAwB,CAAC;gBAClE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC;CAoEnE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/index.d.ts b/packages/components/declarations/components/hds/flyout/index.d.ts new file mode 100644 index 0000000000..3193d7ffac --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/index.d.ts @@ -0,0 +1,65 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { WithBoundArgs } from '@glint/template'; +import type { HdsFlyoutSizes } from './types.ts'; +import { HdsFlyoutSizesValues } from './types.ts'; +import HdsDialogPrimitiveBodyComponent from '../dialog-primitive/body.ts'; +import HdsDialogPrimitiveDescriptionComponent from '../dialog-primitive/description.ts'; +import HdsDialogPrimitiveFooterComponent from '../dialog-primitive/footer.ts'; +import HdsDialogPrimitiveHeaderComponent from '../dialog-primitive/header.ts'; +export declare const DEFAULT_SIZE = HdsFlyoutSizesValues.Medium; +export declare const DEFAULT_HAS_OVERLAY = true; +export declare const SIZES: string[]; +export interface HdsFlyoutSignature { + Args: { + size?: HdsFlyoutSizes; + returnFocusTo?: string; + onOpen?: () => void; + onClose?: (event: Event) => void; + }; + Blocks: { + default: [ + { + Header?: WithBoundArgs; + Description?: WithBoundArgs; + Body?: WithBoundArgs; + Footer?: WithBoundArgs; + } + ]; + }; + Element: HTMLDialogElement; +} +export default class HdsFlyout extends Component { + isOpen: boolean; + element: HTMLDialogElement; + body: HTMLElement; + bodyInitialOverflowValue: string; + /** + * Sets the size of the flyout + * Accepted values: medium, large + * + * @param size + * @type {string} + * @default 'medium' + */ + get size(): HdsFlyoutSizes; + /** + * Calculates the unique ID to assign to the title + */ + get id(): string; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + registerOnCloseCallback(event: Event): void; + didInsert(element: HTMLDialogElement): void; + willDestroyNode(): void; + open(): void; + onDismiss(): Promise; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/index.d.ts.map b/packages/components/declarations/components/hds/flyout/index.d.ts.map new file mode 100644 index 0000000000..489fc04c54 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAA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H,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAOvB;IAEO,uBAAuB,CAAC,KAAK,EAAE,KAAK;IAS5C,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAqB3C,eAAe,IAAI,IAAI;IAWvB,IAAI,IAAI,IAAI;IAeN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAiFjC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/types.d.ts b/packages/components/declarations/components/hds/flyout/types.d.ts new file mode 100644 index 0000000000..c343e2cda9 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsFlyoutSizesValues { + Medium = "medium", + Large = "large" +} +export type HdsFlyoutSizes = `${HdsFlyoutSizesValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/flyout/types.d.ts.map b/packages/components/declarations/components/hds/flyout/types.d.ts.map new file mode 100644 index 0000000000..bb7b1ec2a4 --- /dev/null +++ b/packages/components/declarations/components/hds/flyout/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/flyout/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,oBAAoB;IAC9B,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,cAAc,GAAG,GAAG,oBAAoB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/character-count/index.d.ts b/packages/components/declarations/components/hds/form/character-count/index.d.ts new file mode 100644 index 0000000000..a7c107a882 --- /dev/null +++ b/packages/components/declarations/components/hds/form/character-count/index.d.ts @@ -0,0 +1,86 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsFormCharacterCountSignature { + Args: { + contextualClass?: string; + controlId?: string; + maxLength?: number | string; + minLength?: number | string; + onInsert?: (element: HTMLElement, ...args: any[]) => void; + value?: string; + }; + Blocks: { + default?: [ + { + minLength?: number; + maxLength?: number; + currentLength?: number; + remaining?: number; + shortfall?: number; + } + ]; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsFormCharacterCount extends Component { + get currentLength(): number; + private _pluralize; + /** + * @param maxLength + * @type {number} + * @default null + * @description The maximum number of characters allowed. + */ + get maxLength(): number | undefined; + /** + * @param minLength + * @type {number} + * @default null + * @description The minimum number of characters allowed. + */ + get minLength(): number | undefined; + /** + * @param remaining + * @type {number} + * @default null + * @description The remaining number of characters. + */ + get remaining(): number | undefined; + /** + * @param shortfall + * @type {number} + * @default null + * @description The number of characters the content is falling short of. + */ + get shortfall(): number | undefined; + /** + * @param message + * @type {string} + * @default null + * @description The character count message presented to users + */ + get message(): string; + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id(): string | null; + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + get onInsert(): (element: HTMLElement, ...args: any[]) => void; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/character-count/index.d.ts.map b/packages/components/declarations/components/hds/form/character-count/index.d.ts.map new file mode 100644 index 0000000000..c85e2c9bcc --- /dev/null +++ b/packages/components/declarations/components/hds/form/character-count/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/character-count/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,E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H,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAQ7D;IACD;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CA8BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/base.d.ts b/packages/components/declarations/components/hds/form/checkbox/base.d.ts new file mode 100644 index 0000000000..46dc21b191 --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/base.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormCheckboxBaseSignature { + Args: { + value?: string; + }; + Element: HTMLInputElement; +} +declare const HdsFormCheckboxBase: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormCheckboxBase; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/base.d.ts.map b/packages/components/declarations/components/hds/form/checkbox/base.d.ts.map new file mode 100644 index 0000000000..dc8f06749d --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/checkbox/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,QAAA,MAAM,mBAAmB,8FAC8B,CAAC;AAExD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/field.d.ts b/packages/components/declarations/components/hds/form/checkbox/field.d.ts new file mode 100644 index 0000000000..b6961b0264 --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/field.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldSignature } from '../field'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormCheckboxFieldSignature { + Args: Omit & { + value?: string; + name?: string; + }; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormCheckboxField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormCheckboxField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/field.d.ts.map b/packages/components/declarations/components/hds/form/checkbox/field.d.ts.map new file mode 100644 index 0000000000..857163833c --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/checkbox/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,GAAG;QACxD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,oBAAoB,+FAC8B,CAAC;AAEzD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/group.d.ts b/packages/components/declarations/components/hds/form/checkbox/group.d.ts new file mode 100644 index 0000000000..27f37def0e --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/group.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldsetSignature } from '../fieldset'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLegendSignature } from '../legend'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormCheckboxFieldSignature } from './field'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormCheckboxGroupSignature { + Args: HdsFormFieldsetSignature['Args'] & { + name?: string; + }; + Blocks: { + default: [ + { + Legend?: ComponentLike; + HelperText?: ComponentLike; + CheckboxField?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldsetSignature['Element']; +} +declare const HdsFormCheckboxGroup: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormCheckboxGroup; +//# sourceMappingURL=group.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/checkbox/group.d.ts.map b/packages/components/declarations/components/hds/form/checkbox/group.d.ts.map new file mode 100644 index 0000000000..06401099b1 --- /dev/null +++ b/packages/components/declarations/components/hds/form/checkbox/group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/checkbox/group.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,SAAS,CAAC;AAC7D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG;QACvC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,aAAa,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;gBAC7D,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,oBAAoB,+FAC8B,CAAC;AAEzD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/error/index.d.ts b/packages/components/declarations/components/hds/form/error/index.d.ts new file mode 100644 index 0000000000..02ab6072ac --- /dev/null +++ b/packages/components/declarations/components/hds/form/error/index.d.ts @@ -0,0 +1,51 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormErrorMessageSignature } from './message'; +export declare const ID_PREFIX = "error-"; +export interface HdsFormErrorSignature { + Args: { + contextualClass?: string; + controlId?: string; + onInsert?: (element: HTMLElement, ...args: any[]) => void; + onRemove?: (element: HTMLElement, ...args: any[]) => void; + }; + Blocks: { + default: [ + { + Message?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsFormError extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id(): string | null; + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + get onInsert(): (element: HTMLElement, ...args: any[]) => void; + /** + * @param onRemove + * @type {function} + * @default () => {} + */ + get onRemove(): (element: HTMLElement, ...args: any[]) => void; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/error/index.d.ts.map b/packages/components/declarations/components/hds/form/error/index.d.ts.map new file mode 100644 index 0000000000..5ef9ed4b82 --- /dev/null +++ b/packages/components/declarations/components/hds/form/error/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/error/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,WAAW,CAAC;AAE9D,eAAO,MAAM,SAAS,WAAW,CAAC;AAIlC,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;QAE1D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,OAAO,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;aACvD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;;OAIG;IACH,IAAI,EAAE,IAAI,MAAM,GAAG,IAAI,CAMtB;IAED;;;;OAIG;IAEH,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAS7D;IAED;;;;OAIG;IAEH,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAS7D;IACD;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CAkCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/error/message.d.ts b/packages/components/declarations/components/hds/form/error/message.d.ts new file mode 100644 index 0000000000..0ef2cbea81 --- /dev/null +++ b/packages/components/declarations/components/hds/form/error/message.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsFormErrorMessageSignature { + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +declare const HdsFormErrorMessage: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormErrorMessage; +//# sourceMappingURL=message.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/error/message.d.ts.map b/packages/components/declarations/components/hds/form/error/message.d.ts.map new file mode 100644 index 0000000000..6ed258e18e --- /dev/null +++ b/packages/components/declarations/components/hds/form/error/message.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/error/message.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,mBAAmB,8FAC8B,CAAC;AAExD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/field/index.d.ts b/packages/components/declarations/components/hds/form/field/index.d.ts new file mode 100644 index 0000000000..f8a179fc37 --- /dev/null +++ b/packages/components/declarations/components/hds/form/field/index.d.ts @@ -0,0 +1,72 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsFormFieldLayoutValues } from './types.ts'; +import HdsFormLabelComponent from '../label/index.ts'; +import HdsFormHelperTextComponent from '../helper-text/index.ts'; +import HdsFormCharacterCountComponent from '../character-count/index.ts'; +import HdsFormErrorComponent from '../error/index.ts'; +import type { HdsFormFieldLayouts } from './types.ts'; +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type { HdsYieldSignature } from '../../yield/index.ts'; +export declare const LAYOUT_TYPES: HdsFormFieldLayoutValues[]; +export interface HdsFormFieldSignature { + Args: { + id?: string; + extraAriaDescribedBy?: string; + contextualClass?: string; + isOptional?: boolean; + isRequired?: boolean; + layout?: HdsFormFieldLayouts; + }; + Blocks: { + default: [ + { + Label?: WithBoundArgs; + HelperText?: WithBoundArgs; + Control?: ComponentLike; + CharacterCount?: WithBoundArgs; + Error?: WithBoundArgs; + id?: string; + ariaDescribedBy?: string; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsFormField extends Component { + /** + * Sets the layout of the field + * + * @param layout + * @type {string} + */ + get layout(): HdsFormFieldLayouts | undefined; + /** + * Calculates the unique ID to assign to the form control + */ + get id(): string; + /** + * @param isRequired + * @type {boolean} + * @default false + */ + get isRequired(): boolean; + /** + * @param isOptional + * @type {boolean} + * @default false + */ + get isOptional(): boolean; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + appendDescriptor(element: HTMLElement): void; + removeDescriptor(element: HTMLElement): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/field/index.d.ts.map b/packages/components/declarations/components/hds/form/field/index.d.ts.map new file mode 100644 index 0000000000..3403acb339 --- /dev/null +++ b/packages/components/declarations/components/hds/form/field/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/field/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,qBAAqB,MAAM,mBAAmB,CAAC;AACtD,OAAO,0BAA0B,MAAM,yBAAyB,CAAC;AACjE,OAAO,8BAA8B,MAAM,6BAA6B,CAAC;AACzE,OAAO,qBAAqB,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,YAAY,4BAA0C,CAAC;AAEpE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,eAAe,CAAC,EAAE,MAAM,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AI;CAsCrD"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/field/types.d.ts b/packages/components/declarations/components/hds/form/field/types.d.ts new file mode 100644 index 0000000000..0a458d2ea9 --- /dev/null +++ b/packages/components/declarations/components/hds/form/field/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsFormFieldLayoutValues { + Vertical = "vertical", + Flag = "flag" +} +export type HdsFormFieldLayouts = `${HdsFormFieldLayoutValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/field/types.d.ts.map b/packages/components/declarations/components/hds/form/field/types.d.ts.map new file mode 100644 index 0000000000..854cbdf2d0 --- /dev/null +++ b/packages/components/declarations/components/hds/form/field/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/field/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG,GAAG,wBAAwB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/fieldset/index.d.ts b/packages/components/declarations/components/hds/form/fieldset/index.d.ts new file mode 100644 index 0000000000..d57cc43cfb --- /dev/null +++ b/packages/components/declarations/components/hds/form/fieldset/index.d.ts @@ -0,0 +1,67 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import HdsFormLegendComponent from '../legend/index.ts'; +import HdsFormHelperTextComponent from '../helper-text/index.ts'; +import HdsFormErrorComponent from '../error/index.ts'; +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type { HdsFormFieldsetLayouts } from './types.ts'; +import type { HdsYieldSignature } from '../../yield/index.ts'; +export interface HdsFormFieldsetSignature { + Args: { + extraAriaDescribedBy?: string; + isOptional?: boolean; + isRequired?: boolean; + layout?: HdsFormFieldsetLayouts; + }; + Blocks: { + default: [ + { + Legend?: WithBoundArgs; + HelperText?: WithBoundArgs; + Control?: ComponentLike; + Error?: WithBoundArgs; + id?: string; + ariaDescribedBy?: string; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsFormFieldset extends Component { + /** + * Sets the layout of the group + * + * @param layout + * @type {enum} + * @default 'vertical' + */ + get layout(): HdsFormFieldsetLayouts; + /** + * Calculates the unique ID to assign to the fieldset + */ + get id(): string; + /** + * @param isRequired + * @type {boolean} + * @default false + */ + get isRequired(): boolean; + /** + * @param isOptional + * @type {boolean} + * @default false + */ + get isOptional(): boolean; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + appendDescriptor(element: HTMLElement): void; + removeDescriptor(element: HTMLElement): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/fieldset/index.d.ts.map b/packages/components/declarations/components/hds/form/fieldset/index.d.ts.map new file mode 100644 index 0000000000..43fb5bd6a0 --- /dev/null +++ b/packages/components/declarations/components/hds/form/fieldset/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/fieldset/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,sBAAsB,MAAM,oBAAoB,CAAC;AACxD,OAAO,0BAA0B,MAAM,yBAAyB,CAAC;AACjE,OAAO,qBAAqB,MAAM,mBAAmB,CAAC;AAEtD,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE;QACJ,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,MAAM,CAAC,EAAE,sBAAsB,CAAC;KACjC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CACpB,OAAO,sBAAsB,EAC7B,iBAAiB,GAAG,YAAY,GAAG,YAAY,CAChD,CAAC;gBACF,UAAU,CAAC,EAAE,aAAa,CACxB,OAAO,0BAA0B,EACjC,iBAAiB,GAAG,WAAW,GAAG,UAAU,CAC7C,CAAC;gBACF,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,KAAK,CAAC,EAAE,aAAa,CACnB,OAAO,qBAAqB,EAC5B,iBAAiB,GAAG,WAAW,GAAG,UAAU,GAAG,UAAU,CAC1D,CAAC;gBACF,EAAE,CAAC,EAAE,MAAM,CAAC;gBACZ,eAAe,CAAC,EAAE,MAAM,CAAC;aAC1B;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAID,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,SAAS,CAAC,wBAAwB,CAAC;IAC9E;;;;;;OAMG;IACH,IAAI,MAAM,IAAI,sBAAsB,CAEnC;IAED;;OAEG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAQvB;IAGD,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAIpC,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CAmCrD"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/fieldset/types.d.ts b/packages/components/declarations/components/hds/form/fieldset/types.d.ts new file mode 100644 index 0000000000..bffae39f5c --- /dev/null +++ b/packages/components/declarations/components/hds/form/fieldset/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsFormFieldsetLayoutValues { + Vertical = "vertical", + Horizontal = "horizontal" +} +export type HdsFormFieldsetLayouts = `${HdsFormFieldsetLayoutValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/fieldset/types.d.ts.map b/packages/components/declarations/components/hds/form/fieldset/types.d.ts.map new file mode 100644 index 0000000000..b9a65dd7df --- /dev/null +++ b/packages/components/declarations/components/hds/form/fieldset/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/fieldset/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,2BAA2B;IACrC,QAAQ,aAAa;IACrB,UAAU,eAAe;CAC1B;AAED,MAAM,MAAM,sBAAsB,GAAG,GAAG,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/file-input/base.d.ts b/packages/components/declarations/components/hds/form/file-input/base.d.ts new file mode 100644 index 0000000000..be947bf778 --- /dev/null +++ b/packages/components/declarations/components/hds/form/file-input/base.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormFileInputBaseSignature { + Element: HTMLInputElement; +} +declare const HdsFormFileInputBase: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormFileInputBase; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/file-input/base.d.ts.map b/packages/components/declarations/components/hds/form/file-input/base.d.ts.map new file mode 100644 index 0000000000..09532925a9 --- /dev/null +++ b/packages/components/declarations/components/hds/form/file-input/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/file-input/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,QAAA,MAAM,oBAAoB,+FAC8B,CAAC;AAEzD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/file-input/field.d.ts b/packages/components/declarations/components/hds/form/file-input/field.d.ts new file mode 100644 index 0000000000..74a1029f2c --- /dev/null +++ b/packages/components/declarations/components/hds/form/file-input/field.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike } from '@glint/template'; +import type { HdsFormFieldSignature } from '../field'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormFileInputFieldSignature { + Args: Omit; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormFileInputField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormFileInputField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/file-input/field.d.ts.map b/packages/components/declarations/components/hds/form/file-input/field.d.ts.map new file mode 100644 index 0000000000..60c245d451 --- /dev/null +++ b/packages/components/declarations/components/hds/form/file-input/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/file-input/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAC,CAAC;IACxE,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/helper-text/index.d.ts b/packages/components/declarations/components/hds/form/helper-text/index.d.ts new file mode 100644 index 0000000000..f2e5867e73 --- /dev/null +++ b/packages/components/declarations/components/hds/form/helper-text/index.d.ts @@ -0,0 +1,39 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../../text/body'; +export declare const ID_PREFIX = "helper-text-"; +export interface HdsFormHelperTextSignature { + Args: { + contextualClass?: string; + controlId?: string; + onInsert?: (element: HTMLElement, ...args: any[]) => void; + }; + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsFormHelperText extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id(): string | null; + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + get onInsert(): (element: HTMLElement, ...args: any[]) => void; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/helper-text/index.d.ts.map b/packages/components/declarations/components/hds/form/helper-text/index.d.ts.map new file mode 100644 index 0000000000..4c15d4b80c --- /dev/null +++ b/packages/components/declarations/components/hds/form/helper-text/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/helper-text/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,eAAO,MAAM,SAAS,iBAAiB,CAAC;AAIxC,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF;;;;OAIG;IACH,IAAI,EAAE,IAAI,MAAM,GAAG,IAAI,CAMtB;IAED;;;;OAIG;IAEH,IAAI,QAAQ,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAS7D;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CAmBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/indicator/index.d.ts b/packages/components/declarations/components/hds/form/indicator/index.d.ts new file mode 100644 index 0000000000..afb90bfa3c --- /dev/null +++ b/packages/components/declarations/components/hds/form/indicator/index.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextBodySignature } from '../../text/body'; +import type { HdsBadgeSignature } from '../../badge'; +export interface HdsFormIndicatorSignature { + Args: { + isOptional?: boolean; + isRequired?: boolean; + }; + Element: HdsTextBodySignature['Element'] | HdsBadgeSignature['Element']; +} +export default class HdsFormIndicator extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/indicator/index.d.ts.map b/packages/components/declarations/components/hds/form/indicator/index.d.ts.map new file mode 100644 index 0000000000..bf1a54e890 --- /dev/null +++ b/packages/components/declarations/components/hds/form/indicator/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/indicator/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;CACzE;AAED,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IAChF;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CA2BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/label/index.d.ts b/packages/components/declarations/components/hds/form/label/index.d.ts new file mode 100644 index 0000000000..ec068720c7 --- /dev/null +++ b/packages/components/declarations/components/hds/form/label/index.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export declare const ID_PREFIX = "label-"; +import type { HdsFormIndicatorSignature } from '../indicator'; +export interface HdsFormLabelSignature { + Args: { + contextualClass?: string; + controlId?: string; + isOptional?: HdsFormIndicatorSignature['Args']['isOptional']; + isRequired?: HdsFormIndicatorSignature['Args']['isRequired']; + }; + Blocks: { + default: []; + }; + Element: HTMLLabelElement; +} +export default class HdsFormLabel extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id(): string | null; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/label/index.d.ts.map b/packages/components/declarations/components/hds/form/label/index.d.ts.map new file mode 100644 index 0000000000..6e9810ec06 --- /dev/null +++ b/packages/components/declarations/components/hds/form/label/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/label/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,eAAO,MAAM,SAAS,WAAW,CAAC;AAElC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QAC7D,UAAU,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;;OAIG;IACH,IAAI,EAAE,IAAI,MAAM,GAAG,IAAI,CAMtB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAcvB;CAmBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/legend/index.d.ts b/packages/components/declarations/components/hds/form/legend/index.d.ts new file mode 100644 index 0000000000..aed83d406b --- /dev/null +++ b/packages/components/declarations/components/hds/form/legend/index.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsFormIndicatorSignature } from '../indicator'; +export interface HdsFormLegendSignature { + Args: { + contextualClass?: string; + isOptional?: HdsFormIndicatorSignature['Args']['isOptional']; + isRequired?: HdsFormIndicatorSignature['Args']['isRequired']; + }; + Blocks: { + default: []; + }; + Element: HTMLLegendElement; +} +export default class HdsFormLegend extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/legend/index.d.ts.map b/packages/components/declarations/components/hds/form/legend/index.d.ts.map new file mode 100644 index 0000000000..4fab44708b --- /dev/null +++ b/packages/components/declarations/components/hds/form/legend/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/legend/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AAE9D,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,UAAU,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;QAC7D,UAAU,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KAC9D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IAC1E;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAcvB;CAiBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/masked-input/base.d.ts b/packages/components/declarations/components/hds/form/masked-input/base.d.ts new file mode 100644 index 0000000000..e4710a1365 --- /dev/null +++ b/packages/components/declarations/components/hds/form/masked-input/base.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsCopyButtonSignature } from '../../copy/button/index.ts'; +import type { HdsFormVisibilityToggleSignature } from '../visibility-toggle/index.ts'; +export interface HdsFormMaskedInputBaseSignature { + Args: { + copyButtonText?: HdsCopyButtonSignature['Args']['text']; + hasCopyButton?: boolean; + isContentMasked?: boolean; + isInvalid?: boolean; + isMultiline?: boolean; + id?: string; + value?: string; + visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel']; + visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText']; + width?: string; + height?: string; + }; + Element: HTMLElement; +} +export default class HdsFormMaskedInputBase extends Component { + isContentMasked: boolean; + constructor(owner: unknown, args: HdsFormMaskedInputBaseSignature['Args']); + onClickToggleMasking(): void; + get id(): string; + get visibilityToggleAriaLabel(): string; + get visibilityToggleAriaMessageText(): string; + get copyButtonText(): string; + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/masked-input/base.d.ts.map b/packages/components/declarations/components/hds/form/masked-input/base.d.ts.map new file mode 100644 index 0000000000..29e076c63a --- /dev/null +++ b/packages/components/declarations/components/hds/form/masked-input/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/masked-input/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACzE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,+BAA+B,CAAC;AAGtF,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,cAAc,CAAC,EAAE,sBAAsB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxD,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,yBAAyB,CAAC,EAAE,gCAAgC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC;QAClF,+BAA+B,CAAC,EAAE,gCAAgC,CAAC,MAAM,CAAC,CAAC,iBAAiB,CAAC,CAAC;QAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IACnF,eAAe,UAAC;gBAEb,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,+BAA+B,CAAC,MAAM,CAAC;IAMzE,oBAAoB,IAAI,IAAI;IAI5B,IAAI,EAAE,IAAI,MAAM,CAEf;IAED,IAAI,yBAAyB,IAAI,MAAM,CAQtC;IAED,IAAI,+BAA+B,IAAI,MAAM,CAQ5C;IAED,IAAI,cAAc,IAAI,MAAM,CAM3B;IAED,IAAI,UAAU,IAAI,MAAM,CAUvB;CA+CF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/masked-input/field.d.ts b/packages/components/declarations/components/hds/form/masked-input/field.d.ts new file mode 100644 index 0000000000..9ebc5a4547 --- /dev/null +++ b/packages/components/declarations/components/hds/form/masked-input/field.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type HdsFormCharacterCountComponent from '../character-count'; +import type { HdsFormErrorSignature } from '../error'; +import type { HdsFormFieldSignature } from '../field'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormMaskedInputBaseSignature } from './base'; +export interface HdsFormMaskedInputFieldSignature { + Args: Omit & HdsFormMaskedInputBaseSignature['Args']; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + CharacterCount?: WithBoundArgs; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormMaskedInputField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormMaskedInputField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/masked-input/field.d.ts.map b/packages/components/declarations/components/hds/form/masked-input/field.d.ts.map new file mode 100644 index 0000000000..fba1ae7898 --- /dev/null +++ b/packages/components/declarations/components/hds/form/masked-input/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/masked-input/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,8BAA8B,MAAM,oBAAoB,CAAC;AACrE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,QAAQ,CAAC;AAE9D,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAC,GACrE,+BAA+B,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,cAAc,CAAC,EAAE,aAAa,CAC5B,OAAO,8BAA8B,EACrC,OAAO,CACR,CAAC;aACH;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,uBAAuB,kGAC8B,CAAC;AAE5D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/description.d.ts b/packages/components/declarations/components/hds/form/radio-card/description.d.ts new file mode 100644 index 0000000000..88ec1ed18e --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/description.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsFormRadioCardDescriptionSignature { + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +declare const HdsFormRadioCardDescription: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioCardDescription; +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/description.d.ts.map b/packages/components/declarations/components/hds/form/radio-card/description.d.ts.map new file mode 100644 index 0000000000..215238762f --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAE5D,MAAM,WAAW,oCAAoC;IACnD,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,2BAA2B,sGAC8B,CAAC;AAEhE,eAAe,2BAA2B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/group.d.ts b/packages/components/declarations/components/hds/form/radio-card/group.d.ts new file mode 100644 index 0000000000..0fe35e6a46 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/group.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldsetSignature } from '../fieldset'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLegendSignature } from '../legend'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormRadioCardSignature } from './index'; +import type { HdsFormErrorSignature } from '../error'; +import type { HdsFormRadioCardControlPositions, HdsFormRadioCardAlignments } from './types'; +export interface HdsFormRadioCardGroupSignature { + Args: HdsFormFieldsetSignature['Args'] & { + controlPosition?: HdsFormRadioCardControlPositions; + alignment?: HdsFormRadioCardAlignments; + name?: string; + }; + Blocks: { + default: [ + { + Legend?: ComponentLike; + HelperText?: ComponentLike; + RadioCard?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldsetSignature['Element']; +} +declare const HdsFormRadioCardGroup: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioCardGroup; +//# sourceMappingURL=group.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/group.d.ts.map b/packages/components/declarations/components/hds/form/radio-card/group.d.ts.map new file mode 100644 index 0000000000..6bfa3eac72 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/group.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EACV,gCAAgC,EAChC,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG;QACvC,eAAe,CAAC,EAAE,gCAAgC,CAAC;QACnD,SAAS,CAAC,EAAE,0BAA0B,CAAC;QACvC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,SAAS,CAAC,EAAE,aAAa,CAAC,yBAAyB,CAAC,CAAC;gBACrD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/index.d.ts b/packages/components/declarations/components/hds/form/radio-card/index.d.ts new file mode 100644 index 0000000000..9aaad90194 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/index.d.ts @@ -0,0 +1,69 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsFormRadioCardControlPositionValues, HdsFormRadioCardAlignmentValues } from './types.ts'; +import type { ComponentLike } from '@glint/template'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsBadgeSignature } from '../../badge'; +import type { HdsFormRadioBaseSignature } from '../radio/base'; +import type { HdsFormRadioCardDescriptionSignature } from './description'; +import type { HdsFormRadioCardLabelSignature } from './label'; +import type { HdsYieldSignature } from '../../yield'; +import type { HdsFormRadioCardControlPositions, HdsFormRadioCardAlignments } from './types'; +export declare const DEFAULT_CONTROL_POSITION = HdsFormRadioCardControlPositionValues.Bottom; +export declare const DEFAULT_ALIGNMENT = HdsFormRadioCardAlignmentValues.Left; +export declare const CONTROL_POSITIONS: string[]; +export declare const ALIGNMENTS: string[]; +export interface HdsFormRadioCardSignature { + Args: { + name?: string; + value?: string; + checked?: boolean; + disabled?: boolean; + controlPosition?: HdsFormRadioCardControlPositions; + alignment?: HdsFormRadioCardAlignments; + maxWidth?: string; + extraAriaDescribedBy?: string; + }; + Blocks: { + default: [ + { + Icon?: ComponentLike; + Label?: ComponentLike; + Badge?: ComponentLike; + Description?: ComponentLike; + Generic?: ComponentLike; + } + ]; + }; + Element: HdsFormRadioBaseSignature['Element']; +} +export default class HdsFormRadioCard extends Component { + /** + * Sets the position of the control + * Accepted values: buttom, left + * + * @param type + * @type {string} + * @default 'bottom' + */ + get controlPosition(): HdsFormRadioCardControlPositions; + /** + * Sets the alignment of the content + * Accepted values: left, center + * + * @param alignnment + * @type {string} + * @default 'left' + */ + get alignment(): HdsFormRadioCardAlignments; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/index.d.ts.map b/packages/components/declarations/components/hds/form/radio-card/index.d.ts.map new file mode 100644 index 0000000000..984fac8ab3 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EACL,qCAAqC,EACrC,+BAA+B,EAChC,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,yBAAyB,EAAE,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AAO,gBAAiB,SAAQ,SAAS,CAAC,yBAAyB,CAAC;IAChF;;;;;;;OAOG;IACH,IAAI,eAAe,IAAI,gCAAgC,CAWtD;IAED;;;;;;;OAOG;IACH,IAAI,SAAS,IAAI,0BAA0B,CAW1C;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAsBvB;CAkDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/label.d.ts b/packages/components/declarations/components/hds/form/radio-card/label.d.ts new file mode 100644 index 0000000000..0f7fb53145 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/label.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextDisplaySignature } from '../../text/display'; +export interface HdsFormRadioCardLabelSignature { + Blocks: { + default: []; + }; + Element: HdsTextDisplaySignature['Element']; +} +declare const HdsFormRadioCardLabel: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioCardLabel; +//# sourceMappingURL=label.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/label.d.ts.map b/packages/components/declarations/components/hds/form/radio-card/label.d.ts.map new file mode 100644 index 0000000000..887a25c6e8 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/label.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/label.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,8BAA8B;IAC7C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/types.d.ts b/packages/components/declarations/components/hds/form/radio-card/types.d.ts new file mode 100644 index 0000000000..8d95b6c45e --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/types.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsFormRadioCardControlPositionValues { + Bottom = "bottom", + Left = "left" +} +export type HdsFormRadioCardControlPositions = `${HdsFormRadioCardControlPositionValues}`; +export declare enum HdsFormRadioCardAlignmentValues { + Left = "left", + Center = "center" +} +export type HdsFormRadioCardAlignments = `${HdsFormRadioCardAlignmentValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio-card/types.d.ts.map b/packages/components/declarations/components/hds/form/radio-card/types.d.ts.map new file mode 100644 index 0000000000..838b299f6f --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio-card/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,qCAAqC;IAC/C,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,gCAAgC,GAC1C,GAAG,qCAAqC,EAAE,CAAC;AAE7C,oBAAY,+BAA+B;IACzC,IAAI,SAAS;IACb,MAAM,WAAW;CAClB;AAED,MAAM,MAAM,0BAA0B,GAAG,GAAG,+BAA+B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/base.d.ts b/packages/components/declarations/components/hds/form/radio/base.d.ts new file mode 100644 index 0000000000..e18dedd3b7 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/base.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormRadioBaseSignature { + Args: { + value?: string; + }; + Element: HTMLInputElement; +} +declare const HdsFormRadioBase: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioBase; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/base.d.ts.map b/packages/components/declarations/components/hds/form/radio/base.d.ts.map new file mode 100644 index 0000000000..749e1cd7bd --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,QAAA,MAAM,gBAAgB,2FAAqD,CAAC;AAE5E,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/field.d.ts b/packages/components/declarations/components/hds/form/radio/field.d.ts new file mode 100644 index 0000000000..114b308cbe --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/field.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldSignature } from '../field'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormRadioFieldSignature { + Args: Omit & { + value?: string; + name?: string; + }; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormRadioField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/field.d.ts.map b/packages/components/declarations/components/hds/form/radio/field.d.ts.map new file mode 100644 index 0000000000..be709d5757 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,GAAG;QACxD,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/group.d.ts b/packages/components/declarations/components/hds/form/radio/group.d.ts new file mode 100644 index 0000000000..d3062ddd77 --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/group.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldsetSignature } from '../fieldset'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLegendSignature } from '../legend'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormRadioFieldSignature } from './field'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormRadioGroupSignature { + Args: HdsFormFieldsetSignature['Args'] & { + name?: string; + }; + Blocks: { + default: [ + { + Legend?: ComponentLike; + HelperText?: ComponentLike; + RadioField?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldsetSignature['Element']; +} +declare const HdsFormRadioGroup: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormRadioGroup; +//# sourceMappingURL=group.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/radio/group.d.ts.map b/packages/components/declarations/components/hds/form/radio/group.d.ts.map new file mode 100644 index 0000000000..f4b4ce107d --- /dev/null +++ b/packages/components/declarations/components/hds/form/radio/group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio/group.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG;QACvC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/select/base.d.ts b/packages/components/declarations/components/hds/form/select/base.d.ts new file mode 100644 index 0000000000..b4e6741b2a --- /dev/null +++ b/packages/components/declarations/components/hds/form/select/base.d.ts @@ -0,0 +1,30 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsYieldSignature } from '../../yield'; +export interface HdsFormSelectBaseSignature { + Args: { + isInvalid?: boolean; + width?: string; + }; + Blocks: { + default: [ + { + Options?: ComponentLike; + } + ]; + }; + Element: HTMLSelectElement; +} +export default class HdsFormSelectBase extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/select/base.d.ts.map b/packages/components/declarations/components/hds/form/select/base.d.ts.map new file mode 100644 index 0000000000..62f221e127 --- /dev/null +++ b/packages/components/declarations/components/hds/form/select/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/select/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC5C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAYvB;CAgBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/select/field.d.ts b/packages/components/declarations/components/hds/form/select/field.d.ts new file mode 100644 index 0000000000..37d4d268d1 --- /dev/null +++ b/packages/components/declarations/components/hds/form/select/field.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike } from '@glint/template'; +import type { HdsFormErrorSignature } from '../error'; +import type { HdsFormFieldSignature } from '../field'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormSelectBaseSignature } from './base'; +import type { HdsYieldSignature } from '../../yield'; +export interface HdsFormSelectFieldSignature { + Args: Omit & HdsFormSelectBaseSignature['Args']; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + Options?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormSelectField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormSelectField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/select/field.d.ts.map b/packages/components/declarations/components/hds/form/select/field.d.ts.map new file mode 100644 index 0000000000..e6157b1f48 --- /dev/null +++ b/packages/components/declarations/components/hds/form/select/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/select/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,QAAQ,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAC,GACrE,0BAA0B,CAAC,MAAM,CAAC,CAAC;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC5C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/after-options.d.ts b/packages/components/declarations/components/hds/form/super-select/after-options.d.ts new file mode 100644 index 0000000000..915f739b43 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/after-options.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormSuperSelectAfterOptionsSignature { + Args: { + clearSelected: () => void; + content?: string; + resultCountMessage?: string; + selectedCount?: string; + showAll: () => void; + showNoSelectedMessage?: boolean; + showOnlySelected?: boolean; + showSelected: () => void; + }; +} +declare const HdsFormSuperSelectAfterOptions: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormSuperSelectAfterOptions; +//# sourceMappingURL=after-options.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/after-options.d.ts.map b/packages/components/declarations/components/hds/form/super-select/after-options.d.ts.map new file mode 100644 index 0000000000..23c46c5cec --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/after-options.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"after-options.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/super-select/after-options.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,uCAAuC;IACtD,IAAI,EAAE;QACJ,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,MAAM,IAAI,CAAC;QACpB,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,YAAY,EAAE,MAAM,IAAI,CAAC;KAC1B,CAAC;CACH;AAED,QAAA,MAAM,8BAA8B,yGAC8B,CAAC;AAEnE,eAAe,8BAA8B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts b/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts new file mode 100644 index 0000000000..fea953ecae --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts @@ -0,0 +1,77 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsFormSuperSelectHorizontalPositionValues } from '../types.ts'; +import type { PowerSelectSignature } from 'ember-power-select/components/power-select'; +import type { Select as PowerSelect } from 'ember-power-select/components/power-select'; +import type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position'; +import type { HdsFormSuperSelectHorizontalPositions } from '../types.ts'; +export declare const DEFAULT_HORIZONTAL_POSITION: string; +export declare const HORIZONTAL_POSITION_MAPPING: Record; +export interface HdsFormSuperSelectMultipleBaseSignature { + Args: PowerSelectSignature['Args'] & { + showAfterOptions?: boolean; + afterOptionsContent?: string; + resultCountMessage?: string; + dropdownMaxWidth?: string; + matchTriggerWidth?: boolean; + isInvalid?: boolean; + }; + Blocks: PowerSelectSignature['Blocks']; + Element: PowerSelectSignature['Element']; +} +export default class HdsFormSuperSelectMultipleBase extends Component { + powerSelectAPI?: PowerSelect; + showOnlySelected: boolean; + showNoSelectedMessage: boolean; + get horizontalPosition(): HdsFormSuperSelectHorizontalPositions; + get selectedCount(): string; + get optionsCount(): string; + get resultCountMessage(): string; + calculatePosition(trigger: Element, content: HTMLElement): CalculatePositionResult; + /** + * This action sets the powerSelectAPI property and optionally calls a registerAPI function. + * + * @param {Object} powerSelectAPI - The API object for the PowerSelect component. + * + * If a `registerAPI` function is passed in through the component's arguments, + * this function will be called with the `powerSelectAPI` as its argument. + * This allows parent components or controllers to have access to the PowerSelect API. + * + * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected` + */ + setPowerSelectAPI(powerSelectAPI: PowerSelect): void; + showSelected(): void; + showAll(): void; + clearSelected(): void; + /** + * Determine if `@afterOptionsComponent` gets displayed + * @param showAfterOptions + * @type {boolean} + * @default true + */ + get showAfterOptions(): boolean; + /** + * Get the search placeholder text + * @param searchPlaceholder + * @type {string} + * @default 'Search' + */ + get searchPlaceholder(): string; + /** + * Get the maxWidth to apply to the dropdown + * @param dropdownMaxWidth + * @type {string} + * @default 'none' + */ + get dropdownMaxWidthStyle(): Record; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts.map b/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts.map new file mode 100644 index 0000000000..0e12b6ccee --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/multiple/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../src/components/hds/form/super-select/multiple/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,EACL,0CAA0C,EAE3C,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,2BAA2B,EAAE,MACO,CAAC;AAClD,eAAO,MAAM,2BAA2B,wGACe,CAAC;AAExD,MAAM,WAAW,uCAAuC;IACtD,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG;QACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,8BAA+B,SAAQ,SAAS,CAAC,uCAAuC,CAAC;IACnG,cAAc,CAAC,EAAE,WAAW,CAAC;IAC7B,gBAAgB,UAAS;IACzB,qBAAqB,UAAS;IAEvC,IAAI,kBAAkB,IAAI,qCAAqC,CAG9D;IAED,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,IAAI,kBAAkB,IAAI,MAAM,CAK/B;IAEO,iBAAiB,CACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,WAAW,GACnB,uBAAuB;IAgB1B;;;;;;;;;;OAUG;IAEH,iBAAiB,CAAC,cAAc,EAAE,WAAW,GAAG,IAAI;IAO5C,YAAY,IAAI,IAAI;IAKpB,OAAO,IAAI,IAAI;IAKf,aAAa,IAAI,IAAI;IAO7B;;;;;OAKG;IACH,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAGD;;;;;OAKG;IACH,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED;;;;;OAKG;IACH,IAAI,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOlD;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAmBvB;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts b/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts new file mode 100644 index 0000000000..3c1c48471e --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormErrorSignature } from '../../error/index.ts'; +import type { HdsFormFieldSignature } from '../../field/index.ts'; +import type { HdsFormHelperTextSignature } from '../../helper-text/index.ts'; +import type { HdsFormLabelSignature } from '../../label'; +import type { HdsFormSuperSelectMultipleBaseSignature } from './base.ts'; +import type { Select as PowerSelect } from 'ember-power-select/components/power-select'; +import type { HdsYieldSignature } from '../../../yield/index.ts'; +export interface HdsFormSuperSelectMultipleFieldSignature { + Args: HdsFormSuperSelectMultipleBaseSignature['Args'] & HdsFormFieldSignature['Args']; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + Options?: ComponentLike; + options?: unknown; + select?: PowerSelect; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +export default class HdsFormSuperSelectMultipleField extends Component { + get idPrefix(): string; +} +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts.map b/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts.map new file mode 100644 index 0000000000..9ca6551713 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/multiple/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../../src/components/hds/form/super-select/multiple/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,uCAAuC,EAAE,MAAM,WAAW,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,wCAAwC;IACvD,IAAI,EAAE,uCAAuC,CAAC,MAAM,CAAC,GACnD,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;gBAClB,MAAM,CAAC,EAAE,WAAW,CAAC;aACtB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,MAAM,CAAC,OAAO,OAAO,+BAAgC,SAAQ,SAAS,CAAC,wCAAwC,CAAC;IAC9G,IAAI,QAAQ,IAAI,MAAM,CAErB;CAuCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/option-group.d.ts b/packages/components/declarations/components/hds/form/super-select/option-group.d.ts new file mode 100644 index 0000000000..67e501192e --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/option-group.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsFormSuperSelectOptionGroupSignature { + Args: { + group: { + groupName?: string; + }; + }; + Blocks: { + default: []; + }; +} +export default class HdsFormSuperSelectOptionGroup extends Component { + /** + * Generates a unique ID for the group title + * @return {string} + */ + groupTitleId: string; +} +//# sourceMappingURL=option-group.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/option-group.d.ts.map b/packages/components/declarations/components/hds/form/super-select/option-group.d.ts.map new file mode 100644 index 0000000000..1022accbfa --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/option-group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"option-group.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/super-select/option-group.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,SAAS,CAAC,EAAE,MAAM,CAAC;SACpB,CAAC;KACH,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,SAAS,CAAC,sCAAsC,CAAC;IAC1G;;;OAGG;IACH,YAAY,SAAkC;CA0B/C"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts b/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts new file mode 100644 index 0000000000..9bf06afd14 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts @@ -0,0 +1,12 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormSuperSelectPlaceholderSignature { + Args: { + placeholder?: string; + }; +} +declare const HdsFormSuperSelectPlaceholder: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormSuperSelectPlaceholder; +//# sourceMappingURL=placeholder.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts.map b/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts.map new file mode 100644 index 0000000000..55e4fccb45 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/placeholder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"placeholder.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/super-select/placeholder.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE;QACJ,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH;AAED,QAAA,MAAM,6BAA6B,wGAC8B,CAAC;AAElE,eAAe,6BAA6B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/single/base.d.ts b/packages/components/declarations/components/hds/form/super-select/single/base.d.ts new file mode 100644 index 0000000000..f00dcec777 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/single/base.d.ts @@ -0,0 +1,70 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsFormSuperSelectHorizontalPositionValues } from '../types.ts'; +import type { PowerSelectSignature } from 'ember-power-select/components/power-select'; +import type { Select as PowerSelect } from 'ember-power-select/components/power-select'; +import type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position'; +import type { HdsFormSuperSelectHorizontalPositions } from '../types.ts'; +export declare const DEFAULT_HORIZONTAL_POSITION: string; +export declare const HORIZONTAL_POSITION_MAPPING: Record; +export interface HdsFormSuperSelectSingleBaseSignature { + Args: PowerSelectSignature['Args'] & { + showAfterOptions?: boolean; + afterOptionsContent?: string; + resultCountMessage?: string; + dropdownMaxWidth?: string; + matchTriggerWidth?: boolean; + isInvalid?: boolean; + }; + Blocks: PowerSelectSignature['Blocks']; + Element: PowerSelectSignature['Element']; +} +export default class HdsFormSuperSelectSingleBase extends Component { + powerSelectAPI?: PowerSelect; + get horizontalPosition(): HdsFormSuperSelectHorizontalPositions; + get resultCountMessage(): string; + /** + * This action sets the powerSelectAPI property and optionally calls a registerAPI function. + * + * @param {Object} powerSelectAPI - The API object for the PowerSelect component. + * + * If a `registerAPI` function is passed in through the component's arguments, + * this function will be called with the `powerSelectAPI` as its argument. + * This allows parent components or controllers to have access to the PowerSelect API. + * + * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected` + */ + setPowerSelectAPI(powerSelectAPI: PowerSelect): void; + calculatePosition(trigger: Element, content: HTMLElement): CalculatePositionResult; + /** + * Determine if `@afterOptionsComponent` gets displayed + * @param showAfterOptions + * @type {boolean} + * @default false + */ + get showAfterOptions(): boolean | string; + /** + * Get the search placeholder text + * @param searchPlaceholder + * @type {string} + * @default 'Search' + */ + get searchPlaceholder(): string; + /** + * Get the maxWidth to apply to the dropdown + * @param dropdownMaxWidth + * @type {string} + * @default 'none' + */ + get dropdownMaxWidthStyle(): Record; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/single/base.d.ts.map b/packages/components/declarations/components/hds/form/super-select/single/base.d.ts.map new file mode 100644 index 0000000000..45d1c9df0c --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/single/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../../src/components/hds/form/super-select/single/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,EACL,0CAA0C,EAE3C,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,+CAA+C,CAAC;AAC7F,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEzE,eAAO,MAAM,2BAA2B,EAAE,MACO,CAAC;AAClD,eAAO,MAAM,2BAA2B,wGACe,CAAC;AAExD,MAAM,WAAW,qCAAqC;IACpD,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,GAAG;QACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IACvC,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,4BAA6B,SAAQ,SAAS,CAAC,qCAAqC,CAAC;IAC/F,cAAc,CAAC,EAAE,WAAW,CAAC;IAEtC,IAAI,kBAAkB,IAAI,qCAAqC,CAG9D;IAED,IAAI,kBAAkB,IAAI,MAAM,CAE/B;IAED;;;;;;;;;;OAUG;IAEH,iBAAiB,CAAC,cAAc,EAAE,WAAW,GAAG,IAAI;IAO5C,iBAAiB,CACvB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,WAAW,GACnB,uBAAuB;IAgB1B;;;;;OAKG;IACH,IAAI,gBAAgB,IAAI,OAAO,GAAG,MAAM,CAEvC;IAED;;;;;OAKG;IACH,IAAI,iBAAiB,IAAI,MAAM,CAE9B;IAED;;;;;OAKG;IACH,IAAI,qBAAqB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAOlD;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAcvB;CA6BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/single/field.d.ts b/packages/components/declarations/components/hds/form/super-select/single/field.d.ts new file mode 100644 index 0000000000..fe19a49328 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/single/field.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormErrorSignature } from '../../error/index.ts'; +import type { HdsFormFieldSignature } from '../../field/index.ts'; +import type { HdsFormHelperTextSignature } from '../../helper-text/index.ts'; +import type { HdsFormLabelSignature } from '../../label'; +import type { HdsFormSuperSelectSingleBaseSignature } from './base.ts'; +import type { Select as PowerSelect } from 'ember-power-select/components/power-select'; +import type { HdsYieldSignature } from '../../../yield/index.ts'; +export interface HdsFormSuperSelectSingleFieldSignature { + Args: HdsFormSuperSelectSingleBaseSignature['Args'] & HdsFormFieldSignature['Args']; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + Options?: ComponentLike; + options?: unknown; + select?: PowerSelect; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +export default class HdsFormSuperSelectSingleField extends Component { + get idPrefix(): string; +} +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/single/field.d.ts.map b/packages/components/declarations/components/hds/form/super-select/single/field.d.ts.map new file mode 100644 index 0000000000..646eac3921 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/single/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../../src/components/hds/form/super-select/single/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,4BAA4B,CAAC;AAC7E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACxF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEjE,MAAM,WAAW,sCAAsC;IACrD,IAAI,EAAE,qCAAqC,CAAC,MAAM,CAAC,GACjD,qBAAqB,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,OAAO,CAAC,EAAE,OAAO,CAAC;gBAClB,MAAM,CAAC,EAAE,WAAW,CAAC;aACtB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,SAAS,CAAC,sCAAsC,CAAC;IAC1G,IAAI,QAAQ,IAAI,MAAM,CAErB;CAuCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/types.d.ts b/packages/components/declarations/components/hds/form/super-select/types.d.ts new file mode 100644 index 0000000000..1166ed39a1 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/types.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { FloatingUIOptions } from '../../../../modifiers/hds-anchored-position.ts'; +export declare enum HdsFormSuperSelectHorizontalPositionValues { + Left = "left", + Center = "center", + Right = "right" +} +export type HdsFormSuperSelectHorizontalPositions = `${HdsFormSuperSelectHorizontalPositionValues}`; +export declare const HdsFormSuperSelectHorizontalPositionToPlacementValues: Record; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/super-select/types.d.ts.map b/packages/components/declarations/components/hds/form/super-select/types.d.ts.map new file mode 100644 index 0000000000..b82241fa57 --- /dev/null +++ b/packages/components/declarations/components/hds/form/super-select/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/super-select/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gDAAgD,CAAC;AAExF,oBAAY,0CAA0C;IACpD,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,qCAAqC,GAC/C,GAAG,0CAA0C,EAAE,CAAC;AAGlD,eAAO,MAAM,qDAAqD,EAAE,MAAM,CAExE,0CAA0C,EAC1C,iBAAiB,CAAC,WAAW,CAAC,CAK/B,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/base.d.ts b/packages/components/declarations/components/hds/form/text-input/base.d.ts new file mode 100644 index 0000000000..cc4ec68748 --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/base.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsFormTextInputTypeValues } from './types.ts'; +import type { HdsFormTextInputTypes } from './types.ts'; +export declare const DEFAULT_TYPE = HdsFormTextInputTypeValues.Text; +export declare const TYPES: string[]; +export interface HdsFormTextInputBaseSignature { + Args: { + hasVisibilityToggle?: boolean; + isInvalid?: boolean; + isLoading?: boolean; + type?: HdsFormTextInputTypes; + value?: string; + width?: string; + }; + Element: HTMLInputElement; +} +export default class HdsFormTextInputBase extends Component { + /** + * Sets the type of input + * + * @param type + * @type {string} + * @default 'text' + */ + get type(): HdsFormTextInputTypes; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/base.d.ts.map b/packages/components/declarations/components/hds/form/text-input/base.d.ts.map new file mode 100644 index 0000000000..0a97b25d65 --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/text-input/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AACxD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAIxD,eAAO,MAAM,YAAY,kCAAkC,CAAC;AAC5D,eAAO,MAAM,KAAK,EAAE,MAAM,EAA8C,CAAC;AAEzE,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE;QACJ,mBAAmB,CAAC,EAAE,OAAO,CAAC;QAC9B,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,IAAI,CAAC,EAAE,qBAAqB,CAAC;QAC7B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAS,CAAC,6BAA6B,CAAC;IACxF;;;;;;OAMG;IACH,IAAI,IAAI,IAAI,qBAAqB,CAWhC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAsBvB;CAeF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/field.d.ts b/packages/components/declarations/components/hds/form/text-input/field.d.ts new file mode 100644 index 0000000000..d2dc17ca6a --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/field.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type { HdsFormFieldSignature } from '../field'; +import type { HdsFormTextInputBaseSignature } from './base'; +import type { HdsFormErrorSignature } from '../error'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormVisibilityToggleSignature } from '../visibility-toggle'; +import HdsFormCharacterCountComponent from '../character-count/index.ts'; +export interface HdsFormTextInputFieldSignature { + Args: Omit & HdsFormTextInputBaseSignature['Args'] & { + visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel']; + visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText']; + }; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + CharacterCount?: WithBoundArgs; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +export default class HdsFormTextInputField extends Component { + isPasswordMasked: boolean; + type: "search" | "time" | "text" | "email" | "tel" | "password" | "url" | "date" | "datetime-local" | "month" | "week"; + constructor(owner: unknown, args: HdsFormTextInputFieldSignature['Args']); + get hasVisibilityToggle(): boolean; + get showVisibilityToggle(): boolean; + get visibilityToggleAriaLabel(): string | undefined; + get visibilityToggleAriaMessageText(): string | undefined; + onClickTogglePasswordReadability(): void; +} +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/field.d.ts.map b/packages/components/declarations/components/hds/form/text-input/field.d.ts.map new file mode 100644 index 0000000000..1d3adc9d30 --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["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S,CAAC,CAAC;CAC3C;AAED,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,SAAS,CAAC,8BAA8B,CAAC;IACjF,gBAAgB,UAAQ;IACxB,IAAI,mHAAC;gBAEF,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC;IAKxE,IAAI,mBAAmB,IAAI,OAAO,CAEjC;IAED,IAAI,oBAAoB,IAAI,OAAO,CAElC;IAED,IAAI,yBAAyB,IAAI,MAAM,GAAG,SAAS,CAQlD;IAED,IAAI,+BAA+B,IAAI,MAAM,GAAG,SAAS,CAQxD;IAGD,gCAAgC,IAAI,IAAI;CA4DzC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/types.d.ts b/packages/components/declarations/components/hds/form/text-input/types.d.ts new file mode 100644 index 0000000000..83f7e48917 --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/types.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsFormTextInputTypeValues { + Text = "text", + Email = "email", + Password = "password", + Url = "url", + Date = "date", + Time = "time", + DateTimeLocal = "datetime-local", + Search = "search", + Month = "month", + Week = "week", + Tel = "tel" +} +export type HdsFormTextInputTypes = `${HdsFormTextInputTypeValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/text-input/types.d.ts.map b/packages/components/declarations/components/hds/form/text-input/types.d.ts.map new file mode 100644 index 0000000000..093c9fbe9d --- /dev/null +++ b/packages/components/declarations/components/hds/form/text-input/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/text-input/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,0BAA0B;IACpC,IAAI,SAAS;IACb,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,IAAI,SAAS;IACb,aAAa,mBAAmB;IAChC,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,GAAG,QAAQ;CACZ;AAED,MAAM,MAAM,qBAAqB,GAAG,GAAG,0BAA0B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/textarea/base.d.ts b/packages/components/declarations/components/hds/form/textarea/base.d.ts new file mode 100644 index 0000000000..5180550360 --- /dev/null +++ b/packages/components/declarations/components/hds/form/textarea/base.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsFormTextareaBaseSignature { + Args: { + isInvalid?: boolean; + value?: string; + width?: string; + height?: string; + }; + Element: HTMLElement; +} +export default class HdsFormTextareaBase extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/textarea/base.d.ts.map b/packages/components/declarations/components/hds/form/textarea/base.d.ts.map new file mode 100644 index 0000000000..986d7a1878 --- /dev/null +++ b/packages/components/declarations/components/hds/form/textarea/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/textarea/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAS,CAAC,4BAA4B,CAAC;IACtF;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAYvB;CAcF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/textarea/field.d.ts b/packages/components/declarations/components/hds/form/textarea/field.d.ts new file mode 100644 index 0000000000..13296030fe --- /dev/null +++ b/packages/components/declarations/components/hds/form/textarea/field.d.ts @@ -0,0 +1,28 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldSignature } from '../field'; +import type { HdsFormTextareaBaseSignature } from './base'; +import type { ComponentLike, WithBoundArgs } from '@glint/template'; +import type { HdsFormErrorSignature } from '../error'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormLabelSignature } from '../label'; +import type HdsFormCharacterCountComponent from '../character-count'; +export interface HdsFormTextareaFieldSignature { + Args: Omit & HdsFormTextareaBaseSignature['Args']; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + CharacterCount?: WithBoundArgs; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormTextareaField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormTextareaField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/textarea/field.d.ts.map b/packages/components/declarations/components/hds/form/textarea/field.d.ts.map new file mode 100644 index 0000000000..70572ec63c --- /dev/null +++ b/packages/components/declarations/components/hds/form/textarea/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/textarea/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,QAAQ,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,8BAA8B,MAAM,oBAAoB,CAAC;AAErE,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,QAAQ,CAAC,GACrE,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACvC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,cAAc,CAAC,EAAE,aAAa,CAC5B,OAAO,8BAA8B,EACrC,OAAO,CACR,CAAC;aACH;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,oBAAoB,+FAC8B,CAAC;AAEzD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/base.d.ts b/packages/components/declarations/components/hds/form/toggle/base.d.ts new file mode 100644 index 0000000000..c27ae2b3d4 --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/base.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormToggleBaseSignature { + Args: { + value?: string; + }; + Element: HTMLInputElement; +} +declare const HdsFormToggleBase: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormToggleBase; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/base.d.ts.map b/packages/components/declarations/components/hds/form/toggle/base.d.ts.map new file mode 100644 index 0000000000..eeb89245f4 --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/toggle/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/field.d.ts b/packages/components/declarations/components/hds/form/toggle/field.d.ts new file mode 100644 index 0000000000..efeffc9e6c --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/field.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldSignature } from '../field'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLabelSignature } from '../label'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormToggleFieldSignature { + Args: Omit & { + value?: string; + }; + Blocks: { + default: [ + { + Label?: ComponentLike; + HelperText?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldSignature['Element']; +} +declare const HdsFormToggleField: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormToggleField; +//# sourceMappingURL=field.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/field.d.ts.map b/packages/components/declarations/components/hds/form/toggle/field.d.ts.map new file mode 100644 index 0000000000..f4bb637df7 --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/field.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/toggle/field.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACtD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,GAAG;QACxD,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;gBAC7C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;CAC3C;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/group.d.ts b/packages/components/declarations/components/hds/form/toggle/group.d.ts new file mode 100644 index 0000000000..9e3fded340 --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/group.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormFieldsetSignature } from '../fieldset'; +import type { ComponentLike } from '@glint/template'; +import type { HdsFormLegendSignature } from '../legend'; +import type { HdsFormHelperTextSignature } from '../helper-text'; +import type { HdsFormToggleFieldSignature } from './field'; +import type { HdsFormErrorSignature } from '../error'; +export interface HdsFormToggleGroupSignature { + Args: HdsFormFieldsetSignature['Args'] & { + name?: string; + }; + Blocks: { + default: [ + { + Legend?: ComponentLike; + HelperText?: ComponentLike; + ToggleField?: ComponentLike; + Error?: ComponentLike; + } + ]; + }; + Element: HdsFormFieldsetSignature['Element']; +} +declare const HdsFormToggleGroup: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormToggleGroup; +//# sourceMappingURL=group.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/toggle/group.d.ts.map b/packages/components/declarations/components/hds/form/toggle/group.d.ts.map new file mode 100644 index 0000000000..7c8a842a06 --- /dev/null +++ b/packages/components/declarations/components/hds/form/toggle/group.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"group.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/toggle/group.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC;AACjE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAEtD,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,wBAAwB,CAAC,MAAM,CAAC,GAAG;QACvC,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;gBAC/C,UAAU,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACvD,WAAW,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;gBACzD,KAAK,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;aAC9C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,wBAAwB,CAAC,SAAS,CAAC,CAAC;CAC9C;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts b/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts new file mode 100644 index 0000000000..1364341a19 --- /dev/null +++ b/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsFormVisibilityToggleSignature { + Args: { + ariaLabel?: string; + ariaMessageText?: string; + isVisible?: boolean; + }; + Element: HTMLButtonElement; +} +declare const HdsFormVisibilityToggle: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsFormVisibilityToggle; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts.map b/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts.map new file mode 100644 index 0000000000..b788d1b903 --- /dev/null +++ b/packages/components/declarations/components/hds/form/visibility-toggle/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/visibility-toggle/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,QAAA,MAAM,uBAAuB,kGAC8B,CAAC;AAE5D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon-tile/index.d.ts b/packages/components/declarations/components/hds/icon-tile/index.d.ts new file mode 100644 index 0000000000..88ec03bb21 --- /dev/null +++ b/packages/components/declarations/components/hds/icon-tile/index.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconTileColors, HdsIconTileProducts, HdsIconTileSizes } from './types.ts'; +import type { HdsIconSignature } from '../icon'; +export declare const DEFAULT_SIZE = "medium"; +export declare const DEFAULT_COLOR = "neutral"; +export declare const SIZES: string[]; +export declare const COLORS: string[]; +export declare const PRODUCTS: string[]; +export interface HdsIconTileSignature { + Args: { + size?: HdsIconTileSizes; + color?: HdsIconTileColors; + logo?: HdsIconTileProducts; + icon?: HdsIconSignature['Args']['name']; + iconSecondary?: HdsIconSignature['Args']['name']; + }; + Element: HTMLDivElement; +} +export default class HdsIconTile extends Component { + get size(): HdsIconTileSizes; + get color(): string; + get icon(): HdsIconSignature['Args']['name'] | undefined; + get iconSize(): HdsIconSignature['Args']['size']; + get iconWrapperClass(): string | undefined; + get logo(): HdsIconTileProducts | null; + get entity(): string | undefined; + get iconSecondary(): HdsIconSignature['Args']['name'] | undefined; + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon-tile/index.d.ts.map b/packages/components/declarations/components/hds/icon-tile/index.d.ts.map new file mode 100644 index 0000000000..3eecd15a14 --- /dev/null +++ b/packages/components/declarations/components/hds/icon-tile/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/icon-tile/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,KAAK,EACV,iBAAiB,EACjB,mBA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AAI,UAAU,IAAI,MAAM,CAavB;CA2CF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon-tile/types.d.ts b/packages/components/declarations/components/hds/icon-tile/types.d.ts new file mode 100644 index 0000000000..90c917765c --- /dev/null +++ b/packages/components/declarations/components/hds/icon-tile/types.d.ts @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsIconTileSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsIconTileSizes = `${HdsIconTileSizeValues}`; +export declare enum HdsIconTileProductValues { + Boundary = "boundary", + Consul = "consul", + HCP = "hcp", + Nomad = "nomad", + Packer = "packer", + Terraform = "terraform", + Vagrant = "vagrant", + Vault = "vault", + 'Vault Secrets' = "vault-secrets", + 'Vault Radar' = "vault-radar", + Waypoint = "waypoint" +} +export type HdsIconTileProducts = `${HdsIconTileProductValues}`; +export declare enum HdsIconTileColorNeutral { + Neutral = "neutral" +} +export type HdsIconTileColors = HdsIconTileProducts | HdsIconTileColorNeutral; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon-tile/types.d.ts.map b/packages/components/declarations/components/hds/icon-tile/types.d.ts.map new file mode 100644 index 0000000000..3aa41f4de5 --- /dev/null +++ b/packages/components/declarations/components/hds/icon-tile/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/icon-tile/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,qBAAqB;IAC/B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,gBAAgB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AAE1D,oBAAY,wBAAwB;IAClC,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,KAAK,UAAU;IACf,eAAe,kBAAkB;IACjC,aAAa,gBAAgB;IAC7B,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,mBAAmB,GAAG,GAAG,wBAAwB,EAAE,CAAC;AAEhE,oBAAY,uBAAuB;IACjC,OAAO,YAAY;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,mBAAmB,GAAG,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon/index.d.ts b/packages/components/declarations/components/hds/icon/index.d.ts new file mode 100644 index 0000000000..e7839dba35 --- /dev/null +++ b/packages/components/declarations/components/hds/icon/index.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSizes, HdsIconColors } from './types'; +import type { IconName } from '@hashicorp/flight-icons/svg'; +export declare const AVAILABLE_COLORS: string[]; +export interface HdsIconSignature { + Args: { + name: IconName; + color?: HdsIconColors | string | undefined; + size?: HdsIconSizes; + stretched?: boolean; + isInline?: boolean; + title?: string; + }; + Element: SVGElement; +} +export default class HdsIcon extends Component { + iconId: string; + titleId: string; + constructor(owner: unknown, args: HdsIconSignature['Args']); + get isInline(): boolean; + get predefinedColor(): HdsIconColors | undefined; + get fillColor(): string; + get size(): string; + get svgSize(): { + width: string; + height: string; + }; + get title(): string | null; + get role(): string | null; + get ariaLabelledby(): string | null; + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon/index.d.ts.map b/packages/components/declarations/components/hds/icon/index.d.ts.map new file mode 100644 index 0000000000..1a9be321b3 --- /dev/null +++ b/packages/components/declarations/components/hds/icon/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/icon/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAK3C,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAsC,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ,CAAC;QACf,KAAK,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;QAC3C,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,UAAU,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC9D,MAAM,SAA2B;IACjC,OAAO,SAA4B;gBAEvB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;IAY1D,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,IAAI,eAAe,IAAI,aAAa,GAAG,SAAS,CAQ/C;IAED,IAAI,SAAS,IAAI,MAAM,CAMtB;IAED,IAAI,IAAI,IAAI,MAAM,CAEjB;IAED,IAAI,OAAO,IAAI;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAK/C;IAED,IAAI,KAAK,IAAI,MAAM,GAAG,IAAI,CAEzB;IAED,IAAI,IAAI,IAAI,MAAM,GAAG,IAAI,CAExB;IAED,IAAI,cAAc,IAAI,MAAM,GAAG,IAAI,CAElC;IAED,IAAI,UAAU,WAsBb;CAkDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon/types.d.ts b/packages/components/declarations/components/hds/icon/types.d.ts new file mode 100644 index 0000000000..6bc1e28de1 --- /dev/null +++ b/packages/components/declarations/components/hds/icon/types.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsIconSizeValues { + Sixteen = "16", + TwentyFour = "24" +} +export type HdsIconSizes = `${HdsIconSizeValues}`; +export declare enum HdsIconColorValues { + Primary = "primary", + Strong = "strong", + Faint = "faint", + Disabled = "disabled", + HighContrast = "high-contrast", + Action = "action", + ActionHover = "action-hover", + ActionActive = "action-active", + Highlight = "highlight", + HighlightOnSurface = "highlight-on-surface", + HighlightHighContrast = "highlight-high-contrast", + Success = "success", + SuccessOnSurface = "success-on-surface", + SuccessHighContrast = "success-high-contrast", + Warning = "warning", + WarningOnSurface = "warning-on-surface", + WarningHighContrast = "warning-high-contrast", + Critical = "critical", + CriticalOnSurface = "critical-on-surface", + CriticalHighContrast = "critical-high-contrast" +} +export type HdsIconColors = `${HdsIconColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/icon/types.d.ts.map b/packages/components/declarations/components/hds/icon/types.d.ts.map new file mode 100644 index 0000000000..06ae9be5d6 --- /dev/null +++ b/packages/components/declarations/components/hds/icon/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/icon/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,iBAAiB;IAC3B,OAAO,OAAO;IACd,UAAU,OAAO;CAClB;AAED,MAAM,MAAM,YAAY,GAAG,GAAG,iBAAiB,EAAE,CAAC;AAElD,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,kBAAkB,yBAAyB;IAC3C,qBAAqB,4BAA4B;IACjD,OAAO,YAAY;IACnB,gBAAgB,uBAAuB;IACvC,mBAAmB,0BAA0B;IAC7C,OAAO,YAAY;IACnB,gBAAgB,uBAAuB;IACvC,mBAAmB,0BAA0B;IAC7C,QAAQ,aAAa;IACrB,iBAAiB,wBAAwB;IACzC,oBAAoB,2BAA2B;CAChD;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/interactive/index.d.ts b/packages/components/declarations/components/hds/interactive/index.d.ts new file mode 100644 index 0000000000..6f0d84ca59 --- /dev/null +++ b/packages/components/declarations/components/hds/interactive/index.d.ts @@ -0,0 +1,42 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsInteractiveSignature { + Args: { + href?: string; + isHrefExternal?: boolean; + isRouteExternal?: boolean; + route?: string; + models?: unknown[]; + model?: unknown; + query?: Record; + 'current-when'?: string | boolean; + replace?: boolean; + }; + Blocks: { + default: []; + }; + Element: HTMLAnchorElement | HTMLButtonElement; +} +export default class HdsInteractive extends Component { + /** + * Determines if a @href value is "external" (it adds target="_blank" rel="noopener noreferrer") + * + * @param isHrefExternal + * @type boolean + * @default true + */ + get isHrefExternal(): boolean; + /** + * Determines if a @route value is "external" (uses the LinkToExternal component instead of LinkTo) + * + * @param isRouteExternal + * @type boolean + * @default false + */ + get isRouteExternal(): boolean; + onKeyUp(event: KeyboardEvent): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/interactive/index.d.ts.map b/packages/components/declarations/components/hds/interactive/index.d.ts.map new file mode 100644 index 0000000000..da2ceac8b9 --- /dev/null +++ b/packages/components/declarations/components/hds/interactive/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/interactive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,eAAe,CAAC,EAAE,OAAO,CAAC;QAG1B,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC;QACnB,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QAChC,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAClC,OAAO,CAAC,EAAE,OAAO,CAAC;KACnB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,GAAG,iBAAiB,CAAC;CAChD;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E;;;;;;OAMG;IACH,IAAI,cAAc,IAAI,OAAO,CAE5B;IAED;;;;;;OAMG;IACH,IAAI,eAAe,IAAI,OAAO,CAE7B;IAGD,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;CAmEpC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/inline.d.ts b/packages/components/declarations/components/hds/link/inline.d.ts new file mode 100644 index 0000000000..6b974555fe --- /dev/null +++ b/packages/components/declarations/components/hds/link/inline.d.ts @@ -0,0 +1,48 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsLinkColorValues, HdsLinkIconPositionValues } from './types.ts'; +import type { HdsInteractiveSignature } from '../interactive/'; +import type { HdsLinkColors, HdsLinkIconPositions } from './types.ts'; +import type { HdsIconSignature } from '../icon'; +export declare const DEFAULT_ICONPOSITION = HdsLinkIconPositionValues.Trailing; +export declare const DEFAULT_COLOR = HdsLinkColorValues.Primary; +export declare const ICONPOSITIONS: string[]; +export declare const COLORS: string[]; +export interface HdsLinkInlineSignature { + Args: HdsInteractiveSignature['Args'] & { + color?: HdsLinkColors; + icon?: HdsIconSignature['Args']['name']; + iconPosition?: HdsLinkIconPositions; + }; + Blocks: { + default: []; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsLinkInline extends Component { + constructor(owner: unknown, args: HdsLinkInlineSignature['Args']); + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of link to be used; acceptable values are `primary` and `secondary` + */ + get color(): HdsLinkColors; + /** + * @param iconPosition + * @type {HdsLinkIconPositions} + * @default leading + * @description Positions the icon before or after the text; allowed values are `leading` or `trailing` + */ + get iconPosition(): HdsLinkIconPositions; + /** + * Get the class names to apply to the component. + * @method LinkInline#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=inline.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/inline.d.ts.map b/packages/components/declarations/components/hds/link/inline.d.ts.map new file mode 100644 index 0000000000..7301de03e9 --- /dev/null +++ b/packages/components/declarations/components/hds/link/inline.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"inline.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/link/inline.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AAE3E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,oBAAoB,qCAAqC,CAAC;AACvE,eAAO,MAAM,aAAa,6BAA6B,CAAC;AACxD,eAAO,MAAM,aAAa,EAAE,MAAM,EAA6C,CAAC;AAChF,eAAO,MAAM,MAAM,EAAE,MAAM,EAAsC,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,YAAY,CAAC,EAAE,oBAAoB,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;gBAC9D,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAOhE;;;;;OAKG;IACH,IAAI,KAAK,IAAI,aAAa,CAWzB;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,oBAAoB,CAWvC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAUvB;CA6CF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/standalone.d.ts b/packages/components/declarations/components/hds/link/standalone.d.ts new file mode 100644 index 0000000000..b0254f0837 --- /dev/null +++ b/packages/components/declarations/components/hds/link/standalone.d.ts @@ -0,0 +1,76 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsLinkIconPositionValues, HdsLinkColorValues, HdsLinkStandaloneSizeValues } from './types.ts'; +import type { HdsInteractiveSignature } from '../interactive/'; +import type { HdsLinkColors, HdsLinkIconPositions, HdsLinkStandaloneSizes } from './types.ts'; +import type { HdsIconSignature } from '../icon'; +export interface HdsLinkStandaloneSignature { + Args: HdsInteractiveSignature['Args'] & { + size?: HdsLinkStandaloneSizes; + color?: HdsLinkColors; + text: string; + icon: HdsIconSignature['Args']['name']; + iconPosition?: HdsLinkIconPositions; + }; + Element: HdsInteractiveSignature['Element']; +} +export declare const DEFAULT_ICONPOSITION = HdsLinkIconPositionValues.Leading; +export declare const DEFAULT_COLOR = HdsLinkColorValues.Primary; +export declare const DEFAULT_SIZE = HdsLinkStandaloneSizeValues.Medium; +export declare const ICONPOSITIONS: string[]; +export declare const COLORS: string[]; +export declare const SIZES: string[]; +export default class HdsLinkStandalone extends Component { + constructor(owner: unknown, args: HdsLinkStandaloneSignature['Args']); + /** + * @param text + * @type {string} + * @description The text of the link. If no text value is defined an error will be thrown. + */ + get text(): string; + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of link to be used; acceptable values are `primary` and `secondary` + */ + get color(): HdsLinkColors; + /** + * @param icon + * @type {string|null} + * @default null + * @description The name of the icon to be used. An icon name must be defined. + */ + get icon(): HdsIconSignature['Args']['name']; + /** + * @param iconPosition + * @type {HdsLinkIconPositions} + * @default leading + * @description Positions the icon before or after the text; allowed values are `leading` or `trailing` + */ + get iconPosition(): HdsLinkIconPositions; + /** + * @param size + * @type {HdsLinkStandaloneSizes} + * @default medium + * @description The size of the standalone link; acceptable values are `small`, `medium`, and `large` + */ + get size(): HdsLinkStandaloneSizes; + /** + * @param iconSize + * @type {string} + * @default 16 + * @description ensures that the correct icon size is used. Automatically calculated. + */ + get iconSize(): HdsIconSignature['Args']['size']; + /** + * Get the class names to apply to the component. + * @method LinkStandalone#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=standalone.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/standalone.d.ts.map b/packages/components/declarations/components/hds/link/standalone.d.ts.map new file mode 100644 index 0000000000..4402466285 --- /dev/null +++ b/packages/components/declarations/components/hds/link/standalone.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"standalone.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/link/stand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;;OAKG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAS3C;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,oBAAoB,CAWvC;IAED;;;;;OAKG;IACH,IAAI,IAAI,IAAI,sBAAsB,CAWjC;IAED;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAM/C;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAavB;CAqDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/types.d.ts b/packages/components/declarations/components/hds/link/types.d.ts new file mode 100644 index 0000000000..b9e46a1b7c --- /dev/null +++ b/packages/components/declarations/components/hds/link/types.d.ts @@ -0,0 +1,21 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsLinkIconPositionValues { + Leading = "leading", + Trailing = "trailing" +} +export type HdsLinkIconPositions = `${HdsLinkIconPositionValues}`; +export declare enum HdsLinkColorValues { + Primary = "primary", + Secondary = "secondary" +} +export type HdsLinkColors = `${HdsLinkColorValues}`; +export declare enum HdsLinkStandaloneSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsLinkStandaloneSizes = `${HdsLinkStandaloneSizeValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/link/types.d.ts.map b/packages/components/declarations/components/hds/link/types.d.ts.map new file mode 100644 index 0000000000..149db13bb0 --- /dev/null +++ b/packages/components/declarations/components/hds/link/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/link/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,yBAAyB;IACnC,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,oBAAoB,GAAG,GAAG,yBAAyB,EAAE,CAAC;AAElE,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,2BAA2B;IACrC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,sBAAsB,GAAG,GAAG,2BAA2B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/menu-primitive/index.d.ts b/packages/components/declarations/components/hds/menu-primitive/index.d.ts new file mode 100644 index 0000000000..e7f6aa983c --- /dev/null +++ b/packages/components/declarations/components/hds/menu-primitive/index.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface MenuPrimitiveSignature { + Args: { + onClose?: (...args: any[]) => void; + }; + Blocks: { + toggle?: [ + { + onClickToggle: (event: MouseEvent, ...args: any[]) => void; + isOpen?: boolean; + } + ]; + content?: [ + { + close: (...args: any[]) => void; + } + ]; + }; + Element: HTMLDivElement; +} +export default class MenuPrimitive extends Component { + isOpen: boolean | undefined; + toggleRef: HTMLElement | undefined; + element: HTMLElement; + constructor(owner: unknown, args: MenuPrimitiveSignature['Args']); + didInsert(element: HTMLElement): void; + onClickToggle(event: MouseEvent): void; + onFocusOut(event: FocusEvent): void; + onKeyUp(event: KeyboardEvent): void; + close(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/menu-primitive/index.d.ts.map b/packages/components/declarations/components/hds/menu-primitive/index.d.ts.map new file mode 100644 index 0000000000..2225ccc042 --- /dev/null +++ b/packages/components/declarations/components/hds/menu-primitive/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/menu-primitive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QAEJ,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KACpC,CAAC;IACF,MAAM,EAAE;QACN,MAAM,CAAC,EAAE;YACP;gBAEE,aAAa,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;gBAC3D,MAAM,CAAC,EAAE,OAAO,CAAC;aAClB;SACF,CAAC;QACF,OAAO,CAAC,EAAE;YACR;gBAEE,KAAK,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;aACjC;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,SAAS,CAAC,sBAAsB,CAAC;IACjE,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,SAAS,EAAE,WAAW,GAAG,SAAS,CAAC;IACnC,OAAO,EAAG,WAAW,CAAC;gBAEnB,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,MAAM,CAAC;IAmBhE,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAKrC,aAAa,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAWtC,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IAanC,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAQnC,KAAK,IAAI,IAAI;CAgDd"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/body.d.ts b/packages/components/declarations/components/hds/modal/body.d.ts new file mode 100644 index 0000000000..5937c5fa2c --- /dev/null +++ b/packages/components/declarations/components/hds/modal/body.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsModalBodySignature { + Args: never; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsModalBody extends Component { + constructor(owner: unknown, args: HdsModalBodySignature['Args']); +} +//# sourceMappingURL=body.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/body.d.ts.map b/packages/components/declarations/components/hds/modal/body.d.ts.map new file mode 100644 index 0000000000..d091520091 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/body.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/modal/body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,qBAAqB;IAGpC,IAAI,EAAE,KAAK,CAAC;IACZ,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;gBAC5D,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC;CA6BhE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/footer.d.ts b/packages/components/declarations/components/hds/modal/footer.d.ts new file mode 100644 index 0000000000..4b2e32253e --- /dev/null +++ b/packages/components/declarations/components/hds/modal/footer.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsModalFooterSignature { + Args: { + onDismiss?: (event: MouseEvent) => void; + }; + Blocks: { + default: [{ + close?: (event: MouseEvent) => void; + }]; + }; + Element: HTMLDivElement; +} +export default class HdsModalFooter extends Component { + constructor(owner: unknown, args: HdsModalFooterSignature['Args']); +} +//# sourceMappingURL=footer.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/footer.d.ts.map b/packages/components/declarations/components/hds/modal/footer.d.ts.map new file mode 100644 index 0000000000..a39cdf8f58 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/footer.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/modal/footer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,CAAC;YAAE,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAA;SAAE,CAAC,CAAC;KACpD,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;gBAChE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC;CA+BlE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/header.d.ts b/packages/components/declarations/components/hds/modal/header.d.ts new file mode 100644 index 0000000000..b732c23947 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/header.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../icon'; +export interface HdsModalHeaderSignature { + Args: { + id?: string; + tagline?: string; + onDismiss: (event: MouseEvent) => void; + icon?: HdsIconSignature['Args']['name']; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsModalHeader extends Component { + constructor(owner: unknown, args: HdsModalHeaderSignature['Args']); +} +//# sourceMappingURL=header.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/header.d.ts.map b/packages/components/declarations/components/hds/modal/header.d.ts.map new file mode 100644 index 0000000000..1c19865f9f --- /dev/null +++ b/packages/components/declarations/components/hds/modal/header.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"header.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/modal/header.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;QACvC,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;gBAChE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC;CAoElE"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/index.d.ts b/packages/components/declarations/components/hds/modal/index.d.ts new file mode 100644 index 0000000000..f3b3bc943a --- /dev/null +++ b/packages/components/declarations/components/hds/modal/index.d.ts @@ -0,0 +1,52 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { WithBoundArgs } from '@glint/template'; +import type { HdsModalSizes, HdsModalColors } from './types.ts'; +import HdsDialogPrimitiveHeaderComponent from '../dialog-primitive/header.ts'; +import HdsDialogPrimitiveBodyComponent from '../dialog-primitive/body.ts'; +import HdsDialogPrimitiveFooterComponent from '../dialog-primitive/footer.ts'; +import { HdsModalSizeValues, HdsModalColorValues } from './types.ts'; +export declare const DEFAULT_SIZE = HdsModalSizeValues.Medium; +export declare const DEFAULT_COLOR = HdsModalColorValues.Neutral; +export declare const SIZES: string[]; +export declare const COLORS: string[]; +export interface HdsModalSignature { + Args: { + isDismissDisabled?: boolean; + size?: HdsModalSizes; + color?: HdsModalColors; + returnFocusTo?: string; + onOpen?: () => void; + onClose?: (event: Event) => void; + }; + Blocks: { + default: [ + { + Header?: WithBoundArgs; + Body?: WithBoundArgs; + Footer?: WithBoundArgs; + } + ]; + }; + Element: HTMLDialogElement; +} +export default class HdsModal extends Component { + isOpen: boolean; + element: HTMLDialogElement; + body: HTMLElement; + bodyInitialOverflowValue: string; + get isDismissDisabled(): boolean; + get size(): HdsModalSizes; + get color(): HdsModalColors; + get id(): string; + get classNames(): string; + registerOnCloseCallback(event: Event): void; + didInsert(element: HTMLDialogElement): void; + willDestroyNode(): void; + open(): void; + onDismiss(): Promise; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/index.d.ts.map b/packages/components/declarations/components/hds/modal/index.d.ts.map new file mode 100644 index 0000000000..764009dd10 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/modal/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEhE,OAAO,iCAAiC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,+BAA+B,MAAM,6BAA6B,CAAC;AAC1E,OAAO,iCAAiC,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,M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vB;IAEO,uBAAuB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAwBnD,SAAS,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAqB3C,eAAe,IAAI,IAAI;IAWvB,IAAI,IAAI,IAAI;IAeN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAgFjC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/types.d.ts b/packages/components/declarations/components/hds/modal/types.d.ts new file mode 100644 index 0000000000..324c39f9b5 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/types.d.ts @@ -0,0 +1,17 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsModalSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsModalSizes = `${HdsModalSizeValues}`; +export declare enum HdsModalColorValues { + Neutral = "neutral", + Warning = "warning", + Critical = "critical" +} +export type HdsModalColors = `${HdsModalColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/modal/types.d.ts.map b/packages/components/declarations/components/hds/modal/types.d.ts.map new file mode 100644 index 0000000000..302f27f8f0 --- /dev/null +++ b/packages/components/declarations/components/hds/modal/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/modal/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,mBAAmB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/actions.d.ts b/packages/components/declarations/components/hds/page-header/actions.d.ts new file mode 100644 index 0000000000..b539532c76 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/actions.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsPageHeaderActionsSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsPageHeaderActions: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeaderActions; +//# sourceMappingURL=actions.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/actions.d.ts.map b/packages/components/declarations/components/hds/page-header/actions.d.ts.map new file mode 100644 index 0000000000..c759d339a3 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/actions.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/actions.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,oBAAoB,+FAC8B,CAAC;AAEzD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/badges.d.ts b/packages/components/declarations/components/hds/page-header/badges.d.ts new file mode 100644 index 0000000000..7440e3f3de --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/badges.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsPageHeaderBadgesSignature { + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +declare const HdsPageHeaderBadges: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeaderBadges; +//# sourceMappingURL=badges.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/badges.d.ts.map b/packages/components/declarations/components/hds/page-header/badges.d.ts.map new file mode 100644 index 0000000000..182ff22865 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/badges.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"badges.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/badges.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,mBAAmB,8FAC8B,CAAC;AAExD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/description.d.ts b/packages/components/declarations/components/hds/page-header/description.d.ts new file mode 100644 index 0000000000..7a11ad2b0d --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/description.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextBodySignature } from '../text/body'; +export interface HdsPageHeaderDescriptionSignature { + Args: HdsTextBodySignature['Args']; + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +declare const HdsPageHeaderDescription: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeaderDescription; +//# sourceMappingURL=description.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/description.d.ts.map b/packages/components/declarations/components/hds/page-header/description.d.ts.map new file mode 100644 index 0000000000..de4ff4e396 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/description.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"description.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/description.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,wBAAwB,mGAC8B,CAAC;AAE7D,eAAe,wBAAwB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/index.d.ts b/packages/components/declarations/components/hds/page-header/index.d.ts new file mode 100644 index 0000000000..d38ece579f --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/index.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike } from '@glint/template'; +import type { HdsIconTileSignature } from '../icon-tile'; +import type { HdsYieldSignature } from '../yield'; +import type { HdsPageHeaderActionsSignature } from './actions'; +import type { HdsPageHeaderBadgesSignature } from './badges'; +import type { HdsPageHeaderDescriptionSignature } from './description'; +import type { HdsPageHeaderTitleSignature } from './title'; +import type { HdsPageHeaderSubtitleSignature } from './subtitle'; +export interface HdsPageHeaderSignature { + Blocks: { + default: [ + { + Actions?: ComponentLike; + Badges?: ComponentLike; + Breadcrumb?: ComponentLike; + Description?: ComponentLike; + Generic?: ComponentLike; + IconTile?: ComponentLike; + Subtitle?: ComponentLike; + Title?: ComponentLike; + } + ]; + }; + Element: HTMLElement; +} +declare const HdsPageHeader: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeader; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/index.d.ts.map b/packages/components/declarations/components/hds/page-header/index.d.ts.map new file mode 100644 index 0000000000..94083b9560 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAC7D,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,OAAO,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;gBACvD,MAAM,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;gBACrD,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC9C,WAAW,CAAC,EAAE,aAAa,CAAC,iCAAiC,CAAC,CAAC;gBAC/D,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC3C,QAAQ,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;gBAC/C,QAAQ,CAAC,EAAE,aAAa,CAAC,8BAA8B,CAAC,CAAC;gBACzD,KAAK,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;aACpD;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,wFAAkD,CAAC;AAEtE,eAAe,aAAa,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/subtitle.d.ts b/packages/components/declarations/components/hds/page-header/subtitle.d.ts new file mode 100644 index 0000000000..496a767368 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/subtitle.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextBodySignature } from '../text/body'; +export interface HdsPageHeaderSubtitleSignature { + Args: HdsTextBodySignature['Args']; + Blocks: { + default: []; + }; + Element: HdsTextBodySignature['Element']; +} +declare const HdsPageHeaderSubtitle: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeaderSubtitle; +//# sourceMappingURL=subtitle.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/subtitle.d.ts.map b/packages/components/declarations/components/hds/page-header/subtitle.d.ts.map new file mode 100644 index 0000000000..8875afe5ac --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/subtitle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"subtitle.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/subtitle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,oBAAoB,CAAC,MAAM,CAAC,CAAC;IACnC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,QAAA,MAAM,qBAAqB,gGAC8B,CAAC;AAE1D,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/title.d.ts b/packages/components/declarations/components/hds/page-header/title.d.ts new file mode 100644 index 0000000000..bcc461dcf2 --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/title.d.ts @@ -0,0 +1,15 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsTextDisplaySignature } from '../text/display'; +export interface HdsPageHeaderTitleSignature { + Args: HdsTextDisplaySignature['Args']; + Blocks: { + default: []; + }; + Element: HdsTextDisplaySignature['Element']; +} +declare const HdsPageHeaderTitle: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsPageHeaderTitle; +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/page-header/title.d.ts.map b/packages/components/declarations/components/hds/page-header/title.d.ts.map new file mode 100644 index 0000000000..f6436e668f --- /dev/null +++ b/packages/components/declarations/components/hds/page-header/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/page-header/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACtC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/compact/index.d.ts b/packages/components/declarations/components/hds/pagination/compact/index.d.ts new file mode 100644 index 0000000000..76a8ac9027 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/compact/index.d.ts @@ -0,0 +1,64 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsPaginationRoutingProps, HdsPaginationDirections } from '../types'; +import type { HdsInteractiveSignature } from '../../interactive'; +type HdsInteractiveQuery = HdsInteractiveSignature['Args']['query']; +type HdsPaginationCompactRoutingQueryProps = HdsPaginationRoutingProps & { + queryNext?: HdsInteractiveQuery; + queryPrev?: HdsInteractiveQuery; +}; +type HdsPaginationQueryFunction = (page: HdsPaginationDirections, pageSize?: number) => HdsInteractiveQuery; +interface HdsPaginationCompactArgs extends HdsPaginationRoutingProps { + ariaLabel?: string; + showLabels?: boolean; + isDisabledPrev?: boolean; + isDisabledNext?: boolean; + showSizeSelector?: boolean; + sizeSelectorLabel?: string; + pageSizes?: number[]; + currentPageSize?: number; + queryFunction?: HdsPaginationQueryFunction; + onPageChange?: (page: HdsPaginationDirections) => void; + onPageSizeChange?: (pageSize: number) => void; +} +interface HdsPaginationCompactArgsControlledBase extends HdsPaginationCompactArgs { + queryFunction: HdsPaginationQueryFunction; +} +interface HdsPaginationCompactArgsControlledWithModel extends HdsPaginationCompactArgsControlledBase { + model: string | number; +} +interface HdsPaginationCompactArgsControlledWithModels extends HdsPaginationCompactArgsControlledBase { + models: Array; +} +interface HdsPaginationCompactArgsControlledWithRoute extends HdsPaginationCompactArgsControlledBase { + route: string; +} +type HdsPaginationCompactArgsControlled = HdsPaginationCompactArgsControlledWithModel | HdsPaginationCompactArgsControlledWithModels | HdsPaginationCompactArgsControlledWithRoute; +interface HdsPaginationCompactArgsUncontrolled extends HdsPaginationCompactArgs { + queryFunction?: undefined; +} +export interface HdsPaginationCompactSignature { + Args: HdsPaginationCompactArgsControlled | HdsPaginationCompactArgsUncontrolled; + Element: HTMLDivElement; +} +export declare const DEFAULT_PAGE_SIZES: number[]; +export default class HdsPaginationCompact extends Component { + _currentPageSize: number | undefined; + isControlled: boolean; + showLabels: boolean; + showSizeSelector: boolean; + constructor(owner: unknown, args: HdsPaginationCompactSignature['Args']); + get ariaLabel(): string; + get currentPageSize(): number | undefined; + set currentPageSize(value: number | undefined); + get pageSizes(): number[]; + buildQueryParamsObject(page: HdsPaginationDirections, pageSize?: number): HdsInteractiveQuery; + get routing(): HdsPaginationCompactRoutingQueryProps; + onPageChange(newPage: HdsPaginationDirections): void; + onPageSizeChange(newPageSize: number): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/compact/index.d.ts.map b/packages/components/declarations/components/hds/pagination/compact/index.d.ts.map new file mode 100644 index 0000000000..79ce9e32a6 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/compact/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/compact/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACxB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,KAAK,mBAAmB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAEpE,KAAK,qCAAqC,GAAG,yBAAyB,GAAG;IACvE,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,SAAS,CAAC,EAAE,mBAAmB,CAAC;CACjC,CAAC;AAEF,KAAK,0BAA0B,GAAG,CAChC,IAAI,EAAE,uBAAuB,EAC7B,QAAQ,CAAC,EAAE,MAAM,KACd,mBAAmB,CAAC;AAEzB,UAAU,wBAAyB,SAAQ,yBAAyB;IAClE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IACrB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,aAAa,CAAC,EAAE,0BAA0B,CAAC;IAC3C,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,uBAAuB,KAAK,IAAI,CAAC;IACvD,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/C;AAED,UAAU,sCACR,SAAQ,wBAAwB;IAChC,aAAa,EAAE,0BAA0B,CA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ages/components/declarations/components/hds/pagination/info/index.d.ts b/packages/components/declarations/components/hds/pagination/info/index.d.ts new file mode 100644 index 0000000000..6e60e17cdc --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/info/index.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsPaginationNumberedSignature } from '../numbered/index'; +import type { HdsTextBodySignature } from '../../text/body'; +export interface HdsPaginationInfoSignature { + Args: { + itemsRangeStart: number; + itemsRangeEnd: number; + showTotalItems?: HdsPaginationNumberedSignature['Args']['showTotalItems']; + totalItems: HdsPaginationNumberedSignature['Args']['totalItems']; + }; + Element: HdsTextBodySignature['Element']; +} +export default class HdsPaginationInfo extends Component { + get showTotalItems(): boolean; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/info/index.d.ts.map b/packages/components/declarations/components/hds/pagination/info/index.d.ts.map new file mode 100644 index 0000000000..2ab517a965 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/info/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/info/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE;QACJ,eAAe,EAAE,MAAM,CAAC;QACxB,aAAa,EAAE,MAAM,CAAC;QACtB,cAAc,CAAC,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,CAAC;QAC1E,UAAU,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KAClE,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;CAC1C;AAED,MAAM,CAAC,OAAO,OAAO,iBAAkB,SAAQ,SAAS,CAAC,0BAA0B,CAAC;IAClF,IAAI,cAAc,IAAI,OAAO,CAE5B;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts b/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts new file mode 100644 index 0000000000..1ced98f85f --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon/index.ts'; +import type { HdsInteractiveSignature } from '../../interactive'; +import type { HdsPaginationDirections, HdsPaginationDirectionAriaLabels, HdsPaginationDirectionLabels } from '../types'; +interface HdsPaginationControlArrowContent { + label: HdsPaginationDirectionLabels; + icon: HdsIconSignature['Args']['name']; + ariaLabel: HdsPaginationDirectionAriaLabels; +} +interface HdsPaginationControlArrowArgs { + direction: HdsPaginationDirections; + disabled?: boolean; + showLabel?: boolean; + onClick?: (direction: HdsPaginationDirections) => void; +} +export interface HdsPaginationControlArrowSignature { + Args: HdsPaginationControlArrowArgs & HdsInteractiveSignature['Args']; + Element: HdsInteractiveSignature['Element']; +} +export declare const DIRECTIONS: HdsPaginationDirections[]; +export default class HdsPaginationControlArrow extends Component { + get content(): HdsPaginationControlArrowContent; + get showLabel(): boolean; + get classNames(): string; + onClick(): void; +} +export {}; +//# sourceMappingURL=arrow.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts.map b/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts.map new file mode 100644 index 0000000000..0c51237af5 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/arrow.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"arrow.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/nav/arrow.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAS3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,KAAK,EACV,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC7B,MAAM,UAAU,CAAC;AAElB,UAAU,gCAAgC;IACxC,KAAK,EAAE,4BAA4B,CAAC;IACpC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,SAAS,EAAE,gCAAgC,CAAC;CAC7C;AAED,UAAU,6BAA6B;IACrC,SAAS,EAAE,uBAAuB,CAAC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACxD;AAED,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE,6BAA6B,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACtE,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,eAAO,MAAM,UAAU,EAAE,uBAAuB,EAG/C,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,SAAS,CAAC,kCAAkC,CAAC;IAClG,IAAI,OAAO,IAAI,gCAAgC,CA2B9C;IAED,IAAI,SAAS,IAAI,OAAO,CAIvB;IAED,IAAI,UAAU,IAAI,MAAM,CAQvB;IAGD,OAAO,IAAI,IAAI;CA4EhB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts b/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts new file mode 100644 index 0000000000..38972d3c43 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts @@ -0,0 +1,6 @@ +export interface HdsApplicationPaginationNavEllipsisSignature { + Element: HTMLDivElement; +} +declare const HdsApplicationPaginationNavEllipsis: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsApplicationPaginationNavEllipsis; +//# sourceMappingURL=ellipsis.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts.map b/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts.map new file mode 100644 index 0000000000..229ef13769 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/ellipsis.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"ellipsis.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/nav/ellipsis.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,4CAA4C;IAC3D,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,mCAAmC,8GAC8B,CAAC;AAExE,eAAe,mCAAmC,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/number.d.ts b/packages/components/declarations/components/hds/pagination/nav/number.d.ts new file mode 100644 index 0000000000..34623a8b84 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/number.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsInteractiveSignature } from '../../interactive'; +interface HdsPaginationNavNumberArgs { + page: number; + onClick: (page: number) => void; + isSelected: boolean; +} +export interface HdsPaginationNavNumberSignature { + Args: HdsPaginationNavNumberArgs & HdsInteractiveSignature['Args']; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsPaginationControlNumber extends Component { + get page(): number; + get classNames(): string; + onClick(): void; +} +export {}; +//# sourceMappingURL=number.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/nav/number.d.ts.map b/packages/components/declarations/components/hds/pagination/nav/number.d.ts.map new file mode 100644 index 0000000000..b2ebabb107 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/nav/number.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"number.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/nav/number.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,UAAU,0BAA0B;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,0BAA0B,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC;IACnE,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IAChG,IAAI,IAAI,IAAI,MAAM,CASjB;IAED,IAAI,UAAU,IAAI,MAAM,CAWvB;IAGD,OAAO,IAAI,IAAI;CAuChB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/numbered/index.d.ts b/packages/components/declarations/components/hds/pagination/numbered/index.d.ts new file mode 100644 index 0000000000..d29a2fccce --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/numbered/index.d.ts @@ -0,0 +1,91 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsPaginationPage, HdsPaginationRoutingProps, HdsPaginationElliptizedPageArray, HdsPaginationElliptizedPageArrayItem } from '../types'; +import type { HdsInteractiveSignature } from '../../interactive/index.ts'; +interface ElliptizeProps { + pages: number[]; + current: number; + limit?: number; +} +type HdsInteractiveQuery = HdsInteractiveSignature['Args']['query']; +type HdsPaginationNumberedRoutingQueryProps = HdsPaginationRoutingProps & { + queryNext?: HdsInteractiveQuery; + queryPrev?: HdsInteractiveQuery; + queryPages?: Record; +}; +type HdsPaginationQueryFunction = (page: number, pageSize: number) => HdsInteractiveQuery; +interface HdsPaginationNumberedArgs extends HdsPaginationRoutingProps { + ariaLabel?: string; + totalItems: number; + showLabels?: boolean; + isTruncated?: boolean; + currentPage?: number; + showInfo?: boolean; + showPageNumbers?: boolean; + showTotalItems?: boolean; + showSizeSelector?: boolean; + sizeSelectorLabel?: string; + pageSizes?: number[]; + currentPageSize?: number; + queryFunction?: HdsPaginationQueryFunction; + onPageChange?: (page: number, pageSize: number) => unknown; + onPageSizeChange?: (pageSize: number) => unknown; +} +interface HdsPaginationNumberedArgsControlledBase extends HdsPaginationNumberedArgs { + currentPage: number; + currentPageSize: number; + queryFunction: HdsPaginationQueryFunction; +} +interface HdsPaginationNumberedArgsControlledWithModel extends HdsPaginationNumberedArgsControlledBase { + model: string | number; +} +interface HdsPaginationNumberedArgsControlledWithModels extends HdsPaginationNumberedArgsControlledBase { + models: Array; +} +interface HdsPaginationNumberedArgsControlledWithRoute extends HdsPaginationNumberedArgsControlledBase { + route: string; +} +type HdsPaginationNumberedArgsControlled = HdsPaginationNumberedArgsControlledWithModel | HdsPaginationNumberedArgsControlledWithModels | HdsPaginationNumberedArgsControlledWithRoute; +interface HdsPaginationNumberedArgsUncontrolled extends HdsPaginationNumberedArgs { + queryFunction?: undefined; +} +export interface HdsPaginationNumberedSignature { + Args: HdsPaginationNumberedArgsControlled | HdsPaginationNumberedArgsUncontrolled; + Element: HTMLDivElement; +} +export declare const DEFAULT_PAGE_SIZES: number[]; +export declare const elliptize: ({ pages, current, limit, }: ElliptizeProps) => HdsPaginationElliptizedPageArray; +export default class HdsPaginationNumbered extends Component { + _currentPage: number; + _currentPageSize: number | undefined; + isControlled: boolean; + showInfo: boolean; + showLabels: boolean; + showSizeSelector: boolean; + showPageNumbers: boolean; + isTruncated: boolean; + constructor(owner: unknown, args: HdsPaginationNumberedSignature['Args']); + get ariaLabel(): string; + get currentPage(): number; + set currentPage(value: number); + get currentPageSize(): number; + set currentPageSize(value: number); + get pageSizes(): number[]; + get itemsRangeStart(): number; + get itemsRangeEnd(): number; + get pages(): HdsPaginationElliptizedPageArray; + get totalPages(): number; + buildQueryParamsObject(page: HdsPaginationElliptizedPageArrayItem, pageSize: number): HdsInteractiveQuery; + get routing(): HdsPaginationNumberedRoutingQueryProps; + get isDisabledPrev(): boolean; + get isDisabledNext(): boolean; + onPageChange(page: HdsPaginationPage): void; + onPageSizeChange(newPageSize: number): void; + elliptizedPageArrayItemAsNumber: (item: HdsPaginationElliptizedPageArrayItem) => number; + getPageNumberQuery(page: HdsPaginationElliptizedPageArrayItem): Record | undefined; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/numbered/index.d.ts.map b/packages/components/declarations/components/hds/pagination/numbered/index.d.ts.map new file mode 100644 index 0000000000..5823bac44c --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/numbered/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/numbered/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,KAAK,EACV,iBAAiB,EACjB,yBAAyB,EACzB,gCAAgC,EAChC,oCAAoC,EACrC,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,KAAK,mBAAmB,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC;AAEpE,KAAK,sCAAsC,GAAG,yBAAyB,GAAG;IACxE,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sCAAsC,CAmCpD;IAED,IAAI,cAAc,YAEjB;IAED,IAAI,cAAc,YAEjB;IAGD,YAAY,CAAC,IAAI,EAAE,iBAAiB;IA2BpC,gBAAgB,CAAC,WAAW,EAAE,MAAM;IAepC,+BAA+B,SACvB,oCAAoC,KACzC,MAAM,CAMP;IAEF,kBAAkB,CAAC,IAAI,EAAE,oCAAoC;CAyE9D"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts b/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts new file mode 100644 index 0000000000..8f59157372 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsPaginationSizeSelectorSignature { + Args: { + pageSizes: number[]; + label?: string; + selectedSize?: number; + onChange?: (size: number) => void; + }; + Element: HTMLDivElement; +} +export default class HdsPaginationSizeSelector extends Component { + SizeSelectorId: string; + get pageSizes(): number[]; + get selectedSize(): number | undefined; + get label(): string; + onChange(e: Event): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts.map b/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts.map new file mode 100644 index 0000000000..6fabee9c6a --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/size-selector/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/pagination/size-selector/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,MAAM,WAAW,kCAAkC;IACjD,IAAI,EAAE;QACJ,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;KACnC,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,yBAA0B,SAAQ,SAAS,CAAC,kCAAkC,CAAC;IAClG,cAAc,SAA+C;IAE7D,IAAI,SAAS,IAAI,MAAM,EAAE,CASxB;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAWrC;IAED,IAAI,KAAK,IAAI,MAAM,CAIlB;IAGD,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,IAAI;CA8DzB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/types.d.ts b/packages/components/declarations/components/hds/pagination/types.d.ts new file mode 100644 index 0000000000..52b8ee02e0 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/types.d.ts @@ -0,0 +1,25 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsInteractiveSignature } from '../interactive'; +export declare enum HdsPaginationDirectionValues { + Next = "next", + Prev = "prev" +} +export type HdsPaginationDirections = `${HdsPaginationDirectionValues}`; +export type HdsPaginationPage = HdsPaginationDirections | number; +export declare enum HdsPaginationDirectionAriaLabelValues { + Prev = "Previous page", + Next = "Next page" +} +export type HdsPaginationDirectionAriaLabels = `${HdsPaginationDirectionAriaLabelValues}`; +export declare enum HdsPaginationDirectionLabelValues { + Prev = "Previous", + Next = "Next" +} +export type HdsPaginationDirectionLabels = `${HdsPaginationDirectionLabelValues}`; +export type HdsPaginationElliptizedPageArrayItem = string | number; +export type HdsPaginationElliptizedPageArray = HdsPaginationElliptizedPageArrayItem[]; +export type HdsPaginationRoutingProps = Pick; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/pagination/types.d.ts.map b/packages/components/declarations/components/hds/pagination/types.d.ts.map new file mode 100644 index 0000000000..c4207e2ea2 --- /dev/null +++ b/packages/components/declarations/components/hds/pagination/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/pagination/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D,oBAAY,4BAA4B;IACtC,IAAI,SAAS;IACb,IAAI,SAAS;CACd;AAED,MAAM,MAAM,uBAAuB,GAAG,GAAG,4BAA4B,EAAE,CAAC;AAExE,MAAM,MAAM,iBAAiB,GAAG,uBAAuB,GAAG,MAAM,CAAC;AAEjE,oBAAY,qCAAqC;IAC/C,IAAI,kBAAkB;IACtB,IAAI,cAAc;CACnB;AAED,MAAM,MAAM,gCAAgC,GAC1C,GAAG,qCAAqC,EAAE,CAAC;AAE7C,oBAAY,iCAAiC;IAC3C,IAAI,aAAa;IACjB,IAAI,SAAS;CACd;AAED,MAAM,MAAM,4BAA4B,GACtC,GAAG,iCAAiC,EAAE,CAAC;AAEzC,MAAM,MAAM,oCAAoC,GAAG,MAAM,GAAG,MAAM,CAAC;AAEnE,MAAM,MAAM,gCAAgC,GAC1C,oCAAoC,EAAE,CAAC;AAEzC,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,uBAAuB,CAAC,MAAM,CAAC,EAC/B,OAAO,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CACzC,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/popover-primitive/index.d.ts b/packages/components/declarations/components/hds/popover-primitive/index.d.ts new file mode 100644 index 0000000000..4b263a046f --- /dev/null +++ b/packages/components/declarations/components/hds/popover-primitive/index.d.ts @@ -0,0 +1,91 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts'; +import type { ModifierLike } from '@glint/template'; +export interface HdsPopoverPrimitiveSignature { + Args: { + isOpen?: boolean; + enableSoftEvents?: boolean; + enableClickEvents?: boolean; + onOpen?: () => void; + onClose?: () => void; + }; + Blocks: { + default: [ + { + setupPrimitiveContainer: ModifierLike; + setupPrimitiveToggle: ModifierLike; + setupPrimitivePopover: ModifierLike; + toggleElement?: HTMLButtonElement; + popoverElement?: HTMLElement; + isOpen: boolean; + showPopover: () => void; + hidePopover: () => void; + togglePopover: () => void; + } + ]; + }; +} +interface SetupPrimitiveContainerModifier { + Element: HTMLElement; +} +export interface SetupPrimitiveToggleModifier { + Element: HTMLButtonElement; +} +export interface SetupPrimitivePopoverModifier { + Element: HTMLElement; + Args: { + Positional: []; + Named: { + anchoredPositionOptions: FloatingUIOptions; + }; + }; +} +export default class HdsPopoverPrimitive extends Component { + isOpen: boolean; + isClosing: boolean; + containerElement?: HTMLElement; + toggleElement?: HTMLButtonElement; + popoverElement?: HTMLElement; + enableSoftEvents: boolean; + enableClickEvents: boolean; + timer?: ReturnType | null; + constructor(owner: unknown, args: HdsPopoverPrimitiveSignature['Args']); + setupPrimitiveContainer: import("ember-modifier").FunctionBasedModifier<{ + Element: HTMLElement; + Args: { + Named: import("ember-modifier/-private/signature").EmptyObject; + Positional: []; + }; + }>; + setupPrimitiveToggle: import("ember-modifier").FunctionBasedModifier<{ + Element: HTMLButtonElement; + Args: { + Named: import("ember-modifier/-private/signature").EmptyObject; + Positional: []; + }; + }>; + setupPrimitivePopover: import("ember-modifier").FunctionBasedModifier<{ + Args: { + Positional: unknown[]; + Named: { + anchoredPositionOptions: FloatingUIOptions; + }; + }; + Element: HTMLElement; + }>; + showPopover(): void; + hidePopover(): void; + togglePopover(): void; + onBeforeTogglePopover(event: ToggleEvent): void; + onTogglePopover(event: ToggleEvent): void; + onMouseEnter(): void; + onFocusIn(): void; + onMouseLeave(): void; + onFocusOut(event: FocusEvent): void; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/popover-primitive/index.d.ts.map b/packages/components/declarations/components/hds/popover-primitive/index.d.ts.map new file mode 100644 index 0000000000..9a449c749b --- /dev/null +++ b/packages/components/declarations/components/hds/popover-primitive/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/popover-primitive/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAW3C,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;QAC5B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;QACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,uBAAuB,EAAE,YAAY,CAAC,+BAA+B,CAAC,CAAC;gBACvE,oBAAoB,EAAE,YAAY,CAAC,4BAA4B,CAAC,CAAC;gBACjE,qBAAqB,EAAE,YAAY,CAAC,6BAA6B,CAAC,CAAC;gBACnE,aAAa,CAAC,EAAE,iBAAiB,CAAC;gBAClC,cAAc,CAAC,EAAE,WAAW,CAAC;gBAC7B,MAAM,EAAE,OAAO,CAAC;gBAChB,WAAW,EAAE,MAAM,IAAI,CAAC;gBACxB,WAAW,EAAE,MAAM,IAAI,CAAC;gBACxB,aAAa,EAAE,MAAM,IAAI,CAAC;aAC3B;SACF,CAAC;KACH,CAAC;CACH;AAED,UAAU,+BAA+B;IACvC,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,EAAE,CAAC;QACf,KAAK,EAAE;YAAE,uBAAuB,EAAE,iBAAiB,CAAA;SAAE,CAAC;KACvD,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAS,CAAC,4BAA4B,CAAC;IAC7E,MAAM,UAAC;IACP,SAAS,UAAS;IAC3B,gBAAgB,CAAC,EAAE,WAAW,CAAC;IAC/B,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,cAAc,CAAC,EAAE,WAAW,CAAC;IAE7B,gBAAgB,UAAuC;IAEvD,iBAAiB,UAAwC;IACzD,KAAK,CAAC,EAAE,UAAU,CAAC,OAAO,UAAU,CAAC,GAAG,IAAI,CAAC;gBAEjC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,4BAA4B,CAAC,MAAM,CAAC;IAKtE,uBAAuB;;;;;;OAiBrB;IAEF,oBAAoB;;;;;;OASlB;IAEF,qBAAqB;;;;yCAIiB,iBAAiB;;;;OA6DrD;IAGF,WAAW,IAAI,IAAI;IAkBnB,WAAW,IAAI,IAAI;IAkBnB,aAAa,IAAI,IAAI;IAmBrB,qBAAqB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IAW/C,eAAe,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;IA+BzC,YAAY,IAAI,IAAI;IAQpB,SAAS,IAAI,IAAI;IAWjB,YAAY,IAAI,IAAI;IAKpB,UAAU,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;CAqCpC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/reveal/index.d.ts b/packages/components/declarations/components/hds/reveal/index.d.ts new file mode 100644 index 0000000000..ca67efd09a --- /dev/null +++ b/packages/components/declarations/components/hds/reveal/index.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsDisclosurePrimitiveSignature } from '../disclosure-primitive'; +import type { HdsRevealToggleButtonSignature } from './toggle/button'; +export interface HdsRevealSignature { + Args: { + text: HdsRevealToggleButtonSignature['Args']['text']; + textWhenOpen?: HdsRevealToggleButtonSignature['Args']['text']; + isOpen?: HdsRevealToggleButtonSignature['Args']['isOpen']; + }; + Blocks: { + default: []; + }; + Element: HdsDisclosurePrimitiveSignature['Element']; +} +export default class HdsReveal extends Component { + /** + * Generates a unique ID for the Content + * + * @param contentId + */ + contentId: string; + /** + * @param getText + * @type {string} + * @description A local function that emulates a getter to compute the value of the `@text` argument for the button (mainly to make TypeScript happy) + */ + getText: (isOpen: boolean) => string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/reveal/index.d.ts.map b/packages/components/declarations/components/hds/reveal/index.d.ts.map new file mode 100644 index 0000000000..5ca1675284 --- /dev/null +++ b/packages/components/declarations/components/hds/reveal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/reveal/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AAEtE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACrD,YAAY,CAAC,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QAC9D,MAAM,CAAC,EAAE,8BAA8B,CAAC,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;KAC3D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC;CACrD;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS,CAAC,kBAAkB,CAAC;IAClE;;;;OAIG;IACH,SAAS,SAA8B;IAEvC;;;;OAIG;IACH,OAAO,WAAY,OAAO,KAAG,MAAM,CAUjC;CAkCH"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/reveal/toggle/button.d.ts b/packages/components/declarations/components/hds/reveal/toggle/button.d.ts new file mode 100644 index 0000000000..0198d85733 --- /dev/null +++ b/packages/components/declarations/components/hds/reveal/toggle/button.d.ts @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsButtonSignature } from '../../button/'; +export interface HdsRevealToggleButtonSignature { + Args: { + text: string; + isOpen?: boolean; + }; + Element: HdsButtonSignature['Element']; +} +export default class HdsRevealToggleButton extends Component { + /** + * Get the class names to apply to the component. + * @method ToggleButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/reveal/toggle/button.d.ts.map b/packages/components/declarations/components/hds/reveal/toggle/button.d.ts.map new file mode 100644 index 0000000000..3ff427625c --- /dev/null +++ b/packages/components/declarations/components/hds/reveal/toggle/button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/reveal/toggle/button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,MAAM,CAAC,EAAE,OAAO,CAAC;KAClB,CAAC;IACF,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC;AAED,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,SAAS,CAAC,8BAA8B,CAAC;IAC1F;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAaF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts b/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts new file mode 100644 index 0000000000..5a87762ff0 --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts @@ -0,0 +1,43 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ModifierLike } from '@glint/template'; +import type { SetupPrimitivePopoverModifier } from '../popover-primitive'; +import type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts'; +export interface HdsRichTooltipBubbleSignature { + Args: { + placement?: FloatingUIOptions['placement']; + offset?: FloatingUIOptions['offsetOptions']; + enableCollisionDetection?: FloatingUIOptions['enableCollisionDetection']; + width?: string; + height?: string; + isOpen?: boolean; + popoverId: string; + arrowId: string; + setupPrimitivePopover: ModifierLike; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsRichTooltipBubble extends Component { + /** + * @param placement + * @type {string} + * @description Determines the position of the "popover" + */ + get placement(): FloatingUIOptions['placement']; + get enableCollisionDetection(): FloatingUIOptions['enableCollisionDetection']; + get sizingStyles(): Record; + get anchoredPositionOptions(): { + placement: FloatingUIOptions['placement']; + offsetOptions: FloatingUIOptions['offsetOptions']; + enableCollisionDetection: FloatingUIOptions['enableCollisionDetection']; + arrowSelector: string; + arrowPadding: FloatingUIOptions['arrowPadding']; + }; +} +//# sourceMappingURL=bubble.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts.map b/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts.map new file mode 100644 index 0000000000..1ee43be680 --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/bubble.d.ts.map @@ -0,0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,EAAE,iBAAiB,CAAC,eAAe,CAAC,CAAC;QAClD,wBAAwB,EAAE,iBAAiB,CAAC,0BAA0B,CAAC,CAAC;QACxE,aAAa,EAAE,MAAM,CAAC;QACtB,YAAY,EAAE,iBAAiB,CAAC,cAAc,CAAC,CAAC;KACjD,CAUA;CAkCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/index.d.ts b/packages/components/declarations/components/hds/rich-tooltip/index.d.ts new file mode 100644 index 0000000000..9da087a20f --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/index.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { WithBoundArgs } from '@glint/template'; +import type { HdsPopoverPrimitiveSignature } from '../popover-primitive'; +import HdsRichTooltipToggle from './toggle.ts'; +import HdsRichTooltipBubble from './bubble.ts'; +export interface HdsRichTooltipSignature { + Args: Omit; + Blocks: { + default: [ + { + Toggle?: WithBoundArgs; + Bubble?: WithBoundArgs; + isOpen?: boolean; + close?: () => void; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsRichTooltip extends Component { + private _elementId; + private _arrowId; + private _popoverId; + get enableSoftEvents(): boolean; + get enableClickEvents(): boolean; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/index.d.ts.map b/packages/components/declarations/components/hds/rich-tooltip/index.d.ts.map new file mode 100644 index 0000000000..d63c8dd202 --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/rich-tooltip/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACzE,OAAO,oBAAoB,MAAM,aAAa,CAAC;AAC/C,OAAO,oBAAoB,MAAM,aAAa,CAAC;AAE/C,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,IAAI,CAAC,4BAA4B,CAAC,MAAM,CAAC,EAAE,kBAAkB,CAAC,CAAC;IACrE,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CACpB,OAAO,oBAAoB,EAC3B,WAAW,GAAG,sBAAsB,GAAG,QAAQ,CAChD,CAAC;gBACF,MAAM,CAAC,EAAE,aAAa,CACpB,OAAO,oBAAoB,EAC3B,SAAS,GAAG,WAAW,GAAG,uBAAuB,GAAG,QAAQ,CAC7D,CAAC;gBACF,MAAM,CAAC,EAAE,OAAO,CAAC;gBACjB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;aACpB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E,OAAO,CAAC,UAAU,CAA8B;IAChD,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,UAAU,CAAwC;IAE1D,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,iBAAiB,IAAI,OAAO,CAE/B;CA2BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts b/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts new file mode 100644 index 0000000000..33df98149d --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts @@ -0,0 +1,58 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsRichTooltipToggleIconPositionValues } from './types.ts'; +import type { HdsRichTooltipToggleIconPositions, HdsRichTooltipToggleSizes } from './types.ts'; +import type { HdsIconSignature } from '../icon'; +import type { ModifierLike } from '@glint/template'; +import type { SetupPrimitiveToggleModifier } from '../popover-primitive'; +export declare const ICONPOSITIONS: string[]; +export declare const DEFAULT_ICONPOSITION = HdsRichTooltipToggleIconPositionValues.Trailing; +export declare const SIZES: string[]; +export interface HdsRichTooltipToggleSignature { + Args: { + text?: string; + icon?: HdsIconSignature['Args']['name']; + iconPosition?: HdsRichTooltipToggleIconPositions; + size?: undefined | HdsRichTooltipToggleSizes; + isInline?: boolean; + isOpen?: boolean; + popoverId: string; + setupPrimitiveToggle: ModifierLike; + }; + Blocks: { + default: []; + }; + Element: HTMLButtonElement; +} +export default class HdsRichTooltipToggle extends Component { + /** + * @param isInline + * @type {boolean} + * @default true + * @description sets display inline for the element + */ + get isInline(): boolean; + /** + * @param iconPosition + * @type {string} + * @default leading + * @description Positions the icon before or after the text; allowed values are `leading` or `trailing` + */ + get iconPosition(): HdsRichTooltipToggleIconPositions; + /** + * @param size + * @type {string} + * @default medium + * @description The size of the "info" text; acceptable values are `small`, `medium`, `large` + */ + get size(): HdsRichTooltipToggleSizes | undefined; + /** + * Get the class names to apply to the component. + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=toggle.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts.map b/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts.map new file mode 100644 index 0000000000..20c965cbf8 --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/toggle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/rich-tooltip/toggle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,sCAAsC,EAEvC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,iCAAiC,EACjC,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzE,eAAO,MAAM,aAAa,EAAE,MAAM,EAEjC,CAAC;AACF,eAAO,MAAM,oBAAoB,kDACgB,CAAC;AAClD,eAAO,MAAM,KAAK,EAAE,MAAM,EAAkD,CAAC;AAE7E,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,YAAY,CAAC,EAAE,iCAAiC,CAAC;QACjD,IAAI,CAAC,EAAE,SAAS,GAAG,yBAAyB,CAAC;QAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,SAAS,EAAE,MAAM,CAAC;QAClB,oBAAoB,EAAE,YAAY,CAAC,4BAA4B,CAAC,CAAC;KAClE,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAS,CAAC,6BAA6B,CAAC;IACxF;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,OAAO,CAGtB;IAED;;;;;OAKG;IACH,IAAI,YAAY,IAAI,iCAAiC,CAWpD;IAED;;;;;OAKG;IACH,IAAI,IAAI,IAAI,yBAAyB,GAAG,SAAS,CAgBhD;IAED;;;OAGG;IACH,IAAI,UAAU,IAAI,MAAM,CAgBvB;CAkDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/types.d.ts b/packages/components/declarations/components/hds/rich-tooltip/types.d.ts new file mode 100644 index 0000000000..7de9a497dc --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/types.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsRichTooltipToggleIconPositionValues { + Leading = "leading", + Trailing = "trailing" +} +export type HdsRichTooltipToggleIconPositions = `${HdsRichTooltipToggleIconPositionValues}`; +export declare enum HdsRichTooltipToggleSizeValues { + Small = "small", + Medium = "medium", + Large = "large" +} +export type HdsRichTooltipToggleSizes = `${HdsRichTooltipToggleSizeValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/rich-tooltip/types.d.ts.map b/packages/components/declarations/components/hds/rich-tooltip/types.d.ts.map new file mode 100644 index 0000000000..1bb1026225 --- /dev/null +++ b/packages/components/declarations/components/hds/rich-tooltip/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/rich-tooltip/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,sCAAsC;IAChD,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,iCAAiC,GAC3C,GAAG,sCAAsC,EAAE,CAAC;AAE9C,oBAAY,8BAA8B;IACxC,KAAK,UAAU;IACf,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,yBAAyB,GAAG,GAAG,8BAA8B,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/segmented-group/index.d.ts b/packages/components/declarations/components/hds/segmented-group/index.d.ts new file mode 100644 index 0000000000..7afbb8fb03 --- /dev/null +++ b/packages/components/declarations/components/hds/segmented-group/index.d.ts @@ -0,0 +1,27 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { ComponentLike } from '@glint/template'; +import type { HdsButtonSignature } from '../button'; +import type { HdsDropdownSignature } from '../dropdown'; +import type { HdsFormSelectBaseSignature } from '../form/select/base'; +import type { HdsFormTextInputBaseSignature } from '../form/text-input/base'; +import type { HdsYieldSignature } from '../yield'; +export interface HdsSegmentedGroupSignature { + Blocks: { + default: [ + { + Button?: ComponentLike; + Dropdown?: ComponentLike; + Select?: ComponentLike; + TextInput?: ComponentLike; + Generic?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +declare const HdsSegmentedGroup: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSegmentedGroup; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/segmented-group/index.d.ts.map b/packages/components/declarations/components/hds/segmented-group/index.d.ts.map new file mode 100644 index 0000000000..ea626f899c --- /dev/null +++ b/packages/components/declarations/components/hds/segmented-group/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/segmented-group/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,MAAM,WAAW,0BAA0B;IACzC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,aAAa,CAAC,kBAAkB,CAAC,CAAC;gBAC3C,QAAQ,CAAC,EAAE,aAAa,CAAC,oBAAoB,CAAC,CAAC;gBAC/C,MAAM,CAAC,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;gBACnD,SAAS,CAAC,EAAE,aAAa,CAAC,6BAA6B,CAAC,CAAC;gBACzD,OAAO,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC5C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,iBAAiB,4FAAsD,CAAC;AAE9E,eAAe,iBAAiB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/separator/index.d.ts b/packages/components/declarations/components/hds/separator/index.d.ts new file mode 100644 index 0000000000..9a3195bdfd --- /dev/null +++ b/packages/components/declarations/components/hds/separator/index.d.ts @@ -0,0 +1,33 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsSeparatorSpacingValues } from './types.ts'; +import type { HdsSeparatorSpacing } from './types.ts'; +export declare const DEFAULT_SPACING = HdsSeparatorSpacingValues.TwentyFour; +export declare const SPACING: string[]; +export interface HdsSeparatorSignature { + Args: { + spacing?: HdsSeparatorSpacing; + }; + Element: HTMLElement; +} +export default class HdsSeparator extends Component { + /** + * Sets the margin for the separator + * Accepted values: 24, 0 + * + * @param spacing + * @type {HdsSeparatorSpacing} + * @default 24 + */ + get spacing(): HdsSeparatorSpacing; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/separator/index.d.ts.map b/packages/components/declarations/components/hds/separator/index.d.ts.map new file mode 100644 index 0000000000..d266dbdc72 --- /dev/null +++ b/packages/components/declarations/components/hds/separator/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/separator/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,yBAAyB,EAAE,MAAM,YAAY,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,eAAO,MAAM,eAAe,uCAAuC,CAAC;AACpE,eAAO,MAAM,OAAO,EAAE,MAAM,EAA6C,CAAC;AAE1E,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,mBAAmB,CAAC;KAC/B,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;;;;;OAOG;IACH,IAAI,OAAO,IAAI,mBAAmB,CAWjC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAOvB;CAYF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/separator/types.d.ts b/packages/components/declarations/components/hds/separator/types.d.ts new file mode 100644 index 0000000000..e224e47995 --- /dev/null +++ b/packages/components/declarations/components/hds/separator/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsSeparatorSpacingValues { + Zero = "0", + TwentyFour = "24" +} +export type HdsSeparatorSpacing = `${HdsSeparatorSpacingValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/separator/types.d.ts.map b/packages/components/declarations/components/hds/separator/types.d.ts.map new file mode 100644 index 0000000000..860fc80c09 --- /dev/null +++ b/packages/components/declarations/components/hds/separator/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/separator/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,yBAAyB;IACnC,IAAI,MAAM;IACV,UAAU,OAAO;CAClB;AACD,MAAM,MAAM,mBAAmB,GAAG,GAAG,yBAAyB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/base.d.ts b/packages/components/declarations/components/hds/side-nav/base.d.ts new file mode 100644 index 0000000000..9772f773ea --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/base.d.ts @@ -0,0 +1,16 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsSideNavBaseSignature { + Blocks: { + root?: any; + header?: any; + body?: any; + footer?: any; + }; + Element: HTMLDivElement; +} +declare const HdsSideNavBase: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavBase; +//# sourceMappingURL=base.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/base.d.ts.map b/packages/components/declarations/components/hds/side-nav/base.d.ts.map new file mode 100644 index 0000000000..e3d619f9d7 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/base.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/side-nav/base.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE;QAEN,IAAI,CAAC,EAAE,GAAG,CAAC;QAEX,MAAM,CAAC,EAAE,GAAG,CAAC;QAEb,IAAI,CAAC,EAAE,GAAG,CAAC;QAEX,MAAM,CAAC,EAAE,GAAG,CAAC;KACd,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,cAAc,yFAAmD,CAAC;AAExE,eAAe,cAAc,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts b/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts new file mode 100644 index 0000000000..467683bfb3 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive/'; +export interface HdsSideNavHeaderHomeLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + icon: HdsIconSignature['Args']['name']; + color?: string; + ariaLabel: string; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsSideNavHeaderHomeLink extends Component { + /** + * @param ariaLabel + * @type {string} + * @description The value of `aria-label` + */ + get ariaLabel(): string; +} +//# sourceMappingURL=home-link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts.map b/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts.map new file mode 100644 index 0000000000..5a2082d6d4 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/home-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"home-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/header/home-link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,iCAAiC;IAChD,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,wBAAyB,SAAQ,SAAS,CAAC,iCAAiC,CAAC;IAChG;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAStB;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts b/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts new file mode 100644 index 0000000000..50ee9b31a9 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive/'; +export interface HdsSideNavHeaderIconButtonSignature { + Args: HdsInteractiveSignature['Args'] & { + icon: HdsIconSignature['Args']['name']; + ariaLabel: string; + }; + Element: HdsInteractiveSignature['Element']; +} +export default class HdsSideNavHeaderIconButton extends Component { + constructor(owner: unknown, args: HdsSideNavHeaderIconButtonSignature['Args']); + get ariaLabel(): string; +} +//# sourceMappingURL=icon-button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts.map b/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts.map new file mode 100644 index 0000000000..7d2b39ab21 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/icon-button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"icon-button.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/header/icon-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,mCAAmC;IAClD,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACvC,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,0BAA2B,SAAQ,SAAS,CAAC,mCAAmC,CAAC;gBAElG,KAAK,EAAE,OAAO,EACd,IAAI,EAAE,mCAAmC,CAAC,MAAM,CAAC;IAmBnD,IAAI,SAAS,IAAI,MAAM,CAStB;CAqBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/index.d.ts b/packages/components/declarations/components/hds/side-nav/header/index.d.ts new file mode 100644 index 0000000000..1f858dc778 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/index.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsSideNavHeaderSignature { + Blocks: { + logo?: []; + actions?: []; + }; + Element: HTMLDivElement; +} +declare const HdsSideNavHeader: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavHeader; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/header/index.d.ts.map b/packages/components/declarations/components/hds/side-nav/header/index.d.ts.map new file mode 100644 index 0000000000..5e7fcc0ba0 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/header/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/header/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE;QACN,IAAI,CAAC,EAAE,EAAE,CAAC;QACV,OAAO,CAAC,EAAE,EAAE,CAAC;KACd,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,gBAAgB,2FAAqD,CAAC;AAE5E,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/index.d.ts b/packages/components/declarations/components/hds/side-nav/index.d.ts new file mode 100644 index 0000000000..cef3351c0c --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/index.d.ts @@ -0,0 +1,75 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsSideNavBaseSignature } from './base'; +export interface HdsSideNavSignature { + Args: { + isResponsive?: boolean; + isCollapsible?: boolean; + isMinimized?: boolean; + hasA11yRefocus?: boolean; + a11yRefocusSkipTo?: string; + a11yRefocusSkipText?: string; + a11yRefocusNavigationText?: string; + a11yRefocusRouteChangeValidator?: string; + a11yRefocusExcludeAllQueryParams?: boolean; + /** + * @deprecated The `@ariaLabel` argument for "Hds::SideNav" has been deprecated. It is replaced by aria-labelledby and aria-expanded on the toggle button + */ + ariaLabel?: string | undefined; + onToggleMinimizedStatus?: (arg: boolean) => void; + onDesktopViewportChange?: (arg: boolean) => void; + }; + Blocks: { + header?: [ + { + Header?: HdsSideNavBaseSignature['Blocks']['header']; + isMinimized?: boolean; + } + ]; + body?: [ + { + Body?: HdsSideNavBaseSignature['Blocks']['body']; + isMinimized?: boolean; + } + ]; + footer?: [ + { + Footer?: HdsSideNavBaseSignature['Blocks']['footer']; + isMinimized?: boolean; + } + ]; + }; + Element: HdsSideNavBaseSignature['Element']; +} +export default class HdsSideNav extends Component { + isAnimating: boolean; + isDesktop: boolean; + isMinimized: boolean; + desktopMQ: MediaQueryList; + containersToHide: NodeListOf; + hasA11yRefocus: boolean; + a11yRefocusSkipTo: string; + desktopMQVal: string; + constructor(owner: unknown, args: HdsSideNavSignature['Args']); + addEventListeners(): void; + removeEventListeners(): void; + get isResponsive(): boolean; + get isCollapsible(): boolean; + get shouldTrapFocus(): boolean; + get showToggleButton(): boolean; + /** + * @deprecated The `@ariaLabel` argument for "Hds::SideNav" has been deprecated. It is replaced by aria-labelledby and aria-expanded on the toggle button + */ + get ariaLabel(): string | undefined; + get classNames(): string; + synchronizeInert(): void; + escapePress(event: KeyboardEvent): void; + toggleMinimizedStatus(): void; + didInsert(element: HTMLElement): void; + setTransition(phase: string, event: TransitionEvent): void; + updateDesktopVariable(event: MediaQueryListEvent): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/index.d.ts.map b/packages/components/declarations/components/hds/side-nav/index.d.ts.map new file mode 100644 index 0000000000..da279292bb --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/side-nav/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,QAAQ,CAAC;AAEtD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,yBAAyB,CAAC,EAAE,MAAM,CAAC;QACnC,+BAA+B,CAAC,EAAE,MAAM,CAAC;QACzC,gCAAgC,CAAC,EAAE,OAAO,CAAC;QAC3C;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAE/B,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;QAEjD,uBAAuB,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;KAClD,CAAC;IACF,MAAM,EAAE;QACN,MAAM,CAAC,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACrD,WAAW,CAAC,EAAE,OAAO,CAAC;aACvB;SACF,CAAC;QACF,IAAI,CAAC,EAAE;YACL;gBACE,IAAI,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;gBACjD,WAAW,CAAC,EAAE,OAAO,CAAC;aACvB;SACF,CAAC;QACF,MAAM,CAAC,EAAE;YACP;gBACE,MAAM,CAAC,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,CAAC;gBACrD,WAAW,CAAC,EAAE,OAAO,CAAC;aACvB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IAC3D,WAAW,UAAS;IACpB,SAAS,UAAQ;IACjB,WAAW,UAAS;IAE7B,SAAS,EAAE,cAAc,CAAC;IAC1B,gBAAgB,EAAG,UAAU,CAAC,OAAO,CAAC,CAAC;IACvC,cAAc,UAAoC;IAClD,iBAAiB,SAAqD;IAEtE,YAAY,SAEV;gBAEU,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,CAAC,MAAM,CAAC;IA4B7D,iBAAiB,IAAI,IAAI;IAczB,oBAAoB,IAAI,IAAI;IAU5B,IAAI,YAAY,IAAI,OAAO,CAE1B;IAGD,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,IAAI,eAAe,IAAI,OAAO,CAE7B;IAED,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED,IAAI,UAAU,IAAI,MAAM,CAsBvB;IAED,gBAAgB,IAAI,IAAI;IAWxB,WAAW,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAQvC,qBAAqB,IAAI,IAAI;IAa7B,SAAS,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAOrC,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,IAAI;IAa1D,qBAAqB,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;CAgFxD"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts b/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts new file mode 100644 index 0000000000..fbb1bf5c74 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsInteractiveSignature } from '../../interactive/'; +export interface HdsSideNavListBackLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + text: string; + }; + Element: HdsInteractiveSignature['Element']; +} +declare const HdsSideNavListBackLink: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavListBackLink; +//# sourceMappingURL=back-link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts.map b/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts.map new file mode 100644 index 0000000000..37acbe9a3e --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/back-link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"back-link.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/list/back-link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,sBAAsB,iGAC8B,CAAC;AAE3D,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/index.d.ts b/packages/components/declarations/components/hds/side-nav/list/index.d.ts new file mode 100644 index 0000000000..4e3e14b790 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/index.d.ts @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsYieldSignature } from '../../yield'; +import type { HdsSideNavListItemSignature } from './item'; +import type { HdsSideNavListBackLinkSignature } from './back-link'; +import type { HdsSideNavListTitleSignature } from './title'; +import type { HdsSideNavListLinkSignature } from './link'; +export interface HdsSideNavListSignature { + Blocks: { + default: [ + { + ExtraBefore?: ComponentLike; + Item?: ComponentLike; + BackLink?: ComponentLike; + Title?: ComponentLike; + Link?: ComponentLike; + ExtraAfter?: ComponentLike; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsSideNavList extends Component { + _titleIds: string[]; + get titleIds(): string; + didInsertTitle(titleId: string): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/index.d.ts.map b/packages/components/declarations/components/hds/side-nav/list/index.d.ts.map new file mode 100644 index 0000000000..db9c1145dd --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/list/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,KAAK,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AACnE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAE1D,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,WAAW,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;gBAC/C,IAAI,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;gBAClD,QAAQ,CAAC,EAAE,aAAa,CAAC,+BAA+B,CAAC,CAAC;gBAC1D,KAAK,CAAC,EAAE,aAAa,CAAC,4BAA4B,CAAC,CAAC;gBACpD,IAAI,CAAC,EAAE,aAAa,CAAC,2BAA2B,CAAC,CAAC;gBAClD,UAAU,CAAC,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAC;aAC/C;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IACnE,SAAS,EAAE,MAAM,EAAE,CAAM;IAElC,IAAI,QAAQ,IAAI,MAAM,CAErB;IAGD,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;CAmCtC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/item.d.ts b/packages/components/declarations/components/hds/side-nav/list/item.d.ts new file mode 100644 index 0000000000..a3e6301d25 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/item.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsSideNavListItemSignature { + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +declare const HdsSideNavListItem: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavListItem; +//# sourceMappingURL=item.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/item.d.ts.map b/packages/components/declarations/components/hds/side-nav/list/item.d.ts.map new file mode 100644 index 0000000000..0fd20d5a32 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/item.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"item.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/list/item.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/link.d.ts b/packages/components/declarations/components/hds/side-nav/list/link.d.ts new file mode 100644 index 0000000000..3c2f703ad2 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/link.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../../icon'; +import type { HdsInteractiveSignature } from '../../interactive'; +export interface HdsSideNavListLinkSignature { + Args: HdsInteractiveSignature['Args'] & { + icon?: HdsIconSignature['Args']['name']; + text?: string; + badge?: string; + count?: string; + hasSubItems?: boolean; + isActive?: boolean; + }; + Blocks: { + default: []; + }; + Element: HdsInteractiveSignature['Element']; +} +declare const HdsSideNavListLink: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavListLink; +//# sourceMappingURL=link.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/link.d.ts.map b/packages/components/declarations/components/hds/side-nav/list/link.d.ts.map new file mode 100644 index 0000000000..2e9b12026a --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/link.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/list/link.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAEjE,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;QACxC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,OAAO,CAAC;QACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,uBAAuB,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,QAAA,MAAM,kBAAkB,6FAAuD,CAAC;AAEhF,eAAe,kBAAkB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/title.d.ts b/packages/components/declarations/components/hds/side-nav/list/title.d.ts new file mode 100644 index 0000000000..19a76ededd --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/title.d.ts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsSideNavListTitleSignature { + Args: { + didInsertTitle?: (titleId: string) => void; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsSideNavListTitle extends Component { + titleId: string; + didInsertTitle(element: HTMLElement): void; +} +//# sourceMappingURL=title.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/list/title.d.ts.map b/packages/components/declarations/components/hds/side-nav/list/title.d.ts.map new file mode 100644 index 0000000000..88f8853e9e --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/list/title.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"title.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/list/title.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,MAAM,WAAW,4BAA4B;IAC3C,IAAI,EAAE;QACJ,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;KAC5C,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAAS,CAAC,4BAA4B,CAAC;IAEtF,OAAO,SAA4B;IAGnC,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CA6B3C"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/portal/index.d.ts b/packages/components/declarations/components/hds/side-nav/portal/index.d.ts new file mode 100644 index 0000000000..0baa09b6d5 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/portal/index.d.ts @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsSideNavListSignature } from '../list/index'; +export interface PortalSignature { + Args: { + target: string; + renderInPlace?: boolean; + fallback?: 'inplace'; + }; + Blocks: { + default: []; + }; +} +export interface HdsSideNavPortalSignature { + Args: PortalSignature['Args'] & { + ariaLabel?: string; + targetName?: string; + }; + Blocks: HdsSideNavListSignature['Blocks']; + Element: HTMLDivElement; +} +declare const HdsSideNavPortal: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavPortal; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/portal/index.d.ts.map b/packages/components/declarations/components/hds/side-nav/portal/index.d.ts.map new file mode 100644 index 0000000000..69a230b0c3 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/portal/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/portal/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAI7D,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM,CAAC;QACf,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;KACtB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,eAAe,CAAC,MAAM,CAAC,GAAG;QAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,QAAA,MAAM,gBAAgB,2FAAqD,CAAC;AAE5E,eAAe,gBAAgB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/portal/target.d.ts b/packages/components/declarations/components/hds/side-nav/portal/target.d.ts new file mode 100644 index 0000000000..e5917929cd --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/portal/target.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsSideNavPortalSignature } from './index'; +export interface PortalTargetSignature { + Element: HTMLDivElement; + Args: { + name: string; + multiple?: boolean; + onChange?: (count: number) => void; + }; + Blocks: { + default: [number]; + }; +} +import type { Registry as Services } from '@ember/service'; +export interface HdsSideNavPortalTargetSignature { + Args: PortalTargetSignature['Args'] & { + targetName?: HdsSideNavPortalSignature['Args']['targetName']; + }; + Element: HTMLDivElement; +} +export default class HdsSideNavPortalTarget extends Component { + router: Services['router']; + numSubnavs: number; + lastPanelEl: Element | undefined; + static get prefersReducedMotionOverride(): boolean; + prefersReducedMotionMQ: MediaQueryList; + get prefersReducedMotion(): boolean; + panelsChanged(portalCount: number): void; + didUpdateSubnav(element: HTMLElement, [count]: [number]): void; + animateSubnav(element: HTMLElement, [count]: [number]): void; +} +//# sourceMappingURL=target.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/portal/target.d.ts.map b/packages/components/declarations/components/hds/side-nav/portal/target.d.ts.map new file mode 100644 index 0000000000..4849e2a258 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/portal/target.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/side-nav/portal/target.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAGzD,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;KACpC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,MAAM,CAAC,CAAC;KACnB,CAAC;CACH;AAED,OAAO,KAAK,EAAE,QAAQ,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE3D,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE,qBAAqB,CAAC,MAAM,CAAC,GAAG;QACpC,UAAU,CAAC,EAAE,yBAAyB,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,CAAC;KAC9D,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,sBAAuB,SAAQ,SAAS,CAAC,+BAA+B,CAAC;IACnF,MAAM,EAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAE5B,UAAU,SAAK;IACf,WAAW,EAAE,OAAO,GAAG,SAAS,CAAC;IAE1C,MAAM,KAAK,4BAA4B,IAAI,OAAO,CAEjD;IAED,sBAAsB,iBAEpB;IAEF,IAAI,oBAAoB,IAAI,OAAO,CAKlC;IAGD,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAKxC,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI;IAK9D,aAAa,CAAC,OAAO,EAAE,WAAW,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,IAAI;CA8I7D"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts b/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts new file mode 100644 index 0000000000..04d7169e42 --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../icon'; +export interface HdsSideNavToggleButtonSignature { + Args: { + icon: HdsIconSignature['Args']['name']; + }; + Element: HTMLButtonElement; +} +declare const HdsSideNavToggleButton: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsSideNavToggleButton; +//# sourceMappingURL=toggle-button.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts.map b/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts.map new file mode 100644 index 0000000000..b0f8b7878a --- /dev/null +++ b/packages/components/declarations/components/hds/side-nav/toggle-button.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"toggle-button.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/side-nav/toggle-button.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,MAAM,WAAW,+BAA+B;IAC9C,IAAI,EAAE;QACJ,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;KACxC,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,QAAA,MAAM,sBAAsB,iGAC8B,CAAC;AAE3D,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/step/indicator.d.ts b/packages/components/declarations/components/hds/stepper/step/indicator.d.ts new file mode 100644 index 0000000000..39ef4f63de --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/step/indicator.d.ts @@ -0,0 +1,38 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsStepperStatusesValues } from '../types.ts'; +import type { HdsStepperStatuses } from '../types.ts'; +export declare const DEFAULT_STATUS = HdsStepperStatusesValues.Incomplete; +export declare const STATUSES: string[]; +export interface HdsStepperStepIndicatorSignature { + Args: { + status?: HdsStepperStatuses; + isInteractive?: boolean; + text?: string; + }; + Element: HTMLDivElement; +} +export default class HdsStepperStepIndicator extends Component { + /** + * @param status + * @type {string} + * @default "incomplete" + */ + get status(): HdsStepperStatuses; + /** + * @param isInteractive + * @type {boolean} + * @default false + */ + get isInteractive(): boolean; + /** + * Get the class names to apply to the component. + * @method IndicatorStep#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=indicator.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/step/indicator.d.ts.map b/packages/components/declarations/components/hds/stepper/step/indicator.d.ts.map new file mode 100644 index 0000000000..5ac92cbe82 --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/step/indicator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"indicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/stepper/step/indicator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,cAAc,sCAAsC,CAAC;AAClE,eAAO,MAAM,QAAQ,EAAE,MAAM,EAA4C,CAAC;AAE1E,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;QACxB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAS,CAAC,gCAAgC,CAAC;IAC9F;;;;OAIG;IAEH,IAAI,MAAM,IAAI,kBAAkB,CAW/B;IAED;;;;OAIG;IAEH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CAuEF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/task/indicator.d.ts b/packages/components/declarations/components/hds/stepper/task/indicator.d.ts new file mode 100644 index 0000000000..21c6942d99 --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/task/indicator.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsStepperStatusesValues } from '../types.ts'; +import type { HdsIconSignature } from '../../icon'; +import type { HdsStepperStatuses } from '../types.ts'; +export declare const DEFAULT_STATUS = HdsStepperStatusesValues.Incomplete; +export declare const STATUSES: string[]; +export declare const MAPPING_STATUS_TO_ICONS: Record; +export interface HdsStepperTaskIndicatorSignature { + Args: { + status?: HdsStepperStatuses; + isInteractive?: boolean; + }; + Element: HTMLDivElement; +} +export default class HdsStepperTaskIndicator extends Component { + /** + * @param status + * @type {string} + * @default "incomplete" + */ + get status(): HdsStepperStatuses; + /** + * @param isInteractive + * @type {boolean} + * @default false + */ + get isInteractive(): boolean; + /** + * @param iconName + * @type {string} + */ + get iconName(): HdsIconSignature['Args']['name']; + /** + * Get the class names to apply to the component. + * @method IndicatorTask#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=indicator.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/task/indicator.d.ts.map b/packages/components/declarations/components/hds/stepper/task/indicator.d.ts.map new file mode 100644 index 0000000000..6e0c73776e --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/task/indicator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"indicator.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/stepper/task/indicator.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EACL,wBAAwB,EAEzB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEtD,eAAO,MAAM,cAAc,sCAAsC,CAAC;AAClE,eAAO,MAAM,QAAQ,EAAE,MAAM,EAA4C,CAAC;AAE1E,eAAO,MAAM,uBAAuB,inTAAgC,CAAC;AAErE,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,kBAAkB,CAAC;QAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;KACzB,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAS,CAAC,gCAAgC,CAAC;IAC9F;;;;OAIG;IAEH,IAAI,MAAM,IAAI,kBAAkB,CAW/B;IAED;;;;OAIG;IAEH,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED;;;OAGG;IAEH,IAAI,QAAQ,IAAI,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAE/C;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CAkBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/types.d.ts b/packages/components/declarations/components/hds/stepper/types.d.ts new file mode 100644 index 0000000000..c52f1c4adb --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/types.d.ts @@ -0,0 +1,14 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsIconSignature } from '../icon'; +export declare enum HdsStepperStatusesValues { + Incomplete = "incomplete", + Progress = "progress", + Processing = "processing", + Complete = "complete" +} +export type HdsStepperStatuses = `${HdsStepperStatusesValues}`; +export declare const HdsStepperStatusToIconsValues: Record; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/stepper/types.d.ts.map b/packages/components/declarations/components/hds/stepper/types.d.ts.map new file mode 100644 index 0000000000..772b3ba198 --- /dev/null +++ b/packages/components/declarations/components/hds/stepper/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/stepper/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,oBAAY,wBAAwB;IAClC,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED,MAAM,MAAM,kBAAkB,GAAG,GAAG,wBAAwB,EAAE,CAAC;AAE/D,eAAO,MAAM,6BAA6B,EAAE,MAAM,CAChD,wBAAwB,EACxB,gBAAgB,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,CAMjC,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/index.d.ts b/packages/components/declarations/components/hds/table/index.d.ts new file mode 100644 index 0000000000..ad6d8d823e --- /dev/null +++ b/packages/components/declarations/components/hds/table/index.d.ts @@ -0,0 +1,88 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import { HdsTableDensityValues, HdsTableThSortOrderValues, HdsTableVerticalAlignmentValues } from './types.ts'; +import type { HdsTableColumn, HdsTableDensities, HdsTableHorizontalAlignment, HdsTableOnSelectionChangeSignature, HdsTableSelectableRow, HdsTableSortingFunction, HdsTableThSortOrder, HdsTableVerticalAlignment, HdsTableModel } from './types'; +import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base'; +import type { HdsTableTdSignature } from './td.ts'; +import type { HdsTableThSignature } from './th.ts'; +import type { HdsTableThSortSignature } from './th-sort.ts'; +import type { HdsTableTrSignature } from './tr.ts'; +export declare const DENSITIES: HdsTableDensities[]; +export declare const DEFAULT_DENSITY = HdsTableDensityValues.Medium; +export declare const VALIGNMENTS: HdsTableVerticalAlignment[]; +export declare const DEFAULT_VALIGN = HdsTableVerticalAlignmentValues.Top; +export interface HdsTableSignature { + Args: { + align?: HdsTableHorizontalAlignment; + caption?: string; + columns?: HdsTableColumn[]; + density?: HdsTableDensities; + identityKey?: string; + isFixedLayout?: boolean; + isSelectable?: boolean; + isStriped?: boolean; + model?: HdsTableModel; + onSelectionChange?: (selection: HdsTableOnSelectionChangeSignature) => void; + onSort?: (sortBy: string, sortOrder: HdsTableThSortOrder) => void; + selectionAriaLabelSuffix?: string; + sortBy?: string; + selectableColumnKey?: string; + sortedMessageText?: string; + sortOrder?: HdsTableThSortOrder; + valign?: HdsTableVerticalAlignment; + }; + Blocks: { + head?: [ + { + Tr?: ComponentLike; + Th?: ComponentLike; + ThSort?: ComponentLike; + sortBy?: string; + sortOrder?: HdsTableThSortOrder; + setSortBy?: (column: string) => void; + } + ]; + body?: [ + { + Td?: ComponentLike; + Tr?: ComponentLike; + Th?: ComponentLike; + data?: Record; + rowIndex?: number; + sortBy?: string; + sortOrder?: HdsTableThSortOrder; + } + ]; + }; + Element: HTMLTableElement; +} +export default class HdsTable extends Component { + sortBy: string | undefined; + sortOrder: "desc" | "asc" | HdsTableThSortOrderValues; + selectAllCheckbox?: HdsFormCheckboxBaseSignature['Element']; + selectableRows: HdsTableSelectableRow[]; + isSelectAllCheckboxSelected?: boolean; + constructor(owner: unknown, args: HdsTableSignature['Args']); + get getSortCriteria(): string | HdsTableSortingFunction; + get identityKey(): string | undefined; + get sortedMessageText(): string; + get isStriped(): boolean; + get isFixedLayout(): boolean; + get density(): HdsTableDensities; + get valign(): HdsTableVerticalAlignment; + get classNames(): string; + setSortBy(column: string): void; + onSelectionChangeCallback(checkbox?: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string): void; + onSelectionAllChange(): void; + onSelectionRowChange(checkbox?: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string): void; + didInsertSelectAllCheckbox(checkbox: HdsFormCheckboxBaseSignature['Element']): void; + willDestroySelectAllCheckbox(): void; + didInsertRowCheckbox(checkbox: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string): void; + willDestroyRowCheckbox(selectionKey?: string): void; + setSelectAllState(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/index.d.ts.map b/packages/components/declarations/components/hds/table/index.d.ts.map new file mode 100644 index 0000000000..11abc22fde --- /dev/null +++ b/packages/components/declarations/components/hds/table/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,qBAAqB,EACrB,yBAAyB,EACzB,+BAA+B,EAChC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,2BAA2B,EAC3B,kCAAkC,EAClC,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,yBAAyB,EACzB,aAAa,EACd,MAAM,SAAS,CAAC;AACjB,OAAO,KAAK,EAAE,4BAA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M,GAAG,SAAS,CAOpC;IAED,IAAI,iBAAiB,IAAI,MAAM,CAS9B;IAED,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED,IAAI,aAAa,IAAI,OAAO,CAE3B;IAED,IAAI,OAAO,IAAI,iBAAiB,CAW/B;IAED,IAAI,MAAM,IAAI,yBAAyB,CAWtC;IAED,IAAI,UAAU,IAAI,MAAM,CAwBvB;IAGD,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI;IAoB/B,yBAAyB,CACvB,QAAQ,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,EAClD,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI;IA8BP,oBAAoB,IAAI,IAAI;IAU5B,oBAAoB,CAClB,QAAQ,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,EAClD,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI;IAMP,0BAA0B,CACxB,QAAQ,EAAE,4BAA4B,CAAC,SAAS,CAAC,GAChD,IAAI;IAKP,4BAA4B,IAAI,IAAI;IAKpC,oBAAoB,CAClB,QAAQ,EAAE,4BAA4B,CAAC,SAAS,CAAC,EACjD,YAAY,CAAC,EAAE,MAAM,GACpB,IAAI;IAQP,sBAAsB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI;IAQnD,iBAAiB,IAAI,IAAI;CAoI1B"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/td.d.ts b/packages/components/declarations/components/hds/table/td.d.ts new file mode 100644 index 0000000000..abb81777bc --- /dev/null +++ b/packages/components/declarations/components/hds/table/td.d.ts @@ -0,0 +1,34 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTableHorizontalAlignment } from './types.ts'; +import { HdsTableHorizontalAlignmentValues } from './types.ts'; +export declare const ALIGNMENTS: string[]; +export declare const DEFAULT_ALIGN = HdsTableHorizontalAlignmentValues.Left; +export interface HdsTableTdSignature { + Args: { + align?: HdsTableHorizontalAlignment; + }; + Blocks: { + default: []; + }; + Element: HTMLTableCellElement; +} +export default class HdsTableTd extends Component { + /** + * @param align + * @type {string} + * @default left + * @description Determines the text alignment of the header or cell content. Options are: "left", "center", "right". If no align is defined, "left" is used. + */ + get align(): HdsTableHorizontalAlignment; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=td.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/td.d.ts.map b/packages/components/declarations/components/hds/table/td.d.ts.map new file mode 100644 index 0000000000..c39e609194 --- /dev/null +++ b/packages/components/declarations/components/hds/table/td.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"td.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/td.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAE/D,eAAO,MAAM,UAAU,EAAE,MAAM,EAE9B,CAAC;AACF,eAAO,MAAM,aAAa,yCAAyC,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,2BAA2B,CAAC;KACrC,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AACD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpE;;;;;OAKG;IACH,IAAI,KAAK,IAAI,2BAA2B,CAUvC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAavB;CAaF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-button-sort.d.ts b/packages/components/declarations/components/hds/table/th-button-sort.d.ts new file mode 100644 index 0000000000..1a4e8b45ce --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-button-sort.d.ts @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTableThSortOrder, HdsTableThSortOrderIcons, HdsTableThSortOrderLabels } from './types.ts'; +export interface HdsTableThButtonSortSignature { + Args: { + labelId?: string; + onClick?: () => void; + sortOrder?: HdsTableThSortOrder; + }; + Element: HTMLButtonElement; +} +export default class HdsTableThButtonSort extends Component { + prefixLabelId: string; + suffixLabelId: string; + get icon(): HdsTableThSortOrderIcons; + get sortOrderLabel(): HdsTableThSortOrderLabels; + get onClick(): () => void; + get classNames(): string; +} +//# sourceMappingURL=th-button-sort.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-button-sort.d.ts.map b/packages/components/declarations/components/hds/table/th-button-sort.d.ts.map new file mode 100644 index 0000000000..f7eed13345 --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-button-sort.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"th-button-sort.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/th-button-sort.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAO3C,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AACpB,MAAM,WAAW,6BAA6B;IAC5C,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,SAAS,CAAC,EAAE,mBAAmB,CAAC;KACjC,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAID,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,SAAS,CAAC,6BAA6B,CAAC;IAExF,aAAa,SAA6B;IAC1C,aAAa,SAA6B;IAE1C,IAAI,IAAI,IAAI,wBAAwB,CASnC;IAID,IAAI,cAAc,IAAI,yBAAyB,CAI9C;IAED,IAAI,OAAO,IAAI,MAAM,IAAI,CAQxB;IAED,IAAI,UAAU,IAAI,MAAM,CAYvB;CAkCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts b/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts new file mode 100644 index 0000000000..5384a9e40d --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +export interface HdsTableThButtonTooltipSignature { + Args: { + labelId?: string; + tooltip: string; + }; + Element: HTMLButtonElement; +} +export default class HdsTableThButtonTooltip extends Component { + prefixLabelId: string; + get tooltip(): string; + get classNames(): string; +} +//# sourceMappingURL=th-button-tooltip.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts.map b/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts.map new file mode 100644 index 0000000000..84b337206c --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-button-tooltip.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"th-button-tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/th-button-tooltip.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,MAAM,WAAW,gCAAgC;IAC/C,IAAI,EAAE;QACJ,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,SAAS,CAAC,gCAAgC,CAAC;IAE9F,aAAa,SAAiB;IAE9B,IAAI,OAAO,IAAI,MAAM,CAMpB;IAED,IAAI,UAAU,IAAI,MAAM,CAIvB;CA0BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-selectable.d.ts b/packages/components/declarations/components/hds/table/th-selectable.d.ts new file mode 100644 index 0000000000..efa26b17a8 --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-selectable.d.ts @@ -0,0 +1,37 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base'; +import type { HdsTableScope, HdsTableThSortOrder, HdsTableThSortOrderLabels } from './types'; +import type { HdsTableThSignature } from './th'; +export interface HdsTableThSelectableSignature { + Args: { + didInsert?: (checkbox: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string) => void; + isSelected?: boolean; + onClickSortBySelected?: () => void; + onSelectionChange?: (target: HdsFormCheckboxBaseSignature['Element'], selectionKey: string | undefined) => void; + selectionAriaLabelSuffix?: string; + selectionKey?: string; + selectionScope?: HdsTableScope; + sortBySelectedOrder?: HdsTableThSortOrder; + willDestroy?: (selectionKey?: string) => void; + }; + Element: HdsTableThSignature['Element']; +} +export default class HdsTableThSelectable extends Component { + isSelected: boolean; + guid: string; + checkboxId: string; + labelId: string; + constructor(owner: unknown, args: HdsTableThSelectableSignature['Args']); + get isSortable(): boolean; + get ariaLabel(): string; + get ariaSort(): HdsTableThSortOrderLabels | undefined; + didInsert(checkbox: HdsFormCheckboxBaseSignature['Element']): void; + willDestroyNode(checkbox: HdsFormCheckboxBaseSignature['Element']): void; + onSelectionChange(event: Event): void; + updateAriaLabel(event: Event): void; +} +//# sourceMappingURL=th-selectable.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-selectable.d.ts.map b/packages/components/declarations/components/hds/table/th-selectable.d.ts.map new file mode 100644 index 0000000000..9f93cd3956 --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-selectable.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"th-selectable.d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AAI,OAAO,CAExB;IAED,IAAI,SAAS,IAAI,MAAM,CAQtB;IAED,IAAI,QAAQ,IAAI,yBAAyB,GAAG,SAAS,CAUpD;IAGD,SAAS,CAAC,QAAQ,EAAE,4BAA4B,CAAC,SAAS,CAAC,GAAG,IAAI;IAgBlE,eAAe,CAAC,QAAQ,EAAE,4BAA4B,CAAC,SAAS,CAAC,GAAG,IAAI;IAgBxE,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAUrC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;CAoDpC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-sort.d.ts b/packages/components/declarations/components/hds/table/th-sort.d.ts new file mode 100644 index 0000000000..a80d8b506d --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-sort.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTableHorizontalAlignmentValues } from './types.ts'; +import type { HdsTableHorizontalAlignment, HdsTableThSortOrder, HdsTableThSortOrderLabels } from './types.ts'; +import type { HdsTableThButtonSortSignature } from './th-button-sort'; +export declare const ALIGNMENTS: string[]; +export declare const DEFAULT_ALIGN = HdsTableHorizontalAlignmentValues.Left; +export interface HdsTableThSortSignature { + Args: { + align?: HdsTableHorizontalAlignment; + onClickSort?: HdsTableThButtonSortSignature['Args']['onClick']; + sortOrder?: HdsTableThSortOrder; + tooltip?: string; + width?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLDivElement; +} +export default class HdsTableThSort extends Component { + /** + * Generates a unique ID for the element ("label") + * + * @param labelId + */ + labelId: string; + /** + * @param ariaSort + * @type {HdsTableThSortOrderLabels} + * @private + * @default none + * @description Sets the aria-sort attribute based on the sort order defined; acceptable values are ascending, descending, none(default) and other. Authors SHOULD only apply this property to table headers or grid headers. If the property is not provided, there is no defined sort order. For each table or grid, authors SHOULD apply aria-sort to only one header at a time. + */ + get ariaSort(): HdsTableThSortOrderLabels; + /** + * @param align + * @type {HdsTableHorizontalAlignment} + * @default left + * @description Determines the text alignment of the header or cell content. Options are: "left", "center", "right". If no align is defined, "left" is used. + */ + get align(): HdsTableHorizontalAlignment; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=th-sort.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th-sort.d.ts.map b/packages/components/declarations/components/hds/table/th-sort.d.ts.map new file mode 100644 index 0000000000..0f0ed8a401 --- /dev/null +++ b/packages/components/declarations/components/hds/table/th-sort.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"th-sort.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/th-sort.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,EACL,iCAAiC,EAGlC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACV,2BAA2B,EAC3B,mBAAmB,EACnB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,kBAAkB,CAAC;AAEtE,eAAO,MAAM,UAAU,EAAE,MAAM,EAE9B,CAAC;AACF,eAAO,MAAM,aAAa,yCAAyC,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,2BAA2B,CAAC;QACpC,WAAW,CAAC,EAAE,6BAA6B,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;QAC/D,SAAS,CAAC,EAAE,mBAAmB,CAAC;QAChC,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,cAAc,CAAC;CACzB;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E;;;;OAIG;IACH,OAAO,SAAiB;IAExB;;;;;;OAMG;IACH,IAAI,QAAQ,IAAI,yBAAyB,CAUxC;IAED;;;;;OAKG;IACH,IAAI,KAAK,IAAI,2BAA2B,CAUvC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAuCF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th.d.ts b/packages/components/declarations/components/hds/table/th.d.ts new file mode 100644 index 0000000000..97ee360298 --- /dev/null +++ b/packages/components/declarations/components/hds/table/th.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTableHorizontalAlignment, HdsTableScope } from './types.ts'; +import { HdsTableHorizontalAlignmentValues } from './types.ts'; +export declare const ALIGNMENTS: string[]; +export declare const DEFAULT_ALIGN = HdsTableHorizontalAlignmentValues.Left; +export interface HdsTableThSignature { + Args: { + align?: HdsTableHorizontalAlignment; + isVisuallyHidden?: boolean; + scope?: HdsTableScope; + tooltip?: string; + width?: string; + }; + Blocks: { + default: []; + }; + Element: HTMLTableCellElement; +} +export default class HdsTableTh extends Component { + /** + * Generates a unique ID for the element ("label") + * + * @param labelId + */ + labelId: string; + /** + * @param align + * @type {HdsTableHorizontalAlignment} + * @default left + * @description Determines the text alignment of the header or cell content. Options are: "left", "center", "right". If no align is defined, "left" is used. + */ + get align(): HdsTableHorizontalAlignment; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=th.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/th.d.ts.map b/packages/components/declarations/components/hds/table/th.d.ts.map new file mode 100644 index 0000000000..eacb448f5e --- /dev/null +++ b/packages/components/declarations/components/hds/table/th.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"th.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/th.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,iCAAiC,EAAE,MAAM,YAAY,CAAC;AAE/D,eAAO,MAAM,UAAU,EAAE,MAAM,EAE9B,CAAC;AACF,eAAO,MAAM,aAAa,yCAAyC,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,KAAK,CAAC,EAAE,2BAA2B,CAAC;QACpC,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,oBAAoB,CAAC;CAC/B;AAED,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpE;;;;OAIG;IACH,OAAO,SAAiB;IAExB;;;;;OAKG;IACH,IAAI,KAAK,IAAI,2BAA2B,CAUvC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAoDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/tr.d.ts b/packages/components/declarations/components/hds/table/tr.d.ts new file mode 100644 index 0000000000..b88d0e2efe --- /dev/null +++ b/packages/components/declarations/components/hds/table/tr.d.ts @@ -0,0 +1,41 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTableScopeValues } from './types.ts'; +import type { HdsTableScope, HdsTableThSortOrder } from './types.ts'; +import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base'; +import type { HdsTableSignature } from './index.ts'; +import type { HdsTableThSelectableSignature } from './th-selectable.ts'; +export interface BaseHdsTableTrSignature { + Args: { + selectableColumnKey?: HdsTableSignature['Args']['selectableColumnKey']; + isSelectable?: boolean; + isSelected?: false; + selectionAriaLabelSuffix?: string; + selectionKey?: string; + selectionScope?: HdsTableScope; + sortBySelectedOrder?: HdsTableThSortOrder; + didInsert?: (checkbox: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string) => void; + onSelectionChange?: (checkbox?: HdsFormCheckboxBaseSignature['Element'], selectionKey?: string) => void; + willDestroy?: () => void; + onClickSortBySelected?: HdsTableThSelectableSignature['Args']['onClickSortBySelected']; + }; + Blocks: { + default: []; + }; + Element: HTMLTableRowElement; +} +export interface SelectableHdsTableTrArgs extends BaseHdsTableTrSignature { + Args: BaseHdsTableTrSignature['Args'] & { + isSelectable: true; + selectionScope?: HdsTableScopeValues.Row; + selectionKey: string; + }; +} +export type HdsTableTrSignature = BaseHdsTableTrSignature | SelectableHdsTableTrArgs; +export default class HdsTableTr extends Component { + get selectionKey(): string | undefined; +} +//# sourceMappingURL=tr.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/tr.d.ts.map b/packages/components/declarations/components/hds/table/tr.d.ts.map new file mode 100644 index 0000000000..b8c618cc68 --- /dev/null +++ b/packages/components/declarations/components/hds/table/tr.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tr.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/tr.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM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BAAmB,CAAC;IACpE,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CASrC;CAmBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/types.d.ts b/packages/components/declarations/components/hds/table/types.d.ts new file mode 100644 index 0000000000..be29840612 --- /dev/null +++ b/packages/components/declarations/components/hds/table/types.d.ts @@ -0,0 +1,80 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsFormCheckboxBaseSignature } from '../form/checkbox/base'; +export declare enum HdsTableDensityValues { + Default = "default", + Medium = "medium", + Short = "short", + Tall = "tall" +} +export type HdsTableDensities = `${HdsTableDensityValues}`; +export declare enum HdsTableHorizontalAlignmentValues { + Center = "center", + Left = "left", + Right = "right" +} +export type HdsTableHorizontalAlignment = `${HdsTableHorizontalAlignmentValues}`; +export declare enum HdsTableScopeValues { + Col = "col", + Row = "row" +} +export type HdsTableScope = `${HdsTableScopeValues}`; +export declare enum HdsTableThSortOrderIconValues { + ArrowDown = "arrow-down", + ArrowUp = "arrow-up", + SwapVertical = "swap-vertical" +} +export type HdsTableThSortOrderIcons = `${HdsTableThSortOrderIconValues}`; +export declare enum HdsTableThSortOrderLabelValues { + Asc = "ascending", + Desc = "descending", + None = "none" +} +export type HdsTableThSortOrderLabels = `${HdsTableThSortOrderLabelValues}`; +export declare enum HdsTableThSortOrderValues { + Asc = "asc", + Desc = "desc" +} +export type HdsTableThSortOrder = `${HdsTableThSortOrderValues}`; +export declare enum HdsTableVerticalAlignmentValues { + Baseline = "baseline", + Middle = "middle", + Top = "top" +} +export type HdsTableVerticalAlignment = `${HdsTableVerticalAlignmentValues}`; +export type HdsTableSelectableRow = { + checkbox: HdsFormCheckboxBaseSignature['Element']; + selectionKey: string; +}; +interface BaseHdsTableColumn { + align?: HdsTableHorizontalAlignment; + isVisuallyHidden?: boolean; + label: string; + sortingFunction?: HdsTableSortingFunction; + tooltip?: string; + width?: string; +} +interface SortableHdsTableColumn extends BaseHdsTableColumn { + isSortable: true; + key: string; +} +interface NonSortableHdsTableColumn extends BaseHdsTableColumn { + isSortable?: false; + key?: string; +} +export type HdsTableColumn = SortableHdsTableColumn | NonSortableHdsTableColumn; +export type HdsTableSortingFunction = (a: T, b: T) => number; +export interface HdsTableOnSelectionChangeSignature { + selectionKey?: string; + selectionCheckboxElement?: HdsFormCheckboxBaseSignature['Element']; + selectedRowsKeys: string[]; + selectableRowsStates: { + selectionKey: string; + isSelected?: boolean; + }[]; +} +export type HdsTableModel = Array>; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/table/types.d.ts.map b/packages/components/declarations/components/hds/table/types.d.ts.map new file mode 100644 index 0000000000..c5b20627a4 --- /dev/null +++ b/packages/components/declarations/components/hds/table/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/table/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAE1E,oBAAY,qBAAqB;IAC/B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AACD,MAAM,MAAM,iBAAiB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AAE3D,oBAAY,iCAAiC;IAC3C,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,2BAA2B,GACrC,GAAG,iCAAiC,EAAE,CAAC;AAEzC,oBAAY,mBAAmB;IAC7B,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAErD,oBAAY,6BAA6B;IACvC,SAAS,eAAe;IACxB,OAAO,aAAa;IACpB,YAAY,kBAAkB;CAC/B;AACD,MAAM,MAAM,wBAAwB,GAAG,GAAG,6BAA6B,EAAE,CAAC;AA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,CAAC;IACtB,wBAAwB,CAAC,EAAE,4BAA4B,CAAC,SAAS,CAAC,CAAC;IACnE,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,oBAAoB,EAAE;QACpB,YAAY,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,OAAO,CAAC;KACtB,EAAE,CAAC;CACL;AAED,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/index.d.ts b/packages/components/declarations/components/hds/tabs/index.d.ts new file mode 100644 index 0000000000..1ddd953f35 --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/index.d.ts @@ -0,0 +1,69 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { ComponentLike } from '@glint/template'; +import type { HdsTabsTabSignature } from './tab'; +import type { HdsTabsPanelSignature } from './panel'; +import type { HdsTabsTabIds, HdsTabsPanelIds, HdsTabsSizes } from './types.ts'; +export declare const DEFAULT_SIZE: HdsTabsSizes; +export declare const SIZES: HdsTabsSizes[]; +export interface HdsTabsSignature { + Args: { + size?: HdsTabsSizes; + onClickTab?: (event: MouseEvent, tabIndex: number) => void; + selectedTabIndex?: HdsTabsTabSignature['Args']['selectedTabIndex']; + isParentVisible?: boolean; + }; + Blocks: { + default: [ + { + Tab?: ComponentLike; + Panel?: ComponentLike; + } + ]; + }; + Element: HTMLDivElement; +} +export default class HdsTabs extends Component { + tabNodes: HTMLButtonElement[]; + tabIds: HdsTabsTabIds; + panelNodes: HTMLElement[]; + panelIds: HdsTabsPanelIds; + _selectedTabIndex: number; + selectedTabId?: string; + isControlled: boolean; + /** + * Sets the size of Tabs + * Accepted values: medium, large + * + * @param size + * @type {string} + * @default 'medium' + */ + get size(): HdsTabsSizes; + constructor(owner: unknown, args: HdsTabsSignature['Args']); + get selectedTabIndex(): number; + set selectedTabIndex(value: number); + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; + didInsert(): void; + didUpdateSelectedTabIndex(): void; + didUpdateSelectedTabId(): void; + didUpdateParentVisibility(): void; + didInsertTab(element: HTMLButtonElement, isSelected?: boolean): void; + didUpdateTab(tabIndex: number, isSelected?: boolean): void; + willDestroyTab(element: HTMLButtonElement): void; + didInsertPanel(element: HTMLElement, panelId: string): void; + willDestroyPanel(element: HTMLElement): void; + onClick(event: MouseEvent, tabIndex: number): void; + onKeyUp(tabIndex: number, event: KeyboardEvent): void; + focusTab(tabIndex: number, event: KeyboardEvent): void; + setTabIndicator(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/index.d.ts.map b/packages/components/declarations/components/hds/tabs/index.d.ts.map new file mode 100644 index 0000000000..baa6e4f86f --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tabs/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAM3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/E,eAAO,MAAM,YAAY,EAAE,YAAgC,CAAC;AAC5D,eAAO,MAAM,KAAK,EAAE,YAAY,EAAqC,CAAC;AACtE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,E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cAAc,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAQhD,cAAc,CAAC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAM3D,gBAAgB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAU5C,OAAO,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI;IAWlD,OAAO,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI;IA4BrD,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,IAAI;IAKtD,eAAe,IAAI,IAAI;CAwFxB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/panel.d.ts b/packages/components/declarations/components/hds/tabs/panel.d.ts new file mode 100644 index 0000000000..fb55efcf18 --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/panel.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTabsTabSignature } from './tab'; +import type { HdsTabsPanelIds, HdsTabsTabIds } from './types'; +export interface HdsTabsPanelSignature { + Args: { + tabIds?: HdsTabsTabIds; + panelIds?: HdsTabsPanelIds; + selectedTabIndex?: HdsTabsTabSignature['Args']['selectedTabIndex']; + didInsertNode?: (element: HTMLElement, elementId: string) => void; + willDestroyNode?: (element: HTMLElement) => void; + }; + Blocks: { + default: [ + { + isVisible?: boolean; + } + ]; + }; + Element: HTMLElement; +} +export default class HdsTabsPanel extends Component { + /** + * Generate a unique ID for the Panel + * @return {string} + */ + panelId: string; + elementId?: string; + get nodeIndex(): number | undefined; + /** + * Check the condition if the panel is visible (because the coupled/associated tab is selected) or not + * @returns {boolean} + */ + get isVisible(): boolean; + /** + * Get the ID of the tab coupled/associated with the panel (it's used by the `aria-labelledby` attribute) + * @returns string} + */ + get coupledTabId(): string | undefined; + didInsertNode(element: HTMLElement): void; + willDestroyNode(element: HTMLElement): void; +} +//# sourceMappingURL=panel.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/panel.d.ts.map b/packages/components/declarations/components/hds/tabs/panel.d.ts.map new file mode 100644 index 0000000000..9698f805fa --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/panel.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"panel.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tabs/panel.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE9D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,QAAQ,CAAC,EAAE,eAAe,CAAC;QAC3B,gBAAgB,CAAC,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACnE,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;QAClE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;KAClD,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE;YACP;gBACE,SAAS,CAAC,EAAE,OAAO,CAAC;aACrB;SACF,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE;;;OAGG;IACH,OAAO,SAA4B;IAEnC,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAIlC;IAED;;;OAGG;IACH,IAAI,SAAS,IAAI,OAAO,CAEvB;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAIrC;IAGD,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAUzC,eAAe,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;CA2B5C"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/tab.d.ts b/packages/components/declarations/components/hds/tabs/tab.d.ts new file mode 100644 index 0000000000..56a7b8f00c --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/tab.d.ts @@ -0,0 +1,51 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { IconName } from '@hashicorp/flight-icons/svg'; +import type { HdsTabsTabIds } from './types'; +export interface HdsTabsTabSignature { + Args: { + tabIds?: HdsTabsTabIds; + selectedTabIndex?: number; + icon?: IconName; + count?: string; + isSelected?: boolean; + didInsertNode?: (element: HTMLButtonElement, isSelected?: boolean) => void; + didUpdateNode?: (nodeIndex: number, isSelected?: boolean) => void; + willDestroyNode?: (element: HTMLButtonElement) => void; + onClick?: (event: MouseEvent, tabIndex: number) => void; + onKeyUp?: (nodeIndex: number, event: KeyboardEvent) => void; + }; + Blocks: { + default: []; + }; + Element: HTMLLIElement; +} +export default class HdsTabsTab extends Component { + /** + * Generate a unique ID for the Tab + * @return {string} + */ + tabId: string; + get nodeIndex(): number | undefined; + /** + * Determine if the tab is the selected tab + * @return {boolean} + * @default false (1st tab is selected by default) + */ + get isSelected(): boolean; + didInsertNode(element: HTMLButtonElement, positional: [boolean?]): void; + didUpdateNode(): void; + willDestroyNode(element: HTMLButtonElement): void; + onClick(event: MouseEvent): false | undefined; + onKeyUp(event: KeyboardEvent): void; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=tab.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/tab.d.ts.map b/packages/components/declarations/components/hds/tabs/tab.d.ts.map new file mode 100644 index 0000000000..89d38bea58 --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/tab.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tabs/tab.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,MAAM,CAAC,EAAE,aAAa,CAAC;QACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,IAAI,CAAC,EAAE,QAAQ,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,aAAa,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;QAC3E,aAAa,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;QAClE,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;QACvD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;QACxD,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;KAC7D,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,aAAa,CAAC;CACxB;AAED,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpE;;;OAGG;IACH,KAAK,SAA0B;IAE/B,IAAI,SAAS,IAAI,MAAM,GAAG,SAAS,CAElC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,OAAO,CAKxB;IAGD,aAAa,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,GAAG,IAAI;IAWvE,aAAa,IAAI,IAAI;IASrB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IASjD,OAAO,CAAC,KAAK,EAAE,UAAU,GAAG,KAAK,GAAG,SAAS;IAW7C,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAQnC;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAQvB;CAgDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/types.d.ts b/packages/components/declarations/components/hds/tabs/types.d.ts new file mode 100644 index 0000000000..61f196af62 --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/types.d.ts @@ -0,0 +1,12 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsTabsSizeValues { + Medium = "medium", + Large = "large" +} +export type HdsTabsSizes = `${HdsTabsSizeValues}`; +export type HdsTabsPanelIds = string[]; +export type HdsTabsTabIds = string[]; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tabs/types.d.ts.map b/packages/components/declarations/components/hds/tabs/types.d.ts.map new file mode 100644 index 0000000000..302b2f1e09 --- /dev/null +++ b/packages/components/declarations/components/hds/tabs/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tabs/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,iBAAiB;IAC3B,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AAED,MAAM,MAAM,YAAY,GAAG,GAAG,iBAAiB,EAAE,CAAC;AAElD,MAAM,MAAM,eAAe,GAAG,MAAM,EAAE,CAAC;AAEvC,MAAM,MAAM,aAAa,GAAG,MAAM,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tag/index.d.ts b/packages/components/declarations/components/hds/tag/index.d.ts new file mode 100644 index 0000000000..02ee82ca44 --- /dev/null +++ b/packages/components/declarations/components/hds/tag/index.d.ts @@ -0,0 +1,53 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTagColorValues } from './types.ts'; +import type { HdsTagColors } from './types.ts'; +import type { HdsInteractiveSignature } from '../interactive/'; +export declare const COLORS: string[]; +export declare const DEFAULT_COLOR = HdsTagColorValues.Primary; +export interface HdsTagSignature { + Args: HdsInteractiveSignature['Args'] & { + color?: HdsTagColors; + text: string; + ariaLabel?: string; + onDismiss?: (event: MouseEvent, ...args: any[]) => void; + }; + Element: HTMLSpanElement; +} +export default class HdsTag extends Component { + /** + * @param onDismiss + * @type {function} + * @default () => {} + */ + get onDismiss(): ((event: MouseEvent, ...args: any[]) => void) | false; + /** + * @param text + * @type {string} + * @description The text of the tag. If no text value is defined, an error will be thrown. + */ + get text(): string; + /** + * @param ariaLabel + * @type {string} + * @default 'Dismiss' + */ + get ariaLabel(): string; + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of link to be used; acceptable values are `primary` and `secondary` + */ + get color(): HdsTagColors | false; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tag/index.d.ts.map b/packages/components/declarations/components/hds/tag/index.d.ts.map new file mode 100644 index 0000000000..a18a02b97d --- /dev/null +++ b/packages/components/declarations/components/hds/tag/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tag/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAC;AAE/D,eAAO,MAAM,MAAM,EAAE,MAAM,EAAqC,CAAC;AACjE,eAAO,MAAM,aAAa,4BAA4B,CAAC;AAEvD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,uBAAuB,CAAC,MAAM,CAAC,GAAG;QACtC,KAAK,CAAC,EAAE,YAAY,CAAC;QACrB,IAAI,EAAE,MAAM,CAAC;QACb,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;KACzD,CAAC;IACF,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS,CAAC,eAAe,CAAC;IAC5D;;;;OAIG;IAEH,IAAI,SAAS,IAAI,CAAC,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC,GAAG,KAAK,CAQrE;IAED;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CAMjB;IAED;;;;OAIG;IACH,IAAI,SAAS,IAAI,MAAM,CAGtB;IAED;;;;;OAKG;IACH,IAAI,KAAK,IAAI,YAAY,GAAG,KAAK,CAiBhC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CASvB;CAsDF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tag/types.d.ts b/packages/components/declarations/components/hds/tag/types.d.ts new file mode 100644 index 0000000000..d3915557b4 --- /dev/null +++ b/packages/components/declarations/components/hds/tag/types.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsTagColorValues { + Primary = "primary", + Secondary = "secondary" +} +export type HdsTagColors = `${HdsTagColorValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tag/types.d.ts.map b/packages/components/declarations/components/hds/tag/types.d.ts.map new file mode 100644 index 0000000000..0f6569e671 --- /dev/null +++ b/packages/components/declarations/components/hds/tag/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tag/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AACD,MAAM,MAAM,YAAY,GAAG,GAAG,iBAAiB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/body.d.ts b/packages/components/declarations/components/hds/text/body.d.ts new file mode 100644 index 0000000000..e77a0d7c5e --- /dev/null +++ b/packages/components/declarations/components/hds/text/body.d.ts @@ -0,0 +1,50 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTextSizeValues, HdsTextWeightValues } from './types.ts'; +import type { HdsTextAligns, HdsTextColors, HdsTextTags, HdsTextWeights } from './types.ts'; +type HdsTextBodySizeNumber = Extract; +type HdsTextBodySizeString = `${HdsTextBodySizeNumber}`; +export type HdsTextBodySizes = HdsTextBodySizeNumber | HdsTextBodySizeString; +export declare const AVAILABLE_SIZES: HdsTextSizeValues[]; +export declare const DEFAULT_SIZE = HdsTextSizeValues.TwoHundred; +export declare const DEFAULT_WEIGHT = HdsTextWeightValues.Regular; +export type HdsTextBodyWeight = Extract; +export declare const AVAILABLE_WEIGHTS_PER_SIZE: Record; +export interface HdsTextBodySignature { + Args: { + size?: HdsTextBodySizes; + tag?: HdsTextTags; + weight?: HdsTextBodyWeight; + align?: HdsTextAligns; + color?: string | HdsTextColors; + }; + Element: HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLDivElement; + Blocks: { + default: []; + }; +} +export default class HdsTextBody extends Component { + /** + * Sets the "size" for the text + * Accepted values: see AVAILABLE_SIZES + * + * @param size + * @type {HdsTextBodySizes} + * + */ + get size(): HdsTextBodySizes; + /** + * Sets the "weight" for the text + * Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE + * + * @param weight + * @type {HdsTextWeights} + * + */ + get weight(): HdsTextWeights; +} +export {}; +//# sourceMappingURL=body.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/body.d.ts.map b/packages/components/declarations/components/hds/text/body.d.ts.map new file mode 100644 index 0000000000..7f83fa74f7 --- /dev/null +++ b/packages/components/declarations/components/hds/text/body.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"body.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/text/body.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAC;AAMpB,KAAK,qBAAqB,GAAG,OAAO,CAClC,iBAAiB,EACf,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,YAAY,CACjC,CAAC;AACF,KAAK,qBAAqB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAC7E,eAAO,MAAM,eAAe,qBAI3B,CAAC;AACF,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAEzD,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,OAAO,CACrC,cAAc,EACd,SAAS,GAAG,QAAQ,GAAG,UAAU,CAClC,CAAC;AACF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,gBAAgB,EAChB,iBAAiB,EAAE,CAiBpB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,GAAG,CAAC,EAAE,WAAW,CAAC;QAClB,MAAM,CAAC,EAAE,iBAAiB,CAAC;QAC3B,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;KAChC,CAAC;IACF,OAAO,EACH,eAAe,GACf,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,CAAC;IACnB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACtE;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAgB3B;IAED;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,cAAc,CAe3B;CAcF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/code.d.ts b/packages/components/declarations/components/hds/text/code.d.ts new file mode 100644 index 0000000000..a2b0317790 --- /dev/null +++ b/packages/components/declarations/components/hds/text/code.d.ts @@ -0,0 +1,50 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTextSizeValues, HdsTextWeightValues } from './types.ts'; +import type { HdsTextAligns, HdsTextColors, HdsTextTags, HdsTextWeights } from './types.ts'; +type HdsTextCodeSizeNumber = Extract; +type HdsTextCodeSizeString = `${HdsTextCodeSizeNumber}`; +export type HdsTextCodeSizes = HdsTextCodeSizeNumber | HdsTextCodeSizeString; +export declare const AVAILABLE_SIZES: HdsTextSizeValues[]; +export declare const DEFAULT_SIZE = HdsTextSizeValues.TwoHundred; +export declare const DEFAULT_WEIGHT = HdsTextWeightValues.Regular; +export type HdsTextCodeWeight = Extract; +export declare const AVAILABLE_WEIGHTS_PER_SIZE: Record; +export interface HdsTextCodeSignature { + Args: { + size?: HdsTextCodeSizes; + tag?: HdsTextTags; + weight?: HdsTextCodeWeight; + align?: HdsTextAligns; + color?: string | HdsTextColors; + }; + Element: HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLDivElement; + Blocks: { + default: []; + }; +} +export default class HdsTextCode extends Component { + /** + * Sets the "size" for the text + * Accepted values: see AVAILABLE_SIZES + * + * @type {HdsTextCodeSizes} + * + * @param size + */ + get size(): HdsTextCodeSizes; + /** + * Sets the "weight" for the text + * Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE + * + * @type {string} + * + * @param variant + */ + get weight(): HdsTextCodeWeight; +} +export {}; +//# sourceMappingURL=code.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/code.d.ts.map b/packages/components/declarations/components/hds/text/code.d.ts.map new file mode 100644 index 0000000000..dd888bc09d --- /dev/null +++ b/packages/components/declarations/components/hds/text/code.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"code.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/text/code.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAC;AAMpB,KAAK,qBAAqB,GAAG,OAAO,CAClC,iBAAiB,EACf,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,UAAU,GAC5B,iBAAiB,CAAC,YAAY,CACjC,CAAC;AACF,KAAK,qBAAqB,GAAG,GAAG,qBAAqB,EAAE,CAAC;AACxD,MAAM,MAAM,gBAAgB,GAAG,qBAAqB,GAAG,qBAAqB,CAAC;AAC7E,eAAO,MAAM,eAAe,qBAI3B,CAAC;AACF,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAEzD,eAAO,MAAM,cAAc,8BAA8B,CAAC;AAC1D,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,cAAc,EAAE,SAAS,GAAG,MAAM,CAAC,CAAC;AAC5E,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,gBAAgB,EAChB,iBAAiB,EAAE,CAcpB,CAAC;AAEF,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,GAAG,CAAC,EAAE,WAAW,CAAC;QAClB,MAAM,CAAC,EAAE,iBAAiB,CAAC;QAC3B,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;KAChC,CAAC;IACF,OAAO,EACH,eAAe,GACf,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,CAAC;IACnB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,SAAS,CAAC,oBAAoB,CAAC;IACtE;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,gBAAgB,CAgB3B;IAED;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,iBAAiB,CAe9B;CAcF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/display.d.ts b/packages/components/declarations/components/hds/text/display.d.ts new file mode 100644 index 0000000000..54e0c4cd92 --- /dev/null +++ b/packages/components/declarations/components/hds/text/display.d.ts @@ -0,0 +1,46 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { HdsTextSizeValues } from './types.ts'; +import type { HdsTextAligns, HdsTextColors, HdsTextSizes, HdsTextTags, HdsTextWeights } from './types.ts'; +export declare const DEFAULT_SIZE = HdsTextSizeValues.TwoHundred; +export declare const AVAILABLE_SIZES: (string | HdsTextSizeValues)[]; +export type HdsTextDisplayWeight = Extract; +export declare const DEFAULT_WEIGHTS_PER_SIZE: Record; +export declare const AVAILABLE_WEIGHTS_PER_SIZE: Record; +export interface HdsTextDisplaySignature { + Args: { + size?: HdsTextSizes; + tag?: HdsTextTags; + weight?: HdsTextDisplayWeight; + align?: HdsTextAligns; + color?: string | HdsTextColors; + }; + Element: HTMLSpanElement | HTMLHeadingElement | HTMLParagraphElement | HTMLDivElement; + Blocks: { + default: []; + }; +} +export default class HdsTextDisplay extends Component { + /** + * Sets the "size" for the text + * Accepted values: see AVAILABLE_SIZES + * + * @type {HdsTextSizes} + * + * @param size + */ + get size(): HdsTextSizes; + /** + * Sets the "weight" for the text + * Accepted values: see AVAILABLE_WEIGHTS_PER_SIZE + * + * @type {HdsTextDisplayWeight} + * + * @param variant + */ + get weight(): HdsTextDisplayWeight; +} +//# sourceMappingURL=display.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/display.d.ts.map b/packages/components/declarations/components/hds/text/display.d.ts.map new file mode 100644 index 0000000000..17cab3a181 --- /dev/null +++ b/packages/components/declarations/components/hds/text/display.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/text/display.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAuB,MAAM,YAAY,CAAC;AACpE,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAC;AAKpB,eAAO,MAAM,YAAY,+BAA+B,CAAC;AAIzD,eAAO,MAAM,eAAe,gCAE3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,OAAO,CACxC,cAAc,EACd,QAAQ,GAAG,UAAU,GAAG,MAAM,CAC/B,CAAC;AACF,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAC3C,iBAAiB,EACjB,oBAAoB,CAOrB,CAAC;AACF,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAC7C,YAAY,EACZ,oBAAoB,EAAE,CAevB,CAAC;AAEF,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,YAAY,CAAC;QACpB,GAAG,CAAC,EAAE,WAAW,CAAC;QAClB,MAAM,CAAC,EAAE,oBAAoB,CAAC;QAC9B,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,aAAa,CAAC;KAChC,CAAC;IACF,OAAO,EACH,eAAe,GACf,kBAAkB,GAClB,oBAAoB,GACpB,cAAc,CAAC;IACnB,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,SAAS,CAAC,uBAAuB,CAAC;IAC5E;;;;;;;OAOG;IACH,IAAI,IAAI,IAAI,YAAY,CAgBvB;IAED;;;;;;;OAOG;IACH,IAAI,MAAM,IAAI,oBAAoB,CAmBjC;CAcF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/index.d.ts b/packages/components/declarations/components/hds/text/index.d.ts new file mode 100644 index 0000000000..3f48a8d080 --- /dev/null +++ b/packages/components/declarations/components/hds/text/index.d.ts @@ -0,0 +1,71 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { HdsTextAligns, HdsTextColors, HdsTextGroups, HdsTextSizes, HdsTextTags, HdsTextWeights } from './types.ts'; +export declare const AVAILABLE_COLORS: string[]; +export declare const AVAILABLE_ALIGNS: string[]; +type AvailableElements = HTMLElementTagNameMap[keyof HTMLElementTagNameMap]; +export interface HdsTextSignature { + Args: { + size: HdsTextSizes; + tag?: HdsTextTags; + weight?: HdsTextWeights; + align?: HdsTextAligns; + color?: HdsTextColors | string | undefined; + group: HdsTextGroups; + }; + Element: AvailableElements; + Blocks: { + default: []; + }; +} +export default class HdsText extends Component { + /** + * Get a tag to render based on the `@tag` argument passed or the value of `this.size` (via mapping) + * + * @method #componentTag + * @return {HdsTextTags} The html tag to use in the dynamic render of the component + */ + get componentTag(): HdsTextTags; + /** + * Sets the "variant" (style) for the text + * Accepted values: see AVAILABLE_VARIANTS + * + * @param variant + * @type {string} + */ + get variant(): string; + /** + * Sets the alignment of the text + * Accepted values: see AVAILABLE_ALIGNS + * + * @param align + * @type {HdsTextAligns} + */ + get align(): HdsTextAligns | undefined; + /** + * Sets the color of the text as pre-defined value + * Accepted values: see AVAILABLE_COLORS + * + * @param color + * @type {HdsTextColors} + */ + get predefinedColor(): HdsTextColors | undefined; + /** + * Sets the color of the text as custom value (via inline style) + * + * @param color + * @type {string} + */ + get customColor(): string | undefined; + /** + * Get the class names to apply to the component. + * @method #classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +export {}; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/index.d.ts.map b/packages/components/declarations/components/hds/text/index.d.ts.map new file mode 100644 index 0000000000..6af0ab07ab --- /dev/null +++ b/packages/components/declarations/components/hds/text/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/text/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,EACf,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAsC,CAAC;AAC5E,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAAsC,CAAC;AAG5E,KAAK,iBAAiB,GAAG,qBAAqB,CAAC,MAAM,qBAAqB,CAAC,CAAC;AAE5E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY,CAAC;QACnB,GAAG,CAAC,EAAE,WAAW,CAAC;QAClB,MAAM,CAAC,EAAE,cAAc,CAAC;QACxB,KAAK,CAAC,EAAE,aAAa,CAAC;QACtB,KAAK,CAAC,EAAE,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;QAC3C,KAAK,EAAE,aAAa,CAAC;KACtB,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;IAC3B,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC9D;;;;;OAKG;IACH,IAAI,YAAY,IAAI,WAAW,CAI9B;IAED;;;;;;OAMG;IACH,IAAI,OAAO,IAAI,MAAM,CAMpB;IAED;;;;;;OAMG;IACH,IAAI,KAAK,IAAI,aAAa,GAAG,SAAS,CAarC;IAED;;;;;;OAMG;IACH,IAAI,eAAe,IAAI,aAAa,GAAG,SAAS,CAQ/C;IAED;;;;;OAKG;IACH,IAAI,WAAW,IAAI,MAAM,GAAG,SAAS,CAQpC;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAsBvB;CAyBF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/types.d.ts b/packages/components/declarations/components/hds/text/types.d.ts new file mode 100644 index 0000000000..2e59b4a1ba --- /dev/null +++ b/packages/components/declarations/components/hds/text/types.d.ts @@ -0,0 +1,59 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export type HdsTextTags = keyof HTMLElementTagNameMap; +export declare enum HdsTextColorValues { + Primary = "primary", + Strong = "strong", + Faint = "faint", + Disabled = "disabled", + HighContrast = "high-contrast", + Action = "action", + ActionHover = "action-hover", + ActionActive = "action-active", + Highlight = "highlight", + HighlightOnSurface = "highlight-on-surface", + HighlightHighContrast = "highlight-high-contrast", + Success = "success", + SuccessOnSurface = "success-on-surface", + SuccessHighContrast = "success-high-contrast", + Warning = "warning", + WarningOnSurface = "warning-on-surface", + WarningHighContrast = "warning-high-contrast", + Critical = "critical", + CriticalOnSurface = "critical-on-surface", + CriticalHighContrast = "critical-high-contrast" +} +export type HdsTextColors = `${HdsTextColorValues}`; +export declare enum HdsTextAlignValues { + Left = "left", + Center = "center", + Right = "right" +} +export type HdsTextAligns = `${HdsTextAlignValues}`; +export declare enum HdsTextWeightValues { + Regular = "regular", + Medium = "medium", + Semibold = "semibold", + Bold = "bold" +} +export type HdsTextWeights = `${HdsTextWeightValues}`; +export declare enum HdsTextSizeValues { + FiveHundred = 500, + FourHundred = 400, + ThreeHundred = 300, + TwoHundred = 200, + OneHundred = 100 +} +type HdsTextSizesString = `${HdsTextSizeValues}`; +type HdsTextSizesNumber = `${HdsTextSizeValues}` extends `${infer T extends number}` ? T : never; +export type HdsTextSizes = HdsTextSizesString | HdsTextSizesNumber; +export declare enum HdsTextGroupValues { + Code = "code", + Display = "display", + Body = "body" +} +export type HdsTextGroups = `${HdsTextGroupValues}`; +export {}; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/text/types.d.ts.map b/packages/components/declarations/components/hds/text/types.d.ts.map new file mode 100644 index 0000000000..8594574458 --- /dev/null +++ b/packages/components/declarations/components/hds/text/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/text/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,WAAW,GAAG,MAAM,qBAAqB,CAAC;AAEtD,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,QAAQ,aAAa;IACrB,YAAY,kBAAkB;IAC9B,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,YAAY,kBAAkB;IAC9B,SAAS,cAAc;IACvB,kBAAkB,yBAAyB;IAC3C,qBAAqB,4BAA4B;IACjD,OAAO,YAAY;IACnB,gBAAgB,uBAAuB;IACvC,mBAAmB,0BAA0B;IAC7C,OAAO,YAAY;IACnB,gBAAgB,uBAAuB;IACvC,mBAAmB,0BAA0B;IAC7C,QAAQ,aAAa;IACrB,iBAAiB,wBAAwB;IACzC,oBAAoB,2BAA2B;CAChD;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,KAAK,UAAU;CAChB;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC;AAEpD,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;IACrB,IAAI,SAAS;CACd;AACD,MAAM,MAAM,cAAc,GAAG,GAAG,mBAAmB,EAAE,CAAC;AAEtD,oBAAY,iBAAiB;IAC3B,WAAW,MAAM;IACjB,WAAW,MAAM;IACjB,YAAY,MAAM;IAClB,UAAU,MAAM;IAChB,UAAU,MAAM;CACjB;AACD,KAAK,kBAAkB,GAAG,GAAG,iBAAiB,EAAE,CAAC;AACjD,KAAK,kBAAkB,GACrB,GAAG,iBAAiB,EAAE,SAAS,GAAG,MAAM,CAAC,SAAS,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAC;AACzE,MAAM,MAAM,YAAY,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAEnE,oBAAY,kBAAkB;IAC5B,IAAI,SAAS;IACb,OAAO,YAAY;IACnB,IAAI,SAAS;CACd;AACD,MAAM,MAAM,aAAa,GAAG,GAAG,kBAAkB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/index.d.ts b/packages/components/declarations/components/hds/time/index.d.ts new file mode 100644 index 0000000000..a8f2a19a55 --- /dev/null +++ b/packages/components/declarations/components/hds/time/index.d.ts @@ -0,0 +1,38 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { DisplayType } from '../../../services/hds-time-types.ts'; +import type TimeService from '../../../services/hds-time'; +export interface HdsTimeSignature { + Args: { + date?: Date | string; + startDate?: Date | string; + endDate?: Date | string; + display?: 'utc' | 'relative' | 'friendly-only' | 'friendly-local' | 'friendly-relative'; + isOpen?: boolean; + hasTooltip?: boolean; + displayType: DisplayType; + isoUtcString?: string; + didInsertNode: () => void; + willDestroyNode: () => void; + }; + Element: HTMLElement; +} +export default class HdsTime extends Component { + readonly hdsTime: TimeService; + get date(): Date | undefined; + get startDate(): Date | undefined; + get endDate(): Date | undefined; + get isValidDate(): boolean; + get isValidDateRange(): boolean; + get hasTooltip(): boolean; + get isoUtcString(): string | undefined; + get rangeIsoUtcString(): string; + get display(): DisplayType; + get isOpen(): boolean; + didInsertNode(): void; + willDestroyNode(): void; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/index.d.ts.map b/packages/components/declarations/components/hds/time/index.d.ts.map new file mode 100644 index 0000000000..f3b63301bb --- /dev/null +++ b/packages/components/declarations/components/hds/time/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/time/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAI3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QACrB,SAAS,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QAC1B,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;QACxB,OAAO,CAAC,EACJ,KAAK,GACL,UAAU,GACV,eAAe,GACf,gBAAgB,GAChB,mBAAmB,CAAC;QACxB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,WAAW,EAAE,WAAW,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,IAAI,CAAC;QAC1B,eAAe,EAAE,MAAM,IAAI,CAAC;KAC7B,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAKD,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS,CAAC,gBAAgB,CAAC;IAC9D,SAA0B,OAAO,EAAE,WAAW,CAAC;IAE/C,IAAI,IAAI,IAAI,IAAI,GAAG,SAAS,CAW3B;IAED,IAAI,SAAS,IAAI,IAAI,GAAG,SAAS,CAUhC;IAED,IAAI,OAAO,IAAI,IAAI,GAAG,SAAS,CAU9B;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,gBAAgB,IAAI,OAAO,CAK9B;IAED,IAAI,UAAU,IAAI,OAAO,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,GAAG,SAAS,CAQrC;IAED,IAAI,iBAAiB,IAAI,MAAM,CAQ9B;IAED,IAAI,OAAO,IAAI,WAAW,CAYzB;IAED,IAAI,MAAM,IAAI,OAAO,CAEpB;IAGD,aAAa,IAAI,IAAI;IASrB,eAAe,IAAI,IAAI;CAoExB"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/range.d.ts b/packages/components/declarations/components/hds/time/range.d.ts new file mode 100644 index 0000000000..ae481b334e --- /dev/null +++ b/packages/components/declarations/components/hds/time/range.d.ts @@ -0,0 +1,35 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type TimeService from '../../../services/hds-time'; +export interface HdsTimeRangeSignature { + Args: { + startDate?: Date; + endDate?: Date; + }; + Element: HTMLElement; +} +export default class HdsTimeRange extends Component { + readonly hdsTime: TimeService; + get startDateIsoUtcString(): string | undefined; + get endDateIsoUtcString(): string | undefined; + get startDateDisplayFormat(): { + month: Intl.DateTimeFormatOptions['month']; + day: Intl.DateTimeFormatOptions['day']; + year?: Intl.DateTimeFormatOptions['year']; + hour?: Intl.DateTimeFormatOptions['hour']; + minute?: Intl.DateTimeFormatOptions['minute']; + second?: Intl.DateTimeFormatOptions['second']; + }; + get endDateDisplayFormat(): { + month: Intl.DateTimeFormatOptions['month']; + day: Intl.DateTimeFormatOptions['day']; + year?: Intl.DateTimeFormatOptions['year']; + hour?: Intl.DateTimeFormatOptions['hour']; + minute?: Intl.DateTimeFormatOptions['minute']; + second?: Intl.DateTimeFormatOptions['second']; + }; +} +//# sourceMappingURL=range.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/range.d.ts.map b/packages/components/declarations/components/hds/time/range.d.ts.map new file mode 100644 index 0000000000..21bd09ad2a --- /dev/null +++ b/packages/components/declarations/components/hds/time/range.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"range.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/time/range.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAE3C,OAAO,KAAK,WAAW,MAAM,4BAA4B,CAAC;AAE1D,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE;QACJ,SAAS,CAAC,EAAE,IAAI,CAAC;QACjB,OAAO,CAAC,EAAE,IAAI,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAS,CAAC,qBAAqB,CAAC;IACxE,SAA0B,OAAO,EAAE,WAAW,CAAC;IAE/C,IAAI,qBAAqB,IAAI,MAAM,GAAG,SAAS,CAK9C;IAED,IAAI,mBAAmB,IAAI,MAAM,GAAG,SAAS,CAK5C;IAED,IAAI,sBAAsB,IAAI;QAC5B,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC3C,GAAG,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KAC/C,CAgBA;IAED,IAAI,oBAAoB,IAAI;QAC1B,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC3C,GAAG,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KAC/C,CAMA;CA0BF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/single.d.ts b/packages/components/declarations/components/hds/time/single.d.ts new file mode 100644 index 0000000000..6a4ff67e55 --- /dev/null +++ b/packages/components/declarations/components/hds/time/single.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { DisplayType } from '../../../services/hds-time-types.ts'; +export interface HdsTimeSingleSignature { + Args: { + date?: Date; + display: DisplayType; + isoUtcString?: string; + register: () => void; + unregister: () => void; + }; + Element: HTMLTimeElement; +} +declare const HdsTimeSingleComponent: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsTimeSingleComponent; +//# sourceMappingURL=single.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/time/single.d.ts.map b/packages/components/declarations/components/hds/time/single.d.ts.map new file mode 100644 index 0000000000..e5e96201f8 --- /dev/null +++ b/packages/components/declarations/components/hds/time/single.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"single.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/time/single.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qCAAqC,CAAC;AAEvE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,IAAI,CAAC;QACZ,OAAO,EAAE,WAAW,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,QAAQ,EAAE,MAAM,IAAI,CAAC;QACrB,UAAU,EAAE,MAAM,IAAI,CAAC;KACxB,CAAC;IACF,OAAO,EAAE,eAAe,CAAC;CAC1B;AAED,QAAA,MAAM,sBAAsB,wFAAkD,CAAC;AAE/E,eAAe,sBAAsB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/toast/index.d.ts b/packages/components/declarations/components/hds/toast/index.d.ts new file mode 100644 index 0000000000..49de1eadbf --- /dev/null +++ b/packages/components/declarations/components/hds/toast/index.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { HdsAlertSignature } from '../alert/'; +export interface HdsToastSignature extends Omit { + Args: Omit; +} +declare const HdsToast: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsToast; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/toast/index.d.ts.map b/packages/components/declarations/components/hds/toast/index.d.ts.map new file mode 100644 index 0000000000..4801f43728 --- /dev/null +++ b/packages/components/declarations/components/hds/toast/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/toast/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACxE,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC;CAC/C;AAED,QAAA,MAAM,QAAQ,mFAA6C,CAAC;AAE5D,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tooltip-button/index.d.ts b/packages/components/declarations/components/hds/tooltip-button/index.d.ts new file mode 100644 index 0000000000..8776430830 --- /dev/null +++ b/packages/components/declarations/components/hds/tooltip-button/index.d.ts @@ -0,0 +1,44 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import type { Props as TippyProps } from 'tippy.js'; +import type { HdsTooltipPlacements } from './types.ts'; +export declare const PLACEMENTS: string[]; +export interface HdsTooltipSignature { + Args: { + extraTippyOptions?: Partial>; + isInline?: boolean; + offset?: [number, number]; + placement?: HdsTooltipPlacements; + text: string; + }; + Blocks: { + default: []; + }; + Element: HTMLButtonElement; +} +export default class HdsTooltip extends Component { + /** + * @param text + * @type {string} + * @description text content for tooltip + */ + get text(): string; + get options(): Partial; + /** + * @param isInline + * @type {boolean} + * @default true + * @description sets display for the button + */ + get isInline(): boolean; + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames(): string; +} +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tooltip-button/index.d.ts.map b/packages/components/declarations/components/hds/tooltip-button/index.d.ts.map new file mode 100644 index 0000000000..4019c2f8f7 --- /dev/null +++ b/packages/components/declarations/components/hds/tooltip-button/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tooltip-button/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAG3C,OAAO,KAAK,EAAE,KAAK,IAAI,UAAU,EAAE,MAAM,UAAU,CAAC;AAGpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,MAAM,EAA6C,CAAC;AAE7E,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE;QACJ,iBAAiB,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,WAAW,GAAG,QAAQ,CAAC,CAAC,CAAC;QACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;QACnB,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1B,SAAS,CAAC,EAAE,oBAAoB,CAAC;QACjC,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;IACF,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACpE;;;;OAIG;IACH,IAAI,IAAI,IAAI,MAAM,CASjB;IAED,IAAI,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC,CAejC;IAED;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,OAAO,CAGtB;IAED;;;;OAIG;IACH,IAAI,UAAU,IAAI,MAAM,CAWvB;CAeF"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tooltip-button/types.d.ts b/packages/components/declarations/components/hds/tooltip-button/types.d.ts new file mode 100644 index 0000000000..be42d01450 --- /dev/null +++ b/packages/components/declarations/components/hds/tooltip-button/types.d.ts @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare enum HdsTooltipPlacementValues { + Top = "top", + TopStart = "top-start", + TopEnd = "top-end", + Right = "right", + RightStart = "right-start", + RightEnd = "right-end", + Bottom = "bottom", + BottomStart = "bottom-start", + BottomEnd = "bottom-end", + Left = "left", + LeftStart = "left-start", + LeftEnd = "left-end" +} +export type HdsTooltipPlacements = `${HdsTooltipPlacementValues}`; +//# sourceMappingURL=types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/tooltip-button/types.d.ts.map b/packages/components/declarations/components/hds/tooltip-button/types.d.ts.map new file mode 100644 index 0000000000..fbf2aaa061 --- /dev/null +++ b/packages/components/declarations/components/hds/tooltip-button/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/tooltip-button/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,oBAAY,yBAAyB;IACnC,GAAG,QAAQ;IACX,QAAQ,cAAc;IACtB,MAAM,YAAY;IAClB,KAAK,UAAU;IACf,UAAU,gBAAgB;IAC1B,QAAQ,cAAc;IACtB,MAAM,WAAW;IACjB,WAAW,iBAAiB;IAC5B,SAAS,eAAe;IACxB,IAAI,SAAS;IACb,SAAS,eAAe;IACxB,OAAO,aAAa;CACrB;AAED,MAAM,MAAM,oBAAoB,GAAG,GAAG,yBAAyB,EAAE,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/components/hds/yield/index.d.ts b/packages/components/declarations/components/hds/yield/index.d.ts new file mode 100644 index 0000000000..1411c7f404 --- /dev/null +++ b/packages/components/declarations/components/hds/yield/index.d.ts @@ -0,0 +1,12 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsYieldSignature { + Blocks: { + default: []; + }; +} +declare const HdsYield: import("@ember/component/template-only").TemplateOnlyComponent; +export default HdsYield; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/components/hds/yield/index.d.ts.map b/packages/components/declarations/components/hds/yield/index.d.ts.map new file mode 100644 index 0000000000..171ceff43e --- /dev/null +++ b/packages/components/declarations/components/hds/yield/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hds/yield/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE;QACN,OAAO,EAAE,EAAE,CAAC;KACb,CAAC;CACH;AAED,QAAA,MAAM,QAAQ,mFAA6C,CAAC;AAE5D,eAAe,QAAQ,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/helpers.d.ts b/packages/components/declarations/helpers.d.ts new file mode 100644 index 0000000000..dde59fd095 --- /dev/null +++ b/packages/components/declarations/helpers.d.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +//# sourceMappingURL=helpers.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/helpers.d.ts.map b/packages/components/declarations/helpers.d.ts.map new file mode 100644 index 0000000000..295fff82b6 --- /dev/null +++ b/packages/components/declarations/helpers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;GAGG"} \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-format-date.d.ts b/packages/components/declarations/helpers/hds-format-date.d.ts new file mode 100644 index 0000000000..b290b4ff6d --- /dev/null +++ b/packages/components/declarations/helpers/hds-format-date.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare function hdsFormatDate([date, options]: [ + Date, + { + month: Intl.DateTimeFormatOptions['month']; + day: Intl.DateTimeFormatOptions['day']; + year?: Intl.DateTimeFormatOptions['year']; + hour?: Intl.DateTimeFormatOptions['hour']; + minute?: Intl.DateTimeFormatOptions['minute']; + second?: Intl.DateTimeFormatOptions['second']; + } +]): string; +declare const hdsFormatDateHelper: any; +export default hdsFormatDateHelper; +//# sourceMappingURL=hds-format-date.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-format-date.d.ts.map b/packages/components/declarations/helpers/hds-format-date.d.ts.map new file mode 100644 index 0000000000..c3f3335481 --- /dev/null +++ b/packages/components/declarations/helpers/hds-format-date.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-format-date.d.ts","sourceRoot":"","sources":["../../src/helpers/hds-format-date.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAeH,wBAAgB,aAAa,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;IAC7C,IAAI;IACJ;QACE,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;QAC3C,GAAG,EAAE,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACvC,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,IAAI,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC;QAC1C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;QAC9C,MAAM,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KAC/C;CACF,GAAG,MAAM,CAQT;AAED,QAAA,MAAM,mBAAmB,KAAwB,CAAC;AAClD,eAAe,mBAAmB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-format-relative.d.ts b/packages/components/declarations/helpers/hds-format-relative.d.ts new file mode 100644 index 0000000000..e9805980ea --- /dev/null +++ b/packages/components/declarations/helpers/hds-format-relative.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare function hdsFormatRelative([value, unit]: [ + number, + Intl.RelativeTimeFormatUnit +]): string; +declare const hdsFormatRelativeHelper: any; +export default hdsFormatRelativeHelper; +//# sourceMappingURL=hds-format-relative.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-format-relative.d.ts.map b/packages/components/declarations/helpers/hds-format-relative.d.ts.map new file mode 100644 index 0000000000..2e24f723d3 --- /dev/null +++ b/packages/components/declarations/helpers/hds-format-relative.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-format-relative.d.ts","sourceRoot":"","sources":["../../src/helpers/hds-format-relative.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAcH,wBAAgB,iBAAiB,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE;IAC/C,MAAM;IACN,IAAI,CAAC,sBAAsB;CAC5B,GAAG,MAAM,CAMT;AAED,QAAA,MAAM,uBAAuB,KAA4B,CAAC;AAC1D,eAAe,uBAAuB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-link-to-models.d.ts b/packages/components/declarations/helpers/hds-link-to-models.d.ts new file mode 100644 index 0000000000..4fd9f139e3 --- /dev/null +++ b/packages/components/declarations/helpers/hds-link-to-models.d.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare function hdsLinkToModels([model, models]: [ + T | undefined, + T[] | undefined +]): T[]; +declare const hdsLinkToModelsHelper: any; +export default hdsLinkToModelsHelper; +//# sourceMappingURL=hds-link-to-models.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-link-to-models.d.ts.map b/packages/components/declarations/helpers/hds-link-to-models.d.ts.map new file mode 100644 index 0000000000..46a1801f91 --- /dev/null +++ b/packages/components/declarations/helpers/hds-link-to-models.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-link-to-models.d.ts","sourceRoot":"","sources":["../../src/helpers/hds-link-to-models.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAgBH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,EAAE;IAClD,CAAC,GAAG,SAAS;IACb,CAAC,EAAE,GAAG,SAAS;CAChB,OAaA;AAED,QAAA,MAAM,qBAAqB,KAA0B,CAAC;AACtD,eAAe,qBAAqB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-link-to-query.d.ts b/packages/components/declarations/helpers/hds-link-to-query.d.ts new file mode 100644 index 0000000000..2922b076b4 --- /dev/null +++ b/packages/components/declarations/helpers/hds-link-to-query.d.ts @@ -0,0 +1,10 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare function hdsLinkToQuery([query]: [ + Record | undefined +]): Record; +declare const hdsLinkToQueryHelper: any; +export default hdsLinkToQueryHelper; +//# sourceMappingURL=hds-link-to-query.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/helpers/hds-link-to-query.d.ts.map b/packages/components/declarations/helpers/hds-link-to-query.d.ts.map new file mode 100644 index 0000000000..84f546a203 --- /dev/null +++ b/packages/components/declarations/helpers/hds-link-to-query.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-link-to-query.d.ts","sourceRoot":"","sources":["../../src/helpers/hds-link-to-query.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAkBH,wBAAgB,cAAc,CAAC,CAAC,KAAK,CAAC,EAAE;IACtC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS;CACnC,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAEzB;AAED,QAAA,MAAM,oBAAoB,KAAyB,CAAC;AACpD,eAAe,oBAAoB,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/instance-initializers/load-sprite.d.ts b/packages/components/declarations/instance-initializers/load-sprite.d.ts new file mode 100644 index 0000000000..f868451448 --- /dev/null +++ b/packages/components/declarations/instance-initializers/load-sprite.d.ts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type ApplicationInstance from '@ember/application/instance'; +export declare function initialize(appInstance: ApplicationInstance & { + __flightIconsSpriteLoaded?: boolean; +}): Promise; +declare const _default: { + initialize: typeof initialize; +}; +export default _default; +//# sourceMappingURL=load-sprite.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/instance-initializers/load-sprite.d.ts.map b/packages/components/declarations/instance-initializers/load-sprite.d.ts.map new file mode 100644 index 0000000000..9016a1b7a1 --- /dev/null +++ b/packages/components/declarations/instance-initializers/load-sprite.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"load-sprite.d.ts","sourceRoot":"","sources":["../../src/instance-initializers/load-sprite.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,wBAAsB,UAAU,CAC9B,WAAW,EAAE,mBAAmB,GAAG;IACjC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CACrC,iBAwBF;;;;AAED,wBAEE"} \ No newline at end of file diff --git a/packages/components/declarations/modifiers.d.ts b/packages/components/declarations/modifiers.d.ts new file mode 100644 index 0000000000..b9bda705a6 --- /dev/null +++ b/packages/components/declarations/modifiers.d.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +//# sourceMappingURL=modifiers.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/modifiers.d.ts.map b/packages/components/declarations/modifiers.d.ts.map new file mode 100644 index 0000000000..91afde53b0 --- /dev/null +++ b/packages/components/declarations/modifiers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"modifiers.d.ts","sourceRoot":"","sources":["../src/modifiers.ts"],"names":[],"mappings":"AAAA;;;GAGG"} \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-anchored-position.d.ts b/packages/components/declarations/modifiers/hds-anchored-position.d.ts new file mode 100644 index 0000000000..c859d0be22 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-anchored-position.d.ts @@ -0,0 +1,45 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { Placement, Strategy, OffsetOptions, FlipOptions, ShiftOptions, AutoPlacementOptions, ArrowOptions, Middleware } from '@floating-ui/dom'; +export declare const DEFAULT_PLACEMENT = "bottom"; +export declare const PLACEMENTS: Placement[]; +export type FloatingUIOptions = { + placement?: Placement; + strategy?: Strategy; + offsetOptions?: OffsetOptions; + flipOptions?: FlipOptions; + shiftOptions?: ShiftOptions; + autoPlacementOptions?: AutoPlacementOptions; + middlewareExtra?: Middleware[]; + enableCollisionDetection?: boolean | 'shift' | 'flip' | 'auto'; + arrowElement?: ArrowOptions['element']; + arrowPadding?: ArrowOptions['padding']; + matchToggleWidth?: boolean; +}; +export declare const getFloatingUIOptions: (options: FloatingUIOptions) => { + placement: Placement; + strategy: Strategy; + middleware: Middleware[]; +}; +export interface HdsAnchoredPositionSignature { + Element: HTMLElement; + Args: { + Positional: [HTMLElement | SVGElement]; + Named: FloatingUIOptions & { + arrowSelector?: string; + }; + }; +} +declare const _default: import("ember-modifier").FunctionBasedModifier<{ + Element: HTMLElement; + Args: { + Named: FloatingUIOptions & { + arrowSelector?: string; + }; + Positional: [HTMLElement | SVGElement]; + }; +}>; +export default _default; +//# sourceMappingURL=hds-anchored-position.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-anchored-position.d.ts.map b/packages/components/declarations/modifiers/hds-anchored-position.d.ts.map new file mode 100644 index 0000000000..98f0f2034e --- /dev/null +++ b/packages/components/declarations/modifiers/hds-anchored-position.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-anchored-position.d.ts","sourceRoot":"","sources":["../../src/modifiers/hds-anchored-position.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsBH,OAAO,KAAK,EACV,SAAS,EACT,QAAQ,EACR,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,YAAY,EACZ,UAAU,EACX,MAAM,kBAAkB,CAAC;AAE1B,eAAO,MAAM,iBAAiB,WAAW,CAAC;AAC1C,eAAO,MAAM,UAAU,EAAE,SAAS,EAajC,CAAC;AAOF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,eAAe,CAAC,EAAE,UAAU,EAAE,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;IAC/D,YAAY,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACvC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAIF,eAAO,MAAM,oBAAoB,YACtB,iBAAiB,KACzB;IACD,SAAS,EAAE,SAAS,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,UAAU,EAAE,CAAC;CAwE1B,CAAC;AAEF,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;QACvC,KAAK,EAAE,iBAAiB,GAAG;YAAE,aAAa,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC;KACvD,CAAC;CACH;;;;;4BAFgD,MAAM;;;;;AAQvD,wBA6GE"} \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-clipboard.d.ts b/packages/components/declarations/modifiers/hds-clipboard.d.ts new file mode 100644 index 0000000000..86a9d62ed8 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-clipboard.d.ts @@ -0,0 +1,36 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +type TextToCopy = string | number | bigint; +type TargetToCopy = HTMLElement | string; +export interface HdsClipboardModifierSignature { + Element: HTMLElement; + Args: { + Named: { + text?: TextToCopy; + target?: TargetToCopy; + onSuccess?: (...args: any[]) => void; + onError?: (...args: any[]) => void; + }; + }; +} +export declare const getTextToCopy: (text: TextToCopy) => string; +export declare const getTargetElement: (target: string | Node) => HTMLElement | undefined; +export declare const getTextToCopyFromTargetElement: (targetElement: TargetToCopy) => string; +export declare const writeTextToClipboard: (textToCopy: string) => Promise; +export declare const copyToClipboard: (text?: TextToCopy, target?: TargetToCopy) => Promise; +declare const _default: import("ember-modifier").FunctionBasedModifier<{ + Element: HTMLElement; + Args: { + Named: { + text?: TextToCopy; + target?: TargetToCopy; + onSuccess?: (...args: any[]) => void; + onError?: (...args: any[]) => void; + }; + Positional: []; + }; +}>; +export default _default; +//# sourceMappingURL=hds-clipboard.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-clipboard.d.ts.map b/packages/components/declarations/modifiers/hds-clipboard.d.ts.map new file mode 100644 index 0000000000..6f7f203f6d --- /dev/null +++ b/packages/components/declarations/modifiers/hds-clipboard.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-clipboard.d.ts","sourceRoot":"","sources":["../../src/modifiers/hds-clipboard.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAC3C,KAAK,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;AAEzC,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE;QACJ,KAAK,EAAE;YACL,IAAI,CAAC,EAAE,UAAU,CAAC;YAClB,MAAM,CAAC,EAAE,YAAY,CAAC;YAEtB,SAAS,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;YAErC,OAAO,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;SACpC,CAAC;KACH,CAAC;CACH;AAED,eAAO,MAAM,aAAa,SAAU,UAAU,KAAG,MAmBhD,CAAC;AAEF,eAAO,MAAM,gBAAgB,WACnB,MAAM,GAAG,IAAI,KACpB,WAAW,GAAG,SA2BhB,CAAC;AAEF,eAAO,MAAM,8BAA8B,kBAC1B,YAAY,KAC1B,MAyBF,CAAC;AAEF,eAAO,MAAM,oBAAoB,eACnB,MAAM,KACjB,OAAO,CAAC,OAAO,CAqCjB,CAAC;AAEF,eAAO,MAAM,eAAe,UACnB,UAAU,WACR,YAAY,KACpB,OAAO,CAAC,OAAO,CAiBjB,CAAC;;;;;mBAxJW,UAAU;qBACR,YAAY;wBAET,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;sBAE1B,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI;;;;;AAyJxC,wBAiCE"} \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-register-event.d.ts b/packages/components/declarations/modifiers/hds-register-event.d.ts new file mode 100644 index 0000000000..d33c590ba4 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-register-event.d.ts @@ -0,0 +1,24 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export interface HdsRegisterEventSignature { + Element: HTMLElement; + Args: { + Positional: [keyof ElementEventMap, EventListener]; + Named: { + useCapture?: boolean; + }; + }; +} +declare const _default: import("ember-modifier").FunctionBasedModifier<{ + Element: HTMLElement; + Args: { + Named: { + useCapture?: boolean; + }; + Positional: [keyof ElementEventMap, EventListener]; + }; +}>; +export default _default; +//# sourceMappingURL=hds-register-event.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-register-event.d.ts.map b/packages/components/declarations/modifiers/hds-register-event.d.ts.map new file mode 100644 index 0000000000..4d873016d4 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-register-event.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-register-event.d.ts","sourceRoot":"","sources":["../../src/modifiers/hds-register-event.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,WAAW,CAAC;IACrB,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,MAAM,eAAe,EAAE,aAAa,CAAC,CAAC;QACnD,KAAK,EAAE;YAAE,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,CAAC;KACjC,CAAC;CACH;;;;;yBAFyB,OAAO;;;;;AAajC,wBAoBE"} \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-tooltip.d.ts b/packages/components/declarations/modifiers/hds-tooltip.d.ts new file mode 100644 index 0000000000..cc993051a8 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-tooltip.d.ts @@ -0,0 +1,50 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Modifier from 'ember-modifier'; +import type { ArgsFor } from 'ember-modifier'; +import type { HideAll as TippyHideAll, Instance as TippyInstance, Props as TippyProps } from 'tippy.js'; +import 'tippy.js/dist/svg-arrow.css'; +export interface HdsTooltipModifierSignature { + Args: { + Positional: [string]; + Named: { + options?: Partial; + }; + }; + Element: HTMLElement; +} +/** + * + * `Tooltip` implements a modifier that uses Tippy.js to display a tooltip. + * + * Sample usage: + * ``` + *
Hover me!
+ * ``` + * + * @see https://atomiks.github.io/tippyjs + * @class TooltipModifier + * + */ +export default class HdsTooltipModifier extends Modifier { + #private; + didSetup: boolean; + interval: number | undefined; + needsTabIndex: boolean; + tooltip: TippyInstance | undefined; + constructor(owner: unknown, args: ArgsFor); + hideOnEsc: { + name: string; + defaultValue: boolean; + fn({ hide }: { + hide: TippyHideAll; + }): { + onShow(): void; + onHide(): void; + }; + }; + modify(element: HdsTooltipModifierSignature['Element'], positional: HdsTooltipModifierSignature['Args']['Positional'], named: HdsTooltipModifierSignature['Args']['Named']): void; +} +//# sourceMappingURL=hds-tooltip.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/modifiers/hds-tooltip.d.ts.map b/packages/components/declarations/modifiers/hds-tooltip.d.ts.map new file mode 100644 index 0000000000..62b28bf729 --- /dev/null +++ b/packages/components/declarations/modifiers/hds-tooltip.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-tooltip.d.ts","sourceRoot":"","sources":["../../src/modifiers/hds-tooltip.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,QAAQ,MAAM,gBAAgB,CAAC;AACtC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAM9C,OAAO,KAAK,EACV,OAAO,IAAI,YAAY,EACvB,QAAQ,IAAI,aAAa,EACzB,KAAK,IAAI,UAAU,EACpB,MAAM,UAAU,CAAC;AAElB,OAAO,6BAA6B,CAAC;AAErC,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE;QACJ,UAAU,EAAE,CAAC,MAAM,CAAC,CAAC;QACrB,KAAK,EAAE;YACL,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;SAC/B,CAAC;KACH,CAAC;IACF,OAAO,EAAE,WAAW,CAAC;CACtB;AAWD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,QAAQ,CAAC,2BAA2B,CAAC;;IACnF,QAAQ,UAAS;IACjB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAa;IACzC,aAAa,UAAS;IACtB,OAAO,EAAE,aAAa,GAAG,SAAS,CAAa;gBAEnC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,2BAA2B,CAAC;IAKtE,SAAS;;;qBAGM;YAAE,IAAI,EAAE,YAAY,CAAA;SAAE;;;;MAgBnC;IAEF,MAAM,CACJ,OAAO,EAAE,2BAA2B,CAAC,SAAS,CAAC,EAC/C,UAAU,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC,EAC7D,KAAK,EAAE,2BAA2B,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,GAClD,IAAI;CAyHR"} \ No newline at end of file diff --git a/packages/components/declarations/services.d.ts b/packages/components/declarations/services.d.ts new file mode 100644 index 0000000000..0f440d1957 --- /dev/null +++ b/packages/components/declarations/services.d.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +//# sourceMappingURL=services.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/services.d.ts.map b/packages/components/declarations/services.d.ts.map new file mode 100644 index 0000000000..7afb1044d3 --- /dev/null +++ b/packages/components/declarations/services.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"services.d.ts","sourceRoot":"","sources":["../src/services.ts"],"names":[],"mappings":"AAAA;;;GAGG"} \ No newline at end of file diff --git a/packages/components/declarations/services/hds-time-types.d.ts b/packages/components/declarations/services/hds-time-types.d.ts new file mode 100644 index 0000000000..5f89ac1536 --- /dev/null +++ b/packages/components/declarations/services/hds-time-types.d.ts @@ -0,0 +1,31 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export type DefaultDisplayType = { + displayFormat?: DisplayFormatType | null; + showFriendly: boolean; + showRelative: boolean; + tooltipFormat?: DisplayFormatType | null; +}; +export type DisplayFormatType = { + month: string; + day: string; + year: string; + hour?: string; + minute?: string; + second?: string; + timeZoneName?: string; +}; +export type DisplayType = { + options?: DefaultDisplayType; + difference: { + absValueInMs: number; + valueInMs: number; + }; + relative: { + value: number; + unit: string; + }; +}; +//# sourceMappingURL=hds-time-types.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/services/hds-time-types.d.ts.map b/packages/components/declarations/services/hds-time-types.d.ts.map new file mode 100644 index 0000000000..e5acb212ab --- /dev/null +++ b/packages/components/declarations/services/hds-time-types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-time-types.d.ts","sourceRoot":"","sources":["../../src/services/hds-time-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACzC,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,UAAU,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC;IACxD,QAAQ,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC3C,CAAC"} \ No newline at end of file diff --git a/packages/components/declarations/services/hds-time.d.ts b/packages/components/declarations/services/hds-time.d.ts new file mode 100644 index 0000000000..447205a143 --- /dev/null +++ b/packages/components/declarations/services/hds-time.d.ts @@ -0,0 +1,76 @@ +import Service from '@ember/service'; +import type { TaskGenerator } from 'ember-concurrency'; +import type { DisplayType, DefaultDisplayType, DisplayFormatType } from './hds-time-types.ts'; +export declare const MILLISECOND_IN_MS = 1; +export declare const SECOND_IN_MS: number; +export declare const MINUTE_IN_MS: number; +export declare const HOUR_IN_MS: number; +export declare const DAY_IN_MS: number; +export declare const WEEK_IN_MS: number; +export declare const THRESHOLD_RELATIVE_TIME_IN_MS: number; +export declare enum HdsTimeRelativeUnitValues { + Second = "second", + Hour = "hour", + Minute = "minute", + Day = "day", + Week = "week" +} +export declare const DEFAULT_RELATIVE_THRESHOLDS: { + second: number; + minute: number; + hour: number; + day: number; +}; +export declare enum HdsDisplayKeyValues { + FriendlyRelative = "friendly-relative",// Example: 'Sep 5, 2018 (30 minutes ago)' + FriendlyLocal = "friendly-local",// Example: 'Sep 5, 2018, 4:07:32 pm' + FriendlyOnly = "friendly-only",// Example: 'Sep 5, 2018' + Relative = "relative",// Example: 'in 7 days' + Utc = "utc" +} +export declare const FORMAT_PRECISION_SHORT_DATE: DisplayFormatType; +export declare const FORMAT_PRECISION_MINUTE: DisplayFormatType; +export declare const FORMAT_PRECISION_SECOND: DisplayFormatType; +export declare const DATE_DISPLAY_FORMATS: { + [x: string]: DisplayFormatType; +}; +export declare const DEFAULT_DISPLAY = ""; +export declare const DEFAULT_DISPLAY_MAPPING: { + [x: string]: DefaultDisplayType; +}; +export declare const DISPLAY_SCALE: string[]; +export declare const DISPLAYS: HdsDisplayKeyValues[]; +export default class TimeService extends Service { + #private; + now: number; + format(difference: { + absValueInMs: number; + valueInMs: number; + }, display?: string): DisplayType; + formatTimeRelativeUnit(value: number, unit: string): { + value: number; + unit: string; + }; + selectTimeRelativeUnit({ absValueInMs, valueInMs }: { + absValueInMs: number; + valueInMs: number; + }, thresholds?: { + second: number; + minute: number; + hour: number; + day: number; + }): { + value: number; + unit: string; + }; + timeDifference(startDate: number, endDate: Date): { + absValueInMs: number; + valueInMs: number; + }; + register(id: Date): () => void; + unregister(id: Date): boolean; + start(): TaskGenerator; + toIsoUtcString(date: Date): string | undefined; + get listeners(): Set; +} +//# sourceMappingURL=hds-time.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/services/hds-time.d.ts.map b/packages/components/declarations/services/hds-time.d.ts.map new file mode 100644 index 0000000000..913cc7c703 --- /dev/null +++ b/packages/components/declarations/services/hds-time.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-time.d.ts","sourceRoot":"","sources":["../../src/services/hds-time.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,gBAAgB,CAAC;AAKrC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,YAAY,QAA2B,CAAC;AACrD,eAAO,MAAM,YAAY,QAAoB,CAAC;AAC9C,eAAO,MAAM,UAAU,QAAoB,CAAC;AAC5C,eAAO,MAAM,SAAS,QAAkB,CAAC;AACzC,eAAO,MAAM,UAAU,QAAgB,CAAC;AAExC,eAAO,MAAM,6BAA6B,QAAa,CAAC;AAExD,oBAAY,yBAAyB;IACnC,MAAM,WAAW;IACjB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;CACd;AAED,eAAO,MAAM,2BAA2B;;;;;CAKvC,CAAC;AAEF,oBAAY,mBAAmB;IAC7B,gBAAgB,sBAAsB,CAAE,0CAA0C;IAClF,aAAa,mBAAmB,CAAE,qCAAqC;IACvE,YAAY,kBAAkB,CAAE,yBAAyB;IACzD,QAAQ,aAAa,CAAE,uBAAuB;IAC9C,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,2BAA2B,EAAE,iBAIzC,CAAC;AACF,eAAO,MAAM,uBAAuB,EAAE,iBAIrC,CAAC;AACF,eAAO,MAAM,uBAAuB,EAAE,iBAMrC,CAAC;AACF,eAAO,MAAM,oBAAoB,EAAE;IACjC,CAAC,CAAC,EAAE,MAAM,GAAG,iBAAiB,CAAC;CAIhC,CAAC;AAEF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S9C,IAAI,SAAS,IAAI,GAAG,CAAC,IAAI,CAAC,CAEzB;CACF"} \ No newline at end of file diff --git a/packages/components/declarations/template-registry.d.ts b/packages/components/declarations/template-registry.d.ts new file mode 100644 index 0000000000..b6a8e89228 --- /dev/null +++ b/packages/components/declarations/template-registry.d.ts @@ -0,0 +1,603 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type HdsAccordionComponent from './components/hds/accordion'; +import type HdsAccordionItemComponent from './components/hds/accordion/item'; +import type HdsAccordionItemButtonComponent from './components/hds/accordion/item/button'; +import type HdsAlertComponent from './components/hds/alert'; +import type HdsAlertDescriptionComponent from './components/hds/alert/description'; +import type HdsAlertTitleComponent from './components/hds/alert/title'; +import type HdsAppHeaderComponent from './components/hds/app-header'; +import type HdsAppHeaderHomeLinkComponent from './components/hds/app-header/home-link'; +import type HdsAppHeaderMenuButtonComponent from './components/hds/app-header/menu-button'; +import type HdsAppFooterComponent from './components/hds/app-footer'; +import type HdsAppFooterCopyrightComponent from './components/hds/app-footer/copyright'; +import type HdsAppFooterItemComponent from './components/hds/app-footer/item'; +import type HdsAppFooterLegalLinksComponent from './components/hds/app-footer/legal-links'; +import type HdsAppFooterLinkComponent from './components/hds/app-footer/link'; +import type HdsAppFooterStatusLinkComponent from './components/hds/app-footer/status-link'; +import type HdsBadgeComponent from './components/hds/badge'; +import type HdsBadgeCountComponent from './components/hds/badge-count'; +import type HdsBreadcrumbComponent from './components/hds/breadcrumb/index.ts'; +import type HdsBreadcrumbItemComponent from './components/hds/breadcrumb/item'; +import type HdsBreadcrumbTruncationComponent from './components/hds/breadcrumb/truncation.ts'; +import type HdsButtonComponent from './components/hds/button'; +import type HdsButtonSetComponent from './components/hds/button-set'; +import type HdsAppFrameComponent from './components/hds/app-frame'; +import type HdsAppFrameFooterComponent from './components/hds/app-frame/parts/footer'; +import type HdsAppFrameHeaderComponent from './components/hds/app-frame/parts/header'; +import type HdsAppFrameMainComponent from './components/hds/app-frame/parts/main'; +import type HdsAppFrameModalsComponent from './components/hds/app-frame/parts/modals'; +import type HdsAppFrameSidebarComponent from './components/hds/app-frame/parts/sidebar'; +import type HdsAppSideNavComponent from './components/hds/app-side-nav'; +import type HdsAppSideNavToggleButtonComponent from './components/hds/app-side-nav/toggle-button'; +import type HdsAppSideNavPortalComponent from './components/hds/app-side-nav/portal'; +import type HdsAppSideNavPortalTargetComponent from './components/hds/app-side-nav/portal/target'; +import type HdsAppSideNavListComponent from './components/hds/app-side-nav/list'; +import type HdsAppSideNavListBackLinkComponent from './components/hds/app-side-nav/list/back-link'; +import type HdsAppSideNavListItemComponent from './components/hds/app-side-nav/list/item'; +import type HdsAppSideNavListLinkComponent from './components/hds/app-side-nav/list/link'; +import type HdsAppSideNavListTitleComponent from './components/hds/app-side-nav/list/title'; +import type HdsApplicationStateComponent from './components/hds/application-state'; +import type HdsApplicationStateBodyComponent from './components/hds/application-state/body'; +import type HdsApplicationStateFooterComponent from './components/hds/application-state/footer'; +import type HdsApplicationStateHeaderComponent from './components/hds/application-state/header'; +import type HdsApplicationStateMediaComponent from './components/hds/application-state/media'; +import type HdsCardContainerComponent from './components/hds/card/container.ts'; +import type HdsCodeBlockComponent from './components/hds/code-block'; +import type HdsCodeBlockCopyButtonComponent from './components/hds/code-block/copy-button'; +import type HdsCodeBlockDescriptionComponent from './components/hds/code-block/description'; +import type HdsCodeBlockTitleComponent from './components/hds/code-block/title'; +import type HdsCopyButtonComponent from './components/hds/copy/button/index'; +import type HdsCopySnippetComponent from './components/hds/copy/snippet'; +import type HdsDisclosurePrimitiveComponent from './components/hds/disclosure-primitive'; +import type HdsDialogPrimitiveBodyComponent from './components/hds/dialog-primitive/body'; +import type HdsDialogPrimitiveDescriptionComponent from './components/hds/dialog-primitive/description'; +import type HdsDialogPrimitiveFooterComponent from './components/hds/dialog-primitive/footer'; +import type HdsDialogPrimitiveHeaderComponent from './components/hds/dialog-primitive/header'; +import type HdsDialogPrimitiveOverlayComponent from './components/hds/dialog-primitive/overlay'; +import type HdsDialogPrimitiveWrapperComponent from './components/hds/dialog-primitive/wrapper'; +import type HdsDismissButtonComponent from './components/hds/dismiss-button'; +import type HdsDropdownComponent from './components/hds/dropdown'; +import type HdsDropdownFooterComponent from './components/hds/dropdown/footer'; +import type HdsDropdownHeaderComponent from './components/hds/dropdown/header'; +import type HdsDropdownListItemCheckboxComponent from './components/hds/dropdown/list-item/checkbox'; +import type HdsDropdownListItemCheckmarkComponent from './components/hds/dropdown/list-item/checkmark'; +import type HdsDropdownListItemCopyItemComponent from './components/hds/dropdown/list-item/copy-item'; +import type HdsDropdownListItemDescriptionComponent from './components/hds/dropdown/list-item/description'; +import type HdsDropdownListItemGenericComponent from './components/hds/dropdown/list-item/generic'; +import type HdsDropdownListItemInteractiveComponent from './components/hds/dropdown/list-item/interactive'; +import type HdsDropdownListItemRadioComponent from './components/hds/dropdown/list-item/radio'; +import type HdsDropdownListItemSeparatorComponent from './components/hds/dropdown/list-item/separator'; +import type HdsDropdownListItemTitleComponent from './components/hds/dropdown/list-item/title'; +import type HdsDropdownToggleButtonComponent from './components/hds/dropdown/toggle/button'; +import type HdsDropdownToggleChevronComponent from './components/hds/dropdown/toggle/chevron'; +import type HdsDropdownToggleIconComponent from './components/hds/dropdown/toggle/icon'; +import type HdsFlyoutBodyComponent from './components/hds/flyout/body'; +import type HdsFlyoutDescriptionComponent from './components/hds/flyout/description'; +import type HdsFlyoutFooterComponent from './components/hds/flyout/footer'; +import type HdsFlyoutHeaderComponent from './components/hds/flyout/header'; +import type HdsFlyoutComponent from './components/hds/flyout'; +import type HdsFormCharacterCountComponent from './components/hds/form/character-count'; +import type HdsFormCheckboxBaseComponent from './components/hds/form/checkbox/base'; +import type HdsFormCheckboxFieldComponent from './components/hds/form/checkbox/field'; +import type HdsFormCheckboxGroupComponent from './components/hds/form/checkbox/group'; +import type HdsFormErrorComponent from './components/hds/form/error'; +import type HdsFormErrorMessageComponent from './components/hds/form/error/message'; +import type HdsFormFieldComponent from './components/hds/form/field'; +import type HdsFormFieldsetComponent from './components/hds/form/fieldset'; +import type HdsFormFileInputBaseComponent from './components/hds/form/file-input/base'; +import type HdsFormFileInputFieldComponent from './components/hds/form/file-input/field'; +import type HdsFormHelperTextComponent from './components/hds/form/helper-text'; +import type HdsFormIndicatorComponent from './components/hds/form/indicator'; +import type HdsFormLabelComponent from './components/hds/form/label'; +import type HdsFormLegendComponent from './components/hds/form/legend'; +import type HdsFormMaskedInputBaseComponent from './components/hds/form/masked-input/base'; +import type HdsFormMaskedInputFieldComponent from './components/hds/form/masked-input/field'; +import type HdsFormRadioBaseComponent from './components/hds/form/radio/base'; +import type HdsFormRadioFieldComponent from './components/hds/form/radio/field'; +import type HdsFormRadioGroupComponent from './components/hds/form/radio/group'; +import type HdsFormRadioCardComponent from './components/hds/form/radio-card'; +import type HdsFormRadioCardDescriptionComponent from './components/hds/form/radio-card/description'; +import type HdsFormRadioCardGroupComponent from './components/hds/form/radio-card/group'; +import type HdsFormRadioCardLabelComponent from './components/hds/form/radio-card/label'; +import type HdsFormSelectBaseComponent from './components/hds/form/select/base'; +import type HdsFormSelectFieldComponent from './components/hds/form/select/field'; +import type HdsFormSuperSelectAfterOptionsComponent from './components/hds/form/super-select/after-options'; +import type HdsFormSuperSelectOptionGroupComponent from './components/hds/form/super-select/option-group'; +import type HdsFormSuperSelectPlaceholderComponent from './components/hds/form/super-select/placeholder'; +import type HdsFormSuperSelectSingleBaseComponent from './components/hds/form/super-select/single/base'; +import type HdsFormSuperSelectSingleFieldComponent from './components/hds/form/super-select/single/field'; +import type HdsFormSuperSelectMultipleBaseComponent from './components/hds/form/super-select/multiple/base'; +import type HdsFormSuperSelectMultipleFieldComponent from './components/hds/form/super-select/multiple/field'; +import type HdsFormTextInputBaseComponent from './components/hds/form/text-input/base'; +import type HdsFormTextInputFieldComponent from './components/hds/form/text-input/field'; +import type HdsFormTextareaBaseComponent from './components/hds/form/textarea/base'; +import type HdsFormTextareaFieldComponent from './components/hds/form/textarea/field'; +import type HdsFormToggleBaseComponent from './components/hds/form/toggle/base'; +import type HdsFormToggleFieldComponent from './components/hds/form/toggle/field'; +import type HdsFormToggleGroupComponent from './components/hds/form/toggle/group'; +import type HdsFormVisibilityToggleComponent from './components/hds/form/visibility-toggle'; +import type HdsIconComponent from './components/hds/icon'; +import type HdsIconTileComponent from './components/hds/icon-tile'; +import type HdsInteractiveComponent from './components/hds/interactive'; +import type HdsLinkInlineComponent from './components/hds/link/inline'; +import type HdsLinkStandaloneComponent from './components/hds/link/standalone'; +import type HdsMenuPrimitiveComponent from './components/hds/menu-primitive'; +import type HdsModalBodyComponent from './components/hds/modal/body'; +import type HdsModalFooterComponent from './components/hds/modal/footer'; +import type HdsModalHeaderComponent from './components/hds/modal/header'; +import type HdsModalComponent from './components/hds/modal/'; +import type HdsPageHeaderComponent from './components/hds/page-header'; +import type HdsPageHeaderActionsComponent from './components/hds/page-header/actions'; +import type HdsPageHeaderBadgesComponent from './components/hds/page-header/badges'; +import type HdsPageHeaderDescriptionComponent from './components/hds/page-header/description'; +import type HdsPageHeaderSubtitleComponent from './components/hds/page-header/subtitle'; +import type HdsPageHeaderTitleComponent from './components/hds/page-header/title'; +import type HdsPaginationCompactComponent from './components/hds/pagination/compact/index'; +import type HdsPaginationControlInfoComponent from './components/hds/pagination/info/index'; +import type HdsPaginationControlArrowComponent from './components/hds/pagination/nav/arrow'; +import type HdsPaginationControlEllipsisComponent from './components/hds/pagination/nav/ellipsis'; +import type HdsPaginationControlNumberComponent from './components/hds/pagination/nav/number'; +import type HdsPaginationNumberedComponent from './components/hds/pagination/numbered/index'; +import type HdsPaginationSizeSelectorComponent from './components/hds/pagination/size-selector/index'; +import type HdsPopoverPrimitiveComponent from './components/hds/popover-primitive'; +import type HdsRevealComponent from './components/hds/reveal'; +import type HdsRevealToggleButtonComponent from './components/hds/reveal/toggle/button'; +import type HdsRichTooltipComponent from './components/hds/rich-tooltip/index.ts'; +import type HdsRichTooltipBubbleComponent from './components/hds/rich-tooltip/bubble.ts'; +import type HdsRichTooltipToggleComponent from './components/hds/rich-tooltip/toggle.ts'; +import type HdsSegmentedGroupComponent from './components/hds/segmented-group'; +import type HdsSeparatorComponent from './components/hds/separator'; +import type HdsSideNavComponent from './components/hds/side-nav'; +import type HdsSideNavBaseComponent from './components/hds/side-nav/base'; +import type HdsSideNavToggleButtonComponent from './components/hds/side-nav/toggle-button'; +import type HdsSideNavPortalComponent from './components/hds/side-nav/portal'; +import type HdsSideNavPortalTargetComponent from './components/hds/side-nav/portal/target'; +import type HdsSideNavHeaderComponent from './components/hds/side-nav/header'; +import type HdsSideNavHeaderHomeLinkComponent from './components/hds/side-nav/header/home-link'; +import type HdsSideNavHeaderIconButtonComponent from './components/hds/side-nav/header/icon-button'; +import type HdsSideNavListComponent from './components/hds/side-nav/list'; +import type HdsSideNavListBackLinkComponent from './components/hds/side-nav/list/back-link'; +import type HdsSideNavListItemComponent from './components/hds/side-nav/list/item'; +import type HdsSideNavListLinkComponent from './components/hds/side-nav/list/link'; +import type HdsSideNavListTitleComponent from './components/hds/side-nav/list/title'; +import type HdsStepperStepIndicatorComponent from './components/hds/stepper/step/indicator'; +import type HdsStepperTaskIndicatorComponent from './components/hds/stepper/task/indicator'; +import type HdsTableComponent from './components/hds/table'; +import type HdsTableTdComponent from './components/hds/table/td'; +import type HdsTableThButtonSortComponent from './components/hds/table/th-button-sort'; +import type HdsTableThComponent from './components/hds/table/th'; +import type HdsTableThButtonTooltipComponent from './components/hds/table/th-button-tooltip'; +import type HdsTableThSortComponent from './components/hds/table/th-sort'; +import type HdsTableThSelectableComponent from './components/hds/table/th-selectable'; +import type HdsTableTrComponent from './components/hds/table/tr'; +import type HdsTabsComponent from './components/hds/tabs'; +import type HdsTabsPanelComponent from './components/hds/tabs/panel'; +import type HdsTabsTabComponent from './components/hds/tabs/tab'; +import type HdsTextComponent from './components/hds/text'; +import type HdsTextBodyComponent from './components/hds/text/body'; +import type HdsTextDisplayComponent from './components/hds/text/display'; +import type HdsTagComponent from './components/hds/tag'; +import type HdsTooltipButtonComponent from './components/hds/tooltip-button'; +import type HdsToastComponent from './components/hds/toast'; +import type HdsTextCodeComponent from './components/hds/text/code'; +import type HdsTimeComponent from './components/hds/time'; +import type HdsTimeSingleComponent from './components/hds/time/single'; +import type HdsTimeRangeComponent from './components/hds/time/range'; +import type HdsYieldComponent from './components/hds/yield'; +import type HdsLinkToModelsHelper from './helpers/hds-link-to-models.ts'; +import type HdsLinkToQueryHelper from './helpers/hds-link-to-query.ts'; +import type HdsFormatDateHelper from './helpers/hds-format-date.ts'; +import type HdsFormatRelativeHelper from './helpers/hds-format-relative.ts'; +import type HdsAnchoredPositionModifier from './modifiers/hds-anchored-position.ts'; +import type HdsClipboardModifier from './modifiers/hds-clipboard.ts'; +import type HdsRegisterEventModifier from './modifiers/hds-register-event.ts'; +import type HdsTooltipModifier from './modifiers/hds-tooltip.ts'; +export default interface HdsComponentsRegistry { + 'Hds::Accordion': typeof HdsAccordionComponent; + 'hds/accordion': typeof HdsAccordionComponent; + 'Hds::Accordion::Item': typeof HdsAccordionItemComponent; + 'hds/accordion/item': typeof HdsAccordionItemComponent; + 'Hds::Accordion::Item::Button': typeof HdsAccordionItemButtonComponent; + 'hds/accordion/item/button': typeof HdsAccordionItemButtonComponent; + 'Hds::Alert': typeof HdsAlertComponent; + 'hds/alert': typeof HdsAlertComponent; + 'Hds::Alert::Description': typeof HdsAlertDescriptionComponent; + 'hds/alert/description': typeof HdsAlertDescriptionComponent; + 'Hds::Alert::Title': typeof HdsAlertTitleComponent; + 'hds/alert/title': typeof HdsAlertTitleComponent; + 'Hds::AppHeader': typeof HdsAppHeaderComponent; + 'hds/app-header': typeof HdsAppHeaderComponent; + 'Hds::AppHeader::HomeLink': typeof HdsAppHeaderHomeLinkComponent; + 'hds/app-header/home-link': typeof HdsAppHeaderHomeLinkComponent; + 'Hds::AppHeader::MenuButton': typeof HdsAppHeaderMenuButtonComponent; + 'hds/app-header/menu-button': typeof HdsAppHeaderMenuButtonComponent; + 'Hds::AppFooter': typeof HdsAppFooterComponent; + 'hds/app-footer': typeof HdsAppFooterComponent; + 'Hds::AppFooter::Copyright': typeof HdsAppFooterCopyrightComponent; + 'hds/app-footer/copyright': typeof HdsAppFooterCopyrightComponent; + 'Hds::AppFooter::Item': typeof HdsAppFooterItemComponent; + 'hds/app-footer/item': typeof HdsAppFooterItemComponent; + 'Hds::AppFooter::LegalLinks': typeof HdsAppFooterLegalLinksComponent; + 'hds/app-footer/legal-links': typeof HdsAppFooterLegalLinksComponent; + 'Hds::AppFooter::Link': typeof HdsAppFooterLinkComponent; + 'hds/app-footer/link': typeof HdsAppFooterLinkComponent; + 'Hds::AppFooter::StatusLink': typeof HdsAppFooterStatusLinkComponent; + 'hds/app-footer/status-link': typeof HdsAppFooterStatusLinkComponent; + 'Hds::AppFrame': typeof HdsAppFrameComponent; + 'hds/app-frame': typeof HdsAppFrameComponent; + 'Hds::AppFrame::Footer': typeof HdsAppFrameFooterComponent; + 'hds/app-frame/parts/footer': typeof HdsAppFrameFooterComponent; + 'Hds::AppFrame::Header': typeof HdsAppFrameHeaderComponent; + 'hds/app-frame/parts/header': typeof HdsAppFrameHeaderComponent; + 'Hds::AppFrame::Main': typeof HdsAppFrameMainComponent; + 'hds/app-frame/parts/main': typeof HdsAppFrameMainComponent; + 'Hds::AppFrame::Modals': typeof HdsAppFrameModalsComponent; + 'hds/app-frame/parts/modals': typeof HdsAppFrameModalsComponent; + 'Hds::AppFrame::Sidebar': typeof HdsAppFrameSidebarComponent; + 'hds/app-frame/parts/sidebar': typeof HdsAppFrameSidebarComponent; + 'Hds::AppSideNav': typeof HdsAppSideNavComponent; + 'hds/app-side-nav': typeof HdsAppSideNavComponent; + HdsAppSideNav: typeof HdsAppSideNavComponent; + 'Hds::AppSideNav::ToggleButton': typeof HdsAppSideNavToggleButtonComponent; + 'hds/app-side-nav/toggle-button': typeof HdsAppSideNavToggleButtonComponent; + HdsAppSideNavToggleButton: typeof HdsAppSideNavToggleButtonComponent; + 'Hds::AppSideNav::Portal': typeof HdsAppSideNavPortalComponent; + 'hds/app-side-nav/portal': typeof HdsAppSideNavPortalComponent; + HdsAppSideNavPortal: typeof HdsAppSideNavPortalComponent; + 'Hds::AppSideNav::Portal::Target': typeof HdsAppSideNavPortalTargetComponent; + 'hds/app-side-nav/portal/target': typeof HdsAppSideNavPortalTargetComponent; + HdsAppSideNavPortalTarget: typeof HdsAppSideNavPortalTargetComponent; + 'Hds::AppSideNav::List': typeof HdsAppSideNavListComponent; + 'hds/app-side-nav/list': typeof HdsAppSideNavListComponent; + HdsAppSideNavList: typeof HdsAppSideNavListComponent; + 'Hds::AppSideNav::List::BackLink': typeof HdsAppSideNavListBackLinkComponent; + 'hds/app-side-nav/list/back-link': typeof HdsAppSideNavListBackLinkComponent; + HdsAppSideNavListBackLink: typeof HdsAppSideNavListBackLinkComponent; + 'Hds::AppSideNav::List::Item': typeof HdsAppSideNavListItemComponent; + 'hds/app-side-nav/list/item': typeof HdsAppSideNavListItemComponent; + HdsAppSideNavListItem: typeof HdsAppSideNavListItemComponent; + 'Hds::AppSideNav::List::Link': typeof HdsAppSideNavListLinkComponent; + 'hds/app-side-nav/list/link': typeof HdsAppSideNavListLinkComponent; + HdsAppSideNavListLink: typeof HdsAppSideNavListLinkComponent; + 'Hds::AppSideNav::List::Title': typeof HdsAppSideNavListTitleComponent; + 'hds/app-side-nav/list/title': typeof HdsAppSideNavListTitleComponent; + HdsAppSideNavListTitle: typeof HdsAppSideNavListTitleComponent; + 'Hds::ApplicationState': typeof HdsApplicationStateComponent; + 'hds/application-state': typeof HdsApplicationStateComponent; + 'Hds::ApplicationState::Header': typeof HdsApplicationStateHeaderComponent; + 'hds/application-state/header': typeof HdsApplicationStateHeaderComponent; + 'Hds::ApplicationState::Body': typeof HdsApplicationStateBodyComponent; + 'hds/application-state/body': typeof HdsApplicationStateBodyComponent; + 'Hds::ApplicationState::Footer': typeof HdsApplicationStateFooterComponent; + 'hds/application-state/footer': typeof HdsApplicationStateFooterComponent; + 'Hds::ApplicationState::Media': typeof HdsApplicationStateMediaComponent; + 'hds/application-state/media': typeof HdsApplicationStateMediaComponent; + 'Hds::Badge': typeof HdsBadgeComponent; + 'hds/badge': typeof HdsBadgeComponent; + 'Hds::BadgeCount': typeof HdsBadgeCountComponent; + 'hds/badge-count': typeof HdsBadgeCountComponent; + 'Hds::Breadcrumb': typeof HdsBreadcrumbComponent; + 'hds/breadcrumb': typeof HdsBreadcrumbComponent; + 'Hds::Breadcrumb::Item': typeof HdsBreadcrumbItemComponent; + 'hds/breadcrumb/item': typeof HdsBreadcrumbItemComponent; + 'Hds::Breadcrumb::Truncation': typeof HdsBreadcrumbTruncationComponent; + 'hds/breadcrumb/truncation': typeof HdsBreadcrumbTruncationComponent; + 'Hds::Button': typeof HdsButtonComponent; + 'hds/button': typeof HdsButtonComponent; + 'Hds::ButtonSet': typeof HdsButtonSetComponent; + 'hds/button-set': typeof HdsButtonSetComponent; + 'Hds::Card': typeof HdsCardContainerComponent; + 'hds/card': typeof HdsCardContainerComponent; + 'Hds::CodeBlock': typeof HdsCodeBlockComponent; + 'hds/code-block': typeof HdsCodeBlockComponent; + 'Hds::CodeBlock::CopyButton': typeof HdsCodeBlockCopyButtonComponent; + 'hds/code-block/copy-button': typeof HdsCodeBlockCopyButtonComponent; + 'Hds::CodeBlock::Description': typeof HdsCodeBlockDescriptionComponent; + 'hds/code-block/description': typeof HdsCodeBlockDescriptionComponent; + 'Hds::CodeBlock::Title': typeof HdsCodeBlockTitleComponent; + 'hds/code-block/title': typeof HdsCodeBlockTitleComponent; + 'Hds::Copy::Button': typeof HdsCopyButtonComponent; + 'hds/copy/button': typeof HdsCopyButtonComponent; + 'Hds::Copy::Snippet': typeof HdsCopySnippetComponent; + 'hds/copy/snippet': typeof HdsCopySnippetComponent; + 'Hds::DialogPrimitive::Body': typeof HdsDialogPrimitiveBodyComponent; + 'hds/dialog-primitive/body': typeof HdsDialogPrimitiveBodyComponent; + 'Hds::DialogPrimitive::Description': typeof HdsDialogPrimitiveDescriptionComponent; + 'hds/dialog-primitive/description': typeof HdsDialogPrimitiveDescriptionComponent; + 'Hds::DialogPrimitive::Footer': typeof HdsDialogPrimitiveFooterComponent; + 'hds/dialog-primitive/footer': typeof HdsDialogPrimitiveFooterComponent; + 'Hds::DialogPrimitive::Header': typeof HdsDialogPrimitiveHeaderComponent; + 'hds/dialog-primitive/header': typeof HdsDialogPrimitiveHeaderComponent; + 'Hds::DialogPrimitive::Overlay': typeof HdsDialogPrimitiveOverlayComponent; + 'hds/dialog-primitive/overlay': typeof HdsDialogPrimitiveOverlayComponent; + 'Hds::DialogPrimitive::Wrapper': typeof HdsDialogPrimitiveWrapperComponent; + 'hds/dialog-primitive/wrapper': typeof HdsDialogPrimitiveWrapperComponent; + 'Hds::DisclosurePrimitive': typeof HdsDisclosurePrimitiveComponent; + 'hds/disclosure-primitive': typeof HdsDisclosurePrimitiveComponent; + 'Hds::DismissButton': typeof HdsDismissButtonComponent; + 'hds/dismiss-button': typeof HdsDismissButtonComponent; + 'Hds::Dropdown': typeof HdsDropdownComponent; + 'hds/dropdown': typeof HdsDropdownComponent; + 'Hds::Dropdown::Footer': typeof HdsDropdownFooterComponent; + 'hds/dropdown/footer': typeof HdsDropdownFooterComponent; + 'Hds::Dropdown::Header': typeof HdsDropdownHeaderComponent; + 'hds/dropdown/header': typeof HdsDropdownHeaderComponent; + 'Hds::Dropdown::ListItem::Checkbox': typeof HdsDropdownListItemCheckboxComponent; + 'hds/dropdown/list-item/checkbox': typeof HdsDropdownListItemCheckboxComponent; + 'Hds::Dropdown::ListItem::Checkmark': typeof HdsDropdownListItemCheckmarkComponent; + 'hds/dropdown/list-item/checkmark': typeof HdsDropdownListItemCheckmarkComponent; + 'Hds::Dropdown::ListItem::CopyItem': typeof HdsDropdownListItemCopyItemComponent; + 'hds/dropdown/list-item/copy-item': typeof HdsDropdownListItemCopyItemComponent; + 'Hds::Dropdown::ListItem::Description': typeof HdsDropdownListItemDescriptionComponent; + 'hds/dropdown/list-item/description': typeof HdsDropdownListItemDescriptionComponent; + 'Hds::Dropdown::ListItem::Generic': typeof HdsDropdownListItemGenericComponent; + 'hds/dropdown/list-item/generic': typeof HdsDropdownListItemGenericComponent; + 'Hds::Dropdown::ListItem::Interactive': typeof HdsDropdownListItemInteractiveComponent; + 'hds/dropdown/list-item/interactive': typeof HdsDropdownListItemInteractiveComponent; + 'Hds::Dropdown::ListItem::Radio': typeof HdsDropdownListItemRadioComponent; + 'hds/dropdown/list-item/radio': typeof HdsDropdownListItemRadioComponent; + 'Hds::Dropdown::ListItem::Separator': typeof HdsDropdownListItemSeparatorComponent; + 'hds/dropdown/list-item/separator': typeof HdsDropdownListItemSeparatorComponent; + 'Hds::Dropdown::ListItem::Title': typeof HdsDropdownListItemTitleComponent; + 'hds/dropdown/list-item/title': typeof HdsDropdownListItemTitleComponent; + 'Hds::Dropdown::Toggle::Button': typeof HdsDropdownToggleButtonComponent; + 'hds/dropdown/toggle/button': typeof HdsDropdownToggleButtonComponent; + 'Hds::Dropdown::Toggle::Chevron': typeof HdsDropdownToggleChevronComponent; + 'hds/dropdown/toggle/chevron': typeof HdsDropdownToggleChevronComponent; + 'Hds::Dropdown::Toggle::Icon': typeof HdsDropdownToggleIconComponent; + 'hds/dropdown/toggle/icon': typeof HdsDropdownToggleIconComponent; + 'Hds::Flyout': typeof HdsFlyoutComponent; + 'hds/flyout': typeof HdsFlyoutComponent; + 'Hds::Flyout::Body': typeof HdsFlyoutBodyComponent; + 'hds/flyout/body': typeof HdsFlyoutBodyComponent; + 'Hds::Flyout::Description': typeof HdsFlyoutDescriptionComponent; + 'hds/flyout/description': typeof HdsFlyoutDescriptionComponent; + 'Hds::Flyout::Footer': typeof HdsFlyoutFooterComponent; + 'hds/flyout/footer': typeof HdsFlyoutFooterComponent; + 'Hds::Flyout::Header': typeof HdsFlyoutHeaderComponent; + 'hds/flyout/header': typeof HdsFlyoutHeaderComponent; + 'Hds::Form::CharacterCount': typeof HdsFormCharacterCountComponent; + 'hds/form/character-count': typeof HdsFormCharacterCountComponent; + 'Hds::Form::Checkbox::Base': typeof HdsFormCheckboxBaseComponent; + 'hds/form/checkbox/base': typeof HdsFormCheckboxBaseComponent; + 'Hds::Form::Checkbox::Field': typeof HdsFormCheckboxFieldComponent; + 'hds/form/checkbox/field': typeof HdsFormCheckboxFieldComponent; + 'Hds::Form::Checkbox::Group': typeof HdsFormCheckboxGroupComponent; + 'hds/form/checkbox/group': typeof HdsFormCheckboxGroupComponent; + 'Hds::Form::Error': typeof HdsFormErrorComponent; + 'hds/form/error': typeof HdsFormErrorComponent; + 'Hds::Form::Error::Message': typeof HdsFormErrorMessageComponent; + 'hds/form/error/message': typeof HdsFormErrorMessageComponent; + 'Hds::Form::Field': typeof HdsFormFieldComponent; + 'hds/form/field': typeof HdsFormFieldComponent; + 'Hds::Form::Fieldset': typeof HdsFormFieldsetComponent; + 'hds/form/fieldset': typeof HdsFormFieldsetComponent; + 'Hds::Form::FileInput::Base': typeof HdsFormFileInputBaseComponent; + 'hds/form/file-input/base': typeof HdsFormFileInputBaseComponent; + 'Hds::Form::FileInput::Field': typeof HdsFormFileInputFieldComponent; + 'hds/form/file-input/field': typeof HdsFormFileInputFieldComponent; + 'Hds::Form::HelperText': typeof HdsFormHelperTextComponent; + 'hds/form/helper-text': typeof HdsFormHelperTextComponent; + 'Hds::Form::Indicator': typeof HdsFormIndicatorComponent; + 'hds/form/indicator': typeof HdsFormIndicatorComponent; + 'Hds::Form::Label': typeof HdsFormLabelComponent; + 'hds/form/label': typeof HdsFormLabelComponent; + 'Hds::Form::Legend': typeof HdsFormLegendComponent; + 'hds/form/legend': typeof HdsFormLegendComponent; + 'Hds::Form::MaskedInput::Base': typeof HdsFormMaskedInputBaseComponent; + 'hds/form/masked-input/base': typeof HdsFormMaskedInputBaseComponent; + 'Hds::Form::MaskedInput::Field': typeof HdsFormMaskedInputFieldComponent; + 'hds/form/masked-input/field': typeof HdsFormMaskedInputFieldComponent; + 'Hds::Form::Radio::Base': typeof HdsFormRadioBaseComponent; + 'hds/form/radio/base': typeof HdsFormRadioBaseComponent; + 'Hds::Form::Radio::Field': typeof HdsFormRadioFieldComponent; + 'hds/form/radio/field': typeof HdsFormRadioFieldComponent; + 'Hds::Form::Radio::Group': typeof HdsFormRadioGroupComponent; + 'hds/form/radio/group': typeof HdsFormRadioGroupComponent; + 'Hds::Form::RadioCard': typeof HdsFormRadioCardComponent; + 'hds/form/radio-card': typeof HdsFormRadioCardComponent; + 'Hds::Form::RadioCard::Description': typeof HdsFormRadioCardDescriptionComponent; + 'hds/form/radio-card/description': typeof HdsFormRadioCardDescriptionComponent; + 'Hds::Form::RadioCard::Group': typeof HdsFormRadioCardGroupComponent; + 'hds/form/radio-card/group': typeof HdsFormRadioCardGroupComponent; + 'Hds::Form::RadioCard::Label': typeof HdsFormRadioCardLabelComponent; + 'hds/form/radio-card/label': typeof HdsFormRadioCardLabelComponent; + 'Hds::Form::Select::Base': typeof HdsFormSelectBaseComponent; + 'hds/form/select/base': typeof HdsFormSelectBaseComponent; + 'Hds::Form::Select::Field': typeof HdsFormSelectFieldComponent; + 'hds/form/select/field': typeof HdsFormSelectFieldComponent; + 'Hds::Form::SuperSelect::AfterOptions': typeof HdsFormSuperSelectAfterOptionsComponent; + 'hds/form/super-select/after-options': typeof HdsFormSuperSelectAfterOptionsComponent; + 'Hds::Form::SuperSelect::OptionGroup': typeof HdsFormSuperSelectOptionGroupComponent; + 'hds/form/super-select/option-group': typeof HdsFormSuperSelectOptionGroupComponent; + 'Hds::Form::SuperSelect::Placeholder': typeof HdsFormSuperSelectPlaceholderComponent; + 'hds/form/super-select/placeholder': typeof HdsFormSuperSelectPlaceholderComponent; + 'Hds::Form::SuperSelect::Single::Base': typeof HdsFormSuperSelectSingleBaseComponent; + 'hds/form/super-select/single/base': typeof HdsFormSuperSelectSingleBaseComponent; + 'Hds::Form::SuperSelect::Single::Field': typeof HdsFormSuperSelectSingleFieldComponent; + 'hds/form/super-select/single/field': typeof HdsFormSuperSelectSingleFieldComponent; + 'Hds::Form::SuperSelect::Multiple::Base': typeof HdsFormSuperSelectMultipleBaseComponent; + 'hds/form/super-select/multiple/base': typeof HdsFormSuperSelectMultipleBaseComponent; + 'Hds::Form::SuperSelect::Multiple::Field': typeof HdsFormSuperSelectMultipleFieldComponent; + 'hds/form/super-select/multiple/field': typeof HdsFormSuperSelectMultipleFieldComponent; + 'Hds::Form::TextInput::Base': typeof HdsFormTextInputBaseComponent; + 'hds/form/text-input/base': typeof HdsFormTextInputBaseComponent; + 'Hds::Form::TextInput::Field': typeof HdsFormTextInputFieldComponent; + 'hds/form/text-input/field': typeof HdsFormTextInputFieldComponent; + 'Hds::Form::Textarea::Base': typeof HdsFormTextareaBaseComponent; + 'hds/form/textarea/base': typeof HdsFormTextareaBaseComponent; + 'Hds::Form::Textarea::Field': typeof HdsFormTextareaFieldComponent; + 'hds/form/textarea/field': typeof HdsFormTextareaFieldComponent; + 'Hds::Form::Toggle::Base': typeof HdsFormToggleBaseComponent; + 'hds/form/toggle/base': typeof HdsFormToggleBaseComponent; + 'Hds::Form::Toggle::Field': typeof HdsFormToggleFieldComponent; + 'hds/form/toggle/field': typeof HdsFormToggleFieldComponent; + 'Hds::Form::Toggle::Group': typeof HdsFormToggleGroupComponent; + 'hds/form/toggle/group': typeof HdsFormToggleGroupComponent; + 'Hds::Form::VisibilityToggle': typeof HdsFormVisibilityToggleComponent; + 'hds/form/visibility-toggle': typeof HdsFormVisibilityToggleComponent; + 'Hds::Icon': typeof HdsIconComponent; + 'hds/icon': typeof HdsIconComponent; + 'Hds::IconTile': typeof HdsIconTileComponent; + 'hds/icon-tile': typeof HdsIconTileComponent; + 'Hds::Interactive': typeof HdsInteractiveComponent; + 'hds/interactive': typeof HdsInteractiveComponent; + 'Hds::Link::Inline': typeof HdsLinkInlineComponent; + 'hds/link/inline': typeof HdsLinkInlineComponent; + 'Hds::Link::Standalone': typeof HdsLinkStandaloneComponent; + 'hds/link/standalone': typeof HdsLinkStandaloneComponent; + 'Hds::MenuPrimitive': typeof HdsMenuPrimitiveComponent; + 'hds/menu-primitive': typeof HdsMenuPrimitiveComponent; + 'Hds::Modal': typeof HdsModalComponent; + 'hds/modal': typeof HdsModalComponent; + 'Hds::ModalBoty': typeof HdsModalBodyComponent; + 'hds/modal/body': typeof HdsModalBodyComponent; + 'Hds::ModalFooter': typeof HdsModalFooterComponent; + 'hds/modal/footer': typeof HdsModalFooterComponent; + 'Hds::ModalHeader': typeof HdsModalHeaderComponent; + 'hds/modal/header': typeof HdsModalHeaderComponent; + 'Hds::PageHeader': typeof HdsPageHeaderComponent; + 'hds/page-header': typeof HdsPageHeaderComponent; + 'Hds::PageHeader::Actions': typeof HdsPageHeaderActionsComponent; + 'hds/page-header/actions': typeof HdsPageHeaderActionsComponent; + 'Hds::PageHeader::Badges': typeof HdsPageHeaderBadgesComponent; + 'hds/page-header/badges': typeof HdsPageHeaderBadgesComponent; + 'Hds::PageHeader::Description': typeof HdsPageHeaderDescriptionComponent; + 'hds/page-header/description': typeof HdsPageHeaderDescriptionComponent; + 'Hds::PageHeader::Subtitle': typeof HdsPageHeaderSubtitleComponent; + 'hds/page-header/subtitle': typeof HdsPageHeaderSubtitleComponent; + 'Hds::PageHeader::Title': typeof HdsPageHeaderTitleComponent; + 'hds/page-header/title': typeof HdsPageHeaderTitleComponent; + 'Hds::Pagination::Compact': typeof HdsPaginationCompactComponent; + 'hds/pagination/compact': typeof HdsPaginationCompactComponent; + 'Hds::Pagination::Info': typeof HdsPaginationControlInfoComponent; + 'hds/pagination/info': typeof HdsPaginationControlInfoComponent; + 'Hds::Pagination::Nav::Arrow': typeof HdsPaginationControlArrowComponent; + 'hds/pagination/nav/arrow': typeof HdsPaginationControlArrowComponent; + 'Hds::Pagination::Nav::Ellipsis': typeof HdsPaginationControlEllipsisComponent; + 'hds/pagination/nav/ellipsis': typeof HdsPaginationControlEllipsisComponent; + 'Hds::Pagination::Nav::Number': typeof HdsPaginationControlNumberComponent; + 'hds/pagination/nav/number': typeof HdsPaginationControlNumberComponent; + 'Hds::Pagination::Numbered': typeof HdsPaginationNumberedComponent; + 'hds/pagination/numbered': typeof HdsPaginationNumberedComponent; + 'Hds::Pagination::SizeSelector': typeof HdsPaginationSizeSelectorComponent; + 'hds/pagination/size-selector': typeof HdsPaginationSizeSelectorComponent; + 'Hds::PopoverPrimitive': typeof HdsPopoverPrimitiveComponent; + 'hds/popover-primitive': typeof HdsPopoverPrimitiveComponent; + 'Hds::Reveal': typeof HdsRevealComponent; + 'hds/reveal': typeof HdsRevealComponent; + 'Hds::Reveal::Toggle::Button': typeof HdsRevealToggleButtonComponent; + 'hds/reveal/toggle/button': typeof HdsRevealToggleButtonComponent; + 'Hds::RichTooltip': typeof HdsRichTooltipComponent; + 'hds/rich-tooltip': typeof HdsRichTooltipComponent; + HdsRichTooltip: typeof HdsRichTooltipComponent; + 'Hds::RichTooltip::Bubble': typeof HdsRichTooltipBubbleComponent; + 'hds/rich-tooltip/bubble': typeof HdsRichTooltipBubbleComponent; + HdsRichTooltipBubble: typeof HdsRichTooltipBubbleComponent; + 'Hds::RichTooltip::Toggle': typeof HdsRichTooltipToggleComponent; + 'hds/rich-tooltip/toggle': typeof HdsRichTooltipToggleComponent; + HdsRichTooltipToggle: typeof HdsRichTooltipToggleComponent; + 'Hds::SegmentedGroup': typeof HdsSegmentedGroupComponent; + 'hds/segmented-group': typeof HdsSegmentedGroupComponent; + 'Hds::Separator': typeof HdsSeparatorComponent; + 'hds/separator': typeof HdsSeparatorComponent; + 'Hds::SideNav': typeof HdsSideNavComponent; + 'hds/side-nav': typeof HdsSideNavComponent; + HdsSideNav: typeof HdsSideNavComponent; + 'Hds::SideNav::Base': typeof HdsSideNavBaseComponent; + 'hds/side-nav/base': typeof HdsSideNavBaseComponent; + HdsSideNavBase: typeof HdsSideNavBaseComponent; + 'Hds::SideNav::ToggleButton': typeof HdsSideNavToggleButtonComponent; + 'hds/side-nav/toggle-button': typeof HdsSideNavToggleButtonComponent; + HdsSideNavToggleButton: typeof HdsSideNavToggleButtonComponent; + 'Hds::SideNav::Portal': typeof HdsSideNavPortalComponent; + 'hds/side-nav/portal': typeof HdsSideNavPortalComponent; + HdsSideNavPortal: typeof HdsSideNavPortalComponent; + 'Hds::SideNav::Portal::Target': typeof HdsSideNavPortalTargetComponent; + 'hds/side-nav/portal/target': typeof HdsSideNavPortalTargetComponent; + HdsSideNavPortalTarget: typeof HdsSideNavPortalTargetComponent; + 'Hds::SideNav::Header': typeof HdsSideNavHeaderComponent; + 'hds/side-nav/header': typeof HdsSideNavHeaderComponent; + HdsSideNavHeader: typeof HdsSideNavHeaderComponent; + 'Hds::SideNav::Header::HomeLink': typeof HdsSideNavHeaderHomeLinkComponent; + 'hds/side-nav/header/home-link': typeof HdsSideNavHeaderHomeLinkComponent; + HdsSideNavHeaderHomeLink: typeof HdsSideNavHeaderHomeLinkComponent; + 'Hds::SideNav::Header::IconButton': typeof HdsSideNavHeaderIconButtonComponent; + 'hds/side-nav/header/icon-button': typeof HdsSideNavHeaderIconButtonComponent; + HdsSideNavHeaderIconButton: typeof HdsSideNavHeaderIconButtonComponent; + 'Hds::SideNav::List': typeof HdsSideNavListComponent; + 'hds/side-nav/list': typeof HdsSideNavListComponent; + HdsSideNavList: typeof HdsSideNavListComponent; + 'Hds::SideNav::List::BackLink': typeof HdsSideNavListBackLinkComponent; + 'hds/side-nav/list/back-link': typeof HdsSideNavListBackLinkComponent; + HdsSideNavListBackLink: typeof HdsSideNavListBackLinkComponent; + 'Hds::SideNav::List::Item': typeof HdsSideNavListItemComponent; + 'hds/side-nav/list/item': typeof HdsSideNavListItemComponent; + HdsSideNavListItem: typeof HdsSideNavListItemComponent; + 'Hds::SideNav::List::Link': typeof HdsSideNavListLinkComponent; + 'hds/side-nav/list/link': typeof HdsSideNavListLinkComponent; + HdsSideNavListLink: typeof HdsSideNavListLinkComponent; + 'Hds::SideNav::List::Title': typeof HdsSideNavListTitleComponent; + 'hds/side-nav/list/title': typeof HdsSideNavListTitleComponent; + HdsSideNavListTitle: typeof HdsSideNavListTitleComponent; + 'Hds::Stepper::Step::Indicator': typeof HdsStepperStepIndicatorComponent; + 'hds/stepper/step/indicator': typeof HdsStepperStepIndicatorComponent; + 'Hds::Stepper::Task::Indicator': typeof HdsStepperTaskIndicatorComponent; + 'hds/stepper/task/indicator': typeof HdsStepperTaskIndicatorComponent; + 'Hds::Table': typeof HdsTableComponent; + 'hds/table': typeof HdsTableComponent; + 'Hds::Table::Td': typeof HdsTableTdComponent; + 'hds/table/td': typeof HdsTableTdComponent; + 'Hds::Table::Th': typeof HdsTableThComponent; + 'hds/table/th': typeof HdsTableThComponent; + 'Hds::Table::Tr': typeof HdsTableTrComponent; + 'hds/table/tr': typeof HdsTableTrComponent; + 'Hds::Table::ThButtonSort': typeof HdsTableThButtonSortComponent; + 'hds/table/th-button-sort': typeof HdsTableThButtonSortComponent; + 'Hds::Table::ThButtonTooltip': typeof HdsTableThButtonTooltipComponent; + 'hds/table/th-button-tooltip': typeof HdsTableThButtonTooltipComponent; + 'Hds::Table::ThSort': typeof HdsTableThSortComponent; + 'hds/table/th-sort': typeof HdsTableThSortComponent; + 'Hds::Table::ThSelectable': typeof HdsTableThSelectableComponent; + 'hds/table/th-selectable': typeof HdsTableThSelectableComponent; + 'Hds::Tabs': typeof HdsTabsComponent; + 'hds/tabs': typeof HdsTabsComponent; + 'Hds::Tabs::Panel': typeof HdsTabsPanelComponent; + 'hds/tabs/panel': typeof HdsTabsPanelComponent; + 'Hds::Tabs::Tab': typeof HdsTabsTabComponent; + 'hds/tabs/tab': typeof HdsTabsTabComponent; + 'Hds::Text': typeof HdsTextComponent; + 'hds/text': typeof HdsTextComponent; + 'Hds::Text::Body': typeof HdsTextBodyComponent; + 'hds/text/body': typeof HdsTextBodyComponent; + 'Hds::Text::Display': typeof HdsTextDisplayComponent; + 'hds/text/display': typeof HdsTextDisplayComponent; + 'Hds::Text::Code': typeof HdsTextCodeComponent; + 'hds/text/code': typeof HdsTextCodeComponent; + 'Hds::Tag': typeof HdsTagComponent; + 'hds/tag': typeof HdsTagComponent; + 'Hds::TooltipButton': typeof HdsTooltipButtonComponent; + 'hds/tooltip-button': typeof HdsTooltipButtonComponent; + 'Hds::Toast': typeof HdsToastComponent; + 'hds/toast': typeof HdsToastComponent; + 'Hds::Time': typeof HdsTimeComponent; + 'hds/time': typeof HdsTimeComponent; + 'Hds::Time::Single': typeof HdsTimeSingleComponent; + 'hds/time/single': typeof HdsTimeSingleComponent; + 'Hds::Time::Range': typeof HdsTimeRangeComponent; + 'hds/time/range': typeof HdsTimeRangeComponent; + 'Hds::Yield': typeof HdsYieldComponent; + 'hds/yield': typeof HdsYieldComponent; + 'hds-link-to-models': typeof HdsLinkToModelsHelper; + 'hds-link-to-query': typeof HdsLinkToQueryHelper; + 'hds-format-date': typeof HdsFormatDateHelper; + 'hds-format-relative': typeof HdsFormatRelativeHelper; + 'hds-anchored-position': typeof HdsAnchoredPositionModifier; + 'hds-clipboard': typeof HdsClipboardModifier; + 'hds-register-event': typeof HdsRegisterEventModifier; + 'hds-tooltip': typeof HdsTooltipModifier; +} +//# sourceMappingURL=template-registry.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/template-registry.d.ts.map b/packages/components/declarations/template-registry.d.ts.map new file mode 100644 index 0000000000..727376cd10 --- /dev/null +++ b/packages/components/declarations/template-registry.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,yBAAyB,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,+BAA+B,MAAM,wCAAwC,CAAC;AAC1F,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,4BAA4B,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAA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oB,CAAC;IAC/C,eAAe,EAAE,OAAO,oBAAoB,CAAC;IAG7C,UAAU,EAAE,OAAO,eAAe,CAAC;IACnC,SAAS,EAAE,OAAO,eAAe,CAAC;IAGlC,oBAAoB,EAAE,OAAO,yBAAyB,CAAC;IACvD,oBAAoB,EAAE,OAAO,yBAAyB,CAAC;IAGvD,YAAY,EAAE,OAAO,iBAAiB,CAAC;IACvC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IAGtC,WAAW,EAAE,OAAO,gBAAgB,CAAC;IACrC,UAAU,EAAE,OAAO,gBAAgB,CAAC;IAEpC,mBAAmB,EAAE,OAAO,sBAAsB,CAAC;IACnD,iBAAiB,EAAE,OAAO,sBAAsB,CAAC;IAEjD,kBAAkB,EAAE,OAAO,qBAAqB,CAAC;IACjD,gBAAgB,EAAE,OAAO,qBAAqB,CAAC;IAG/C,YAAY,EAAE,OAAO,iBAAiB,CAAC;IACvC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IAKtC,oBAAoB,EAAE,OAAO,qBAAqB,CAAC;IAGnD,mBAAmB,EAAE,OAAO,oBAAoB,CAAC;IAGjD,iBAAiB,EAAE,OAAO,mBAAmB,CAAC;IAG9C,qBAAqB,EAAE,OAAO,uBAAuB,CAAC;IAKtD,uBAAuB,EAAE,OAAO,2BAA2B,CAAC;IAG5D,eAAe,EAAE,OAAO,oBAAoB,CAAC;IAG7C,oBAAoB,EAAE,OAAO,wBAAwB,CAAC;IAGtD,aAAa,EAAE,OAAO,kBAAkB,CAAC;CAC1C"} \ No newline at end of file diff --git a/packages/components/declarations/utils/hds-aria-described-by.d.ts b/packages/components/declarations/utils/hds-aria-described-by.d.ts new file mode 100644 index 0000000000..f36b1cc17f --- /dev/null +++ b/packages/components/declarations/utils/hds-aria-described-by.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type Component from '@glimmer/component'; +import type { HdsFormFieldSignature } from '../components/hds/form/field/'; +import type { HdsFormFieldsetSignature } from '../components/hds/form/fieldset/'; +type AriaDescribedByArgs = HdsFormFieldSignature | HdsFormFieldsetSignature; +export interface AriaDescribedByComponent extends Component { + __ARIA_DESCRIPTION_IDS__?: string[]; + ariaDescribedBy?: string; +} +type ClassOf = new (owner: unknown, ...args: any[]) => T; +export declare function ariaDescribedBy(BaseComponent: ClassOf): ClassOf; +export declare function registerAriaDescriptionElement(component: AriaDescribedByComponent, element: HTMLElement): void; +export declare function unregisterAriaDescriptionElement(component: AriaDescribedByComponent, element: HTMLElement): void; +export {}; +//# sourceMappingURL=hds-aria-described-by.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/utils/hds-aria-described-by.d.ts.map b/packages/components/declarations/utils/hds-aria-described-by.d.ts.map new file mode 100644 index 0000000000..6b35b97076 --- /dev/null +++ b/packages/components/declarations/utils/hds-aria-described-by.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-aria-described-by.d.ts","sourceRoot":"","sources":["../../src/utils/hds-aria-described-by.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAmCjF,KAAK,mBAAmB,GAAG,qBAAqB,GAAG,wBAAwB,CAAC;AAE5E,MAAM,WAAW,wBACf,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACtC,wBAAwB,CAAC,EAAE,MAAM,EAAE,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAID,KAAK,OAAO,CAAC,CAAC,IAAI,KAAK,KAAK,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;AAE5D,wBAAgB,eAAe,CAC7B,aAAa,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC/C,OAAO,CAAC,wBAAwB,CAAC,CAenC;AAUD,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,WAAW,GACnB,IAAI,CAIN;AAED,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,WAAW,GACnB,IAAI,CAIN"} \ No newline at end of file diff --git a/packages/components/declarations/utils/hds-get-element-id.d.ts b/packages/components/declarations/utils/hds-get-element-id.d.ts new file mode 100644 index 0000000000..3e58f63381 --- /dev/null +++ b/packages/components/declarations/utils/hds-get-element-id.d.ts @@ -0,0 +1,6 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +export declare function getElementId(element: any): string; +//# sourceMappingURL=hds-get-element-id.d.ts.map \ No newline at end of file diff --git a/packages/components/declarations/utils/hds-get-element-id.d.ts.map b/packages/components/declarations/utils/hds-get-element-id.d.ts.map new file mode 100644 index 0000000000..4f967197de --- /dev/null +++ b/packages/components/declarations/utils/hds-get-element-id.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"hds-get-element-id.d.ts","sourceRoot":"","sources":["../../src/utils/hds-get-element-id.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,wBAAgB,YAAY,CAAC,OAAO,EAAE,GAAG,GAAG,MAAM,CAWjD"} \ No newline at end of file diff --git a/packages/components/dist/LICENSE.md b/packages/components/dist/LICENSE.md new file mode 100644 index 0000000000..a9c323c701 --- /dev/null +++ b/packages/components/dist/LICENSE.md @@ -0,0 +1,375 @@ +Copyright (c) 2021 HashiCorp, Inc + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff --git a/packages/components/dist/README.md b/packages/components/dist/README.md new file mode 100644 index 0000000000..adb1485e24 --- /dev/null +++ b/packages/components/dist/README.md @@ -0,0 +1,68 @@ +design-system-components +============================================================================== + +A package containing the components for the Helios Design System. + +[![npm version](https://badge.fury.io/js/%40hashicorp%2Fdesign-system-components.svg)](https://badge.fury.io/js/%40hashicorp%2Fdesign-system-components) + + +Compatibility +------------------------------------------------------------------------------ + +* Ember.js v3.28 or above +* Ember CLI v3.28 or above +* Node.js v16 or above + + +Installation +------------------------------------------------------------------------------ + +``` +yarn add @hashicorp/design-system-components +``` + +You will need to do three things before importing the styles into your app: + +1. Install `ember-cli-sass` + +```bash +ember install ember-cli-sass +``` + +2. Change `app/styles/app.css` to `app/styles/app.scss` +3. Add the following to the `app` definition (starts on/around line 6 in new Ember apps) in `ember-cli-build.js` + +```js +sassOptions: { + precision: 4, + includePaths: [ + './node_modules/@hashicorp/design-system-tokens/dist/products/css', + './node_modules/@hashicorp/design-system-components/dist/styles', + ], +}, +``` + +Finally, add this line to the top of your app's style file (`app.scss` or similar): + +``` +@import '@hashicorp/design-system-components'; +``` + +⚠️ **Notice**: our component library assumes that a `*, *::before, *::after { box-sizing: border-box; }` reset is applied globally in the CSS of the application. If in your use case this is not true, please speak with the design system team (we can try to find a workaround). + +Usage +------------------------------------------------------------------------------ + +See the dedicated components website: https://helios.hashicorp.design/components + + +Contributing +------------------------------------------------------------------------------ + +See the [Contributing](CONTRIBUTING.md) guide for details. + + +License +------------------------------------------------------------------------------ + +This project is licensed under the [Mozilla Public License 2.0](LICENSE.md). diff --git a/packages/components/dist/_app_/components/hds/accordion/index.js b/packages/components/dist/_app_/components/hds/accordion/index.js new file mode 100644 index 0000000000..5c3d6c0c21 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/accordion/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/accordion/index"; diff --git a/packages/components/dist/_app_/components/hds/accordion/item/button.js b/packages/components/dist/_app_/components/hds/accordion/item/button.js new file mode 100644 index 0000000000..7919643fd2 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/accordion/item/button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/accordion/item/button"; diff --git a/packages/components/dist/_app_/components/hds/accordion/item/index.js b/packages/components/dist/_app_/components/hds/accordion/item/index.js new file mode 100644 index 0000000000..cabba398c4 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/accordion/item/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/accordion/item/index"; diff --git a/packages/components/dist/_app_/components/hds/alert/description.js b/packages/components/dist/_app_/components/hds/alert/description.js new file mode 100644 index 0000000000..7a0a22b31a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/alert/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/alert/description"; diff --git a/packages/components/dist/_app_/components/hds/alert/index.js b/packages/components/dist/_app_/components/hds/alert/index.js new file mode 100644 index 0000000000..4688ce948a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/alert/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/alert/index"; diff --git a/packages/components/dist/_app_/components/hds/alert/title.js b/packages/components/dist/_app_/components/hds/alert/title.js new file mode 100644 index 0000000000..0edec3d07f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/alert/title.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/alert/title"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/copyright.js b/packages/components/dist/_app_/components/hds/app-footer/copyright.js new file mode 100644 index 0000000000..4d78d2a7e6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/copyright.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/copyright"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/index.js b/packages/components/dist/_app_/components/hds/app-footer/index.js new file mode 100644 index 0000000000..f855c5ccb0 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/index"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/item.js b/packages/components/dist/_app_/components/hds/app-footer/item.js new file mode 100644 index 0000000000..b46143f3c0 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/item.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/item"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/legal-links.js b/packages/components/dist/_app_/components/hds/app-footer/legal-links.js new file mode 100644 index 0000000000..2dab48aa95 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/legal-links.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/legal-links"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/link.js b/packages/components/dist/_app_/components/hds/app-footer/link.js new file mode 100644 index 0000000000..e506b7fef5 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/link.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/link"; diff --git a/packages/components/dist/_app_/components/hds/app-footer/status-link.js b/packages/components/dist/_app_/components/hds/app-footer/status-link.js new file mode 100644 index 0000000000..1bc555963d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-footer/status-link.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-footer/status-link"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/index.js b/packages/components/dist/_app_/components/hds/app-frame/index.js new file mode 100644 index 0000000000..a5d3fcf8a5 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/index"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/parts/footer.js b/packages/components/dist/_app_/components/hds/app-frame/parts/footer.js new file mode 100644 index 0000000000..ad483b0121 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/parts/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/parts/footer"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/parts/header.js b/packages/components/dist/_app_/components/hds/app-frame/parts/header.js new file mode 100644 index 0000000000..76a26140c6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/parts/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/parts/header"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/parts/main.js b/packages/components/dist/_app_/components/hds/app-frame/parts/main.js new file mode 100644 index 0000000000..0641c38e38 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/parts/main.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/parts/main"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/parts/modals.js b/packages/components/dist/_app_/components/hds/app-frame/parts/modals.js new file mode 100644 index 0000000000..d7dd8bf25b --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/parts/modals.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/parts/modals"; diff --git a/packages/components/dist/_app_/components/hds/app-frame/parts/sidebar.js b/packages/components/dist/_app_/components/hds/app-frame/parts/sidebar.js new file mode 100644 index 0000000000..5793ce85b1 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/app-frame/parts/sidebar.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/app-frame/parts/sidebar"; diff --git a/packages/components/dist/_app_/components/hds/application-state/body.js b/packages/components/dist/_app_/components/hds/application-state/body.js new file mode 100644 index 0000000000..bad7924873 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/application-state/body.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/application-state/body"; diff --git a/packages/components/dist/_app_/components/hds/application-state/footer.js b/packages/components/dist/_app_/components/hds/application-state/footer.js new file mode 100644 index 0000000000..bcb8836eec --- /dev/null +++ b/packages/components/dist/_app_/components/hds/application-state/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/application-state/footer"; diff --git a/packages/components/dist/_app_/components/hds/application-state/header.js b/packages/components/dist/_app_/components/hds/application-state/header.js new file mode 100644 index 0000000000..665833afd1 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/application-state/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/application-state/header"; diff --git a/packages/components/dist/_app_/components/hds/application-state/index.js b/packages/components/dist/_app_/components/hds/application-state/index.js new file mode 100644 index 0000000000..f154eaa04a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/application-state/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/application-state/index"; diff --git a/packages/components/dist/_app_/components/hds/application-state/media.js b/packages/components/dist/_app_/components/hds/application-state/media.js new file mode 100644 index 0000000000..facd192193 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/application-state/media.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/application-state/media"; diff --git a/packages/components/dist/_app_/components/hds/badge-count/index.js b/packages/components/dist/_app_/components/hds/badge-count/index.js new file mode 100644 index 0000000000..f0e3cdc3b6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/badge-count/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/badge-count/index"; diff --git a/packages/components/dist/_app_/components/hds/badge/index.js b/packages/components/dist/_app_/components/hds/badge/index.js new file mode 100644 index 0000000000..dbae241ec1 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/badge/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/badge/index"; diff --git a/packages/components/dist/_app_/components/hds/breadcrumb/index.js b/packages/components/dist/_app_/components/hds/breadcrumb/index.js new file mode 100644 index 0000000000..ee1bdfafe6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/breadcrumb/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/breadcrumb/index"; diff --git a/packages/components/dist/_app_/components/hds/breadcrumb/item.js b/packages/components/dist/_app_/components/hds/breadcrumb/item.js new file mode 100644 index 0000000000..12555b62a3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/breadcrumb/item.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/breadcrumb/item"; diff --git a/packages/components/dist/_app_/components/hds/breadcrumb/truncation.js b/packages/components/dist/_app_/components/hds/breadcrumb/truncation.js new file mode 100644 index 0000000000..01c9e216c4 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/breadcrumb/truncation.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/breadcrumb/truncation"; diff --git a/packages/components/dist/_app_/components/hds/button-set/index.js b/packages/components/dist/_app_/components/hds/button-set/index.js new file mode 100644 index 0000000000..c5aa1ef81d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/button-set/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/button-set/index"; diff --git a/packages/components/dist/_app_/components/hds/button/index.js b/packages/components/dist/_app_/components/hds/button/index.js new file mode 100644 index 0000000000..86edb7b31d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/button/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/button/index"; diff --git a/packages/components/dist/_app_/components/hds/card/container.js b/packages/components/dist/_app_/components/hds/card/container.js new file mode 100644 index 0000000000..eebe58e9f3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/card/container.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/card/container"; diff --git a/packages/components/dist/_app_/components/hds/code-block/copy-button.js b/packages/components/dist/_app_/components/hds/code-block/copy-button.js new file mode 100644 index 0000000000..a5330715f2 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/code-block/copy-button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/code-block/copy-button"; diff --git a/packages/components/dist/_app_/components/hds/code-block/description.js b/packages/components/dist/_app_/components/hds/code-block/description.js new file mode 100644 index 0000000000..2c46a1d591 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/code-block/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/code-block/description"; diff --git a/packages/components/dist/_app_/components/hds/code-block/index.js b/packages/components/dist/_app_/components/hds/code-block/index.js new file mode 100644 index 0000000000..e6f1f83c91 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/code-block/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/code-block/index"; diff --git a/packages/components/dist/_app_/components/hds/code-block/title.js b/packages/components/dist/_app_/components/hds/code-block/title.js new file mode 100644 index 0000000000..325eede37a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/code-block/title.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/code-block/title"; diff --git a/packages/components/dist/_app_/components/hds/copy/button/index.js b/packages/components/dist/_app_/components/hds/copy/button/index.js new file mode 100644 index 0000000000..39b4cac160 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/copy/button/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/copy/button/index"; diff --git a/packages/components/dist/_app_/components/hds/copy/snippet/index.js b/packages/components/dist/_app_/components/hds/copy/snippet/index.js new file mode 100644 index 0000000000..9f325c0137 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/copy/snippet/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/copy/snippet/index"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/body.js b/packages/components/dist/_app_/components/hds/dialog-primitive/body.js new file mode 100644 index 0000000000..8018c7a8ac --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/body.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/body"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/description.js b/packages/components/dist/_app_/components/hds/dialog-primitive/description.js new file mode 100644 index 0000000000..6b105a6ada --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/description"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/footer.js b/packages/components/dist/_app_/components/hds/dialog-primitive/footer.js new file mode 100644 index 0000000000..b6a2df0134 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/footer"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/header.js b/packages/components/dist/_app_/components/hds/dialog-primitive/header.js new file mode 100644 index 0000000000..4dca361074 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/header"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/overlay.js b/packages/components/dist/_app_/components/hds/dialog-primitive/overlay.js new file mode 100644 index 0000000000..119248fc18 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/overlay.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/overlay"; diff --git a/packages/components/dist/_app_/components/hds/dialog-primitive/wrapper.js b/packages/components/dist/_app_/components/hds/dialog-primitive/wrapper.js new file mode 100644 index 0000000000..3d4a65603f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dialog-primitive/wrapper.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dialog-primitive/wrapper"; diff --git a/packages/components/dist/_app_/components/hds/disclosure-primitive/index.js b/packages/components/dist/_app_/components/hds/disclosure-primitive/index.js new file mode 100644 index 0000000000..a7b1066f7e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/disclosure-primitive/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/disclosure-primitive/index"; diff --git a/packages/components/dist/_app_/components/hds/dismiss-button/index.js b/packages/components/dist/_app_/components/hds/dismiss-button/index.js new file mode 100644 index 0000000000..41718a12e3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dismiss-button/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dismiss-button/index"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/footer.js b/packages/components/dist/_app_/components/hds/dropdown/footer.js new file mode 100644 index 0000000000..17d99cba0f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/footer"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/header.js b/packages/components/dist/_app_/components/hds/dropdown/header.js new file mode 100644 index 0000000000..31b48e183c --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/header"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/index.js b/packages/components/dist/_app_/components/hds/dropdown/index.js new file mode 100644 index 0000000000..4843534a91 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/index"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/checkbox.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/checkbox.js new file mode 100644 index 0000000000..6f63ad6187 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/checkbox.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/checkbox"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/checkmark.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/checkmark.js new file mode 100644 index 0000000000..dea9b9ab9b --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/checkmark.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/checkmark"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/copy-item.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/copy-item.js new file mode 100644 index 0000000000..d2f5881a45 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/copy-item.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/copy-item"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/description.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/description.js new file mode 100644 index 0000000000..06f1514351 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/description"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/generic.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/generic.js new file mode 100644 index 0000000000..4505da3532 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/generic.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/generic"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/interactive.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/interactive.js new file mode 100644 index 0000000000..02ddcb5d94 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/interactive.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/interactive"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/radio.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/radio.js new file mode 100644 index 0000000000..ade57b132c --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/radio.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/radio"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/separator.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/separator.js new file mode 100644 index 0000000000..5972bbc8b2 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/separator.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/separator"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/list-item/title.js b/packages/components/dist/_app_/components/hds/dropdown/list-item/title.js new file mode 100644 index 0000000000..34ec0dd6c7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/list-item/title.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/list-item/title"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/toggle/button.js b/packages/components/dist/_app_/components/hds/dropdown/toggle/button.js new file mode 100644 index 0000000000..703c4e65e6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/toggle/button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/toggle/button"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/toggle/chevron.js b/packages/components/dist/_app_/components/hds/dropdown/toggle/chevron.js new file mode 100644 index 0000000000..8553686a5e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/toggle/chevron.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/toggle/chevron"; diff --git a/packages/components/dist/_app_/components/hds/dropdown/toggle/icon.js b/packages/components/dist/_app_/components/hds/dropdown/toggle/icon.js new file mode 100644 index 0000000000..571c7cddef --- /dev/null +++ b/packages/components/dist/_app_/components/hds/dropdown/toggle/icon.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/dropdown/toggle/icon"; diff --git a/packages/components/dist/_app_/components/hds/flyout/body.js b/packages/components/dist/_app_/components/hds/flyout/body.js new file mode 100644 index 0000000000..ef51fad401 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/flyout/body.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/flyout/body"; diff --git a/packages/components/dist/_app_/components/hds/flyout/description.js b/packages/components/dist/_app_/components/hds/flyout/description.js new file mode 100644 index 0000000000..070159a6a2 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/flyout/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/flyout/description"; diff --git a/packages/components/dist/_app_/components/hds/flyout/footer.js b/packages/components/dist/_app_/components/hds/flyout/footer.js new file mode 100644 index 0000000000..7a1dc59a47 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/flyout/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/flyout/footer"; diff --git a/packages/components/dist/_app_/components/hds/flyout/header.js b/packages/components/dist/_app_/components/hds/flyout/header.js new file mode 100644 index 0000000000..f58e2e70e4 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/flyout/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/flyout/header"; diff --git a/packages/components/dist/_app_/components/hds/flyout/index.js b/packages/components/dist/_app_/components/hds/flyout/index.js new file mode 100644 index 0000000000..95b1e0a01a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/flyout/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/flyout/index"; diff --git a/packages/components/dist/_app_/components/hds/form/character-count/index.js b/packages/components/dist/_app_/components/hds/form/character-count/index.js new file mode 100644 index 0000000000..dd965e635d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/character-count/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/character-count/index"; diff --git a/packages/components/dist/_app_/components/hds/form/checkbox/base.js b/packages/components/dist/_app_/components/hds/form/checkbox/base.js new file mode 100644 index 0000000000..3fdb48413e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/checkbox/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/checkbox/base"; diff --git a/packages/components/dist/_app_/components/hds/form/checkbox/field.js b/packages/components/dist/_app_/components/hds/form/checkbox/field.js new file mode 100644 index 0000000000..b1ce48b705 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/checkbox/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/checkbox/field"; diff --git a/packages/components/dist/_app_/components/hds/form/checkbox/group.js b/packages/components/dist/_app_/components/hds/form/checkbox/group.js new file mode 100644 index 0000000000..f96170aafe --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/checkbox/group.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/checkbox/group"; diff --git a/packages/components/dist/_app_/components/hds/form/error/index.js b/packages/components/dist/_app_/components/hds/form/error/index.js new file mode 100644 index 0000000000..f9ae3599aa --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/error/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/error/index"; diff --git a/packages/components/dist/_app_/components/hds/form/error/message.js b/packages/components/dist/_app_/components/hds/form/error/message.js new file mode 100644 index 0000000000..63e656147a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/error/message.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/error/message"; diff --git a/packages/components/dist/_app_/components/hds/form/field/index.js b/packages/components/dist/_app_/components/hds/form/field/index.js new file mode 100644 index 0000000000..79e0ba0c29 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/field/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/field/index"; diff --git a/packages/components/dist/_app_/components/hds/form/fieldset/index.js b/packages/components/dist/_app_/components/hds/form/fieldset/index.js new file mode 100644 index 0000000000..4201381c41 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/fieldset/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/fieldset/index"; diff --git a/packages/components/dist/_app_/components/hds/form/file-input/base.js b/packages/components/dist/_app_/components/hds/form/file-input/base.js new file mode 100644 index 0000000000..4fa39fa12f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/file-input/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/file-input/base"; diff --git a/packages/components/dist/_app_/components/hds/form/file-input/field.js b/packages/components/dist/_app_/components/hds/form/file-input/field.js new file mode 100644 index 0000000000..c2340ff2b3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/file-input/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/file-input/field"; diff --git a/packages/components/dist/_app_/components/hds/form/helper-text/index.js b/packages/components/dist/_app_/components/hds/form/helper-text/index.js new file mode 100644 index 0000000000..e03bd1eae5 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/helper-text/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/helper-text/index"; diff --git a/packages/components/dist/_app_/components/hds/form/indicator/index.js b/packages/components/dist/_app_/components/hds/form/indicator/index.js new file mode 100644 index 0000000000..f7b112fdd9 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/indicator/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/indicator/index"; diff --git a/packages/components/dist/_app_/components/hds/form/label/index.js b/packages/components/dist/_app_/components/hds/form/label/index.js new file mode 100644 index 0000000000..7a89b3ff2d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/label/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/label/index"; diff --git a/packages/components/dist/_app_/components/hds/form/legend/index.js b/packages/components/dist/_app_/components/hds/form/legend/index.js new file mode 100644 index 0000000000..8258ad5c99 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/legend/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/legend/index"; diff --git a/packages/components/dist/_app_/components/hds/form/masked-input/base.js b/packages/components/dist/_app_/components/hds/form/masked-input/base.js new file mode 100644 index 0000000000..081fd3417f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/masked-input/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/masked-input/base"; diff --git a/packages/components/dist/_app_/components/hds/form/masked-input/field.js b/packages/components/dist/_app_/components/hds/form/masked-input/field.js new file mode 100644 index 0000000000..a5823fe272 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/masked-input/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/masked-input/field"; diff --git a/packages/components/dist/_app_/components/hds/form/radio-card/description.js b/packages/components/dist/_app_/components/hds/form/radio-card/description.js new file mode 100644 index 0000000000..80f1315555 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio-card/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio-card/description"; diff --git a/packages/components/dist/_app_/components/hds/form/radio-card/group.js b/packages/components/dist/_app_/components/hds/form/radio-card/group.js new file mode 100644 index 0000000000..ba53fc24cb --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio-card/group.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio-card/group"; diff --git a/packages/components/dist/_app_/components/hds/form/radio-card/index.js b/packages/components/dist/_app_/components/hds/form/radio-card/index.js new file mode 100644 index 0000000000..6d8d0c3f1a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio-card/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio-card/index"; diff --git a/packages/components/dist/_app_/components/hds/form/radio-card/label.js b/packages/components/dist/_app_/components/hds/form/radio-card/label.js new file mode 100644 index 0000000000..6e58536950 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio-card/label.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio-card/label"; diff --git a/packages/components/dist/_app_/components/hds/form/radio/base.js b/packages/components/dist/_app_/components/hds/form/radio/base.js new file mode 100644 index 0000000000..d3edc67e42 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio/base"; diff --git a/packages/components/dist/_app_/components/hds/form/radio/field.js b/packages/components/dist/_app_/components/hds/form/radio/field.js new file mode 100644 index 0000000000..2e4f6f722c --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio/field"; diff --git a/packages/components/dist/_app_/components/hds/form/radio/group.js b/packages/components/dist/_app_/components/hds/form/radio/group.js new file mode 100644 index 0000000000..0c5c89726f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/radio/group.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/radio/group"; diff --git a/packages/components/dist/_app_/components/hds/form/select/base.js b/packages/components/dist/_app_/components/hds/form/select/base.js new file mode 100644 index 0000000000..a89af8c462 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/select/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/select/base"; diff --git a/packages/components/dist/_app_/components/hds/form/select/field.js b/packages/components/dist/_app_/components/hds/form/select/field.js new file mode 100644 index 0000000000..9f260b901d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/select/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/select/field"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/after-options.js b/packages/components/dist/_app_/components/hds/form/super-select/after-options.js new file mode 100644 index 0000000000..b92afb7e66 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/after-options.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/after-options"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/multiple/base.js b/packages/components/dist/_app_/components/hds/form/super-select/multiple/base.js new file mode 100644 index 0000000000..5d79b51d84 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/multiple/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/multiple/base"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/multiple/field.js b/packages/components/dist/_app_/components/hds/form/super-select/multiple/field.js new file mode 100644 index 0000000000..20099e536e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/multiple/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/multiple/field"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/option-group.js b/packages/components/dist/_app_/components/hds/form/super-select/option-group.js new file mode 100644 index 0000000000..0c831f0195 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/option-group.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/option-group"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/placeholder.js b/packages/components/dist/_app_/components/hds/form/super-select/placeholder.js new file mode 100644 index 0000000000..643e1fd837 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/placeholder.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/placeholder"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/single/base.js b/packages/components/dist/_app_/components/hds/form/super-select/single/base.js new file mode 100644 index 0000000000..479fa19502 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/single/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/single/base"; diff --git a/packages/components/dist/_app_/components/hds/form/super-select/single/field.js b/packages/components/dist/_app_/components/hds/form/super-select/single/field.js new file mode 100644 index 0000000000..fc9c583625 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/super-select/single/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/super-select/single/field"; diff --git a/packages/components/dist/_app_/components/hds/form/text-input/base.js b/packages/components/dist/_app_/components/hds/form/text-input/base.js new file mode 100644 index 0000000000..a567d573b6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/text-input/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/text-input/base"; diff --git a/packages/components/dist/_app_/components/hds/form/text-input/field.js b/packages/components/dist/_app_/components/hds/form/text-input/field.js new file mode 100644 index 0000000000..f33815df81 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/text-input/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/text-input/field"; diff --git a/packages/components/dist/_app_/components/hds/form/textarea/base.js b/packages/components/dist/_app_/components/hds/form/textarea/base.js new file mode 100644 index 0000000000..55bdef763d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/textarea/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/textarea/base"; diff --git a/packages/components/dist/_app_/components/hds/form/textarea/field.js b/packages/components/dist/_app_/components/hds/form/textarea/field.js new file mode 100644 index 0000000000..ff147cb88a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/textarea/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/textarea/field"; diff --git a/packages/components/dist/_app_/components/hds/form/toggle/base.js b/packages/components/dist/_app_/components/hds/form/toggle/base.js new file mode 100644 index 0000000000..dd31b31fe3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/toggle/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/toggle/base"; diff --git a/packages/components/dist/_app_/components/hds/form/toggle/field.js b/packages/components/dist/_app_/components/hds/form/toggle/field.js new file mode 100644 index 0000000000..e3bf5259d7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/toggle/field.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/toggle/field"; diff --git a/packages/components/dist/_app_/components/hds/form/toggle/group.js b/packages/components/dist/_app_/components/hds/form/toggle/group.js new file mode 100644 index 0000000000..ecdaeb14e1 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/toggle/group.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/toggle/group"; diff --git a/packages/components/dist/_app_/components/hds/form/visibility-toggle/index.js b/packages/components/dist/_app_/components/hds/form/visibility-toggle/index.js new file mode 100644 index 0000000000..cb01f1cc88 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/form/visibility-toggle/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/form/visibility-toggle/index"; diff --git a/packages/components/dist/_app_/components/hds/icon-tile/index.js b/packages/components/dist/_app_/components/hds/icon-tile/index.js new file mode 100644 index 0000000000..a1f4634c7e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/icon-tile/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/icon-tile/index"; diff --git a/packages/components/dist/_app_/components/hds/icon/index.js b/packages/components/dist/_app_/components/hds/icon/index.js new file mode 100644 index 0000000000..989e736a0f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/icon/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/icon/index"; diff --git a/packages/components/dist/_app_/components/hds/interactive/index.js b/packages/components/dist/_app_/components/hds/interactive/index.js new file mode 100644 index 0000000000..ca2fa25930 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/interactive/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/interactive/index"; diff --git a/packages/components/dist/_app_/components/hds/link/inline.js b/packages/components/dist/_app_/components/hds/link/inline.js new file mode 100644 index 0000000000..45dd23d537 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/link/inline.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/link/inline"; diff --git a/packages/components/dist/_app_/components/hds/link/standalone.js b/packages/components/dist/_app_/components/hds/link/standalone.js new file mode 100644 index 0000000000..f808a1720a --- /dev/null +++ b/packages/components/dist/_app_/components/hds/link/standalone.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/link/standalone"; diff --git a/packages/components/dist/_app_/components/hds/menu-primitive/index.js b/packages/components/dist/_app_/components/hds/menu-primitive/index.js new file mode 100644 index 0000000000..bbb479135c --- /dev/null +++ b/packages/components/dist/_app_/components/hds/menu-primitive/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/menu-primitive/index"; diff --git a/packages/components/dist/_app_/components/hds/modal/body.js b/packages/components/dist/_app_/components/hds/modal/body.js new file mode 100644 index 0000000000..712ffd1569 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/modal/body.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/modal/body"; diff --git a/packages/components/dist/_app_/components/hds/modal/footer.js b/packages/components/dist/_app_/components/hds/modal/footer.js new file mode 100644 index 0000000000..ca66d42e7b --- /dev/null +++ b/packages/components/dist/_app_/components/hds/modal/footer.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/modal/footer"; diff --git a/packages/components/dist/_app_/components/hds/modal/header.js b/packages/components/dist/_app_/components/hds/modal/header.js new file mode 100644 index 0000000000..5c0e1e90a7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/modal/header.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/modal/header"; diff --git a/packages/components/dist/_app_/components/hds/modal/index.js b/packages/components/dist/_app_/components/hds/modal/index.js new file mode 100644 index 0000000000..1c7ca0cc88 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/modal/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/modal/index"; diff --git a/packages/components/dist/_app_/components/hds/page-header/actions.js b/packages/components/dist/_app_/components/hds/page-header/actions.js new file mode 100644 index 0000000000..501f908feb --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/actions.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/actions"; diff --git a/packages/components/dist/_app_/components/hds/page-header/badges.js b/packages/components/dist/_app_/components/hds/page-header/badges.js new file mode 100644 index 0000000000..7118e6ee53 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/badges.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/badges"; diff --git a/packages/components/dist/_app_/components/hds/page-header/description.js b/packages/components/dist/_app_/components/hds/page-header/description.js new file mode 100644 index 0000000000..faa5c030f6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/description.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/description"; diff --git a/packages/components/dist/_app_/components/hds/page-header/index.js b/packages/components/dist/_app_/components/hds/page-header/index.js new file mode 100644 index 0000000000..6ee392d07c --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/index"; diff --git a/packages/components/dist/_app_/components/hds/page-header/subtitle.js b/packages/components/dist/_app_/components/hds/page-header/subtitle.js new file mode 100644 index 0000000000..c931f22418 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/subtitle.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/subtitle"; diff --git a/packages/components/dist/_app_/components/hds/page-header/title.js b/packages/components/dist/_app_/components/hds/page-header/title.js new file mode 100644 index 0000000000..5603c77fd7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/page-header/title.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/page-header/title"; diff --git a/packages/components/dist/_app_/components/hds/pagination/compact/index.js b/packages/components/dist/_app_/components/hds/pagination/compact/index.js new file mode 100644 index 0000000000..61a4efc14e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/compact/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/compact/index"; diff --git a/packages/components/dist/_app_/components/hds/pagination/info/index.js b/packages/components/dist/_app_/components/hds/pagination/info/index.js new file mode 100644 index 0000000000..20a9d66c7e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/info/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/info/index"; diff --git a/packages/components/dist/_app_/components/hds/pagination/nav/arrow.js b/packages/components/dist/_app_/components/hds/pagination/nav/arrow.js new file mode 100644 index 0000000000..bb92ed3b15 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/nav/arrow.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/nav/arrow"; diff --git a/packages/components/dist/_app_/components/hds/pagination/nav/ellipsis.js b/packages/components/dist/_app_/components/hds/pagination/nav/ellipsis.js new file mode 100644 index 0000000000..0bf168b4e7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/nav/ellipsis.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/nav/ellipsis"; diff --git a/packages/components/dist/_app_/components/hds/pagination/nav/number.js b/packages/components/dist/_app_/components/hds/pagination/nav/number.js new file mode 100644 index 0000000000..36ef9c4252 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/nav/number.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/nav/number"; diff --git a/packages/components/dist/_app_/components/hds/pagination/numbered/index.js b/packages/components/dist/_app_/components/hds/pagination/numbered/index.js new file mode 100644 index 0000000000..045a63cfee --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/numbered/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/numbered/index"; diff --git a/packages/components/dist/_app_/components/hds/pagination/size-selector/index.js b/packages/components/dist/_app_/components/hds/pagination/size-selector/index.js new file mode 100644 index 0000000000..a7e69e8a47 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/pagination/size-selector/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/pagination/size-selector/index"; diff --git a/packages/components/dist/_app_/components/hds/popover-primitive/index.js b/packages/components/dist/_app_/components/hds/popover-primitive/index.js new file mode 100644 index 0000000000..83c652eebe --- /dev/null +++ b/packages/components/dist/_app_/components/hds/popover-primitive/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/popover-primitive/index"; diff --git a/packages/components/dist/_app_/components/hds/reveal/index.js b/packages/components/dist/_app_/components/hds/reveal/index.js new file mode 100644 index 0000000000..a190f959ba --- /dev/null +++ b/packages/components/dist/_app_/components/hds/reveal/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/reveal/index"; diff --git a/packages/components/dist/_app_/components/hds/reveal/toggle/button.js b/packages/components/dist/_app_/components/hds/reveal/toggle/button.js new file mode 100644 index 0000000000..0002263ab2 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/reveal/toggle/button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/reveal/toggle/button"; diff --git a/packages/components/dist/_app_/components/hds/rich-tooltip/bubble.js b/packages/components/dist/_app_/components/hds/rich-tooltip/bubble.js new file mode 100644 index 0000000000..a928fd5054 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/rich-tooltip/bubble.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/rich-tooltip/bubble"; diff --git a/packages/components/dist/_app_/components/hds/rich-tooltip/index.js b/packages/components/dist/_app_/components/hds/rich-tooltip/index.js new file mode 100644 index 0000000000..a001161c14 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/rich-tooltip/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/rich-tooltip/index"; diff --git a/packages/components/dist/_app_/components/hds/rich-tooltip/toggle.js b/packages/components/dist/_app_/components/hds/rich-tooltip/toggle.js new file mode 100644 index 0000000000..1117128b53 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/rich-tooltip/toggle.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/rich-tooltip/toggle"; diff --git a/packages/components/dist/_app_/components/hds/segmented-group/index.js b/packages/components/dist/_app_/components/hds/segmented-group/index.js new file mode 100644 index 0000000000..f742541d02 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/segmented-group/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/segmented-group/index"; diff --git a/packages/components/dist/_app_/components/hds/separator/index.js b/packages/components/dist/_app_/components/hds/separator/index.js new file mode 100644 index 0000000000..c55ef2eef5 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/separator/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/separator/index"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/base.js b/packages/components/dist/_app_/components/hds/side-nav/base.js new file mode 100644 index 0000000000..f449b40396 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/base.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/base"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/header/home-link.js b/packages/components/dist/_app_/components/hds/side-nav/header/home-link.js new file mode 100644 index 0000000000..6c04b096a3 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/header/home-link.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/header/home-link"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/header/icon-button.js b/packages/components/dist/_app_/components/hds/side-nav/header/icon-button.js new file mode 100644 index 0000000000..abfa7ab540 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/header/icon-button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/header/icon-button"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/header/index.js b/packages/components/dist/_app_/components/hds/side-nav/header/index.js new file mode 100644 index 0000000000..602b1b01af --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/header/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/header/index"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/index.js b/packages/components/dist/_app_/components/hds/side-nav/index.js new file mode 100644 index 0000000000..cfbc84af42 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/index"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/list/back-link.js b/packages/components/dist/_app_/components/hds/side-nav/list/back-link.js new file mode 100644 index 0000000000..afaa650507 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/list/back-link.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/list/back-link"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/list/index.js b/packages/components/dist/_app_/components/hds/side-nav/list/index.js new file mode 100644 index 0000000000..f1d48cb1e0 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/list/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/list/index"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/list/item.js b/packages/components/dist/_app_/components/hds/side-nav/list/item.js new file mode 100644 index 0000000000..2fe5b339dd --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/list/item.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/list/item"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/list/link.js b/packages/components/dist/_app_/components/hds/side-nav/list/link.js new file mode 100644 index 0000000000..586009c8a6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/list/link.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/list/link"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/list/title.js b/packages/components/dist/_app_/components/hds/side-nav/list/title.js new file mode 100644 index 0000000000..5547bf0ca7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/list/title.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/list/title"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/portal/index.js b/packages/components/dist/_app_/components/hds/side-nav/portal/index.js new file mode 100644 index 0000000000..d46eaa9c04 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/portal/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/portal/index"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/portal/target.js b/packages/components/dist/_app_/components/hds/side-nav/portal/target.js new file mode 100644 index 0000000000..7d3419c9d5 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/portal/target.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/portal/target"; diff --git a/packages/components/dist/_app_/components/hds/side-nav/toggle-button.js b/packages/components/dist/_app_/components/hds/side-nav/toggle-button.js new file mode 100644 index 0000000000..29dc5a051d --- /dev/null +++ b/packages/components/dist/_app_/components/hds/side-nav/toggle-button.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/side-nav/toggle-button"; diff --git a/packages/components/dist/_app_/components/hds/stepper/step/indicator.js b/packages/components/dist/_app_/components/hds/stepper/step/indicator.js new file mode 100644 index 0000000000..cbdd9e1c1f --- /dev/null +++ b/packages/components/dist/_app_/components/hds/stepper/step/indicator.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/stepper/step/indicator"; diff --git a/packages/components/dist/_app_/components/hds/stepper/task/indicator.js b/packages/components/dist/_app_/components/hds/stepper/task/indicator.js new file mode 100644 index 0000000000..84ef945883 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/stepper/task/indicator.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/stepper/task/indicator"; diff --git a/packages/components/dist/_app_/components/hds/table/index.js b/packages/components/dist/_app_/components/hds/table/index.js new file mode 100644 index 0000000000..4716691264 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/index"; diff --git a/packages/components/dist/_app_/components/hds/table/td.js b/packages/components/dist/_app_/components/hds/table/td.js new file mode 100644 index 0000000000..c49d40d2a8 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/td.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/td"; diff --git a/packages/components/dist/_app_/components/hds/table/th-button-sort.js b/packages/components/dist/_app_/components/hds/table/th-button-sort.js new file mode 100644 index 0000000000..ea87f0b5c4 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/th-button-sort.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/th-button-sort"; diff --git a/packages/components/dist/_app_/components/hds/table/th-button-tooltip.js b/packages/components/dist/_app_/components/hds/table/th-button-tooltip.js new file mode 100644 index 0000000000..a162e51c98 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/th-button-tooltip.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/th-button-tooltip"; diff --git a/packages/components/dist/_app_/components/hds/table/th-selectable.js b/packages/components/dist/_app_/components/hds/table/th-selectable.js new file mode 100644 index 0000000000..0384d97483 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/th-selectable.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/th-selectable"; diff --git a/packages/components/dist/_app_/components/hds/table/th-sort.js b/packages/components/dist/_app_/components/hds/table/th-sort.js new file mode 100644 index 0000000000..9093da1f55 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/th-sort.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/th-sort"; diff --git a/packages/components/dist/_app_/components/hds/table/th.js b/packages/components/dist/_app_/components/hds/table/th.js new file mode 100644 index 0000000000..edc15db1d4 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/th.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/th"; diff --git a/packages/components/dist/_app_/components/hds/table/tr.js b/packages/components/dist/_app_/components/hds/table/tr.js new file mode 100644 index 0000000000..85f0256522 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/table/tr.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/table/tr"; diff --git a/packages/components/dist/_app_/components/hds/tabs/index.js b/packages/components/dist/_app_/components/hds/tabs/index.js new file mode 100644 index 0000000000..a0962ee556 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/tabs/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/tabs/index"; diff --git a/packages/components/dist/_app_/components/hds/tabs/panel.js b/packages/components/dist/_app_/components/hds/tabs/panel.js new file mode 100644 index 0000000000..9a5f76da1e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/tabs/panel.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/tabs/panel"; diff --git a/packages/components/dist/_app_/components/hds/tabs/tab.js b/packages/components/dist/_app_/components/hds/tabs/tab.js new file mode 100644 index 0000000000..3fb0740517 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/tabs/tab.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/tabs/tab"; diff --git a/packages/components/dist/_app_/components/hds/tag/index.js b/packages/components/dist/_app_/components/hds/tag/index.js new file mode 100644 index 0000000000..90cb7e0082 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/tag/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/tag/index"; diff --git a/packages/components/dist/_app_/components/hds/text/body.js b/packages/components/dist/_app_/components/hds/text/body.js new file mode 100644 index 0000000000..f6433d47b6 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/text/body.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/text/body"; diff --git a/packages/components/dist/_app_/components/hds/text/code.js b/packages/components/dist/_app_/components/hds/text/code.js new file mode 100644 index 0000000000..e8f2b38689 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/text/code.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/text/code"; diff --git a/packages/components/dist/_app_/components/hds/text/display.js b/packages/components/dist/_app_/components/hds/text/display.js new file mode 100644 index 0000000000..27a4c52c71 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/text/display.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/text/display"; diff --git a/packages/components/dist/_app_/components/hds/text/index.js b/packages/components/dist/_app_/components/hds/text/index.js new file mode 100644 index 0000000000..1ff06720bb --- /dev/null +++ b/packages/components/dist/_app_/components/hds/text/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/text/index"; diff --git a/packages/components/dist/_app_/components/hds/time/index.js b/packages/components/dist/_app_/components/hds/time/index.js new file mode 100644 index 0000000000..ac5fd53d0e --- /dev/null +++ b/packages/components/dist/_app_/components/hds/time/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/time/index"; diff --git a/packages/components/dist/_app_/components/hds/time/range.js b/packages/components/dist/_app_/components/hds/time/range.js new file mode 100644 index 0000000000..598144eacc --- /dev/null +++ b/packages/components/dist/_app_/components/hds/time/range.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/time/range"; diff --git a/packages/components/dist/_app_/components/hds/time/single.js b/packages/components/dist/_app_/components/hds/time/single.js new file mode 100644 index 0000000000..533f536b91 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/time/single.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/time/single"; diff --git a/packages/components/dist/_app_/components/hds/toast/index.js b/packages/components/dist/_app_/components/hds/toast/index.js new file mode 100644 index 0000000000..c44628dea7 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/toast/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/toast/index"; diff --git a/packages/components/dist/_app_/components/hds/tooltip-button/index.js b/packages/components/dist/_app_/components/hds/tooltip-button/index.js new file mode 100644 index 0000000000..a4cabbdc53 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/tooltip-button/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/tooltip-button/index"; diff --git a/packages/components/dist/_app_/components/hds/yield/index.js b/packages/components/dist/_app_/components/hds/yield/index.js new file mode 100644 index 0000000000..40bcac64b1 --- /dev/null +++ b/packages/components/dist/_app_/components/hds/yield/index.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/components/hds/yield/index"; diff --git a/packages/components/dist/_app_/helpers/hds-format-date.js b/packages/components/dist/_app_/helpers/hds-format-date.js new file mode 100644 index 0000000000..d78a39934a --- /dev/null +++ b/packages/components/dist/_app_/helpers/hds-format-date.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/helpers/hds-format-date"; diff --git a/packages/components/dist/_app_/helpers/hds-format-relative.js b/packages/components/dist/_app_/helpers/hds-format-relative.js new file mode 100644 index 0000000000..9f499479f2 --- /dev/null +++ b/packages/components/dist/_app_/helpers/hds-format-relative.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/helpers/hds-format-relative"; diff --git a/packages/components/dist/_app_/helpers/hds-link-to-models.js b/packages/components/dist/_app_/helpers/hds-link-to-models.js new file mode 100644 index 0000000000..f61ee82559 --- /dev/null +++ b/packages/components/dist/_app_/helpers/hds-link-to-models.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/helpers/hds-link-to-models"; diff --git a/packages/components/dist/_app_/helpers/hds-link-to-query.js b/packages/components/dist/_app_/helpers/hds-link-to-query.js new file mode 100644 index 0000000000..2a733cffe8 --- /dev/null +++ b/packages/components/dist/_app_/helpers/hds-link-to-query.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/helpers/hds-link-to-query"; diff --git a/packages/components/dist/_app_/instance-initializers/load-sprite.js b/packages/components/dist/_app_/instance-initializers/load-sprite.js new file mode 100644 index 0000000000..d662fe097a --- /dev/null +++ b/packages/components/dist/_app_/instance-initializers/load-sprite.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/instance-initializers/load-sprite"; diff --git a/packages/components/dist/_app_/modifiers/hds-anchored-position.js b/packages/components/dist/_app_/modifiers/hds-anchored-position.js new file mode 100644 index 0000000000..a6ae48fe40 --- /dev/null +++ b/packages/components/dist/_app_/modifiers/hds-anchored-position.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/modifiers/hds-anchored-position"; diff --git a/packages/components/dist/_app_/modifiers/hds-clipboard.js b/packages/components/dist/_app_/modifiers/hds-clipboard.js new file mode 100644 index 0000000000..3350a34044 --- /dev/null +++ b/packages/components/dist/_app_/modifiers/hds-clipboard.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/modifiers/hds-clipboard"; diff --git a/packages/components/dist/_app_/modifiers/hds-register-event.js b/packages/components/dist/_app_/modifiers/hds-register-event.js new file mode 100644 index 0000000000..6e152808ad --- /dev/null +++ b/packages/components/dist/_app_/modifiers/hds-register-event.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/modifiers/hds-register-event"; diff --git a/packages/components/dist/_app_/modifiers/hds-tooltip.js b/packages/components/dist/_app_/modifiers/hds-tooltip.js new file mode 100644 index 0000000000..e0096f72b7 --- /dev/null +++ b/packages/components/dist/_app_/modifiers/hds-tooltip.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/modifiers/hds-tooltip"; diff --git a/packages/components/dist/_app_/services/hds-time.js b/packages/components/dist/_app_/services/hds-time.js new file mode 100644 index 0000000000..7f1e170841 --- /dev/null +++ b/packages/components/dist/_app_/services/hds-time.js @@ -0,0 +1 @@ +export { default } from "@hashicorp/design-system-components/services/hds-time"; diff --git a/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js b/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js new file mode 100644 index 0000000000..3fcc6f2031 --- /dev/null +++ b/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js @@ -0,0 +1,57 @@ +function _applyDecoratedDescriptor(i, e, r, n, l) { + var a = {}; + return Object.keys(n).forEach(function (i) { + a[i] = n[i]; + }), a.enumerable = !!a.enumerable, a.configurable = !!a.configurable, ("value" in a || a.initializer) && (a.writable = !0), a = r.slice().reverse().reduce(function (r, n) { + return n(i, e, r) || r; + }, a), l && void 0 !== a.initializer && (a.value = a.initializer ? a.initializer.call(l) : void 0, a.initializer = void 0), void 0 === a.initializer ? (Object.defineProperty(i, e, a), null) : a; +} +function _assertClassBrand(e, t, n) { + if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n; + throw new TypeError("Private element is not present on this object"); +} +function _checkPrivateRedeclaration(e, t) { + if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); +} +function _classPrivateFieldGet2(s, a) { + return s.get(_assertClassBrand(s, a)); +} +function _classPrivateFieldInitSpec(e, t, a) { + _checkPrivateRedeclaration(e, t), t.set(e, a); +} +function _classPrivateMethodInitSpec(e, a) { + _checkPrivateRedeclaration(e, a), a.add(e); +} +function _defineProperty(e, r, t) { + return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { + value: t, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[r] = t, e; +} +function _initializerDefineProperty(e, i, r, l) { + r && Object.defineProperty(e, i, { + enumerable: r.enumerable, + configurable: r.configurable, + writable: r.writable, + value: r.initializer ? r.initializer.call(l) : void 0 + }); +} +function _toPrimitive(t, r) { + if ("object" != typeof t || !t) return t; + var e = t[Symbol.toPrimitive]; + if (void 0 !== e) { + var i = e.call(t, r || "default"); + if ("object" != typeof i) return i; + throw new TypeError("@@toPrimitive must return a primitive value."); + } + return ("string" === r ? String : Number)(t); +} +function _toPropertyKey(t) { + var i = _toPrimitive(t, "string"); + return "symbol" == typeof i ? i : i + ""; +} + +export { _applyDecoratedDescriptor as _, _defineProperty as a, _initializerDefineProperty as b, _classPrivateMethodInitSpec as c, _assertClassBrand as d, _classPrivateFieldInitSpec as e, _classPrivateFieldGet2 as f }; +//# sourceMappingURL=_rollupPluginBabelHelpers-81503waH.js.map diff --git a/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js.map b/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js.map new file mode 100644 index 0000000000..26cd70195b --- /dev/null +++ b/packages/components/dist/_rollupPluginBabelHelpers-81503waH.js.map @@ -0,0 +1 @@ +{"version":3,"file":"_rollupPluginBabelHelpers-81503waH.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components.js b/packages/components/dist/components.js new file mode 100644 index 0000000000..fc545693b5 --- /dev/null +++ b/packages/components/dist/components.js @@ -0,0 +1,199 @@ +export { default as HdsAccordion } from './components/hds/accordion/index.js'; +export { default as HdsAccordionItem } from './components/hds/accordion/item/index.js'; +export { HdsAccordionForceStateValues, HdsAccordionItemTitleTagValues, HdsAccordionSizeValues, HdsAccordionTypeValues } from './components/hds/accordion/types.js'; +export { default as HdsAlert } from './components/hds/alert/index.js'; +export { default as HdsAlertDescription } from './components/hds/alert/description.js'; +export { default as HdsAlertTitle } from './components/hds/alert/title.js'; +export { HdsAlertColorValues, HdsAlertTitleTagValues, HdsAlertTypeValues } from './components/hds/alert/types.js'; +export { default as HdsAppFooter } from './components/hds/app-footer/index.js'; +export { default as HdsAppFooterCopyright } from './components/hds/app-footer/copyright.js'; +export { default as HdsAppFooterItem } from './components/hds/app-footer/item.js'; +export { default as HdsAppFooterLegalLinks } from './components/hds/app-footer/legal-links.js'; +export { default as HdsAppFooterLink } from './components/hds/app-footer/link.js'; +export { default as HdsAppFooterStatusLink } from './components/hds/app-footer/status-link.js'; +export { HdsAppFooterStatusLinkStatusValues, HdsAppFooterStatusValues, HdsAppFooterThemeValues } from './components/hds/app-footer/types.js'; +export { default as HdsAppHeader } from './components/hds/app-header/index.js'; +export { default as HdsAppHeaderHomeLink } from './components/hds/app-header/home-link.js'; +export { default as HdsAppHeaderMenuButton } from './components/hds/app-header/menu-button.js'; +export { default as HdsApplicationState } from './components/hds/application-state/index.js'; +export { default as HdsApplicationStateBody } from './components/hds/application-state/body.js'; +export { default as HdsApplicationStateFooter } from './components/hds/application-state/footer.js'; +export { default as HdsApplicationStateHeader } from './components/hds/application-state/header.js'; +export { default as HdsApplicationStateMedia } from './components/hds/application-state/media.js'; +export { HdsApplicationStateAlignValues, HdsApplicationStateTitleTagValues } from './components/hds/application-state/types.js'; +export { default as HdsBadge } from './components/hds/badge/index.js'; +export { HdsBadgeColorValues, HdsBadgeSizeValues, HdsBadgeTypeValues } from './components/hds/badge/types.js'; +export { default as HdsBadgeCount } from './components/hds/badge-count/index.js'; +export { HdsBadgeCountColorValues, HdsBadgeCountSizeValues, HdsBadgeCountTypeValues } from './components/hds/badge-count/types.js'; +export { default as HdsBreadcrumb } from './components/hds/breadcrumb/index.js'; +export { default as HdsBreadcrumbItem } from './components/hds/breadcrumb/item.js'; +export { default as HdsBreadcrumbTruncation } from './components/hds/breadcrumb/truncation.js'; +export { default as HdsButton } from './components/hds/button/index.js'; +export { default as HdsButtonSet } from './components/hds/button-set/index.js'; +export { default as HdsCardContainer } from './components/hds/card/container.js'; +export { HdsCardBackgroundValues, HdsCardLevelValues, HdsCardOverflowValues } from './components/hds/card/types.js'; +export { default as HdsCodeBlock } from './components/hds/code-block/index.js'; +export { default as HdsCodeBlockCopyButton } from './components/hds/code-block/copy-button.js'; +export { default as HdsCodeBlockDescription } from './components/hds/code-block/description.js'; +export { default as HdsCodeBlockTitle } from './components/hds/code-block/title.js'; +export { HdsCodeBlockLanguageValues, HdsCodeBlockTitleTagValues } from './components/hds/code-block/types.js'; +export { default as HdsCopyButton } from './components/hds/copy/button/index.js'; +export { HdsCopyButtonSizeValues } from './components/hds/copy/button/types.js'; +export { default as HdsCopySnippet } from './components/hds/copy/snippet/index.js'; +export { HdsCopySnippetColorValues } from './components/hds/copy/snippet/types.js'; +export { default as HdsDropdown } from './components/hds/dropdown/index.js'; +export { default as HdsDropdownFooter } from './components/hds/dropdown/footer.js'; +export { default as HdsDropdownHeader } from './components/hds/dropdown/header.js'; +export { default as HdsDropdownListItemCheckbox } from './components/hds/dropdown/list-item/checkbox.js'; +export { default as HdsDropdownListItemCheckmark } from './components/hds/dropdown/list-item/checkmark.js'; +export { default as HdsDropdownListItemCopyItem } from './components/hds/dropdown/list-item/copy-item.js'; +export { default as HdsDropdownListItemDescription } from './components/hds/dropdown/list-item/description.js'; +export { default as HdsDropdownListItemGeneric } from './components/hds/dropdown/list-item/generic.js'; +export { default as HdsDropdownListItemInteractive } from './components/hds/dropdown/list-item/interactive.js'; +export { default as HdsDropdownListItemRadio } from './components/hds/dropdown/list-item/radio.js'; +export { default as HdsDropdownListItemSeparator } from './components/hds/dropdown/list-item/separator.js'; +export { default as HdsDropdownListItemTitle } from './components/hds/dropdown/list-item/title.js'; +export { default as HdsDropdownToggleButton } from './components/hds/dropdown/toggle/button.js'; +export { default as HdsDropdownToggleIcon } from './components/hds/dropdown/toggle/icon.js'; +export { HdsDropdownListItemInteractiveColorValues } from './components/hds/dropdown/list-item/types.js'; +export { HdsDropdownToggleButtonColorValues, HdsDropdownToggleButtonSizeValues, HdsDropdownToggleIconSizeValues } from './components/hds/dropdown/toggle/types.js'; +export { HdsDropdownPositionToPlacementValues, HdsDropdownPositionValues } from './components/hds/dropdown/types.js'; +export { default as HdsFlyout } from './components/hds/flyout/index.js'; +export { HdsFlyoutSizesValues } from './components/hds/flyout/types.js'; +export { default as HdsFormCharacterCount } from './components/hds/form/character-count/index.js'; +export { default as HdsFormError } from './components/hds/form/error/index.js'; +export { default as HdsFormErrorMessage } from './components/hds/form/error/message.js'; +export { default as HdsFormField } from './components/hds/form/field/index.js'; +export { default as HdsFormFieldset } from './components/hds/form/fieldset/index.js'; +export { default as HdsFormHelperText } from './components/hds/form/helper-text/index.js'; +export { default as HdsFormIndicator } from './components/hds/form/indicator/index.js'; +export { default as HdsFormLabel } from './components/hds/form/label/index.js'; +export { default as HdsFormLegend } from './components/hds/form/legend/index.js'; +export { default as HdsFormVisibilityToggle } from './components/hds/form/visibility-toggle/index.js'; +export { HdsFormFieldLayoutValues } from './components/hds/form/field/types.js'; +export { HdsFormFieldsetLayoutValues } from './components/hds/form/fieldset/types.js'; +export { default as HdsFormCheckboxBase } from './components/hds/form/checkbox/base.js'; +export { default as HdsFormCheckboxField } from './components/hds/form/checkbox/field.js'; +export { default as HdsFormCheckboxGroup } from './components/hds/form/checkbox/group.js'; +export { default as HdsFormFileInputBase } from './components/hds/form/file-input/base.js'; +export { default as HdsFormFileInputField } from './components/hds/form/file-input/field.js'; +export { default as HdsFormMaskedInputBase } from './components/hds/form/masked-input/base.js'; +export { default as HdsFormMaskedInputField } from './components/hds/form/masked-input/field.js'; +export { default as HdsFormRadioBase } from './components/hds/form/radio/base.js'; +export { default as HdsFormRadioField } from './components/hds/form/radio/field.js'; +export { default as HdsFormRadioGroup } from './components/hds/form/radio/group.js'; +export { default as HdsFormRadioCard } from './components/hds/form/radio-card/index.js'; +export { default as HdsFormRadioCardGroup } from './components/hds/form/radio-card/group.js'; +export { default as HdsFormRadioCardDescription } from './components/hds/form/radio-card/description.js'; +export { default as HdsFormRadioCardLabel } from './components/hds/form/radio-card/label.js'; +export { HdsFormRadioCardAlignmentValues, HdsFormRadioCardControlPositionValues } from './components/hds/form/radio-card/types.js'; +export { default as HdsFormSelectBase } from './components/hds/form/select/base.js'; +export { default as HdsFormSelectField } from './components/hds/form/select/field.js'; +export { default as HdsFormSuperSelectSingleBase } from './components/hds/form/super-select/single/base.js'; +export { default as HdsFormSuperSelectSingleField } from './components/hds/form/super-select/single/field.js'; +export { default as HdsFormSuperSelectMultipleBase } from './components/hds/form/super-select/multiple/base.js'; +export { default as HdsFormSuperSelectMultipleField } from './components/hds/form/super-select/multiple/field.js'; +export { default as HdsFormSuperSelectAfterOptions } from './components/hds/form/super-select/after-options.js'; +export { default as HdsFormSuperSelectOptionGroup } from './components/hds/form/super-select/option-group.js'; +export { default as HdsFormSuperSelectPlaceholder } from './components/hds/form/super-select/placeholder.js'; +export { HdsFormSuperSelectHorizontalPositionToPlacementValues, HdsFormSuperSelectHorizontalPositionValues } from './components/hds/form/super-select/types.js'; +export { default as HdsFormTextareaBase } from './components/hds/form/textarea/base.js'; +export { default as HdsFormTextareaField } from './components/hds/form/textarea/field.js'; +export { default as HdsFormTextInputBase } from './components/hds/form/text-input/base.js'; +export { default as HdsFormTextInputField } from './components/hds/form/text-input/field.js'; +export { HdsFormTextInputTypeValues } from './components/hds/form/text-input/types.js'; +export { default as HdsFormToggleBase } from './components/hds/form/toggle/base.js'; +export { default as HdsFormToggleField } from './components/hds/form/toggle/field.js'; +export { default as HdsFormToggleGroup } from './components/hds/form/toggle/group.js'; +export { default as HdsIcon } from './components/hds/icon/index.js'; +export { HdsIconColorValues, HdsIconSizeValues } from './components/hds/icon/types.js'; +export { default as HdsIconTile } from './components/hds/icon-tile/index.js'; +export { HdsIconTileColorNeutral, HdsIconTileProductValues, HdsIconTileSizeValues } from './components/hds/icon-tile/types.js'; +export { default as HdsLinkInline } from './components/hds/link/inline.js'; +export { default as HdsLinkStandalone } from './components/hds/link/standalone.js'; +export { HdsLinkColorValues, HdsLinkIconPositionValues, HdsLinkStandaloneSizeValues } from './components/hds/link/types.js'; +export { default as HdsModal } from './components/hds/modal/index.js'; +export { HdsModalColorValues, HdsModalSizeValues } from './components/hds/modal/types.js'; +export { default as HdsPageHeader } from './components/hds/page-header/index.js'; +export { default as HdsPageHeaderActions } from './components/hds/page-header/actions.js'; +export { default as HdsPageHeaderBadges } from './components/hds/page-header/badges.js'; +export { default as HdsPageHeaderDescription } from './components/hds/page-header/description.js'; +export { default as HdsPageHeaderSubtitle } from './components/hds/page-header/subtitle.js'; +export { default as HdsPageHeaderTitle } from './components/hds/page-header/title.js'; +export { default as HdsPaginationCompact } from './components/hds/pagination/compact/index.js'; +export { default as HdsPaginationInfo } from './components/hds/pagination/info/index.js'; +export { default as HdsPaginationNavArrow } from './components/hds/pagination/nav/arrow.js'; +export { default as HdsPaginationNavEllipsis } from './components/hds/pagination/nav/ellipsis.js'; +export { default as HdsPaginationNavNumber } from './components/hds/pagination/nav/number.js'; +export { default as HdsPaginationNumbered } from './components/hds/pagination/numbered/index.js'; +export { default as HdsPaginationSizeSelector } from './components/hds/pagination/size-selector/index.js'; +export { HdsPaginationDirectionAriaLabelValues, HdsPaginationDirectionLabelValues, HdsPaginationDirectionValues } from './components/hds/pagination/types.js'; +export { default as HdsReveal } from './components/hds/reveal/index.js'; +export { default as HdsRevealToggleButton } from './components/hds/reveal/toggle/button.js'; +export { default as HdsRichTooltip } from './components/hds/rich-tooltip/index.js'; +export { default as HdsRichTooltipBubble } from './components/hds/rich-tooltip/bubble.js'; +export { default as HdsRichTooltipToggle } from './components/hds/rich-tooltip/toggle.js'; +export { HdsRichTooltipToggleIconPositionValues, HdsRichTooltipToggleSizeValues } from './components/hds/rich-tooltip/types.js'; +export { default as HdsSegmentedGroup } from './components/hds/segmented-group/index.js'; +export { default as HdsSeparator } from './components/hds/separator/index.js'; +export { HdsSeparatorSpacingValues } from './components/hds/separator/types.js'; +export { default as HdsSideNav } from './components/hds/side-nav/index.js'; +export { default as HdsSideNavBase } from './components/hds/side-nav/base.js'; +export { default as HdsSideNavHeader } from './components/hds/side-nav/header/index.js'; +export { default as HdsSideNavHeaderHomeLink } from './components/hds/side-nav/header/home-link.js'; +export { default as HdsSideNavHeaderIconButton } from './components/hds/side-nav/header/icon-button.js'; +export { default as HdsSideNavList } from './components/hds/side-nav/list/index.js'; +export { default as HdsSideNavListBackLink } from './components/hds/side-nav/list/back-link.js'; +export { default as HdsSideNavListItem } from './components/hds/side-nav/list/item.js'; +export { default as HdsSideNavListLink } from './components/hds/side-nav/list/link.js'; +export { default as HdsSideNavListTitle } from './components/hds/side-nav/list/title.js'; +export { default as HdsSideNavPortal } from './components/hds/side-nav/portal/index.js'; +export { default as HdsSideNavPortalTarget } from './components/hds/side-nav/portal/target.js'; +export { default as HdsSideNavToggleButton } from './components/hds/side-nav/toggle-button.js'; +export { default as HdsStepperStepIndicator } from './components/hds/stepper/step/indicator.js'; +export { default as HdsStepperTaskIndicator } from './components/hds/stepper/task/indicator.js'; +export { HdsStepperStatusToIconsValues, HdsStepperStatusesValues } from './components/hds/stepper/types.js'; +export { default as HdsTable } from './components/hds/table/index.js'; +export { default as HdsTableTd } from './components/hds/table/td.js'; +export { default as HdsTableTh } from './components/hds/table/th.js'; +export { default as HdsTableThButtonSort } from './components/hds/table/th-button-sort.js'; +export { default as HdsTableThButtonTooltip } from './components/hds/table/th-button-tooltip.js'; +export { default as HdsTableThSelectable } from './components/hds/table/th-selectable.js'; +export { default as HdsTableThSort } from './components/hds/table/th-sort.js'; +export { default as HdsTableTr } from './components/hds/table/tr.js'; +export { HdsTableDensityValues, HdsTableHorizontalAlignmentValues, HdsTableScopeValues, HdsTableThSortOrderIconValues, HdsTableThSortOrderLabelValues, HdsTableThSortOrderValues, HdsTableVerticalAlignmentValues } from './components/hds/table/types.js'; +export { default as HdsTabs } from './components/hds/tabs/index.js'; +export { default as HdsTabsPanel } from './components/hds/tabs/panel.js'; +export { default as HdsTabsTab } from './components/hds/tabs/tab.js'; +export { HdsTabsSizeValues } from './components/hds/tabs/types.js'; +export { default as HdsTag } from './components/hds/tag/index.js'; +export { HdsTagColorValues } from './components/hds/tag/types.js'; +export { default as HdsText } from './components/hds/text/index.js'; +export { default as HdsTextBody } from './components/hds/text/body.js'; +export { default as HdsTextCode } from './components/hds/text/code.js'; +export { default as HdsTextDisplay } from './components/hds/text/display.js'; +export { HdsTextAlignValues, HdsTextColorValues, HdsTextGroupValues, HdsTextSizeValues, HdsTextWeightValues } from './components/hds/text/types.js'; +export { default as HdsTime } from './components/hds/time/index.js'; +export { default as HdsTimeRange } from './components/hds/time/range.js'; +export { default as HdsToast } from './components/hds/toast/index.js'; +export { default as HdsTooltipButton } from './components/hds/tooltip-button/index.js'; +export { HdsTooltipPlacementValues } from './components/hds/tooltip-button/types.js'; +export { default as HdsAppFrame } from './components/hds/app-frame/index.js'; +export { default as HdsAppFrameFooter } from './components/hds/app-frame/parts/footer.js'; +export { default as HdsAppFrameHeader } from './components/hds/app-frame/parts/header.js'; +export { default as HdsAppFrameMain } from './components/hds/app-frame/parts/main.js'; +export { default as HdsAppFrameModals } from './components/hds/app-frame/parts/modals.js'; +export { default as HdsAppFrameSidebar } from './components/hds/app-frame/parts/sidebar.js'; +export { default as HdsDialogPrimitiveBody } from './components/hds/dialog-primitive/body.js'; +export { default as HdsDialogPrimitiveDescription } from './components/hds/dialog-primitive/description.js'; +export { default as HdsDialogPrimitiveFooter } from './components/hds/dialog-primitive/footer.js'; +export { default as HdsDialogPrimitiveHeader } from './components/hds/dialog-primitive/header.js'; +export { default as HdsDialogPrimitiveOverlay } from './components/hds/dialog-primitive/overlay.js'; +export { default as HdsDialogPrimitiveWrapper } from './components/hds/dialog-primitive/wrapper.js'; +export { HdsDialogPrimitiveHeaderTitleTagValues } from './components/hds/dialog-primitive/types.js'; +export { default as HdsDisclosurePrimitive } from './components/hds/disclosure-primitive/index.js'; +export { default as HdsDismissButton } from './components/hds/dismiss-button/index.js'; +export { default as HdsInteractive } from './components/hds/interactive/index.js'; +export { default as HdsMenuPrimitive } from './components/hds/menu-primitive/index.js'; +export { default as HdsPopoverPrimitive } from './components/hds/popover-primitive/index.js'; +//# sourceMappingURL=components.js.map diff --git a/packages/components/dist/components.js.map b/packages/components/dist/components.js.map new file mode 100644 index 0000000000..d1ddf8035f --- /dev/null +++ b/packages/components/dist/components.js.map @@ -0,0 +1 @@ +{"version":3,"file":"components.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/accordion/index.js b/packages/components/dist/components/hds/accordion/index.js new file mode 100644 index 0000000000..81b8ae4299 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/index.js @@ -0,0 +1,68 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { SIZES, TYPES, DEFAULT_SIZE, DEFAULT_TYPE } from './item/index.js'; +import { HdsAccordionItemTitleTagValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
\n {{yield\n (hash\n Item=(component \"hds/accordion/item\" titleTag=this.titleTag size=this.size type=this.type forceState=@forceState)\n )\n }}\n
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAccordion extends Component { + /** + * Sets the size for the component + * + * @param size + * @type {HdsAccordionSizes} + * @default 'medium' + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Accordion" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + get titleTag() { + return this.args.titleTag ?? HdsAccordionItemTitleTagValues.Div; + } + + /** + * Sets the type of the component + * + * @param type + * @type {HdsAccordionTypes} + * @default 'card' + */ + get type() { + const { + type = DEFAULT_TYPE + } = this.args; + assert(`@type for "Hds::Accordion" must be one of the following: ${TYPES.join(', ')}; received: ${type}`, TYPES.includes(type)); + return type; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-accordion']; + + // add a class based on the @size argument + classes.push(`hds-accordion--size-${this.size}`); + + // add a class based on the @type argument + classes.push(`hds-accordion--type-${this.type}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsAccordion); + +export { HdsAccordion as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/accordion/index.js.map b/packages/components/dist/components/hds/accordion/index.js.map new file mode 100644 index 0000000000..6681a97e44 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/accordion/index.hbs","../../../../src/components/hds/accordion/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
\\n {{yield\\n (hash\\n Item=(component \\\"hds/accordion/item\\\" titleTag=this.titleTag size=this.size type=this.type forceState=@forceState)\\n )\\n }}\\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport { SIZES, DEFAULT_SIZE, TYPES, DEFAULT_TYPE } from './item/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport { HdsAccordionItemTitleTagValues } from './types.ts';\nimport type { HdsAccordionItemSignature } from './item/index.ts';\nimport type {\n HdsAccordionForceStates,\n HdsAccordionSizes,\n HdsAccordionTypes,\n HdsAccordionItemTitleTags,\n} from './types.ts';\n\nexport interface HdsAccordionSignature {\n Args: {\n size?: HdsAccordionSizes;\n type?: HdsAccordionTypes;\n forceState?: HdsAccordionForceStates;\n titleTag?: HdsAccordionItemTitleTags;\n };\n Blocks: {\n default: [\n {\n Item?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAccordion extends Component {\n /**\n * Sets the size for the component\n *\n * @param size\n * @type {HdsAccordionSizes}\n * @default 'medium'\n */\n get size(): HdsAccordionSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Accordion\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n get titleTag(): HdsAccordionItemTitleTags {\n return this.args.titleTag ?? HdsAccordionItemTitleTagValues.Div;\n }\n\n /**\n * Sets the type of the component\n *\n * @param type\n * @type {HdsAccordionTypes}\n * @default 'card'\n */\n get type(): HdsAccordionTypes {\n const { type = DEFAULT_TYPE } = this.args;\n\n assert(\n `@type for \"Hds::Accordion\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${type}`,\n TYPES.includes(type)\n );\n\n return type;\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(): string {\n const classes = ['hds-accordion'];\n\n // add a class based on the @size argument\n classes.push(`hds-accordion--size-${this.size}`);\n\n // add a class based on the @type argument\n classes.push(`hds-accordion--type-${this.type}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsAccordion","Component","size","DEFAULT_SIZE","args","assert","SIZES","join","includes","titleTag","HdsAccordionItemTitleTagValues","Div","type","DEFAULT_TYPE","TYPES","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,qSAAqS;;ACDvU;AACA;AACA;AACA;;AAkCe,MAAMA,YAAY,SAASC,SAAS,CAAwB;AACzE;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAsB;IAC5B,MAAM;AAAEA,MAAAA,IAAI,GAAGC;KAAc,GAAG,IAAI,CAACC,IAAI;AAEzCC,IAAAA,MAAM,CACJ,CAA4DC,yDAAAA,EAAAA,KAAK,CAACC,IAAI,CACpE,IACF,CAAC,CAAA,YAAA,EAAeL,IAAI,CAAA,CAAE,EACtBI,KAAK,CAACE,QAAQ,CAACN,IAAI,CACrB,CAAC;AAED,IAAA,OAAOA,IAAI;AACb;EAEA,IAAIO,QAAQA,GAA8B;IACxC,OAAO,IAAI,CAACL,IAAI,CAACK,QAAQ,IAAIC,8BAA8B,CAACC,GAAG;AACjE;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAsB;IAC5B,MAAM;AAAEA,MAAAA,IAAI,GAAGC;KAAc,GAAG,IAAI,CAACT,IAAI;AAEzCC,IAAAA,MAAM,CACJ,CAA4DS,yDAAAA,EAAAA,KAAK,CAACP,IAAI,CACpE,IACF,CAAC,CAAA,YAAA,EAAeK,IAAI,CAAA,CAAE,EACtBE,KAAK,CAACN,QAAQ,CAACI,IAAI,CACrB,CAAC;AAED,IAAA,OAAOA,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIG,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,eAAe,CAAC;;AAEjC;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,oBAAA,EAAuB,IAAI,CAACf,IAAI,EAAE,CAAC;;AAEhD;IACAc,OAAO,CAACC,IAAI,CAAC,CAAA,oBAAA,EAAuB,IAAI,CAACL,IAAI,EAAE,CAAC;AAEhD,IAAA,OAAOI,OAAO,CAACT,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACW,oBAAA,CAAAC,QAAA,EA7DoBnB,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/accordion/item/button.js b/packages/components/dist/components/hds/accordion/item/button.js new file mode 100644 index 0000000000..680b2767d2 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/item/button.js @@ -0,0 +1,45 @@ +import { _ as _applyDecoratedDescriptor } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n \n"); + +var _class; +let HdsAccordionItemButton = (_class = class HdsAccordionItemButton extends Component { + onClick(event) { + if (this.args.onClickToggle) { + this.args.onClickToggle(event); + } + } + + /** + * Get the class names to apply to the component. + * @method ItemButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-accordion-item__button']; + + // add a class based on the @isOpen argument + if (this.args.isOpen) { + classes.push('hds-accordion-item__button--is-open'); + } + + // add a class based on the @size argument + if (this.args.size) { + classes.push(`hds-accordion-item__button--size-${this.args.size}`); + } + if (this.args.parentContainsInteractive === false) { + classes.push('hds-accordion-item__button--parent-does-not-contain-interactive'); + } else { + classes.push('hds-accordion-item__button--parent-contains-interactive'); + } + return classes.join(' '); + } +}, _applyDecoratedDescriptor(_class.prototype, "onClick", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClick"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAccordionItemButton); + +export { HdsAccordionItemButton as default }; +//# sourceMappingURL=button.js.map diff --git a/packages/components/dist/components/hds/accordion/item/button.js.map b/packages/components/dist/components/hds/accordion/item/button.js.map new file mode 100644 index 0000000000..d69140a716 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/item/button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"button.js","sources":["../../../../../src/components/hds/accordion/item/button.hbs","../../../../../src/components/hds/accordion/item/button.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { HdsAccordionSizes } from '../types.ts';\n\nexport interface HdsAccordionItemButtonSignature {\n Args: {\n ariaLabel?: string;\n ariaLabelledBy?: string;\n contentId?: string;\n isOpen?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle?: (event: MouseEvent, ...args: any[]) => void;\n parentContainsInteractive?: boolean;\n size?: HdsAccordionSizes;\n id?: string;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsAccordionItemButton extends Component {\n @action\n onClick(event: MouseEvent): void {\n if (this.args.onClickToggle) {\n this.args.onClickToggle(event);\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method ItemButton#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-accordion-item__button'];\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-accordion-item__button--is-open');\n }\n\n // add a class based on the @size argument\n if (this.args.size) {\n classes.push(`hds-accordion-item__button--size-${this.args.size}`);\n }\n\n if (this.args.parentContainsInteractive === false) {\n classes.push(\n 'hds-accordion-item__button--parent-does-not-contain-interactive'\n );\n } else {\n classes.push('hds-accordion-item__button--parent-contains-interactive');\n }\n return classes.join(' ');\n }\n}\n"],"names":["HdsAccordionItemButton","_class","Component","onClick","event","args","onClickToggle","classNames","classes","isOpen","push","size","parentContainsInteractive","join","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,wbAAwb;;;ACwBrcA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,CAAkC;EAE7FC,OAAOA,CAACC,KAAiB,EAAQ;AAC/B,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,aAAa,EAAE;AAC3B,MAAA,IAAI,CAACD,IAAI,CAACC,aAAa,CAACF,KAAK,CAAC;AAChC;AACF;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIG,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,4BAA4B,CAAC;;AAE9C;AACA,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,MAAM,EAAE;AACpBD,MAAAA,OAAO,CAACE,IAAI,CAAC,qCAAqC,CAAC;AACrD;;AAEA;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACM,IAAI,EAAE;MAClBH,OAAO,CAACE,IAAI,CAAC,CAAoC,iCAAA,EAAA,IAAI,CAACL,IAAI,CAACM,IAAI,CAAA,CAAE,CAAC;AACpE;AAEA,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,yBAAyB,KAAK,KAAK,EAAE;AACjDJ,MAAAA,OAAO,CAACE,IAAI,CACV,iEACF,CAAC;AACH,KAAC,MAAM;AACLF,MAAAA,OAAO,CAACE,IAAI,CAAC,yDAAyD,CAAC;AACzE;AACA,IAAA,OAAOF,OAAO,CAACK,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF,CAAC,EAAAC,yBAAA,CAAAb,MAAA,CAAAc,SAAA,EAAA,SAAA,EAAA,CAlCEC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAjB,MAAA,CAAAc,SAAA,cAAAd,MAAA,CAAAc,SAAA,CAAA,EAAAd,MAAA;AADkCkB,oBAAA,CAAAC,QAAA,EAAtBpB,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/accordion/item/index.js b/packages/components/dist/components/hds/accordion/item/index.js new file mode 100644 index 0000000000..4906074441 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/item/index.js @@ -0,0 +1,126 @@ +import { a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { guidFor } from '@ember/object/internals'; +import { HdsAccordionSizeValues, HdsAccordionTypeValues, HdsAccordionItemTitleTagValues } from '../types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n <:toggle as |t|>\n
\n \n\n \n {{yield to=\"toggle\"}}\n \n
\n \n\n <:content as |c|>\n \n {{yield (hash close=c.close) to=\"content\"}}\n \n \n"); + +const SIZES = Object.values(HdsAccordionSizeValues); +const DEFAULT_SIZE = HdsAccordionSizeValues.Medium; +const TYPES = Object.values(HdsAccordionTypeValues); +const DEFAULT_TYPE = HdsAccordionTypeValues.Card; +const TEXT_SIZE_MAP = { + small: 100, + medium: 200, + large: 300 +}; +class HdsAccordionItem extends Component { + constructor(...args) { + super(...args); + /** + * Generates a unique ID for the Content + * + * @param _contentId + */ + _defineProperty(this, "_contentId", 'content-' + guidFor(this)); + _defineProperty(this, "_titleId", 'title-' + guidFor(this)); + } + get ariaLabelledBy() { + if (!this.args.ariaLabel) { + return this._titleId; + } + return undefined; + } + + /** + * @param containsInteractive + * @type {boolean} + * @default false + */ + get containsInteractive() { + return this.args.containsInteractive ?? false; + } + + /** + * @param toggleTextSize + * @type {HdsTextSizes} + * @default 'medium' + */ + get toggleTextSize() { + const size = this.args.size ?? DEFAULT_SIZE; + return TEXT_SIZE_MAP[size]; + } + + /** + * Sets the size for the component + * + * @param size + * @type {HdsAccordionSizes} + * @default 'medium' + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Accordion::Item" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * Sets the type of the component + * + * @param type + * @type {HdsAccordionTypes} + * @default 'card' + */ + get type() { + const { + type = DEFAULT_TYPE + } = this.args; + assert(`@type for "Hds::Accordion::Item" must be one of the following: ${TYPES.join(', ')}; received: ${type}`, TYPES.includes(type)); + return type; + } + get titleTag() { + return this.args.titleTag ?? HdsAccordionItemTitleTagValues.Div; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-accordion-item']; + + // add a class based on the @isOpen argument + if (this.args.isOpen) { + classes.push('hds-accordion-item--is-open'); + } + + // add a class based on the @isStatic argument + if (this.args.isStatic) { + classes.push('hds-accordion-item--is-static'); + } + + // add a class based on the @size argument + classes.push(`hds-accordion-item--size-${this.size}`); + + // add a class based on the @type argument + classes.push(`hds-accordion-item--type-${this.type}`); + if (this.containsInteractive) { + // Entire accordion item including the chevron is interactive: + classes.push('hds-accordion-item--contains-interactive'); + } else { + // Only chevron is interactive: + classes.push('hds-accordion-item--does-not-contain-interactive'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsAccordionItem); + +export { DEFAULT_SIZE, DEFAULT_TYPE, SIZES, TYPES, HdsAccordionItem as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/accordion/item/index.js.map b/packages/components/dist/components/hds/accordion/item/index.js.map new file mode 100644 index 0000000000..deac0c68d3 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/item/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/accordion/item/index.hbs","../../../../../src/components/hds/accordion/item/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n <:toggle as |t|>\\n
\\n \\n\\n \\n {{yield to=\\\"toggle\\\"}}\\n \\n
\\n \\n\\n <:content as |c|>\\n \\n {{yield (hash close=c.close) to=\\\"content\\\"}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\n\nimport {\n HdsAccordionSizeValues,\n HdsAccordionTypeValues,\n HdsAccordionItemTitleTagValues,\n} from '../types.ts';\nimport type {\n HdsAccordionForceStates,\n HdsAccordionSizes,\n HdsAccordionTypes,\n HdsAccordionItemTitleTags,\n} from '../types.ts';\n\nexport const SIZES: string[] = Object.values(HdsAccordionSizeValues);\nexport const DEFAULT_SIZE = HdsAccordionSizeValues.Medium;\n\nexport const TYPES: string[] = Object.values(HdsAccordionTypeValues);\nexport const DEFAULT_TYPE = HdsAccordionTypeValues.Card;\n\nconst TEXT_SIZE_MAP = {\n small: 100,\n medium: 200,\n large: 300,\n};\n\nexport interface HdsAccordionItemSignature {\n Args: {\n ariaLabel?: string;\n containsInteractive?: boolean;\n forceState?: HdsAccordionForceStates;\n isOpen?: boolean;\n isStatic?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle?: (event: MouseEvent, ...args: any[]) => void;\n size?: HdsAccordionSizes;\n titleTag?: HdsAccordionItemTitleTags;\n type?: HdsAccordionTypes;\n };\n Blocks: {\n toggle?: [];\n content: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n close: (...args: any[]) => void;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class HdsAccordionItem extends Component {\n /**\n * Generates a unique ID for the Content\n *\n * @param _contentId\n */\n private _contentId = 'content-' + guidFor(this);\n private _titleId = 'title-' + guidFor(this);\n\n get ariaLabelledBy(): string | undefined {\n if (!this.args.ariaLabel) {\n return this._titleId;\n }\n return undefined;\n }\n\n /**\n * @param containsInteractive\n * @type {boolean}\n * @default false\n */\n get containsInteractive(): boolean {\n return this.args.containsInteractive ?? false;\n }\n\n /**\n * @param toggleTextSize\n * @type {HdsTextSizes}\n * @default 'medium'\n */\n get toggleTextSize(): number {\n const size = this.args.size ?? DEFAULT_SIZE;\n return TEXT_SIZE_MAP[size];\n }\n\n /**\n * Sets the size for the component\n *\n * @param size\n * @type {HdsAccordionSizes}\n * @default 'medium'\n */\n get size(): HdsAccordionSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Accordion::Item\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Sets the type of the component\n *\n * @param type\n * @type {HdsAccordionTypes}\n * @default 'card'\n */\n get type(): HdsAccordionTypes {\n const { type = DEFAULT_TYPE } = this.args;\n\n assert(\n `@type for \"Hds::Accordion::Item\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${type}`,\n TYPES.includes(type)\n );\n\n return type;\n }\n\n get titleTag(): HdsAccordionItemTitleTags {\n return this.args.titleTag ?? HdsAccordionItemTitleTagValues.Div;\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(): string {\n const classes = ['hds-accordion-item'];\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-accordion-item--is-open');\n }\n\n // add a class based on the @isStatic argument\n if (this.args.isStatic) {\n classes.push('hds-accordion-item--is-static');\n }\n\n // add a class based on the @size argument\n classes.push(`hds-accordion-item--size-${this.size}`);\n\n // add a class based on the @type argument\n classes.push(`hds-accordion-item--type-${this.type}`);\n\n if (this.containsInteractive) {\n // Entire accordion item including the chevron is interactive:\n classes.push('hds-accordion-item--contains-interactive');\n } else {\n // Only chevron is interactive:\n classes.push('hds-accordion-item--does-not-contain-interactive');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["SIZES","Object","values","HdsAccordionSizeValues","DEFAULT_SIZE","Medium","TYPES","HdsAccordionTypeValues","DEFAULT_TYPE","Card","TEXT_SIZE_MAP","small","medium","large","HdsAccordionItem","Component","constructor","args","_defineProperty","guidFor","ariaLabelledBy","ariaLabel","_titleId","undefined","containsInteractive","toggleTextSize","size","assert","join","includes","type","titleTag","HdsAccordionItemTitleTagValues","Div","classNames","classes","isOpen","push","isStatic","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,gzCAAgzC;;ACoB30C,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,sBAAsB;AACtDC,MAAAA,YAAY,GAAGD,sBAAsB,CAACE;AAE5C,MAAMC,KAAe,GAAGL,MAAM,CAACC,MAAM,CAACK,sBAAsB;AACtDC,MAAAA,YAAY,GAAGD,sBAAsB,CAACE;AAEnD,MAAMC,aAAa,GAAG;AACpBC,EAAAA,KAAK,EAAE,GAAG;AACVC,EAAAA,MAAM,EAAE,GAAG;AACXC,EAAAA,KAAK,EAAE;AACT,CAAC;AA2Bc,MAAMC,gBAAgB,SAASC,SAAS,CAA4B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,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YAAA,EAAeE,IAAI,CAAA,CAAE,EACtBxB,KAAK,CAACuB,QAAQ,CAACC,IAAI,CACrB,CAAC;AAED,IAAA,OAAOA,IAAI;AACb;EAEA,IAAIC,QAAQA,GAA8B;IACxC,OAAO,IAAI,CAACd,IAAI,CAACc,QAAQ,IAAIC,8BAA8B,CAACC,GAAG;AACjE;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,oBAAoB,CAAC;;AAEtC;AACA,IAAA,IAAI,IAAI,CAAClB,IAAI,CAACmB,MAAM,EAAE;AACpBD,MAAAA,OAAO,CAACE,IAAI,CAAC,6BAA6B,CAAC;AAC7C;;AAEA;AACA,IAAA,IAAI,IAAI,CAACpB,IAAI,CAACqB,QAAQ,EAAE;AACtBH,MAAAA,OAAO,CAACE,IAAI,CAAC,+BAA+B,CAAC;AAC/C;;AAEA;IACAF,OAAO,CAACE,IAAI,CAAC,CAAA,yBAAA,EAA4B,IAAI,CAACX,IAAI,EAAE,CAAC;;AAErD;IACAS,OAAO,CAACE,IAAI,CAAC,CAAA,yBAAA,EAA4B,IAAI,CAACP,IAAI,EAAE,CAAC;IAErD,IAAI,IAAI,CAACN,mBAAmB,EAAE;AAC5B;AACAW,MAAAA,OAAO,CAACE,IAAI,CAAC,0CAA0C,CAAC;AAC1D,KAAC,MAAM;AACL;AACAF,MAAAA,OAAO,CAACE,IAAI,CAAC,kDAAkD,CAAC;AAClE;AAEA,IAAA,OAAOF,OAAO,CAACP,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACW,oBAAA,CAAAC,QAAA,EAjHoB1B,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/accordion/types.js b/packages/components/dist/components/hds/accordion/types.js new file mode 100644 index 0000000000..95140955c6 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/types.js @@ -0,0 +1,34 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsAccordionTypeValues = /*#__PURE__*/function (HdsAccordionTypeValues) { + HdsAccordionTypeValues["Card"] = "card"; + HdsAccordionTypeValues["Flush"] = "flush"; + return HdsAccordionTypeValues; +}({}); +let HdsAccordionSizeValues = /*#__PURE__*/function (HdsAccordionSizeValues) { + HdsAccordionSizeValues["Small"] = "small"; + HdsAccordionSizeValues["Medium"] = "medium"; + HdsAccordionSizeValues["Large"] = "large"; + return HdsAccordionSizeValues; +}({}); +let HdsAccordionForceStateValues = /*#__PURE__*/function (HdsAccordionForceStateValues) { + HdsAccordionForceStateValues["Open"] = "open"; + HdsAccordionForceStateValues["Close"] = "close"; + return HdsAccordionForceStateValues; +}({}); +let HdsAccordionItemTitleTagValues = /*#__PURE__*/function (HdsAccordionItemTitleTagValues) { + HdsAccordionItemTitleTagValues["Div"] = "div"; + HdsAccordionItemTitleTagValues["H1"] = "h1"; + HdsAccordionItemTitleTagValues["H2"] = "h2"; + HdsAccordionItemTitleTagValues["H3"] = "h3"; + HdsAccordionItemTitleTagValues["H4"] = "h4"; + HdsAccordionItemTitleTagValues["H5"] = "h5"; + HdsAccordionItemTitleTagValues["H6"] = "h6"; + return HdsAccordionItemTitleTagValues; +}({}); + +export { HdsAccordionForceStateValues, HdsAccordionItemTitleTagValues, HdsAccordionSizeValues, HdsAccordionTypeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/accordion/types.js.map b/packages/components/dist/components/hds/accordion/types.js.map new file mode 100644 index 0000000000..6b2eadb978 --- /dev/null +++ b/packages/components/dist/components/hds/accordion/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/accordion/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsAccordionTypeValues {\n Card = 'card',\n Flush = 'flush',\n}\nexport type HdsAccordionTypes = `${HdsAccordionTypeValues}`;\n\nexport enum HdsAccordionSizeValues {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\nexport type HdsAccordionSizes = `${HdsAccordionSizeValues}`;\n\nexport enum HdsAccordionForceStateValues {\n Open = 'open',\n Close = 'close',\n}\nexport type HdsAccordionForceStates = `${HdsAccordionForceStateValues}`;\n\nexport enum HdsAccordionItemTitleTagValues {\n Div = 'div',\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n}\n\nexport type HdsAccordionItemTitleTags = `${HdsAccordionItemTitleTagValues}`;\n"],"names":["HdsAccordionTypeValues","HdsAccordionSizeValues","HdsAccordionForceStateValues","HdsAccordionItemTitleTagValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,sBAAsB,0BAAtBA,sBAAsB,EAAA;EAAtBA,sBAAsB,CAAA,MAAA,CAAA,GAAA,MAAA;EAAtBA,sBAAsB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAAtBA,sBAAsB;AAAA,CAAA,CAAA,EAAA;AAMtBC,IAAAA,sBAAsB,0BAAtBA,sBAAsB,EAAA;EAAtBA,sBAAsB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAtBA,sBAAsB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAtBA,sBAAsB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAAtBA,sBAAsB;AAAA,CAAA,CAAA,EAAA;AAOtBC,IAAAA,4BAA4B,0BAA5BA,4BAA4B,EAAA;EAA5BA,4BAA4B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA5BA,4BAA4B,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAA5BA,4BAA4B;AAAA,CAAA,CAAA,EAAA;AAM5BC,IAAAA,8BAA8B,0BAA9BA,8BAA8B,EAAA;EAA9BA,8BAA8B,CAAA,KAAA,CAAA,GAAA,KAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA9BA,8BAA8B,CAAA,IAAA,CAAA,GAAA,IAAA;AAAA,EAAA,OAA9BA,8BAA8B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/alert/description.js b/packages/components/dist/components/hds/alert/description.js new file mode 100644 index 0000000000..1e47c53f61 --- /dev/null +++ b/packages/components/dist/components/hds/alert/description.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
{{yield}}
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAlertDescription = TemplateOnlyComponent(); +var description = setComponentTemplate(TEMPLATE, HdsAlertDescription); + +export { description as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/alert/description.js.map b/packages/components/dist/components/hds/alert/description.js.map new file mode 100644 index 0000000000..4f487882c7 --- /dev/null +++ b/packages/components/dist/components/hds/alert/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../src/components/hds/alert/description.hbs","../../../../src/components/hds/alert/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
{{yield}}
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAlertDescriptionSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsAlertDescription =\n TemplateOnlyComponent();\n\nexport default HdsAlertDescription;\n"],"names":["HdsAlertDescription","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kMAAkM;;ACDpO;AACA;AACA;AACA;;AAWA,MAAMA,mBAAmB,GACvBC,qBAAqB,EAAgC;AAEvD,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,mBAAmB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/alert/index.js b/packages/components/dist/components/hds/alert/index.js new file mode 100644 index 0000000000..c31d510a92 --- /dev/null +++ b/packages/components/dist/components/hds/alert/index.js @@ -0,0 +1,133 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { assert } from '@ember/debug'; +import { guidFor } from '@ember/object/internals'; +import { tracked } from '@glimmer/tracking'; +import { HdsAlertTypeValues, HdsAlertColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{#if this.icon}}\n
\n \n
\n {{/if}}\n\n
\n
\n {{yield (hash Title=(component \"hds/alert/title\"))}}\n {{yield (hash Description=(component \"hds/alert/description\"))}}\n
\n\n
\n {{yield\n (hash\n Button=(component \"hds/button\" size=\"small\") LinkStandalone=(component \"hds/link/standalone\" size=\"small\")\n )\n }}\n
\n {{yield (hash Generic=(component \"hds/yield\"))}}\n
\n\n {{#if this.onDismiss}}\n \n {{/if}}\n"); + +var _class, _descriptor, _descriptor2; +const TYPES = Object.values(HdsAlertTypeValues); +const DEFAULT_COLOR = HdsAlertColorValues.Neutral; +const COLORS = Object.values(HdsAlertColorValues); +const MAPPING_COLORS_TO_ICONS = { + [HdsAlertColorValues.Neutral]: 'info', + [HdsAlertColorValues.Highlight]: 'info', + [HdsAlertColorValues.Success]: 'check-circle', + [HdsAlertColorValues.Warning]: 'alert-triangle', + [HdsAlertColorValues.Critical]: 'alert-diamond' +}; +const CONTENT_ELEMENT_SELECTOR = '.hds-alert__content'; +const TITLE_ELEMENT_SELECTOR = '.hds-alert__title'; +const DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description'; +let HdsAlert = (_class = class HdsAlert extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "_role", _descriptor, this); + _initializerDefineProperty(this, "_ariaLabelledBy", _descriptor2, this); + assert(`@type for "Hds::Alert" must be one of the following: ${TYPES.join(', ')}; received: ${this.args.type}`, TYPES.includes(this.args.type)); + } + + // Determines the color scheme for the alert. + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Alert" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + + // The name of the icon to be used. + get icon() { + const { + icon + } = this.args; + + // If `icon` isn't passed, use the pre-defined one from `color` + if (icon === undefined) { + if (this.args.type === 'compact') { + // for the "compact" type by default we use filled icons + return `${MAPPING_COLORS_TO_ICONS[this.color]}-fill`; + } else { + // for all the other types by default we use outlined icons + return MAPPING_COLORS_TO_ICONS[this.color]; + } + // If `icon` is set explicitly to false, user doesn't want any icon in the alert + } else if (icon === false) { + assert(`@icon for "Hds::Alert" with @type "compact" is required`, this.args.type !== 'compact'); + return false; + } else { + // If a name for `icon` is passed, set HdsIcon to that name + return icon; + } + } + + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onDismiss() { + const { + onDismiss + } = this.args; + if (typeof onDismiss === 'function') { + return onDismiss; + } else { + return false; + } + } + + // Ensures that the correct icon size is used. Automatically calculated. + get iconSize() { + if (this.args.type === 'compact') { + return '16'; + } else { + return '24'; + } + } + get classNames() { + const classes = ['hds-alert']; + + // Add a class based on the @type argument + classes.push(`hds-alert--type-${this.args.type}`); + + // Add a class based on the @color argument + classes.push(`hds-alert--color-${this.color}`); + return classes.join(' '); + } + didInsert(element) { + const actions = element.querySelectorAll(`${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`); + + // an Alert which actually alerts users (has role="alert" & aria-live="polite") as opposed to an informational or promo "alert" + const isSemanticAlert = this.color === 'warning' || this.color === 'critical' || this.color === 'success'; + if (isSemanticAlert && actions.length) { + this._role = 'alertdialog'; + } else if (isSemanticAlert) { + this._role = 'alert'; + } + + // `alertdialog` must have an accessible name so we use either the + // title or the description as label for the alert + const label = element.querySelector(TITLE_ELEMENT_SELECTOR) || element.querySelector(DESCRIPTION_ELEMENT_SELECTOR); + if (label) { + const labelId = label.getAttribute('id') || guidFor(element); + label.setAttribute('id', labelId); + this._ariaLabelledBy = labelId; + } + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_role", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_ariaLabelledBy", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "didInsert", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsert"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAlert); + +export { COLORS, DEFAULT_COLOR, MAPPING_COLORS_TO_ICONS, TYPES, HdsAlert as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/alert/index.js.map b/packages/components/dist/components/hds/alert/index.js.map new file mode 100644 index 0000000000..a783fc8ed6 --- /dev/null +++ b/packages/components/dist/components/hds/alert/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/alert/index.hbs","../../../../src/components/hds/alert/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{#if this.icon}}\\n
\\n \\n
\\n {{/if}}\\n\\n
\\n
\\n {{yield (hash Title=(component \\\"hds/alert/title\\\"))}}\\n {{yield (hash Description=(component \\\"hds/alert/description\\\"))}}\\n
\\n\\n
\\n {{yield\\n (hash\\n Button=(component \\\"hds/button\\\" size=\\\"small\\\") LinkStandalone=(component \\\"hds/link/standalone\\\" size=\\\"small\\\")\\n )\\n }}\\n
\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n
\\n\\n {{#if this.onDismiss}}\\n \\n {{/if}}\\n\")","/**\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\nimport { HdsAlertColorValues, HdsAlertTypeValues } from './types.ts';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type HdsButtonComponent from '../button';\nimport type HdsLinkStandaloneComponent from '../link/standalone';\nimport type { HdsYieldSignature } from '../yield';\nimport type { HdsAlertColors, HdsAlertTypes } from './types.ts';\nimport type { HdsAlertTitleSignature } from './title.ts';\nimport type { HdsAlertDescriptionSignature } from './description.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport const TYPES: string[] = Object.values(HdsAlertTypeValues);\nexport const DEFAULT_COLOR = HdsAlertColorValues.Neutral;\nexport const COLORS: string[] = Object.values(HdsAlertColorValues);\n\nexport const MAPPING_COLORS_TO_ICONS = {\n [HdsAlertColorValues.Neutral]: 'info',\n [HdsAlertColorValues.Highlight]: 'info',\n [HdsAlertColorValues.Success]: 'check-circle',\n [HdsAlertColorValues.Warning]: 'alert-triangle',\n [HdsAlertColorValues.Critical]: 'alert-diamond',\n} as const;\n\nconst CONTENT_ELEMENT_SELECTOR = '.hds-alert__content';\nconst TITLE_ELEMENT_SELECTOR = '.hds-alert__title';\nconst DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description';\n\nexport interface HdsAlertSignature {\n Args: {\n type: HdsAlertTypes;\n color?: HdsAlertColors;\n icon?: HdsIconSignature['Args']['name'] | false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onDismiss?: (event: MouseEvent, ...args: any[]) => void;\n };\n Blocks: {\n default: [\n {\n Title?: ComponentLike;\n Description?: ComponentLike;\n Generic?: ComponentLike;\n LinkStandalone?: WithBoundArgs<\n typeof HdsLinkStandaloneComponent,\n 'size'\n >;\n Button?: WithBoundArgs;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAlert extends Component {\n @tracked private _role?: string;\n @tracked private _ariaLabelledBy?: string;\n\n constructor(owner: unknown, args: HdsAlertSignature['Args']) {\n super(owner, args);\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 // Determines the color scheme for the alert.\n get color(): HdsAlertColors {\n const { 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 // The name of the icon to be used.\n get icon(): HdsIconSignature['Args']['name'] | false {\n const { 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 HdsIcon to that name\n return icon;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onDismiss(): ((event: MouseEvent, ...args: any[]) => void) | false {\n const { onDismiss } = this.args;\n\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return false;\n }\n }\n\n // Ensures that the correct icon size is used. Automatically calculated.\n get iconSize(): HdsIconSignature['Args']['size'] {\n if (this.args.type === 'compact') {\n return '16';\n } else {\n return '24';\n }\n }\n\n get classNames(): string {\n const 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: HTMLDivElement): void {\n const actions = element.querySelectorAll(\n `${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`\n );\n\n // an Alert which actually alerts users (has role=\"alert\" & aria-live=\"polite\") as opposed to an informational or promo \"alert\"\n const isSemanticAlert: boolean =\n this.color === 'warning' ||\n this.color === 'critical' ||\n this.color === 'success';\n\n if (isSemanticAlert && actions.length) {\n this._role = 'alertdialog';\n } else if (isSemanticAlert) {\n this._role = 'alert';\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 const label =\n element.querySelector(TITLE_ELEMENT_SELECTOR) ||\n element.querySelector(DESCRIPTION_ELEMENT_SELECTOR);\n if (label) {\n const labelId = label.getAttribute('id') || guidFor(element);\n label.setAttribute('id', labelId);\n this._ariaLabelledBy = labelId;\n }\n }\n}\n"],"names":["TYPES","Object","values","HdsAlertTypeValues","DEFAULT_COLOR","HdsAlertColorValues","Neutral","COLORS","MAPPING_COLORS_TO_ICONS","Highlight","Success","Warning","Critical","CONTENT_ELEMENT_SELECTOR","TITLE_ELEMENT_SELECTOR","DESCRIPTION_ELEMENT_SELECTOR","HdsAlert","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","assert","join","type","includes","color","icon","undefined","onDismiss","iconSize","classNames","classes","push","didInsert","element","actions","querySelectorAll","isSemanticAlert","length","_role","label","querySelector","labelId","getAttribute","guidFor","setAttribute","_ariaLabelledBy","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,iqCAAiqC;;;ACqB5rC,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,kBAAkB;AAClDC,MAAAA,aAAa,GAAGC,mBAAmB,CAACC;AAC1C,MAAMC,MAAgB,GAAGN,MAAM,CAACC,MAAM,CAACG,mBAAmB;AAE1D,MAAMG,uBAAuB,GAAG;AACrC,EAAA,CAACH,mBAAmB,CAACC,OAAO,GAAG,MAAM;AACrC,EAAA,CAACD,mBAAmB,CAACI,SAAS,GAAG,MAAM;AACvC,EAAA,CAACJ,mBAAmB,CAACK,OAAO,GAAG,cAAc;AAC7C,EAAA,CAACL,mBAAmB,CAACM,OAAO,GAAG,gBAAgB;EAC/C,CAACN,mBAAmB,CAACO,QAAQ,GAAG;AAClC;AAEA,MAAMC,wBAAwB,GAAG,qBAAqB;AACtD,MAAMC,sBAAsB,GAAG,mBAAmB;AAClD,MAAMC,4BAA4B,GAAG,yBAAyB;AA2BzCC,IAAAA,QAAQ,IAAAC,MAAA,GAAd,MAAMD,QAAQ,SAASE,SAAS,CAAoB;AAIjEC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAA+B,EAAE;AAC3D,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAACC,IAAAA,0BAAA,gBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,0BAAAE,YAAA,EAAA,IAAA,CAAA;IAEnBC,MAAM,CACJ,CAAwDzB,qDAAAA,EAAAA,KAAK,CAAC0B,IAAI,CAChE,IACF,CAAC,CAAA,YAAA,EAAe,IAAI,CAACL,IAAI,CAACM,IAAI,CAA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ACV,OAAO,CAAC;AAC5DM,MAAAA,KAAK,CAACK,YAAY,CAAC,IAAI,EAAEH,OAAO,CAAC;MACjC,IAAI,CAACI,eAAe,GAAGJ,OAAO;AAChC;AACF;AACF,CAAC,EAAAvB,WAAA,GAAA4B,yBAAA,CAAAlC,MAAA,CAAAmC,SAAA,EAAA,OAAA,EAAA,CApHEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAAjC,CAAAA,EAAAA,YAAA,GAAA2B,yBAAA,CAAAlC,MAAA,CAAAmC,SAAA,sBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAlC,MAAA,CAAAmC,SAAA,EAsFPM,WAAAA,EAAAA,CAAAA,MAAM,GAAAzD,MAAA,CAAA0D,wBAAA,CAAA1C,MAAA,CAAAmC,SAAA,EAAA,WAAA,CAAA,EAAAnC,MAAA,CAAAmC,SAAA,GAAAnC,MAAA;AAxFoB2C,oBAAA,CAAAC,QAAA,EAAR7C,QAAQ,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/alert/title.js b/packages/components/dist/components/hds/alert/title.js new file mode 100644 index 0000000000..2e17884dfc --- /dev/null +++ b/packages/components/dist/components/hds/alert/title.js @@ -0,0 +1,21 @@ +import Component from '@glimmer/component'; +import { HdsAlertTitleTagValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! IMPORTANT: we removed any extra newlines before/after the `let` to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/1652) }}\n{{#let (element this.componentTag) as |Tag|}}{{yield}}{{/let}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAlertTitle extends Component { + get componentTag() { + return this.args.tag ?? HdsAlertTitleTagValues.Div; + } +} +setComponentTemplate(TEMPLATE, HdsAlertTitle); + +export { HdsAlertTitle as default }; +//# sourceMappingURL=title.js.map diff --git a/packages/components/dist/components/hds/alert/title.js.map b/packages/components/dist/components/hds/alert/title.js.map new file mode 100644 index 0000000000..3e2723bcfe --- /dev/null +++ b/packages/components/dist/components/hds/alert/title.js.map @@ -0,0 +1 @@ +{"version":3,"file":"title.js","sources":["../../../../src/components/hds/alert/title.hbs","../../../../src/components/hds/alert/title.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! IMPORTANT: we removed any extra newlines before/after the `let` to reduce the issues with unexpected whitespaces (see https://github.com/hashicorp/design-system/pull/1652) }}\\n{{#let (element this.componentTag) as |Tag|}}{{yield}}{{/let}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { HdsAlertTitleTagValues } from './types.ts';\nimport type { HdsAlertTitleTags } from './types';\nexport interface HdsAlertTitleSignature {\n Args: {\n tag?: HdsAlertTitleTags;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAlertTitle extends Component {\n get componentTag(): HdsAlertTitleTags {\n return this.args.tag ?? HdsAlertTitleTagValues.Div;\n }\n}\n"],"names":["HdsAlertTitle","Component","componentTag","args","tag","HdsAlertTitleTagValues","Div","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,qbAAqb;;ACDvd;AACA;AACA;AACA;;AAee,MAAMA,aAAa,SAASC,SAAS,CAAyB;EAC3E,IAAIC,YAAYA,GAAsB;IACpC,OAAO,IAAI,CAACC,IAAI,CAACC,GAAG,IAAIC,sBAAsB,CAACC,GAAG;AACpD;AACF;AAACC,oBAAA,CAAAC,QAAA,EAJoBR,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/alert/types.js b/packages/components/dist/components/hds/alert/types.js new file mode 100644 index 0000000000..c38a6b673d --- /dev/null +++ b/packages/components/dist/components/hds/alert/types.js @@ -0,0 +1,32 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsAlertTypeValues = /*#__PURE__*/function (HdsAlertTypeValues) { + HdsAlertTypeValues["Page"] = "page"; + HdsAlertTypeValues["Inline"] = "inline"; + HdsAlertTypeValues["Compact"] = "compact"; + return HdsAlertTypeValues; +}({}); +let HdsAlertColorValues = /*#__PURE__*/function (HdsAlertColorValues) { + HdsAlertColorValues["Neutral"] = "neutral"; + HdsAlertColorValues["Highlight"] = "highlight"; + HdsAlertColorValues["Success"] = "success"; + HdsAlertColorValues["Warning"] = "warning"; + HdsAlertColorValues["Critical"] = "critical"; + return HdsAlertColorValues; +}({}); +let HdsAlertTitleTagValues = /*#__PURE__*/function (HdsAlertTitleTagValues) { + HdsAlertTitleTagValues["Div"] = "div"; + HdsAlertTitleTagValues["H1"] = "h1"; + HdsAlertTitleTagValues["H2"] = "h2"; + HdsAlertTitleTagValues["H3"] = "h3"; + HdsAlertTitleTagValues["H4"] = "h4"; + HdsAlertTitleTagValues["H5"] = "h5"; + HdsAlertTitleTagValues["H6"] = "h6"; + return HdsAlertTitleTagValues; +}({}); + +export { HdsAlertColorValues, HdsAlertTitleTagValues, HdsAlertTypeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/alert/types.js.map b/packages/components/dist/components/hds/alert/types.js.map new file mode 100644 index 0000000000..2b6f70c0cd --- /dev/null +++ b/packages/components/dist/components/hds/alert/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/alert/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsAlertTypeValues {\n Page = 'page',\n Inline = 'inline',\n Compact = 'compact',\n}\nexport type HdsAlertTypes = `${HdsAlertTypeValues}`;\n\nexport enum HdsAlertColorValues {\n Neutral = 'neutral',\n Highlight = 'highlight',\n Success = 'success',\n Warning = 'warning',\n Critical = 'critical',\n}\nexport type HdsAlertColors = `${HdsAlertColorValues}`;\n\nexport enum HdsAlertTitleTagValues {\n Div = 'div',\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n}\n\nexport type HdsAlertTitleTags = `${HdsAlertTitleTagValues}`;\n"],"names":["HdsAlertTypeValues","HdsAlertColorValues","HdsAlertTitleTagValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,MAAA,CAAA,GAAA,MAAA;EAAlBA,kBAAkB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAlBA,kBAAkB,CAAA,SAAA,CAAA,GAAA,SAAA;AAAA,EAAA,OAAlBA,kBAAkB;AAAA,CAAA,CAAA,EAAA;AAOlBC,IAAAA,mBAAmB,0BAAnBA,mBAAmB,EAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,WAAA,CAAA,GAAA,WAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAAnBA,mBAAmB;AAAA,CAAA,CAAA,EAAA;AASnBC,IAAAA,sBAAsB,0BAAtBA,sBAAsB,EAAA;EAAtBA,sBAAsB,CAAA,KAAA,CAAA,GAAA,KAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtBA,sBAAsB,CAAA,IAAA,CAAA,GAAA,IAAA;AAAA,EAAA,OAAtBA,sBAAsB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/copyright.js b/packages/components/dist/components/hds/app-footer/copyright.js new file mode 100644 index 0000000000..30347226b2 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/copyright.js @@ -0,0 +1,26 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAppFooterCopyright extends Component { + /** + * @param year + * @type {string} + * @description The copyright year + * @default The current year (calculated via `Date()`) + */ + get year() { + return this.args.year ?? new Date().getFullYear(); + } +} +setComponentTemplate(TEMPLATE, HdsAppFooterCopyright); + +export { HdsAppFooterCopyright as default }; +//# sourceMappingURL=copyright.js.map diff --git a/packages/components/dist/components/hds/app-footer/copyright.js.map b/packages/components/dist/components/hds/app-footer/copyright.js.map new file mode 100644 index 0000000000..f00c7e0161 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/copyright.js.map @@ -0,0 +1 @@ +{"version":3,"file":"copyright.js","sources":["../../../../src/components/hds/app-footer/copyright.hbs","../../../../src/components/hds/app-footer/copyright.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsAppFooterCopyrightSignature {\n Args: {\n year?: string;\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppFooterCopyright 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(): string | number {\n return this.args.year ?? new Date().getFullYear();\n }\n}\n"],"names":["HdsAppFooterCopyright","Component","year","args","Date","getFullYear","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kRAAkR;;ACDpT;AACA;AACA;AACA;;AAWe,MAAMA,qBAAqB,SAASC,SAAS,CAAiC;AAC3F;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAoB;AAC1B,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,IAAI,IAAI,IAAIE,IAAI,EAAE,CAACC,WAAW,EAAE;AACnD;AACF;AAACC,oBAAA,CAAAC,QAAA,EAVoBP,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/index.js b/packages/components/dist/components/hds/app-footer/index.js new file mode 100644 index 0000000000..14751ee054 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/index.js @@ -0,0 +1,48 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
\n {{yield (hash ExtraBefore=(component \"hds/yield\"))}}\n \n {{yield (hash ExtraAfter=(component \"hds/yield\"))}}\n \n
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAppFooter extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Footer items' + */ + get ariaLabel() { + return this.args.ariaLabel ?? 'Footer items'; + } + + /** + * @param theme + * @type {HdsAppFooterThemeTypes} + * @description The component theme + * @default 'light' + */ + get theme() { + return this.args.theme ?? 'light'; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-app-footer']; + + // add a class based on the @theme argument + classes.push(`hds-app-footer--theme-${this.theme}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsAppFooter); + +export { HdsAppFooter as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-footer/index.js.map b/packages/components/dist/components/hds/app-footer/index.js.map new file mode 100644 index 0000000000..9f6a87cebb --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-footer/index.hbs","../../../../src/components/hds/app-footer/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
\\n {{yield (hash ExtraBefore=(component \\\"hds/yield\\\"))}}\\n \\n {{yield (hash ExtraAfter=(component \\\"hds/yield\\\"))}}\\n \\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsYieldSignature } from '../yield';\nimport type { HdsAppFooterItemSignature } from './item.ts';\nimport type { HdsAppFooterLegalLinksSignature } from './legal-links';\nimport type { HdsAppFooterLinkSignature } from './link';\nimport type { HdsAppFooterStatusLinkSignature } from './status-link';\nimport type { HdsAppFooterThemeTypes } from './types.ts';\n\nexport interface HdsAppFooterSignature {\n Args: {\n ariaLabel?: string;\n copyrightYear?: string;\n theme?: HdsAppFooterThemeTypes;\n };\n Blocks: {\n default: [\n {\n ExtraBefore?: ComponentLike;\n StatusLink?: ComponentLike;\n LegalLinks?: ComponentLike;\n Link?: ComponentLike;\n Item?: ComponentLike;\n ExtraAfter?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppFooter extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Footer items'\n */\n get ariaLabel(): string {\n return this.args.ariaLabel ?? 'Footer items';\n }\n\n /**\n * @param theme\n * @type {HdsAppFooterThemeTypes}\n * @description The component theme\n * @default 'light'\n */\n get theme(): HdsAppFooterThemeTypes {\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(): string {\n const 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":["HdsAppFooter","Component","ariaLabel","args","theme","classNames","classes","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4pBAA4pB;;ACD9rB;AACA;AACA;AACA;;AAiCe,MAAMA,YAAY,SAASC,SAAS,CAAwB;AACzE;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAW;AACtB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,cAAc;AAC9C;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,KAAKA,GAA2B;AAClC,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,KAAK,IAAI,OAAO;AACnC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC;;AAElC;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,sBAAA,EAAyB,IAAI,CAACH,KAAK,EAAE,CAAC;AAEnD,IAAA,OAAOE,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAjCoBV,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/item.js b/packages/components/dist/components/hds/app-footer/item.js new file mode 100644 index 0000000000..4b96c6ba48 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/item.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFooterItem = TemplateOnlyComponent(); +var item = setComponentTemplate(TEMPLATE, HdsAppFooterItem); + +export { item as default }; +//# sourceMappingURL=item.js.map diff --git a/packages/components/dist/components/hds/app-footer/item.js.map b/packages/components/dist/components/hds/app-footer/item.js.map new file mode 100644 index 0000000000..8eb30578b3 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/item.js.map @@ -0,0 +1 @@ +{"version":3,"file":"item.js","sources":["../../../../src/components/hds/app-footer/item.hbs","../../../../src/components/hds/app-footer/item.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFooterItemSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLLIElement;\n}\n\nconst HdsAppFooterItem = TemplateOnlyComponent();\n\nexport default HdsAppFooterItem;\n"],"names":["HdsAppFooterItem","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4JAA4J;;ACD9L;AACA;AACA;AACA;;AAWA,MAAMA,gBAAgB,GAAGC,qBAAqB,EAA6B;AAE3E,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/legal-links.js b/packages/components/dist/components/hds/app-footer/legal-links.js new file mode 100644 index 0000000000..68f1da4222 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/legal-links.js @@ -0,0 +1,70 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAppFooterLegalLinks extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Legal links' + */ + get ariaLabel() { + return this.args.ariaLabel ?? 'Legal links'; + } + + /** + * @param hrefForSupport + * @type {string} + * @description The href value of the "Support" link + */ + get hrefForSupport() { + return this.args.hrefForSupport ?? 'https://www.hashicorp.com/support'; + } + + /** + * @param hrefForTerms + * @type {string} + * @description The href value of the "Terms" link + */ + get hrefForTerms() { + return this.args.hrefForTerms ?? 'https://www.hashicorp.com/terms-of-service'; + } + + /** + * @param hrefForPrivacy + * @type {string} + * @description The href value of the "Privacy" link + */ + get hrefForPrivacy() { + return this.args.hrefForPrivacy ?? 'https://www.hashicorp.com/privacy'; + } + + /** + * @param hrefForSecurity + * @type {string} + * @description The href value of the "Security" link + */ + get hrefForSecurity() { + return this.args.hrefForSecurity ?? 'https://www.hashicorp.com/security'; + } + + /** + * @param hrefForAccessibility + * @type {string} + * @description The href value of the "Accessibility" link + */ + get hrefForAccessibility() { + return this.args.hrefForAccessibility ?? 'https://www.hashicorp.com/accessibility'; + } +} +setComponentTemplate(TEMPLATE, HdsAppFooterLegalLinks); + +export { HdsAppFooterLegalLinks as default }; +//# sourceMappingURL=legal-links.js.map diff --git a/packages/components/dist/components/hds/app-footer/legal-links.js.map b/packages/components/dist/components/hds/app-footer/legal-links.js.map new file mode 100644 index 0000000000..44a30bd412 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/legal-links.js.map @@ -0,0 +1 @@ +{"version":3,"file":"legal-links.js","sources":["../../../../src/components/hds/app-footer/legal-links.hbs","../../../../src/components/hds/app-footer/legal-links.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsAppFooterLegalLinksSignature {\n Args: {\n ariaLabel?: string;\n hrefForTerms?: string;\n hrefForPrivacy?: string;\n hrefForSecurity?: string;\n hrefForSupport?: string;\n hrefForAccessibility?: string;\n };\n Element: HTMLUListElement;\n}\n\nexport default class HdsAppFooterLegalLinks extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Legal links'\n */\n get ariaLabel(): string {\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(): string {\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(): string {\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(): string {\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(): string {\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(): string {\n return (\n this.args.hrefForAccessibility ??\n 'https://www.hashicorp.com/accessibility'\n );\n }\n}\n"],"names":["HdsAppFooterLegalLinks","Component","ariaLabel","args","hrefForSupport","hrefForTerms","hrefForPrivacy","hrefForSecurity","hrefForAccessibility","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,sqBAAsqB;;ACDxsB;AACA;AACA;AACA;;AAgBe,MAAMA,sBAAsB,SAASC,SAAS,CAAkC;AAC7F;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAW;AACtB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,aAAa;AAC7C;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,cAAcA,GAAW;AAC3B,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,cAAc,IAAI,mCAAmC;AACxE;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,YAAYA,GAAW;AACzB,IAAA,OACE,IAAI,CAACF,IAAI,CAACE,YAAY,IAAI,4CAA4C;AAE1E;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,cAAcA,GAAW;AAC3B,IAAA,OAAO,IAAI,CAACH,IAAI,CAACG,cAAc,IAAI,mCAAmC;AACxE;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,eAAeA,GAAW;AAC5B,IAAA,OAAO,IAAI,CAACJ,IAAI,CAACI,eAAe,IAAI,oCAAoC;AAC1E;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,oBAAoBA,GAAW;AACjC,IAAA,OACE,IAAI,CAACL,IAAI,CAACK,oBAAoB,IAC9B,yCAAyC;AAE7C;AACF;AAACC,oBAAA,CAAAC,QAAA,EA3DoBV,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/link.js b/packages/components/dist/components/hds/app-footer/link.js new file mode 100644 index 0000000000..2ed6eb79bc --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/link.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFooterLink = TemplateOnlyComponent(); +var link = setComponentTemplate(TEMPLATE, HdsAppFooterLink); + +export { link as default }; +//# sourceMappingURL=link.js.map diff --git a/packages/components/dist/components/hds/app-footer/link.js.map b/packages/components/dist/components/hds/app-footer/link.js.map new file mode 100644 index 0000000000..beffc2bf40 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"link.js","sources":["../../../../src/components/hds/app-footer/link.hbs","../../../../src/components/hds/app-footer/link.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsInteractiveSignature } from '../interactive/';\nimport type { HdsLinkColors, HdsLinkIconPositions } from '../link/types.ts';\nimport type { HdsLinkInlineSignature } from '../link/inline.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport interface HdsAppFooterLinkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n color?: HdsLinkColors;\n icon?: HdsIconSignature['Args']['name'];\n iconPosition?: HdsLinkIconPositions;\n };\n Blocks: {\n default: [];\n };\n Element: HdsLinkInlineSignature['Element'];\n}\n\nconst HdsAppFooterLink = TemplateOnlyComponent();\n\nexport default HdsAppFooterLink;\n"],"names":["HdsAppFooterLink","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+pBAA+pB;;ACDjsB;AACA;AACA;AACA;;AAqBA,MAAMA,gBAAgB,GAAGC,qBAAqB,EAA6B;AAE3E,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/status-link.js b/packages/components/dist/components/hds/app-footer/status-link.js new file mode 100644 index 0000000000..7e71676e4d --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/status-link.js @@ -0,0 +1,92 @@ +import Component from '@glimmer/component'; +import { htmlSafe } from '@ember/template'; +import { assert } from '@ember/debug'; +import { HdsAppFooterStatusLinkStatusValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n{{this.text}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const STATUSES = HdsAppFooterStatusLinkStatusValues; +class HdsAppFooterStatusLink extends Component { + constructor(owner, args) { + super(owner, args); + assert('Either @status or @text for "Hds::AppFooter::StatusLink" must have a valid value', this.args.text !== undefined || this.args.status); + } + + /** + * @param status + * @type {HdsAppFooterStatusTypes} + * @description The name of the status which the StatusLink is being set to + */ + get status() { + let status; + if (this.args.status) { + status = this.args.status.toLowerCase(); + assert(`@status for "Hds::AppFooter" must be one of the following: ${Object.keys(STATUSES).join(', ')} received: ${this.args.status}`, status in STATUSES); + return status; + } + return status; + } + get statusIcon() { + return this.args.statusIcon ?? (this.status !== undefined ? STATUSES[this.status]?.iconName : undefined); + } + + /** + * Get the inline style to apply to the item. + * @method StatusLink#itemStyle + * @return {string} The "style" attribute to apply to the item. + */ + get itemStyle() { + if (this.args.statusIconColor) { + return htmlSafe(`--hds-app-footer-status-icon-color: ${this.args.statusIconColor}`); + } else { + return undefined; + } + } + + /** + * @param text + * @type {string} + * @description The text content of the StatusLink + */ + get text() { + if (!this.args.text && this.status) { + return STATUSES[this.status]?.text; + } + return this.args.text; + } + + /** + * @param href + * @type {string} + * @description The href value of the StatusLink + */ + get href() { + return this.args.href ?? 'https://status.hashicorp.com'; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-app-footer__status-link']; + + // add a class based on status if no statusIconColor is explicitly specified + if (this.status && !this.args.statusIconColor) { + classes.push(`hds-app-footer__status-link--${this.status}`); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsAppFooterStatusLink); + +export { STATUSES, HdsAppFooterStatusLink as default }; +//# sourceMappingURL=status-link.js.map diff --git a/packages/components/dist/components/hds/app-footer/status-link.js.map b/packages/components/dist/components/hds/app-footer/status-link.js.map new file mode 100644 index 0000000000..ac572cc09e --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/status-link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"status-link.js","sources":["../../../../src/components/hds/app-footer/status-link.hbs","../../../../src/components/hds/app-footer/status-link.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n{{this.text}}\")","/**\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 type { SafeString } from '@ember/template/-private/handlebars';\nimport { assert } from '@ember/debug';\n\nimport type { HdsInteractiveSignature } from '../interactive/';\nimport { HdsAppFooterStatusLinkStatusValues } from './types.ts';\nimport type { HdsAppFooterStatusTypes } from './types.ts';\nimport type { HdsAppFooterLinkSignature } from './link.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport const STATUSES = HdsAppFooterStatusLinkStatusValues;\n\nexport interface HdsAppFooterStatusLinkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n itemStyle?: SafeString;\n status?: HdsAppFooterStatusTypes;\n statusIcon?: HdsIconSignature['Args']['name'];\n statusIconColor?: string;\n text?: string;\n };\n Element: HdsAppFooterLinkSignature['Element'];\n}\n\nexport default class HdsAppFooterStatusLink extends Component {\n constructor(owner: unknown, args: HdsInteractiveSignature['Args']) {\n super(owner, args);\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 {HdsAppFooterStatusTypes}\n * @description The name of the status which the StatusLink is being set to\n */\n get status(): HdsAppFooterStatusTypes | undefined {\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\n status in STATUSES\n );\n return status as HdsAppFooterStatusTypes;\n }\n return status;\n }\n\n get statusIcon(): HdsIconSignature['Args']['name'] | undefined {\n return (\n this.args.statusIcon ??\n (this.status !== undefined ? STATUSES[this.status]?.iconName : undefined)\n );\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(): SafeString | undefined {\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(): string | undefined {\n if (!this.args.text && this.status) {\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(): string {\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(): string {\n const 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","HdsAppFooterStatusLinkStatusValues","HdsAppFooterStatusLink","Component","constructor","owner","args","assert","text","undefined","status","toLowerCase","Object","keys","join","statusIcon","iconName","itemStyle","statusIconColor","htmlSafe","href","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,kiBAAkiB;;ACDpkB;AACA;AACA;AACA;;AAaO,MAAMA,QAAQ,GAAGC;AAaT,MAAMC,sBAAsB,SAASC,SAAS,CAAkC;AAC7FC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAqC,EAAE;AACjE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,MAAM,CACJ,kFAAkF,EAClF,IAAI,CAACD,IAAI,CAACE,IAAI,KAAKC,SAAS,IAAI,IAAI,CAACH,IAAI,CAACI,MAC5C,CAAC;AACH;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIA,MAAMA,GAAwC;AAChD,IAAA,IAAIA,MAAM;AACV,IAAA,IAAI,IAAI,CAACJ,IAAI,CAACI,MAAM,EAAE;MACpBA,MAAM,GAAG,IAAI,CAACJ,IAAI,CAACI,MAAM,CAACC,WAAW,EAAE;MACvCJ,MAAM,CACJ,CAA8DK,2DAAAA,EAAAA,MAAM,CAACC,IAAI,CACvEb,QACF,CAAC,CAACc,IAAI,CAAC,IAAI,CAAC,CAAc,WAAA,EAAA,IAAI,CAACR,IAAI,CAACI,MAAM,EAAE,EAE5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CAAC,GAAG,CAAC;AAC1B;AACF;AAACU,oBAAA,CAAAC,QAAA,EAzFoBvB,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-footer/types.js b/packages/components/dist/components/hds/app-footer/types.js new file mode 100644 index 0000000000..19938f1b55 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/types.js @@ -0,0 +1,38 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsAppFooterStatusValues = /*#__PURE__*/function (HdsAppFooterStatusValues) { + HdsAppFooterStatusValues["Operational"] = "operational"; + HdsAppFooterStatusValues["Degraded"] = "degraded"; + HdsAppFooterStatusValues["Maintenance"] = "maintenance"; + HdsAppFooterStatusValues["Outage"] = "outage"; + return HdsAppFooterStatusValues; +}({}); +const HdsAppFooterStatusLinkStatusValues = { + [HdsAppFooterStatusValues.Operational]: { + text: 'System operational', + iconName: 'check-circle' + }, + [HdsAppFooterStatusValues.Degraded]: { + text: 'System degraded', + iconName: 'alert-triangle' + }, + [HdsAppFooterStatusValues.Maintenance]: { + text: 'System maintenance', + iconName: 'alert-triangle' + }, + [HdsAppFooterStatusValues.Outage]: { + text: 'System outage', + iconName: 'x-circle' + } +}; +let HdsAppFooterThemeValues = /*#__PURE__*/function (HdsAppFooterThemeValues) { + HdsAppFooterThemeValues["Light"] = "light"; + HdsAppFooterThemeValues["Dark"] = "dark"; + return HdsAppFooterThemeValues; +}({}); + +export { HdsAppFooterStatusLinkStatusValues, HdsAppFooterStatusValues, HdsAppFooterThemeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/app-footer/types.js.map b/packages/components/dist/components/hds/app-footer/types.js.map new file mode 100644 index 0000000000..bcb0aa7d94 --- /dev/null +++ b/packages/components/dist/components/hds/app-footer/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/app-footer/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\nimport type { HdsIconSignature } from '../icon';\n\nexport enum HdsAppFooterStatusValues {\n Operational = 'operational',\n Degraded = 'degraded',\n Maintenance = 'maintenance',\n Outage = 'outage',\n}\n\nexport type HdsAppFooterStatusTypes = `${HdsAppFooterStatusValues}`;\n\nexport const HdsAppFooterStatusLinkStatusValues: Record<\n HdsAppFooterStatusValues,\n {\n text: string;\n iconName: HdsIconSignature['Args']['name'];\n }\n> = {\n [HdsAppFooterStatusValues.Operational]: {\n text: 'System operational',\n iconName: 'check-circle',\n },\n [HdsAppFooterStatusValues.Degraded]: {\n text: 'System degraded',\n iconName: 'alert-triangle',\n },\n [HdsAppFooterStatusValues.Maintenance]: {\n text: 'System maintenance',\n iconName: 'alert-triangle',\n },\n [HdsAppFooterStatusValues.Outage]: {\n text: 'System outage',\n iconName: 'x-circle',\n },\n};\n\nexport enum HdsAppFooterThemeValues {\n Light = 'light',\n Dark = 'dark',\n}\n\nexport type HdsAppFooterThemeTypes = `${HdsAppFooterThemeValues}`;\n"],"names":["HdsAppFooterStatusValues","HdsAppFooterStatusLinkStatusValues","Operational","text","iconName","Degraded","Maintenance","Outage","HdsAppFooterThemeValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAGYA,IAAAA,wBAAwB,0BAAxBA,wBAAwB,EAAA;EAAxBA,wBAAwB,CAAA,aAAA,CAAA,GAAA,aAAA;EAAxBA,wBAAwB,CAAA,UAAA,CAAA,GAAA,UAAA;EAAxBA,wBAAwB,CAAA,aAAA,CAAA,GAAA,aAAA;EAAxBA,wBAAwB,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAAxBA,wBAAwB;AAAA,CAAA,CAAA,EAAA;AAS7B,MAAMC,kCAMZ,GAAG;EACF,CAACD,wBAAwB,CAACE,WAAW,GAAG;AACtCC,IAAAA,IAAI,EAAE,oBAAoB;AAC1BC,IAAAA,QAAQ,EAAE;GACX;EACD,CAACJ,wBAAwB,CAACK,QAAQ,GAAG;AACnCF,IAAAA,IAAI,EAAE,iBAAiB;AACvBC,IAAAA,QAAQ,EAAE;GACX;EACD,CAACJ,wBAAwB,CAACM,WAAW,GAAG;AACtCH,IAAAA,IAAI,EAAE,oBAAoB;AAC1BC,IAAAA,QAAQ,EAAE;GACX;EACD,CAACJ,wBAAwB,CAACO,MAAM,GAAG;AACjCJ,IAAAA,IAAI,EAAE,eAAe;AACrBC,IAAAA,QAAQ,EAAE;AACZ;AACF;AAEYI,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAvBA,uBAAuB,CAAA,MAAA,CAAA,GAAA,MAAA;AAAA,EAAA,OAAvBA,uBAAuB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/index.js b/packages/components/dist/components/hds/app-frame/index.js new file mode 100644 index 0000000000..39f6beb9bc --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/index.js @@ -0,0 +1,45 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
\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
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAppFrame extends Component { + // Indicates if the "header" container should be displayed + get hasHeader() { + return this.args.hasHeader ?? true; + } + + // Indicates if the "sidebar" container should be displayed + get hasSidebar() { + return this.args.hasSidebar ?? true; + } + + // Indicates if the "footer" container should be displayed + get hasFooter() { + return this.args.hasFooter ?? true; + } + + // Indicates if the "modals" container should be displayed + get hasModals() { + return this.args.hasModals ?? true; + } + + // Get the class names to apply to the component. + get classNames() { + const classes = ['hds-app-frame']; + if (this.hasHeader && this.hasSidebar) { + classes.push('hds-app-frame--has-header-with-sidebar'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsAppFrame); + +export { HdsAppFrame as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-frame/index.js.map b/packages/components/dist/components/hds/app-frame/index.js.map new file mode 100644 index 0000000000..07620757ec --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-frame/index.hbs","../../../../src/components/hds/app-frame/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
\\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
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsAppFrameFooterSignature } from './parts/footer.ts';\nimport type { HdsAppFrameHeaderSignature } from './parts/header.ts';\nimport type { HdsAppFrameMainSignature } from './parts/main.ts';\nimport type { HdsAppFrameModalsSignature } from './parts/modals.ts';\nimport type { HdsAppFrameSidebarSignature } from './parts/sidebar.ts';\nexport interface HdsAppFrameSignature {\n Args: {\n hasFooter?: boolean;\n hasHeader?: boolean;\n hasMain?: boolean;\n hasModals?: boolean;\n hasSidebar?: boolean;\n };\n Blocks: {\n default: [\n {\n Footer?: ComponentLike;\n Header?: ComponentLike;\n Main?: ComponentLike;\n Modals?: ComponentLike;\n Sidebar?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppFrame extends Component {\n // Indicates if the \"header\" container should be displayed\n get hasHeader(): boolean {\n return this.args.hasHeader ?? true;\n }\n\n // Indicates if the \"sidebar\" container should be displayed\n get hasSidebar(): boolean {\n return this.args.hasSidebar ?? true;\n }\n\n // Indicates if the \"footer\" container should be displayed\n get hasFooter(): boolean {\n return this.args.hasFooter ?? true;\n }\n\n // Indicates if the \"modals\" container should be displayed\n get hasModals(): boolean {\n return this.args.hasModals ?? true;\n }\n\n // Get the class names to apply to the component.\n get classNames(): string {\n const classes = ['hds-app-frame'];\n\n if (this.hasHeader && this.hasSidebar) {\n classes.push('hds-app-frame--has-header-with-sidebar');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsAppFrame","Component","hasHeader","args","hasSidebar","hasFooter","hasModals","classNames","classes","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+/BAA+/B;;ACDjiC;AACA;AACA;AACA;;AA+Be,MAAMA,WAAW,SAASC,SAAS,CAAuB;AACvE;EACA,IAAIC,SAASA,GAAY;AACvB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,IAAI;AACpC;;AAEA;EACA,IAAIE,UAAUA,GAAY;AACxB,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,UAAU,IAAI,IAAI;AACrC;;AAEA;EACA,IAAIC,SAASA,GAAY;AACvB,IAAA,OAAO,IAAI,CAACF,IAAI,CAACE,SAAS,IAAI,IAAI;AACpC;;AAEA;EACA,IAAIC,SAASA,GAAY;AACvB,IAAA,OAAO,IAAI,CAACH,IAAI,CAACG,SAAS,IAAI,IAAI;AACpC;;AAEA;EACA,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,eAAe,CAAC;AAEjC,IAAA,IAAI,IAAI,CAACN,SAAS,IAAI,IAAI,CAACE,UAAU,EAAE;AACrCI,MAAAA,OAAO,CAACC,IAAI,CAAC,wCAAwC,CAAC;AACxD;AAEA,IAAA,OAAOD,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA/BoBZ,WAAW,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/parts/footer.js b/packages/components/dist/components/hds/app-frame/parts/footer.js new file mode 100644 index 0000000000..c3bafe4b85 --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/footer.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
\n {{yield}}\n
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFrameFooter = TemplateOnlyComponent(); +var footer = setComponentTemplate(TEMPLATE, HdsAppFrameFooter); + +export { footer as default }; +//# sourceMappingURL=footer.js.map diff --git a/packages/components/dist/components/hds/app-frame/parts/footer.js.map b/packages/components/dist/components/hds/app-frame/parts/footer.js.map new file mode 100644 index 0000000000..82a85812d9 --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.js","sources":["../../../../../src/components/hds/app-frame/parts/footer.hbs","../../../../../src/components/hds/app-frame/parts/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
\\n {{yield}}\\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFrameFooterSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst HdsAppFrameFooter = TemplateOnlyComponent();\n\nexport default HdsAppFrameFooter;\n"],"names":["HdsAppFrameFooter","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8JAA8J;;ACDhM;AACA;AACA;AACA;;AAWA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/parts/header.js b/packages/components/dist/components/hds/app-frame/parts/header.js new file mode 100644 index 0000000000..e7dc3ae84c --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/header.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
\n {{yield}}\n
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFrameHeader = TemplateOnlyComponent(); +var header = setComponentTemplate(TEMPLATE, HdsAppFrameHeader); + +export { header as default }; +//# sourceMappingURL=header.js.map diff --git a/packages/components/dist/components/hds/app-frame/parts/header.js.map b/packages/components/dist/components/hds/app-frame/parts/header.js.map new file mode 100644 index 0000000000..dfd16af2d9 --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sources":["../../../../../src/components/hds/app-frame/parts/header.hbs","../../../../../src/components/hds/app-frame/parts/header.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
\\n {{yield}}\\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFrameHeaderSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst HdsAppFrameHeader = TemplateOnlyComponent();\n\nexport default HdsAppFrameHeader;\n"],"names":["HdsAppFrameHeader","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8JAA8J;;ACDhM;AACA;AACA;AACA;;AAWA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/parts/main.js b/packages/components/dist/components/hds/app-frame/parts/main.js new file mode 100644 index 0000000000..99eeecfe7d --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/main.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
\n {{yield}}\n
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFrameMain = TemplateOnlyComponent(); +var main = setComponentTemplate(TEMPLATE, HdsAppFrameMain); + +export { main as default }; +//# sourceMappingURL=main.js.map diff --git a/packages/components/dist/components/hds/app-frame/parts/main.js.map b/packages/components/dist/components/hds/app-frame/parts/main.js.map new file mode 100644 index 0000000000..68dfe525fe --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/main.js.map @@ -0,0 +1 @@ +{"version":3,"file":"main.js","sources":["../../../../../src/components/hds/app-frame/parts/main.hbs","../../../../../src/components/hds/app-frame/parts/main.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
\\n {{yield}}\\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFrameMainSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst HdsAppFrameMain = TemplateOnlyComponent();\n\nexport default HdsAppFrameMain;\n"],"names":["HdsAppFrameMain","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wKAAwK;;ACD1M;AACA;AACA;AACA;;AAWA,MAAMA,eAAe,GAAGC,qBAAqB,EAA4B;AAEzE,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,eAAe,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/parts/modals.js b/packages/components/dist/components/hds/app-frame/parts/modals.js new file mode 100644 index 0000000000..cc479638ca --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/modals.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! we use `:empty` in CSS so we have to avoid whitespaces }}\n
{{~yield~}}
"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFrameModals = TemplateOnlyComponent(); +var modals = setComponentTemplate(TEMPLATE, HdsAppFrameModals); + +export { modals as default }; +//# sourceMappingURL=modals.js.map diff --git a/packages/components/dist/components/hds/app-frame/parts/modals.js.map b/packages/components/dist/components/hds/app-frame/parts/modals.js.map new file mode 100644 index 0000000000..13be4f55ec --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/modals.js.map @@ -0,0 +1 @@ +{"version":3,"file":"modals.js","sources":["../../../../../src/components/hds/app-frame/parts/modals.hbs","../../../../../src/components/hds/app-frame/parts/modals.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! we use `:empty` in CSS so we have to avoid whitespaces }}\\n
{{~yield~}}
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFrameModalsSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst HdsAppFrameModals = TemplateOnlyComponent();\n\nexport default HdsAppFrameModals;\n"],"names":["HdsAppFrameModals","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mNAAmN;;ACDrP;AACA;AACA;AACA;;AAWA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-frame/parts/sidebar.js b/packages/components/dist/components/hds/app-frame/parts/sidebar.js new file mode 100644 index 0000000000..fb0e70cbef --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/sidebar.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppFrameSidebar = TemplateOnlyComponent(); +var sidebar = setComponentTemplate(TEMPLATE, HdsAppFrameSidebar); + +export { sidebar as default }; +//# sourceMappingURL=sidebar.js.map diff --git a/packages/components/dist/components/hds/app-frame/parts/sidebar.js.map b/packages/components/dist/components/hds/app-frame/parts/sidebar.js.map new file mode 100644 index 0000000000..eceecc967e --- /dev/null +++ b/packages/components/dist/components/hds/app-frame/parts/sidebar.js.map @@ -0,0 +1 @@ +{"version":3,"file":"sidebar.js","sources":["../../../../../src/components/hds/app-frame/parts/sidebar.hbs","../../../../../src/components/hds/app-frame/parts/sidebar.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppFrameSidebarSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst HdsAppFrameSidebar = TemplateOnlyComponent();\n\nexport default HdsAppFrameSidebar;\n"],"names":["HdsAppFrameSidebar","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6JAA6J;;ACD/L;AACA;AACA;AACA;;AAWA,MAAMA,kBAAkB,GAAGC,qBAAqB,EAA+B;AAE/E,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,kBAAkB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-header/home-link.js b/packages/components/dist/components/hds/app-header/home-link.js new file mode 100644 index 0000000000..ce0a583321 --- /dev/null +++ b/packages/components/dist/components/hds/app-header/home-link.js @@ -0,0 +1,25 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsAppHeaderHomeLink extends Component { + get ariaLabel() { + const { + ariaLabel + } = this.args; + assert('@ariaLabel for "Hds::AppHeader::HomeLink" ("Logo") must have a valid value', ariaLabel !== undefined); + return ariaLabel; + } +} +setComponentTemplate(TEMPLATE, HdsAppHeaderHomeLink); + +export { HdsAppHeaderHomeLink as default }; +//# sourceMappingURL=home-link.js.map diff --git a/packages/components/dist/components/hds/app-header/home-link.js.map b/packages/components/dist/components/hds/app-header/home-link.js.map new file mode 100644 index 0000000000..9c21970fcc --- /dev/null +++ b/packages/components/dist/components/hds/app-header/home-link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"home-link.js","sources":["../../../../src/components/hds/app-header/home-link.hbs","../../../../src/components/hds/app-header/home-link.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport type { HdsIconSignature } from '../icon';\nimport type { HdsInteractiveSignature } from '../interactive/';\n\nexport interface HdsAppHeaderHomeLinkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n icon: HdsIconSignature['Args']['name'];\n color?: string;\n ariaLabel: string;\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nexport default class HdsAppHeaderHomeLink extends Component {\n get ariaLabel(): string {\n const { ariaLabel } = this.args;\n\n assert(\n '@ariaLabel for \"Hds::AppHeader::HomeLink\" (\"Logo\") must have a valid value',\n ariaLabel !== undefined\n );\n\n return ariaLabel;\n }\n}\n"],"names":["HdsAppHeaderHomeLink","Component","ariaLabel","args","assert","undefined","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,uiBAAuiB;;ACDzkB;AACA;AACA;AACA;;AAiBe,MAAMA,oBAAoB,SAASC,SAAS,CAAgC;EACzF,IAAIC,SAASA,GAAW;IACtB,MAAM;AAAEA,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;AAE/BC,IAAAA,MAAM,CACJ,4EAA4E,EAC5EF,SAAS,KAAKG,SAChB,CAAC;AAED,IAAA,OAAOH,SAAS;AAClB;AACF;AAACI,oBAAA,CAAAC,QAAA,EAXoBP,oBAAoB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-header/index.js b/packages/components/dist/components/hds/app-header/index.js new file mode 100644 index 0000000000..9060c90e1b --- /dev/null +++ b/packages/components/dist/components/hds/app-header/index.js @@ -0,0 +1,112 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty, a as _defineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { guidFor } from '@ember/object/internals'; +import { tracked } from '@glimmer/tracking'; +import { registerDestructor } from '@ember/destroyable'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n {{#if (and this.hasA11yRefocus (not this._isOpen))}}\n {{! @glint-expect-error - `ember-a11y-refocus` doesn\'t expose types yet }}\n \n {{/if}}\n\n {{yield to=\"logo\"}}\n\n {{#if (not this._isDesktop)}}\n \n {{/if}}\n\n
\n
\n {{yield to=\"globalActions\"}}\n
\n\n
\n {{yield to=\"utilityActions\"}}\n
\n
\n"); + +var _class, _descriptor, _descriptor2, _descriptor3; +let HdsAppHeader = (_class = class HdsAppHeader extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "_isOpen", _descriptor, this); + _initializerDefineProperty(this, "_isDesktop", _descriptor2, this); + _initializerDefineProperty(this, "_hasOverflowContent", _descriptor3, this); + _defineProperty(this, "_desktopMQ", void 0); + _defineProperty(this, "hasA11yRefocus", this.args.hasA11yRefocus ?? true); + _defineProperty(this, "a11yRefocusSkipTo", '#' + (this.args.a11yRefocusSkipTo ?? 'hds-main')); + // Generates a unique ID for the Menu Content + _defineProperty(this, "_menuContentId", 'hds-menu-content-' + guidFor(this)); + _defineProperty(this, "_breakpoint", parseInt(getComputedStyle(document.documentElement).getPropertyValue('--hds-app-desktop-breakpoint'))); + _defineProperty(this, "_desktopMQVal", this.args.breakpoint ?? getComputedStyle(document.documentElement).getPropertyValue('--hds-app-desktop-breakpoint')); + this._desktopMQ = window.matchMedia(`(min-width: ${this._desktopMQVal})`); + this.addEventListeners(); + registerDestructor(this, () => { + this.removeEventListeners(); + }); + } + addEventListeners() { + document.addEventListener('keydown', this.escapePress, true); + this._desktopMQ.addEventListener('change', this.updateDesktopVariable, true); + + // set initial state based on viewport using a "synthetic" event + const syntheticEvent = new MediaQueryListEvent('change', { + matches: this._desktopMQ.matches, + media: this._desktopMQ.media + }); + this.updateDesktopVariable(syntheticEvent); + } + removeEventListeners() { + document.removeEventListener('keydown', this.escapePress, true); + this._desktopMQ.removeEventListener('change', this.updateDesktopVariable, true); + } + + // In mobile view when the menu is open, trap focus within the AppHeader + get shouldTrapFocus() { + return !this._isDesktop && this._isOpen; + } + + // Get the class names to apply to the component. + get classNames() { + const classes = ['hds-app-header']; + if (this._isDesktop) { + classes.push('hds-app-header--is-desktop'); + } else { + classes.push('hds-app-header--is-mobile'); + + // open and closed menu states are only relevant on mobile + if (this._isOpen) { + classes.push('hds-app-header--menu-is-open'); + } else { + classes.push('hds-app-header--menu-is-closed'); + } + } + return classes.join(' '); + } + escapePress(event) { + if (event.key === 'Escape' && this._isOpen && !this._isDesktop) { + this._isOpen = false; + } + } + onClickToggle() { + this._isOpen = !this._isOpen; + } + updateDesktopVariable(event) { + this._isDesktop = event.matches; + + // Close the menu when switching to desktop view + // (prevents menu from being open when resizing which causes Skip button to not render) + if (this._isDesktop) { + this._isOpen = false; + } + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_isOpen", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_isDesktop", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return true; + } +}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "_hasOverflowContent", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _applyDecoratedDescriptor(_class.prototype, "escapePress", [action], Object.getOwnPropertyDescriptor(_class.prototype, "escapePress"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onClickToggle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickToggle"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "updateDesktopVariable", [action], Object.getOwnPropertyDescriptor(_class.prototype, "updateDesktopVariable"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppHeader); + +export { HdsAppHeader as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-header/index.js.map b/packages/components/dist/components/hds/app-header/index.js.map new file mode 100644 index 0000000000..cb135554d8 --- /dev/null +++ b/packages/components/dist/components/hds/app-header/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-header/index.hbs","../../../../src/components/hds/app-header/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n {{#if (and this.hasA11yRefocus (not this._isOpen))}}\\n {{! @glint-expect-error - `ember-a11y-refocus` doesn\\'t expose types yet }}\\n \\n {{/if}}\\n\\n {{yield to=\\\"logo\\\"}}\\n\\n {{#if (not this._isDesktop)}}\\n \\n {{/if}}\\n\\n
\\n
\\n {{yield to=\\\"globalActions\\\"}}\\n
\\n\\n
\\n {{yield to=\\\"utilityActions\\\"}}\\n
\\n
\\n\")","/**\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 { guidFor } from '@ember/object/internals';\nimport { tracked } from '@glimmer/tracking';\nimport { registerDestructor } from '@ember/destroyable';\n\nexport interface HdsAppHeaderSignature {\n Args: {\n breakpoint?: string;\n hasA11yRefocus?: boolean;\n a11yRefocusSkipTo?: string;\n a11yRefocusSkipText?: string;\n a11yRefocusNavigationText?: string;\n a11yRefocusRouteChangeValidator?: string;\n a11yRefocusExcludeAllQueryParams?: boolean;\n };\n Blocks: {\n logo?: [];\n globalActions?: [];\n utilityActions?: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppHeader extends Component {\n @tracked private _isOpen = false;\n @tracked private _isDesktop = true;\n @tracked private _hasOverflowContent = false;\n private _desktopMQ: MediaQueryList;\n hasA11yRefocus = this.args.hasA11yRefocus ?? true;\n a11yRefocusSkipTo = '#' + (this.args.a11yRefocusSkipTo ?? 'hds-main');\n\n // Generates a unique ID for the Menu Content\n private _menuContentId = 'hds-menu-content-' + guidFor(this);\n\n private _breakpoint = parseInt(\n getComputedStyle(document.documentElement).getPropertyValue(\n '--hds-app-desktop-breakpoint'\n )\n );\n\n private _desktopMQVal =\n this.args.breakpoint ??\n getComputedStyle(document.documentElement).getPropertyValue(\n '--hds-app-desktop-breakpoint'\n );\n\n constructor(owner: unknown, args: Record) {\n super(owner, args);\n this._desktopMQ = window.matchMedia(`(min-width: ${this._desktopMQVal})`);\n this.addEventListeners();\n registerDestructor(this, (): void => {\n this.removeEventListeners();\n });\n }\n\n addEventListeners(): void {\n document.addEventListener('keydown', this.escapePress, true);\n this._desktopMQ.addEventListener(\n 'change',\n this.updateDesktopVariable,\n true\n );\n\n // set initial state based on viewport using a \"synthetic\" event\n const syntheticEvent = new MediaQueryListEvent('change', {\n matches: this._desktopMQ.matches,\n media: this._desktopMQ.media,\n });\n this.updateDesktopVariable(syntheticEvent);\n }\n\n removeEventListeners(): void {\n document.removeEventListener('keydown', this.escapePress, true);\n this._desktopMQ.removeEventListener(\n 'change',\n this.updateDesktopVariable,\n true\n );\n }\n\n // In mobile view when the menu is open, trap focus within the AppHeader\n get shouldTrapFocus(): boolean {\n return !this._isDesktop && this._isOpen;\n }\n\n // Get the class names to apply to the component.\n get classNames(): string {\n const classes = ['hds-app-header'];\n\n if (this._isDesktop) {\n classes.push('hds-app-header--is-desktop');\n } else {\n classes.push('hds-app-header--is-mobile');\n\n // open and closed menu states are only relevant on mobile\n if (this._isOpen) {\n classes.push('hds-app-header--menu-is-open');\n } else {\n classes.push('hds-app-header--menu-is-closed');\n }\n }\n\n return classes.join(' ');\n }\n\n @action\n escapePress(event: KeyboardEvent): void {\n if (event.key === 'Escape' && this._isOpen && !this._isDesktop) {\n this._isOpen = false;\n }\n }\n\n @action\n onClickToggle(): void {\n this._isOpen = !this._isOpen;\n }\n\n @action\n updateDesktopVariable(event: MediaQueryListEvent): void {\n this._isDesktop = event.matches;\n\n // Close the menu when switching to desktop view\n // (prevents menu from being open when resizing which causes Skip button to not render)\n if (this._isDesktop) {\n this._isOpen = false;\n }\n }\n}\n"],"names":["HdsAppHeader","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_defineProperty","hasA11yRefocus","a11yRefocusSkipTo","guidFor","parseInt","getComputedStyle","document","documentElement","getPropertyValue","breakpoint","_desktopMQ","window","matchMedia","_desktopMQVal","addEventListeners","registerDestructor","removeEventListeners","addEventListener","escapePress","updateDesktopVariable","syntheticEvent","MediaQueryListEvent","matches","media","removeEventListener","shouldTrapFocus","_isDesktop","_isOpen","classNames","classes","push","join","event","key","onClickToggle","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,+uCAA+uC;;;AC4B5vCA,IAAAA,YAAY,IAAAC,MAAA,GAAlB,MAAMD,YAAY,SAASE,SAAS,CAAwB;AAuBzEC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAA2B,EAAE;AACvD,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAACC,IAAAA,0BAAA,kBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,qBAAAE,YAAA,EAAA,IAAA,CAAA;AAAAF,IAAAA,0BAAA,8BAAAG,YAAA,EAAA,IAAA,CAAA;IAAAC,eAAA,CAAA,IAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA;AAAAA,IAAAA,eAAA,yBAnBJ,IAAI,CAACL,IAAI,CAACM,cAAc,IAAI,IAAI,CA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A,CAKNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAArD,MAAA,CAAA6C,SAAA,EAAA,uBAAA,CAAA,EAAA7C,MAAA,CAAA6C,SAAA,CAAA,EAAA7C,MAAA;AA9FwBsD,oBAAA,CAAAC,QAAA,EAAZxD,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-header/menu-button.js b/packages/components/dist/components/hds/app-header/menu-button.js new file mode 100644 index 0000000000..53859189e1 --- /dev/null +++ b/packages/components/dist/components/hds/app-header/menu-button.js @@ -0,0 +1,26 @@ +import { _ as _applyDecoratedDescriptor } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n"); + +var _class; +let HdsAppHeaderMenuButton = (_class = class HdsAppHeaderMenuButton extends Component { + get icon() { + return this.args.isOpen ? 'x' : 'menu'; + } + onClick() { + const { + onClickToggle + } = this.args; + if (typeof onClickToggle === 'function') { + onClickToggle(); + } + } +}, _applyDecoratedDescriptor(_class.prototype, "onClick", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClick"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppHeaderMenuButton); + +export { HdsAppHeaderMenuButton as default }; +//# sourceMappingURL=menu-button.js.map diff --git a/packages/components/dist/components/hds/app-header/menu-button.js.map b/packages/components/dist/components/hds/app-header/menu-button.js.map new file mode 100644 index 0000000000..a6b75c60ec --- /dev/null +++ b/packages/components/dist/components/hds/app-header/menu-button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"menu-button.js","sources":["../../../../src/components/hds/app-header/menu-button.hbs","../../../../src/components/hds/app-header/menu-button.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\n\nimport type { HdsButtonSignature } from '../button/';\n\nexport interface HdsAppHeaderMenuButtonSignature {\n Args: {\n isOpen?: boolean;\n menuContentId: string;\n onClickToggle?: () => void;\n };\n Element: HdsButtonSignature['Element'];\n}\n\nexport default class HdsAppHeaderMenuButton extends Component {\n get icon(): 'x' | 'menu' {\n return this.args.isOpen ? 'x' : 'menu';\n }\n\n @action\n onClick(): void {\n const { onClickToggle } = this.args;\n\n if (typeof onClickToggle === 'function') {\n onClickToggle();\n }\n }\n}\n"],"names":["HdsAppHeaderMenuButton","_class","Component","icon","args","isOpen","onClick","onClickToggle","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,2VAA2V;;;ACkBxWA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,CAAkC;EAC7F,IAAIC,IAAIA,GAAiB;IACvB,OAAO,IAAI,CAACC,IAAI,CAACC,MAAM,GAAG,GAAG,GAAG,MAAM;AACxC;AAGAC,EAAAA,OAAOA,GAAS;IACd,MAAM;AAAEC,MAAAA;KAAe,GAAG,IAAI,CAACH,IAAI;AAEnC,IAAA,IAAI,OAAOG,aAAa,KAAK,UAAU,EAAE;AACvCA,MAAAA,aAAa,EAAE;AACjB;AACF;AACF,CAAC,EAAAC,yBAAA,CAAAP,MAAA,CAAAQ,SAAA,EAAA,SAAA,EAAA,CAREC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAX,MAAA,CAAAQ,SAAA,cAAAR,MAAA,CAAAQ,SAAA,CAAA,EAAAR,MAAA;AALkCY,oBAAA,CAAAC,QAAA,EAAtBd,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/index.js b/packages/components/dist/components/hds/app-side-nav/index.js new file mode 100644 index 0000000000..334e0a47eb --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/index.js @@ -0,0 +1,187 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty, a as _defineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { registerDestructor } from '@ember/destroyable'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! IMPORTANT: we need to add \"squishies\" here (~) because otherwise the whitespace added by Ember causes the empty element to still have visible padding - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\n\n

Application local navigation

\n\n
\n {{#if this.showToggleButton}}\n {{! template-lint-disable no-invalid-interactive}}\n
\n {{! template-lint-enable no-invalid-interactive}}\n \n {{/if}}\n\n
\n {{~yield~}}\n
\n
\n
"); + +var _class, _descriptor, _descriptor2, _descriptor3; +let HdsAppSideNav = (_class = class HdsAppSideNav extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "_isMinimized", _descriptor, this); + _initializerDefineProperty(this, "_isAnimating", _descriptor2, this); + _initializerDefineProperty(this, "_isDesktop", _descriptor3, this); + _defineProperty(this, "_body", void 0); + _defineProperty(this, "_bodyInitialOverflowValue", ''); + _defineProperty(this, "_desktopMQ", void 0); + _defineProperty(this, "_containersToHide", void 0); + _defineProperty(this, "_desktopMQVal", getComputedStyle(document.documentElement).getPropertyValue('--hds-app-desktop-breakpoint')); + this._isMinimized = this.args.isMinimized ?? false; // sets the default state on 'desktop' viewports + this._desktopMQ = window.matchMedia(`(min-width:${this._desktopMQVal})`); + this.addEventListeners(); + registerDestructor(this, () => { + this.removeEventListeners(); + }); + } + addEventListeners() { + document.addEventListener('keydown', this.escapePress, true); + this._desktopMQ.addEventListener('change', this.updateDesktopVariable, true); + // if not instantiated as minimized via arguments + if (!this.args.isMinimized) { + // set initial state based on viewport using a "synthetic" event + const syntheticEvent = new MediaQueryListEvent('change', { + matches: this._desktopMQ.matches, + media: this._desktopMQ.media + }); + this.updateDesktopVariable(syntheticEvent); + } + } + removeEventListeners() { + document.removeEventListener('keydown', this.escapePress, true); + this._desktopMQ.removeEventListener('change', this.updateDesktopVariable, true); + } + + // controls if the component reacts to viewport changes + get isResponsive() { + return this.args.isResponsive ?? true; + } + + // controls if users can collapse the appsidenav on 'desktop' viewports + get isCollapsible() { + return this.args.isCollapsible ?? false; + } + get shouldTrapFocus() { + return this.isResponsive && !this._isDesktop && !this._isMinimized; + } + get showToggleButton() { + return this.isResponsive && !this._isDesktop || this.isCollapsible; + } + get classNames() { + const classes = [`hds-app-side-nav`]; + + // add specific class names for the different possible states + if (this.isResponsive) { + classes.push('hds-app-side-nav--is-responsive'); + } + if (!this._isDesktop && this.isResponsive) { + classes.push('hds-app-side-nav--is-mobile'); + } else { + classes.push('hds-app-side-nav--is-desktop'); + } + if (this._isMinimized && this.isResponsive) { + classes.push('hds-app-side-nav--is-minimized'); + } else { + classes.push('hds-app-side-nav--is-not-minimized'); + } + if (this._isAnimating) { + classes.push('hds-app-side-nav--is-animating'); + } + return classes.join(' '); + } + synchronizeInert() { + this._containersToHide?.forEach(element => { + if (this._isMinimized) { + element.setAttribute('inert', ''); + } else { + element.removeAttribute('inert'); + } + }); + } + lockBodyScroll() { + if (this._body) { + // Prevent page from scrolling when the dialog is open + this._body.style.setProperty('overflow', 'hidden'); + } + } + unlockBodyScroll() { + // Reset page `overflow` property + if (this._body) { + this._body.style.removeProperty('overflow'); + if (this._bodyInitialOverflowValue === '') { + if (this._body.style.length === 0) { + this._body.removeAttribute('style'); + } + } else { + this._body.style.setProperty('overflow', this._bodyInitialOverflowValue); + } + } + } + escapePress(event) { + if (event.key === 'Escape' && !this._isMinimized && !this._isDesktop) { + this._isMinimized = true; + this.synchronizeInert(); + } + } + toggleMinimizedStatus() { + this._isMinimized = !this._isMinimized; + this.synchronizeInert(); + const { + onToggleMinimizedStatus + } = this.args; + if (typeof onToggleMinimizedStatus === 'function') { + onToggleMinimizedStatus(this._isMinimized); + } + if (this._isMinimized) { + this.unlockBodyScroll(); + } else { + this.lockBodyScroll(); + } + } + didInsert(element) { + this._containersToHide = element.querySelectorAll('.hds-app-side-nav-hide-when-minimized'); + this._body = document.body; + // Store the initial `overflow` value of `` so we can reset to it + this._bodyInitialOverflowValue = this._body.style.getPropertyValue('overflow'); + } + setTransition(phase, event) { + // we only want to respond to `width` animation/transitions + if (event.propertyName !== 'width') { + return; + } + if (phase === 'start') { + this._isAnimating = true; + } else { + this._isAnimating = false; + } + } + updateDesktopVariable(event) { + this._isDesktop = event.matches; + + // automatically minimize on narrow viewports (when not in desktop mode) + this._isMinimized = !this._isDesktop; + this.synchronizeInert(); + const { + onDesktopViewportChange + } = this.args; + if (typeof onDesktopViewportChange === 'function') { + onDesktopViewportChange(this._isDesktop); + } + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_isMinimized", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_isAnimating", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "_isDesktop", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return true; + } +}), _applyDecoratedDescriptor(_class.prototype, "escapePress", [action], Object.getOwnPropertyDescriptor(_class.prototype, "escapePress"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "toggleMinimizedStatus", [action], Object.getOwnPropertyDescriptor(_class.prototype, "toggleMinimizedStatus"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didInsert", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsert"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "setTransition", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setTransition"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "updateDesktopVariable", [action], Object.getOwnPropertyDescriptor(_class.prototype, "updateDesktopVariable"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppSideNav); + +export { HdsAppSideNav as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/index.js.map b/packages/components/dist/components/hds/app-side-nav/index.js.map new file mode 100644 index 0000000000..99ef729ddc --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/app-side-nav/index.hbs","../../../../src/components/hds/app-side-nav/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! IMPORTANT: we need to add \\\"squishies\\\" here (~) because otherwise the whitespace added by Ember causes the empty element to still have visible padding - See https://handlebarsjs.com/guide/expressions.html#whitespace-control }}\\n\\n

Application local navigation

\\n\\n
\\n {{#if this.showToggleButton}}\\n {{! template-lint-disable no-invalid-interactive}}\\n
\\n {{! template-lint-enable no-invalid-interactive}}\\n \\n {{/if}}\\n\\n
\\n {{~yield~}}\\n
\\n
\\n
\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { registerDestructor } from '@ember/destroyable';\n\nexport interface HdsAppSideNavSignature {\n Args: {\n isResponsive?: boolean;\n isCollapsible?: boolean;\n isMinimized?: boolean;\n onToggleMinimizedStatus?: (arg: boolean) => void;\n onDesktopViewportChange?: (arg: boolean) => void;\n };\n Blocks: {\n default?: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppSideNav extends Component {\n @tracked private _isMinimized;\n @tracked private _isAnimating = false;\n @tracked private _isDesktop = true;\n\n private _body!: HTMLElement;\n private _bodyInitialOverflowValue = '';\n private _desktopMQ: MediaQueryList;\n private _containersToHide!: NodeListOf;\n\n private _desktopMQVal = getComputedStyle(\n document.documentElement\n ).getPropertyValue('--hds-app-desktop-breakpoint');\n\n constructor(owner: unknown, args: HdsAppSideNavSignature['Args']) {\n super(owner, args);\n this._isMinimized = this.args.isMinimized ?? false; // sets the default state on 'desktop' viewports\n this._desktopMQ = window.matchMedia(`(min-width:${this._desktopMQVal})`);\n this.addEventListeners();\n registerDestructor(this, (): void => {\n this.removeEventListeners();\n });\n }\n\n addEventListeners(): void {\n document.addEventListener('keydown', this.escapePress, true);\n this._desktopMQ.addEventListener(\n 'change',\n this.updateDesktopVariable,\n true\n );\n // if not instantiated as minimized via arguments\n if (!this.args.isMinimized) {\n // set initial state based on viewport using a \"synthetic\" event\n const syntheticEvent = new MediaQueryListEvent('change', {\n matches: this._desktopMQ.matches,\n media: this._desktopMQ.media,\n });\n this.updateDesktopVariable(syntheticEvent);\n }\n }\n\n removeEventListeners(): void {\n document.removeEventListener('keydown', this.escapePress, true);\n this._desktopMQ.removeEventListener(\n 'change',\n this.updateDesktopVariable,\n true\n );\n }\n\n // controls if the component reacts to viewport changes\n get isResponsive(): boolean {\n return this.args.isResponsive ?? true;\n }\n\n // controls if users can collapse the appsidenav on 'desktop' viewports\n get isCollapsible(): boolean {\n return this.args.isCollapsible ?? false;\n }\n\n get shouldTrapFocus(): boolean {\n return this.isResponsive && !this._isDesktop && !this._isMinimized;\n }\n\n get showToggleButton(): boolean {\n return (this.isResponsive && !this._isDesktop) || this.isCollapsible;\n }\n\n get classNames(): string {\n const classes = [`hds-app-side-nav`];\n\n // add specific class names for the different possible states\n if (this.isResponsive) {\n classes.push('hds-app-side-nav--is-responsive');\n }\n if (!this._isDesktop && this.isResponsive) {\n classes.push('hds-app-side-nav--is-mobile');\n } else {\n classes.push('hds-app-side-nav--is-desktop');\n }\n if (this._isMinimized && this.isResponsive) {\n classes.push('hds-app-side-nav--is-minimized');\n } else {\n classes.push('hds-app-side-nav--is-not-minimized');\n }\n if (this._isAnimating) {\n classes.push('hds-app-side-nav--is-animating');\n }\n\n return classes.join(' ');\n }\n\n synchronizeInert(): void {\n this._containersToHide?.forEach((element): void => {\n if (this._isMinimized) {\n element.setAttribute('inert', '');\n } else {\n element.removeAttribute('inert');\n }\n });\n }\n\n lockBodyScroll(): void {\n if (this._body) {\n // Prevent page from scrolling when the dialog is open\n this._body.style.setProperty('overflow', 'hidden');\n }\n }\n\n unlockBodyScroll(): void {\n // Reset page `overflow` property\n if (this._body) {\n this._body.style.removeProperty('overflow');\n if (this._bodyInitialOverflowValue === '') {\n if (this._body.style.length === 0) {\n this._body.removeAttribute('style');\n }\n } else {\n this._body.style.setProperty(\n 'overflow',\n this._bodyInitialOverflowValue\n );\n }\n }\n }\n\n @action\n escapePress(event: KeyboardEvent): void {\n if (event.key === 'Escape' && !this._isMinimized && !this._isDesktop) {\n this._isMinimized = true;\n this.synchronizeInert();\n }\n }\n\n @action\n toggleMinimizedStatus(): void {\n this._isMinimized = !this._isMinimized;\n this.synchronizeInert();\n\n const { onToggleMinimizedStatus } = this.args;\n\n if (typeof onToggleMinimizedStatus === 'function') {\n onToggleMinimizedStatus(this._isMinimized);\n }\n\n if (this._isMinimized) {\n this.unlockBodyScroll();\n } else {\n this.lockBodyScroll();\n }\n }\n\n @action\n didInsert(element: HTMLElement): void {\n this._containersToHide = element.querySelectorAll(\n '.hds-app-side-nav-hide-when-minimized'\n );\n this._body = document.body;\n // Store the initial `overflow` value of `` so we can reset to it\n this._bodyInitialOverflowValue =\n this._body.style.getPropertyValue('overflow');\n }\n\n @action\n setTransition(phase: string, event: TransitionEvent): void {\n // we only want to respond to `width` animation/transitions\n if (event.propertyName !== 'width') {\n return;\n }\n if (phase === 'start') {\n this._isAnimating = true;\n } else {\n this._isAnimating = false;\n }\n }\n\n @action\n updateDesktopVariable(event: MediaQueryListEvent): void {\n this._isDesktop = event.matches;\n\n // automatically minimize on narrow viewports (when not in desktop mode)\n this._isMinimized = !this._isDesktop;\n\n this.synchronizeInert();\n\n const { onDesktopViewportChange } = this.args;\n\n if (typeof onDesktopViewportChange === 'function') {\n onDesktopViewportChange(this._isDesktop);\n }\n }\n}\n"],"names":["HdsAppSideNav","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_defineProperty","getComputedStyle","document","documentElement","getPropertyValue","_isMinimized","isMinimized","_desktopMQ","window","matchMedia","_desktopMQVal","addEventListeners","registerDestructor","removeEventListeners","addEventListener","escapePress","updateDesktopVariable","syntheticEvent","MediaQueryListEvent","matches","media","removeEventListener","isResponsive","isCollapsible","shouldTrapFocus","_isDesktop","showToggleButton","classNames","classes","push","_isAnimating","join","synchronizeInert","_containersToHide","forEach","element","setAttribute","removeAttribute","lockBodyScroll","_body","style","setProperty","unlockBodyScroll","removeProperty","_bodyInitialOverflowValue","length","event","key","toggleMinimizedStatus","onToggleMinimizedStatus","didInsert","querySelectorAll","body","setTransition","phase","propertyName","onDesktopViewportChange","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,m7CAAm7C;;;ACuBh8CA,IAAAA,aAAa,IAAAC,MAAA,GAAnB,MAAMD,aAAa,SAASE,SAAS,CAAyB;AAc3EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAoC,EAAE;AAChE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAACC,IAAAA,0BAAA,uBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,uBAAAE,YAAA,EAAA,IAAA,CAAA;AAAAF,IAAAA,0BAAA,qBAA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EAQNM,uBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAA3E,MAAA,CAAAmE,SAAA,EAAAnE,uBAAAA,CAAAA,EAAAA,MAAA,CAAAmE,SAAA,CAAA,EAAAD,yBAAA,CAAAlE,MAAA,CAAAmE,SAAA,EAAA,WAAA,EAAA,CAkBNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAA3E,MAAA,CAAAmE,SAAA,EAAA,WAAA,CAAA,EAAAnE,MAAA,CAAAmE,SAAA,CAAAD,EAAAA,yBAAA,CAAAlE,MAAA,CAAAmE,SAAA,EAAA,eAAA,EAAA,CAWNM,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA3E,MAAA,CAAAmE,SAAA,EAAA,eAAA,CAAA,EAAAnE,MAAA,CAAAmE,SAAA,GAAAD,yBAAA,CAAAlE,MAAA,CAAAmE,SAAA,EAaNM,uBAAAA,EAAAA,CAAAA,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA3E,MAAA,CAAAmE,SAAA,4BAAAnE,MAAA,CAAAmE,SAAA,CAAA,EAAAnE,MAAA;AAjLyB4E,oBAAA,CAAAC,QAAA,EAAb9E,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/list/back-link.js b/packages/components/dist/components/hds/app-side-nav/list/back-link.js new file mode 100644 index 0000000000..7498ae8998 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/back-link.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n \n \n \n {{@text}}\n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppSideNavListBackLink = TemplateOnlyComponent(); +var backLink = setComponentTemplate(TEMPLATE, HdsAppSideNavListBackLink); + +export { backLink as default }; +//# sourceMappingURL=back-link.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/list/back-link.js.map b/packages/components/dist/components/hds/app-side-nav/list/back-link.js.map new file mode 100644 index 0000000000..111b7310c1 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/back-link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"back-link.js","sources":["../../../../../src/components/hds/app-side-nav/list/back-link.hbs","../../../../../src/components/hds/app-side-nav/list/back-link.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n \\n \\n \\n {{@text}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsInteractiveSignature } from '../../interactive';\n\nexport interface HdsAppSideNavListBackLinkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n text: string;\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nconst HdsAppSideNavListBackLink =\n TemplateOnlyComponent();\n\nexport default HdsAppSideNavListBackLink;\n"],"names":["HdsAppSideNavListBackLink","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4yBAA4yB;;ACD90B;AACA;AACA;AACA;;AAaA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAAsC;AAE7D,eAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/list/index.js b/packages/components/dist/components/hds/app-side-nav/list/index.js new file mode 100644 index 0000000000..1ec1864991 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/index.js @@ -0,0 +1,33 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n"); + +var _class, _descriptor; +let HdsAppSideNavList = (_class = class HdsAppSideNavList extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "_titleIds", _descriptor, this); + } + get titleIds() { + return this._titleIds.join(' '); + } + didInsertTitle(titleId) { + this._titleIds = [...this._titleIds, titleId]; + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_titleIds", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return []; + } +}), _applyDecoratedDescriptor(_class.prototype, "didInsertTitle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsertTitle"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppSideNavList); + +export { HdsAppSideNavList as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/list/index.js.map b/packages/components/dist/components/hds/app-side-nav/list/index.js.map new file mode 100644 index 0000000000..c6ba54b6bd --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/app-side-nav/list/index.hbs","../../../../../src/components/hds/app-side-nav/list/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\")","/**\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 { tracked } from '@glimmer/tracking';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsYieldSignature } from '../../yield';\nimport type { HdsAppSideNavListItemSignature } from './item';\nimport type { HdsAppSideNavListBackLinkSignature } from './back-link';\nimport type { HdsAppSideNavListTitleSignature } from './title';\nimport type { HdsAppSideNavListLinkSignature } from './link';\n\nexport interface HdsAppSideNavListSignature {\n Blocks: {\n default: [\n {\n ExtraBefore?: ComponentLike;\n Item?: ComponentLike;\n BackLink?: ComponentLike;\n Title?: ComponentLike;\n Link?: ComponentLike;\n ExtraAfter?: ComponentLike;\n },\n ];\n };\n Element: HTMLElement;\n}\n\nexport default class HdsAppSideNavList extends Component {\n @tracked private _titleIds: string[] = [];\n\n get titleIds(): string {\n return this._titleIds.join(' ');\n }\n\n @action\n didInsertTitle(titleId: string): void {\n this._titleIds = [...this._titleIds, titleId];\n }\n}\n"],"names":["HdsAppSideNavList","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","titleIds","_titleIds","join","didInsertTitle","titleId","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,otBAAotB;;;AC8BjuBA,IAAAA,iBAAiB,IAAAC,MAAA,GAAvB,MAAMD,iBAAiB,SAASE,SAAS,CAA6B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,oBAAAC,WAAA,EAAA,IAAA,CAAA;AAAA;EAGnF,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAO,IAAI,CAACC,SAAS,CAACC,IAAI,CAAC,GAAG,CAAC;AACjC;EAGAC,cAAcA,CAACC,OAAe,EAAQ;IACpC,IAAI,CAACH,SAAS,GAAG,CAAC,GAAG,IAAI,CAACA,SAAS,EAAEG,OAAO,CAAC;AAC/C;AACF,CAAC,EAAAL,WAAA,GAAAM,yBAAA,CAAAX,MAAA,CAAAY,SAAA,EAAA,WAAA,EAAA,CAVEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAA+B,EAAE;AAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAX,MAAA,CAAAY,SAAA,EAMxCM,gBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAApB,MAAA,CAAAY,SAAA,EAAA,gBAAA,CAAA,EAAAZ,MAAA,CAAAY,SAAA,GAAAZ,MAAA;AAP6BqB,oBAAA,CAAAC,QAAA,EAAjBvB,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/list/item.js b/packages/components/dist/components/hds/app-side-nav/list/item.js new file mode 100644 index 0000000000..12233e6128 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/item.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
  • \n {{yield}}\n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppSideNavListItem = TemplateOnlyComponent(); +var item = setComponentTemplate(TEMPLATE, HdsAppSideNavListItem); + +export { item as default }; +//# sourceMappingURL=item.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/list/item.js.map b/packages/components/dist/components/hds/app-side-nav/list/item.js.map new file mode 100644 index 0000000000..78e4355721 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/item.js.map @@ -0,0 +1 @@ +{"version":3,"file":"item.js","sources":["../../../../../src/components/hds/app-side-nav/list/item.hbs","../../../../../src/components/hds/app-side-nav/list/item.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
  • \\n {{yield}}\\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsAppSideNavListItemSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLLIElement;\n}\n\nconst HdsAppSideNavListItem =\n TemplateOnlyComponent();\n\nexport default HdsAppSideNavListItem;\n"],"names":["HdsAppSideNavListItem","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8JAA8J;;ACDhM;AACA;AACA;AACA;;AAWA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC;AAEzD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/list/link.js b/packages/components/dist/components/hds/app-side-nav/list/link.js new file mode 100644 index 0000000000..c3ed186a3e --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/link.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n \n {{#if @icon}}\n \n {{/if}}\n\n {{#if @text}}\n \n {{@text}}\n \n {{/if}}\n\n {{#if @count}}\n \n {{/if}}\n\n {{#if @badge}}\n \n {{/if}}\n\n {{yield}}\n\n {{#if @hasSubItems}}\n \n \n \n {{/if}}\n {{#if @isHrefExternal}}\n \n \n \n {{/if}}\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppSideNavListLink = TemplateOnlyComponent(); +var link = setComponentTemplate(TEMPLATE, HdsAppSideNavListLink); + +export { link as default }; +//# sourceMappingURL=link.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/list/link.js.map b/packages/components/dist/components/hds/app-side-nav/list/link.js.map new file mode 100644 index 0000000000..c9997ba45a --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/link.js.map @@ -0,0 +1 @@ +{"version":3,"file":"link.js","sources":["../../../../../src/components/hds/app-side-nav/list/link.hbs","../../../../../src/components/hds/app-side-nav/list/link.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n \\n {{#if @icon}}\\n \\n {{/if}}\\n\\n {{#if @text}}\\n \\n {{@text}}\\n \\n {{/if}}\\n\\n {{#if @count}}\\n \\n {{/if}}\\n\\n {{#if @badge}}\\n \\n {{/if}}\\n\\n {{yield}}\\n\\n {{#if @hasSubItems}}\\n \\n \\n \\n {{/if}}\\n {{#if @isHrefExternal}}\\n \\n \\n \\n {{/if}}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsInteractiveSignature } from '../../interactive';\n\nexport interface HdsAppSideNavListLinkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n icon?: HdsIconSignature['Args']['name'];\n text?: string;\n badge?: string;\n count?: string;\n hasSubItems?: boolean;\n isActive?: boolean;\n };\n Blocks: {\n default: [];\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nconst HdsAppSideNavListLink =\n TemplateOnlyComponent();\n\nexport default HdsAppSideNavListLink;\n"],"names":["HdsAppSideNavListLink","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,88CAA88C;;ACDh/C;AACA;AACA;AACA;;AAsBA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC;AAEzD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/list/title.js b/packages/components/dist/components/hds/app-side-nav/list/title.js new file mode 100644 index 0000000000..94e40e3025 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/title.js @@ -0,0 +1,29 @@ +import { _ as _applyDecoratedDescriptor, a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import { guidFor } from '@ember/object/internals'; +import { action } from '@ember/object'; +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n {{~yield~}}\n"); + +var _class; +let HdsAppSideNavListTitle = (_class = class HdsAppSideNavListTitle extends Component { + constructor(...args) { + super(...args); + /* Generate a unique ID for each Title */ + _defineProperty(this, "_titleId", 'title-' + guidFor(this)); + } + didInsertTitle(element) { + const { + didInsertTitle + } = this.args; + if (typeof didInsertTitle === 'function') { + didInsertTitle(element.id); + } + } +}, _applyDecoratedDescriptor(_class.prototype, "didInsertTitle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsertTitle"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppSideNavListTitle); + +export { HdsAppSideNavListTitle as default }; +//# sourceMappingURL=title.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/list/title.js.map b/packages/components/dist/components/hds/app-side-nav/list/title.js.map new file mode 100644 index 0000000000..081d4762ce --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/list/title.js.map @@ -0,0 +1 @@ +{"version":3,"file":"title.js","sources":["../../../../../src/components/hds/app-side-nav/list/title.hbs","../../../../../src/components/hds/app-side-nav/list/title.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n {{~yield~}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { guidFor } from '@ember/object/internals';\nimport { action } from '@ember/object';\nimport Component from '@glimmer/component';\n\nexport interface HdsAppSideNavListTitleSignature {\n Args: {\n didInsertTitle?: (titleId: string) => void;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppSideNavListTitle extends Component {\n /* Generate a unique ID for each Title */\n private _titleId = 'title-' + guidFor(this);\n\n @action\n didInsertTitle(element: HTMLElement): void {\n const { didInsertTitle } = this.args;\n\n if (typeof didInsertTitle === 'function') {\n didInsertTitle(element.id);\n }\n }\n}\n"],"names":["HdsAppSideNavListTitle","_class","Component","constructor","args","_defineProperty","guidFor","didInsertTitle","element","id","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,+VAA+V;;;ACkB5WA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,CAAkC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAC7F;AAAAC,IAAAA,eAAA,mBACmB,QAAQ,GAAGC,OAAO,CAAC,IAAI,CAAC,CAAA;AAAA;EAG3CC,cAAcA,CAACC,OAAoB,EAAQ;IACzC,MAAM;AAAED,MAAAA;KAAgB,GAAG,IAAI,CAACH,IAAI;AAEpC,IAAA,IAAI,OAAOG,cAAc,KAAK,UAAU,EAAE;AACxCA,MAAAA,cAAc,CAACC,OAAO,CAACC,EAAE,CAAC;AAC5B;AACF;AACF,CAAC,EAAAC,yBAAA,CAAAT,MAAA,CAAAU,SAAA,EAAA,gBAAA,EAAA,CAREC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAb,MAAA,CAAAU,SAAA,qBAAAV,MAAA,CAAAU,SAAA,CAAA,EAAAV,MAAA;AAJkCc,oBAAA,CAAAC,QAAA,EAAtBhB,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/portal/index.js b/packages/components/dist/components/hds/app-side-nav/portal/index.js new file mode 100644 index 0000000000..1ca5d42526 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/portal/index.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n
    \n \n {{yield ListElements}}\n \n
    \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppSideNavPortal = TemplateOnlyComponent(); +var index = setComponentTemplate(TEMPLATE, HdsAppSideNavPortal); + +export { index as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/portal/index.js.map b/packages/components/dist/components/hds/app-side-nav/portal/index.js.map new file mode 100644 index 0000000000..1eae8e045e --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/portal/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/app-side-nav/portal/index.hbs","../../../../../src/components/hds/app-side-nav/portal/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n
    \\n \\n {{yield ListElements}}\\n \\n
    \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsAppSideNavListSignature } from '../list/index';\n\n// TODO! understand how this should be done \"correctly\"\n// import type { PortalSignature } from 'ember-stargate/components/portal';\ninterface PortalSignature {\n Args: {\n target: string;\n renderInPlace?: boolean;\n fallback?: 'inplace';\n };\n Blocks: {\n default: [];\n };\n}\n\nexport interface HdsAppSideNavPortalSignature {\n Args: PortalSignature['Args'] & {\n ariaLabel?: string;\n targetName?: string;\n };\n Blocks: HdsAppSideNavListSignature['Blocks'];\n Element: HTMLDivElement;\n}\n\nconst HdsAppSideNavPortal =\n TemplateOnlyComponent();\n\nexport default HdsAppSideNavPortal;\n"],"names":["HdsAppSideNavPortal","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+XAA+X;;ACDja;AACA;AACA;AACA;;AA4BA,MAAMA,mBAAmB,GACvBC,qBAAqB,EAAgC;AAEvD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,mBAAmB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/portal/target.js b/packages/components/dist/components/hds/app-side-nav/portal/target.js new file mode 100644 index 0000000000..9b4646dc59 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/portal/target.js @@ -0,0 +1,173 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty, a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { inject } from '@ember/service'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { DEBUG } from '@glimmer/env'; +import { macroCondition, isTesting } from '@embroider/macros'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n \n
    "); + +var _class, _descriptor, _descriptor2, _descriptor3; +let HdsAppSideNavPortalTarget = (_class = class HdsAppSideNavPortalTarget extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "router", _descriptor, this); + _initializerDefineProperty(this, "_numSubnavs", _descriptor2, this); + _initializerDefineProperty(this, "_lastPanelEl", _descriptor3, this); + _defineProperty(this, "_prefersReducedMotionMQ", window.matchMedia('(prefers-reduced-motion: reduce)')); + } + static get prefersReducedMotionOverride() { + return macroCondition(isTesting()) ? true : false; + } + get prefersReducedMotion() { + return HdsAppSideNavPortalTarget.prefersReducedMotionOverride || this._prefersReducedMotionMQ && this._prefersReducedMotionMQ.matches; + } + panelsChanged(portalCount) { + this._numSubnavs = portalCount; + } + didUpdateSubnav(element, [count]) { + this.animateSubnav(element, [count]); + } + animateSubnav(element, [count]) { + /* + * Here is ascii art of what the layout looks like for this setup + * + AppSideNav + +----------------------+ + | +------------------+ | + | | ("header") | | + | +------------------+ | + | | + | +------------------+ | + | | ("body") | | + (PortalTarget) | | | | + +----------------------------------------------+ | | + | +----------+ +----------+ | +----------+ | | | + | | (Portal) | | (Portal) | | (Portal) | | | | + | | | | | | | | | | | + | | hidden | | hidden | | *active* | | | | + | | panel | | panel | | | panel | | | | + | | | | | | | | | | + | | | | | | | | | | | + | | | | | | | | | | + | | | | | | | | | | | + | | | | | | | | | | + | | | | | | | | | | | + | | | | | | | | | | + | +----------+ +----------+ | +----------+ | | | + +----------------------------------------------+ | | + | | | | + | +------------------+ | + | | + | +------------------+ | + | | ("footer") | | + | +------------------+ | + +----------------------+ + * + * every time `HcAppFrame::SideNav::Portal` renders, it contains a portaled "panel" + * that is rendered into the `hds-app-side-nav__content-panels` (inside the PortalTarget). + * + * Rendering or unrendering other `HcAppFrame::SideNav::Portal`s triggers the number of + * subnavs to change (via `numSubnavs`), so this function runs and slides + * `hds-app-side-nav__content-panels` left or right using the `element.animate` api. + * + * */ + + const activeIndex = count - 1; + const targetElement = element; + const { + prefersReducedMotion + } = this; + const styles = getComputedStyle(targetElement); + const columnWidth = styles.getPropertyValue('--hds-app-sidenav-width-expanded'); + const slideDuration = prefersReducedMotion ? 0 : 150; + let fadeDuration = prefersReducedMotion ? 0 : 175; + let fadeDelay = prefersReducedMotion ? 0 : 50; + + // slide entire parent panel + const start = styles.transform; + const end = `translateX(-${activeIndex * parseInt(columnWidth, 10)}px)`; + const anim = targetElement.animate([{ + transform: start + }, { + transform: end + }], { + duration: slideDuration, + easing: 'cubic-bezier(0.65, 0, 0.35, 1)', + fill: 'forwards' + }); + anim.finished.then(() => { + // uncomment this if we need/want to scroll the element to the top + // targetElement.scrollIntoView(true); + if (activeIndex > 0) { + const allPrev = Array.from(targetElement.children).slice(0, activeIndex); + for (const ele of allPrev) { + ele.ariaHidden = 'true'; + ele.style.setProperty('visibility', 'hidden'); + ele.style.setProperty('opacity', '0'); + } + } + // Notice: we don't add the styles by default because it writes a `style` attribute to the element and it causes an additional re-render + if (DEBUG) { + // Check the visibility of the element before attempting to commitStyles. + if (targetElement.offsetParent !== null) { + anim.commitStyles(); + } + } + }); + + // fade in next panel + const nextPanelEl = targetElement.children[activeIndex]; + + // get reference to last child panel + const lastPanelEl = targetElement.children[targetElement.children.length - 1]; + if (nextPanelEl) { + nextPanelEl.ariaHidden = 'false'; + nextPanelEl.style.setProperty('visibility', 'visible'); + // this eliminates a flicker if there's only one subnav rendering or if we + // already just rendered this panel. + if (this._lastPanelEl) { + if (activeIndex === 0 || nextPanelEl.isSameNode(this._lastPanelEl)) { + fadeDelay = 0; + fadeDuration = 0; + } + } + + // remember the last panel + this._lastPanelEl = lastPanelEl; + nextPanelEl.animate([{ + opacity: '0' + }, { + opacity: '1' + }], { + delay: fadeDelay, + duration: fadeDuration, + fill: 'forwards' + }); + } + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "router", [inject], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_numSubnavs", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return 0; + } +}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "_lastPanelEl", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "panelsChanged", [action], Object.getOwnPropertyDescriptor(_class.prototype, "panelsChanged"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didUpdateSubnav", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didUpdateSubnav"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "animateSubnav", [action], Object.getOwnPropertyDescriptor(_class.prototype, "animateSubnav"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsAppSideNavPortalTarget); + +export { HdsAppSideNavPortalTarget as default }; +//# sourceMappingURL=target.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/portal/target.js.map b/packages/components/dist/components/hds/app-side-nav/portal/target.js.map new file mode 100644 index 0000000000..f6a96e1683 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/portal/target.js.map @@ -0,0 +1 @@ +{"version":3,"file":"target.js","sources":["../../../../../src/components/hds/app-side-nav/portal/target.hbs","../../../../../src/components/hds/app-side-nav/portal/target.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { inject as service } from '@ember/service';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { DEBUG } from '@glimmer/env';\nimport { macroCondition, isTesting } from '@embroider/macros';\n\nimport type { HdsAppSideNavPortalSignature } from './index';\n\n// import { PortalTargetSignature } from 'ember-stargate/components/portal-target';\ninterface PortalTargetSignature {\n Element: HTMLDivElement;\n Args: {\n name: string;\n multiple?: boolean;\n onChange?: (count: number) => void;\n };\n Blocks: {\n default: [number];\n };\n}\n\nimport type { Registry as Services } from '@ember/service';\n\ninterface HdsAppSideNavPortalTargetSignature {\n Args: PortalTargetSignature['Args'] & {\n targetName?: HdsAppSideNavPortalSignature['Args']['targetName'];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAppSideNavPortalTarget extends Component {\n @service router!: Services['router'];\n\n @tracked private _numSubnavs = 0;\n @tracked private _lastPanelEl: Element | undefined;\n\n static get prefersReducedMotionOverride(): boolean {\n return macroCondition(isTesting()) ? true : false;\n }\n\n private _prefersReducedMotionMQ = window.matchMedia(\n '(prefers-reduced-motion: reduce)'\n );\n\n get prefersReducedMotion(): boolean {\n return (\n HdsAppSideNavPortalTarget.prefersReducedMotionOverride ||\n (this._prefersReducedMotionMQ && this._prefersReducedMotionMQ.matches)\n );\n }\n\n @action\n panelsChanged(portalCount: number): void {\n this._numSubnavs = portalCount;\n }\n\n @action\n didUpdateSubnav(element: HTMLElement, [count]: [number]): void {\n this.animateSubnav(element, [count]);\n }\n\n @action\n animateSubnav(element: HTMLElement, [count]: [number]): void {\n /*\n * Here is ascii art of what the layout looks like for this setup\n *\n\n AppSideNav\n +----------------------+\n | +------------------+ |\n | | (\"header\") | |\n | +------------------+ |\n | |\n | +------------------+ |\n | | (\"body\") | |\n (PortalTarget) | | | |\n +----------------------------------------------+ | |\n | +----------+ +----------+ | +----------+ | | |\n | | (Portal) | | (Portal) | | (Portal) | | | |\n | | | | | | | | | | |\n | | hidden | | hidden | | *active* | | | |\n | | panel | | panel | | | panel | | | |\n | | | | | | | | | |\n | | | | | | | | | | |\n | | | | | | | | | |\n | | | | | | | | | | |\n | | | | | | | | | |\n | | | | | | | | | | |\n | | | | | | | | | |\n | +----------+ +----------+ | +----------+ | | |\n +----------------------------------------------+ | |\n | | | |\n | +------------------+ |\n | |\n | +------------------+ |\n | | (\"footer\") | |\n | +------------------+ |\n +----------------------+\n\n *\n * every time `HcAppFrame::SideNav::Portal` renders, it contains a portaled \"panel\"\n * that is rendered into the `hds-app-side-nav__content-panels` (inside the PortalTarget).\n *\n * Rendering or unrendering other `HcAppFrame::SideNav::Portal`s triggers the number of\n * subnavs to change (via `numSubnavs`), so this function runs and slides\n * `hds-app-side-nav__content-panels` left or right using the `element.animate` api.\n *\n * */\n\n const activeIndex = count - 1;\n const targetElement = element;\n const { prefersReducedMotion } = this;\n\n const styles = getComputedStyle(targetElement);\n const columnWidth = styles.getPropertyValue(\n '--hds-app-sidenav-width-expanded'\n );\n const slideDuration = prefersReducedMotion ? 0 : 150;\n let fadeDuration = prefersReducedMotion ? 0 : 175;\n let fadeDelay = prefersReducedMotion ? 0 : 50;\n\n // slide entire parent panel\n const start = styles.transform;\n const end = `translateX(-${activeIndex * parseInt(columnWidth, 10)}px)`;\n const anim = targetElement.animate(\n [{ transform: start }, { transform: end }],\n {\n duration: slideDuration,\n easing: 'cubic-bezier(0.65, 0, 0.35, 1)',\n fill: 'forwards',\n }\n );\n\n anim.finished.then((): void => {\n // uncomment this if we need/want to scroll the element to the top\n // targetElement.scrollIntoView(true);\n if (activeIndex > 0) {\n const allPrev = Array.from(targetElement.children).slice(\n 0,\n activeIndex\n ) as HTMLElement[];\n for (const ele of allPrev) {\n ele.ariaHidden = 'true';\n ele.style.setProperty('visibility', 'hidden');\n ele.style.setProperty('opacity', '0');\n }\n }\n // Notice: we don't add the styles by default because it writes a `style` attribute to the element and it causes an additional re-render\n if (DEBUG) {\n // Check the visibility of the element before attempting to commitStyles.\n if (targetElement.offsetParent !== null) {\n anim.commitStyles();\n }\n }\n });\n\n // fade in next panel\n const nextPanelEl = targetElement.children[activeIndex] as HTMLElement;\n\n // get reference to last child panel\n const lastPanelEl = targetElement.children[\n targetElement.children.length - 1\n ] as HTMLElement;\n\n if (nextPanelEl) {\n nextPanelEl.ariaHidden = 'false';\n nextPanelEl.style.setProperty('visibility', 'visible');\n // this eliminates a flicker if there's only one subnav rendering or if we\n // already just rendered this panel.\n if (this._lastPanelEl) {\n if (activeIndex === 0 || nextPanelEl.isSameNode(this._lastPanelEl)) {\n fadeDelay = 0;\n fadeDuration = 0;\n }\n }\n\n // remember the last panel\n this._lastPanelEl = lastPanelEl;\n\n nextPanelEl.animate([{ opacity: '0' }, { opacity: '1' }], {\n delay: fadeDelay,\n duration: fadeDuration,\n fill: 'forwards',\n });\n }\n }\n}\n"],"names":["HdsAppSideNavPortalTarget","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_defineProperty","window","matchMedia","prefersReducedMotionOverride","macroCondition","isTesting","prefersReducedMotion","_prefersReducedMotionMQ","matches","panelsChanged","portalCount","_numSubnavs","didUpdateSubnav","element","count","animateSubnav","activeIndex","targetElement","styles","getComputedStyle","columnWidth","getPropertyValue","slideDuration","fadeDuration","fadeDelay","start","transform","end","parseInt","anim","animate","duration","easing","fill","finished","then","allPrev","Array","from","children","slice","ele","ariaHidden","style","setProperty","DEBUG","offsetParent","commitStyles","nextPanelEl","lastPanelEl","length","_lastPanelEl","isSameNode","opacity","delay","_applyDecoratedDescriptor","prototype","service","configurable","enumerable","writable","initializer","tracked","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,kcAAkc;;;ACmC/cA,IAAAA,yBAAyB,IAAAC,MAAA,GAA/B,MAAMD,yBAAyB,SAASE,SAAS,CAAqC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,sBAAAE,YAAA,EAAA,IAAA,CAAA;AAAAF,IAAAA,0BAAA,uBAAAG,YAAA,EAAA,IAAA,CAAA;AAAAC,IAAAA,eAAA,kCAUjEC,MAAM,CAACC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AA,CAAAgE,SAAA,mBAC/BM,OAAO,CAAA,EAAA;EAAAJ,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAA/D,MAAA,CAAAgE,SAAA,EAAA,eAAA,EAAA,CAiBPO,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAzE,MAAA,CAAAgE,SAAA,EAAA,eAAA,CAAA,EAAAhE,MAAA,CAAAgE,SAAA,CAAA,EAAAD,yBAAA,CAAA/D,MAAA,CAAAgE,SAAA,EAAA,iBAAA,EAAA,CAKNO,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAzE,MAAA,CAAAgE,SAAA,EAAA,iBAAA,CAAA,EAAAhE,MAAA,CAAAgE,SAAA,CAAA,EAAAD,yBAAA,CAAA/D,MAAA,CAAAgE,SAAA,EAAA,eAAA,EAAA,CAKNO,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAzE,MAAA,CAAAgE,SAAA,EAAA,eAAA,CAAA,EAAAhE,MAAA,CAAAgE,SAAA,CAAA,EAAAhE,MAAA;AA/BqC0E,oBAAA,CAAAC,QAAA,EAAzB5E,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/app-side-nav/toggle-button.js b/packages/components/dist/components/hds/app-side-nav/toggle-button.js new file mode 100644 index 0000000000..359a441243 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/toggle-button.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsAppSideNavToggleButton = TemplateOnlyComponent(); +var toggleButton = setComponentTemplate(TEMPLATE, HdsAppSideNavToggleButton); + +export { toggleButton as default }; +//# sourceMappingURL=toggle-button.js.map diff --git a/packages/components/dist/components/hds/app-side-nav/toggle-button.js.map b/packages/components/dist/components/hds/app-side-nav/toggle-button.js.map new file mode 100644 index 0000000000..9b878cccf8 --- /dev/null +++ b/packages/components/dist/components/hds/app-side-nav/toggle-button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"toggle-button.js","sources":["../../../../src/components/hds/app-side-nav/toggle-button.hbs","../../../../src/components/hds/app-side-nav/toggle-button.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsIconSignature } from '../icon';\n\ninterface HdsAppSideNavToggleButtonSignature {\n Args: {\n icon: HdsIconSignature['Args']['name'];\n };\n Element: HTMLButtonElement;\n}\n\nconst HdsAppSideNavToggleButton =\n TemplateOnlyComponent();\n\nexport default HdsAppSideNavToggleButton;\n"],"names":["HdsAppSideNavToggleButton","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4MAA4M;;ACD9O;AACA;AACA;AACA;;AAaA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAAsC;AAE7D,mBAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/body.js b/packages/components/dist/components/hds/application-state/body.js new file mode 100644 index 0000000000..7e473ce631 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/body.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{#if (has-block)}}\n {{yield}}\n {{else}}\n \n {{@text}}\n \n {{/if}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsApplicationStateBody = TemplateOnlyComponent(); +var body = setComponentTemplate(TEMPLATE, HdsApplicationStateBody); + +export { body as default }; +//# sourceMappingURL=body.js.map diff --git a/packages/components/dist/components/hds/application-state/body.js.map b/packages/components/dist/components/hds/application-state/body.js.map new file mode 100644 index 0000000000..036feaa8a3 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/body.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body.js","sources":["../../../../src/components/hds/application-state/body.hbs","../../../../src/components/hds/application-state/body.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{#if (has-block)}}\\n {{yield}}\\n {{else}}\\n \\n {{@text}}\\n \\n {{/if}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsApplicationStateBodySignature {\n Args: {\n text?: string;\n };\n Blocks: {\n default?: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsApplicationStateBody =\n TemplateOnlyComponent();\n\nexport default HdsApplicationStateBody;\n"],"names":["HdsApplicationStateBody","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kVAAkV;;ACDpX;AACA;AACA;AACA;;AAcA,MAAMA,uBAAuB,GAC3BC,qBAAqB,EAAoC;AAE3D,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,uBAAuB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/footer.js b/packages/components/dist/components/hds/application-state/footer.js new file mode 100644 index 0000000000..096e2f8ca8 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/footer.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n {{yield\n (hash\n Button=(component \"hds/button\")\n Dropdown=(component \"hds/dropdown\")\n LinkStandalone=(component \"hds/link/standalone\")\n )\n }}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsApplicationStateFooter = TemplateOnlyComponent(); +var footer = setComponentTemplate(TEMPLATE, HdsApplicationStateFooter); + +export { footer as default }; +//# sourceMappingURL=footer.js.map diff --git a/packages/components/dist/components/hds/application-state/footer.js.map b/packages/components/dist/components/hds/application-state/footer.js.map new file mode 100644 index 0000000000..1dab66f6f9 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/application-state/footer.hbs","../../../../src/components/hds/application-state/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n {{yield\\n (hash\\n Button=(component \\\"hds/button\\\")\\n Dropdown=(component \\\"hds/dropdown\\\")\\n LinkStandalone=(component \\\"hds/link/standalone\\\")\\n )\\n }}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsLinkStandaloneSignature } from '../link/standalone';\nimport type { HdsButtonSignature } from '../button';\nimport type { HdsDropdownSignature } from '../dropdown';\n\nexport interface HdsApplicationStateFooterSignature {\n Args: {\n hasDivider?: boolean;\n };\n Blocks: {\n default?: [\n {\n Button?: ComponentLike;\n Dropdown?: ComponentLike;\n LinkStandalone?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsApplicationStateFooter =\n TemplateOnlyComponent();\n\nexport default HdsApplicationStateFooter;\n"],"names":["HdsApplicationStateFooter","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wUAAwU;;ACD1W;AACA;AACA;AACA;;AAwBA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAAsC;AAE7D,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/header.js b/packages/components/dist/components/hds/application-state/header.js new file mode 100644 index 0000000000..6add5b4104 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/header.js @@ -0,0 +1,21 @@ +import Component from '@glimmer/component'; +import { HdsApplicationStateTitleTagValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{#if @errorCode}}\n \n ERROR\n {{@errorCode}}\n \n {{/if}}\n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n \n {{@title}}\n \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsApplicationStateHeader extends Component { + get titleTag() { + return this.args.titleTag ?? HdsApplicationStateTitleTagValues.Div; + } +} +setComponentTemplate(TEMPLATE, HdsApplicationStateHeader); + +export { HdsApplicationStateHeader as default }; +//# sourceMappingURL=header.js.map diff --git a/packages/components/dist/components/hds/application-state/header.js.map b/packages/components/dist/components/hds/application-state/header.js.map new file mode 100644 index 0000000000..0e1d8f1021 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sources":["../../../../src/components/hds/application-state/header.hbs","../../../../src/components/hds/application-state/header.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{#if @errorCode}}\\n \\n ERROR\\n {{@errorCode}}\\n \\n {{/if}}\\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n \\n {{@title}}\\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { HdsApplicationStateTitleTagValues } from './types.ts';\n\nimport type { HdsIconSignature } from '../icon';\nimport type { HdsApplicationStateTitleTags } from './types';\nexport interface HdsApplicationStateHeaderSignature {\n Args: {\n title?: string;\n titleTag?: HdsApplicationStateTitleTags;\n errorCode?: string;\n icon?: HdsIconSignature['Args']['name'];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsApplicationStateHeader extends Component {\n get titleTag(): HdsApplicationStateTitleTags {\n return this.args.titleTag ?? HdsApplicationStateTitleTagValues.Div;\n }\n}\n"],"names":["HdsApplicationStateHeader","Component","titleTag","args","HdsApplicationStateTitleTagValues","Div","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gxBAAgxB;;ACDlzB;AACA;AACA;AACA;;AAiBe,MAAMA,yBAAyB,SAASC,SAAS,CAAqC;EACnG,IAAIC,QAAQA,GAAiC;IAC3C,OAAO,IAAI,CAACC,IAAI,CAACD,QAAQ,IAAIE,iCAAiC,CAACC,GAAG;AACpE;AACF;AAACC,oBAAA,CAAAC,QAAA,EAJoBP,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/index.js b/packages/components/dist/components/hds/application-state/index.js new file mode 100644 index 0000000000..7aaa14663d --- /dev/null +++ b/packages/components/dist/components/hds/application-state/index.js @@ -0,0 +1,32 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsApplicationStateAlignValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield\n (hash\n Media=(component \"hds/application-state/media\")\n Header=(component \"hds/application-state/header\")\n Body=(component \"hds/application-state/body\")\n Footer=(component \"hds/application-state/footer\")\n )\n }}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const ALIGNS = Object.values(HdsApplicationStateAlignValues); +class HdsApplicationState extends Component { + get align() { + const validAlignValues = Object.values(HdsApplicationStateAlignValues); + assert(`@align for "Hds::ApplicationState" must be one of the following: ${validAlignValues.join(', ')}; received: ${this.args.align}`, this.args.align == null || validAlignValues.includes(this.args.align)); + return this.args.align ?? HdsApplicationStateAlignValues.Left; + } + get classNames() { + const classes = ['hds-application-state']; + + // add a class based on the @align argument + classes.push(`hds-application-state--align-${this.align}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsApplicationState); + +export { ALIGNS, HdsApplicationState as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/application-state/index.js.map b/packages/components/dist/components/hds/application-state/index.js.map new file mode 100644 index 0000000000..1161a3c870 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/application-state/index.hbs","../../../../src/components/hds/application-state/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield\\n (hash\\n Media=(component \\\"hds/application-state/media\\\")\\n Header=(component \\\"hds/application-state/header\\\")\\n Body=(component \\\"hds/application-state/body\\\")\\n Footer=(component \\\"hds/application-state/footer\\\")\\n )\\n }}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { HdsApplicationStateAlignValues } from './types.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsApplicationStateAligns } from './types';\nimport type { HdsApplicationStateMediaSignature } from './media';\nimport type { HdsApplicationStateHeaderSignature } from './header';\nimport type { HdsApplicationStateBodySignature } from './body';\nimport type { HdsApplicationStateFooterSignature } from './footer';\n\nexport const ALIGNS: string[] = Object.values(HdsApplicationStateAlignValues);\nexport interface HdsApplicationStateSignature {\n Args: {\n align?: HdsApplicationStateAligns;\n };\n Blocks: {\n default: [\n {\n Media?: ComponentLike;\n Header?: ComponentLike;\n Body?: ComponentLike;\n Footer?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsApplicationState extends Component {\n get align(): HdsApplicationStateAligns {\n const validAlignValues: HdsApplicationStateAligns[] = Object.values(\n HdsApplicationStateAlignValues\n );\n\n assert(\n `@align for \"Hds::ApplicationState\" must be one of the following: ${validAlignValues.join(\n ', '\n )}; received: ${this.args.align}`,\n this.args.align == null || validAlignValues.includes(this.args.align)\n );\n\n return this.args.align ?? HdsApplicationStateAlignValues.Left;\n }\n\n get classNames(): string {\n const classes = ['hds-application-state'];\n\n // add a class based on the @align argument\n classes.push(`hds-application-state--align-${this.align}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["ALIGNS","Object","values","HdsApplicationStateAlignValues","HdsApplicationState","Component","align","validAlignValues","assert","join","args","includes","Left","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,8YAA8Y;;ACDhb;AACA;AACA;AACA;;AAaO,MAAMA,MAAgB,GAAGC,MAAM,CAACC,MAAM,CAACC,8BAA8B;AAkB7D,MAAMC,mBAAmB,SAASC,SAAS,CAA+B;EACvF,IAAIC,KAAKA,GAA8B;AACrC,IAAA,MAAMC,gBAA6C,GAAGN,MAAM,CAACC,MAAM,CACjEC,8BACF,CAAC;AAEDK,IAAAA,MAAM,CACJ,CAAA,iEAAA,EAAoED,gBAAgB,CAACE,IAAI,CACvF,IACF,CAAC,CAAA,YAAA,EAAe,IAAI,CAACC,IAAI,CAACJ,KAAK,EAAE,EACjC,IAAI,CAACI,IAAI,CAACJ,KAAK,IAAI,IAAI,IAAIC,gBAAgB,CAACI,QAAQ,CAAC,IAAI,CAACD,IAAI,CAACJ,KAAK,CACtE,CAAC;IAED,OAAO,IAAI,CAACI,IAAI,CAACJ,KAAK,IAAIH,8BAA8B,CAACS,IAAI;AAC/D;EAEA,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,uBAAuB,CAAC;;AAEzC;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,6BAAA,EAAgC,IAAI,CAACT,KAAK,EAAE,CAAC;AAE1D,IAAA,OAAOQ,OAAO,CAACL,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACO,oBAAA,CAAAC,QAAA,EAxBoBb,mBAAmB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/media.js b/packages/components/dist/components/hds/application-state/media.js new file mode 100644 index 0000000000..64b9c3e4d6 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/media.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsApplicationStateMedia = TemplateOnlyComponent(); +var media = setComponentTemplate(TEMPLATE, HdsApplicationStateMedia); + +export { media as default }; +//# sourceMappingURL=media.js.map diff --git a/packages/components/dist/components/hds/application-state/media.js.map b/packages/components/dist/components/hds/application-state/media.js.map new file mode 100644 index 0000000000..c25163f57f --- /dev/null +++ b/packages/components/dist/components/hds/application-state/media.js.map @@ -0,0 +1 @@ +{"version":3,"file":"media.js","sources":["../../../../src/components/hds/application-state/media.hbs","../../../../src/components/hds/application-state/media.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsApplicationStateMediaSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsApplicationStateMedia =\n TemplateOnlyComponent();\n\nexport default HdsApplicationStateMedia;\n"],"names":["HdsApplicationStateMedia","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iKAAiK;;ACDnM;AACA;AACA;AACA;;AAWA,MAAMA,wBAAwB,GAC5BC,qBAAqB,EAAqC;AAE5D,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/application-state/types.js b/packages/components/dist/components/hds/application-state/types.js new file mode 100644 index 0000000000..b37c5c9280 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/types.js @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsApplicationStateAlignValues = /*#__PURE__*/function (HdsApplicationStateAlignValues) { + HdsApplicationStateAlignValues["Left"] = "left"; + HdsApplicationStateAlignValues["Center"] = "center"; + return HdsApplicationStateAlignValues; +}({}); +let HdsApplicationStateTitleTagValues = /*#__PURE__*/function (HdsApplicationStateTitleTagValues) { + HdsApplicationStateTitleTagValues["Div"] = "div"; + HdsApplicationStateTitleTagValues["H1"] = "h1"; + HdsApplicationStateTitleTagValues["H2"] = "h2"; + HdsApplicationStateTitleTagValues["H3"] = "h3"; + HdsApplicationStateTitleTagValues["H4"] = "h4"; + HdsApplicationStateTitleTagValues["H5"] = "h5"; + HdsApplicationStateTitleTagValues["H6"] = "h6"; + return HdsApplicationStateTitleTagValues; +}({}); + +export { HdsApplicationStateAlignValues, HdsApplicationStateTitleTagValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/application-state/types.js.map b/packages/components/dist/components/hds/application-state/types.js.map new file mode 100644 index 0000000000..8741d4f802 --- /dev/null +++ b/packages/components/dist/components/hds/application-state/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/application-state/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsApplicationStateAlignValues {\n Left = 'left',\n Center = 'center',\n}\nexport type HdsApplicationStateAligns = `${HdsApplicationStateAlignValues}`;\n\nexport enum HdsApplicationStateTitleTagValues {\n Div = 'div',\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n}\n\nexport type HdsApplicationStateTitleTags =\n `${HdsApplicationStateTitleTagValues}`;\n"],"names":["HdsApplicationStateAlignValues","HdsApplicationStateTitleTagValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,8BAA8B,0BAA9BA,8BAA8B,EAAA;EAA9BA,8BAA8B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA9BA,8BAA8B,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAA9BA,8BAA8B;AAAA,CAAA,CAAA,EAAA;AAM9BC,IAAAA,iCAAiC,0BAAjCA,iCAAiC,EAAA;EAAjCA,iCAAiC,CAAA,KAAA,CAAA,GAAA,KAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAjCA,iCAAiC,CAAA,IAAA,CAAA,GAAA,IAAA;AAAA,EAAA,OAAjCA,iCAAiC;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/badge-count/index.js b/packages/components/dist/components/hds/badge-count/index.js new file mode 100644 index 0000000000..d16541cf83 --- /dev/null +++ b/packages/components/dist/components/hds/badge-count/index.js @@ -0,0 +1,91 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsBadgeCountSizeValues, HdsBadgeCountTypeValues, HdsBadgeCountColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{@text}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const SIZES = Object.values(HdsBadgeCountSizeValues); +const TYPES = Object.values(HdsBadgeCountTypeValues); +const COLORS = Object.values(HdsBadgeCountColorValues); +const DEFAULT_SIZE = HdsBadgeCountSizeValues.Medium; +const DEFAULT_TYPE = HdsBadgeCountTypeValues.Filled; +const DEFAULT_COLOR = HdsBadgeCountColorValues.Neutral; +class HdsBadgeCount extends Component { + /** + * Sets the size for the component + * Accepted sizes: small, medium, large + * + * @param size + * @type {string} + * @default 'medium' + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::BadgeCount" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * Sets the type of the component + * Accepted values: filled, inverted, outlined + * + * @param type + * @type {string} + * @default 'filled' + */ + get type() { + const { + type = DEFAULT_TYPE + } = this.args; + assert(`@type for "Hds::BadgeCount" must be one of the following: ${TYPES.join(', ')}; received: ${type}`, TYPES.includes(type)); + return type; + } + + /** + * Sets the color scheme for the component + * Accepted colors: neutral, neutral-dark-mode + * + * @param color + * @type {string} + * @default 'neutral' + */ + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::BadgeCount" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + + /** + * Get the class names to apply to the component. + * @method BadgeCount#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-badge-count']; + + // add a class based on the @size argument + classes.push(`hds-badge-count--size-${this.size}`); + + // add a class based on the @type argument + classes.push(`hds-badge-count--type-${this.type}`); + + // add a class based on the @color argument + classes.push(`hds-badge-count--color-${this.color}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsBadgeCount); + +export { COLORS, DEFAULT_COLOR, DEFAULT_SIZE, DEFAULT_TYPE, SIZES, TYPES, HdsBadgeCount as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/badge-count/index.js.map b/packages/components/dist/components/hds/badge-count/index.js.map new file mode 100644 index 0000000000..2bcd5c3a98 --- /dev/null +++ b/packages/components/dist/components/hds/badge-count/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/badge-count/index.hbs","../../../../src/components/hds/badge-count/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{@text}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport {\n HdsBadgeCountColorValues,\n HdsBadgeCountSizeValues,\n HdsBadgeCountTypeValues,\n} from './types.ts';\nimport type {\n HdsBadgeCountColors,\n HdsBadgeCountSizes,\n HdsBadgeCountTypes,\n} from './types.ts';\n\nexport const SIZES: string[] = Object.values(HdsBadgeCountSizeValues);\nexport const TYPES: string[] = Object.values(HdsBadgeCountTypeValues);\nexport const COLORS: string[] = Object.values(HdsBadgeCountColorValues);\nexport const DEFAULT_SIZE = HdsBadgeCountSizeValues.Medium;\nexport const DEFAULT_TYPE = HdsBadgeCountTypeValues.Filled;\nexport const DEFAULT_COLOR = HdsBadgeCountColorValues.Neutral;\n\nexport interface HdsBadgeCountSignature {\n Args: {\n size?: HdsBadgeCountSizes;\n type?: HdsBadgeCountTypes;\n color?: HdsBadgeCountColors;\n text: string | number;\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsBadgeCount extends Component {\n /**\n * Sets the size for the component\n * Accepted sizes: small, medium, large\n *\n * @param size\n * @type {string}\n * @default 'medium'\n */\n get size(): HdsBadgeCountSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::BadgeCount\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Sets the type of the component\n * Accepted values: filled, inverted, outlined\n *\n * @param type\n * @type {string}\n * @default 'filled'\n */\n get type(): HdsBadgeCountTypes {\n const { type = DEFAULT_TYPE } = this.args;\n\n assert(\n `@type for \"Hds::BadgeCount\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${type}`,\n TYPES.includes(type)\n );\n\n return type;\n }\n\n /**\n * Sets the color scheme for the component\n * Accepted colors: neutral, neutral-dark-mode\n *\n * @param color\n * @type {string}\n * @default 'neutral'\n */\n get color(): HdsBadgeCountColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::BadgeCount\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method BadgeCount#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-badge-count'];\n\n // add a class based on the @size argument\n classes.push(`hds-badge-count--size-${this.size}`);\n\n // add a class based on the @type argument\n classes.push(`hds-badge-count--type-${this.type}`);\n\n // add a class based on the @color argument\n classes.push(`hds-badge-count--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["SIZES","Object","values","HdsBadgeCountSizeValues","TYPES","HdsBadgeCountTypeValues","COLORS","HdsBadgeCountColorValues","DEFAULT_SIZE","Medium","DEFAULT_TYPE","Filled","DEFAULT_COLOR","Neutral","HdsBadgeCount","Component","size","args","assert","join","includes","type","color","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,kJAAkJ;;ACDpL;AACA;AACA;AACA;;AAgBO,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,uBAAuB;AAC7D,MAAMC,KAAe,GAAGH,MAAM,CAACC,MAAM,CAACG,uBAAuB;AAC7D,MAAMC,MAAgB,GAAGL,MAAM,CAACC,MAAM,CAACK,wBAAwB;AACzDC,MAAAA,YAAY,GAAGL,uBAAuB,CAACM;AACvCC,MAAAA,YAAY,GAAGL,uBAAuB,CAACM;AACvCC,MAAAA,aAAa,GAAGL,wBAAwB,CAACM;AAYvC,MAAMC,aAAa,SAASC,SAAS,CAAyB;AAC3E;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAuB;IAC7B,MAAM;AAAEA,MA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AElD;IACAG,OAAO,CAACC,IAAI,CAAC,CAAA,uBAAA,EAA0B,IAAI,CAACH,KAAK,EAAE,CAAC;AAEpD,IAAA,OAAOE,OAAO,CAACL,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACO,oBAAA,CAAAC,QAAA,EAnFoBb,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/badge-count/types.js b/packages/components/dist/components/hds/badge-count/types.js new file mode 100644 index 0000000000..db87ccf5c6 --- /dev/null +++ b/packages/components/dist/components/hds/badge-count/types.js @@ -0,0 +1,25 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsBadgeCountSizeValues = /*#__PURE__*/function (HdsBadgeCountSizeValues) { + HdsBadgeCountSizeValues["Small"] = "small"; + HdsBadgeCountSizeValues["Medium"] = "medium"; + HdsBadgeCountSizeValues["Large"] = "large"; + return HdsBadgeCountSizeValues; +}({}); +let HdsBadgeCountTypeValues = /*#__PURE__*/function (HdsBadgeCountTypeValues) { + HdsBadgeCountTypeValues["Filled"] = "filled"; + HdsBadgeCountTypeValues["Inverted"] = "inverted"; + HdsBadgeCountTypeValues["Outlined"] = "outlined"; + return HdsBadgeCountTypeValues; +}({}); +let HdsBadgeCountColorValues = /*#__PURE__*/function (HdsBadgeCountColorValues) { + HdsBadgeCountColorValues["Neutral"] = "neutral"; + HdsBadgeCountColorValues["NeutralDarkMode"] = "neutral-dark-mode"; + return HdsBadgeCountColorValues; +}({}); + +export { HdsBadgeCountColorValues, HdsBadgeCountSizeValues, HdsBadgeCountTypeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/badge-count/types.js.map b/packages/components/dist/components/hds/badge-count/types.js.map new file mode 100644 index 0000000000..dbf8f09a5e --- /dev/null +++ b/packages/components/dist/components/hds/badge-count/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/badge-count/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsBadgeCountSizeValues {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\nexport type HdsBadgeCountSizes = `${HdsBadgeCountSizeValues}`;\n\nexport enum HdsBadgeCountTypeValues {\n Filled = 'filled',\n Inverted = 'inverted',\n Outlined = 'outlined',\n}\nexport type HdsBadgeCountTypes = `${HdsBadgeCountTypeValues}`;\n\nexport enum HdsBadgeCountColorValues {\n Neutral = 'neutral',\n NeutralDarkMode = 'neutral-dark-mode',\n}\nexport type HdsBadgeCountColors = `${HdsBadgeCountColorValues}`;\n"],"names":["HdsBadgeCountSizeValues","HdsBadgeCountTypeValues","HdsBadgeCountColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAvBA,uBAAuB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAvBA,uBAAuB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAAvBA,uBAAuB;AAAA,CAAA,CAAA,EAAA;AAOvBC,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAvBA,uBAAuB,CAAA,UAAA,CAAA,GAAA,UAAA;EAAvBA,uBAAuB,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAAvBA,uBAAuB;AAAA,CAAA,CAAA,EAAA;AAOvBC,IAAAA,wBAAwB,0BAAxBA,wBAAwB,EAAA;EAAxBA,wBAAwB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAxBA,wBAAwB,CAAA,iBAAA,CAAA,GAAA,mBAAA;AAAA,EAAA,OAAxBA,wBAAwB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/badge/index.js b/packages/components/dist/components/hds/badge/index.js new file mode 100644 index 0000000000..3f4eb77f3d --- /dev/null +++ b/packages/components/dist/components/hds/badge/index.js @@ -0,0 +1,117 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsBadgeSizeValues, HdsBadgeTypeValues, HdsBadgeColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n {{#if this.isIconOnly}}\n {{this.text}}\n {{else}}\n
    \n {{this.text}}\n
    \n {{/if}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const SIZES = Object.values(HdsBadgeSizeValues); +const TYPES = Object.values(HdsBadgeTypeValues); +const COLORS = Object.values(HdsBadgeColorValues); +const DEFAULT_SIZE = HdsBadgeSizeValues.Medium; +const DEFAULT_TYPE = HdsBadgeTypeValues.Filled; +const DEFAULT_COLOR = HdsBadgeColorValues.Neutral; +class HdsBadge extends Component { + /** + * Sets the size for the component + * Accepted values: small, medium, large + * + * @param size + * @type {HdsBadgeSizes} + * @default 'medium' + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Badge" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * Sets the type of the component + * Accepted values: filled, inverted, outlined + * + * @param type + * @type {HdsBadgeTypes} + * @default 'filled' + */ + get type() { + const { + type = DEFAULT_TYPE + } = this.args; + assert(`@type for "Hds::Badge" must be one of the following: ${TYPES.join(', ')}; received: ${type}`, TYPES.includes(type)); + return type; + } + + /** + * Sets the color scheme for the component + * Accepted values: neutral, neutral-dark-mode, highlight, success, warning, critical + * + * @param color + * @type {HdsBadgeColors} + * @default 'neutral' + */ + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Badge" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + + /** + * @param text + * @type {string} + * @description The text of the badge. If `isIconOnly` is set to `true`, the text will be visually hidden but still available to assistive technology. If no text value is defined, an error will be thrown. + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Badge" must have a valid value', text !== undefined); + return text; + } + + /** + * @param isIconOnly + * @type {boolean} + * @default false + * @description Indicates if the badge will only contain an icon; component will also ensure that accessible text is still applied to the component. + */ + get isIconOnly() { + if (this.args.icon) { + return this.args.isIconOnly ?? false; + } + return false; + } + + /** + * Get the class names to apply to the component. + * @method Badge#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-badge']; + + // add a class based on the @size argument + classes.push(`hds-badge--size-${this.size}`); + + // add a class based on the @type argument + classes.push(`hds-badge--type-${this.type}`); + + // add a class based on the @color argument + classes.push(`hds-badge--color-${this.color}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsBadge); + +export { COLORS, DEFAULT_COLOR, DEFAULT_SIZE, DEFAULT_TYPE, SIZES, TYPES, HdsBadge as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/badge/index.js.map b/packages/components/dist/components/hds/badge/index.js.map new file mode 100644 index 0000000000..f8d3930749 --- /dev/null +++ b/packages/components/dist/components/hds/badge/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/badge/index.hbs","../../../../src/components/hds/badge/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n {{#if this.isIconOnly}}\\n {{this.text}}\\n {{else}}\\n
    \\n {{this.text}}\\n
    \\n {{/if}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport {\n HdsBadgeColorValues,\n HdsBadgeSizeValues,\n HdsBadgeTypeValues,\n} from './types.ts';\n\nimport type { HdsBadgeColors, HdsBadgeSizes, HdsBadgeTypes } from './types.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport const SIZES: string[] = Object.values(HdsBadgeSizeValues);\nexport const TYPES: string[] = Object.values(HdsBadgeTypeValues);\nexport const COLORS: string[] = Object.values(HdsBadgeColorValues);\nexport const DEFAULT_SIZE = HdsBadgeSizeValues.Medium;\nexport const DEFAULT_TYPE = HdsBadgeTypeValues.Filled;\nexport const DEFAULT_COLOR = HdsBadgeColorValues.Neutral;\n\nexport interface HdsBadgeSignature {\n Args: {\n size?: HdsBadgeSizes;\n type?: HdsBadgeTypes;\n color?: HdsBadgeColors;\n text: string | number;\n icon?: HdsIconSignature['Args']['name'];\n isIconOnly?: boolean;\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsBadge extends Component {\n /**\n * Sets the size for the component\n * Accepted values: small, medium, large\n *\n * @param size\n * @type {HdsBadgeSizes}\n * @default 'medium'\n */\n get size(): HdsBadgeSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Badge\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Sets the type of the component\n * Accepted values: filled, inverted, outlined\n *\n * @param type\n * @type {HdsBadgeTypes}\n * @default 'filled'\n */\n get type(): HdsBadgeTypes {\n const { type = DEFAULT_TYPE } = this.args;\n\n assert(\n `@type for \"Hds::Badge\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${type}`,\n TYPES.includes(type)\n );\n\n return type;\n }\n\n /**\n * Sets the color scheme for the component\n * Accepted values: neutral, neutral-dark-mode, highlight, success, warning, critical\n *\n * @param color\n * @type {HdsBadgeColors}\n * @default 'neutral'\n */\n get color(): HdsBadgeColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Badge\" 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 text\n * @type {string}\n * @description The text of the badge. If `isIconOnly` is set to `true`, the text will be visually hidden but still available to assistive technology. If no text value is defined, an error will be thrown.\n */\n get text(): string | number {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Badge\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param isIconOnly\n * @type {boolean}\n * @default false\n * @description Indicates if the badge will only contain an icon; component will also ensure that accessible text is still applied to the component.\n */\n get isIconOnly(): boolean {\n if (this.args.icon) {\n return this.args.isIconOnly ?? false;\n }\n\n return false;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Badge#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-badge'];\n\n // add a class based on the @size argument\n classes.push(`hds-badge--size-${this.size}`);\n\n // add a class based on the @type argument\n classes.push(`hds-badge--type-${this.type}`);\n\n // add a class based on the @color argument\n classes.push(`hds-badge--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["SIZES","Object","values","HdsBadgeSizeValues","TYPES","HdsBadgeTypeValues","COLORS","HdsBadgeColorValues","DEFAULT_SIZE","Medium","DEFAULT_TYPE","Filled","DEFAULT_COLOR","Neutral","HdsBadge","Component","size","args","assert","join","includes","type","color","text","undefined","isIconOnly","icon","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,kcAAkc;;ACDpe;AACA;AACA;AACA;;AAcO,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,kBAAkB;AACxD,MAAMC,KAAe,GAAGH,MAAM,CAACC,MAAM,CAACG,kBAAkB;AACxD,MAAMC,MAAgB,GAAGL,MAAM,CAACC,MAAM,CAACK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A;EACE,IAAIC,IAAIA,GAAoB;IAC1B,MAAM;AAAEA,MAAAA;KAAM,GAAG,IAAI,CAACN,IAAI;AAE1BC,IAAAA,MAAM,CACJ,gDAAgD,EAChDK,IAAI,KAAKC,SACX,CAAC;AAED,IAAA,OAAOD,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,UAAUA,GAAY;AACxB,IAAA,IAAI,IAAI,CAACR,IAAI,CAACS,IAAI,EAAE;AAClB,MAAA,OAAO,IAAI,CAACT,IAAI,CAACQ,UAAU,IAAI,KAAK;AACtC;AAEA,IAAA,OAAO,KAAK;AACd;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,WAAW,CAAC;;AAE7B;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,gBAAA,EAAmB,IAAI,CAACb,IAAI,EAAE,CAAC;;AAE5C;IACAY,OAAO,CAACC,IAAI,CAAC,CAAA,gBAAA,EAAmB,IAAI,CAACR,IAAI,EAAE,CAAC;;AAE5C;IACAO,OAAO,CAACC,IAAI,CAAC,CAAA,iBAAA,EAAoB,IAAI,CAACP,KAAK,EAAE,CAAC;AAE9C,IAAA,OAAOM,OAAO,CAACT,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACW,oBAAA,CAAAC,QAAA,EAjHoBjB,QAAQ,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/badge/types.js b/packages/components/dist/components/hds/badge/types.js new file mode 100644 index 0000000000..62c898636a --- /dev/null +++ b/packages/components/dist/components/hds/badge/types.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsBadgeSizeValues = /*#__PURE__*/function (HdsBadgeSizeValues) { + HdsBadgeSizeValues["Small"] = "small"; + HdsBadgeSizeValues["Medium"] = "medium"; + HdsBadgeSizeValues["Large"] = "large"; + return HdsBadgeSizeValues; +}({}); +let HdsBadgeTypeValues = /*#__PURE__*/function (HdsBadgeTypeValues) { + HdsBadgeTypeValues["Filled"] = "filled"; + HdsBadgeTypeValues["Inverted"] = "inverted"; + HdsBadgeTypeValues["Outlined"] = "outlined"; + return HdsBadgeTypeValues; +}({}); +let HdsBadgeColorValues = /*#__PURE__*/function (HdsBadgeColorValues) { + HdsBadgeColorValues["Neutral"] = "neutral"; + HdsBadgeColorValues["NeutralDarkMode"] = "neutral-dark-mode"; + HdsBadgeColorValues["Highlight"] = "highlight"; + HdsBadgeColorValues["Success"] = "success"; + HdsBadgeColorValues["Warning"] = "warning"; + HdsBadgeColorValues["Critical"] = "critical"; + return HdsBadgeColorValues; +}({}); + +export { HdsBadgeColorValues, HdsBadgeSizeValues, HdsBadgeTypeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/badge/types.js.map b/packages/components/dist/components/hds/badge/types.js.map new file mode 100644 index 0000000000..5fc2e65a4a --- /dev/null +++ b/packages/components/dist/components/hds/badge/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/badge/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsBadgeSizeValues {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\nexport type HdsBadgeSizes = `${HdsBadgeSizeValues}`;\n\nexport enum HdsBadgeTypeValues {\n Filled = 'filled',\n Inverted = 'inverted',\n Outlined = 'outlined',\n}\nexport type HdsBadgeTypes = `${HdsBadgeTypeValues}`;\n\nexport enum HdsBadgeColorValues {\n Neutral = 'neutral',\n NeutralDarkMode = 'neutral-dark-mode',\n Highlight = 'highlight',\n Success = 'success',\n Warning = 'warning',\n Critical = 'critical',\n}\nexport type HdsBadgeColors = `${HdsBadgeColorValues}`;\n"],"names":["HdsBadgeSizeValues","HdsBadgeTypeValues","HdsBadgeColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAlBA,kBAAkB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAlBA,kBAAkB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAAlBA,kBAAkB;AAAA,CAAA,CAAA,EAAA;AAOlBC,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAlBA,kBAAkB,CAAA,UAAA,CAAA,GAAA,UAAA;EAAlBA,kBAAkB,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAAlBA,kBAAkB;AAAA,CAAA,CAAA,EAAA;AAOlBC,IAAAA,mBAAmB,0BAAnBA,mBAAmB,EAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,iBAAA,CAAA,GAAA,mBAAA;EAAnBA,mBAAmB,CAAA,WAAA,CAAA,GAAA,WAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAnBA,mBAAmB,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAAnBA,mBAAmB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/breadcrumb/index.js b/packages/components/dist/components/hds/breadcrumb/index.js new file mode 100644 index 0000000000..60bb9cd446 --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/index.js @@ -0,0 +1,66 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const NOOP = () => {}; +class HdsBreadcrumb extends Component { + /** + * @param onDidInsert + * @type {function} + * @default () => {} + */ + get didInsert() { + const { + didInsert + } = this.args; + if (typeof didInsert === 'function') { + return didInsert; + } else { + return NOOP; + } + } + + /** + * @param itemsCanWrap + * @type {boolean} + * @default true + */ + get itemsCanWrap() { + return this.args.itemsCanWrap ?? true; + } + + /** + * @param ariaLabel + * @type {string} + * @default 'breadcrumbs' + */ + get ariaLabel() { + return this.args.ariaLabel ?? 'breadcrumbs'; + } + + /** + * Get the class names to apply to the component. + * @method Breadcrumb#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-breadcrumb']; + + // add a class based on the @itemsCanWrap argument + if (this.itemsCanWrap) { + classes.push('hds-breadcrumb--items-can-wrap'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsBreadcrumb); + +export { HdsBreadcrumb as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/breadcrumb/index.js.map b/packages/components/dist/components/hds/breadcrumb/index.js.map new file mode 100644 index 0000000000..e6b53db708 --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/breadcrumb/index.hbs","../../../../src/components/hds/breadcrumb/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsBreadcrumbSignature {\n Args: {\n ariaLabel?: string;\n itemsCanWrap?: boolean;\n didInsert?: () => void;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLElement;\n}\n\nconst NOOP = () => {};\n\nexport default class HdsBreadcrumb extends Component {\n /**\n * @param onDidInsert\n * @type {function}\n * @default () => {}\n */\n get didInsert(): () => void {\n const { didInsert } = this.args;\n\n if (typeof didInsert === 'function') {\n return didInsert;\n } else {\n return NOOP;\n }\n }\n\n /**\n * @param itemsCanWrap\n * @type {boolean}\n * @default true\n */\n get itemsCanWrap(): boolean {\n return this.args.itemsCanWrap ?? true;\n }\n\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'breadcrumbs'\n */\n get ariaLabel(): string {\n return this.args.ariaLabel ?? 'breadcrumbs';\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Breadcrumb#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-breadcrumb'];\n\n // add a class based on the @itemsCanWrap argument\n if (this.itemsCanWrap) {\n classes.push('hds-breadcrumb--items-can-wrap');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["NOOP","HdsBreadcrumb","Component","didInsert","args","itemsCanWrap","ariaLabel","classNames","classes","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gQAAgQ;;ACDlS;AACA;AACA;AACA;;AAgBA,MAAMA,IAAI,GAAGA,MAAM,EAAE;AAEN,MAAMC,aAAa,SAASC,SAAS,CAAyB;AAC3E;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAe;IAC1B,MAAM;AAAEA,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;AAE/B,IAAA,IAAI,OAAOD,SAAS,KAAK,UAAU,EAAE;AACnC,MAAA,OAAOA,SAAS;AAClB,KAAC,MAAM;AACL,MAAA,OAAOH,IAAI;AACb;AACF;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIK,YAAYA,GAAY;AAC1B,IAAA,OAAO,IAAI,CAACD,IAAI,CAACC,YAAY,IAAI,IAAI;AACvC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAW;AACtB,IAAA,OAAO,IAAI,CAACF,IAAI,CAACE,SAAS,IAAI,aAAa;AAC7C;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC;;AAElC;IACA,IAAI,IAAI,CAACH,YAAY,EAAE;AACrBG,MAAAA,OAAO,CAACC,IAAI,CAAC,gCAAgC,CAAC;AAChD;AAEA,IAAA,OAAOD,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAjDoBX,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/breadcrumb/item.js b/packages/components/dist/components/hds/breadcrumb/item.js new file mode 100644 index 0000000000..7365d53c29 --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/item.js @@ -0,0 +1,59 @@ +import Component from '@glimmer/component'; +import { htmlSafe } from '@ember/template'; +import { assert } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n {{#if @current}}\n
    \n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n {{@text}}\n
    \n {{else}}\n {{#if @isRouteExternal}}\n \n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n {{@text}}\n \n {{else}}\n \n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n {{@text}}\n \n {{/if}}\n {{/if}}\n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsBreadcrumbItem extends Component { + /** + * @param maxWidth + * @type {string} + * @default undefined + * @description A parameter that can be applied to an "item" to limit its max-width + */ + get maxWidth() { + const { + maxWidth + } = this.args; + if (maxWidth) { + assert(`@maxWidth for "Hds::Breadcrumb::Item" must be a size as number in 'px' or in 'em' (eg. '200px' or '24em'); received: ${maxWidth}`, maxWidth.match(/^\d+(px|em)$/)); + return maxWidth; + } else { + return undefined; + } + } + + /** + * Get the inline style to apply to the item. + * @method BreadcrumbItem#itemStyle + * @return {string} The "style" attribute to apply to the item. + */ + get itemStyle() { + if (this.maxWidth) { + return htmlSafe(`max-width: ${this.maxWidth}`); + } else { + return undefined; + } + } + + /** + * Get the class names to apply to the component. + * @method BreadcrumbItem#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-breadcrumb__item']; + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsBreadcrumbItem); + +export { HdsBreadcrumbItem as default }; +//# sourceMappingURL=item.js.map diff --git a/packages/components/dist/components/hds/breadcrumb/item.js.map b/packages/components/dist/components/hds/breadcrumb/item.js.map new file mode 100644 index 0000000000..7a31a29ae0 --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/item.js.map @@ -0,0 +1 @@ +{"version":3,"file":"item.js","sources":["../../../../src/components/hds/breadcrumb/item.hbs","../../../../src/components/hds/breadcrumb/item.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n {{#if @current}}\\n
    \\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n {{@text}}\\n
    \\n {{else}}\\n {{#if @isRouteExternal}}\\n \\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n {{@text}}\\n \\n {{else}}\\n \\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n {{@text}}\\n \\n {{/if}}\\n {{/if}}\\n
  • \")","/**\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';\nimport type { SafeString } from '@ember/template/-private/handlebars';\nimport type { HdsIconSignature } from '../icon';\n\nexport interface HdsBreadcrumbItemSignature {\n Args: {\n current?: boolean;\n maxWidth?: string;\n text: string;\n isRouteExternal?: boolean;\n icon?: HdsIconSignature['Args']['name'];\n route?: string;\n models?: Array;\n model?: string | number;\n query?: Record;\n 'current-when'?: string;\n replace?: boolean;\n };\n Element: HTMLLIElement;\n}\n\nexport default class HdsBreadcrumbItem extends Component {\n /**\n * @param maxWidth\n * @type {string}\n * @default undefined\n * @description A parameter that can be applied to an \"item\" to limit its max-width\n */\n get maxWidth(): string | undefined {\n const { maxWidth } = this.args;\n\n if (maxWidth) {\n assert(\n `@maxWidth for \"Hds::Breadcrumb::Item\" must be a size as number in 'px' or in 'em' (eg. '200px' or '24em'); received: ${maxWidth}`,\n maxWidth.match(/^\\d+(px|em)$/)\n );\n\n return maxWidth;\n } else {\n return undefined;\n }\n }\n\n /**\n * Get the inline style to apply to the item.\n * @method BreadcrumbItem#itemStyle\n * @return {string} The \"style\" attribute to apply to the item.\n */\n get itemStyle(): SafeString | undefined {\n if (this.maxWidth) {\n return htmlSafe(`max-width: ${this.maxWidth}`);\n } else {\n return undefined;\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method BreadcrumbItem#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-breadcrumb__item'];\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsBreadcrumbItem","Component","maxWidth","args","assert","match","undefined","itemStyle","htmlSafe","classNames","classes","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,ilDAAilD;;ACDnnD;AACA;AACA;AACA;;AAyBe,MAAMA,iBAAiB,SAASC,SAAS,CAA6B;AACnF;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,QAAQA,GAAuB;IACjC,MAAM;AAAEA,MAAAA;KAAU,GAAG,IAAI,CAACC,IAAI;AAE9B,IAAA,IAAID,QAAQ,EAAE;MACZE,MAAM,CACJ,CAAwHF,qHAAAA,EAAAA,QAAQ,CAAE,CAAA,EAClIA,QAAQ,CAACG,KAAK,CAAC,cAAc,CAC/B,CAAC;AAED,MAAA,OAAOH,QAAQ;AACjB,KAAC,MAAM;AACL,MAAA,OAAOI,SAAS;AAClB;AACF;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAA2B;IACtC,IAAI,IAAI,CAACL,QAAQ,EAAE;AACjB,MAAA,OAAOM,QAAQ,CAAC,CAAA,WAAA,EAAc,IAAI,CAACN,QAAQ,EAAE,CAAC;AAChD,KAAC,MAAM;AACL,MAAA,OAAOI,SAAS;AAClB;AACF;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIG,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,sBAAsB,CAAC;AAExC,IAAA,OAAOA,OAAO,CAACC,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA7CoBb,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/breadcrumb/truncation.js b/packages/components/dist/components/hds/breadcrumb/truncation.js new file mode 100644 index 0000000000..e542468bd5 --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/truncation.js @@ -0,0 +1,25 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n \n
    \n \n \n \n \n
      \n {{yield}}\n
    \n
    \n \n
    \n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsBreadcrumbTruncation extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'show more' + */ + get ariaLabel() { + return this.args.ariaLabel ?? 'show more'; + } +} +setComponentTemplate(TEMPLATE, HdsBreadcrumbTruncation); + +export { HdsBreadcrumbTruncation as default }; +//# sourceMappingURL=truncation.js.map diff --git a/packages/components/dist/components/hds/breadcrumb/truncation.js.map b/packages/components/dist/components/hds/breadcrumb/truncation.js.map new file mode 100644 index 0000000000..9f68d8d5be --- /dev/null +++ b/packages/components/dist/components/hds/breadcrumb/truncation.js.map @@ -0,0 +1 @@ +{"version":3,"file":"truncation.js","sources":["../../../../src/components/hds/breadcrumb/truncation.hbs","../../../../src/components/hds/breadcrumb/truncation.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n \\n
    \\n \\n \\n \\n \\n
      \\n {{yield}}\\n
    \\n
    \\n \\n
    \\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsBreadcrumbTruncationSignature {\n Args: {\n ariaLabel?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLLIElement;\n}\n\nexport default class HdsBreadcrumbTruncation extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'show more'\n */\n get ariaLabel(): string {\n return this.args.ariaLabel ?? 'show more';\n }\n}\n"],"names":["HdsBreadcrumbTruncation","Component","ariaLabel","args","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,s5BAAs5B;;ACDx7B;AACA;AACA;AACA;;AAce,MAAMA,uBAAuB,SAASC,SAAS,CAAmC;AAC/F;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAW;AACtB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,WAAW;AAC3C;AACF;AAACE,oBAAA,CAAAC,QAAA,EAToBL,uBAAuB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/button-set/index.js b/packages/components/dist/components/hds/button-set/index.js new file mode 100644 index 0000000000..d1a8608ea2 --- /dev/null +++ b/packages/components/dist/components/hds/button-set/index.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsButtonSet = TemplateOnlyComponent(); +var index = setComponentTemplate(TEMPLATE, HdsButtonSet); + +export { index as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/button-set/index.js.map b/packages/components/dist/components/hds/button-set/index.js.map new file mode 100644 index 0000000000..d08387163a --- /dev/null +++ b/packages/components/dist/components/hds/button-set/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/button-set/index.hbs","../../../../src/components/hds/button-set/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\nexport interface HdsButtonSetSignature {\n Blocks: { default: [] };\n Element: HTMLDivElement;\n}\nconst HdsButtonSet = TemplateOnlyComponent();\n\nexport default HdsButtonSet;\n"],"names":["HdsButtonSet","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iJAAiJ;;ACDnL;AACA;AACA;AACA;;AAOA,MAAMA,YAAY,GAAGC,qBAAqB,EAAyB;AAEnE,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/button/index.js b/packages/components/dist/components/hds/button/index.js new file mode 100644 index 0000000000..281eb142e1 --- /dev/null +++ b/packages/components/dist/components/hds/button/index.js @@ -0,0 +1,151 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsButtonSizeValues, HdsButtonColorValues, HdsButtonIconPositionValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{#if this.isIconOnly}}\n {{#if this.icon}}\n \n \n \n {{/if}}\n {{else}}\n {{#if this.icon}}\n {{#if (eq this.iconPosition \"leading\")}}\n \n \n \n \n {{this.text}}\n \n {{else}}\n \n {{this.text}}\n \n \n \n \n {{/if}}\n {{else}}\n \n {{this.text}}\n \n {{/if}}\n {{/if}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const SIZES = Object.values(HdsButtonSizeValues); +const COLORS = Object.values(HdsButtonColorValues); +const ICONPOSITIONS = Object.values(HdsButtonIconPositionValues); +const DEFAULT_SIZE = HdsButtonSizeValues.Medium; +const DEFAULT_COLOR = HdsButtonColorValues.Primary; +const DEFAULT_ICONPOSITION = HdsButtonIconPositionValues.Leading; +class HdsButton extends Component { + /** + * @param text + * @type {string} + * @description The text of the button or value of `aria-label` if `isIconOnly` is set to `true`. If no text value is defined an error will be thrown. + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Button" must have a valid value', text !== undefined); + return text; + } + + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small`, `medium`, and `large` + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Button" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary`, `secondary`, and `critical` + */ + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Button" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + get icon() { + assert(`when the "Hds::Button" @color is "tertiary" an @icon is required`, !(this.color === 'tertiary' && !this.args.icon)); + return this.args.icon ?? undefined; + } + + /** + * @param isIconOnly + * @type {boolean} + * @default false + * @description Indicates if the button will only contain an icon; component will also ensure that accessible text is still applied to the component. + */ + get isIconOnly() { + if (this.icon) { + return this.args.isIconOnly ?? false; + } + return false; + } + + /** + * @param iconPosition + * @type {string} + * @default leading + * @description Positions the icon before or after the text; allowed values are `leading` or `trailing` + */ + get iconPosition() { + const { + iconPosition = DEFAULT_ICONPOSITION + } = this.args; + assert(`@iconPosition for "Hds::Button" must be one of the following: ${ICONPOSITIONS.join(', ')}; received: ${iconPosition}`, ICONPOSITIONS.includes(iconPosition)); + return iconPosition; + } + + /** + * @param iconSize + * @type {string} + * @default 16 + * @description ensures that the correct icon size is used. Automatically calculated. + */ + get iconSize() { + if (this.args.size === 'large') { + return '24'; + } else { + return '16'; + } + } + + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that a button should take up the full width of the parent container. The default is false. + */ + get isFullWidth() { + return this.args.isFullWidth ?? false; + } + + /** + * Get the class names to apply to the component. + * @method Button#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-button']; + + // add a class based on the @color argument + classes.push(`hds-button--color-${this.color}`); + + // add a class based on the @isFullWidth argument + if (this.isFullWidth) { + classes.push('hds-button--width-full'); + } + + // add a class based on isIconOnly argument + if (this.isIconOnly) { + classes.push('hds-button--is-icon-only'); + } + + // add a class based on the @isInline argument + if (this.args.isInline) { + classes.push('hds-button--is-inline'); + } + + // add a class based on the @size argument + classes.push(`hds-button--size-${this.size}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsButton); + +export { COLORS, DEFAULT_COLOR, DEFAULT_ICONPOSITION, DEFAULT_SIZE, ICONPOSITIONS, SIZES, HdsButton as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/button/index.js.map b/packages/components/dist/components/hds/button/index.js.map new file mode 100644 index 0000000000..9a0abf620f --- /dev/null +++ b/packages/components/dist/components/hds/button/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/button/index.hbs","../../../../src/components/hds/button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{#if this.isIconOnly}}\\n {{#if this.icon}}\\n \\n \\n \\n {{/if}}\\n {{else}}\\n {{#if this.icon}}\\n {{#if (eq this.iconPosition \\\"leading\\\")}}\\n \\n \\n \\n \\n {{this.text}}\\n \\n {{else}}\\n \\n {{this.text}}\\n \\n \\n \\n \\n {{/if}}\\n {{else}}\\n \\n {{this.text}}\\n \\n {{/if}}\\n {{/if}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport {\n HdsButtonSizeValues,\n HdsButtonColorValues,\n HdsButtonIconPositionValues,\n} from './types.ts';\n\nimport type {\n HdsButtonSizes,\n HdsButtonColors,\n HdsButtonIconPositions,\n} from './types.ts';\nimport type { HdsInteractiveSignature } from '../interactive/';\nimport type { HdsIconSignature } from '../icon';\n\nexport const SIZES: string[] = Object.values(HdsButtonSizeValues);\nexport const COLORS: string[] = Object.values(HdsButtonColorValues);\nexport const ICONPOSITIONS: string[] = Object.values(\n HdsButtonIconPositionValues\n);\nexport const DEFAULT_SIZE = HdsButtonSizeValues.Medium;\nexport const DEFAULT_COLOR = HdsButtonColorValues.Primary;\nexport const DEFAULT_ICONPOSITION = HdsButtonIconPositionValues.Leading;\n\nexport interface HdsButtonSignature {\n Args: HdsInteractiveSignature['Args'] & {\n size?: HdsButtonSizes;\n color?: HdsButtonColors;\n text: string;\n icon?: HdsIconSignature['Args']['name'];\n iconPosition?: HdsButtonIconPositions;\n isIconOnly?: boolean;\n isFullWidth?: boolean;\n isInline?: boolean;\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nexport default class HdsButton extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the button or value of `aria-label` if `isIconOnly` is set to `true`. If no text value is defined an error will be thrown.\n */\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Button\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the button; acceptable values are `small`, `medium`, and `large`\n */\n get size(): HdsButtonSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Button\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of button to be used; acceptable values are `primary`, `secondary`, and `critical`\n */\n get color(): HdsButtonColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Button\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n get icon(): HdsIconSignature['Args']['name'] | undefined {\n assert(\n `when the \"Hds::Button\" @color is \"tertiary\" an @icon is required`,\n !(this.color === 'tertiary' && !this.args.icon)\n );\n\n return this.args.icon ?? undefined;\n }\n\n /**\n * @param isIconOnly\n * @type {boolean}\n * @default false\n * @description Indicates if the button will only contain an icon; component will also ensure that accessible text is still applied to the component.\n */\n get isIconOnly(): boolean {\n if (this.icon) {\n return this.args.isIconOnly ?? false;\n }\n return false;\n }\n\n /**\n * @param iconPosition\n * @type {string}\n * @default leading\n * @description Positions the icon before or after the text; allowed values are `leading` or `trailing`\n */\n get iconPosition(): HdsButtonIconPositions {\n const { iconPosition = DEFAULT_ICONPOSITION } = this.args;\n\n assert(\n `@iconPosition for \"Hds::Button\" must be one of the following: ${ICONPOSITIONS.join(\n ', '\n )}; received: ${iconPosition}`,\n ICONPOSITIONS.includes(iconPosition)\n );\n\n return iconPosition;\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @default 16\n * @description ensures that the correct icon size is used. Automatically calculated.\n */\n get iconSize(): HdsIconSignature['Args']['size'] {\n if (this.args.size === 'large') {\n return '24';\n } else {\n return '16';\n }\n }\n\n /**\n * @param isFullWidth\n * @type {boolean}\n * @default false\n * @description Indicates that a button should take up the full width of the parent container. The default is false.\n */\n get isFullWidth(): boolean {\n return this.args.isFullWidth ?? false;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Button#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-button'];\n\n // add a class based on the @color argument\n classes.push(`hds-button--color-${this.color}`);\n\n // add a class based on the @isFullWidth argument\n if (this.isFullWidth) {\n classes.push('hds-button--width-full');\n }\n\n // add a class based on isIconOnly argument\n if (this.isIconOnly) {\n classes.push('hds-button--is-icon-only');\n }\n\n // add a class based on the @isInline argument\n if (this.args.isInline) {\n classes.push('hds-button--is-inline');\n }\n\n // add a class based on the @size argument\n classes.push(`hds-button--size-${this.size}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["SIZES","Object","values","HdsButtonSizeValues","COLORS","HdsButtonColorValues","ICONPOSITIONS","HdsButtonIconPositionValues","DEFAULT_SIZE","Medium","DEFAULT_COLOR","Primary","DEFAULT_ICONPOSITION","Leading","HdsButton","Component","text","args","assert","undefined","size","join","includes","color","icon","isIconOnly","iconPosition","iconSize","isFullWidth","classNames","classes","push","isInline","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,k3CAAk3C;;ACDp5C;AACA;AACA;AACA;;AAmBO,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,mBAAmB;AACzD,MAAMC,MAAgB,GAAGH,MAAM,CAACC,MAAM,CAACG,oBAAoB;AAC3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,CAAC;AACxC;;AAEA;IACA,IAAI,IAAI,CAACN,UAAU,EAAE;AACnBK,MAAAA,OAAO,CAACC,IAAI,CAAC,0BAA0B,CAAC;AAC1C;;AAEA;AACA,IAAA,IAAI,IAAI,CAACd,IAAI,CAACe,QAAQ,EAAE;AACtBF,MAAAA,OAAO,CAACC,IAAI,CAAC,uBAAuB,CAAC;AACvC;;AAEA;IACAD,OAAO,CAACC,IAAI,CAAC,CAAA,iBAAA,EAAoB,IAAI,CAACX,IAAI,EAAE,CAAC;AAE7C,IAAA,OAAOU,OAAO,CAACT,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACY,oBAAA,CAAAC,QAAA,EAvJoBpB,SAAS,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/button/types.js b/packages/components/dist/components/hds/button/types.js new file mode 100644 index 0000000000..7b53e95e03 --- /dev/null +++ b/packages/components/dist/components/hds/button/types.js @@ -0,0 +1,26 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsButtonSizeValues = /*#__PURE__*/function (HdsButtonSizeValues) { + HdsButtonSizeValues["Small"] = "small"; + HdsButtonSizeValues["Medium"] = "medium"; + HdsButtonSizeValues["Large"] = "large"; + return HdsButtonSizeValues; +}({}); +let HdsButtonColorValues = /*#__PURE__*/function (HdsButtonColorValues) { + HdsButtonColorValues["Primary"] = "primary"; + HdsButtonColorValues["Secondary"] = "secondary"; + HdsButtonColorValues["Tertiary"] = "tertiary"; + HdsButtonColorValues["Critical"] = "critical"; + return HdsButtonColorValues; +}({}); +let HdsButtonIconPositionValues = /*#__PURE__*/function (HdsButtonIconPositionValues) { + HdsButtonIconPositionValues["Leading"] = "leading"; + HdsButtonIconPositionValues["Trailing"] = "trailing"; + return HdsButtonIconPositionValues; +}({}); + +export { HdsButtonColorValues, HdsButtonIconPositionValues, HdsButtonSizeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/button/types.js.map b/packages/components/dist/components/hds/button/types.js.map new file mode 100644 index 0000000000..775d51825c --- /dev/null +++ b/packages/components/dist/components/hds/button/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/button/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsButtonSizeValues {\n Small = 'small',\n Medium = 'medium',\n Large = 'large',\n}\nexport type HdsButtonSizes = `${HdsButtonSizeValues}`;\n\nexport enum HdsButtonColorValues {\n Primary = 'primary',\n Secondary = 'secondary',\n Tertiary = 'tertiary',\n Critical = 'critical',\n}\nexport type HdsButtonColors = `${HdsButtonColorValues}`;\n\nexport enum HdsButtonIconPositionValues {\n Leading = 'leading',\n Trailing = 'trailing',\n}\nexport type HdsButtonIconPositions = `${HdsButtonIconPositionValues}`;\n"],"names":["HdsButtonSizeValues","HdsButtonColorValues","HdsButtonIconPositionValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,mBAAmB,0BAAnBA,mBAAmB,EAAA;EAAnBA,mBAAmB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAnBA,mBAAmB,CAAA,QAAA,CAAA,GAAA,QAAA;EAAnBA,mBAAmB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAAnBA,mBAAmB;AAAA,CAAA,CAAA,EAAA;AAOnBC,IAAAA,oBAAoB,0BAApBA,oBAAoB,EAAA;EAApBA,oBAAoB,CAAA,SAAA,CAAA,GAAA,SAAA;EAApBA,oBAAoB,CAAA,WAAA,CAAA,GAAA,WAAA;EAApBA,oBAAoB,CAAA,UAAA,CAAA,GAAA,UAAA;EAApBA,oBAAoB,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAApBA,oBAAoB;AAAA,CAAA,CAAA,EAAA;AAQpBC,IAAAA,2BAA2B,0BAA3BA,2BAA2B,EAAA;EAA3BA,2BAA2B,CAAA,SAAA,CAAA,GAAA,SAAA;EAA3BA,2BAA2B,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAA3BA,2BAA2B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/card/container.js b/packages/components/dist/components/hds/card/container.js new file mode 100644 index 0000000000..ca6ea2dba6 --- /dev/null +++ b/packages/components/dist/components/hds/card/container.js @@ -0,0 +1,131 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsCardLevelValues, HdsCardBackgroundValues, HdsCardOverflowValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const DEFAULT_LEVEL = HdsCardLevelValues.Base; +const DEFAULT_BACKGROUND = HdsCardBackgroundValues.NeutralPrimary; +const DEFAULT_OVERFLOW = HdsCardOverflowValues.Visible; +const AVAILABLE_LEVELS = Object.values(HdsCardLevelValues); +const AVAILABLE_BACKGROUNDS = Object.values(HdsCardBackgroundValues); +const AVAILABLE_OVERFLOWS = Object.values(HdsCardOverflowValues); +class HdsCardContainer extends Component { + /** + * Sets the "elevation" level for the component + * Accepted values: base, mid, high + * + * @param level + * @type {HdsCardLevel} + * @default 'base' + */ + get level() { + const { + level = DEFAULT_LEVEL + } = this.args; + assert(`@level for "Hds::Card::Container" must be one of the following: ${AVAILABLE_LEVELS.join(', ')}; received: ${level}`, AVAILABLE_LEVELS.includes(level)); + return level; + } + + /** + * Sets the "elevation" level for the component on ":hover" state + * Accepted values: base, mid, high + * + * @param levelHover + * @type {HdsCardLevel} + */ + get levelHover() { + const { + levelHover + } = this.args; + if (levelHover) { + assert(`@levelHover for "Hds::Card::Container" must be one of the following: ${AVAILABLE_LEVELS.join(', ')}; received: ${levelHover}`, AVAILABLE_LEVELS.includes(levelHover)); + } + return levelHover; + } + + /** + * Sets the "elevation" level for the component on ":active" state + * Accepted values: base, mid, high + * + * @param levelActive + * @type {HdsCardLevel} + */ + get levelActive() { + const { + levelActive + } = this.args; + if (levelActive) { + assert(`@levelActive for "Hds::Card::Container" must be one of the following: ${AVAILABLE_LEVELS.join(', ')}; received: ${levelActive}`, AVAILABLE_LEVELS.includes(levelActive)); + } + return levelActive; + } + + /** + * Sets the background for the component + * Accepted values: neutral-primary, neutral-secondary + * + * @param background + * @type {HdsCardBackground} + * @default 'base' + */ + get background() { + const { + background = DEFAULT_BACKGROUND + } = this.args; + assert(`@background for "Hds::Card::Container" must be one of the following: ${AVAILABLE_BACKGROUNDS.join(', ')}; received: ${background}`, AVAILABLE_BACKGROUNDS.includes(background)); + return background; + } + + /** + * Sets the level for the card + * Accepted values: visible, hidden + * + * @param overflow + * @type {HdsCardOverflow} + * @default 'visible' + */ + get overflow() { + const { + overflow = DEFAULT_OVERFLOW + } = this.args; + assert(`@overflow for "Hds::Card::Container" must be one of the following: ${AVAILABLE_OVERFLOWS.join(', ')}; received: ${overflow}`, AVAILABLE_OVERFLOWS.includes(overflow)); + return overflow; + } + + /** + * Get the class names to apply to the component. + * @method Card#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-card__container']; + + // add "elevation" classes based on the @level and @hasBorder arguments + classes.push(`hds-card__container--level-${this.args.hasBorder ? 'surface' : 'elevation'}-${this.level}`); + if (this.levelHover) { + classes.push(`hds-card__container--hover-level-${this.args.hasBorder ? 'surface' : 'elevation'}-${this.levelHover}`); + } + if (this.levelActive) { + classes.push(`hds-card__container--active-level-${this.args.hasBorder ? 'surface' : 'elevation'}-${this.levelActive}`); + } + + // add a class based on the @background argument + classes.push(`hds-card__container--background-${this.background}`); + + // add a class based on the @overflow argument + classes.push(`hds-card__container--overflow-${this.overflow}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsCardContainer); + +export { AVAILABLE_BACKGROUNDS, AVAILABLE_LEVELS, AVAILABLE_OVERFLOWS, DEFAULT_BACKGROUND, DEFAULT_LEVEL, DEFAULT_OVERFLOW, HdsCardContainer as default }; +//# sourceMappingURL=container.js.map diff --git a/packages/components/dist/components/hds/card/container.js.map b/packages/components/dist/components/hds/card/container.js.map new file mode 100644 index 0000000000..e5d2c56598 --- /dev/null +++ b/packages/components/dist/components/hds/card/container.js.map @@ -0,0 +1 @@ +{"version":3,"file":"container.js","sources":["../../../../src/components/hds/card/container.hbs","../../../../src/components/hds/card/container.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport {\n HdsCardBackgroundValues,\n HdsCardLevelValues,\n HdsCardOverflowValues,\n} from './types.ts';\nimport type {\n HdsCardBackground,\n HdsCardLevel,\n HdsCardOverflow,\n} from './types.ts';\n\nexport const DEFAULT_LEVEL = HdsCardLevelValues.Base;\nexport const DEFAULT_BACKGROUND = HdsCardBackgroundValues.NeutralPrimary;\nexport const DEFAULT_OVERFLOW = HdsCardOverflowValues.Visible;\nexport const AVAILABLE_LEVELS: string[] = Object.values(HdsCardLevelValues);\nexport const AVAILABLE_BACKGROUNDS: string[] = Object.values(\n HdsCardBackgroundValues\n);\nexport const AVAILABLE_OVERFLOWS: string[] = Object.values(\n HdsCardOverflowValues\n);\n\nexport interface HdsCardContainerSignature {\n Args: {\n level?: HdsCardLevel;\n levelActive?: HdsCardLevel;\n levelHover?: HdsCardLevel;\n background?: HdsCardBackground;\n hasBorder?: boolean;\n overflow?: HdsCardOverflow;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsCardContainer extends Component {\n /**\n * Sets the \"elevation\" level for the component\n * Accepted values: base, mid, high\n *\n * @param level\n * @type {HdsCardLevel}\n * @default 'base'\n */\n get level(): HdsCardLevel {\n const { level = DEFAULT_LEVEL } = this.args;\n\n assert(\n `@level for \"Hds::Card::Container\" must be one of the following: ${AVAILABLE_LEVELS.join(\n ', '\n )}; received: ${level}`,\n AVAILABLE_LEVELS.includes(level)\n );\n\n return level;\n }\n\n /**\n * Sets the \"elevation\" level for the component on \":hover\" state\n * Accepted values: base, mid, high\n *\n * @param levelHover\n * @type {HdsCardLevel}\n */\n get levelHover(): HdsCardLevel | undefined {\n const { levelHover } = this.args;\n\n if (levelHover) {\n assert(\n `@levelHover for \"Hds::Card::Container\" must be one of the following: ${AVAILABLE_LEVELS.join(\n ', '\n )}; received: ${levelHover}`,\n AVAILABLE_LEVELS.includes(levelHover)\n );\n }\n\n return levelHover;\n }\n\n /**\n * Sets the \"elevation\" level for the component on \":active\" state\n * Accepted values: base, mid, high\n *\n * @param levelActive\n * @type {HdsCardLevel}\n */\n get levelActive(): HdsCardLevel | undefined {\n const { levelActive } = this.args;\n\n if (levelActive) {\n assert(\n `@levelActive for \"Hds::Card::Container\" must be one of the following: ${AVAILABLE_LEVELS.join(\n ', '\n )}; received: ${levelActive}`,\n AVAILABLE_LEVELS.includes(levelActive)\n );\n }\n\n return levelActive;\n }\n\n /**\n * Sets the background for the component\n * Accepted values: neutral-primary, neutral-secondary\n *\n * @param background\n * @type {HdsCardBackground}\n * @default 'base'\n */\n get background(): HdsCardBackground {\n const { background = DEFAULT_BACKGROUND } = this.args;\n\n assert(\n `@background for \"Hds::Card::Container\" must be one of the following: ${AVAILABLE_BACKGROUNDS.join(\n ', '\n )}; received: ${background}`,\n AVAILABLE_BACKGROUNDS.includes(background)\n );\n\n return background;\n }\n\n /**\n * Sets the level for the card\n * Accepted values: visible, hidden\n *\n * @param overflow\n * @type {HdsCardOverflow}\n * @default 'visible'\n */\n get overflow(): HdsCardOverflow {\n const { overflow = DEFAULT_OVERFLOW } = this.args;\n\n assert(\n `@overflow for \"Hds::Card::Container\" must be one of the following: ${AVAILABLE_OVERFLOWS.join(\n ', '\n )}; received: ${overflow}`,\n AVAILABLE_OVERFLOWS.includes(overflow)\n );\n\n return overflow;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Card#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-card__container'];\n\n // add \"elevation\" classes based on the @level and @hasBorder arguments\n classes.push(\n `hds-card__container--level-${\n this.args.hasBorder ? 'surface' : 'elevation'\n }-${this.level}`\n );\n if (this.levelHover) {\n classes.push(\n `hds-card__container--hover-level-${\n this.args.hasBorder ? 'surface' : 'elevation'\n }-${this.levelHover}`\n );\n }\n if (this.levelActive) {\n classes.push(\n `hds-card__container--active-level-${\n this.args.hasBorder ? 'surface' : 'elevation'\n }-${this.levelActive}`\n );\n }\n\n // add a class based on the @background argument\n classes.push(`hds-card__container--background-${this.background}`);\n\n // add a class based on the @overflow argument\n classes.push(`hds-card__container--overflow-${this.overflow}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_LEVEL","HdsCardLevelValues","Base","DEFAULT_BACKGROUND","HdsCardBackgroundValues","NeutralPrimary","DEFAULT_OVERFLOW","HdsCardOverflowValues","Visible","AVAILABLE_LEVELS","Object","values","AVAILABLE_BACKGROUNDS","AVAILABLE_OVERFLOWS","HdsCardContainer","Component","level","args","assert","join","includes","levelHover","levelActive","background","overflow","classNames","classes","push","hasBorder","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,kJAAkJ;;ACDpL;AACA;AACA;AACA;;AAeaA,MAAAA,aAAa,GAAGC,kBAAkB,CAACC;AACnCC,MAAAA,kBAAkB,GAAGC,uBAAuB,CAACC;AAC7CC,MAAAA,gBAAgB,GAAGC,qBAAqB,CAACC;AAC/C,MAAMC,gBAA0B,GAAGC,MAAM,CAACC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MAAAA,OAAO,CAACC,IAAI,CACV,qCACE,IAAI,CAACV,IAAI,CAACW,SAAS,GAAG,SAAS,GAAG,WAAW,CAAA,CAAA,EAC3C,IAAI,CAACN,WAAW,EACtB,CAAC;AACH;;AAEA;IACAI,OAAO,CAACC,IAAI,CAAC,CAAA,gCAAA,EAAmC,IAAI,CAACJ,UAAU,EAAE,CAAC;;AAElE;IACAG,OAAO,CAACC,IAAI,CAAC,CAAA,8BAAA,EAAiC,IAAI,CAACH,QAAQ,EAAE,CAAC;AAE9D,IAAA,OAAOE,OAAO,CAACP,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACU,oBAAA,CAAAC,QAAA,EAjJoBhB,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/card/types.js b/packages/components/dist/components/hds/card/types.js new file mode 100644 index 0000000000..452770f220 --- /dev/null +++ b/packages/components/dist/components/hds/card/types.js @@ -0,0 +1,24 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsCardBackgroundValues = /*#__PURE__*/function (HdsCardBackgroundValues) { + HdsCardBackgroundValues["NeutralPrimary"] = "neutral-primary"; + HdsCardBackgroundValues["NeutralSecondary"] = "neutral-secondary"; + return HdsCardBackgroundValues; +}({}); +let HdsCardLevelValues = /*#__PURE__*/function (HdsCardLevelValues) { + HdsCardLevelValues["Base"] = "base"; + HdsCardLevelValues["Mid"] = "mid"; + HdsCardLevelValues["High"] = "high"; + return HdsCardLevelValues; +}({}); +let HdsCardOverflowValues = /*#__PURE__*/function (HdsCardOverflowValues) { + HdsCardOverflowValues["Hidden"] = "hidden"; + HdsCardOverflowValues["Visible"] = "visible"; + return HdsCardOverflowValues; +}({}); + +export { HdsCardBackgroundValues, HdsCardLevelValues, HdsCardOverflowValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/card/types.js.map b/packages/components/dist/components/hds/card/types.js.map new file mode 100644 index 0000000000..317181a470 --- /dev/null +++ b/packages/components/dist/components/hds/card/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/card/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCardBackgroundValues {\n NeutralPrimary = 'neutral-primary',\n NeutralSecondary = 'neutral-secondary',\n}\n\nexport type HdsCardBackground =\n | HdsCardBackgroundValues.NeutralSecondary\n | HdsCardBackgroundValues.NeutralPrimary;\n\nexport enum HdsCardLevelValues {\n Base = 'base',\n Mid = 'mid',\n High = 'high',\n}\n\nexport type HdsCardLevel =\n | HdsCardLevelValues.Base\n | HdsCardLevelValues.Mid\n | HdsCardLevelValues.High;\n\nexport enum HdsCardOverflowValues {\n Hidden = 'hidden',\n Visible = 'visible',\n}\n\nexport type HdsCardOverflow =\n | HdsCardOverflowValues.Hidden\n | HdsCardOverflowValues.Visible;\n"],"names":["HdsCardBackgroundValues","HdsCardLevelValues","HdsCardOverflowValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,gBAAA,CAAA,GAAA,iBAAA;EAAvBA,uBAAuB,CAAA,kBAAA,CAAA,GAAA,mBAAA;AAAA,EAAA,OAAvBA,uBAAuB;AAAA,CAAA,CAAA,EAAA;AASvBC,IAAAA,kBAAkB,0BAAlBA,kBAAkB,EAAA;EAAlBA,kBAAkB,CAAA,MAAA,CAAA,GAAA,MAAA;EAAlBA,kBAAkB,CAAA,KAAA,CAAA,GAAA,KAAA;EAAlBA,kBAAkB,CAAA,MAAA,CAAA,GAAA,MAAA;AAAA,EAAA,OAAlBA,kBAAkB;AAAA,CAAA,CAAA,EAAA;AAWlBC,IAAAA,qBAAqB,0BAArBA,qBAAqB,EAAA;EAArBA,qBAAqB,CAAA,QAAA,CAAA,GAAA,QAAA;EAArBA,qBAAqB,CAAA,SAAA,CAAA,GAAA,SAAA;AAAA,EAAA,OAArBA,qBAAqB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/code-block/copy-button.js b/packages/components/dist/components/hds/code-block/copy-button.js new file mode 100644 index 0000000000..6220e9ce63 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/copy-button.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsCodeBlockCopyButton = TemplateOnlyComponent(); +var copyButton = setComponentTemplate(TEMPLATE, HdsCodeBlockCopyButton); + +export { copyButton as default }; +//# sourceMappingURL=copy-button.js.map diff --git a/packages/components/dist/components/hds/code-block/copy-button.js.map b/packages/components/dist/components/hds/code-block/copy-button.js.map new file mode 100644 index 0000000000..a15edfdc05 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/copy-button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"copy-button.js","sources":["../../../../src/components/hds/code-block/copy-button.hbs","../../../../src/components/hds/code-block/copy-button.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsCopyButtonSignature } from '../copy/button';\n\nexport interface HdsCodeBlockCopyButtonSignature {\n Args: {\n targetToCopy?: HdsCopyButtonSignature['Args']['targetToCopy'];\n };\n Blocks: {\n default: [];\n };\n Element: HdsCopyButtonSignature['Element'];\n}\n\nconst HdsCodeBlockCopyButton =\n templateOnlyComponent();\n\nexport default HdsCodeBlockCopyButton;\n"],"names":["HdsCodeBlockCopyButton","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kQAAkQ;;ACDpS;AACA;AACA;AACA;;AAeA,MAAMA,sBAAsB,GAC1BC,qBAAqB,EAAmC;AAE1D,iBAAAC,oBAAA,CAAAC,QAAA,EAAeH,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/code-block/description.js b/packages/components/dist/components/hds/code-block/description.js new file mode 100644 index 0000000000..41b8b2e421 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/description.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsCodeBlockDescription = TemplateOnlyComponent(); +var description = setComponentTemplate(TEMPLATE, HdsCodeBlockDescription); + +export { description as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/code-block/description.js.map b/packages/components/dist/components/hds/code-block/description.js.map new file mode 100644 index 0000000000..c98c8dcacc --- /dev/null +++ b/packages/components/dist/components/hds/code-block/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../src/components/hds/code-block/description.hbs","../../../../src/components/hds/code-block/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsTextBodySignature } from '../text/body';\n\nexport interface HdsCodeBlockDescriptionSignature {\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nconst HdsCodeBlockDescription =\n templateOnlyComponent();\n\nexport default HdsCodeBlockDescription;\n"],"names":["HdsCodeBlockDescription","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iNAAiN;;ACDnP;AACA;AACA;AACA;;AAYA,MAAMA,uBAAuB,GAC3BC,qBAAqB,EAAoC;AAE3D,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,uBAAuB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/code-block/index.js b/packages/components/dist/components/hds/code-block/index.js new file mode 100644 index 0000000000..eb2e6839d2 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/index.js @@ -0,0 +1,164 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty, a as _defineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { assert } from '@ember/debug'; +import { next, schedule } from '@ember/runloop'; +import { htmlSafe } from '@ember/template'; +import { guidFor } from '@ember/object/internals'; +import Prism from 'prismjs'; +import { HdsCodeBlockLanguageValues } from './types.js'; +import 'prismjs/plugins/line-numbers/prism-line-numbers'; +import 'prismjs/plugins/line-highlight/prism-line-highlight'; +import 'prismjs/components/prism-bash'; +import 'prismjs/components/prism-go'; +import 'prismjs/components/prism-hcl'; +import 'prismjs/components/prism-json'; +import 'prismjs/components/prism-log'; +import 'prismjs/components/prism-ruby'; +import 'prismjs/components/prism-shell-session'; +import 'prismjs/components/prism-yaml'; +import 'prismjs/components/prism-markup-templating'; +import 'prismjs/components/prism-handlebars'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n
    \n {{~yield (hash Title=(component \"hds/code-block/title\"))~}}\n {{~yield (hash Description=(component \"hds/code-block/description\"))~}}\n
    \n
    \n {{! content within pre tag is whitespace-sensitive; do not add new lines! }}\n \n {{~this._prismCode~}}\n \n\n {{#if @hasCopyButton}}\n \n {{/if}}\n
    \n
    "); + +var _class, _descriptor; +const LANGUAGES = Object.values(HdsCodeBlockLanguageValues); +let HdsCodeBlock = (_class = class HdsCodeBlock extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "_prismCode", _descriptor, this); + /** + * Generates a unique ID for the code content + * + * @param _preCodeId + */ + _defineProperty(this, "_preCodeId", 'pre-code-' + guidFor(this)); + } + /** + * @param code + * @type {string} + * @description code text content for the CodeBlock + */ + get code() { + const code = this.args.value; + assert('@code for "Hds::CodeBlock" must have a valid value', code !== undefined); + if (Prism?.plugins?.['NormalizeWhitespace']) { + return Prism.plugins['NormalizeWhitespace'].normalize(code); + } + return code; + } + + /** + * @param language + * @type {string} + * @default undefined + * @description name of coding language used within CodeBlock for syntax highlighting + */ + get language() { + return this.args.language ?? undefined; + } + + /** + * @param hasLineNumbers + * @type {boolean} + * @default true + * @description Displays line numbers if true + */ + get hasLineNumbers() { + return this.args.hasLineNumbers ?? true; + } + + /** + * @param isStandalone + * @type {boolean} + * @default true + * @description Make CodeBlock container corners appear rounded + */ + get isStandalone() { + return this.args.isStandalone ?? true; + } + + /** + * @param hasLineWrapping + * @type {boolean} + * @default false + * @description Make text content wrap on multiple lines + */ + get hasLineWrapping() { + return this.args.hasLineWrapping ?? false; + } + setPrismCode(element) { + const code = this.code; + const language = this.language; + const grammar = language ? Prism.languages[language] : undefined; + if (code) { + // eslint-disable-next-line ember/no-runloop + next(() => { + if (language && grammar) { + this._prismCode = htmlSafe(Prism.highlight(code, grammar, language)); + } else { + this._prismCode = htmlSafe(Prism.util.encode(code).toString()); + } + + // Force prism-line-numbers plugin initialization, required for Prism.highlight usage + // See https://github.com/PrismJS/prism/issues/1234 + Prism.hooks.run('complete', { + code, + element + }); + + // Force prism-line-highlight plugin initialization + // Context: https://github.com/hashicorp/design-system/pull/1749#discussion_r1374288785 + if (this.args.highlightLines) { + // we need to delay re-evaluating the context for prism-line-highlight for as much as possible, and `afterRender` is the 'latest' we can use in the component lifecycle + // eslint-disable-next-line ember/no-runloop + schedule('afterRender', () => { + // we piggy-back on the plugin's `resize` event listener to trigger a new call of the `highlightLines` function: https://github.com/PrismJS/prism/blob/master/plugins/line-highlight/prism-line-highlight.js#L337 + if (window) window.dispatchEvent(new Event('resize')); + }); + } + }); + } + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + // Currently there is only one theme so the class name is hard-coded. + // In the future, additional themes such as a "light" theme could be added. + const classes = ['hds-code-block', 'hds-code-block--theme-dark']; + if (this.language) { + classes.push(`language-${this.language}`); + } + if (this.isStandalone === true) { + classes.push('hds-code-block--is-standalone'); + } + if (this.hasLineWrapping === true) { + classes.push('hds-code-block--has-line-wrapping'); + } + + // Note: Prism.js is using the specific class name "line-numbers" to determine implementation of line numbers in the UI + if (this.hasLineNumbers) { + classes.push('line-numbers'); + } + return classes.join(' '); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_prismCode", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return htmlSafe(''); + } +}), _applyDecoratedDescriptor(_class.prototype, "setPrismCode", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setPrismCode"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsCodeBlock); + +export { LANGUAGES, HdsCodeBlock as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/code-block/index.js.map b/packages/components/dist/components/hds/code-block/index.js.map new file mode 100644 index 0000000000..18aa9e2a54 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/code-block/index.hbs","../../../../src/components/hds/code-block/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n
    \\n {{~yield (hash Title=(component \\\"hds/code-block/title\\\"))~}}\\n {{~yield (hash Description=(component \\\"hds/code-block/description\\\"))~}}\\n
    \\n
    \\n {{! content within pre tag is whitespace-sensitive; do not add new lines! }}\\n \\n {{~this._prismCode~}}\\n \\n\\n {{#if @hasCopyButton}}\\n \\n {{/if}}\\n
    \\n
    \")","/**\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 { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { next, schedule } from '@ember/runloop';\nimport { htmlSafe } from '@ember/template';\nimport { guidFor } from '@ember/object/internals';\n\nimport Prism from 'prismjs';\n\nimport type { SafeString } from '@ember/template/-private/handlebars';\nimport type { ComponentLike } from '@glint/template';\n\nimport type { HdsCodeBlockTitleSignature } from './title';\nimport type { HdsCodeBlockDescriptionSignature } from './description';\nimport { HdsCodeBlockLanguageValues } from './types.ts';\nimport type { HdsCodeBlockLanguages } from './types.ts';\n\nimport 'prismjs/plugins/line-numbers/prism-line-numbers';\nimport 'prismjs/plugins/line-highlight/prism-line-highlight';\n\nimport 'prismjs/components/prism-bash';\nimport 'prismjs/components/prism-go';\nimport 'prismjs/components/prism-hcl';\nimport 'prismjs/components/prism-json';\nimport 'prismjs/components/prism-log';\nimport 'prismjs/components/prism-ruby';\nimport 'prismjs/components/prism-shell-session';\nimport 'prismjs/components/prism-yaml';\n\n// These imports are required to overcome a global variable clash in Helios website\n// where language import are overriden by the Prism instance in `CodeBlock`\n// Note that `prism-handlebars` is dependant on `prism-markup-templating`\nimport 'prismjs/components/prism-markup-templating';\nimport 'prismjs/components/prism-handlebars';\n\nexport const LANGUAGES: string[] = Object.values(HdsCodeBlockLanguageValues);\n\nexport interface HdsCodeBlockSignature {\n Args: {\n hasCopyButton?: boolean;\n hasLineNumbers?: boolean;\n hasLineWrapping?: boolean;\n highlightLines?: string;\n lineNumberStart?: number;\n isStandalone?: boolean;\n language?: HdsCodeBlockLanguages;\n maxHeight?: string;\n value: string;\n };\n Blocks: {\n default: [\n {\n Title?: ComponentLike;\n Description?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsCodeBlock extends Component {\n @tracked private _prismCode: SafeString = htmlSafe('');\n\n /**\n * Generates a unique ID for the code content\n *\n * @param _preCodeId\n */\n private _preCodeId = 'pre-code-' + guidFor(this);\n\n /**\n * @param code\n * @type {string}\n * @description code text content for the CodeBlock\n */\n get code(): string {\n const code = this.args.value;\n\n assert(\n '@code for \"Hds::CodeBlock\" must have a valid value',\n code !== undefined\n );\n\n if (Prism?.plugins?.['NormalizeWhitespace']) {\n return Prism.plugins['NormalizeWhitespace'].normalize(code);\n }\n\n return code;\n }\n\n /**\n * @param language\n * @type {string}\n * @default undefined\n * @description name of coding language used within CodeBlock for syntax highlighting\n */\n get language(): HdsCodeBlockLanguages | undefined {\n return this.args.language ?? undefined;\n }\n\n /**\n * @param hasLineNumbers\n * @type {boolean}\n * @default true\n * @description Displays line numbers if true\n */\n get hasLineNumbers(): boolean {\n return this.args.hasLineNumbers ?? true;\n }\n\n /**\n * @param isStandalone\n * @type {boolean}\n * @default true\n * @description Make CodeBlock container corners appear rounded\n */\n get isStandalone(): boolean {\n return this.args.isStandalone ?? true;\n }\n\n /**\n * @param hasLineWrapping\n * @type {boolean}\n * @default false\n * @description Make text content wrap on multiple lines\n */\n get hasLineWrapping(): boolean {\n return this.args.hasLineWrapping ?? false;\n }\n\n @action\n setPrismCode(element: HTMLElement): void {\n const code = this.code;\n const language = this.language;\n const grammar = language ? Prism.languages[language] : undefined;\n\n if (code) {\n // eslint-disable-next-line ember/no-runloop\n next(() => {\n if (language && grammar) {\n this._prismCode = htmlSafe(Prism.highlight(code, grammar, language));\n } else {\n this._prismCode = htmlSafe(Prism.util.encode(code).toString());\n }\n\n // Force prism-line-numbers plugin initialization, required for Prism.highlight usage\n // See https://github.com/PrismJS/prism/issues/1234\n Prism.hooks.run('complete', {\n code,\n element,\n });\n\n // Force prism-line-highlight plugin initialization\n // Context: https://github.com/hashicorp/design-system/pull/1749#discussion_r1374288785\n if (this.args.highlightLines) {\n // we need to delay re-evaluating the context for prism-line-highlight for as much as possible, and `afterRender` is the 'latest' we can use in the component lifecycle\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', () => {\n // we piggy-back on the plugin's `resize` event listener to trigger a new call of the `highlightLines` function: https://github.com/PrismJS/prism/blob/master/plugins/line-highlight/prism-line-highlight.js#L337\n if (window) window.dispatchEvent(new Event('resize'));\n });\n }\n });\n }\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(): string {\n // Currently there is only one theme so the class name is hard-coded.\n // In the future, additional themes such as a \"light\" theme could be added.\n const classes = ['hds-code-block', 'hds-code-block--theme-dark'];\n\n if (this.language) {\n classes.push(`language-${this.language}`);\n }\n\n if (this.isStandalone === true) {\n classes.push('hds-code-block--is-standalone');\n }\n\n if (this.hasLineWrapping === true) {\n classes.push('hds-code-block--has-line-wrapping');\n }\n\n // Note: Prism.js is using the specific class name \"line-numbers\" to determine implementation of line numbers in the UI\n if (this.hasLineNumbers) {\n classes.push('line-numbers');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["LANGUAGES","Object","values","HdsCodeBlockLanguageValues","HdsCodeBlock","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_defineProperty","guidFor","code","value","assert","undefined","Prism","plugins","normalize","language","hasLineNumbers","isStandalone","hasLineWrapping","setPrismCode","element","grammar","languages","next","_prismCode","htmlSafe","highlight","util","encode","toString","hooks","run","highlightLines","schedule","window","dispatchEvent","Event","classNames","classes","push","join","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,29BAA29B;;;ACwCt/B,MAAMA,SAAmB,GAAGC,MAAM,CAACC,MAAM,CAACC,0BAA0B;AAyBtDC,IAAAA,YAAY,IAAAC,MAAA,GAAlB,MAAMD,YAAY,SAASE,SAAS,CAAwB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,qBAAAC,WAAA,EAAA,IAAA,CAAA;AAGzE;AACF;AACA;AACA;AACA;AAJEC,IAAAA,eAAA,qBAKqB,WAAW,GAAGC,OAAO,CAAC,IAAI,CAAC,CAAA;AAAA;AAEhD;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAW;AACjB,IAAA,MAAMA,IAAI,GAAG,IAAI,CAACL,IAAI,CAACM,KAAK;AAE5BC,IAAAA,MAAM,CACJ,oDAAoD,EACpDF,IAAI,KAAKG,SACX,CAAC;AAED,IAAA,IAAIC,KAAK,EAAEC,OAAO,GAAG,qBAAqB,CAAC,EAAE;MAC3C,OAAOD,KAAK,CAACC,OAAO,CAAC,qBAAqB,CAAC,CAACC,SAAS,CAACN,IAAI,CAAC;AAC7D;AAEA,IAAA,OAAOA,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIO,QAAQA,GAAsC;AAChD,IAAA,OAAO,IAAI,CAACZ,IAAI,CAACY,QAAQ,IAAIJ,SAAS;AACxC;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIK,cAAcA,GAAY;AAC5B,IAAA,OAAO,IAAI,CAACb,IAAI,CAACa,cAAc,IAAI,IAAI;AACzC;;AAEA;AACF;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block/title.js b/packages/components/dist/components/hds/code-block/title.js new file mode 100644 index 0000000000..df0e030de3 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/title.js @@ -0,0 +1,20 @@ +import Component from '@glimmer/component'; +import { HdsCodeBlockTitleTagValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +class HdsCodeBlockTitle extends Component { + get componentTag() { + return this.args.tag ?? HdsCodeBlockTitleTagValues.P; + } +} +setComponentTemplate(TEMPLATE, HdsCodeBlockTitle); + +export { HdsCodeBlockTitle as default }; +//# sourceMappingURL=title.js.map diff --git a/packages/components/dist/components/hds/code-block/title.js.map b/packages/components/dist/components/hds/code-block/title.js.map new file mode 100644 index 0000000000..ecf1ce4f6a --- /dev/null +++ b/packages/components/dist/components/hds/code-block/title.js.map @@ -0,0 +1 @@ +{"version":3,"file":"title.js","sources":["../../../../src/components/hds/code-block/title.hbs","../../../../src/components/hds/code-block/title.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\nimport Component from '@glimmer/component';\nimport { HdsCodeBlockTitleTagValues } from './types.ts';\nimport type { HdsCodeBlockTitleTags } from './types';\nimport type { HdsTextBodySignature } from '../text/body';\n\nexport interface HdsCodeBlockTitleSignature {\n Args: {\n tag?: HdsCodeBlockTitleTags;\n };\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsCodeBlockTitle extends Component {\n get componentTag(): HdsCodeBlockTitleTags {\n return this.args.tag ?? HdsCodeBlockTitleTagValues.P;\n }\n}\n"],"names":["HdsCodeBlockTitle","Component","componentTag","args","tag","HdsCodeBlockTitleTagValues","P","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gPAAgP;;ACDlR;AACA;AACA;AACA;AAgBe,MAAMA,iBAAiB,SAASC,SAAS,CAA6B;EACnF,IAAIC,YAAYA,GAA0B;IACxC,OAAO,IAAI,CAACC,IAAI,CAACC,GAAG,IAAIC,0BAA0B,CAACC,CAAC;AACtD;AACF;AAACC,oBAAA,CAAAC,QAAA,EAJoBR,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/code-block/types.js b/packages/components/dist/components/hds/code-block/types.js new file mode 100644 index 0000000000..b40baf1aca --- /dev/null +++ b/packages/components/dist/components/hds/code-block/types.js @@ -0,0 +1,29 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsCodeBlockLanguageValues = /*#__PURE__*/function (HdsCodeBlockLanguageValues) { + HdsCodeBlockLanguageValues["Bash"] = "bash"; + HdsCodeBlockLanguageValues["Go"] = "go"; + HdsCodeBlockLanguageValues["Hcl"] = "hcl"; + HdsCodeBlockLanguageValues["Json"] = "json"; + HdsCodeBlockLanguageValues["Log"] = "log"; + HdsCodeBlockLanguageValues["Ruby"] = "ruby"; + HdsCodeBlockLanguageValues["ShellSession"] = "shell-session"; + HdsCodeBlockLanguageValues["Yaml"] = "yaml"; + return HdsCodeBlockLanguageValues; +}({}); +let HdsCodeBlockTitleTagValues = /*#__PURE__*/function (HdsCodeBlockTitleTagValues) { + HdsCodeBlockTitleTagValues["P"] = "p"; + HdsCodeBlockTitleTagValues["H1"] = "h1"; + HdsCodeBlockTitleTagValues["H2"] = "h2"; + HdsCodeBlockTitleTagValues["H3"] = "h3"; + HdsCodeBlockTitleTagValues["H4"] = "h4"; + HdsCodeBlockTitleTagValues["H5"] = "h5"; + HdsCodeBlockTitleTagValues["H6"] = "h6"; + return HdsCodeBlockTitleTagValues; +}({}); + +export { HdsCodeBlockLanguageValues, HdsCodeBlockTitleTagValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/code-block/types.js.map b/packages/components/dist/components/hds/code-block/types.js.map new file mode 100644 index 0000000000..65515f10a1 --- /dev/null +++ b/packages/components/dist/components/hds/code-block/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/code-block/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCodeBlockLanguageValues {\n Bash = 'bash',\n Go = 'go',\n Hcl = 'hcl',\n Json = 'json',\n Log = 'log',\n Ruby = 'ruby',\n ShellSession = 'shell-session',\n Yaml = 'yaml',\n}\n\nexport type HdsCodeBlockLanguages = `${HdsCodeBlockLanguageValues}`;\n\nexport enum HdsCodeBlockTitleTagValues {\n P = 'p',\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n}\n\nexport type HdsCodeBlockTitleTags = `${HdsCodeBlockTitleTagValues}`;\n"],"names":["HdsCodeBlockLanguageValues","HdsCodeBlockTitleTagValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,0BAA0B,0BAA1BA,0BAA0B,EAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,KAAA,CAAA,GAAA,KAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,KAAA,CAAA,GAAA,KAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,cAAA,CAAA,GAAA,eAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;AAAA,EAAA,OAA1BA,0BAA0B;AAAA,CAAA,CAAA,EAAA;AAa1BC,IAAAA,0BAA0B,0BAA1BA,0BAA0B,EAAA;EAA1BA,0BAA0B,CAAA,GAAA,CAAA,GAAA,GAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;EAA1BA,0BAA0B,CAAA,IAAA,CAAA,GAAA,IAAA;AAAA,EAAA,OAA1BA,0BAA0B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/copy/button/index.js b/packages/components/dist/components/hds/copy/button/index.js new file mode 100644 index 0000000000..f241b6a316 --- /dev/null +++ b/packages/components/dist/components/hds/copy/button/index.js @@ -0,0 +1,110 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { HdsCopyButtonSizeValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +var _class, _descriptor, _descriptor2; +const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium; +const SIZES = Object.values(HdsCopyButtonSizeValues); +const DEFAULT_ICON = 'clipboard-copy'; +const SUCCESS_ICON = 'clipboard-checked'; +const ERROR_ICON = 'clipboard-x'; +const DEFAULT_STATUS = 'idle'; +let HdsCopyButton = (_class = class HdsCopyButton extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "_status", _descriptor, this); + _initializerDefineProperty(this, "_timer", _descriptor2, this); + } + /** + * @param icon + * @type {string} + * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`. + */ + get icon() { + let icon = DEFAULT_ICON; + if (this._status === 'success') { + icon = SUCCESS_ICON; + } else if (this._status === 'error') { + icon = ERROR_ICON; + } + return icon; + } + + /** + * @param size + * @type {string} + * @default medium + * @description The size of the copy/button; acceptable values are `small` and `medium` + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Copy::Button" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * Get the class names to apply to the component. + * @method CopyButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-copy-button']; + + // add a class based on the @size argument + classes.push(`hds-button--size-${this.size}`); + classes.push(`hds-copy-button--status-${this._status}`); + return classes.join(' '); + } + onSuccess(args) { + this._status = 'success'; + this.resetStatusDelayed(); + const { + onSuccess + } = this.args; + if (typeof onSuccess === 'function') { + onSuccess(args); + } + } + onError(args) { + this._status = 'error'; + this.resetStatusDelayed(); + const { + onError + } = this.args; + if (typeof onError === 'function') { + onError(args); + } + } + resetStatusDelayed() { + clearTimeout(this._timer); + // make it fade back to the default state + this._timer = setTimeout(() => { + this._status = DEFAULT_STATUS; + }, 1500); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_status", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return DEFAULT_STATUS; + } +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_timer", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "onSuccess", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onSuccess"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onError"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsCopyButton); + +export { DEFAULT_ICON, DEFAULT_SIZE, DEFAULT_STATUS, ERROR_ICON, SIZES, SUCCESS_ICON, HdsCopyButton as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/copy/button/index.js.map b/packages/components/dist/components/hds/copy/button/index.js.map new file mode 100644 index 0000000000..83a7132332 --- /dev/null +++ b/packages/components/dist/components/hds/copy/button/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/button/index.hbs","../../../../../src/components/hds/copy/button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { HdsCopyButtonSizeValues } from './types.ts';\nimport type { HdsCopyButtonSizes } from './types.ts';\nimport type { HdsButtonSignature } from '../../button/';\nimport type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts';\nimport type { HdsIconSignature } from '../../icon';\n\nexport const DEFAULT_SIZE = HdsCopyButtonSizeValues.Medium;\nexport const SIZES: string[] = Object.values(HdsCopyButtonSizeValues);\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\nexport interface HdsCopyButtonSignature {\n Args: HdsButtonSignature['Args'] & {\n size?: HdsCopyButtonSizes;\n textToCopy?: HdsClipboardModifierSignature['Args']['Named']['text'];\n targetToCopy?: HdsClipboardModifierSignature['Args']['Named']['target'];\n onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess'];\n onError?: HdsClipboardModifierSignature['Args']['Named']['onError'];\n };\n Element: HdsButtonSignature['Element'];\n}\n\nexport default class HdsCopyButton extends Component {\n @tracked private _status = DEFAULT_STATUS;\n @tracked private _timer: ReturnType | undefined;\n\n /**\n * @param icon\n * @type {string}\n * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`.\n */\n get icon(): HdsIconSignature['Args']['name'] {\n let icon: HdsIconSignature['Args']['name'] = DEFAULT_ICON;\n if (this._status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this._status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the copy/button; acceptable values are `small` and `medium`\n */\n get size(): HdsCopyButtonSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Copy::Button\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopyButton#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-copy-button'];\n\n // add a class based on the @size argument\n classes.push(`hds-button--size-${this.size}`);\n\n classes.push(`hds-copy-button--status-${this._status}`);\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(\n args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']\n ): void {\n this._status = 'success';\n this.resetStatusDelayed();\n\n const { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(\n args: HdsClipboardModifierSignature['Args']['Named']['onError']\n ): void {\n this._status = 'error';\n this.resetStatusDelayed();\n\n const { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed(): void {\n clearTimeout(this._timer);\n // make it fade back to the default state\n this._timer = setTimeout((): void => {\n this._status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_SIZE","HdsCopyButtonSizeValues","Medium","SIZES","Object","values","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopyButton","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","icon","_status","size","assert","join","includes","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","_timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,8aAA8a;;;ACcncA,MAAAA,YAAY,GAAGC,uBAAuB,CAACC;AAC7C,MAAMC,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACJ,uBAAuB;AAC7D,MAAMK,YAAY,GAAG;AACrB,MAAMC,YAAY,GAAG;AACrB,MAAMC,UAAU,GAAG;AACnB,MAAMC,cAAc,GAAG;AAaTC,IAAAA,aAAa,IAAAC,MAAA,GAAnB,MAAMD,aAAa,SAASE,SAAS,CAAyB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,kBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,iBAAAE,YAAA,EAAA,IAAA,CAAA;AAAA;AAI3E;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAqC;IAC3C,IAAIA,IAAsC,GAAGZ,YAAY;AACzD,IAAA,IAAI,IAAI,CAACa,OAAO,KAAK,SAAS,EAAE;AAC9BD,MAAAA,IAAI,GAAGX,YAAY;AACrB,KAAC,MAAM,IAAI,IAAI,CAACY,OAAO,KAAK,OAAO,EAAE;AACnCD,MAAAA,IAAI,GAAGV,UAAU;AACnB;AACA,IAAA,OAAOU,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,IAAIA,GAAuB;IAC7B,MAAM;AAAEA,MAAAA,IAAI,GAAGpB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AACb,OAAO,GAAGV,cAAc;KAC9B,EAAE,IAAI,CAAC;AACV;AACF,CAAC,EAAAO,WAAA,GAAAiB,yBAAA,CAAAtB,MAAA,CAAAuB,SAAA,EAAA,SAAA,EAAA,CAxFEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAmB9B,cAAc;AAAA;AAAA,CAAAQ,CAAAA,EAAAA,YAAA,GAAAgB,yBAAA,CAAAtB,MAAA,CAAAuB,SAAA,aACxCC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAAtB,MAAA,CAAAuB,SAAA,EAAA,WAAA,EAAA,CAoDPM,MAAM,CAAApC,EAAAA,MAAA,CAAAqC,wBAAA,CAAA9B,MAAA,CAAAuB,SAAA,EAAAvB,WAAAA,CAAAA,EAAAA,MAAA,CAAAuB,SAAA,CAAA,EAAAD,yBAAA,CAAAtB,MAAA,CAAAuB,SAAA,cAcNM,MAAM,CAAA,EAAApC,MAAA,CAAAqC,wBAAA,CAAA9B,MAAA,CAAAuB,SAAA,EAAA,SAAA,CAAA,EAAAvB,MAAA,CAAAuB,SAAA,GAAAvB,MAAA;AApEyB+B,oBAAA,CAAAC,QAAA,EAAbjC,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/copy/button/types.js b/packages/components/dist/components/hds/copy/button/types.js new file mode 100644 index 0000000000..41fdf98e8c --- /dev/null +++ b/packages/components/dist/components/hds/copy/button/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsCopyButtonSizeValues = /*#__PURE__*/function (HdsCopyButtonSizeValues) { + HdsCopyButtonSizeValues["Small"] = "small"; + HdsCopyButtonSizeValues["Medium"] = "medium"; + return HdsCopyButtonSizeValues; +}({}); + +export { HdsCopyButtonSizeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/copy/button/types.js.map b/packages/components/dist/components/hds/copy/button/types.js.map new file mode 100644 index 0000000000..bf1a513c46 --- /dev/null +++ b/packages/components/dist/components/hds/copy/button/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/copy/button/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCopyButtonSizeValues {\n Small = 'small',\n Medium = 'medium',\n}\nexport type HdsCopyButtonSizes = `${HdsCopyButtonSizeValues}`;\n"],"names":["HdsCopyButtonSizeValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,uBAAuB,0BAAvBA,uBAAuB,EAAA;EAAvBA,uBAAuB,CAAA,OAAA,CAAA,GAAA,OAAA;EAAvBA,uBAAuB,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAAvBA,uBAAuB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/copy/snippet/index.js b/packages/components/dist/components/hds/copy/snippet/index.js new file mode 100644 index 0000000000..b203a2513c --- /dev/null +++ b/packages/components/dist/components/hds/copy/snippet/index.js @@ -0,0 +1,158 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { HdsCopySnippetColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n \n {{this.textToShow}}\n \n \n"); + +var _class, _descriptor, _descriptor2; +const DEFAULT_COLOR = HdsCopySnippetColorValues.Primary; +const COLORS = Object.values(HdsCopySnippetColorValues); +const DEFAULT_ICON = 'clipboard-copy'; +const SUCCESS_ICON = 'clipboard-checked'; +const ERROR_ICON = 'clipboard-x'; +const DEFAULT_STATUS = 'idle'; +let HdsCopySnippet = (_class = class HdsCopySnippet extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "_status", _descriptor, this); + _initializerDefineProperty(this, "_timer", _descriptor2, this); + } + /** + * @method textToShow + * @return {string} + */ + get textToShow() { + const { + textToCopy = '' + } = this.args; + if (typeof textToCopy === 'string') { + return textToCopy; + } else { + return textToCopy.toString(); + } + } + + /** + * @param icon + * @type {string} + * @default clipboard-copy + * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status). + */ + get icon() { + let icon = DEFAULT_ICON; + if (this._status === 'success') { + icon = SUCCESS_ICON; + } else if (this._status === 'error') { + icon = ERROR_ICON; + } + return icon; + } + + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary` and `secondary` + */ + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Copy::Snippet" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that the component should take up the full width of the parent container. + */ + get isFullWidth() { + return this.args.isFullWidth ?? false; + } + + /** + * @param isTruncated + * @type {boolean} + * @default false + * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines. + */ + get isTruncated() { + return this.args.isTruncated ?? false; + } + + /** + * Get the class names to apply to the component. + * @method CopySnippet#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-copy-snippet']; + + // add a class based on the @color argument + classes.push(`hds-copy-snippet--color-${this.color}`); + + // add a class based on the tracked status (idle/success/error) + classes.push(`hds-copy-snippet--status-${this._status}`); + + // add a class based on the @isTruncated argument + if (this.isTruncated) { + classes.push('hds-copy-snippet--is-truncated'); + } + + // add a class based on the @isFullWidth argument + if (this.isFullWidth) { + classes.push('hds-copy-snippet--width-full'); + } + return classes.join(' '); + } + onSuccess(args) { + this._status = 'success'; + this.resetStatusDelayed(); + const { + onSuccess + } = this.args; + if (typeof onSuccess === 'function') { + onSuccess(args); + } + } + onError(args) { + this._status = 'error'; + this.resetStatusDelayed(); + const { + onError + } = this.args; + if (typeof onError === 'function') { + onError(args); + } + } + resetStatusDelayed() { + clearTimeout(this._timer); + // make it fade back to the default state + this._timer = setTimeout(() => { + this._status = DEFAULT_STATUS; + }, 1500); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_status", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return DEFAULT_STATUS; + } +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_timer", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "onSuccess", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onSuccess"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onError"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsCopySnippet); + +export { COLORS, DEFAULT_COLOR, DEFAULT_ICON, DEFAULT_STATUS, ERROR_ICON, SUCCESS_ICON, HdsCopySnippet as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/copy/snippet/index.js.map b/packages/components/dist/components/hds/copy/snippet/index.js.map new file mode 100644 index 0000000000..630090c8ef --- /dev/null +++ b/packages/components/dist/components/hds/copy/snippet/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/snippet/index.hbs","../../../../../src/components/hds/copy/snippet/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n \\n {{this.textToShow}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { HdsCopySnippetColorValues } from './types.ts';\nimport type { HdsCopySnippetColors } from './types.ts';\nimport type { HdsClipboardModifierSignature } from '../../../../modifiers/hds-clipboard.ts';\nimport type { HdsIconSignature } from '../../icon';\n\nexport const DEFAULT_COLOR = HdsCopySnippetColorValues.Primary;\nexport const COLORS: string[] = Object.values(HdsCopySnippetColorValues);\n\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\nexport interface HdsCopySnippetSignature {\n Args: {\n color?: HdsCopySnippetColors;\n isFullWidth?: boolean;\n textToCopy: HdsClipboardModifierSignature['Args']['Named']['text'];\n isTruncated?: boolean;\n onSuccess?: HdsClipboardModifierSignature['Args']['Named']['onSuccess'];\n onError?: HdsClipboardModifierSignature['Args']['Named']['onError'];\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsCopySnippet extends Component {\n @tracked private _status = DEFAULT_STATUS;\n @tracked private _timer: ReturnType | undefined;\n\n /**\n * @method textToShow\n * @return {string}\n */\n get textToShow(): string {\n const { textToCopy = '' } = this.args;\n\n if (typeof textToCopy === 'string') {\n return textToCopy;\n } else {\n return textToCopy.toString();\n }\n }\n\n /**\n * @param icon\n * @type {string}\n * @default clipboard-copy\n * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status).\n */\n get icon(): HdsIconSignature['Args']['name'] {\n let icon: HdsIconSignature['Args']['name'] = DEFAULT_ICON;\n if (this._status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this._status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of button to be used; acceptable values are `primary` and `secondary`\n */\n get color(): HdsCopySnippetColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Copy::Snippet\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * @param isFullWidth\n * @type {boolean}\n * @default false\n * @description Indicates that the component should take up the full width of the parent container.\n */\n get isFullWidth(): boolean {\n return this.args.isFullWidth ?? false;\n }\n\n /**\n * @param isTruncated\n * @type {boolean}\n * @default false\n * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines.\n */\n get isTruncated(): boolean {\n return this.args.isTruncated ?? false;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopySnippet#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-copy-snippet'];\n\n // add a class based on the @color argument\n classes.push(`hds-copy-snippet--color-${this.color}`);\n\n // add a class based on the tracked status (idle/success/error)\n classes.push(`hds-copy-snippet--status-${this._status}`);\n\n // add a class based on the @isTruncated argument\n if (this.isTruncated) {\n classes.push('hds-copy-snippet--is-truncated');\n }\n\n // add a class based on the @isFullWidth argument\n if (this.isFullWidth) {\n classes.push('hds-copy-snippet--width-full');\n }\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(\n args: HdsClipboardModifierSignature['Args']['Named']['onSuccess']\n ): void {\n this._status = 'success';\n this.resetStatusDelayed();\n\n const { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(\n args: HdsClipboardModifierSignature['Args']['Named']['onError']\n ): void {\n this._status = 'error';\n this.resetStatusDelayed();\n\n const { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed(): void {\n clearTimeout(this._timer);\n // make it fade back to the default state\n this._timer = setTimeout((): void => {\n this._status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_COLOR","HdsCopySnippetColorValues","Primary","COLORS","Object","values","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopySnippet","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","textToShow","textToCopy","toString","icon","_status","color","assert","join","includes","isFullWidth","isTruncated","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","_timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,gfAAgf;;;ACargBA,MAAAA,aAAa,GAAGC,yBAAyB,CAACC;AAChD,MAAMC,MAAgB,GAAGC,MAAM,CAACC,MAAM,CAACJ,yBAAyB;AAEhE,MAAMK,YAAY,GAAG;AACrB,MAAMC,YAAY,GAAG;AACrB,MAAMC,UAAU,GAAG;AACnB,MAAMC,cAAc,GAAG;AAcTC,IAAAA,cAAc,IAAAC,MAAA,GAApB,MAAMD,cAAc,SAASE,SAAS,CAA0B;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,kBAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,iBAAAE,YAAA,EAAA,IAAA,CAAA;AAAA;AAI7E;AACF;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;IACvB,MAAM;AAAEC,MAAAA,UAAU,GAAG;KAAI,GAAG,IAAI,CAACL,IAAI;AAErC,IAAA,IAAI,OAAOK,UAAU,KAAK,QAAQ,EAAE;AAClC,MAAA,OAAOA,UAAU;AACnB,KAAC,MAAM;AACL,MAAA,OAAOA,UAAU,CAACC,QAAQ,EAAE;AAC9B;AACF;;AAEA;AAC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AA,CAAA4B,SAAA,aACxCC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAA3B,MAAA,CAAA4B,SAAA,EAAA,WAAA,EAAA,CAkGPM,MAAM,CAAAzC,EAAAA,MAAA,CAAA0C,wBAAA,CAAAnC,MAAA,CAAA4B,SAAA,EAAA5B,WAAAA,CAAAA,EAAAA,MAAA,CAAA4B,SAAA,CAAA,EAAAD,yBAAA,CAAA3B,MAAA,CAAA4B,SAAA,cAcNM,MAAM,CAAA,EAAAzC,MAAA,CAAA0C,wBAAA,CAAAnC,MAAA,CAAA4B,SAAA,EAAA,SAAA,CAAA,EAAA5B,MAAA,CAAA4B,SAAA,GAAA5B,MAAA;AAlH0BoC,oBAAA,CAAAC,QAAA,EAAdtC,cAAc,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/copy/snippet/types.js b/packages/components/dist/components/hds/copy/snippet/types.js new file mode 100644 index 0000000000..c6a0e90ea2 --- /dev/null +++ b/packages/components/dist/components/hds/copy/snippet/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsCopySnippetColorValues = /*#__PURE__*/function (HdsCopySnippetColorValues) { + HdsCopySnippetColorValues["Primary"] = "primary"; + HdsCopySnippetColorValues["Secondary"] = "secondary"; + return HdsCopySnippetColorValues; +}({}); + +export { HdsCopySnippetColorValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/copy/snippet/types.js.map b/packages/components/dist/components/hds/copy/snippet/types.js.map new file mode 100644 index 0000000000..bac292cf36 --- /dev/null +++ b/packages/components/dist/components/hds/copy/snippet/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/copy/snippet/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsCopySnippetColorValues {\n Primary = 'primary',\n Secondary = 'secondary',\n}\nexport type HdsCopySnippetColors = `${HdsCopySnippetColorValues}`;\n"],"names":["HdsCopySnippetColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,yBAAyB,0BAAzBA,yBAAyB,EAAA;EAAzBA,yBAAyB,CAAA,SAAA,CAAA,GAAA,SAAA;EAAzBA,yBAAyB,CAAA,WAAA,CAAA,GAAA,WAAA;AAAA,EAAA,OAAzBA,yBAAyB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/body.js b/packages/components/dist/components/hds/dialog-primitive/body.js new file mode 100644 index 0000000000..626f2ee0da --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/body.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDialogPrimitiveBody = TemplateOnlyComponent(); +var body = setComponentTemplate(TEMPLATE, HdsDialogPrimitiveBody); + +export { body as default }; +//# sourceMappingURL=body.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/body.js.map b/packages/components/dist/components/hds/dialog-primitive/body.js.map new file mode 100644 index 0000000000..5ec7f4cabb --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/body.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body.js","sources":["../../../../src/components/hds/dialog-primitive/body.hbs","../../../../src/components/hds/dialog-primitive/body.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDialogPrimitiveBodySignature {\n Args: {\n contextualClass?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsDialogPrimitiveBody =\n templateOnlyComponent();\n\nexport default HdsDialogPrimitiveBody;\n"],"names":["HdsDialogPrimitiveBody","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iMAAiM;;ACDnO;AACA;AACA;AACA;;AAcA,MAAMA,sBAAsB,GAC1BC,qBAAqB,EAAmC;AAE1D,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/description.js b/packages/components/dist/components/hds/dialog-primitive/description.js new file mode 100644 index 0000000000..32fe9a11aa --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/description.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDialogPrimitiveDescription = TemplateOnlyComponent(); +var description = setComponentTemplate(TEMPLATE, HdsDialogPrimitiveDescription); + +export { description as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/description.js.map b/packages/components/dist/components/hds/dialog-primitive/description.js.map new file mode 100644 index 0000000000..88813c4a38 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../src/components/hds/dialog-primitive/description.hbs","../../../../src/components/hds/dialog-primitive/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDialogPrimitiveDescriptionSignature {\n Args: {\n contextualClass?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsDialogPrimitiveDescription =\n templateOnlyComponent();\n\nexport default HdsDialogPrimitiveDescription;\n"],"names":["HdsDialogPrimitiveDescription","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gPAAgP;;ACDlR;AACA;AACA;AACA;;AAcA,MAAMA,6BAA6B,GACjCC,qBAAqB,EAA0C;AAEjE,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,6BAA6B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/footer.js b/packages/components/dist/components/hds/dialog-primitive/footer.js new file mode 100644 index 0000000000..96e3c33aa5 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/footer.js @@ -0,0 +1,32 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const NOOP = () => {}; +class HdsDialogPrimitiveFooter extends Component { + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onDismiss() { + const { + onDismiss + } = this.args; + + // notice: this is to make sure the function is always defined when consumers add `{{on 'click' F.close}}` to a button in the DialogFooter. + // in reality it's always used inside the main components as a yielded component, so the onDismiss handler is always defined + if (typeof onDismiss === 'function') { + return onDismiss; + } else { + return NOOP; + } + } +} +setComponentTemplate(TEMPLATE, HdsDialogPrimitiveFooter); + +export { HdsDialogPrimitiveFooter as default }; +//# sourceMappingURL=footer.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/footer.js.map b/packages/components/dist/components/hds/dialog-primitive/footer.js.map new file mode 100644 index 0000000000..d76f726474 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/dialog-primitive/footer.hbs","../../../../src/components/hds/dialog-primitive/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsDialogPrimitiveFooterSignature {\n Args: {\n contextualClass?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onDismiss?: (event: MouseEvent, ...args: any[]) => void;\n };\n Blocks: {\n default: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n close: (event: MouseEvent, ...args: any[]) => void;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nconst NOOP = (): void => {};\n\nexport default class HdsDialogPrimitiveFooter extends Component {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onDismiss(): (event: MouseEvent, ...args: any[]) => void {\n const { onDismiss } = this.args;\n\n // notice: this is to make sure the function is always defined when consumers add `{{on 'click' F.close}}` to a button in the DialogFooter.\n // in reality it's always used inside the main components as a yielded component, so the onDismiss handler is always defined\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return NOOP;\n }\n }\n}\n"],"names":["NOOP","HdsDialogPrimitiveFooter","Component","onDismiss","args","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gNAAgN;;ACDlP;AACA;AACA;AACA;;AAqBA,MAAMA,IAAI,GAAGA,MAAY,EAAE;AAEZ,MAAMC,wBAAwB,SAASC,SAAS,CAAoC;AACjG;EACA,IAAIC,SAASA,GAAgD;IAC3D,MAAM;AAAEA,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;;AAE/B;AACA;AACA,IAAA,IAAI,OAAOD,SAAS,KAAK,UAAU,EAAE;AACnC,MAAA,OAAOA,SAAS;AAClB,KAAC,MAAM;AACL,MAAA,OAAOH,IAAI;AACb;AACF;AACF;AAACK,oBAAA,CAAAC,QAAA,EAboBL,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/header.js b/packages/components/dist/components/hds/dialog-primitive/header.js new file mode 100644 index 0000000000..09e827d503 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/header.js @@ -0,0 +1,42 @@ +import Component from '@glimmer/component'; +import { HdsDialogPrimitiveHeaderTitleTagValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{#if @icon}}\n \n {{/if}}\n\n {{#let (element this.titleTag) as |Tag|}}\n {{#if @tagline}}\n \n {{@tagline}}\n \n {{/if}}\n\n \n {{yield}}\n \n \n {{/let}}\n\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const NOOP = () => {}; +class HdsDialogPrimitiveHeader extends Component { + get titleTag() { + return this.args.titleTag ?? HdsDialogPrimitiveHeaderTitleTagValues.Div; + } + + /** + * @param onDismiss + * @type {function} + * @default () => {} + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onDismiss() { + const { + onDismiss + } = this.args; + + // notice: this is a guard used in case the button is used as standalone element (eg. in the showcase) + // in reality it's always used inside the main components as a yielded component, so the onDismiss handler is always defined + if (typeof onDismiss === 'function') { + return onDismiss; + } else { + return NOOP; + } + } +} +setComponentTemplate(TEMPLATE, HdsDialogPrimitiveHeader); + +export { HdsDialogPrimitiveHeader as default }; +//# sourceMappingURL=header.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/header.js.map b/packages/components/dist/components/hds/dialog-primitive/header.js.map new file mode 100644 index 0000000000..e1c8dece2f --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sources":["../../../../src/components/hds/dialog-primitive/header.hbs","../../../../src/components/hds/dialog-primitive/header.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{#if @icon}}\\n \\n {{/if}}\\n\\n {{#let (element this.titleTag) as |Tag|}}\\n {{#if @tagline}}\\n \\n {{@tagline}}\\n \\n {{/if}}\\n\\n \\n {{yield}}\\n \\n \\n {{/let}}\\n\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsIconSignature } from '../icon';\nimport type { HdsDialogPrimitiveHeaderTitleTags } from './types';\nimport { HdsDialogPrimitiveHeaderTitleTagValues } from './types.ts';\n\nexport interface HdsDialogPrimitiveHeaderSignature {\n Args: {\n contextualClassPrefix?: string;\n id?: string;\n icon?: HdsIconSignature['Args']['name'];\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onDismiss?: (event: MouseEvent, ...args: any[]) => void;\n titleTag?: HdsDialogPrimitiveHeaderTitleTags;\n tagline?: string;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst NOOP = (): void => {};\n\nexport default class HdsDialogPrimitiveHeader extends Component {\n get titleTag(): HdsDialogPrimitiveHeaderTitleTags {\n return this.args.titleTag ?? HdsDialogPrimitiveHeaderTitleTagValues.Div;\n }\n\n /**\n * @param onDismiss\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onDismiss(): (event: MouseEvent, ...args: any[]) => void {\n const { onDismiss } = this.args;\n\n // notice: this is a guard used in case the button is used as standalone element (eg. in the showcase)\n // in reality it's always used inside the main components as a yielded component, so the onDismiss handler is always defined\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return NOOP;\n }\n }\n}\n"],"names":["NOOP","HdsDialogPrimitiveHeader","Component","titleTag","args","HdsDialogPrimitiveHeaderTitleTagValues","Div","onDismiss","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,4wCAA4wC;;ACD9yC;AACA;AACA;AACA;;AAuBA,MAAMA,IAAI,GAAGA,MAAY,EAAE;AAEZ,MAAMC,wBAAwB,SAASC,SAAS,CAAoC;EACjG,IAAIC,QAAQA,GAAsC;IAChD,OAAO,IAAI,CAACC,IAAI,CAACD,QAAQ,IAAIE,sCAAsC,CAACC,GAAG;AACzE;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIC,SAASA,GAAgD;IAC3D,MAAM;AAAEA,MAAAA;KAAW,GAAG,IAAI,CAACH,IAAI;;AAE/B;AACA;AACA,IAAA,IAAI,OAAOG,SAAS,KAAK,UAAU,EAAE;AACnC,MAAA,OAAOA,SAAS;AAClB,KAAC,MAAM;AACL,MAAA,OAAOP,IAAI;AACb;AACF;AACF;AAACQ,oBAAA,CAAAC,QAAA,EAtBoBR,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/overlay.js b/packages/components/dist/components/hds/dialog-primitive/overlay.js new file mode 100644 index 0000000000..7d61e84b13 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/overlay.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDialogPrimitiveOverlay = TemplateOnlyComponent(); +var overlay = setComponentTemplate(TEMPLATE, HdsDialogPrimitiveOverlay); + +export { overlay as default }; +//# sourceMappingURL=overlay.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/overlay.js.map b/packages/components/dist/components/hds/dialog-primitive/overlay.js.map new file mode 100644 index 0000000000..902f203bb6 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/overlay.js.map @@ -0,0 +1 @@ +{"version":3,"file":"overlay.js","sources":["../../../../src/components/hds/dialog-primitive/overlay.hbs","../../../../src/components/hds/dialog-primitive/overlay.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDialogPrimitiveOverlaySignature {\n Args: {\n contextualClass?: string;\n };\n Element: HTMLDivElement;\n}\n\nconst HdsDialogPrimitiveOverlay =\n templateOnlyComponent();\n\nexport default HdsDialogPrimitiveOverlay;\n"],"names":["HdsDialogPrimitiveOverlay","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wJAAwJ;;ACD1L;AACA;AACA;AACA;;AAWA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAAsC;AAE7D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/types.js b/packages/components/dist/components/hds/dialog-primitive/types.js new file mode 100644 index 0000000000..3f061542fe --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/types.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsDialogPrimitiveHeaderTitleTagValues = /*#__PURE__*/function (HdsDialogPrimitiveHeaderTitleTagValues) { + HdsDialogPrimitiveHeaderTitleTagValues["Div"] = "div"; + HdsDialogPrimitiveHeaderTitleTagValues["H1"] = "h1"; + HdsDialogPrimitiveHeaderTitleTagValues["H2"] = "h2"; + HdsDialogPrimitiveHeaderTitleTagValues["H3"] = "h3"; + HdsDialogPrimitiveHeaderTitleTagValues["H4"] = "h4"; + HdsDialogPrimitiveHeaderTitleTagValues["H5"] = "h5"; + HdsDialogPrimitiveHeaderTitleTagValues["H6"] = "h6"; + return HdsDialogPrimitiveHeaderTitleTagValues; +}({}); + +export { HdsDialogPrimitiveHeaderTitleTagValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/types.js.map b/packages/components/dist/components/hds/dialog-primitive/types.js.map new file mode 100644 index 0000000000..c6a58e6f8c --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/dialog-primitive/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsDialogPrimitiveHeaderTitleTagValues {\n Div = 'div',\n H1 = 'h1',\n H2 = 'h2',\n H3 = 'h3',\n H4 = 'h4',\n H5 = 'h5',\n H6 = 'h6',\n}\n\nexport type HdsDialogPrimitiveHeaderTitleTags =\n `${HdsDialogPrimitiveHeaderTitleTagValues}`;\n"],"names":["HdsDialogPrimitiveHeaderTitleTagValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,sCAAsC,0BAAtCA,sCAAsC,EAAA;EAAtCA,sCAAsC,CAAA,KAAA,CAAA,GAAA,KAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;EAAtCA,sCAAsC,CAAA,IAAA,CAAA,GAAA,IAAA;AAAA,EAAA,OAAtCA,sCAAsC;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dialog-primitive/wrapper.js b/packages/components/dist/components/hds/dialog-primitive/wrapper.js new file mode 100644 index 0000000000..659b3df03d --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/wrapper.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n {{yield to=\"header\"}}\n
    \n
    \n {{yield to=\"body\"}}\n
    \n
    \n {{yield to=\"footer\"}}\n
    \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDialogPrimitiveWrapper = TemplateOnlyComponent(); +var wrapper = setComponentTemplate(TEMPLATE, HdsDialogPrimitiveWrapper); + +export { wrapper as default }; +//# sourceMappingURL=wrapper.js.map diff --git a/packages/components/dist/components/hds/dialog-primitive/wrapper.js.map b/packages/components/dist/components/hds/dialog-primitive/wrapper.js.map new file mode 100644 index 0000000000..ff02b38b00 --- /dev/null +++ b/packages/components/dist/components/hds/dialog-primitive/wrapper.js.map @@ -0,0 +1 @@ +{"version":3,"file":"wrapper.js","sources":["../../../../src/components/hds/dialog-primitive/wrapper.hbs","../../../../src/components/hds/dialog-primitive/wrapper.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n {{yield to=\\\"header\\\"}}\\n
    \\n
    \\n {{yield to=\\\"body\\\"}}\\n
    \\n
    \\n {{yield to=\\\"footer\\\"}}\\n
    \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDialogPrimitiveWrapperSignature {\n Blocks: {\n header?: [];\n body?: [];\n footer?: [];\n };\n Element: HTMLDialogElement;\n}\n\nconst HdsDialogPrimitiveWrapper =\n templateOnlyComponent();\n\nexport default HdsDialogPrimitiveWrapper;\n"],"names":["HdsDialogPrimitiveWrapper","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,kbAAkb;;ACDpd;AACA;AACA;AACA;;AAaA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAAsC;AAE7D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/disclosure-primitive/index.js b/packages/components/dist/components/hds/disclosure-primitive/index.js new file mode 100644 index 0000000000..9daad2a53d --- /dev/null +++ b/packages/components/dist/components/hds/disclosure-primitive/index.js @@ -0,0 +1,73 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { schedule } from '@ember/runloop'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n
    \n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\"toggle\"}}\n
    \n {{#if this.isOpen}}\n
    \n {{yield (hash close=this.close) to=\"content\"}}\n
    \n {{/if}}\n
    "); + +var _class, _descriptor, _descriptor2; +let HdsDisclosurePrimitive = (_class = class HdsDisclosurePrimitive extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "_isOpen", _descriptor, this); + _initializerDefineProperty(this, "_isControlled", _descriptor2, this); + } + get isOpen() { + if (this._isControlled) { + // if the state is controlled from outside, the argument overrides the internal state + return this.args.isOpen ?? this._isOpen; + } else { + // if the state changes internally, the internal state overrides the argument + return this._isOpen; + } + } + set isOpen(value) { + this._isOpen = value || false; + } + onClickToggle() { + this.isOpen = !this.isOpen; + this._isControlled = false; + // we call the "onClickToggle" callback if it exists and it's a function + if (this.args.onClickToggle && typeof this.args.onClickToggle === 'function') { + this.args.onClickToggle(this.isOpen); + } + } + onStateChange() { + if (this.args.isOpen !== undefined) { + this.isOpen = this.args.isOpen; + } + this._isControlled = true; + } + close() { + // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation + // eslint-disable-next-line ember/no-runloop + schedule('afterRender', () => { + this.isOpen = false; + // we call the "onClose" callback if it exists (and is a function) + if (this.args.onClose && typeof this.args.onClose === 'function') { + this.args.onClose(); + } + }); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_isOpen", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "_isControlled", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return this.args.isOpen !== undefined; + } +}), _applyDecoratedDescriptor(_class.prototype, "onClickToggle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickToggle"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onStateChange", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onStateChange"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "close", [action], Object.getOwnPropertyDescriptor(_class.prototype, "close"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsDisclosurePrimitive); + +export { HdsDisclosurePrimitive as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/disclosure-primitive/index.js.map b/packages/components/dist/components/hds/disclosure-primitive/index.js.map new file mode 100644 index 0000000000..8a427b123f --- /dev/null +++ b/packages/components/dist/components/hds/disclosure-primitive/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/disclosure-primitive/index.hbs","../../../../src/components/hds/disclosure-primitive/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n
    \\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\\\"toggle\\\"}}\\n
    \\n {{#if this.isOpen}}\\n
    \\n {{yield (hash close=this.close) to=\\\"content\\\"}}\\n
    \\n {{/if}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { schedule } from '@ember/runloop';\n\nexport interface HdsDisclosurePrimitiveSignature {\n Args: {\n isOpen?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClose?: (...args: any[]) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle?: (...args: any[]) => void;\n };\n Blocks: {\n toggle: [\n {\n isOpen: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle: (...args: any[]) => void;\n },\n ];\n content: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n close: (...args: any[]) => void;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsDisclosurePrimitive extends Component {\n @tracked private _isOpen = false;\n @tracked private _isControlled = this.args.isOpen !== undefined;\n\n get isOpen(): boolean {\n if (this._isControlled) {\n // if the state is controlled from outside, the argument overrides the internal state\n return this.args.isOpen ?? this._isOpen;\n } else {\n // if the state changes internally, the internal state overrides the argument\n return this._isOpen;\n }\n }\n\n set isOpen(value) {\n this._isOpen = value || false;\n }\n\n @action\n onClickToggle(): void {\n this.isOpen = !this.isOpen;\n this._isControlled = false;\n // we call the \"onClickToggle\" callback if it exists and it's a function\n if (\n this.args.onClickToggle &&\n typeof this.args.onClickToggle === 'function'\n ) {\n this.args.onClickToggle(this.isOpen);\n }\n }\n\n @action\n onStateChange(): void {\n if (this.args.isOpen !== undefined) {\n this.isOpen = this.args.isOpen;\n }\n this._isControlled = true;\n }\n\n @action\n close(): void {\n // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', (): void => {\n this.isOpen = false;\n // we call the \"onClose\" callback if it exists (and is a function)\n if (this.args.onClose && typeof this.args.onClose === 'function') {\n this.args.onClose();\n }\n });\n }\n}\n"],"names":["HdsDisclosurePrimitive","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","isOpen","_isControlled","_isOpen","value","onClickToggle","onStateChange","undefined","close","schedule","onClose","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,2eAA2e;;;ACmCxfA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,CAAkC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EA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sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dismiss-button/index.js b/packages/components/dist/components/hds/dismiss-button/index.js new file mode 100644 index 0000000000..37cf40c1bd --- /dev/null +++ b/packages/components/dist/components/hds/dismiss-button/index.js @@ -0,0 +1,25 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDismissButton extends Component { + /** + * @param ariaLabel + * @type {string} + * @default 'Dismiss' + */ + get ariaLabel() { + return this.args.ariaLabel ?? 'Dismiss'; + } +} +setComponentTemplate(TEMPLATE, HdsDismissButton); + +export { HdsDismissButton as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/dismiss-button/index.js.map b/packages/components/dist/components/hds/dismiss-button/index.js.map new file mode 100644 index 0000000000..9f26636142 --- /dev/null +++ b/packages/components/dist/components/hds/dismiss-button/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dismiss-button/index.hbs","../../../../src/components/hds/dismiss-button/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport interface HdsDismissButtonSignature {\n Args: {\n ariaLabel?: string;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsDismissButton extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Dismiss'\n */\n get ariaLabel(): string {\n return this.args.ariaLabel ?? 'Dismiss';\n }\n}\n"],"names":["HdsDismissButton","Component","ariaLabel","args","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,sOAAsO;;ACDxQ;AACA;AACA;AACA;;AAWe,MAAMA,gBAAgB,SAASC,SAAS,CAA4B;AACjF;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAW;AACtB,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,SAAS;AACzC;AACF;AAACE,oBAAA,CAAAC,QAAA,EAToBL,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/footer.js b/packages/components/dist/components/hds/dropdown/footer.js new file mode 100644 index 0000000000..b69651f7a0 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/footer.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDropdownFooter = TemplateOnlyComponent(); +var footer = setComponentTemplate(TEMPLATE, HdsDropdownFooter); + +export { footer as default }; +//# sourceMappingURL=footer.js.map diff --git a/packages/components/dist/components/hds/dropdown/footer.js.map b/packages/components/dist/components/hds/dropdown/footer.js.map new file mode 100644 index 0000000000..84c54470bf --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/dropdown/footer.hbs","../../../../src/components/hds/dropdown/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownFooterSignature {\n Args: {\n hasDivider?: boolean;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsDropdownFooter = templateOnlyComponent();\n\nexport default HdsDropdownFooter;\n"],"names":["HdsDropdownFooter","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iNAAiN;;ACDnP;AACA;AACA;AACA;;AAcA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/header.js b/packages/components/dist/components/hds/dropdown/header.js new file mode 100644 index 0000000000..69c2b7a8e3 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/header.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDropdownHeader = TemplateOnlyComponent(); +var header = setComponentTemplate(TEMPLATE, HdsDropdownHeader); + +export { header as default }; +//# sourceMappingURL=header.js.map diff --git a/packages/components/dist/components/hds/dropdown/header.js.map b/packages/components/dist/components/hds/dropdown/header.js.map new file mode 100644 index 0000000000..08116b9659 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sources":["../../../../src/components/hds/dropdown/header.hbs","../../../../src/components/hds/dropdown/header.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownHeaderSignature {\n Args: {\n hasDivider?: boolean;\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nconst HdsDropdownHeader = templateOnlyComponent();\n\nexport default HdsDropdownHeader;\n"],"names":["HdsDropdownHeader","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iNAAiN;;ACDnP;AACA;AACA;AACA;;AAcA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,aAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/index.js b/packages/components/dist/components/hds/dropdown/index.js new file mode 100644 index 0000000000..f67a8f9d30 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/index.js @@ -0,0 +1,93 @@ +import { _ as _applyDecoratedDescriptor } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { assert } from '@ember/debug'; +import { HdsDropdownPositionValues, HdsDropdownPositionToPlacementValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n {{yield\n (hash\n ToggleButton=(component\n \"hds/dropdown/toggle/button\" isOpen=PP.isOpen setupPrimitiveToggle=PP.setupPrimitiveToggle\n )\n ToggleIcon=(component \"hds/dropdown/toggle/icon\" isOpen=PP.isOpen setupPrimitiveToggle=PP.setupPrimitiveToggle)\n )\n }}\n \n {{#if (or PP.isOpen @preserveContentInDom)}}\n {{yield (hash Header=(component \"hds/dropdown/header\"))}}\n
      \n {{yield\n (hash\n close=PP.hidePopover\n Checkbox=(component \"hds/dropdown/list-item/checkbox\")\n Checkmark=(component \"hds/dropdown/list-item/checkmark\")\n CopyItem=(component \"hds/dropdown/list-item/copy-item\")\n Description=(component \"hds/dropdown/list-item/description\")\n Generic=(component \"hds/dropdown/list-item/generic\")\n Interactive=(component \"hds/dropdown/list-item/interactive\")\n Radio=(component \"hds/dropdown/list-item/radio\")\n Separator=(component \"hds/dropdown/list-item/separator\")\n Title=(component \"hds/dropdown/list-item/title\")\n )\n }}\n
    \n {{yield (hash close=PP.hidePopover Footer=(component \"hds/dropdown/footer\"))}}\n {{/if}}\n
    \n \n
    "); + +var _class; +const DEFAULT_POSITION = HdsDropdownPositionValues.BottomRight; +const POSITIONS = Object.values(HdsDropdownPositionValues); +let HdsDropdown = (_class = class HdsDropdown extends Component { + /** + * @param listPosition + * @type {string} + * @default bottom-right + * @description Determines the position of the "list" + */ + get listPosition() { + const { + listPosition = DEFAULT_POSITION + } = this.args; + assert(`@listPosition for "Hds::Dropdown::Index" must be one of the following: ${POSITIONS.join(', ')}; received: ${listPosition}`, POSITIONS.includes(listPosition)); + return listPosition; + } + get enableCollisionDetection() { + return this.args.enableCollisionDetection ?? false; + } + get matchToggleWidth() { + return this.args.matchToggleWidth ?? false; + } + get anchoredPositionOptions() { + // custom options specific for the `RichTooltip` component + // for details see the `hds-anchored-position` modifier + return { + placement: HdsDropdownPositionToPlacementValues[this.listPosition], + offsetOptions: 4, + enableCollisionDetection: this.enableCollisionDetection ? 'flip' : false, + matchToggleWidth: this.matchToggleWidth + }; + } + + /** + * Get the class names to apply to the element + * @method classNames + * @return {string} The "class" attribute to apply to the root element + */ + get classNames() { + const classes = ['hds-dropdown']; + + // add a class based on the @isInline argument + if (this.args.isInline) { + classes.push('hds-dropdown--is-inline'); + } + return classes.join(' '); + } + + /** + * Get the class names to apply to the content + * @method classNamesContent + * @return {string} The "class" attribute to apply to the disclosed content + */ + get classNamesContent() { + const classes = ['hds-dropdown__content']; + + // add a class based on the @listPosition argument + // TODO: we preserved these classes to avoid introducing breaking changes for consumers who rely on these classes for tests, but we aim to remove them in the next major release + // context: https://github.com/hashicorp/design-system/pull/2309#discussion_r1706941892 + classes.push(`hds-dropdown__content--position-${this.listPosition}`); + + // add a class based on the @width or @matchToggleWidth arguments + if (this.args.width || this.args.matchToggleWidth) { + classes.push('hds-dropdown__content--fixed-width'); + } + return classes.join(' '); + } + didInsertList(element) { + const checkmarkItems = element.querySelectorAll(`[role="option"]`); + if (checkmarkItems.length) { + const toggleButtonId = element.closest('.hds-dropdown')?.querySelector('.hds-dropdown-toggle-button')?.getAttribute('id'); + element.setAttribute('role', 'listbox'); + if (toggleButtonId) { + element.setAttribute('aria-labelledby', toggleButtonId); + } + } + } +}, _applyDecoratedDescriptor(_class.prototype, "didInsertList", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsertList"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsDropdown); + +export { DEFAULT_POSITION, POSITIONS, HdsDropdown as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/dropdown/index.js.map b/packages/components/dist/components/hds/dropdown/index.js.map new file mode 100644 index 0000000000..5ff3d7c061 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/dropdown/index.hbs","../../../../src/components/hds/dropdown/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n {{yield\\n (hash\\n ToggleButton=(component\\n \\\"hds/dropdown/toggle/button\\\" isOpen=PP.isOpen setupPrimitiveToggle=PP.setupPrimitiveToggle\\n )\\n ToggleIcon=(component \\\"hds/dropdown/toggle/icon\\\" isOpen=PP.isOpen setupPrimitiveToggle=PP.setupPrimitiveToggle)\\n )\\n }}\\n \\n {{#if (or PP.isOpen @preserveContentInDom)}}\\n {{yield (hash Header=(component \\\"hds/dropdown/header\\\"))}}\\n
      \\n {{yield\\n (hash\\n close=PP.hidePopover\\n Checkbox=(component \\\"hds/dropdown/list-item/checkbox\\\")\\n Checkmark=(component \\\"hds/dropdown/list-item/checkmark\\\")\\n CopyItem=(component \\\"hds/dropdown/list-item/copy-item\\\")\\n Description=(component \\\"hds/dropdown/list-item/description\\\")\\n Generic=(component \\\"hds/dropdown/list-item/generic\\\")\\n Interactive=(component \\\"hds/dropdown/list-item/interactive\\\")\\n Radio=(component \\\"hds/dropdown/list-item/radio\\\")\\n Separator=(component \\\"hds/dropdown/list-item/separator\\\")\\n Title=(component \\\"hds/dropdown/list-item/title\\\")\\n )\\n }}\\n
    \\n {{yield (hash close=PP.hidePopover Footer=(component \\\"hds/dropdown/footer\\\"))}}\\n {{/if}}\\n
    \\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\n\nimport {\n // map Dropdown's `listPosition` values to PopoverPrimitive's `placement` values\n HdsDropdownPositionToPlacementValues,\n // Dropdown's `listPosition` values\n HdsDropdownPositionValues,\n} from './types.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { MenuPrimitiveSignature } from '../menu-primitive';\nimport type { HdsDropdownFooterSignature } from './footer';\nimport type { HdsDropdownHeaderSignature } from './header';\nimport type { HdsDropdownListItemCheckboxSignature } from './list-item/checkbox';\nimport type { HdsDropdownListItemCheckmarkSignature } from './list-item/checkmark';\nimport type { HdsDropdownListItemCopyItemSignature } from './list-item/copy-item';\nimport type { HdsDropdownListItemDescriptionSignature } from './list-item/description';\nimport type { HdsDropdownListItemGenericSignature } from './list-item/generic';\nimport type { HdsDropdownListItemInteractiveSignature } from './list-item/interactive';\nimport type { HdsDropdownListItemRadioSignature } from './list-item/radio';\nimport type { HdsDropdownListItemSeparatorSignature } from './list-item/separator';\nimport type { HdsDropdownListItemTitleSignature } from './list-item/title';\nimport type { HdsDropdownToggleButtonSignature } from './toggle/button';\nimport type { HdsDropdownToggleIconSignature } from './toggle/icon';\nimport type { HdsDropdownPositions } from './types';\n\nimport type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts';\n\nexport const DEFAULT_POSITION = HdsDropdownPositionValues.BottomRight;\nexport const POSITIONS: string[] = Object.values(HdsDropdownPositionValues);\n\nexport interface HdsDropdownSignature {\n Args: MenuPrimitiveSignature['Args'] & {\n height?: string;\n isInline?: boolean;\n isOpen?: boolean;\n listPosition?: HdsDropdownPositions;\n width?: string;\n enableCollisionDetection?: FloatingUIOptions['enableCollisionDetection'];\n preserveContentInDom?: boolean;\n matchToggleWidth?: boolean;\n };\n Blocks: {\n default: [\n {\n Footer?: ComponentLike;\n Header?: ComponentLike;\n Checkbox?: ComponentLike;\n Checkmark?: ComponentLike;\n CopyItem?: ComponentLike;\n Description?: ComponentLike;\n Generic?: ComponentLike;\n Interactive?: ComponentLike;\n Radio?: ComponentLike;\n Separator?: ComponentLike;\n Title?: ComponentLike;\n ToggleButton?: ComponentLike;\n ToggleIcon?: ComponentLike;\n close?: () => void;\n },\n ];\n };\n Element: MenuPrimitiveSignature['Element'];\n}\n\nexport default class HdsDropdown extends Component {\n /**\n * @param listPosition\n * @type {string}\n * @default bottom-right\n * @description Determines the position of the \"list\"\n */\n get listPosition(): HdsDropdownPositions {\n const { listPosition = DEFAULT_POSITION } = this.args;\n\n assert(\n `@listPosition for \"Hds::Dropdown::Index\" must be one of the following: ${POSITIONS.join(\n ', '\n )}; received: ${listPosition}`,\n POSITIONS.includes(listPosition)\n );\n\n return listPosition;\n }\n\n get enableCollisionDetection(): FloatingUIOptions['enableCollisionDetection'] {\n return this.args.enableCollisionDetection ?? false;\n }\n\n get matchToggleWidth(): FloatingUIOptions['matchToggleWidth'] {\n return this.args.matchToggleWidth ?? false;\n }\n\n get anchoredPositionOptions(): {\n placement: FloatingUIOptions['placement'];\n offsetOptions: FloatingUIOptions['offsetOptions'];\n enableCollisionDetection: FloatingUIOptions['enableCollisionDetection'];\n matchToggleWidth: FloatingUIOptions['matchToggleWidth'];\n } {\n // custom options specific for the `RichTooltip` component\n // for details see the `hds-anchored-position` modifier\n return {\n placement: HdsDropdownPositionToPlacementValues[this.listPosition],\n offsetOptions: 4,\n enableCollisionDetection: this.enableCollisionDetection ? 'flip' : false,\n matchToggleWidth: this.matchToggleWidth,\n };\n }\n\n /**\n * Get the class names to apply to the element\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the root element\n */\n get classNames(): string {\n const classes = ['hds-dropdown'];\n\n // add a class based on the @isInline argument\n if (this.args.isInline) {\n classes.push('hds-dropdown--is-inline');\n }\n\n return classes.join(' ');\n }\n\n /**\n * Get the class names to apply to the content\n * @method classNamesContent\n * @return {string} The \"class\" attribute to apply to the disclosed content\n */\n get classNamesContent(): string {\n const classes = ['hds-dropdown__content'];\n\n // add a class based on the @listPosition argument\n // TODO: we preserved these classes to avoid introducing breaking changes for consumers who rely on these classes for tests, but we aim to remove them in the next major release\n // context: https://github.com/hashicorp/design-system/pull/2309#discussion_r1706941892\n classes.push(`hds-dropdown__content--position-${this.listPosition}`);\n\n // add a class based on the @width or @matchToggleWidth arguments\n if (this.args.width || this.args.matchToggleWidth) {\n classes.push('hds-dropdown__content--fixed-width');\n }\n\n return classes.join(' ');\n }\n\n @action\n didInsertList(element: HTMLUListElement): void {\n const checkmarkItems = element.querySelectorAll(`[role=\"option\"]`);\n if (checkmarkItems.length) {\n const toggleButtonId = element\n .closest('.hds-dropdown')\n ?.querySelector('.hds-dropdown-toggle-button')\n ?.getAttribute('id');\n\n element.setAttribute('role', 'listbox');\n\n if (toggleButtonId) {\n element.setAttribute('aria-labelledby', toggleButtonId);\n }\n }\n }\n}\n"],"names":["DEFAULT_POSITION","HdsDropdownPositionValues","BottomRight","POSITIONS","Object","values","HdsDropdown","_class","Component","listPosition","args","assert","join","includes","enableCollisionDetection","matchToggleWidth","anchoredPositionOptions","placement","HdsDropdownPositionToPlacementValues","offsetOptions","classNames","classes","isInline","push","classNamesContent","width","didInsertList","element","checkmarkItems","querySelectorAll","length","toggleButtonId","closest","querySelector","getAttribute","setAttribute","_applyDecoratedDescriptor","prototype","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,y3DAAy3D;;;ACkC94DA,MAAAA,gBAAgB,GAAGC,yBAAyB,CAACC;AACnD,MAAMC,SAAmB,GAAGC,MAAM,CAACC,MAAM,CAACJ,yBAAyB;AAoCrDK,IAAAA,WAAW,IAAAC,MAAA,GAAjB,MAAMD,WAAW,SAASE,SAAS,CAAuB;AACvE;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,YAAYA,GAAyB;IACvC,MAAM;AAAEA,MAAAA,YAAY,GAAGT;KAAkB,GAAG,IAAI,CAACU,IAAI;AAErDC,IAAAA,MAAM,CACJ,CAA0ER,uEAAAA,EAAAA,SAAS,CAACS,IAAI,CACtF,IACF,CAAC,CAAA,YAAA,EAAeH,YAAY,CAAA,CAAE,EAC9BN,SAAS,CAACU,QAAQ,CAACJ,YAAY,CACjC,CAAC;AAED,IAAA,OAAOA,YAAY;AACrB;EAEA,IAAIK,wBAAwBA,GAAkD;AAC5E,IAAA,OAAO,IAAI,CAACJ,IAAI,CAACI,wBAAwB,IAAI,KAAK;AACpD;EAEA,IAAIC,gBAAgBA,GAA0C;AAC5D,IAAA,OAAO,IAAI,CAACL,IAAI,CAACK,gBAAgB,IAAI,KAAK;AAC5C;EAEA,IAAIC,uBAAuBA,GAKzB;AACA;AACA;IACA,OAAO;AACLC,MAAAA,SAAS,EAAEC,oCAAoC,CAAC,IAAI,CAACT,YAAY,CAAC;AAClEU,MAAAA,aAAa,EAAE,CAAC;AAChBL,MAAAA,wBAAwB,EAAE,IAAI,CAACA,wB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;AACzD;AACF;AACF;AACF,CAAC,EAAAK,yBAAA,CAAA7B,MAAA,CAAA8B,SAAA,EAAA,eAAA,EAAA,CAhBEC,MAAM,CAAAlC,EAAAA,MAAA,CAAAmC,wBAAA,CAAAhC,MAAA,CAAA8B,SAAA,oBAAA9B,MAAA,CAAA8B,SAAA,CAAA,EAAA9B,MAAA;AAjFuBiC,oBAAA,CAAAC,QAAA,EAAXnC,WAAW,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/checkbox.js b/packages/components/dist/components/hds/dropdown/list-item/checkbox.js new file mode 100644 index 0000000000..7d18cf5dca --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/checkbox.js @@ -0,0 +1,24 @@ +import Component from '@glimmer/component'; +import { getElementId } from '../../../../utils/hds-get-element-id.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n \n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemCheckbox extends Component { + /** + * Determines the unique ID to assign to the checkbox control + */ + get id() { + return getElementId(this); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemCheckbox); + +export { HdsDropdownListItemCheckbox as default }; +//# sourceMappingURL=checkbox.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/checkbox.js.map b/packages/components/dist/components/hds/dropdown/list-item/checkbox.js.map new file mode 100644 index 0000000000..bb441f91ff --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/checkbox.js.map @@ -0,0 +1 @@ +{"version":3,"file":"checkbox.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkbox.hbs","../../../../../src/components/hds/dropdown/list-item/checkbox.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n \\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsFormCheckboxBaseSignature } from '../../form/checkbox/base.ts';\n\nexport interface HdsDropdownListItemCheckboxSignature {\n Args: HdsFormCheckboxBaseSignature['Args'] & {\n count?: string | number;\n icon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default: [];\n };\n Element: HdsFormCheckboxBaseSignature['Element'];\n}\n\nexport default class HdsDropdownListItemCheckbox extends Component {\n /**\n * Determines the unique ID to assign to the checkbox control\n */\n get id(): string {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemCheckbox","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,qvBAAqvB;;ACDvxB;AACA;AACA;AACA;;AAkBe,MAAMA,2BAA2B,SAASC,SAAS,CAAuC;AACvG;AACF;AACA;EACE,IAAIC,EAAEA,GAAW;IACf,OAAOC,YAAY,CAAC,IAAI,CAAC;AAC3B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,2BAA2B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/checkmark.js b/packages/components/dist/components/hds/dropdown/list-item/checkmark.js new file mode 100644 index 0000000000..5a3d265bb0 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/checkmark.js @@ -0,0 +1,31 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\n
  • \n \n {{#if @icon}}\n \n \n \n {{/if}}\n \n {{yield}}\n \n {{#if @count}}\n {{@count}}\n {{/if}}\n \n {{#if @selected}}\n \n {{/if}}\n \n \n
  • \n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemCheckmark extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-dropdown-list-item', 'hds-dropdown-list-item--color-action', 'hds-dropdown-list-item--variant-checkmark']; + + // add a class based on the @selected argument + if (this.args.selected) { + classes.push('hds-dropdown-list-item--variant-checkmark-selected'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemCheckmark); + +export { HdsDropdownListItemCheckmark as default }; +//# sourceMappingURL=checkmark.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/checkmark.js.map b/packages/components/dist/components/hds/dropdown/list-item/checkmark.js.map new file mode 100644 index 0000000000..c711d04882 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/checkmark.js.map @@ -0,0 +1 @@ +{"version":3,"file":"checkmark.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkmark.hbs","../../../../../src/components/hds/dropdown/list-item/checkmark.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\\n
  • \\n \\n {{#if @icon}}\\n \\n \\n \\n {{/if}}\\n \\n {{yield}}\\n \\n {{#if @count}}\\n {{@count}}\\n {{/if}}\\n \\n {{#if @selected}}\\n \\n {{/if}}\\n \\n \\n
  • \\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsInteractiveSignature } from '../../interactive';\n\nexport interface HdsDropdownListItemCheckmarkSignature {\n Args: HdsInteractiveSignature['Args'] & {\n count?: string | number;\n icon?: HdsIconSignature['Args']['name'];\n selected?: boolean;\n };\n Blocks: {\n default: [];\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nexport default class HdsDropdownListItemCheckmark extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--color-action',\n 'hds-dropdown-list-item--variant-checkmark',\n ];\n\n // add a class based on the @selected argument\n if (this.args.selected) {\n classes.push('hds-dropdown-list-item--variant-checkmark-selected');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsDropdownListItemCheckmark","Component","classNames","classes","args","selected","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,0kDAA0kD;;ACD5mD;AACA;AACA;AACA;;AAkBe,MAAMA,4BAA4B,SAASC,SAAS,CAAwC;AACzG;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;IACvB,MAAMC,OAAO,GAAG,CACd,wBAAwB,EACxB,sCAAsC,EACtC,2CAA2C,CAC5C;;AAED;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;AACtBF,MAAAA,OAAO,CAACG,IAAI,CAAC,oDAAoD,CAAC;AACpE;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EApBoBT,4BAA4B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/copy-item.js b/packages/components/dist/components/hds/dropdown/list-item/copy-item.js new file mode 100644 index 0000000000..563bc5dbe4 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/copy-item.js @@ -0,0 +1,53 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n {{#if @copyItemTitle}}\n {{@copyItemTitle}}\n {{/if}}\n \n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemCopyItem extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::ListItem::CopyItem" must have a valid value', text !== undefined); + return text; + } + + /** + * @param isTruncated + * @type {boolean} + * @default true + * @description Indicates that the text should be truncated instead of wrapping and using multiple lines. + */ + get isTruncated() { + const { + isTruncated = true + } = this.args; + return isTruncated; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-dropdown-list-item', 'hds-dropdown-list-item--variant-copy-item']; + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemCopyItem); + +export { HdsDropdownListItemCopyItem as default }; +//# sourceMappingURL=copy-item.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/copy-item.js.map b/packages/components/dist/components/hds/dropdown/list-item/copy-item.js.map new file mode 100644 index 0000000000..6df93f824e --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/copy-item.js.map @@ -0,0 +1 @@ +{"version":3,"file":"copy-item.js","sources":["../../../../../src/components/hds/dropdown/list-item/copy-item.hbs","../../../../../src/components/hds/dropdown/list-item/copy-item.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n {{#if @copyItemTitle}}\\n {{@copyItemTitle}}\\n {{/if}}\\n \\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport type { HdsCopySnippetSignature } from '../../copy/snippet';\n\nexport interface HdsDropdownListItemCopyItemSignature {\n Args: {\n copyItemTitle?: string;\n isTruncated?: HdsCopySnippetSignature['Args']['isTruncated'];\n text: HdsCopySnippetSignature['Args']['textToCopy'];\n };\n Element: HTMLLIElement;\n}\n\nexport default class HdsDropdownListItemCopyItem extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the item. If no text value is defined an error will be thrown\n */\n get text(): HdsCopySnippetSignature['Args']['textToCopy'] {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::CopyItem\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param isTruncated\n * @type {boolean}\n * @default true\n * @description Indicates that the text should be truncated instead of wrapping and using multiple lines.\n */\n get isTruncated(): HdsCopySnippetSignature['Args']['isTruncated'] {\n const { isTruncated = true } = this.args;\n\n return isTruncated;\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(): string {\n const classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--variant-copy-item',\n ];\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsDropdownListItemCopyItem","Component","text","args","assert","undefined","isTruncated","classNames","classes","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,0eAA0e;;ACD5gB;AACA;AACA;AACA;;AAee,MAAMA,2BAA2B,SAASC,SAAS,CAAuC;AACvG;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAkD;IACxD,MAAM;AAAEA,MAAAA;KAAM,GAAG,IAAI,CAACC,IAAI;AAE1BC,IAAAA,MAAM,CACJ,uEAAuE,EACvEF,IAAI,KAAKG,SACX,CAAC;AAED,IAAA,OAAOH,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAII,WAAWA,GAAmD;IAChE,MAAM;AAAEA,MAAAA,WAAW,GAAG;KAAM,GAAG,IAAI,CAACH,IAAI;AAExC,IAAA,OAAOG,WAAW;AACpB;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CACd,wBAAwB,EACxB,2CAA2C,CAC5C;AAED,IAAA,OAAOA,OAAO,CAACC,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA1CoBX,2BAA2B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/description.js b/packages/components/dist/components/hds/dropdown/list-item/description.js new file mode 100644 index 0000000000..d6d06df5d0 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/description.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{this.text}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemDescription extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::ListItem::Description" must have a valid value', text !== undefined); + return text; + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemDescription); + +export { HdsDropdownListItemDescription as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/description.js.map b/packages/components/dist/components/hds/dropdown/list-item/description.js.map new file mode 100644 index 0000000000..404d2e9ef8 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../../src/components/hds/dropdown/list-item/description.hbs","../../../../../src/components/hds/dropdown/list-item/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{this.text}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nexport interface HdsDropdownListItemDescriptionSignature {\n Args: {\n text: string;\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsDropdownListItemDescription extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the item. If no text value is defined an error will be thrown\n */\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::Description\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n}\n"],"names":["HdsDropdownListItemDescription","Component","text","args","assert","undefined","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,oTAAoT;;ACDtV;AACA;AACA;AACA;;AAae,MAAMA,8BAA8B,SAASC,SAAS,CAA0C;AAC7G;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAW;IACjB,MAAM;AAAEA,MAAAA;KAAM,GAAG,IAAI,CAACC,IAAI;AAE1BC,IAAAA,MAAM,CACJ,0EAA0E,EAC1EF,IAAI,KAAKG,SACX,CAAC;AAED,IAAA,OAAOH,IAAI;AACb;AACF;AAACI,oBAAA,CAAAC,QAAA,EAhBoBP,8BAA8B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/generic.js b/packages/components/dist/components/hds/dropdown/list-item/generic.js new file mode 100644 index 0000000000..d51de87413 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/generic.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n {{yield}}\n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDropdownListItemGeneric = TemplateOnlyComponent(); +var generic = setComponentTemplate(TEMPLATE, HdsDropdownListItemGeneric); + +export { generic as default }; +//# sourceMappingURL=generic.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/generic.js.map b/packages/components/dist/components/hds/dropdown/list-item/generic.js.map new file mode 100644 index 0000000000..6aade7c2bf --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/generic.js.map @@ -0,0 +1 @@ +{"version":3,"file":"generic.js","sources":["../../../../../src/components/hds/dropdown/list-item/generic.hbs","../../../../../src/components/hds/dropdown/list-item/generic.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n {{yield}}\\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownListItemGenericSignature {\n Blocks: {\n default: [];\n };\n Element: HTMLLIElement;\n}\n\nconst HdsDropdownListItemGeneric =\n templateOnlyComponent();\n\nexport default HdsDropdownListItemGeneric;\n"],"names":["HdsDropdownListItemGeneric","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+LAA+L;;ACDjO;AACA;AACA;AACA;;AAWA,MAAMA,0BAA0B,GAC9BC,qBAAqB,EAAuC;AAE9D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,0BAA0B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/interactive.js b/packages/components/dist/components/hds/dropdown/list-item/interactive.js new file mode 100644 index 0000000000..6cb2c03bff --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/interactive.js @@ -0,0 +1,57 @@ +import Component from '@glimmer/component'; +import { deprecate, assert } from '@ember/debug'; +import { HdsDropdownListItemInteractiveColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n {{#if @isLoading}}\n
    \n
    \n \n
    \n \n {{#if (has-block)}}\n {{yield (hash Badge=(component \"hds/badge\" size=\"small\"))}}\n {{else}}\n {{this.text}}\n {{/if}}\n \n
    \n {{else}}\n \n {{#if @icon}}\n \n \n \n {{/if}}\n \n {{#if (has-block)}}\n {{yield (hash Badge=(component \"hds/badge\" size=\"small\"))}}\n {{else}}\n {{this.text}}\n {{/if}}\n \n {{#if @trailingIcon}}\n \n \n \n {{/if}}\n \n {{/if}}\n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const DEFAULT_COLOR = HdsDropdownListItemInteractiveColorValues.Action; +const COLORS = Object.values(HdsDropdownListItemInteractiveColorValues); +class HdsDropdownListItemInteractive extends Component { + constructor(owner, args) { + super(owner, args); + if (args.text !== undefined) { + deprecate('The `@text` argument for "Hds::Dropdown::ListItem::Interactive" has been deprecated. Please put text in the yielded block.', false, { + id: 'hds.dropdown.list-item.interactive', + until: '5.0.0', + url: 'https://helios.hashicorp.design/components/dropdown?tab=version%20history#4100', + for: '@hashicorp/design-system-components', + since: { + available: '4.10.0', + enabled: '5.0.0' + } + }); + } + } + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::ListItem::Interactive" must have a valid value', text !== undefined); + return text; + } + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Dropdown::ListItem::Interactive" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + get classNames() { + const classes = ['hds-dropdown-list-item', 'hds-dropdown-list-item--variant-interactive']; + + // add a class based on the @color argument + classes.push(`hds-dropdown-list-item--color-${this.color}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemInteractive); + +export { COLORS, DEFAULT_COLOR, HdsDropdownListItemInteractive as default }; +//# sourceMappingURL=interactive.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/interactive.js.map b/packages/components/dist/components/hds/dropdown/list-item/interactive.js.map new file mode 100644 index 0000000000..f0ba8956b7 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/interactive.js.map @@ -0,0 +1 @@ +{"version":3,"file":"interactive.js","sources":["../../../../../src/components/hds/dropdown/list-item/interactive.hbs","../../../../../src/components/hds/dropdown/list-item/interactive.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n {{#if @isLoading}}\\n
    \\n
    \\n \\n
    \\n \\n {{#if (has-block)}}\\n {{yield (hash Badge=(component \\\"hds/badge\\\" size=\\\"small\\\"))}}\\n {{else}}\\n {{this.text}}\\n {{/if}}\\n \\n
    \\n {{else}}\\n \\n {{#if @icon}}\\n \\n \\n \\n {{/if}}\\n \\n {{#if (has-block)}}\\n {{yield (hash Badge=(component \\\"hds/badge\\\" size=\\\"small\\\"))}}\\n {{else}}\\n {{this.text}}\\n {{/if}}\\n \\n {{#if @trailingIcon}}\\n \\n \\n \\n {{/if}}\\n \\n {{/if}}\\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert, deprecate } from '@ember/debug';\n\nimport { HdsDropdownListItemInteractiveColorValues } from './types.ts';\n\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsInteractiveSignature } from '../../interactive';\nimport type { HdsDropdownListItemInteractiveColors } from './types.ts';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsBadgeSignature } from '../../badge/index.ts';\n\nexport const DEFAULT_COLOR = HdsDropdownListItemInteractiveColorValues.Action;\nexport const COLORS: string[] = Object.values(\n HdsDropdownListItemInteractiveColorValues\n);\n\nexport interface HdsDropdownListItemInteractiveSignature {\n Args: HdsInteractiveSignature['Args'] & {\n color?: HdsDropdownListItemInteractiveColors;\n icon?: HdsIconSignature['Args']['name'];\n isLoading?: boolean;\n /**\n * @deprecated The `@text` argument for \"Hds::Dropdown::ListItem::Interactive\" has been deprecated. Please put text in the yielded block. See: https://helios.hashicorp.design/components/dropdown?tab=version%20history#4100\n */\n text?: string;\n trailingIcon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default?: [\n {\n Badge?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement | HdsInteractiveSignature['Element'];\n}\n\nexport default class HdsDropdownListItemInteractive extends Component {\n constructor(\n owner: unknown,\n args: HdsDropdownListItemInteractiveSignature['Args']\n ) {\n super(owner, args);\n\n if (args.text !== undefined) {\n deprecate(\n 'The `@text` argument for \"Hds::Dropdown::ListItem::Interactive\" has been deprecated. Please put text in the yielded block.',\n false,\n {\n id: 'hds.dropdown.list-item.interactive',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/dropdown?tab=version%20history#4100',\n for: '@hashicorp/design-system-components',\n since: {\n available: '4.10.0',\n enabled: '5.0.0',\n },\n }\n );\n }\n }\n\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::Interactive\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n get color(): HdsDropdownListItemInteractiveColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Dropdown::ListItem::Interactive\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n get classNames(): string {\n const classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--variant-interactive',\n ];\n\n // add a class based on the @color argument\n classes.push(`hds-dropdown-list-item--color-${this.color}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_COLOR","HdsDropdownListItemInteractiveColorValues","Action","COLORS","Object","values","HdsDropdownListItemInteractive","Component","constructor","owner","args","text","undefined","deprecate","id","until","url","for","since","available","enabled","assert","color","join","includes","classNames","classes","push","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,+0DAA+0D;;ACDj3D;AACA;AACA;AACA;;AAaaA,MAAAA,aAAa,GAAGC,yCAAyC,CAACC;AAChE,MAAMC,MAAgB,GAAGC,MAAM,CAACC,MAAM,CAC3CJ,yCACF;AAuBe,MAAMK,8BAA8B,SAASC,SAAS,CAA0C;AAC7GC,EAAAA,WAAWA,CACTC,KAAc,EACdC,IAAqD,EACrD;AACA,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElB,IAAA,IAAIA,IAAI,CAACC,IAAI,KAAKC,SAAS,EAAE;AAC3BC,MAAAA,SAAS,CACP,4HAA4H,EAC5H,KAAK,EACL;AACEC,QAAAA,EAAE,EAAE,oCAAoC;AACxCC,QAAAA,KAAK,EAAE,OAAO;AACdC,QAAAA,GAAG,EAAE,gFAAgF;AACrFC,QAAAA,GAAG,EAAE,qCAAqC;AAC1CC,QAAAA,KAAK,EAAE;AACLC,UAAAA,SAAS,EAAE,QAAQ;AACnBC,UAAAA,OAAO,EAAE;AACX;AACF,OACF,CAAC;AACH;AACF;EAEA,IAAIT,IAAIA,GAAW;IACjB,MAAM;AAAEA,MAAAA;KAAM,GAAG,IAAI,CAACD,IAAI;AAE1BW,IAAAA,MAAM,CACJ,0EAA0E,EAC1EV,IAAI,KAAKC,SACX,CAAC;AAED,IAAA,OAAOD,IAAI;AACb;EAEA,IAAIW,KAAKA,GAAyC;IAChD,MAAM;AAAEA,MAAAA,KAAK,GAAGtB;KAAe,GAAG,IAAI,CAACU,IAAI;AAE3CW,IAAAA,MAAM,CACJ,CAAmFlB,gFAAAA,EAAAA,MAAM,CAACoB,IAAI,CAC5F,IACF,CAAC,CAAA,YAAA,EAAeD,KAAK,CAAA,CAAE,EACvBnB,MAAM,CAACqB,QAAQ,CAACF,KAAK,CACvB,CAAC;AAED,IAAA,OAAOA,KAAK;AACd;EAEA,IAAIG,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CACd,wBAAwB,EACxB,6CAA6C,CAC9C;;AAED;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,8BAAA,EAAiC,IAAI,CAACL,KAAK,EAAE,CAAC;AAE3D,IAAA,OAAOI,OAAO,CAACH,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACK,oBAAA,CAAAC,QAAA,EA5DoBvB,8BAA8B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/radio.js b/packages/components/dist/components/hds/dropdown/list-item/radio.js new file mode 100644 index 0000000000..7c38fe5110 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/radio.js @@ -0,0 +1,24 @@ +import Component from '@glimmer/component'; +import { getElementId } from '../../../../utils/hds-get-element-id.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n \n
  • "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemRadio extends Component { + /** + * Determines the unique ID to assign to the radio control + */ + get id() { + return getElementId(this); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemRadio); + +export { HdsDropdownListItemRadio as default }; +//# sourceMappingURL=radio.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/radio.js.map b/packages/components/dist/components/hds/dropdown/list-item/radio.js.map new file mode 100644 index 0000000000..e3a88ee2d2 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/radio.js.map @@ -0,0 +1 @@ +{"version":3,"file":"radio.js","sources":["../../../../../src/components/hds/dropdown/list-item/radio.hbs","../../../../../src/components/hds/dropdown/list-item/radio.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n \\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsFormRadioBaseSignature } from '../../form/radio/base.ts';\n\nexport interface HdsDropdownListItemRadioSignature {\n Args: HdsFormRadioBaseSignature['Args'] & {\n count?: string | number;\n icon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default: [];\n };\n Element: HdsFormRadioBaseSignature['Element'];\n}\n\nexport default class HdsDropdownListItemRadio extends Component {\n /**\n * Determines the unique ID to assign to the radio control\n */\n get id(): string {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemRadio","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,izBAAizB;;ACDn1B;AACA;AACA;AACA;;AAkBe,MAAMA,wBAAwB,SAASC,SAAS,CAAoC;AACjG;AACF;AACA;EACE,IAAIC,EAAEA,GAAW;IACf,OAAOC,YAAY,CAAC,IAAI,CAAC;AAC3B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/separator.js b/packages/components/dist/components/hds/dropdown/list-item/separator.js new file mode 100644 index 0000000000..f51fe08117 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/separator.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDropdownListItemSeparator = TemplateOnlyComponent(); +var separator = setComponentTemplate(TEMPLATE, HdsDropdownListItemSeparator); + +export { separator as default }; +//# sourceMappingURL=separator.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/separator.js.map b/packages/components/dist/components/hds/dropdown/list-item/separator.js.map new file mode 100644 index 0000000000..c962ee65d3 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/separator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"separator.js","sources":["../../../../../src/components/hds/dropdown/list-item/separator.hbs","../../../../../src/components/hds/dropdown/list-item/separator.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownListItemSeparatorSignature {\n Element: HTMLLIElement;\n}\n\nconst HdsDropdownListItemSeparator =\n templateOnlyComponent();\n\nexport default HdsDropdownListItemSeparator;\n"],"names":["HdsDropdownListItemSeparator","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wOAAwO;;ACD1Q;AACA;AACA;AACA;;AAQA,MAAMA,4BAA4B,GAChCC,qBAAqB,EAAyC;AAEhE,gBAAAC,oBAAA,CAAAC,QAAA,EAAeH,4BAA4B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/title.js b/packages/components/dist/components/hds/dropdown/list-item/title.js new file mode 100644 index 0000000000..c760349e88 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/title.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{this.text}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsDropdownListItemTitle extends Component { + /** + * @param text + * @type {string} + * @description The text of the item. If no text value is defined an error will be thrown + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::ListItem::Title" must have a valid value', text !== undefined); + return text; + } +} +setComponentTemplate(TEMPLATE, HdsDropdownListItemTitle); + +export { HdsDropdownListItemTitle as default }; +//# sourceMappingURL=title.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/title.js.map b/packages/components/dist/components/hds/dropdown/list-item/title.js.map new file mode 100644 index 0000000000..3c879df999 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/title.js.map @@ -0,0 +1 @@ +{"version":3,"file":"title.js","sources":["../../../../../src/components/hds/dropdown/list-item/title.hbs","../../../../../src/components/hds/dropdown/list-item/title.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{this.text}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nexport interface HdsDropdownListItemTitleSignature {\n Args: {\n text: string;\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsDropdownListItemTitle extends Component {\n /**\n * @param text\n * @type {string}\n * @description The text of the item. If no text value is defined an error will be thrown\n */\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::ListItem::Title\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n}\n"],"names":["HdsDropdownListItemTitle","Component","text","args","assert","undefined","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gTAAgT;;ACDlV;AACA;AACA;AACA;;AAae,MAAMA,wBAAwB,SAASC,SAAS,CAAoC;AACjG;AACF;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAW;IACjB,MAAM;AAAEA,MAAAA;KAAM,GAAG,IAAI,CAACC,IAAI;AAE1BC,IAAAA,MAAM,CACJ,oEAAoE,EACpEF,IAAI,KAAKG,SACX,CAAC;AAED,IAAA,OAAOH,IAAI;AACb;AACF;AAACI,oBAAA,CAAAC,QAAA,EAhBoBP,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/list-item/types.js b/packages/components/dist/components/hds/dropdown/list-item/types.js new file mode 100644 index 0000000000..ccaf58e929 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsDropdownListItemInteractiveColorValues = /*#__PURE__*/function (HdsDropdownListItemInteractiveColorValues) { + HdsDropdownListItemInteractiveColorValues["Action"] = "action"; + HdsDropdownListItemInteractiveColorValues["Critical"] = "critical"; + return HdsDropdownListItemInteractiveColorValues; +}({}); + +export { HdsDropdownListItemInteractiveColorValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/dropdown/list-item/types.js.map b/packages/components/dist/components/hds/dropdown/list-item/types.js.map new file mode 100644 index 0000000000..4276d086d0 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/list-item/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/dropdown/list-item/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsDropdownListItemInteractiveColorValues {\n Action = 'action',\n Critical = 'critical',\n}\nexport type HdsDropdownListItemInteractiveColors =\n `${HdsDropdownListItemInteractiveColorValues}`;\n"],"names":["HdsDropdownListItemInteractiveColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,yCAAyC,0BAAzCA,yCAAyC,EAAA;EAAzCA,yCAAyC,CAAA,QAAA,CAAA,GAAA,QAAA;EAAzCA,yCAAyC,CAAA,UAAA,CAAA,GAAA,UAAA;AAAA,EAAA,OAAzCA,yCAAyC;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/toggle/button.js b/packages/components/dist/components/hds/dropdown/toggle/button.js new file mode 100644 index 0000000000..c0d1e3500e --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/button.js @@ -0,0 +1,115 @@ +import { a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { guidFor } from '@ember/object/internals'; +import { HdsDropdownToggleButtonSizeValues, HdsDropdownToggleButtonColorValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{#if @icon}}\n
    \n \n
    \n {{/if}}\n
    \n {{this.text}}\n
    \n {{#if @count}}\n \n {{/if}}\n {{#if @badge}}\n \n {{/if}}\n \n"); + +const DEFAULT_SIZE = HdsDropdownToggleButtonSizeValues.Medium; +const DEFAULT_COLOR = HdsDropdownToggleButtonColorValues.Primary; +const SIZES = Object.values(HdsDropdownToggleButtonSizeValues); +const COLORS = Object.values(HdsDropdownToggleButtonColorValues); +class HdsDropdownToggleButton extends Component { + constructor(...args) { + super(...args); + /** + * Generates a unique ID for the button + * + * @param _toggleButtonId + */ + _defineProperty(this, "_toggleButtonId", 'toggle-button-' + guidFor(this)); + } + /** + * @param text + * @type {string} + * @description The text of the button. If no text value is defined an error will be thrown. + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::Toggle::Button" must have a valid value', text !== undefined); + return text; + } + + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small` and `medium` + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Dropdown::Toggle::Button" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * @param color + * @type {string} + * @default primary + * @description Determines the color of button to be used; acceptable values are `primary` and `secondary` + */ + get color() { + const { + color = DEFAULT_COLOR + } = this.args; + assert(`@color for "Hds::Dropdown::Toggle::Button" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color)); + return color; + } + + /** + * @param isFullWidth + * @type {boolean} + * @default false + * @description Indicates that a button should take up the full width of the parent container. The default is false. + */ + get isFullWidth() { + return this.args.isFullWidth ?? false; + } + + /** + * @param badgeType + * @type {string} + * @default 'filled' + * @description ensures that the correct Badge/BadgeCount type is used to meet contrast requirements + */ + get badgeType() { + return this.color !== 'primary' ? 'inverted' : 'filled'; + } + + /** + * Get the class names to apply to the component. + * @method ToggleButton#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-dropdown-toggle-button']; + + // add a class based on the @size argument + classes.push(`hds-dropdown-toggle-button--size-${this.size}`); + + // add a class based on the @color argument + classes.push(`hds-dropdown-toggle-button--color-${this.color}`); + + // add a class based on the @isFullWidth argument + if (this.isFullWidth) { + classes.push('hds-dropdown-toggle-button--width-full'); + } + + // add a class based on the @isOpen argument + if (this.args.isOpen) { + classes.push('hds-dropdown-toggle-button--is-open'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsDropdownToggleButton); + +export { COLORS, DEFAULT_COLOR, DEFAULT_SIZE, SIZES, HdsDropdownToggleButton as default }; +//# sourceMappingURL=button.js.map diff --git a/packages/components/dist/components/hds/dropdown/toggle/button.js.map b/packages/components/dist/components/hds/dropdown/toggle/button.js.map new file mode 100644 index 0000000000..156c3196d7 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/button.js.map @@ -0,0 +1 @@ +{"version":3,"file":"button.js","sources":["../../../../../src/components/hds/dropdown/toggle/button.hbs","../../../../../src/components/hds/dropdown/toggle/button.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{#if @icon}}\\n
    \\n \\n
    \\n {{/if}}\\n
    \\n {{this.text}}\\n
    \\n {{#if @count}}\\n \\n {{/if}}\\n {{#if @badge}}\\n \\n {{/if}}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\nimport {\n HdsDropdownToggleButtonSizeValues,\n HdsDropdownToggleButtonColorValues,\n} from './types.ts';\n\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsBadgeSignature } from '../../badge';\nimport type { HdsBadgeCountSignature } from '../../badge-count';\nimport type {\n HdsDropdownToggleButtonSizes,\n HdsDropdownToggleButtonColors,\n} from './types';\nimport type { ModifierLike } from '@glint/template';\nimport type { SetupPrimitiveToggleModifier } from '../../popover-primitive/index.ts';\n\nexport const DEFAULT_SIZE = HdsDropdownToggleButtonSizeValues.Medium;\nexport const DEFAULT_COLOR = HdsDropdownToggleButtonColorValues.Primary;\nexport const SIZES: string[] = Object.values(HdsDropdownToggleButtonSizeValues);\nexport const COLORS: string[] = Object.values(\n HdsDropdownToggleButtonColorValues\n);\n\nexport interface HdsDropdownToggleButtonSignature {\n Args: {\n badge?: HdsBadgeSignature['Args']['text'];\n badgeIcon?: HdsBadgeSignature['Args']['icon'];\n color?: HdsDropdownToggleButtonColors;\n count?: HdsBadgeCountSignature['Args']['text'];\n icon?: HdsIconSignature['Args']['name'];\n isFullWidth?: boolean;\n isOpen?: boolean;\n size?: HdsDropdownToggleButtonSizes;\n text: string;\n setupPrimitiveToggle?: ModifierLike;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsDropdownToggleButton extends Component {\n /**\n * Generates a unique ID for the button\n *\n * @param _toggleButtonId\n */\n private _toggleButtonId = 'toggle-button-' + guidFor(this);\n\n /**\n * @param text\n * @type {string}\n * @description The text of the button. If no text value is defined an error will be thrown.\n */\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::Toggle::Button\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the button; acceptable values are `small` and `medium`\n */\n get size(): HdsDropdownToggleButtonSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Dropdown::Toggle::Button\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of button to be used; acceptable values are `primary` and `secondary`\n */\n get color(): HdsDropdownToggleButtonColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Dropdown::Toggle::Button\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * @param isFullWidth\n * @type {boolean}\n * @default false\n * @description Indicates that a button should take up the full width of the parent container. The default is false.\n */\n get isFullWidth(): boolean {\n return this.args.isFullWidth ?? false;\n }\n\n /**\n * @param badgeType\n * @type {string}\n * @default 'filled'\n * @description ensures that the correct Badge/BadgeCount type is used to meet contrast requirements\n */\n get badgeType(): HdsBadgeCountSignature['Args']['type'] {\n return this.color !== 'primary' ? 'inverted' : 'filled';\n }\n\n /**\n * Get the class names to apply to the component.\n * @method ToggleButton#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-dropdown-toggle-button'];\n\n // add a class based on the @size argument\n classes.push(`hds-dropdown-toggle-button--size-${this.size}`);\n\n // add a class based on the @color argument\n classes.push(`hds-dropdown-toggle-button--color-${this.color}`);\n\n // add a class based on the @isFullWidth argument\n if (this.isFullWidth) {\n classes.push('hds-dropdown-toggle-button--width-full');\n }\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-dropdown-toggle-button--is-open');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_SIZE","HdsDropdownToggleButtonSizeValues","Medium","DEFAULT_COLOR","HdsDropdownToggleButtonColorValues","Primary","SIZES","Object","values","COLORS","HdsDropdownToggleButton","Component","constructor","args","_defineProperty","guidFor","text","assert","undefined","size","join","includes","color","isFullWidth","badgeType","classNames","classes","push","isOpen","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,o7BAAo7B;;ACsBz8BA,MAAAA,YAAY,GAAGC,iCAAiC,CAACC;AACjDC,MAAAA,aAAa,GAAGC,kCAAkC,CAACC;AACzD,MAAMC,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACP,iCAAiC;AACvE,MAAMQ,MAAgB,GAAGF,MAAM,CAACC,MAAM,CAC3CJ,kCACF;AAkBe,MAAMM,uBAAuB,SAASC,SAAS,CAAmC;AAAAC,EAAAA,WAAAA,CAAA,G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,CAACF,KAAK,KAAK,SAAS,GAAG,UAAU,GAAG,QAAQ;AACzD;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIG,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,4BAA4B,CAAC;;AAE9C;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,iCAAA,EAAoC,IAAI,CAACR,IAAI,EAAE,CAAC;;AAE7D;IACAO,OAAO,CAACC,IAAI,CAAC,CAAA,kCAAA,EAAqC,IAAI,CAACL,KAAK,EAAE,CAAC;;AAE/D;IACA,IAAI,IAAI,CAACC,WAAW,EAAE;AACpBG,MAAAA,OAAO,CAACC,IAAI,CAAC,wCAAwC,CAAC;AACxD;;AAEA;AACA,IAAA,IAAI,IAAI,CAACd,IAAI,CAACe,MAAM,EAAE;AACpBF,MAAAA,OAAO,CAACC,IAAI,CAAC,qCAAqC,CAAC;AACrD;AAEA,IAAA,OAAOD,OAAO,CAACN,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACS,oBAAA,CAAAC,QAAA,EA5GoBpB,uBAAuB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/toggle/chevron.js b/packages/components/dist/components/hds/dropdown/toggle/chevron.js new file mode 100644 index 0000000000..3b34155609 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/chevron.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsDropdownToggleChevron = TemplateOnlyComponent(); +var chevron = setComponentTemplate(TEMPLATE, HdsDropdownToggleChevron); + +export { chevron as default }; +//# sourceMappingURL=chevron.js.map diff --git a/packages/components/dist/components/hds/dropdown/toggle/chevron.js.map b/packages/components/dist/components/hds/dropdown/toggle/chevron.js.map new file mode 100644 index 0000000000..40017e1a15 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/chevron.js.map @@ -0,0 +1 @@ +{"version":3,"file":"chevron.js","sources":["../../../../../src/components/hds/dropdown/toggle/chevron.hbs","../../../../../src/components/hds/dropdown/toggle/chevron.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownToggleChevronSignature {\n Element: HTMLDivElement;\n}\n\nconst HdsDropdownToggleChevron =\n templateOnlyComponent();\n\nexport default HdsDropdownToggleChevron;\n"],"names":["HdsDropdownToggleChevron","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,wBAAwB,GAC5BC,qBAAqB,EAAqC;AAE5D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,wBAAwB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/toggle/icon.js b/packages/components/dist/components/hds/dropdown/toggle/icon.js new file mode 100644 index 0000000000..7e5783489d --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/icon.js @@ -0,0 +1,117 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { assert } from '@ember/debug'; +import { tracked } from '@glimmer/tracking'; +import { HdsDropdownToggleIconSizeValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n
    \n {{#if @imageSrc}}\n {{#if this._hasImage}}\n \"\"\n {{else}}\n \n {{/if}}\n {{else if @icon}}\n \n {{/if}}\n
    \n {{#if this.hasChevron}}\n \n {{/if}}\n"); + +var _class, _descriptor; +const DEFAULT_SIZE = HdsDropdownToggleIconSizeValues.Medium; +const SIZES = Object.values(HdsDropdownToggleIconSizeValues); +let HdsDropdownToggleIcon = (_class = class HdsDropdownToggleIcon extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "_hasImage", _descriptor, this); + if (!(this.args.icon || this.args.imageSrc)) { + assert('@icon or @imageSrc must be defined for "Hds::Dropdown::Toggle::Icon"'); + } + } + onDidUpdateImageSrc() { + this._hasImage = true; + } + onImageLoadError() { + this._hasImage = false; + } + + /** + * @param text + * @type {string} + * @description The text of the `aria-label` applied to the toggle + */ + get text() { + const { + text + } = this.args; + assert('@text for "Hds::Dropdown::Toggle::Icon" must have a valid value', text !== undefined); + return text; + } + + /** + * @param size + * @type {string} + * @default medium + * @description The size of the button; acceptable values are `small` and `medium` + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Dropdown::Toggle::Icon" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * @param iconSize + * @type {string} + * @default 24 + * @description ensures that the correct icon size is used + */ + get iconSize() { + if (this.args.size === 'medium' && !this.hasChevron) { + // in this special case we use a larger SVG + return '24'; + } else { + // this is the default size (notice: for the "small" variant with chevron, we set the actual size to `12px` via CSS) + return '16'; + } + } + + /** + * Indicates if a dropdown chevron icon should be displayed; should be displayed unless the "more-horizontal" icon is used. + * + * @param hasChevron + * @type {boolean} + * @default true + */ + get hasChevron() { + return this.args.hasChevron ?? true; + } + + /** + * Get the class names to apply to the component. + * @method ToggleIcon#classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-dropdown-toggle-icon']; + + // add a class based on the @size argument + classes.push(`hds-dropdown-toggle-icon--size-${this.size}`); + + // add a class based on the @isOpen argument + if (this.args.isOpen) { + classes.push('hds-dropdown-toggle-icon--is-open'); + } + + // add a class based on the @hasChevron argument + if (this.hasChevron) { + classes.push('hds-dropdown-toggle-icon--has-chevron'); + } + return classes.join(' '); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "_hasImage", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return true; + } +}), _applyDecoratedDescriptor(_class.prototype, "onDidUpdateImageSrc", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onDidUpdateImageSrc"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onImageLoadError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onImageLoadError"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsDropdownToggleIcon); + +export { DEFAULT_SIZE, SIZES, HdsDropdownToggleIcon as default }; +//# sourceMappingURL=icon.js.map diff --git a/packages/components/dist/components/hds/dropdown/toggle/icon.js.map b/packages/components/dist/components/hds/dropdown/toggle/icon.js.map new file mode 100644 index 0000000000..ac250bc1a5 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/icon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"icon.js","sources":["../../../../../src/components/hds/dropdown/toggle/icon.hbs","../../../../../src/components/hds/dropdown/toggle/icon.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n
    \\n {{#if @imageSrc}}\\n {{#if this._hasImage}}\\n \\\"\\\"\\n {{else}}\\n \\n {{/if}}\\n {{else if @icon}}\\n \\n {{/if}}\\n
    \\n {{#if this.hasChevron}}\\n \\n {{/if}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { HdsDropdownToggleIconSizeValues } from './types.ts';\n\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsDropdownToggleIconSizes } from './types';\nimport type { ModifierLike } from '@glint/template';\nimport type { SetupPrimitiveToggleModifier } from '../../popover-primitive/index.ts';\n\nexport const DEFAULT_SIZE = HdsDropdownToggleIconSizeValues.Medium;\nexport const SIZES: string[] = Object.values(HdsDropdownToggleIconSizeValues);\n\nexport interface HdsDropdownToggleIconSignature {\n Args: {\n hasChevron?: boolean;\n icon?: HdsIconSignature['Args']['name'];\n imageSrc?: string;\n isOpen?: boolean;\n size?: HdsDropdownToggleIconSizes;\n text: string;\n setupPrimitiveToggle?: ModifierLike;\n };\n Element: HTMLButtonElement;\n}\n\nexport default class HdsDropdownToggleIcon extends Component {\n @tracked private _hasImage = true;\n\n constructor(owner: unknown, args: HdsDropdownToggleIconSignature['Args']) {\n super(owner, args);\n if (!(this.args.icon || this.args.imageSrc)) {\n assert(\n '@icon or @imageSrc must be defined for \"Hds::Dropdown::Toggle::Icon\"'\n );\n }\n }\n\n @action\n onDidUpdateImageSrc(): void {\n this._hasImage = true;\n }\n\n @action\n onImageLoadError(): void {\n this._hasImage = false;\n }\n\n /**\n * @param text\n * @type {string}\n * @description The text of the `aria-label` applied to the toggle\n */\n get text(): string {\n const { text } = this.args;\n\n assert(\n '@text for \"Hds::Dropdown::Toggle::Icon\" must have a valid value',\n text !== undefined\n );\n\n return text;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the button; acceptable values are `small` and `medium`\n */\n get size(): HdsDropdownToggleIconSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Dropdown::Toggle::Icon\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @default 24\n * @description ensures that the correct icon size is used\n */\n get iconSize(): HdsIconSignature['Args']['size'] {\n if (this.args.size === 'medium' && !this.hasChevron) {\n // in this special case we use a larger SVG\n return '24';\n } else {\n // this is the default size (notice: for the \"small\" variant with chevron, we set the actual size to `12px` via CSS)\n return '16';\n }\n }\n\n /**\n * Indicates if a dropdown chevron icon should be displayed; should be displayed unless the \"more-horizontal\" icon is used.\n *\n * @param hasChevron\n * @type {boolean}\n * @default true\n */\n get hasChevron(): boolean {\n return this.args.hasChevron ?? true;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method ToggleIcon#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-dropdown-toggle-icon'];\n\n // add a class based on the @size argument\n classes.push(`hds-dropdown-toggle-icon--size-${this.size}`);\n\n // add a class based on the @isOpen argument\n if (this.args.isOpen) {\n classes.push('hds-dropdown-toggle-icon--is-open');\n }\n\n // add a class based on the @hasChevron argument\n if (this.hasChevron) {\n classes.push('hds-dropdown-toggle-icon--has-chevron');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_SIZE","HdsDropdownToggleIconSizeValues","Medium","SIZES","Object","values","HdsDropdownToggleIcon","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","icon","imageSrc","assert","onDidUpdateImageSrc","_hasImage","onImageLoadError","text","undefined","size","join","includes","iconSize","hasChevron","classNames","classes","push","isOpen","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,gzBAAgzB;;;ACer0BA,MAAAA,YAAY,GAAGC,+BAA+B,CAACC;AACrD,MAAMC,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACJ,+BAA+B;AAevDK,IAAAA,qBAAqB,IAAAC,MAAA,GAA3B,MAAMD,qBAAqB,SAASE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MAAA,CAAAyB,SAAA,GAAAzB,MAAA;AAjBiCiC,oBAAA,CAAAC,QAAA,EAArBnC,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/toggle/types.js b/packages/components/dist/components/hds/dropdown/toggle/types.js new file mode 100644 index 0000000000..ae724d2ec3 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/types.js @@ -0,0 +1,23 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsDropdownToggleIconSizeValues = /*#__PURE__*/function (HdsDropdownToggleIconSizeValues) { + HdsDropdownToggleIconSizeValues["Small"] = "small"; + HdsDropdownToggleIconSizeValues["Medium"] = "medium"; + return HdsDropdownToggleIconSizeValues; +}({}); +let HdsDropdownToggleButtonSizeValues = /*#__PURE__*/function (HdsDropdownToggleButtonSizeValues) { + HdsDropdownToggleButtonSizeValues["Small"] = "small"; + HdsDropdownToggleButtonSizeValues["Medium"] = "medium"; + return HdsDropdownToggleButtonSizeValues; +}({}); +let HdsDropdownToggleButtonColorValues = /*#__PURE__*/function (HdsDropdownToggleButtonColorValues) { + HdsDropdownToggleButtonColorValues["Primary"] = "primary"; + HdsDropdownToggleButtonColorValues["Secondary"] = "secondary"; + return HdsDropdownToggleButtonColorValues; +}({}); + +export { HdsDropdownToggleButtonColorValues, HdsDropdownToggleButtonSizeValues, HdsDropdownToggleIconSizeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/dropdown/toggle/types.js.map b/packages/components/dist/components/hds/dropdown/toggle/types.js.map new file mode 100644 index 0000000000..f54955c055 --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/toggle/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/dropdown/toggle/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsDropdownToggleIconSizeValues {\n Small = 'small',\n Medium = 'medium',\n}\nexport type HdsDropdownToggleIconSizes = `${HdsDropdownToggleIconSizeValues}`;\n\nexport enum HdsDropdownToggleButtonSizeValues {\n Small = 'small',\n Medium = 'medium',\n}\nexport type HdsDropdownToggleButtonSizes =\n `${HdsDropdownToggleButtonSizeValues}`;\n\nexport enum HdsDropdownToggleButtonColorValues {\n Primary = 'primary',\n Secondary = 'secondary',\n}\nexport type HdsDropdownToggleButtonColors =\n `${HdsDropdownToggleButtonColorValues}`;\n"],"names":["HdsDropdownToggleIconSizeValues","HdsDropdownToggleButtonSizeValues","HdsDropdownToggleButtonColorValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,+BAA+B,0BAA/BA,+BAA+B,EAAA;EAA/BA,+BAA+B,CAAA,OAAA,CAAA,GAAA,OAAA;EAA/BA,+BAA+B,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAA/BA,+BAA+B;AAAA,CAAA,CAAA,EAAA;AAM/BC,IAAAA,iCAAiC,0BAAjCA,iCAAiC,EAAA;EAAjCA,iCAAiC,CAAA,OAAA,CAAA,GAAA,OAAA;EAAjCA,iCAAiC,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAAjCA,iCAAiC;AAAA,CAAA,CAAA,EAAA;AAOjCC,IAAAA,kCAAkC,0BAAlCA,kCAAkC,EAAA;EAAlCA,kCAAkC,CAAA,SAAA,CAAA,GAAA,SAAA;EAAlCA,kCAAkC,CAAA,WAAA,CAAA,GAAA,WAAA;AAAA,EAAA,OAAlCA,kCAAkC;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/dropdown/types.js b/packages/components/dist/components/hds/dropdown/types.js new file mode 100644 index 0000000000..913956fffa --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/types.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsDropdownPositionValues = /*#__PURE__*/function (HdsDropdownPositionValues) { + HdsDropdownPositionValues["BottomLeft"] = "bottom-left"; + HdsDropdownPositionValues["BottomRight"] = "bottom-right"; + HdsDropdownPositionValues["TopLeft"] = "top-left"; + HdsDropdownPositionValues["TopRight"] = "top-right"; + return HdsDropdownPositionValues; +}({}); +// map Dropdown's `listPosition` values to PopoverPrimitive's `placement` values for backwards compatibility +const HdsDropdownPositionToPlacementValues = { + [HdsDropdownPositionValues.BottomLeft]: 'bottom-start', + [HdsDropdownPositionValues.BottomRight]: 'bottom-end', + [HdsDropdownPositionValues.TopLeft]: 'top-start', + [HdsDropdownPositionValues.TopRight]: 'top-end' +}; + +export { HdsDropdownPositionToPlacementValues, HdsDropdownPositionValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/dropdown/types.js.map b/packages/components/dist/components/hds/dropdown/types.js.map new file mode 100644 index 0000000000..6d9ff2ae8e --- /dev/null +++ b/packages/components/dist/components/hds/dropdown/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/dropdown/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport type { FloatingUIOptions } from '../../../modifiers/hds-anchored-position.ts';\n\nexport enum HdsDropdownPositionValues {\n BottomLeft = 'bottom-left',\n BottomRight = 'bottom-right',\n TopLeft = 'top-left',\n TopRight = 'top-right',\n}\nexport type HdsDropdownPositions = `${HdsDropdownPositionValues}`;\n\n// map Dropdown's `listPosition` values to PopoverPrimitive's `placement` values for backwards compatibility\nexport const HdsDropdownPositionToPlacementValues: Record<\n // Dropdown's `listPosition` values\n HdsDropdownPositionValues,\n FloatingUIOptions['placement']\n> = {\n [HdsDropdownPositionValues.BottomLeft]: 'bottom-start',\n [HdsDropdownPositionValues.BottomRight]: 'bottom-end',\n [HdsDropdownPositionValues.TopLeft]: 'top-start',\n [HdsDropdownPositionValues.TopRight]: 'top-end',\n};\n"],"names":["HdsDropdownPositionValues","HdsDropdownPositionToPlacementValues","BottomLeft","BottomRight","TopLeft","TopRight"],"mappings":"AAAA;AACA;AACA;AACA;;AAIYA,IAAAA,yBAAyB,0BAAzBA,yBAAyB,EAAA;EAAzBA,yBAAyB,CAAA,YAAA,CAAA,GAAA,aAAA;EAAzBA,yBAAyB,CAAA,aAAA,CAAA,GAAA,cAAA;EAAzBA,yBAAyB,CAAA,SAAA,CAAA,GAAA,UAAA;EAAzBA,yBAAyB,CAAA,UAAA,CAAA,GAAA,WAAA;AAAA,EAAA,OAAzBA,yBAAyB;AAAA,CAAA,CAAA,EAAA;AAQrC;AACO,MAAMC,oCAIZ,GAAG;AACF,EAAA,CAACD,yBAAyB,CAACE,UAAU,GAAG,cAAc;AACtD,EAAA,CAACF,yBAAyB,CAACG,WAAW,GAAG,YAAY;AACrD,EAAA,CAACH,yBAAyB,CAACI,OAAO,GAAG,WAAW;EAChD,CAACJ,yBAAyB,CAACK,QAAQ,GAAG;AACxC;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/body.js b/packages/components/dist/components/hds/flyout/body.js new file mode 100644 index 0000000000..4b765c2859 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/body.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { deprecate } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n
    \n {{yield}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFlyoutBody extends Component { + constructor(owner, args) { + super(owner, args); + deprecate('The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.', false, { + id: 'hds.components.flyout.body', + until: '5.0.0', + url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460', + for: '@hashicorp/design-system-components', + since: { + enabled: '4.6.0' + } + }); + } +} +setComponentTemplate(TEMPLATE, HdsFlyoutBody); + +export { HdsFlyoutBody as default }; +//# sourceMappingURL=body.js.map diff --git a/packages/components/dist/components/hds/flyout/body.js.map b/packages/components/dist/components/hds/flyout/body.js.map new file mode 100644 index 0000000000..fb49ba35b2 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/body.js.map @@ -0,0 +1 @@ +{"version":3,"file":"body.js","sources":["../../../../src/components/hds/flyout/body.hbs","../../../../src/components/hds/flyout/body.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n
    \\n {{yield}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\nexport interface HdsFlyoutBodySignature {\n // when component has no args, but constructor still needs to be defined, use `never`\n // see: https://github.com/hashicorp/design-system/pull/2511/files/f2146e5243d0431892a62d2fbf2889f1cbd3e525#r1815255004\n Args: never;\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutBody extends Component {\n constructor(owner: unknown, args: HdsFlyoutBodySignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.body',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutBody","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,mMAAmM;;ACDrO;AACA;AACA;AACA;;AAee,MAAMA,aAAa,SAASC,SAAS,CAAyB;AAC3EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAoC,EAAE;AAChE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,6MAA6M,EAC7M,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,4BAA4B;AAChCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH;AACF;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/description.js b/packages/components/dist/components/hds/flyout/description.js new file mode 100644 index 0000000000..e3ed957152 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/description.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { deprecate } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFlyoutDescription extends Component { + constructor(owner, args) { + super(owner, args); + deprecate('The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.', false, { + id: 'hds.components.flyout.description', + until: '5.0.0', + url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460', + for: '@hashicorp/design-system-components', + since: { + enabled: '4.6.0' + } + }); + } +} +setComponentTemplate(TEMPLATE, HdsFlyoutDescription); + +export { HdsFlyoutDescription as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/flyout/description.js.map b/packages/components/dist/components/hds/flyout/description.js.map new file mode 100644 index 0000000000..0604712627 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../src/components/hds/flyout/description.hbs","../../../../src/components/hds/flyout/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsTextBodySignature } from '../text/body';\n\nexport interface HdsFlyoutDescriptionSignature {\n Args: never;\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFlyoutDescription extends Component {\n constructor(owner: unknown, args: HdsFlyoutDescriptionSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.description',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutDescription","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gRAAgR;;ACDlT;AACA;AACA;AACA;;AAce,MAAMA,oBAAoB,SAASC,SAAS,CAAgC;AACzFC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAA2C,EAAE;AACvE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,2NAA2N,EAC3N,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,mCAAmC;AACvCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH;AACF;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,oBAAoB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/footer.js b/packages/components/dist/components/hds/flyout/footer.js new file mode 100644 index 0000000000..1ce0065b4a --- /dev/null +++ b/packages/components/dist/components/hds/flyout/footer.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { deprecate } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n
    \n {{yield (hash close=@onDismiss)}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFlyoutFooter extends Component { + constructor(owner, args) { + super(owner, args); + deprecate('The `Hds::Flyout::Footer` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Footer` as one-to-one replacement.', false, { + id: 'hds.components.flyout.footer', + until: '5.0.0', + url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460', + for: '@hashicorp/design-system-components', + since: { + enabled: '4.6.0' + } + }); + } +} +setComponentTemplate(TEMPLATE, HdsFlyoutFooter); + +export { HdsFlyoutFooter as default }; +//# sourceMappingURL=footer.js.map diff --git a/packages/components/dist/components/hds/flyout/footer.js.map b/packages/components/dist/components/hds/flyout/footer.js.map new file mode 100644 index 0000000000..76aa359c84 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/footer.js.map @@ -0,0 +1 @@ +{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/flyout/footer.hbs","../../../../src/components/hds/flyout/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n
    \\n {{yield (hash close=@onDismiss)}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\nexport interface HdsFlyoutFooterSignature {\n Args: {\n onDismiss?: (event: MouseEvent) => void;\n };\n Blocks: {\n default: [{ close?: (event: MouseEvent) => void }];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutFooter extends Component {\n constructor(owner: unknown, args: HdsFlyoutFooterSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Footer` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Footer` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.footer',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutFooter","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,6NAA6N;;ACD/P;AACA;AACA;AACA;;AAee,MAAMA,eAAe,SAASC,SAAS,CAA2B;AAC/EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAsC,EAAE;AAClE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,iNAAiN,EACjN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,8BAA8B;AAClCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH;AACF;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,eAAe,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/header.js b/packages/components/dist/components/hds/flyout/header.js new file mode 100644 index 0000000000..f035377d1c --- /dev/null +++ b/packages/components/dist/components/hds/flyout/header.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { deprecate } from '@ember/debug'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n
    \n {{#if @icon}}\n \n {{/if}}\n \n {{#if @tagline}}\n \n {{@tagline}}\n \n {{/if}}\n {{yield}}\n \n \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFlyoutHeader extends Component { + constructor(owner, args) { + super(owner, args); + deprecate('The `Hds::Flyout::Header` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Header` as one-to-one replacement.', false, { + id: 'hds.components.flyout.header', + until: '5.0.0', + url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460', + for: '@hashicorp/design-system-components', + since: { + enabled: '4.6.0' + } + }); + } +} +setComponentTemplate(TEMPLATE, HdsFlyoutHeader); + +export { HdsFlyoutHeader as default }; +//# sourceMappingURL=header.js.map diff --git a/packages/components/dist/components/hds/flyout/header.js.map b/packages/components/dist/components/hds/flyout/header.js.map new file mode 100644 index 0000000000..6a2459d0e8 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/header.js.map @@ -0,0 +1 @@ +{"version":3,"file":"header.js","sources":["../../../../src/components/hds/flyout/header.hbs","../../../../src/components/hds/flyout/header.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n
    \\n {{#if @icon}}\\n \\n {{/if}}\\n \\n {{#if @tagline}}\\n \\n {{@tagline}}\\n \\n {{/if}}\\n {{yield}}\\n \\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsIconSignature } from '../icon';\n\nexport interface HdsFlyoutHeaderSignature {\n Args: {\n id?: string;\n tagline?: string;\n onDismiss: (event: MouseEvent) => void;\n icon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutHeader extends Component {\n constructor(owner: unknown, args: HdsFlyoutHeaderSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Header` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Header` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.header',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutHeader","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,otBAAotB;;ACDtvB;AACA;AACA;AACA;;AAmBe,MAAMA,eAAe,SAASC,SAAS,CAA2B;AAC/EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAsC,EAAE;AAClE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,iNAAiN,EACjN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,8BAA8B;AAClCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH;AACF;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,eAAe,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/index.js b/packages/components/dist/components/hds/flyout/index.js new file mode 100644 index 0000000000..e744be3f93 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/index.js @@ -0,0 +1,154 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty, a as _defineProperty } from '../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import { assert } from '@ember/debug'; +import { getElementId } from '../../../utils/hds-get-element-id.js'; +import { buildWaiter } from '@ember/test-waiters'; +import { HdsFlyoutSizesValues } from './types.js'; +import '../dialog-primitive/body.js'; +import '../dialog-primitive/description.js'; +import '../dialog-primitive/footer.js'; +import '../dialog-primitive/header.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n <:header>\n {{yield\n (hash\n Header=(component\n \"hds/dialog-primitive/header\"\n id=this.id\n onDismiss=this.onDismiss\n contextualClassPrefix=\"hds-flyout\"\n titleTag=\"h1\"\n )\n Description=(component \"hds/dialog-primitive/description\" contextualClass=\"hds-flyout__description\")\n )\n }}\n \n <:body>\n {{yield (hash Body=(component \"hds/dialog-primitive/body\" contextualClass=\"hds-flyout__body\"))}}\n \n <:footer>\n {{yield\n (hash\n Footer=(component \"hds/dialog-primitive/footer\" onDismiss=this.onDismiss contextualClass=\"hds-flyout__footer\")\n )\n }}\n \n\n\n{{#if this.isOpen}}\n \n{{/if}}"); + +var _class, _descriptor; +const waiter = buildWaiter('@hashicorp/design-system-components:flyout'); +const DEFAULT_SIZE = HdsFlyoutSizesValues.Medium; +const DEFAULT_HAS_OVERLAY = true; +const SIZES = Object.values(HdsFlyoutSizesValues); +let HdsFlyout = (_class = class HdsFlyout extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "isOpen", _descriptor, this); + _defineProperty(this, "element", void 0); + _defineProperty(this, "body", void 0); + _defineProperty(this, "bodyInitialOverflowValue", ''); + } + /** + * Sets the size of the flyout + * Accepted values: medium, large + * + * @param size + * @type {string} + * @default 'medium' + */ + get size() { + const { + size = DEFAULT_SIZE + } = this.args; + assert(`@size for "Hds::Flyout" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size)); + return size; + } + + /** + * Calculates the unique ID to assign to the title + */ + get id() { + return getElementId(this); + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-flyout']; + + // add a class based on the @size argument + classes.push(`hds-flyout--size-${this.size}`); + return classes.join(' '); + } + registerOnCloseCallback(event) { + if (this.args.onClose && typeof this.args.onClose === 'function') { + this.args.onClose(event); + } + this.isOpen = false; + } + didInsert(element) { + // Store references of `` and `` elements + this.element = element; + this.body = document.body; + if (this.body) { + // Store the initial `overflow` value of `` so we can reset to it + this.bodyInitialOverflowValue = this.body.style.getPropertyValue('overflow'); + } + + // Register "onClose" callback function to be called when a native 'close' event is dispatched + this.element.addEventListener('close', this.registerOnCloseCallback, true); + + // If the flyout dialog is not already open + if (!this.element.open) { + this.open(); + } + } + willDestroyNode() { + if (this.element) { + this.element.removeEventListener('close', this.registerOnCloseCallback, true); + } + } + open() { + // Make flyout dialog visible using the native `showModal` method + this.element.showModal(); + this.isOpen = true; + + // Prevent page from scrolling when the dialog is open + if (this.body) this.body.style.setProperty('overflow', 'hidden'); + + // Call "onOpen" callback function + if (this.args.onOpen && typeof this.args.onOpen === 'function') { + this.args.onOpen(); + } + } + async onDismiss() { + // allow ember test helpers to be aware of when the `close` event fires + // when using `click` or other helpers from '@ember/test-helpers' + // Notice: this code will get stripped out in production builds (DEBUG evaluates to `true` in dev/test builds, but `false` in prod builds) + if (this.element.open) { + const token = waiter.beginAsync(); + const listener = () => { + waiter.endAsync(token); + this.element.removeEventListener('close', listener); + }; + this.element.addEventListener('close', listener); + } + + // Make flyout dialog invisible using the native `close` method + this.element.close(); + + // Reset page `overflow` property + if (this.body) { + this.body.style.removeProperty('overflow'); + if (this.bodyInitialOverflowValue === '') { + if (this.body.style.length === 0) { + this.body.removeAttribute('style'); + } + } else { + this.body.style.setProperty('overflow', this.bodyInitialOverflowValue); + } + } + + // Return focus to a specific element (if provided) + if (this.args.returnFocusTo) { + const initiator = document.getElementById(this.args.returnFocusTo); + if (initiator) { + initiator.focus(); + } + } + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "isOpen", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _applyDecoratedDescriptor(_class.prototype, "registerOnCloseCallback", [action], Object.getOwnPropertyDescriptor(_class.prototype, "registerOnCloseCallback"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "didInsert", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsert"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "willDestroyNode", [action], Object.getOwnPropertyDescriptor(_class.prototype, "willDestroyNode"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "open", [action], Object.getOwnPropertyDescriptor(_class.prototype, "open"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onDismiss", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onDismiss"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsFlyout); + +export { DEFAULT_HAS_OVERLAY, DEFAULT_SIZE, SIZES, HdsFlyout as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/flyout/index.js.map b/packages/components/dist/components/hds/flyout/index.js.map new file mode 100644 index 0000000000..1685db827f --- /dev/null +++ b/packages/components/dist/components/hds/flyout/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../src/components/hds/flyout/index.hbs","../../../../src/components/hds/flyout/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n <:header>\\n {{yield\\n (hash\\n Header=(component\\n \\\"hds/dialog-primitive/header\\\"\\n id=this.id\\n onDismiss=this.onDismiss\\n contextualClassPrefix=\\\"hds-flyout\\\"\\n titleTag=\\\"h1\\\"\\n )\\n Description=(component \\\"hds/dialog-primitive/description\\\" contextualClass=\\\"hds-flyout__description\\\")\\n )\\n }}\\n \\n <:body>\\n {{yield (hash Body=(component \\\"hds/dialog-primitive/body\\\" contextualClass=\\\"hds-flyout__body\\\"))}}\\n \\n <:footer>\\n {{yield\\n (hash\\n Footer=(component \\\"hds/dialog-primitive/footer\\\" onDismiss=this.onDismiss contextualClass=\\\"hds-flyout__footer\\\")\\n )\\n }}\\n \\n\\n\\n{{#if this.isOpen}}\\n \\n{{/if}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { getElementId } from '../../../utils/hds-get-element-id.ts';\nimport { buildWaiter } from '@ember/test-waiters';\nimport type { WithBoundArgs } from '@glint/template';\n\nimport type { HdsFlyoutSizes } from './types.ts';\n\nimport { HdsFlyoutSizesValues } from './types.ts';\nimport HdsDialogPrimitiveBodyComponent from '../dialog-primitive/body.ts';\nimport HdsDialogPrimitiveDescriptionComponent from '../dialog-primitive/description.ts';\nimport HdsDialogPrimitiveFooterComponent from '../dialog-primitive/footer.ts';\nimport HdsDialogPrimitiveHeaderComponent from '../dialog-primitive/header.ts';\n\nconst waiter = buildWaiter('@hashicorp/design-system-components:flyout');\n\nexport const DEFAULT_SIZE = HdsFlyoutSizesValues.Medium;\nexport const DEFAULT_HAS_OVERLAY = true;\nexport const SIZES: string[] = Object.values(HdsFlyoutSizesValues);\n\nexport interface HdsFlyoutSignature {\n Args: {\n size?: HdsFlyoutSizes;\n returnFocusTo?: string;\n onOpen?: () => void;\n onClose?: (event: Event) => void;\n };\n Blocks: {\n default: [\n {\n Header?: WithBoundArgs<\n typeof HdsDialogPrimitiveHeaderComponent,\n 'id' | 'onDismiss' | 'contextualClassPrefix'\n >;\n Description?: WithBoundArgs<\n typeof HdsDialogPrimitiveDescriptionComponent,\n 'contextualClass'\n >;\n Body?: WithBoundArgs<\n typeof HdsDialogPrimitiveBodyComponent,\n 'contextualClass'\n >;\n Footer?: WithBoundArgs<\n typeof HdsDialogPrimitiveFooterComponent,\n 'onDismiss' | 'contextualClass'\n >;\n },\n ];\n };\n Element: HTMLDialogElement;\n}\n\nexport default class HdsFlyout extends Component {\n @tracked isOpen = false;\n element!: HTMLDialogElement;\n body!: HTMLElement;\n bodyInitialOverflowValue = '';\n\n /**\n * Sets the size of the flyout\n * Accepted values: medium, large\n *\n * @param size\n * @type {string}\n * @default 'medium'\n */\n get size(): HdsFlyoutSizes {\n const { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Flyout\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Calculates the unique ID to assign to the title\n */\n get id(): string {\n return getElementId(this);\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(): string {\n const classes = ['hds-flyout'];\n\n // add a class based on the @size argument\n classes.push(`hds-flyout--size-${this.size}`);\n\n return classes.join(' ');\n }\n\n @action registerOnCloseCallback(event: Event) {\n if (this.args.onClose && typeof this.args.onClose === 'function') {\n this.args.onClose(event);\n }\n\n this.isOpen = false;\n }\n\n @action\n didInsert(element: HTMLDialogElement): void {\n // Store references of `` and `` elements\n this.element = element;\n this.body = document.body;\n\n if (this.body) {\n // Store the initial `overflow` value of `` so we can reset to it\n this.bodyInitialOverflowValue =\n this.body.style.getPropertyValue('overflow');\n }\n\n // Register \"onClose\" callback function to be called when a native 'close' event is dispatched\n this.element.addEventListener('close', this.registerOnCloseCallback, true);\n\n // If the flyout dialog is not already open\n if (!this.element.open) {\n this.open();\n }\n }\n\n @action\n willDestroyNode(): void {\n if (this.element) {\n this.element.removeEventListener(\n 'close',\n this.registerOnCloseCallback,\n true\n );\n }\n }\n\n @action\n open(): void {\n // Make flyout dialog visible using the native `showModal` method\n this.element.showModal();\n this.isOpen = true;\n\n // Prevent page from scrolling when the dialog is open\n if (this.body) this.body.style.setProperty('overflow', 'hidden');\n\n // Call \"onOpen\" callback function\n if (this.args.onOpen && typeof this.args.onOpen === 'function') {\n this.args.onOpen();\n }\n }\n\n @action\n async onDismiss(): Promise {\n // allow ember test helpers to be aware of when the `close` event fires\n // when using `click` or other helpers from '@ember/test-helpers'\n // Notice: this code will get stripped out in production builds (DEBUG evaluates to `true` in dev/test builds, but `false` in prod builds)\n if (this.element.open) {\n const token = waiter.beginAsync();\n const listener = () => {\n waiter.endAsync(token);\n this.element.removeEventListener('close', listener);\n };\n this.element.addEventListener('close', listener);\n }\n\n // Make flyout dialog invisible using the native `close` method\n this.element.close();\n\n // Reset page `overflow` property\n if (this.body) {\n this.body.style.removeProperty('overflow');\n if (this.bodyInitialOverflowValue === '') {\n if (this.body.style.length === 0) {\n this.body.removeAttribute('style');\n }\n } else {\n this.body.style.setProperty('overflow', this.bodyInitialOverflowValue);\n }\n }\n\n // Return focus to a specific element (if provided)\n if (this.args.returnFocusTo) {\n const initiator = document.getElementById(this.args.returnFocusTo);\n if (initiator) {\n initiator.focus();\n }\n }\n }\n}\n"],"names":["waiter","buildWaiter","DEFAULT_SIZE","HdsFlyoutSizesValues","Medium","DEFAULT_HAS_OVERLAY","SIZES","Object","values","HdsFlyout","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_defineProperty","size","assert","join","includes","id","getElementId","classNames","classes","push","registerOnCloseCallback","event","onClose","isOpen","didInsert","element","body","document","bodyInitialOverflowValue","style","getPropertyValue","addEventListener","open","willDestroyNode","removeEventListener","showModal","setProperty","onOpen","onDismiss","token","beginAsync","listener","endAsync","close","removeProperty","length","removeAttribute","returnFocusTo","initiator","getElementById","focus","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,6zCAA6zC;;;ACoB/1C,MAAMA,MAAM,GAAGC,WAAW,CAAC,4CAA4C,CAAC;AAE3DC,MAAAA,YAAY,GAAGC,oBAAoB,CAACC;AAC1C,MAAMC,mBAAmB,GAAG;AAC5B,MAAMC,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACL,oBAAoB;AAkC5CM,IAAAA,SAAS,IAAAC,MAAA,GAAf,MAAMD,SAAS,SAASE,SAAS,CAAqB;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;A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A,yBAAA,CAAA/C,MAAA,CAAAgD,SAAA,EA+CtBM,yBAAAA,EAAAA,CAAAA,MAAM,CAAAzD,EAAAA,MAAA,CAAA0D,wBAAA,CAAAvD,MAAA,CAAAgD,SAAA,EAAAhD,yBAAAA,CAAAA,EAAAA,MAAA,CAAAgD,SAAA,CAAA,EAAAD,yBAAA,CAAA/C,MAAA,CAAAgD,SAAA,EAQNM,WAAAA,EAAAA,CAAAA,MAAM,GAAAzD,MAAA,CAAA0D,wBAAA,CAAAvD,MAAA,CAAAgD,SAAA,EAAAhD,WAAAA,CAAAA,EAAAA,MAAA,CAAAgD,SAAA,CAAA,EAAAD,yBAAA,CAAA/C,MAAA,CAAAgD,SAAA,EAAA,iBAAA,EAAA,CAqBNM,MAAM,CAAA,EAAAzD,MAAA,CAAA0D,wBAAA,CAAAvD,MAAA,CAAAgD,SAAA,EAAA,iBAAA,CAAA,EAAAhD,MAAA,CAAAgD,SAAA,CAAAD,EAAAA,yBAAA,CAAA/C,MAAA,CAAAgD,SAAA,EAAA,MAAA,EAAA,CAWNM,MAAM,CAAAzD,EAAAA,MAAA,CAAA0D,wBAAA,CAAAvD,MAAA,CAAAgD,SAAA,EAAA,MAAA,CAAA,EAAAhD,MAAA,CAAAgD,SAAA,GAAAD,yBAAA,CAAA/C,MAAA,CAAAgD,SAAA,EAeNM,WAAAA,EAAAA,CAAAA,MAAM,CAAAzD,EAAAA,MAAA,CAAA0D,wBAAA,CAAAvD,MAAA,CAAAgD,SAAA,gBAAAhD,MAAA,CAAAgD,SAAA,CAAA,EAAAhD,MAAA;AAvGqBwD,oBAAA,CAAAC,QAAA,EAAT1D,SAAS,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/flyout/types.js b/packages/components/dist/components/hds/flyout/types.js new file mode 100644 index 0000000000..de3bdd8d12 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFlyoutSizesValues = /*#__PURE__*/function (HdsFlyoutSizesValues) { + HdsFlyoutSizesValues["Medium"] = "medium"; + HdsFlyoutSizesValues["Large"] = "large"; + return HdsFlyoutSizesValues; +}({}); + +export { HdsFlyoutSizesValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/flyout/types.js.map b/packages/components/dist/components/hds/flyout/types.js.map new file mode 100644 index 0000000000..38e6ddc464 --- /dev/null +++ b/packages/components/dist/components/hds/flyout/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../src/components/hds/flyout/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFlyoutSizesValues {\n Medium = 'medium',\n Large = 'large',\n}\n\nexport type HdsFlyoutSizes = `${HdsFlyoutSizesValues}`;\n"],"names":["HdsFlyoutSizesValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,oBAAoB,0BAApBA,oBAAoB,EAAA;EAApBA,oBAAoB,CAAA,QAAA,CAAA,GAAA,QAAA;EAApBA,oBAAoB,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAApBA,oBAAoB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/character-count/index.js b/packages/components/dist/components/hds/form/character-count/index.js new file mode 100644 index 0000000000..bde0cfa00f --- /dev/null +++ b/packages/components/dist/components/hds/form/character-count/index.js @@ -0,0 +1,154 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{#if (has-block)}}\n {{yield\n (hash\n minLength=this.minLength\n maxLength=this.maxLength\n currentLength=this.currentLength\n remaining=this.remaining\n shortfall=this.shortfall\n )\n }}\n {{else}}\n {{this.message}}\n {{/if}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const ID_PREFIX = 'character-count-'; +const NOOP = () => {}; +class HdsFormCharacterCount extends Component { + // The current number of characters in @value + get currentLength() { + const { + value + } = this.args; + return value ? value.length : 0; + } + + // Inflector utility function to determine plural or singular for 'character' noun + _pluralize(count, prefix = '', noun = 'character', suffix = 's') { + return `${count}${prefix ? ' ' + prefix : ''} ${noun}${count !== 1 ? suffix : ''}`; + } + + /** + * @param maxLength + * @type {number} + * @default null + * @description The maximum number of characters allowed. + */ + get maxLength() { + const { + maxLength + } = this.args; + if (maxLength) { + return typeof maxLength === 'number' ? maxLength : parseInt(maxLength); + } + } + + /** + * @param minLength + * @type {number} + * @default null + * @description The minimum number of characters allowed. + */ + get minLength() { + const { + minLength + } = this.args; + if (minLength) { + return typeof minLength === 'number' ? minLength : parseInt(minLength); + } + } + + /** + * @param remaining + * @type {number} + * @default null + * @description The remaining number of characters. + */ + get remaining() { + return this.maxLength ? this.maxLength - this.currentLength : undefined; + } + + /** + * @param shortfall + * @type {number} + * @default null + * @description The number of characters the content is falling short of. + */ + get shortfall() { + return this.minLength ? this.minLength - this.currentLength : undefined; + } + + /** + * @param message + * @type {string} + * @default null + * @description The character count message presented to users + */ + get message() { + let messageText = ''; + if (this.minLength && this.currentLength === 0) { + messageText = `${this._pluralize(this.minLength)} required`; + } else if (this.minLength && this.currentLength < this.minLength) { + messageText = `${this._pluralize(this.shortfall, 'more')} required`; + } else if (this.maxLength && this.currentLength === 0) { + messageText = `${this._pluralize(this.maxLength)} allowed`; + } else if (this.maxLength && this.currentLength <= this.maxLength) { + messageText = `${this._pluralize(this.remaining)} remaining`; + } else if (this.maxLength && this.remaining && this.currentLength > this.maxLength) { + messageText = `Exceeded by ${this._pluralize(-this.remaining)}`; + } else { + messageText = `${this._pluralize(this.currentLength)} entered`; + } + return messageText; + } + + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id() { + const { + controlId + } = this.args; + if (controlId) { + return `${ID_PREFIX}${controlId}`; + } + return null; + } + + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onInsert() { + const { + onInsert + } = this.args; + // notice: this is a guard used to prevent triggering an error when the component is used as standalone element + if (typeof onInsert === 'function') { + return onInsert; + } else { + return NOOP; + } + } + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-character-count']; + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + // the reason for this is that the contextual component declarations don't pass attributes to the component + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormCharacterCount); + +export { HdsFormCharacterCount as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/character-count/index.js.map b/packages/components/dist/components/hds/form/character-count/index.js.map new file mode 100644 index 0000000000..5f45d16480 --- /dev/null +++ b/packages/components/dist/components/hds/form/character-count/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/character-count/index.hbs","../../../../../src/components/hds/form/character-count/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{#if (has-block)}}\\n {{yield\\n (hash\\n minLength=this.minLength\\n maxLength=this.maxLength\\n currentLength=this.currentLength\\n remaining=this.remaining\\n shortfall=this.shortfall\\n )\\n }}\\n {{else}}\\n {{this.message}}\\n {{/if}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nconst ID_PREFIX = 'character-count-';\nconst NOOP = (): void => {};\n\nexport interface HdsFormCharacterCountSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n maxLength?: number | string;\n minLength?: number | string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onInsert?: (element: HTMLElement, ...args: any[]) => void;\n value?: string;\n };\n Blocks: {\n default?: [\n {\n minLength?: number;\n maxLength?: number;\n currentLength?: number;\n remaining?: number;\n shortfall?: number;\n },\n ];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFormCharacterCount extends Component {\n // The current number of characters in @value\n get currentLength(): number {\n const { value } = this.args;\n return value ? value.length : 0;\n }\n\n // Inflector utility function to determine plural or singular for 'character' noun\n private _pluralize(\n count?: number,\n prefix = '',\n noun = 'character',\n suffix = 's'\n ): string {\n return `${count}${prefix ? ' ' + prefix : ''} ${noun}${\n count !== 1 ? suffix : ''\n }`;\n }\n\n /**\n * @param maxLength\n * @type {number}\n * @default null\n * @description The maximum number of characters allowed.\n */\n get maxLength(): number | undefined {\n const { maxLength } = this.args;\n if (maxLength) {\n return typeof maxLength === 'number' ? maxLength : parseInt(maxLength);\n }\n }\n\n /**\n * @param minLength\n * @type {number}\n * @default null\n * @description The minimum number of characters allowed.\n */\n get minLength(): number | undefined {\n const { minLength } = this.args;\n if (minLength) {\n return typeof minLength === 'number' ? minLength : parseInt(minLength);\n }\n }\n\n /**\n * @param remaining\n * @type {number}\n * @default null\n * @description The remaining number of characters.\n */\n get remaining(): number | undefined {\n return this.maxLength ? this.maxLength - this.currentLength : undefined;\n }\n\n /**\n * @param shortfall\n * @type {number}\n * @default null\n * @description The number of characters the content is falling short of.\n */\n get shortfall(): number | undefined {\n return this.minLength ? this.minLength - this.currentLength : undefined;\n }\n\n /**\n * @param message\n * @type {string}\n * @default null\n * @description The character count message presented to users\n */\n get message(): string {\n let messageText = '';\n if (this.minLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.minLength)} required`;\n } else if (this.minLength && this.currentLength < this.minLength) {\n messageText = `${this._pluralize(this.shortfall, 'more')} required`;\n } else if (this.maxLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.maxLength)} allowed`;\n } else if (this.maxLength && this.currentLength <= this.maxLength) {\n messageText = `${this._pluralize(this.remaining)} remaining`;\n } else if (\n this.maxLength &&\n this.remaining &&\n this.currentLength > this.maxLength\n ) {\n messageText = `Exceeded by ${this._pluralize(-this.remaining)}`;\n } else {\n messageText = `${this._pluralize(this.currentLength)} entered`;\n }\n return messageText;\n }\n\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\n }\n\n /**\n * @param onInsert\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onInsert(): (element: HTMLElement, ...args: any[]) => void {\n const { onInsert } = this.args;\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\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(): string {\n const classes = ['hds-form-character-count'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormCharacterCount","Component","currentLength","value","args","length","_pluralize","count","prefix","noun","suffix","maxLength","parseInt","minLength","remaining","undefined","shortfall","message","messageText","id","controlId","onInsert","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ijBAAijB;;ACDnlB;AACA;AACA;AACA;;AAKA,MAAMA,SAAS,GAAG,kBAAkB;AACpC,M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,UAAU,CAAC,IAAI,CAACJ,aAAa,CAAC,CAAU,QAAA,CAAA;AAChE;AACA,IAAA,OAAOgB,WAAW;AACpB;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAkB;IACtB,MAAM;AAAEC,MAAAA;KAAW,GAAG,IAAI,CAAChB,IAAI;AAC/B,IAAA,IAAIgB,SAAS,EAAE;AACb,MAAA,OAAO,CAAGtB,EAAAA,SAAS,CAAGsB,EAAAA,SAAS,CAAE,CAAA;AACnC;AACA,IAAA,OAAO,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIC,QAAQA,GAAmD;IAC7D,MAAM;AAAEA,MAAAA;KAAU,GAAG,IAAI,CAACjB,IAAI;AAC9B;AACA,IAAA,IAAI,OAAOiB,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ;AACjB,KAAC,MAAM;AACL,MAAA,OAAOtB,IAAI;AACb;AACF;AACA;AACF;AACA;AACA;AACA;EACE,IAAIuB,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,0BAA0B,CAAC;;AAE5C;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACnB,IAAI,CAACoB,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACrB,IAAI,CAACoB,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EA1IoB5B,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/checkbox/base.js b/packages/components/dist/components/hds/form/checkbox/base.js new file mode 100644 index 0000000000..7c7a9a288c --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/base.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormCheckboxBase = TemplateOnlyComponent(); +var base = setComponentTemplate(TEMPLATE, HdsFormCheckboxBase); + +export { base as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/checkbox/base.js.map b/packages/components/dist/components/hds/form/checkbox/base.js.map new file mode 100644 index 0000000000..6a0b6937d6 --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/checkbox/base.hbs","../../../../../src/components/hds/form/checkbox/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormCheckboxBaseSignature {\n Args: {\n value?: string;\n };\n Element: HTMLInputElement;\n}\n\nconst HdsFormCheckboxBase =\n templateOnlyComponent();\n\nexport default HdsFormCheckboxBase;\n"],"names":["HdsFormCheckboxBase","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,sKAAsK;;ACDxM;AACA;AACA;AACA;;AAWA,MAAMA,mBAAmB,GACvBC,qBAAqB,EAAgC;AAEvD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,mBAAmB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/checkbox/field.js b/packages/components/dist/components/hds/form/checkbox/field.js new file mode 100644 index 0000000000..d1dd99486f --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/field.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because it\'s controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormCheckboxField = TemplateOnlyComponent(); +var field = setComponentTemplate(TEMPLATE, HdsFormCheckboxField); + +export { field as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/checkbox/field.js.map b/packages/components/dist/components/hds/form/checkbox/field.js.map new file mode 100644 index 0000000000..9fb8614d97 --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/checkbox/field.hbs","../../../../../src/components/hds/form/checkbox/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because it\\'s controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormCheckboxFieldSignature {\n Args: Omit & {\n value?: string;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormCheckboxField =\n templateOnlyComponent();\n\nexport default HdsFormCheckboxField;\n"],"names":["HdsFormCheckboxField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,yrBAAyrB;;ACD3tB;AACA;AACA;AACA;;AA0BA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC;AAExD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/checkbox/group.js b/packages/components/dist/components/hds/form/checkbox/group.js new file mode 100644 index 0000000000..5e512ca00e --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/group.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because it\'s controlled at \"Hds::Form::Fieldset\" component level }}\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\n \n {{yield\n (hash\n CheckboxField=(component\n \"hds/form/checkbox/field\"\n contextualClass=\"hds-form-group__control-field\"\n isRequired=@isRequired\n name=@name\n extraAriaDescribedBy=F.ariaDescribedBy\n )\n )\n }}\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormCheckboxGroup = TemplateOnlyComponent(); +var group = setComponentTemplate(TEMPLATE, HdsFormCheckboxGroup); + +export { group as default }; +//# sourceMappingURL=group.js.map diff --git a/packages/components/dist/components/hds/form/checkbox/group.js.map b/packages/components/dist/components/hds/form/checkbox/group.js.map new file mode 100644 index 0000000000..65683a1d9f --- /dev/null +++ b/packages/components/dist/components/hds/form/checkbox/group.js.map @@ -0,0 +1 @@ +{"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/checkbox/group.hbs","../../../../../src/components/hds/form/checkbox/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because it\\'s controlled at \\\"Hds::Form::Fieldset\\\" component level }}\\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\\n \\n {{yield\\n (hash\\n CheckboxField=(component\\n \\\"hds/form/checkbox/field\\\"\\n contextualClass=\\\"hds-form-group__control-field\\\"\\n isRequired=@isRequired\\n name=@name\\n extraAriaDescribedBy=F.ariaDescribedBy\\n )\\n )\\n }}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsFormFieldsetSignature } from '../fieldset';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormLegendSignature } from '../legend';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormCheckboxFieldSignature } from './field';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormCheckboxGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike;\n HelperText?: ComponentLike;\n CheckboxField?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormCheckboxGroup =\n templateOnlyComponent();\n\nexport default HdsFormCheckboxGroup;\n"],"names":["HdsFormCheckboxGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mvBAAmvB;;ACDrxB;AACA;AACA;AACA;;AA2BA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC;AAExD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/error/index.js b/packages/components/dist/components/hds/form/error/index.js new file mode 100644 index 0000000000..5afdea47fa --- /dev/null +++ b/packages/components/dist/components/hds/form/error/index.js @@ -0,0 +1,87 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n \n \n {{yield (hash Message=(component \"hds/form/error/message\"))}}\n \n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const ID_PREFIX = 'error-'; +const NOOP = () => {}; +class HdsFormError extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id() { + const { + controlId + } = this.args; + if (controlId) { + return `${ID_PREFIX}${controlId}`; + } + return null; + } + + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onInsert() { + const { + onInsert + } = this.args; + + // notice: this is a guard used to prevent triggering an error when the component is used as standalone element + if (typeof onInsert === 'function') { + return onInsert; + } else { + return NOOP; + } + } + + /** + * @param onRemove + * @type {function} + * @default () => {} + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onRemove() { + const { + onRemove + } = this.args; + + // notice: this is a guard used to prevent triggering an error when the component is used as standalone element + if (typeof onRemove === 'function') { + return onRemove; + } else { + return NOOP; + } + } + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-error']; + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + // the reason for this is that the contextual component declarations don't pass attributes to the component + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormError); + +export { ID_PREFIX, HdsFormError as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/error/index.js.map b/packages/components/dist/components/hds/form/error/index.js.map new file mode 100644 index 0000000000..298ae7e48e --- /dev/null +++ b/packages/components/dist/components/hds/form/error/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/error/index.hbs","../../../../../src/components/hds/form/error/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n \\n \\n {{yield (hash Message=(component \\\"hds/form/error/message\\\"))}}\\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorMessageSignature } from './message';\n\nexport const ID_PREFIX = 'error-';\n\nconst NOOP = (): void => {};\n\nexport interface HdsFormErrorSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onInsert?: (element: HTMLElement, ...args: any[]) => void;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onRemove?: (element: HTMLElement, ...args: any[]) => void;\n };\n Blocks: {\n default: [\n {\n Message?: ComponentLike;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFormError extends Component {\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\n }\n\n /**\n * @param onInsert\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onInsert(): (element: HTMLElement, ...args: any[]) => void {\n const { onInsert } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\n }\n\n /**\n * @param onRemove\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onRemove(): (element: HTMLElement, ...args: any[]) => void {\n const { onRemove } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onRemove === 'function') {\n return onRemove;\n } else {\n return NOOP;\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(): string {\n const classes = ['hds-form-error'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormError","Component","id","controlId","args","onInsert","onRemove","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6dAA6d;;ACD/f;AACA;AACA;AACA;;AAMO,MAAMA,SAAS,GAAG;AAEzB,MAAMC,IAAI,GAAGA,MAAY,EAAE;AAqBZ,MAAMC,YAAY,SAASC,SAAS,CAAwB;AACzE;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAkB;IACtB,MAAM;AAAEC,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;AAC/B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGL,EAAAA,SAAS,CAAGK,EAAAA,SAAS,CAAE,CAAA;AACnC;AACA,IAAA,OAAO,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIE,QAAQA,GAAmD;IAC7D,MAAM;AAAEA,MAAAA;KAAU,GAAG,IAAI,CAACD,IAAI;;AAE9B;AACA,IAAA,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ;AACjB,KAAC,MAAM;AACL,MAAA,OAAON,IAAI;AACb;AACF;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIO,QAAQA,GAAmD;IAC7D,MAAM;AAAEA,MAAAA;KAAU,GAAG,IAAI,CAACF,IAAI;;AAE9B;AACA,IAAA,IAAI,OAAOE,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ;AACjB,KAAC,MAAM;AACL,MAAA,OAAOP,IAAI;AACb;AACF;AACA;AACF;AACA;AACA;AACA;EACE,IAAIQ,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC;;AAElC;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACJ,IAAI,CAACK,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACN,IAAI,CAACK,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAhEoBb,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/error/message.js b/packages/components/dist/components/hds/form/error/message.js new file mode 100644 index 0000000000..471261dc91 --- /dev/null +++ b/packages/components/dist/components/hds/form/error/message.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormErrorMessage = TemplateOnlyComponent(); +var message = setComponentTemplate(TEMPLATE, HdsFormErrorMessage); + +export { message as default }; +//# sourceMappingURL=message.js.map diff --git a/packages/components/dist/components/hds/form/error/message.js.map b/packages/components/dist/components/hds/form/error/message.js.map new file mode 100644 index 0000000000..5c9fbed2eb --- /dev/null +++ b/packages/components/dist/components/hds/form/error/message.js.map @@ -0,0 +1 @@ +{"version":3,"file":"message.js","sources":["../../../../../src/components/hds/form/error/message.hbs","../../../../../src/components/hds/form/error/message.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nimport type { HdsTextBodySignature } from '../../text/body';\n\nexport interface HdsFormErrorMessageSignature {\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nconst HdsFormErrorMessage =\n templateOnlyComponent();\n\nexport default HdsFormErrorMessage;\n"],"names":["HdsFormErrorMessage","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8NAA8N;;ACDhQ;AACA;AACA;AACA;;AAaA,MAAMA,mBAAmB,GACvBC,qBAAqB,EAAgC;AAEvD,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,mBAAmB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/field/index.js b/packages/components/dist/components/hds/form/field/index.js new file mode 100644 index 0000000000..939de035af --- /dev/null +++ b/packages/components/dist/components/hds/form/field/index.js @@ -0,0 +1,89 @@ +import { _ as _applyDecoratedDescriptor } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { action } from '@ember/object'; +import { getElementId } from '../../../../utils/hds-get-element-id.js'; +import { ariaDescribedBy, registerAriaDescriptionElement, unregisterAriaDescriptionElement } from '../../../../utils/hds-aria-described-by.js'; +import { HdsFormFieldLayoutValues } from './types.js'; +import '../label/index.js'; +import '../helper-text/index.js'; +import '../character-count/index.js'; +import '../error/index.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { c } from 'decorator-transforms/runtime'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield\n (hash\n Label=(component\n \"hds/form/label\"\n controlId=this.id\n isRequired=this.isRequired\n isOptional=this.isOptional\n contextualClass=\"hds-form-field__label\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__helper-text\"\n )\n )\n }}\n
    \n {{! @glint-expect-error }}\n {{yield (hash Control=(component \"hds/yield\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\n
    \n {{yield\n (hash\n CharacterCount=(component\n \"hds/form/character-count\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__character-count\"\n )\n )\n }}\n {{yield\n (hash\n Error=(component\n \"hds/form/error\"\n controlId=this.id\n onInsert=this.appendDescriptor\n onRemove=this.removeDescriptor\n contextualClass=\"hds-form-field__error\"\n )\n )\n }}\n
    "); + +var _class; +const LAYOUT_TYPES = Object.values(HdsFormFieldLayoutValues); +// @ts-expect-error: decorator function return type 'ClassOf' is not assignable to 'typeof HdsFormField' +let HdsFormField = c((_class = class HdsFormField extends Component { + /** + * Sets the layout of the field + * + * @param layout + * @type {string} + */ + get layout() { + const { + layout + } = this.args; + assert(`@layout for "Hds::Form::Field" must be one of the following: ${LAYOUT_TYPES.join(', ')}; received: ${layout}`, LAYOUT_TYPES.includes(layout)); + return layout; + } + + /** + * Calculates the unique ID to assign to the form control + */ + get id() { + return getElementId(this); + } + + /** + * @param isRequired + * @type {boolean} + * @default false + */ + get isRequired() { + return this.args.isRequired || false; + } + + /** + * @param isOptional + * @type {boolean} + * @default false + */ + get isOptional() { + return this.args.isOptional || false; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = []; + if (this.args.layout) { + classes.push(`hds-form-field--layout-${this.layout}`); + } + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } + appendDescriptor(element) { + registerAriaDescriptionElement(this, element); + } + removeDescriptor(element) { + unregisterAriaDescriptionElement(this, element); + } +}, _applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "removeDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "removeDescriptor"), _class.prototype), _class), [ariaDescribedBy]); +setComponentTemplate(TEMPLATE, HdsFormField); + +export { LAYOUT_TYPES, HdsFormField as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/field/index.js.map b/packages/components/dist/components/hds/form/field/index.js.map new file mode 100644 index 0000000000..ba82b6afd9 --- /dev/null +++ b/packages/components/dist/components/hds/form/field/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/field/index.hbs","../../../../../src/components/hds/form/field/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield\\n (hash\\n Label=(component\\n \\\"hds/form/label\\\"\\n controlId=this.id\\n isRequired=this.isRequired\\n isOptional=this.isOptional\\n contextualClass=\\\"hds-form-field__label\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__helper-text\\\"\\n )\\n )\\n }}\\n
    \\n {{! @glint-expect-error }}\\n {{yield (hash Control=(component \\\"hds/yield\\\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\\n
    \\n {{yield\\n (hash\\n CharacterCount=(component\\n \\\"hds/form/character-count\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__character-count\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n onRemove=this.removeDescriptor\\n contextualClass=\\\"hds-form-field__error\\\"\\n )\\n )\\n }}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { action } from '@ember/object';\nimport { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport {\n ariaDescribedBy,\n registerAriaDescriptionElement,\n unregisterAriaDescriptionElement,\n} from '../../../../utils/hds-aria-described-by.ts';\nimport { HdsFormFieldLayoutValues } from './types.ts';\nimport HdsFormLabelComponent from '../label/index.ts';\nimport HdsFormHelperTextComponent from '../helper-text/index.ts';\nimport HdsFormCharacterCountComponent from '../character-count/index.ts';\nimport HdsFormErrorComponent from '../error/index.ts';\n\nimport type { HdsFormFieldLayouts } from './types.ts';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { HdsYieldSignature } from '../../yield/index.ts';\nimport type { AriaDescribedByComponent } from '../../../../utils/hds-aria-described-by.ts';\n\nexport const LAYOUT_TYPES = Object.values(HdsFormFieldLayoutValues);\n\nexport interface HdsFormFieldSignature {\n Args: {\n id?: string;\n extraAriaDescribedBy?: string;\n contextualClass?: string;\n isOptional?: boolean;\n isRequired?: boolean;\n layout?: HdsFormFieldLayouts;\n };\n Blocks: {\n default: [\n {\n Label?: WithBoundArgs<\n typeof HdsFormLabelComponent,\n 'contextualClass' | 'controlId' | 'isRequired' | 'isOptional'\n >;\n HelperText?: WithBoundArgs<\n typeof HdsFormHelperTextComponent,\n 'contextualClass' | 'controlId' | 'onInsert'\n >;\n Control?: ComponentLike;\n CharacterCount?: WithBoundArgs<\n typeof HdsFormCharacterCountComponent,\n 'contextualClass' | 'controlId' | 'onInsert'\n >;\n Error?: WithBoundArgs<\n typeof HdsFormErrorComponent,\n 'contextualClass' | 'controlId' | 'onInsert' | 'onRemove'\n >;\n id?: string;\n ariaDescribedBy?: string;\n },\n ];\n };\n Element: HTMLElement;\n}\n\n// @ts-expect-error: decorator function return type 'ClassOf' is not assignable to 'typeof HdsFormField'\n@ariaDescribedBy\nexport default class HdsFormField extends Component {\n /**\n * Sets the layout of the field\n *\n * @param layout\n * @type {string}\n */\n get layout(): HdsFormFieldLayouts | undefined {\n const { layout } = this.args;\n\n assert(\n `@layout for \"Hds::Form::Field\" must be one of the following: ${LAYOUT_TYPES.join(\n ', '\n )}; received: ${layout}`,\n LAYOUT_TYPES.includes(layout as HdsFormFieldLayoutValues)\n );\n\n return layout;\n }\n\n /**\n * Calculates the unique ID to assign to the form control\n */\n get id(): string {\n return getElementId(this);\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired(): boolean {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional(): boolean {\n return this.args.isOptional || false;\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(): string {\n const classes: string[] = [];\n\n if (this.args.layout) {\n classes.push(`hds-form-field--layout-${this.layout}`);\n }\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n\n @action\n appendDescriptor(element: HTMLElement): void {\n registerAriaDescriptionElement(this as AriaDescribedByComponent, element);\n }\n\n @action removeDescriptor(element: HTMLElement): void {\n unregisterAriaDescriptionElement(this as AriaDescribedByComponent, element);\n }\n}\n"],"names":["LAYOUT_TYPES","Object","values","HdsFormFieldLayoutValues","HdsFormField","c","_class","Component","layout","args","assert","join","includes","id","getElementId","isRequired","isOptional","classNames","classes","push","contextualClass","appendDescriptor","element","registerAriaDescriptionElement","removeDescriptor","unregisterAriaDescriptionElement","_applyDecoratedDescriptor","prototype","action","getOwnPropertyDescriptor","ariaDescribedBy","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,gxCAAgxC;;;ACwB3yC,MAAMA,YAAY,GAAGC,MAAM,CAACC,MAAM,CAACC,wBAAwB;AAuClE;AAEqBC,IAAAA,YAAY,GAAAC,CAAA,EAAAC,MAAA,GADjC,MACqBF,YAAY,SAASG,SAAS,CAAwB;AACzE;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,MAAMA,GAAoC;IAC5C,MAAM;AAAEA,MAAAA;KAAQ,GAAG,IAAI,CAACC,IAAI;AAE5BC,IAAAA,MAAM,CACJ,CAAgEV,6DAAAA,EAAAA,YAAY,CAACW,IAAI,CAC/E,IACF,CAAC,CAAA,YAAA,EAAeH,MAAM,CAAA,CAAE,EACxBR,YAAY,CAACY,QAAQ,CAACJ,MAAkC,CAC1D,CAAC;AAED,IAAA,OAAOA,MAAM;AACf;;AAEA;AACF;AACA;EACE,IAAIK,EAAEA,GAAW;IACf,OAAOC,YAAY,CAAC,IAAI,CAAC;AAC3B;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAY;AACxB,IAAA,OAAO,IAAI,CAACN,IAAI,CAACM,UAAU,IAAI,KAAK;AACtC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAY;AACxB,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,UAAU,IAAI,KAAK;AACtC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;IACvB,MAAMC,OAAiB,GAAG,EAAE;AAE5B,IAAA,IAAI,IAAI,CAACT,IAAI,CAACD,MAAM,EAAE;MACpBU,OAAO,CAACC,IAAI,CAAC,CAAA,uBAAA,EAA0B,IAAI,CAACX,MAAM,EAAE,CAAC;AACvD;;AAEA;AACA;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACW,eAAe,EAAE;MAC7BF,OAAO,CAACC,IAAI,CAAC,IAAI,CAACV,IAAI,CAACW,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOF,OAAO,CAACP,IAAI,CAAC,GAAG,CAAC;AAC1B;EAGAU,gBAAgBA,CAACC,OAAoB,EAAQ;AAC3CC,IAAAA,8BAA8B,CAAC,IAAI,EAA8BD,OAAO,CAAC;AAC3E;EAEQE,gBAAgBA,CAACF,OAAoB,EAAQ;AACnDG,IAAAA,gCAAgC,CAAC,IAAI,EAA8BH,OAAO,CAAC;AAC7E;AACF,CAAC,EAAAI,yBAAA,CAAApB,MAAA,CAAAqB,SAAA,uBAREC,MAAM,CAAA,EAAA3B,MAAA,CAAA4B,wBAAA,CAAAvB,MAAA,CAAAqB,SAAA,EAAArB,kBAAAA,CAAAA,EAAAA,MAAA,CAAAqB,SAAA,CAAA,EAAAD,yBAAA,CAAApB,MAAA,CAAAqB,SAAA,EAAA,kBAAA,EAAA,CAKNC,MAAM,CAAA3B,EAAAA,MAAA,CAAA4B,wBAAA,CAAAvB,MAAA,CAAAqB,SAAA,uBAAArB,MAAA,CAAAqB,SAAA,CAAArB,EAAAA,MAAA,IAxERwB,eAAe,CAAA;AACiBC,oBAAA,CAAAC,QAAA,EAAZ5B,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/field/types.js b/packages/components/dist/components/hds/form/field/types.js new file mode 100644 index 0000000000..fc0ffbe64f --- /dev/null +++ b/packages/components/dist/components/hds/form/field/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFormFieldLayoutValues = /*#__PURE__*/function (HdsFormFieldLayoutValues) { + HdsFormFieldLayoutValues["Vertical"] = "vertical"; + HdsFormFieldLayoutValues["Flag"] = "flag"; + return HdsFormFieldLayoutValues; +}({}); + +export { HdsFormFieldLayoutValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/form/field/types.js.map b/packages/components/dist/components/hds/form/field/types.js.map new file mode 100644 index 0000000000..c105789f2b --- /dev/null +++ b/packages/components/dist/components/hds/form/field/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/form/field/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFormFieldLayoutValues {\n Vertical = 'vertical',\n Flag = 'flag',\n}\n\nexport type HdsFormFieldLayouts = `${HdsFormFieldLayoutValues}`;\n"],"names":["HdsFormFieldLayoutValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,wBAAwB,0BAAxBA,wBAAwB,EAAA;EAAxBA,wBAAwB,CAAA,UAAA,CAAA,GAAA,UAAA;EAAxBA,wBAAwB,CAAA,MAAA,CAAA,GAAA,MAAA;AAAA,EAAA,OAAxBA,wBAAwB;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/fieldset/index.js b/packages/components/dist/components/hds/form/fieldset/index.js new file mode 100644 index 0000000000..df6950e501 --- /dev/null +++ b/packages/components/dist/components/hds/form/fieldset/index.js @@ -0,0 +1,78 @@ +import { _ as _applyDecoratedDescriptor } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { getElementId } from '../../../../utils/hds-get-element-id.js'; +import { ariaDescribedBy, registerAriaDescriptionElement, unregisterAriaDescriptionElement } from '../../../../utils/hds-aria-described-by.js'; +import { HdsFormFieldsetLayoutValues } from './types.js'; +import '../legend/index.js'; +import '../helper-text/index.js'; +import '../error/index.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { c } from 'decorator-transforms/runtime'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{yield\n (hash\n Legend=(component\n \"hds/form/legend\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\"hds-form-group__legend\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-group__helper-text\"\n )\n )\n }}\n
    \n {{! @glint-expect-error }}\n {{yield (hash Control=(component \"hds/yield\") ariaDescribedBy=this.ariaDescribedBy)}}\n
    \n {{yield\n (hash\n Error=(component\n \"hds/form/error\"\n controlId=this.id\n onInsert=this.appendDescriptor\n onRemove=this.removeDescriptor\n contextualClass=\"hds-form-group__error\"\n )\n )\n }}\n
    "); + +var _class; +// @ts-expect-error: decorator function return type 'ClassOf' is not assignable to 'typeof HdsFormFieldComponent' +let HdsFormFieldset = c((_class = class HdsFormFieldset extends Component { + /** + * Sets the layout of the group + * + * @param layout + * @type {enum} + * @default 'vertical' + */ + get layout() { + return this.args.layout ?? HdsFormFieldsetLayoutValues.Vertical; + } + + /** + * Calculates the unique ID to assign to the fieldset + */ + get id() { + return getElementId(this); + } + + /** + * @param isRequired + * @type {boolean} + * @default false + */ + get isRequired() { + return this.args.isRequired || false; + } + + /** + * @param isOptional + * @type {boolean} + * @default false + */ + get isOptional() { + return this.args.isOptional || false; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + // we just need a class for the layout + const classes = ['hds-form-group']; + + // add a class based on the @layout argument + classes.push(`hds-form-group--layout-${this.layout}`); + return classes.join(' '); + } + appendDescriptor(element) { + registerAriaDescriptionElement(this, element); + } + removeDescriptor(element) { + unregisterAriaDescriptionElement(this, element); + } +}, _applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "removeDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "removeDescriptor"), _class.prototype), _class), [ariaDescribedBy]); +setComponentTemplate(TEMPLATE, HdsFormFieldset); + +export { HdsFormFieldset as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/fieldset/index.js.map b/packages/components/dist/components/hds/form/fieldset/index.js.map new file mode 100644 index 0000000000..ed23c15481 --- /dev/null +++ b/packages/components/dist/components/hds/form/fieldset/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/fieldset/index.hbs","../../../../../src/components/hds/form/fieldset/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{yield\\n (hash\\n Legend=(component\\n \\\"hds/form/legend\\\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\\\"hds-form-group__legend\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-group__helper-text\\\"\\n )\\n )\\n }}\\n
    \\n {{! @glint-expect-error }}\\n {{yield (hash Control=(component \\\"hds/yield\\\") ariaDescribedBy=this.ariaDescribedBy)}}\\n
    \\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n onRemove=this.removeDescriptor\\n contextualClass=\\\"hds-form-group__error\\\"\\n )\\n )\\n }}\\n
    \")","/**\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 { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport {\n ariaDescribedBy,\n registerAriaDescriptionElement,\n unregisterAriaDescriptionElement,\n} from '../../../../utils/hds-aria-described-by.ts';\nimport { HdsFormFieldsetLayoutValues } from './types.ts';\nimport HdsFormLegendComponent from '../legend/index.ts';\nimport HdsFormHelperTextComponent from '../helper-text/index.ts';\nimport HdsFormErrorComponent from '../error/index.ts';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { HdsFormFieldsetLayouts } from './types.ts';\nimport type { HdsYieldSignature } from '../../yield/index.ts';\nimport type { AriaDescribedByComponent } from '../../../../utils/hds-aria-described-by.ts';\n\nexport interface HdsFormFieldsetSignature {\n Args: {\n extraAriaDescribedBy?: string;\n isOptional?: boolean;\n isRequired?: boolean;\n layout?: HdsFormFieldsetLayouts;\n };\n Blocks: {\n default: [\n {\n Legend?: WithBoundArgs<\n typeof HdsFormLegendComponent,\n 'contextualClass' | 'isRequired' | 'isOptional'\n >;\n HelperText?: WithBoundArgs<\n typeof HdsFormHelperTextComponent,\n 'contextualClass' | 'controlId' | 'onInsert'\n >;\n Control?: ComponentLike;\n Error?: WithBoundArgs<\n typeof HdsFormErrorComponent,\n 'contextualClass' | 'controlId' | 'onInsert' | 'onRemove'\n >;\n id?: string;\n ariaDescribedBy?: string;\n },\n ];\n };\n Element: HTMLElement;\n}\n\n// @ts-expect-error: decorator function return type 'ClassOf' is not assignable to 'typeof HdsFormFieldComponent'\n@ariaDescribedBy\nexport default class HdsFormFieldset extends Component {\n /**\n * Sets the layout of the group\n *\n * @param layout\n * @type {enum}\n * @default 'vertical'\n */\n get layout(): HdsFormFieldsetLayouts {\n return this.args.layout ?? HdsFormFieldsetLayoutValues.Vertical;\n }\n\n /**\n * Calculates the unique ID to assign to the fieldset\n */\n get id(): string {\n return getElementId(this);\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired(): boolean {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional(): boolean {\n return this.args.isOptional || false;\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(): string {\n // we just need a class for the layout\n const classes = ['hds-form-group'];\n\n // add a class based on the @layout argument\n classes.push(`hds-form-group--layout-${this.layout}`);\n\n return classes.join(' ');\n }\n\n @action\n appendDescriptor(element: HTMLElement): void {\n registerAriaDescriptionElement(this as AriaDescribedByComponent, element);\n }\n\n @action removeDescriptor(element: HTMLElement): void {\n unregisterAriaDescriptionElement(this as AriaDescribedByComponent, element);\n }\n}\n"],"names":["HdsFormFieldset","c","_class","Component","layout","args","HdsFormFieldsetLayoutValues","Vertical","id","getElementId","isRequired","isOptional","classNames","classes","push","join","appendDescriptor","element","registerAriaDescriptionElement","removeDescriptor","unregisterAriaDescriptionElement","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","ariaDescribedBy","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,ugCAAugC;;;ACqDziC;AAEqBA,IAAAA,eAAe,GAAAC,CAAA,EAAAC,MAAA,GADpC,MACqBF,eAAe,SAASG,SAAS,CAA2B;AAC/E;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,MAAMA,GAA2B;IACnC,OAAO,IAAI,CAACC,IAAI,CAACD,MAAM,IAAIE,2BAA2B,CAACC,QAAQ;AACjE;;AAEA;AACF;AACA;EACE,IAAIC,EAAEA,GAAW;IACf,OAAOC,YAAY,CAAC,IAAI,CAAC;AAC3B;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAY;AACxB,IAAA,OAAO,IAAI,CAACL,IAAI,CAACK,UAAU,IAAI,KAAK;AACtC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAY;AACxB,IAAA,OAAO,IAAI,CAACN,IAAI,CAACM,UAAU,IAAI,KAAK;AACtC;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB;AACA,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC;;AAElC;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,uBAAA,EAA0B,IAAI,CAACV,MAAM,EAAE,CAAC;AAErD,IAAA,OAAOS,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC;AAC1B;EAGAC,gBAAgBA,CAACC,OAAoB,EAAQ;AAC3CC,IAAAA,8BAA8B,CAAC,IAAI,EAA8BD,OAAO,CAAC;AAC3E;EAEQE,gBAAgBA,CAACF,OAAoB,EAAQ;AACnDG,IAAAA,gCAAgC,CAAC,IAAI,EAA8BH,OAAO,CAAC;AAC7E;AACF,CAAC,EAAAI,yBAAA,CAAAnB,MAAA,CAAAoB,SAAA,uBAREC,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAvB,MAAA,CAAAoB,SAAA,EAAApB,kBAAAA,CAAAA,EAAAA,MAAA,CAAAoB,SAAA,CAAA,EAAAD,yBAAA,CAAAnB,MAAA,CAAAoB,SAAA,EAAA,kBAAA,EAAA,CAKNC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAvB,MAAA,CAAAoB,SAAA,uBAAApB,MAAA,CAAAoB,SAAA,CAAApB,EAAAA,MAAA,IA1DRwB,eAAe,CAAA;AACoBC,oBAAA,CAAAC,QAAA,EAAf5B,eAAe,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/fieldset/types.js b/packages/components/dist/components/hds/form/fieldset/types.js new file mode 100644 index 0000000000..3d93a84d68 --- /dev/null +++ b/packages/components/dist/components/hds/form/fieldset/types.js @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFormFieldsetLayoutValues = /*#__PURE__*/function (HdsFormFieldsetLayoutValues) { + HdsFormFieldsetLayoutValues["Vertical"] = "vertical"; + HdsFormFieldsetLayoutValues["Horizontal"] = "horizontal"; + return HdsFormFieldsetLayoutValues; +}({}); + +export { HdsFormFieldsetLayoutValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/form/fieldset/types.js.map b/packages/components/dist/components/hds/form/fieldset/types.js.map new file mode 100644 index 0000000000..5676ab80a7 --- /dev/null +++ b/packages/components/dist/components/hds/form/fieldset/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/form/fieldset/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFormFieldsetLayoutValues {\n Vertical = 'vertical',\n Horizontal = 'horizontal',\n}\n\nexport type HdsFormFieldsetLayouts = `${HdsFormFieldsetLayoutValues}`;\n"],"names":["HdsFormFieldsetLayoutValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,2BAA2B,0BAA3BA,2BAA2B,EAAA;EAA3BA,2BAA2B,CAAA,UAAA,CAAA,GAAA,UAAA;EAA3BA,2BAA2B,CAAA,YAAA,CAAA,GAAA,YAAA;AAAA,EAAA,OAA3BA,2BAA2B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/file-input/base.js b/packages/components/dist/components/hds/form/file-input/base.js new file mode 100644 index 0000000000..4c1f279141 --- /dev/null +++ b/packages/components/dist/components/hds/form/file-input/base.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormFileInputBase = TemplateOnlyComponent(); +var base = setComponentTemplate(TEMPLATE, HdsFormFileInputBase); + +export { base as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/file-input/base.js.map b/packages/components/dist/components/hds/form/file-input/base.js.map new file mode 100644 index 0000000000..57f67ee623 --- /dev/null +++ b/packages/components/dist/components/hds/form/file-input/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/file-input/base.hbs","../../../../../src/components/hds/form/file-input/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormFileInputBaseSignature {\n Element: HTMLInputElement;\n}\n\nconst HdsFormFileInputBase =\n templateOnlyComponent();\n\nexport default HdsFormFileInputBase;\n"],"names":["HdsFormFileInputBase","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC;AAExD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/file-input/field.js b/packages/components/dist/components/hds/form/file-input/field.js new file mode 100644 index 0000000000..9ad4a85332 --- /dev/null +++ b/packages/components/dist/components/hds/form/file-input/field.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormFileInputField = TemplateOnlyComponent(); +var field = setComponentTemplate(TEMPLATE, HdsFormFileInputField); + +export { field as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/file-input/field.js.map b/packages/components/dist/components/hds/form/file-input/field.js.map new file mode 100644 index 0000000000..8f1d4016cf --- /dev/null +++ b/packages/components/dist/components/hds/form/file-input/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/file-input/field.hbs","../../../../../src/components/hds/form/file-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormFileInputFieldSignature {\n Args: Omit;\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormFileInputField =\n templateOnlyComponent();\n\nexport default HdsFormFileInputField;\n"],"names":["HdsFormFileInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iqBAAiqB;;ACDnsB;AACA;AACA;AACA;;AAuBA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/helper-text/index.js b/packages/components/dist/components/hds/form/helper-text/index.js new file mode 100644 index 0000000000..d1bb775589 --- /dev/null +++ b/packages/components/dist/components/hds/form/helper-text/index.js @@ -0,0 +1,69 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{yield}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const ID_PREFIX = 'helper-text-'; +const NOOP = () => {}; +class HdsFormHelperText extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id() { + const { + controlId + } = this.args; + if (controlId) { + return `${ID_PREFIX}${controlId}`; + } + return null; + } + + /** + * @param onInsert + * @type {function} + * @default () => {} + */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any + get onInsert() { + const { + onInsert + } = this.args; + + // notice: this is a guard used to prevent triggering an error when the component is used as standalone element + if (typeof onInsert === 'function') { + return onInsert; + } else { + return NOOP; + } + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-helper-text']; + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + // the reason for this is that the contextual component declarations don't pass attributes to the component + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormHelperText); + +export { ID_PREFIX, HdsFormHelperText as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/helper-text/index.js.map b/packages/components/dist/components/hds/form/helper-text/index.js.map new file mode 100644 index 0000000000..b064c3812f --- /dev/null +++ b/packages/components/dist/components/hds/form/helper-text/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/helper-text/index.hbs","../../../../../src/components/hds/form/helper-text/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{yield}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nexport const ID_PREFIX = 'helper-text-';\n\nconst NOOP = (): void => {};\n\nexport interface HdsFormHelperTextSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onInsert?: (element: HTMLElement, ...args: any[]) => void;\n };\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFormHelperText extends Component {\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\n }\n\n /**\n * @param onInsert\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onInsert(): (element: HTMLElement, ...args: any[]) => void {\n const { onInsert } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\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(): string {\n const classes = ['hds-form-helper-text'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormHelperText","Component","id","controlId","args","onInsert","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4RAA4R;;ACD9T;AACA;AACA;AACA;;AAKO,MAAMA,SAAS,GAAG;AAEzB,MAAMC,IAAI,GAAGA,MAAY,EAAE;AAeZ,MAAMC,iBAAiB,SAASC,SAAS,CAA6B;AACnF;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAkB;IACtB,MAAM;AAAEC,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;AAC/B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGL,EAAAA,SAAS,CAAGK,EAAAA,SAAS,CAAE,CAAA;AACnC;AACA,IAAA,OAAO,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIE,QAAQA,GAAmD;IAC7D,MAAM;AAAEA,MAAAA;KAAU,GAAG,IAAI,CAACD,IAAI;;AAE9B;AACA,IAAA,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ;AACjB,KAAC,MAAM;AACL,MAAA,OAAON,IAAI;AACb;AACF;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIO,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,sBAAsB,CAAC;;AAExC;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACL,IAAI,CAACI,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAhDoBZ,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/indicator/index.js b/packages/components/dist/components/hds/form/indicator/index.js new file mode 100644 index 0000000000..b44e8681ee --- /dev/null +++ b/packages/components/dist/components/hds/form/indicator/index.js @@ -0,0 +1,30 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{#if @isOptional}}\n (Optional)\n{{/if}}\n{{#if @isRequired}}\n  \n{{/if}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFormIndicator extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-indicator']; + if (this.args.isOptional) { + // add speficic class for "optional" indicator + classes.push('hds-form-indicator--optional'); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormIndicator); + +export { HdsFormIndicator as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/indicator/index.js.map b/packages/components/dist/components/hds/form/indicator/index.js.map new file mode 100644 index 0000000000..40f6a8ec3f --- /dev/null +++ b/packages/components/dist/components/hds/form/indicator/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/indicator/index.hbs","../../../../../src/components/hds/form/indicator/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{#if @isOptional}}\\n (Optional)\\n{{/if}}\\n{{#if @isRequired}}\\n  \\n{{/if}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsTextBodySignature } from '../../text/body';\nimport type { HdsBadgeSignature } from '../../badge';\n\nexport interface HdsFormIndicatorSignature {\n Args: {\n isOptional?: boolean;\n isRequired?: boolean;\n };\n Element: HdsTextBodySignature['Element'] | HdsBadgeSignature['Element'];\n}\n\nexport default class HdsFormIndicator extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-indicator'];\n\n if (this.args.isOptional) {\n // add speficic class for \"optional\" indicator\n classes.push('hds-form-indicator--optional');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsFormIndicator","Component","classNames","classes","args","isOptional","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iYAAiY;;ACDna;AACA;AACA;AACA;;AAce,MAAMA,gBAAgB,SAASC,SAAS,CAA4B;AACjF;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,oBAAoB,CAAC;AAEtC,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,UAAU,EAAE;AACxB;AACAF,MAAAA,OAAO,CAACG,IAAI,CAAC,8BAA8B,CAAC;AAC9C;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAhBoBT,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/label/index.js b/packages/components/dist/components/hds/form/label/index.js new file mode 100644 index 0000000000..36d7826cc1 --- /dev/null +++ b/packages/components/dist/components/hds/form/label/index.js @@ -0,0 +1,52 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const ID_PREFIX = 'label-'; +class HdsFormLabel extends Component { + /** + * Determines the unique ID to assign to the element + * @method id + * @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided + */ + get id() { + const { + controlId + } = this.args; + if (controlId) { + return `${ID_PREFIX}${controlId}`; + } + return null; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-label']; + + // add typographic classes + classes.push('hds-typography-body-200', 'hds-font-weight-semibold'); + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + // the reason for this is that the contextual component declarations don't pass attributes to the component + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormLabel); + +export { ID_PREFIX, HdsFormLabel as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/label/index.js.map b/packages/components/dist/components/hds/form/label/index.js.map new file mode 100644 index 0000000000..e7d9f24dff --- /dev/null +++ b/packages/components/dist/components/hds/form/label/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/label/index.hbs","../../../../../src/components/hds/form/label/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nexport const ID_PREFIX = 'label-';\n\nimport type { HdsFormIndicatorSignature } from '../indicator';\n\nexport interface HdsFormLabelSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n isOptional?: HdsFormIndicatorSignature['Args']['isOptional'];\n isRequired?: HdsFormIndicatorSignature['Args']['isRequired'];\n };\n Blocks: {\n default: [];\n };\n Element: HTMLLabelElement;\n}\n\nexport default class HdsFormLabel extends Component {\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\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(): string {\n const classes = ['hds-form-label'];\n\n // add typographic classes\n classes.push('hds-typography-body-200', 'hds-font-weight-semibold');\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","HdsFormLabel","Component","id","controlId","args","classNames","classes","push","contextualClass","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4QAA4Q;;ACD9S;AACA;AACA;AACA;;AAGO,MAAMA,SAAS,GAAG;AAiBV,MAAMC,YAAY,SAASC,SAAS,CAAwB;AACzE;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAkB;IACtB,MAAM;AAAEC,MAAAA;KAAW,GAAG,IAAI,CAACC,IAAI;AAC/B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGJ,EAAAA,SAAS,CAAGI,EAAAA,SAAS,CAAE,CAAA;AACnC;AACA,IAAA,OAAO,IAAI;AACb;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC;;AAElC;AACAA,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;;AAEnE;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,eAAe,EAAE;MAC7BF,OAAO,CAACC,IAAI,CAAC,IAAI,CAACH,IAAI,CAACI,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOF,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAlCoBX,YAAY,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/legend/index.js b/packages/components/dist/components/hds/form/legend/index.js new file mode 100644 index 0000000000..50c796da60 --- /dev/null +++ b/packages/components/dist/components/hds/form/legend/index.js @@ -0,0 +1,36 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{yield}}\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFormLegend extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-legend']; + + // add typographic classes + classes.push('hds-typography-body-200', 'hds-font-weight-semibold'); + + // add a class based on the @contextualClass argument + // notice: this will *not* be documented for public use + // the reason for this is that the contextual component declarations don't pass attributes to the component + if (this.args.contextualClass) { + classes.push(this.args.contextualClass); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormLegend); + +export { HdsFormLegend as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/legend/index.js.map b/packages/components/dist/components/hds/form/legend/index.js.map new file mode 100644 index 0000000000..629279e530 --- /dev/null +++ b/packages/components/dist/components/hds/form/legend/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/legend/index.hbs","../../../../../src/components/hds/form/legend/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{yield}}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nimport type { HdsFormIndicatorSignature } from '../indicator';\n\nexport interface HdsFormLegendSignature {\n Args: {\n contextualClass?: string;\n isOptional?: HdsFormIndicatorSignature['Args']['isOptional'];\n isRequired?: HdsFormIndicatorSignature['Args']['isRequired'];\n };\n Blocks: {\n default: [];\n };\n Element: HTMLLegendElement;\n}\n\nexport default class HdsFormLegend extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-legend'];\n\n // add typographic classes\n classes.push('hds-typography-body-200', 'hds-font-weight-semibold');\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsFormLegend","Component","classNames","classes","push","args","contextualClass","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4OAA4O;;ACD9Q;AACA;AACA;AACA;;AAkBe,MAAMA,aAAa,SAASC,SAAS,CAAyB;AAC3E;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,iBAAiB,CAAC;;AAEnC;AACAA,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,0BAA0B,CAAC;;AAEnE;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,eAAe,EAAE;MAC7BH,OAAO,CAACC,IAAI,CAAC,IAAI,CAACC,IAAI,CAACC,eAAe,CAAC;AACzC;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EArBoBT,aAAa,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/masked-input/base.js b/packages/components/dist/components/hds/form/masked-input/base.js new file mode 100644 index 0000000000..277dc47410 --- /dev/null +++ b/packages/components/dist/components/hds/form/masked-input/base.js @@ -0,0 +1,67 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { action } from '@ember/object'; +import { getElementId } from '../../../../utils/hds-get-element-id.js'; +import { tracked } from '@glimmer/tracking'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
    \n {{#if @isMultiline}}\n \n {{else}}\n \n {{/if}}\n \n {{#if @hasCopyButton}}\n \n {{/if}}\n
    "); + +var _class, _descriptor; +let HdsFormMaskedInputBase = (_class = class HdsFormMaskedInputBase extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "isContentMasked", _descriptor, this); + this.isContentMasked = this.args.isContentMasked ?? true; + } + onClickToggleMasking() { + this.isContentMasked = !this.isContentMasked; + } + get id() { + return getElementId(this); + } + get visibilityToggleAriaLabel() { + if (this.args.visibilityToggleAriaLabel) { + return this.args.visibilityToggleAriaLabel; + } else if (this.isContentMasked) { + return 'Show masked content'; + } else { + return 'Hide masked content'; + } + } + get visibilityToggleAriaMessageText() { + if (this.args.visibilityToggleAriaMessageText) { + return this.args.visibilityToggleAriaMessageText; + } else if (this.isContentMasked) { + return 'Input content is hidden'; + } else { + return 'Input content is visible'; + } + } + get copyButtonText() { + if (this.args.copyButtonText) { + return this.args.copyButtonText; + } else { + return 'Copy masked content'; + } + } + get classNames() { + const classes = ['hds-form-masked-input']; + if (this.isContentMasked) { + classes.push(`hds-form-masked-input--is-masked`); + } else { + classes.push(`hds-form-masked-input--is-not-masked`); + } + return classes.join(' '); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "isContentMasked", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "onClickToggleMasking", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickToggleMasking"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsFormMaskedInputBase); + +export { HdsFormMaskedInputBase as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/masked-input/base.js.map b/packages/components/dist/components/hds/form/masked-input/base.js.map new file mode 100644 index 0000000000..13b31a0a24 --- /dev/null +++ b/packages/components/dist/components/hds/form/masked-input/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/masked-input/base.hbs","../../../../../src/components/hds/form/masked-input/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
    \\n {{#if @isMultiline}}\\n \\n {{else}}\\n \\n {{/if}}\\n \\n {{#if @hasCopyButton}}\\n \\n {{/if}}\\n
    \")","/**\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 { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport type { HdsCopyButtonSignature } from '../../copy/button/index.ts';\nimport type { HdsFormVisibilityToggleSignature } from '../visibility-toggle/index.ts';\nimport { tracked } from '@glimmer/tracking';\n\nexport interface HdsFormMaskedInputBaseSignature {\n Args: {\n copyButtonText?: HdsCopyButtonSignature['Args']['text'];\n hasCopyButton?: boolean;\n isContentMasked?: boolean;\n isInvalid?: boolean;\n isMultiline?: boolean;\n id?: string;\n value?: string;\n visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel'];\n visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText'];\n width?: string;\n height?: string;\n };\n Element: HTMLElement;\n}\n\nexport default class HdsFormMaskedInputBase extends Component {\n @tracked isContentMasked;\n\n constructor(owner: unknown, args: HdsFormMaskedInputBaseSignature['Args']) {\n super(owner, args);\n this.isContentMasked = this.args.isContentMasked ?? true;\n }\n\n @action\n onClickToggleMasking(): void {\n this.isContentMasked = !this.isContentMasked;\n }\n\n get id(): string {\n return getElementId(this);\n }\n\n get visibilityToggleAriaLabel(): string {\n if (this.args.visibilityToggleAriaLabel) {\n return this.args.visibilityToggleAriaLabel;\n } else if (this.isContentMasked) {\n return 'Show masked content';\n } else {\n return 'Hide masked content';\n }\n }\n\n get visibilityToggleAriaMessageText(): string {\n if (this.args.visibilityToggleAriaMessageText) {\n return this.args.visibilityToggleAriaMessageText;\n } else if (this.isContentMasked) {\n return 'Input content is hidden';\n } else {\n return 'Input content is visible';\n }\n }\n\n get copyButtonText(): string {\n if (this.args.copyButtonText) {\n return this.args.copyButtonText;\n } else {\n return 'Copy masked content';\n }\n }\n\n get classNames(): string {\n const classes = ['hds-form-masked-input'];\n\n if (this.isContentMasked) {\n classes.push(`hds-form-masked-input--is-masked`);\n } else {\n classes.push(`hds-form-masked-input--is-not-masked`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsFormMaskedInputBase","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","isContentMasked","onClickToggleMasking","id","getElementId","visibilityToggleAriaLabel","visibilityToggleAriaMessageText","copyButtonText","classNames","classes","push","join","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,unCAAunC;;;AC4BpoCA,IAAAA,sBAAsB,IAAAC,MAAA,GAA5B,MAAMD,sBAAsB,SAASE,SAAS,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IAAI,CAACR,eAAe,EAAE;AACxBQ,MAAAA,OAAO,CAACC,IAAI,CAAC,CAAA,gCAAA,CAAkC,CAAC;AAClD,KAAC,MAAM;AACLD,MAAAA,OAAO,CAACC,IAAI,CAAC,CAAA,oCAAA,CAAsC,CAAC;AACtD;AAEA,IAAA,OAAOD,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF,CAAC,EAAAX,WAAA,GAAAY,yBAAA,CAAAlB,MAAA,CAAAmB,SAAA,EAAA,iBAAA,EAAA,CAvDEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAlB,MAAA,CAAAmB,SAAA,EAOPM,sBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAA3B,MAAA,CAAAmB,SAAA,EAAA,sBAAA,CAAA,EAAAnB,MAAA,CAAAmB,SAAA,GAAAnB,MAAA;AARkC4B,oBAAA,CAAAC,QAAA,EAAtB9B,sBAAsB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/masked-input/field.js b/packages/components/dist/components/hds/form/masked-input/field.js new file mode 100644 index 0000000000..cf1f6e0253 --- /dev/null +++ b/packages/components/dist/components/hds/form/masked-input/field.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n {{#if F.CharacterCount}}\n {{yield (hash CharacterCount=(component F.CharacterCount value=@value))}}\n {{/if}}\n \n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormMaskedInputField = TemplateOnlyComponent(); +var field = setComponentTemplate(TEMPLATE, HdsFormMaskedInputField); + +export { field as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/masked-input/field.js.map b/packages/components/dist/components/hds/form/masked-input/field.js.map new file mode 100644 index 0000000000..ca1434434c --- /dev/null +++ b/packages/components/dist/components/hds/form/masked-input/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/masked-input/field.hbs","../../../../../src/components/hds/form/masked-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n {{#if F.CharacterCount}}\\n {{yield (hash CharacterCount=(component F.CharacterCount value=@value))}}\\n {{/if}}\\n \\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type HdsFormCharacterCountComponent from '../character-count';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormMaskedInputBaseSignature } from './base';\n\nexport interface HdsFormMaskedInputFieldSignature {\n Args: Omit &\n HdsFormMaskedInputBaseSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n CharacterCount?: WithBoundArgs<\n typeof HdsFormCharacterCountComponent,\n 'value'\n >;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormMaskedInputField =\n templateOnlyComponent();\n\nexport default HdsFormMaskedInputField;\n"],"names":["HdsFormMaskedInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ipCAAipC;;ACDnrC;AACA;AACA;AACA;;AA8BA,MAAMA,uBAAuB,GAC3BC,qBAAqB,EAAoC;AAE3D,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,uBAAuB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio-card/description.js b/packages/components/dist/components/hds/form/radio-card/description.js new file mode 100644 index 0000000000..3b583b28c4 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/description.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{yield}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioCardDescription = TemplateOnlyComponent(); +var description = setComponentTemplate(TEMPLATE, HdsFormRadioCardDescription); + +export { description as default }; +//# sourceMappingURL=description.js.map diff --git a/packages/components/dist/components/hds/form/radio-card/description.js.map b/packages/components/dist/components/hds/form/radio-card/description.js.map new file mode 100644 index 0000000000..17ada100ee --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/description.js.map @@ -0,0 +1 @@ +{"version":3,"file":"description.js","sources":["../../../../../src/components/hds/form/radio-card/description.hbs","../../../../../src/components/hds/form/radio-card/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{yield}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nexport interface HdsFormRadioCardDescriptionSignature {\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nconst HdsFormRadioCardDescription =\n templateOnlyComponent();\n\nexport default HdsFormRadioCardDescription;\n"],"names":["HdsFormRadioCardDescription","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+NAA+N;;ACDjQ;AACA;AACA;AACA;;AAYA,MAAMA,2BAA2B,GAC/BC,qBAAqB,EAAwC;AAE/D,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,2BAA2B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio-card/group.js b/packages/components/dist/components/hds/form/radio-card/group.js new file mode 100644 index 0000000000..d5d83d86e6 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/group.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because it\'s controlled at \"Hds::Form::Fieldset\" component level }}\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\n \n {{yield\n (hash\n RadioCard=(component\n \"hds/form/radio-card\"\n name=@name\n alignment=@alignment\n controlPosition=@controlPosition\n extraAriaDescribedBy=F.ariaDescribedBy\n )\n )\n }}\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioCardGroup = TemplateOnlyComponent(); +var group = setComponentTemplate(TEMPLATE, HdsFormRadioCardGroup); + +export { group as default }; +//# sourceMappingURL=group.js.map diff --git a/packages/components/dist/components/hds/form/radio-card/group.js.map b/packages/components/dist/components/hds/form/radio-card/group.js.map new file mode 100644 index 0000000000..f53683b2b7 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/group.js.map @@ -0,0 +1 @@ +{"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio-card/group.hbs","../../../../../src/components/hds/form/radio-card/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because it\\'s controlled at \\\"Hds::Form::Fieldset\\\" component level }}\\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\\n \\n {{yield\\n (hash\\n RadioCard=(component\\n \\\"hds/form/radio-card\\\"\\n name=@name\\n alignment=@alignment\\n controlPosition=@controlPosition\\n extraAriaDescribedBy=F.ariaDescribedBy\\n )\\n )\\n }}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsFormFieldsetSignature } from '../fieldset';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormLegendSignature } from '../legend';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormRadioCardSignature } from './index';\nimport type { HdsFormErrorSignature } from '../error';\nimport type {\n HdsFormRadioCardControlPositions,\n HdsFormRadioCardAlignments,\n} from './types';\n\nexport interface HdsFormRadioCardGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n controlPosition?: HdsFormRadioCardControlPositions;\n alignment?: HdsFormRadioCardAlignments;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike;\n HelperText?: ComponentLike;\n RadioCard?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormRadioCardGroup =\n templateOnlyComponent();\n\nexport default HdsFormRadioCardGroup;\n"],"names":["HdsFormRadioCardGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,m0BAAm0B;;ACDr2B;AACA;AACA;AACA;;AAiCA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio-card/index.js b/packages/components/dist/components/hds/form/radio-card/index.js new file mode 100644 index 0000000000..0ed28bc245 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/index.js @@ -0,0 +1,81 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsFormRadioCardControlPositionValues, HdsFormRadioCardAlignmentValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const DEFAULT_CONTROL_POSITION = HdsFormRadioCardControlPositionValues.Bottom; +const DEFAULT_ALIGNMENT = HdsFormRadioCardAlignmentValues.Left; +const CONTROL_POSITIONS = Object.values(HdsFormRadioCardControlPositionValues); +const ALIGNMENTS = Object.values(HdsFormRadioCardAlignmentValues); +class HdsFormRadioCard extends Component { + /** + * Sets the position of the control + * Accepted values: buttom, left + * + * @param type + * @type {string} + * @default 'bottom' + */ + get controlPosition() { + const { + controlPosition = DEFAULT_CONTROL_POSITION + } = this.args; + assert(`@controlPosition for "Hds::Form::RadioCard" must be one of the following: ${CONTROL_POSITIONS.join(', ')}; received: ${controlPosition}`, CONTROL_POSITIONS.includes(controlPosition)); + return controlPosition; + } + + /** + * Sets the alignment of the content + * Accepted values: left, center + * + * @param alignnment + * @type {string} + * @default 'left' + */ + get alignment() { + const { + alignment = DEFAULT_ALIGNMENT + } = this.args; + assert(`@alignment for "Hds::Form::RadioCard" must be one of the following: ${ALIGNMENTS.join(', ')}; received: ${alignment}`, ALIGNMENTS.includes(alignment)); + return alignment; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-radio-card']; + if (this.args.checked) { + classes.push('hds-form-radio-card--checked'); + } + if (this.args.disabled) { + classes.push('hds-form-radio-card--disabled'); + } + if (this.args.maxWidth) { + classes.push('hds-form-radio-card--has-fixed-width'); + } else { + classes.push('hds-form-radio-card--has-fluid-width'); + } + + // add a class based on the @controlPosition argument + classes.push(`hds-form-radio-card--control-${this.controlPosition}`); + + // add a class based on the @alignment argument + classes.push(`hds-form-radio-card--align-${this.alignment}`); + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormRadioCard); + +export { ALIGNMENTS, CONTROL_POSITIONS, DEFAULT_ALIGNMENT, DEFAULT_CONTROL_POSITION, HdsFormRadioCard as default }; +//# sourceMappingURL=index.js.map diff --git a/packages/components/dist/components/hds/form/radio-card/index.js.map b/packages/components/dist/components/hds/form/radio-card/index.js.map new file mode 100644 index 0000000000..5e12c9575e --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/radio-card/index.hbs","../../../../../src/components/hds/form/radio-card/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport {\n HdsFormRadioCardControlPositionValues,\n HdsFormRadioCardAlignmentValues,\n} from './types.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsBadgeSignature } from '../../badge';\nimport type { HdsFormRadioBaseSignature } from '../radio/base';\nimport type { HdsFormRadioCardDescriptionSignature } from './description';\nimport type { HdsFormRadioCardLabelSignature } from './label';\nimport type { HdsYieldSignature } from '../../yield';\nimport type {\n HdsFormRadioCardControlPositions,\n HdsFormRadioCardAlignments,\n} from './types';\n\nexport const DEFAULT_CONTROL_POSITION =\n HdsFormRadioCardControlPositionValues.Bottom;\nexport const DEFAULT_ALIGNMENT = HdsFormRadioCardAlignmentValues.Left;\nexport const CONTROL_POSITIONS: string[] = Object.values(\n HdsFormRadioCardControlPositionValues\n);\nexport const ALIGNMENTS: string[] = Object.values(\n HdsFormRadioCardAlignmentValues\n);\n\nexport interface HdsFormRadioCardSignature {\n Args: {\n name?: string;\n value?: string;\n checked?: boolean;\n disabled?: boolean;\n controlPosition?: HdsFormRadioCardControlPositions;\n alignment?: HdsFormRadioCardAlignments;\n maxWidth?: string;\n extraAriaDescribedBy?: string;\n };\n Blocks: {\n default: [\n {\n Icon?: ComponentLike;\n Label?: ComponentLike;\n Badge?: ComponentLike;\n Description?: ComponentLike;\n Generic?: ComponentLike;\n },\n ];\n };\n Element: HdsFormRadioBaseSignature['Element'];\n}\n\nexport default class HdsFormRadioCard extends Component {\n /**\n * Sets the position of the control\n * Accepted values: buttom, left\n *\n * @param type\n * @type {string}\n * @default 'bottom'\n */\n get controlPosition(): HdsFormRadioCardControlPositions {\n const { controlPosition = DEFAULT_CONTROL_POSITION } = this.args;\n\n assert(\n `@controlPosition for \"Hds::Form::RadioCard\" must be one of the following: ${CONTROL_POSITIONS.join(\n ', '\n )}; received: ${controlPosition}`,\n CONTROL_POSITIONS.includes(controlPosition)\n );\n\n return controlPosition;\n }\n\n /**\n * Sets the alignment of the content\n * Accepted values: left, center\n *\n * @param alignnment\n * @type {string}\n * @default 'left'\n */\n get alignment(): HdsFormRadioCardAlignments {\n const { alignment = DEFAULT_ALIGNMENT } = this.args;\n\n assert(\n `@alignment for \"Hds::Form::RadioCard\" must be one of the following: ${ALIGNMENTS.join(\n ', '\n )}; received: ${alignment}`,\n ALIGNMENTS.includes(alignment)\n );\n\n return alignment;\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(): string {\n const classes = ['hds-form-radio-card'];\n\n if (this.args.checked) {\n classes.push('hds-form-radio-card--checked');\n }\n if (this.args.disabled) {\n classes.push('hds-form-radio-card--disabled');\n }\n if (this.args.maxWidth) {\n classes.push('hds-form-radio-card--has-fixed-width');\n } else {\n classes.push('hds-form-radio-card--has-fluid-width');\n }\n\n // add a class based on the @controlPosition argument\n classes.push(`hds-form-radio-card--control-${this.controlPosition}`);\n\n // add a class based on the @alignment argument\n classes.push(`hds-form-radio-card--align-${this.alignment}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_CONTROL_POSITION","HdsFormRadioCardControlPositionValues","Bottom","DEFAULT_ALIGNMENT","HdsFormRadioCardAlignmentValues","Left","CONTROL_POSITIONS","Object","values","ALIGNMENTS","HdsFormRadioCard","Component","controlPosition","args","assert","join","includes","alignment","classNames","classes","checked","push","disabled","maxWidth","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,i2BAAi2B;;ACDn4B;AACA;AACA;AACA;;AAqBaA,MAAAA,wBAAwB,GACnCC,qCAAqC,CAACC;AAC3BC,MAAAA,iBAAiB,GAAGC,+BAA+B,CAACC;AAC1D,MAAMC,iBAA2B,GAAGC,MAAM,CAACC,MAAM,CACtDP,qCACF;AACO,MAAMQ,UAAoB,GAAGF,MAAM,CAACC,MAAM,CAC/CJ,+BACF;AA2Be,MAAMM,gBAAgB,SAASC,SAAS,CAA4B;AACjF;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,eAAeA,GAAqC;IACtD,MAAM;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ACAO,OAAO,CAACE,IAAI,CAAC,CAAA,2BAAA,EAA8B,IAAI,CAACJ,SAAS,EAAE,CAAC;AAE5D,IAAA,OAAOE,OAAO,CAACJ,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACS,oBAAA,CAAAC,QAAA,EAvEoBf,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio-card/label.js b/packages/components/dist/components/hds/form/radio-card/label.js new file mode 100644 index 0000000000..643f58f5cc --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/label.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{yield}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioCardLabel = TemplateOnlyComponent(); +var label = setComponentTemplate(TEMPLATE, HdsFormRadioCardLabel); + +export { label as default }; +//# sourceMappingURL=label.js.map diff --git a/packages/components/dist/components/hds/form/radio-card/label.js.map b/packages/components/dist/components/hds/form/radio-card/label.js.map new file mode 100644 index 0000000000..758a894f7f --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/label.js.map @@ -0,0 +1 @@ +{"version":3,"file":"label.js","sources":["../../../../../src/components/hds/form/radio-card/label.hbs","../../../../../src/components/hds/form/radio-card/label.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{yield}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsTextDisplaySignature } from '../../text/display';\n\nexport interface HdsFormRadioCardLabelSignature {\n Blocks: {\n default: [];\n };\n Element: HdsTextDisplaySignature['Element'];\n}\n\nconst HdsFormRadioCardLabel =\n templateOnlyComponent();\n\nexport default HdsFormRadioCardLabel;\n"],"names":["HdsFormRadioCardLabel","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mPAAmP;;ACDrR;AACA;AACA;AACA;;AAYA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio-card/types.js b/packages/components/dist/components/hds/form/radio-card/types.js new file mode 100644 index 0000000000..e64a3e0919 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/types.js @@ -0,0 +1,18 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFormRadioCardControlPositionValues = /*#__PURE__*/function (HdsFormRadioCardControlPositionValues) { + HdsFormRadioCardControlPositionValues["Bottom"] = "bottom"; + HdsFormRadioCardControlPositionValues["Left"] = "left"; + return HdsFormRadioCardControlPositionValues; +}({}); +let HdsFormRadioCardAlignmentValues = /*#__PURE__*/function (HdsFormRadioCardAlignmentValues) { + HdsFormRadioCardAlignmentValues["Left"] = "left"; + HdsFormRadioCardAlignmentValues["Center"] = "center"; + return HdsFormRadioCardAlignmentValues; +}({}); + +export { HdsFormRadioCardAlignmentValues, HdsFormRadioCardControlPositionValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/form/radio-card/types.js.map b/packages/components/dist/components/hds/form/radio-card/types.js.map new file mode 100644 index 0000000000..2aaf3416f7 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio-card/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/form/radio-card/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFormRadioCardControlPositionValues {\n Bottom = 'bottom',\n Left = 'left',\n}\n\nexport type HdsFormRadioCardControlPositions =\n `${HdsFormRadioCardControlPositionValues}`;\n\nexport enum HdsFormRadioCardAlignmentValues {\n Left = 'left',\n Center = 'center',\n}\n\nexport type HdsFormRadioCardAlignments = `${HdsFormRadioCardAlignmentValues}`;\n"],"names":["HdsFormRadioCardControlPositionValues","HdsFormRadioCardAlignmentValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,qCAAqC,0BAArCA,qCAAqC,EAAA;EAArCA,qCAAqC,CAAA,QAAA,CAAA,GAAA,QAAA;EAArCA,qCAAqC,CAAA,MAAA,CAAA,GAAA,MAAA;AAAA,EAAA,OAArCA,qCAAqC;AAAA,CAAA,CAAA,EAAA;AAQrCC,IAAAA,+BAA+B,0BAA/BA,+BAA+B,EAAA;EAA/BA,+BAA+B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA/BA,+BAA+B,CAAA,QAAA,CAAA,GAAA,QAAA;AAAA,EAAA,OAA/BA,+BAA+B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio/base.js b/packages/components/dist/components/hds/form/radio/base.js new file mode 100644 index 0000000000..a27a619c66 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/base.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioBase = TemplateOnlyComponent(); +var base = setComponentTemplate(TEMPLATE, HdsFormRadioBase); + +export { base as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/radio/base.js.map b/packages/components/dist/components/hds/form/radio/base.js.map new file mode 100644 index 0000000000..42fbebec62 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/radio/base.hbs","../../../../../src/components/hds/form/radio/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormRadioBaseSignature {\n Args: {\n value?: string;\n };\n Element: HTMLInputElement;\n}\n\nconst HdsFormRadioBase = templateOnlyComponent();\n\nexport default HdsFormRadioBase;\n"],"names":["HdsFormRadioBase","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gKAAgK;;ACDlM;AACA;AACA;AACA;;AAWA,MAAMA,gBAAgB,GAAGC,qBAAqB,EAA6B;AAE3E,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,gBAAgB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio/field.js b/packages/components/dist/components/hds/form/radio/field.js new file mode 100644 index 0000000000..67412987dd --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/field.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because it\'s controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioField = TemplateOnlyComponent(); +var field = setComponentTemplate(TEMPLATE, HdsFormRadioField); + +export { field as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/radio/field.js.map b/packages/components/dist/components/hds/form/radio/field.js.map new file mode 100644 index 0000000000..44f11f12c0 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/radio/field.hbs","../../../../../src/components/hds/form/radio/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because it\\'s controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormRadioFieldSignature {\n Args: Omit & {\n value?: string;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormRadioField = templateOnlyComponent();\n\nexport default HdsFormRadioField;\n"],"names":["HdsFormRadioField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,srBAAsrB;;ACDxtB;AACA;AACA;AACA;;AA0BA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/radio/group.js b/packages/components/dist/components/hds/form/radio/group.js new file mode 100644 index 0000000000..f35846d942 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/group.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because it\'s controlled at \"Hds::Form::Fieldset\" component level }}\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\n \n {{yield\n (hash\n RadioField=(component\n \"hds/form/radio/field\"\n contextualClass=\"hds-form-group__control-field\"\n isRequired=@isRequired\n name=@name\n extraAriaDescribedBy=F.ariaDescribedBy\n )\n )\n }}\n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormRadioGroup = TemplateOnlyComponent(); +var group = setComponentTemplate(TEMPLATE, HdsFormRadioGroup); + +export { group as default }; +//# sourceMappingURL=group.js.map diff --git a/packages/components/dist/components/hds/form/radio/group.js.map b/packages/components/dist/components/hds/form/radio/group.js.map new file mode 100644 index 0000000000..d9d384a0b2 --- /dev/null +++ b/packages/components/dist/components/hds/form/radio/group.js.map @@ -0,0 +1 @@ +{"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio/group.hbs","../../../../../src/components/hds/form/radio/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because it\\'s controlled at \\\"Hds::Form::Fieldset\\\" component level }}\\n {{yield (hash Legend=F.Legend HelperText=F.HelperText Error=F.Error)}}\\n \\n {{yield\\n (hash\\n RadioField=(component\\n \\\"hds/form/radio/field\\\"\\n contextualClass=\\\"hds-form-group__control-field\\\"\\n isRequired=@isRequired\\n name=@name\\n extraAriaDescribedBy=F.ariaDescribedBy\\n )\\n )\\n }}\\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { HdsFormFieldsetSignature } from '../fieldset';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormLegendSignature } from '../legend';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormRadioFieldSignature } from './field';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormRadioGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike;\n HelperText?: ComponentLike;\n RadioField?: ComponentLike;\n Error?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormRadioGroup = templateOnlyComponent();\n\nexport default HdsFormRadioGroup;\n"],"names":["HdsFormRadioGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6uBAA6uB;;ACD/wB;AACA;AACA;AACA;;AA2BA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B;AAE7E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/select/base.js b/packages/components/dist/components/hds/form/select/base.js new file mode 100644 index 0000000000..711c279eba --- /dev/null +++ b/packages/components/dist/components/hds/form/select/base.js @@ -0,0 +1,34 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFormSelectBase extends Component { + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-select']; + + // add typographic classes + classes.push('hds-typography-body-200', 'hds-font-weight-regular'); + + // add a class based on the @isInvalid argument + if (this.args.isInvalid) { + classes.push(`hds-form-select--is-invalid`); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormSelectBase); + +export { HdsFormSelectBase as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/select/base.js.map b/packages/components/dist/components/hds/form/select/base.js.map new file mode 100644 index 0000000000..704d9d5b6c --- /dev/null +++ b/packages/components/dist/components/hds/form/select/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/select/base.hbs","../../../../../src/components/hds/form/select/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsYieldSignature } from '../../yield';\n\nexport interface HdsFormSelectBaseSignature {\n Args: {\n isInvalid?: boolean;\n width?: string;\n };\n Blocks: {\n default: [\n {\n Options?: ComponentLike;\n },\n ];\n };\n Element: HTMLSelectElement;\n}\n\nexport default class HdsFormSelectBase extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-select'];\n\n // add typographic classes\n classes.push('hds-typography-body-200', 'hds-font-weight-regular');\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-select--is-invalid`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsFormSelectBase","Component","classNames","classes","push","args","isInvalid","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wNAAwN;;ACD1P;AACA;AACA;AACA;;AAqBe,MAAMA,iBAAiB,SAASC,SAAS,CAA6B;AACnF;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,iBAAiB,CAAC;;AAEnC;AACAA,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;;AAElE;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,SAAS,EAAE;AACvBH,MAAAA,OAAO,CAACC,IAAI,CAAC,CAAA,2BAAA,CAA6B,CAAC;AAC7C;AAEA,IAAA,OAAOD,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC;AAC1B;AACF;AAACC,oBAAA,CAAAC,QAAA,EAnBoBT,iBAAiB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/select/field.js b/packages/components/dist/components/hds/form/select/field.js new file mode 100644 index 0000000000..a9b84cd900 --- /dev/null +++ b/packages/components/dist/components/hds/form/select/field.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n \n {{yield (hash Options=S.Options)}}\n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormSelectField = TemplateOnlyComponent(); +var field = setComponentTemplate(TEMPLATE, HdsFormSelectField); + +export { field as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/select/field.js.map b/packages/components/dist/components/hds/form/select/field.js.map new file mode 100644 index 0000000000..9add059f36 --- /dev/null +++ b/packages/components/dist/components/hds/form/select/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/select/field.hbs","../../../../../src/components/hds/form/select/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n \\n {{yield (hash Options=S.Options)}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormSelectBaseSignature } from './base';\nimport type { HdsYieldSignature } from '../../yield';\n\nexport interface HdsFormSelectFieldSignature {\n Args: Omit &\n HdsFormSelectBaseSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n Options?: ComponentLike;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormSelectField = templateOnlyComponent();\n\nexport default HdsFormSelectField;\n"],"names":["HdsFormSelectField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+yBAA+yB;;ACDj1B;AACA;AACA;AACA;;AA2BA,MAAMA,kBAAkB,GAAGC,qBAAqB,EAA+B;AAE/E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,kBAAkB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/after-options.js b/packages/components/dist/components/hds/form/super-select/after-options.js new file mode 100644 index 0000000000..5fad7abb5e --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/after-options.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{#if @showNoSelectedMessage}}\n \n No options selected\n \n{{/if}}\n
    \n {{#if @content}}\n \n {{@content}}\n \n {{else}}\n {{#if (or @showAll @showSelected @clearSelected)}}\n {{#if @showOnlySelected}}\n \n {{else}}\n \n {{/if}}\n {{#if (not-eq @selectedCount \"0\")}}\n \n {{/if}}\n {{/if}}\n \n {{@resultCountMessage}}\n \n {{/if}}\n
    "); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormSuperSelectAfterOptions = TemplateOnlyComponent(); +var afterOptions = setComponentTemplate(TEMPLATE, HdsFormSuperSelectAfterOptions); + +export { afterOptions as default }; +//# sourceMappingURL=after-options.js.map diff --git a/packages/components/dist/components/hds/form/super-select/after-options.js.map b/packages/components/dist/components/hds/form/super-select/after-options.js.map new file mode 100644 index 0000000000..7d43985a57 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/after-options.js.map @@ -0,0 +1 @@ +{"version":3,"file":"after-options.js","sources":["../../../../../src/components/hds/form/super-select/after-options.hbs","../../../../../src/components/hds/form/super-select/after-options.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{#if @showNoSelectedMessage}}\\n \\n No options selected\\n \\n{{/if}}\\n
    \\n {{#if @content}}\\n \\n {{@content}}\\n \\n {{else}}\\n {{#if (or @showAll @showSelected @clearSelected)}}\\n {{#if @showOnlySelected}}\\n \\n {{else}}\\n \\n {{/if}}\\n {{#if (not-eq @selectedCount \\\"0\\\")}}\\n \\n {{/if}}\\n {{/if}}\\n \\n {{@resultCountMessage}}\\n \\n {{/if}}\\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormSuperSelectAfterOptionsSignature {\n Args: {\n clearSelected: () => void;\n content?: string;\n resultCountMessage?: string;\n selectedCount?: string;\n showAll: () => void;\n showNoSelectedMessage?: boolean;\n showOnlySelected?: boolean;\n showSelected: () => void;\n };\n}\n\nconst HdsFormSuperSelectAfterOptions =\n templateOnlyComponent();\n\nexport default HdsFormSuperSelectAfterOptions;\n"],"names":["HdsFormSuperSelectAfterOptions","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6sCAA6sC;;ACD/uC;AACA;AACA;AACA;;AAiBA,MAAMA,8BAA8B,GAClCC,qBAAqB,EAA2C;AAElE,mBAAAC,oBAAA,CAAAC,QAAA,EAAeH,8BAA8B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/multiple/base.js b/packages/components/dist/components/hds/form/super-select/multiple/base.js new file mode 100644 index 0000000000..97bb19d521 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/multiple/base.js @@ -0,0 +1,167 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.js'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { HdsFormSuperSelectHorizontalPositionValues, HdsFormSuperSelectHorizontalPositionToPlacementValues } from '../types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\n
    \n \n {{! even if technically what is yielded here are _a list_ of options, we\'ve decided to keep the `option` name for consistency with the existing `PowerSelect` API }}\n {{yield option select}}\n \n
    "); + +var _class, _descriptor, _descriptor2, _descriptor3; +const DEFAULT_HORIZONTAL_POSITION = HdsFormSuperSelectHorizontalPositionValues.Left; +const HORIZONTAL_POSITION_MAPPING = HdsFormSuperSelectHorizontalPositionToPlacementValues; +let HdsFormSuperSelectMultipleBase = (_class = class HdsFormSuperSelectMultipleBase extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "powerSelectAPI", _descriptor, this); + _initializerDefineProperty(this, "showOnlySelected", _descriptor2, this); + _initializerDefineProperty(this, "showNoSelectedMessage", _descriptor3, this); + } + get horizontalPosition() { + const { + horizontalPosition = DEFAULT_HORIZONTAL_POSITION + } = this.args; + return horizontalPosition; + } + get selectedCount() { + return this.powerSelectAPI?.selected?.length || '0'; + } + get optionsCount() { + return this.powerSelectAPI?.resultsCount.toString() || '0'; + } + get resultCountMessage() { + return this.args.resultCountMessage || `${this.selectedCount} selected of ${this.optionsCount} total`; + } + calculatePosition(trigger, content) { + // use `hds-anchored-position` to calculate and set position + // @ts-expect-error: known issue with type of invocation + anchoredPositionModifier(content, [trigger], { + placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition], + offsetOptions: 4, + enableCollisionDetection: true + }); + // prevent PowerSelect from setting position + return { + horizontalPosition: 'auto', + verticalPosition: 'auto', + style: {} + }; + } + + /** + * This action sets the powerSelectAPI property and optionally calls a registerAPI function. + * + * @param {Object} powerSelectAPI - The API object for the PowerSelect component. + * + * If a `registerAPI` function is passed in through the component's arguments, + * this function will be called with the `powerSelectAPI` as its argument. + * This allows parent components or controllers to have access to the PowerSelect API. + * + * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected` + */ + setPowerSelectAPI(powerSelectAPI) { + if (typeof this.args.registerAPI === 'function') { + this.args.registerAPI(powerSelectAPI); + } + this.powerSelectAPI = powerSelectAPI; + } + showSelected() { + this.showNoSelectedMessage = this.selectedCount === '0'; + this.showOnlySelected = true; + } + showAll() { + this.showNoSelectedMessage = false; + this.showOnlySelected = false; + } + clearSelected() { + this.powerSelectAPI?.actions.select(null); + // show all options after clearing all selection + this.showNoSelectedMessage = false; + this.showOnlySelected = false; + } + + /** + * Determine if `@afterOptionsComponent` gets displayed + * @param showAfterOptions + * @type {boolean} + * @default true + */ + get showAfterOptions() { + return this.args.showAfterOptions ?? true; + } + + // NOTE: The searchPlaceholder doesn't currently work for the multiple select + /** + * Get the search placeholder text + * @param searchPlaceholder + * @type {string} + * @default 'Search' + */ + get searchPlaceholder() { + return this.args.searchPlaceholder ?? 'Search'; + } + + /** + * Get the maxWidth to apply to the dropdown + * @param dropdownMaxWidth + * @type {string} + * @default 'none' + */ + get dropdownMaxWidthStyle() { + const maxWidthStyle = {}; + if (this.args.dropdownMaxWidth) { + maxWidthStyle['--hds-form-super-select-dropdown-max-width'] = this.args.dropdownMaxWidth; + } + return maxWidthStyle; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-super-select', 'hds-form-super-select-multiple']; + + // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set + if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) { + classes.push('hds-form-super-select--dropdown-content-auto-width'); + } + + // add a class based on the @isInvalid argument + if (this.args.isInvalid) { + classes.push(`hds-form-super-select--is-invalid`); + } + + // add a class based on the showOnlySelected + if (this.showOnlySelected) { + classes.push(`hds-form-super-select--show-only-selected`); + } + return classes.join(' '); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "powerSelectAPI", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "showOnlySelected", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, "showNoSelectedMessage", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return false; + } +}), _applyDecoratedDescriptor(_class.prototype, "calculatePosition", [action], Object.getOwnPropertyDescriptor(_class.prototype, "calculatePosition"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "setPowerSelectAPI", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setPowerSelectAPI"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "showSelected", [action], Object.getOwnPropertyDescriptor(_class.prototype, "showSelected"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "showAll", [action], Object.getOwnPropertyDescriptor(_class.prototype, "showAll"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "clearSelected", [action], Object.getOwnPropertyDescriptor(_class.prototype, "clearSelected"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsFormSuperSelectMultipleBase); + +export { DEFAULT_HORIZONTAL_POSITION, HORIZONTAL_POSITION_MAPPING, HdsFormSuperSelectMultipleBase as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/super-select/multiple/base.js.map b/packages/components/dist/components/hds/form/super-select/multiple/base.js.map new file mode 100644 index 0000000000..029bb6d658 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/multiple/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/base.hbs","../../../../../../src/components/hds/form/super-select/multiple/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\\n
    \\n \\n {{! even if technically what is yielded here are _a list_ of options, we\\'ve decided to keep the `option` name for consistency with the existing `PowerSelect` API }}\\n {{yield option select}}\\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.ts';\n\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport {\n HdsFormSuperSelectHorizontalPositionValues,\n HdsFormSuperSelectHorizontalPositionToPlacementValues,\n} from '../types.ts';\n\nimport type { PowerSelectSignature } from 'ember-power-select/components/power-select';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position';\nimport type { HdsFormSuperSelectHorizontalPositions } from '../types.ts';\n\nexport const DEFAULT_HORIZONTAL_POSITION: string =\n HdsFormSuperSelectHorizontalPositionValues.Left;\nexport const HORIZONTAL_POSITION_MAPPING =\n HdsFormSuperSelectHorizontalPositionToPlacementValues;\n\nexport interface HdsFormSuperSelectMultipleBaseSignature {\n Args: PowerSelectSignature['Args'] & {\n showAfterOptions?: boolean;\n afterOptionsContent?: string;\n resultCountMessage?: string;\n dropdownMaxWidth?: string;\n matchTriggerWidth?: boolean;\n isInvalid?: boolean;\n };\n Blocks: PowerSelectSignature['Blocks'];\n Element: PowerSelectSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleBase extends Component {\n @tracked powerSelectAPI?: PowerSelect;\n @tracked showOnlySelected = false;\n @tracked showNoSelectedMessage = false;\n\n get horizontalPosition(): HdsFormSuperSelectHorizontalPositions {\n const { horizontalPosition = DEFAULT_HORIZONTAL_POSITION } = this.args;\n return horizontalPosition as HdsFormSuperSelectHorizontalPositions;\n }\n\n get selectedCount(): string {\n return this.powerSelectAPI?.selected?.length || '0';\n }\n\n get optionsCount(): string {\n return this.powerSelectAPI?.resultsCount.toString() || '0';\n }\n\n get resultCountMessage(): string {\n return (\n this.args.resultCountMessage ||\n `${this.selectedCount} selected of ${this.optionsCount} total`\n );\n }\n\n @action calculatePosition(\n trigger: Element,\n content: HTMLElement\n ): CalculatePositionResult {\n // use `hds-anchored-position` to calculate and set position\n // @ts-expect-error: known issue with type of invocation\n anchoredPositionModifier(content, [trigger], {\n placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition],\n offsetOptions: 4,\n enableCollisionDetection: true,\n });\n // prevent PowerSelect from setting position\n return {\n horizontalPosition: 'auto',\n verticalPosition: 'auto',\n style: {},\n };\n }\n\n /**\n * This action sets the powerSelectAPI property and optionally calls a registerAPI function.\n *\n * @param {Object} powerSelectAPI - The API object for the PowerSelect component.\n *\n * If a `registerAPI` function is passed in through the component's arguments,\n * this function will be called with the `powerSelectAPI` as its argument.\n * This allows parent components or controllers to have access to the PowerSelect API.\n *\n * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected`\n */\n @action\n setPowerSelectAPI(powerSelectAPI: PowerSelect): void {\n if (typeof this.args.registerAPI === 'function') {\n this.args.registerAPI(powerSelectAPI);\n }\n this.powerSelectAPI = powerSelectAPI;\n }\n\n @action showSelected(): void {\n this.showNoSelectedMessage = this.selectedCount === '0';\n this.showOnlySelected = true;\n }\n\n @action showAll(): void {\n this.showNoSelectedMessage = false;\n this.showOnlySelected = false;\n }\n\n @action clearSelected(): void {\n this.powerSelectAPI?.actions.select(null);\n // show all options after clearing all selection\n this.showNoSelectedMessage = false;\n this.showOnlySelected = false;\n }\n\n /**\n * Determine if `@afterOptionsComponent` gets displayed\n * @param showAfterOptions\n * @type {boolean}\n * @default true\n */\n get showAfterOptions(): boolean {\n return this.args.showAfterOptions ?? true;\n }\n\n // NOTE: The searchPlaceholder doesn't currently work for the multiple select\n /**\n * Get the search placeholder text\n * @param searchPlaceholder\n * @type {string}\n * @default 'Search'\n */\n get searchPlaceholder(): string {\n return this.args.searchPlaceholder ?? 'Search';\n }\n\n /**\n * Get the maxWidth to apply to the dropdown\n * @param dropdownMaxWidth\n * @type {string}\n * @default 'none'\n */\n get dropdownMaxWidthStyle(): Record {\n const maxWidthStyle: { [key: string]: string } = {};\n if (this.args.dropdownMaxWidth) {\n maxWidthStyle['--hds-form-super-select-dropdown-max-width'] =\n this.args.dropdownMaxWidth;\n }\n return maxWidthStyle;\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(): string {\n const classes = ['hds-form-super-select', 'hds-form-super-select-multiple'];\n\n // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set\n if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) {\n classes.push('hds-form-super-select--dropdown-content-auto-width');\n }\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-super-select--is-invalid`);\n }\n\n // add a class based on the showOnlySelected\n if (this.showOnlySelected) {\n classes.push(`hds-form-super-select--show-only-selected`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_HORIZONTAL_POSITION","HdsFormSuperSelectHorizontalPositionValues","Left","HORIZONTAL_POSITION_MAPPING","HdsFormSuperSelectHorizontalPositionToPlacementValues","HdsFormSuperSelectMultipleBase","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","horizontalPosition","selectedCount","powerSelectAPI","selected","length","optionsCount","resultsCount","toString","resultCountMessage","calculatePosition","trigger","content","anchoredPositionModifier","placement","offsetOptions","enableCollisionDetection","verticalPosition","style","setPowerSelectAPI","registerAPI","showSelected","showNoSelectedMessage","showOnlySelected","showAll","clearSelected","actions","select","showAfterOptions","searchPlaceholder","dropdownMaxWidthStyle","maxWidthStyle","dropdownMaxWidth","classNames","classes","matchTriggerWidth","push","isInvalid","join","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","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AAA,CAAA+C,SAAA,oBAAA/C,MAAA,CAAA+C,SAAA,CAAA,EAAA/C,MAAA;AAzE0CwD,oBAAA,CAAAC,QAAA,EAA9B1D,8BAA8B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/multiple/field.js b/packages/components/dist/components/hds/form/super-select/multiple/field.js new file mode 100644 index 0000000000..faf815fce6 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/multiple/field.js @@ -0,0 +1,21 @@ +import Component from '@glimmer/component'; +import { ID_PREFIX } from '../../label/index.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\n \n {{yield (hash options=options select=select Options=(component \"hds/yield\" options=options select=select))}}\n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFormSuperSelectMultipleField extends Component { + get idPrefix() { + return ID_PREFIX; + } +} +setComponentTemplate(TEMPLATE, HdsFormSuperSelectMultipleField); + +export { HdsFormSuperSelectMultipleField as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/super-select/multiple/field.js.map b/packages/components/dist/components/hds/form/super-select/multiple/field.js.map new file mode 100644 index 0000000000..209c59a82d --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/multiple/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/field.hbs","../../../../../../src/components/hds/form/super-select/multiple/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n \\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectMultipleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\nexport interface HdsFormSuperSelectMultipleFieldSignature {\n Args: HdsFormSuperSelectMultipleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n Options?: ComponentLike;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleField extends Component {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectMultipleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,k2FAAk2F;;ACDp4F;AACA;AACA;AACA;;AAgCe,MAAMA,+BAA+B,SAASC,SAAS,CAA2C;EAC/G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS;AAClB;AACF;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,+BAA+B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/option-group.js b/packages/components/dist/components/hds/form/super-select/option-group.js new file mode 100644 index 0000000000..cb35b47e94 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/option-group.js @@ -0,0 +1,22 @@ +import { a as _defineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { guidFor } from '@ember/object/internals'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n
  • \n \n {{@group.groupName}}\n \n {{yield}}\n
  • "); + +class HdsFormSuperSelectOptionGroup extends Component { + constructor(...args) { + super(...args); + /** + * Generates a unique ID for the group title + * @return {string} + */ + _defineProperty(this, "groupTitleId", 'group-title-' + guidFor(this)); + } +} +setComponentTemplate(TEMPLATE, HdsFormSuperSelectOptionGroup); + +export { HdsFormSuperSelectOptionGroup as default }; +//# sourceMappingURL=option-group.js.map diff --git a/packages/components/dist/components/hds/form/super-select/option-group.js.map b/packages/components/dist/components/hds/form/super-select/option-group.js.map new file mode 100644 index 0000000000..6f88305ca2 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/option-group.js.map @@ -0,0 +1 @@ +{"version":3,"file":"option-group.js","sources":["../../../../../src/components/hds/form/super-select/option-group.hbs","../../../../../src/components/hds/form/super-select/option-group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n
  • \\n \\n {{@group.groupName}}\\n \\n {{yield}}\\n
  • \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\nexport interface HdsFormSuperSelectOptionGroupSignature {\n Args: {\n group: {\n groupName?: string;\n };\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class HdsFormSuperSelectOptionGroup extends Component {\n /**\n * Generates a unique ID for the group title\n * @return {string}\n */\n groupTitleId = 'group-title-' + guidFor(this);\n}\n"],"names":["HdsFormSuperSelectOptionGroup","Component","constructor","args","_defineProperty","guidFor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,0aAA0a;;ACkB7b,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAC3G;AACF;AACA;AACA;AAHEC,IAAAA,eAAA,uBAIe,cAAc,GAAGC,OAAO,CAAC,IAAI,CAAC,CAAA;AAAA;AAC/C;AAACC,oBAAA,CAAAC,QAAA,EANoBP,6BAA6B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/placeholder.js b/packages/components/dist/components/hds/form/super-select/placeholder.js new file mode 100644 index 0000000000..824a228c7f --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/placeholder.js @@ -0,0 +1,16 @@ +import TemplateOnlyComponent from '@ember/component/template-only'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{@placeholder}}"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +const HdsFormSuperSelectPlaceholder = TemplateOnlyComponent(); +var placeholder = setComponentTemplate(TEMPLATE, HdsFormSuperSelectPlaceholder); + +export { placeholder as default }; +//# sourceMappingURL=placeholder.js.map diff --git a/packages/components/dist/components/hds/form/super-select/placeholder.js.map b/packages/components/dist/components/hds/form/super-select/placeholder.js.map new file mode 100644 index 0000000000..b4fcc35361 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/placeholder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"placeholder.js","sources":["../../../../../src/components/hds/form/super-select/placeholder.hbs","../../../../../src/components/hds/form/super-select/placeholder.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{@placeholder}}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormSuperSelectPlaceholderSignature {\n Args: {\n placeholder?: string;\n };\n}\n\nconst HdsFormSuperSelectPlaceholder =\n templateOnlyComponent();\n\nexport default HdsFormSuperSelectPlaceholder;\n"],"names":["HdsFormSuperSelectPlaceholder","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wMAAwM;;ACD1O;AACA;AACA;AACA;;AAUA,MAAMA,6BAA6B,GACjCC,qBAAqB,EAA0C;AAEjE,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,6BAA6B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/single/base.js b/packages/components/dist/components/hds/form/super-select/single/base.js new file mode 100644 index 0000000000..85100891f3 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/single/base.js @@ -0,0 +1,125 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.js'; +import { action } from '@ember/object'; +import { tracked } from '@glimmer/tracking'; +import { HdsFormSuperSelectHorizontalPositionValues, HdsFormSuperSelectHorizontalPositionToPlacementValues } from '../types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\n
    \n \n {{yield option select}}\n \n
    "); + +var _class, _descriptor; +const DEFAULT_HORIZONTAL_POSITION = HdsFormSuperSelectHorizontalPositionValues.Left; +const HORIZONTAL_POSITION_MAPPING = HdsFormSuperSelectHorizontalPositionToPlacementValues; +let HdsFormSuperSelectSingleBase = (_class = class HdsFormSuperSelectSingleBase extends Component { + constructor(...args) { + super(...args); + _initializerDefineProperty(this, "powerSelectAPI", _descriptor, this); + } + get horizontalPosition() { + const { + horizontalPosition = DEFAULT_HORIZONTAL_POSITION + } = this.args; + return horizontalPosition; + } + get resultCountMessage() { + return `${this.powerSelectAPI?.resultsCount || 0} total`; + } + + /** + * This action sets the powerSelectAPI property and optionally calls a registerAPI function. + * + * @param {Object} powerSelectAPI - The API object for the PowerSelect component. + * + * If a `registerAPI` function is passed in through the component's arguments, + * this function will be called with the `powerSelectAPI` as its argument. + * This allows parent components or controllers to have access to the PowerSelect API. + * + * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected` + */ + setPowerSelectAPI(powerSelectAPI) { + if (typeof this.args.registerAPI === 'function') { + this.args.registerAPI(powerSelectAPI); + } + this.powerSelectAPI = powerSelectAPI; + } + calculatePosition(trigger, content) { + // use `hds-anchored-position` to calculate and set position + // @ts-expect-error: known issue with type of invocation + anchoredPositionModifier(content, [trigger], { + placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition], + offsetOptions: 4, + enableCollisionDetection: true + }); + // prevent PowerSelect from setting position + return { + horizontalPosition: 'auto', + verticalPosition: 'auto', + style: {} + }; + } + + /** + * Determine if `@afterOptionsComponent` gets displayed + * @param showAfterOptions + * @type {boolean} + * @default false + */ + get showAfterOptions() { + return this.args.showAfterOptions ?? this.args.afterOptionsContent ?? false; + } + + /** + * Get the search placeholder text + * @param searchPlaceholder + * @type {string} + * @default 'Search' + */ + get searchPlaceholder() { + return this.args.searchPlaceholder ?? 'Search'; + } + + /** + * Get the maxWidth to apply to the dropdown + * @param dropdownMaxWidth + * @type {string} + * @default 'none' + */ + get dropdownMaxWidthStyle() { + const maxWidthStyle = {}; + if (this.args.dropdownMaxWidth) { + maxWidthStyle['--hds-form-super-select-dropdown-max-width'] = this.args.dropdownMaxWidth; + } + return maxWidthStyle; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-super-select', 'hds-form-super-select-single']; + + // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set + if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) { + classes.push('hds-form-super-select--dropdown-content-auto-width'); + } + + // add a class based on the @isInvalid argument + if (this.args.isInvalid) { + classes.push(`hds-form-super-select--is-invalid`); + } + return classes.join(' '); + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "powerSelectAPI", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "setPowerSelectAPI", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setPowerSelectAPI"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "calculatePosition", [action], Object.getOwnPropertyDescriptor(_class.prototype, "calculatePosition"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsFormSuperSelectSingleBase); + +export { DEFAULT_HORIZONTAL_POSITION, HORIZONTAL_POSITION_MAPPING, HdsFormSuperSelectSingleBase as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/super-select/single/base.js.map b/packages/components/dist/components/hds/form/super-select/single/base.js.map new file mode 100644 index 0000000000..4a79463f9e --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/single/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../../src/components/hds/form/super-select/single/base.hbs","../../../../../../src/components/hds/form/super-select/single/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{! Important: if an argument is added in base.hbs, it must also be added/processed in the Base component used in field.hbs }}\\n
    \\n \\n {{yield option select}}\\n \\n
    \")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport anchoredPositionModifier from '../../../../../modifiers/hds-anchored-position.ts';\n\nimport { action } from '@ember/object';\nimport { tracked } from '@glimmer/tracking';\nimport {\n HdsFormSuperSelectHorizontalPositionValues,\n HdsFormSuperSelectHorizontalPositionToPlacementValues,\n} from '../types.ts';\n\nimport type { PowerSelectSignature } from 'ember-power-select/components/power-select';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { CalculatePositionResult } from 'ember-basic-dropdown/utils/calculate-position';\nimport type { HdsFormSuperSelectHorizontalPositions } from '../types.ts';\n\nexport const DEFAULT_HORIZONTAL_POSITION: string =\n HdsFormSuperSelectHorizontalPositionValues.Left;\nexport const HORIZONTAL_POSITION_MAPPING =\n HdsFormSuperSelectHorizontalPositionToPlacementValues;\n\nexport interface HdsFormSuperSelectSingleBaseSignature {\n Args: PowerSelectSignature['Args'] & {\n showAfterOptions?: boolean;\n afterOptionsContent?: string;\n resultCountMessage?: string;\n dropdownMaxWidth?: string;\n matchTriggerWidth?: boolean;\n isInvalid?: boolean;\n };\n Blocks: PowerSelectSignature['Blocks'];\n Element: PowerSelectSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectSingleBase extends Component {\n @tracked powerSelectAPI?: PowerSelect;\n\n get horizontalPosition(): HdsFormSuperSelectHorizontalPositions {\n const { horizontalPosition = DEFAULT_HORIZONTAL_POSITION } = this.args;\n return horizontalPosition as HdsFormSuperSelectHorizontalPositions;\n }\n\n get resultCountMessage(): string {\n return `${this.powerSelectAPI?.resultsCount || 0} total`;\n }\n\n /**\n * This action sets the powerSelectAPI property and optionally calls a registerAPI function.\n *\n * @param {Object} powerSelectAPI - The API object for the PowerSelect component.\n *\n * If a `registerAPI` function is passed in through the component's arguments,\n * this function will be called with the `powerSelectAPI` as its argument.\n * This allows parent components or controllers to have access to the PowerSelect API.\n *\n * The `powerSelectAPI` is also stored on the component instance and used in `clearSelected`\n */\n @action\n setPowerSelectAPI(powerSelectAPI: PowerSelect): void {\n if (typeof this.args.registerAPI === 'function') {\n this.args.registerAPI(powerSelectAPI);\n }\n this.powerSelectAPI = powerSelectAPI;\n }\n\n @action calculatePosition(\n trigger: Element,\n content: HTMLElement\n ): CalculatePositionResult {\n // use `hds-anchored-position` to calculate and set position\n // @ts-expect-error: known issue with type of invocation\n anchoredPositionModifier(content, [trigger], {\n placement: HORIZONTAL_POSITION_MAPPING[this.horizontalPosition],\n offsetOptions: 4,\n enableCollisionDetection: true,\n });\n // prevent PowerSelect from setting position\n return {\n horizontalPosition: 'auto',\n verticalPosition: 'auto',\n style: {},\n };\n }\n\n /**\n * Determine if `@afterOptionsComponent` gets displayed\n * @param showAfterOptions\n * @type {boolean}\n * @default false\n */\n get showAfterOptions(): boolean | string {\n return this.args.showAfterOptions ?? this.args.afterOptionsContent ?? false;\n }\n\n /**\n * Get the search placeholder text\n * @param searchPlaceholder\n * @type {string}\n * @default 'Search'\n */\n get searchPlaceholder(): string {\n return this.args.searchPlaceholder ?? 'Search';\n }\n\n /**\n * Get the maxWidth to apply to the dropdown\n * @param dropdownMaxWidth\n * @type {string}\n * @default 'none'\n */\n get dropdownMaxWidthStyle(): Record {\n const maxWidthStyle: { [key: string]: string } = {};\n if (this.args.dropdownMaxWidth) {\n maxWidthStyle['--hds-form-super-select-dropdown-max-width'] =\n this.args.dropdownMaxWidth;\n }\n return maxWidthStyle;\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(): string {\n const classes = ['hds-form-super-select', 'hds-form-super-select-single'];\n\n // add a class based on the @matchTriggerWidth argument or whether dropdownMaxWidth is set\n if (this.args.matchTriggerWidth === false || this.args.dropdownMaxWidth) {\n classes.push('hds-form-super-select--dropdown-content-auto-width');\n }\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-super-select--is-invalid`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_HORIZONTAL_POSITION","HdsFormSuperSelectHorizontalPositionValues","Left","HORIZONTAL_POSITION_MAPPING","HdsFormSuperSelectHorizontalPositionToPlacementValues","HdsFormSuperSelectSingleBase","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","horizontalPosition","resultCountMessage","powerSelectAPI","resultsCount","setPowerSelectAPI","registerAPI","calculatePosition","trigger","content","anchoredPositionModifier","placement","offsetOptions","enableCollisionDetection","verticalPosition","style","showAfterOptions","afterOptionsContent","searchPlaceholder","dropdownMaxWidthStyle","maxWidthStyle","dropdownMaxWidth","classNames","classes","matchTriggerWidth","push","isInvalid","join","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,qkFAAqkF;;;ACmB1lFA,MAAAA,2BAAmC,GAC9CC,0CAA0C,CAACC;AACtC,MAAMC,2BAA2B,GACtCC;AAemBC,IAAAA,4BAA4B,IAAAC,MAAA,GAAlC,MAAMD,4BAA4B,SAASE,SAAS,CAAwC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA;AAAAC,IAAAA,0BAAA,yBAAAC,WAAA,EAAA,IAAA,CAAA;AAAA;EAGzG,IAAIC,kBAAkBA,GAA0C;IAC9D,MAAM;AAAEA,MAAAA,kBAAkB,GAAGZ;KAA6B,GAAG,IAAI,CAACS,IAAI;AACt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AAA,EAAAlC,MAAA,CAAAkC,SAAA,GAAAlC,MAAA;AA/BwC2C,oBAAA,CAAAC,QAAA,EAA5B7C,4BAA4B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/single/field.js b/packages/components/dist/components/hds/form/super-select/single/field.js new file mode 100644 index 0000000000..5c5cd97cfc --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/single/field.js @@ -0,0 +1,21 @@ +import Component from '@glimmer/component'; +import { ID_PREFIX } from '../../label/index.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n \n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\n \n {{yield (hash options=options select=select Options=(component \"hds/yield\" options=options select=select))}}\n \n \n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +class HdsFormSuperSelectSingleField extends Component { + get idPrefix() { + return ID_PREFIX; + } +} +setComponentTemplate(TEMPLATE, HdsFormSuperSelectSingleField); + +export { HdsFormSuperSelectSingleField as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/super-select/single/field.js.map b/packages/components/dist/components/hds/form/super-select/single/field.js.map new file mode 100644 index 0000000000..0ef97e8425 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/single/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/single/field.hbs","../../../../../../src/components/hds/form/super-select/single/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n \\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n \\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n \\n \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectSingleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\nexport interface HdsFormSuperSelectSingleFieldSignature {\n Args: HdsFormSuperSelectSingleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n Options?: ComponentLike;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectSingleField extends Component {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectSingleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,u4FAAu4F;;ACDz6F;AACA;AACA;AACA;;AAgCe,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;EAC3G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS;AAClB;AACF;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,6BAA6B,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/super-select/types.js b/packages/components/dist/components/hds/form/super-select/types.js new file mode 100644 index 0000000000..b343b7caba --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/types.js @@ -0,0 +1,20 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFormSuperSelectHorizontalPositionValues = /*#__PURE__*/function (HdsFormSuperSelectHorizontalPositionValues) { + HdsFormSuperSelectHorizontalPositionValues["Left"] = "left"; + HdsFormSuperSelectHorizontalPositionValues["Center"] = "center"; + HdsFormSuperSelectHorizontalPositionValues["Right"] = "right"; + return HdsFormSuperSelectHorizontalPositionValues; +}({}); +// map SuperSelect's `horizontalPosition` values to anchoredPositionModifier's `placement` values +const HdsFormSuperSelectHorizontalPositionToPlacementValues = { + [HdsFormSuperSelectHorizontalPositionValues.Left]: 'bottom-start', + [HdsFormSuperSelectHorizontalPositionValues.Center]: 'bottom', + [HdsFormSuperSelectHorizontalPositionValues.Right]: 'bottom-end' +}; + +export { HdsFormSuperSelectHorizontalPositionToPlacementValues, HdsFormSuperSelectHorizontalPositionValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/form/super-select/types.js.map b/packages/components/dist/components/hds/form/super-select/types.js.map new file mode 100644 index 0000000000..e82b520162 --- /dev/null +++ b/packages/components/dist/components/hds/form/super-select/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/form/super-select/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport type { FloatingUIOptions } from '../../../../modifiers/hds-anchored-position.ts';\n\nexport enum HdsFormSuperSelectHorizontalPositionValues {\n Left = 'left',\n Center = 'center',\n Right = 'right',\n}\n\nexport type HdsFormSuperSelectHorizontalPositions =\n `${HdsFormSuperSelectHorizontalPositionValues}`;\n\n// map SuperSelect's `horizontalPosition` values to anchoredPositionModifier's `placement` values\nexport const HdsFormSuperSelectHorizontalPositionToPlacementValues: Record<\n // SuperSelect's `horizontalPosition` values\n HdsFormSuperSelectHorizontalPositionValues,\n FloatingUIOptions['placement']\n> = {\n [HdsFormSuperSelectHorizontalPositionValues.Left]: 'bottom-start',\n [HdsFormSuperSelectHorizontalPositionValues.Center]: 'bottom',\n [HdsFormSuperSelectHorizontalPositionValues.Right]: 'bottom-end',\n};\n"],"names":["HdsFormSuperSelectHorizontalPositionValues","HdsFormSuperSelectHorizontalPositionToPlacementValues","Left","Center","Right"],"mappings":"AAAA;AACA;AACA;AACA;;AAIYA,IAAAA,0CAA0C,0BAA1CA,0CAA0C,EAAA;EAA1CA,0CAA0C,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1CA,0CAA0C,CAAA,QAAA,CAAA,GAAA,QAAA;EAA1CA,0CAA0C,CAAA,OAAA,CAAA,GAAA,OAAA;AAAA,EAAA,OAA1CA,0CAA0C;AAAA,CAAA,CAAA,EAAA;AAStD;AACO,MAAMC,qDAIZ,GAAG;AACF,EAAA,CAACD,0CAA0C,CAACE,IAAI,GAAG,cAAc;AACjE,EAAA,CAACF,0CAA0C,CAACG,MAAM,GAAG,QAAQ;EAC7D,CAACH,0CAA0C,CAACI,KAAK,GAAG;AACtD;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/text-input/base.js b/packages/components/dist/components/hds/form/text-input/base.js new file mode 100644 index 0000000000..5f618694d9 --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/base.js @@ -0,0 +1,65 @@ +import Component from '@glimmer/component'; +import { assert } from '@ember/debug'; +import { HdsFormTextInputTypeValues } from './types.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n"); + +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +// notice: we don't support all the possible HTML types, only a subset +// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input +const DEFAULT_TYPE = HdsFormTextInputTypeValues.Text; +const TYPES = Object.values(HdsFormTextInputTypeValues); +class HdsFormTextInputBase extends Component { + /** + * Sets the type of input + * + * @param type + * @type {string} + * @default 'text' + */ + get type() { + const { + type = DEFAULT_TYPE + } = this.args; + assert(`@type for "Hds::Form::TextInput" must be one of the following: ${TYPES.join(', ')}; received: ${type}`, TYPES.includes(type)); + return type; + } + + /** + * Get the class names to apply to the component. + * @method classNames + * @return {string} The "class" attribute to apply to the component. + */ + get classNames() { + const classes = ['hds-form-text-input']; + + // add typographic classes + classes.push('hds-typography-body-200', 'hds-font-weight-regular'); + + // add a class based on the @isInvalid argument + if (this.args.isInvalid) { + classes.push(`hds-form-text-input--is-invalid`); + } + + // add a class based on the @hasVisibilityToggle argument + if (this.args.hasVisibilityToggle) { + classes.push(`hds-form-text-input--has-visibility-toggle`); + } + + // add a class based on the @isLoading argument + if (this.args.isLoading) { + classes.push(`hds-form-text-input--is-loading`); + } + return classes.join(' '); + } +} +setComponentTemplate(TEMPLATE, HdsFormTextInputBase); + +export { DEFAULT_TYPE, TYPES, HdsFormTextInputBase as default }; +//# sourceMappingURL=base.js.map diff --git a/packages/components/dist/components/hds/form/text-input/base.js.map b/packages/components/dist/components/hds/form/text-input/base.js.map new file mode 100644 index 0000000000..96bc6d1d39 --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/text-input/base.hbs","../../../../../src/components/hds/form/text-input/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nimport { HdsFormTextInputTypeValues } from './types.ts';\nimport type { HdsFormTextInputTypes } from './types.ts';\n\n// notice: we don't support all the possible HTML types, only a subset\n// https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input\nexport const DEFAULT_TYPE = HdsFormTextInputTypeValues.Text;\nexport const TYPES: string[] = Object.values(HdsFormTextInputTypeValues);\n\nexport interface HdsFormTextInputBaseSignature {\n Args: {\n hasVisibilityToggle?: boolean;\n isInvalid?: boolean;\n isLoading?: boolean;\n type?: HdsFormTextInputTypes;\n value?: string;\n width?: string;\n };\n Element: HTMLInputElement;\n}\n\nexport default class HdsFormTextInputBase extends Component {\n /**\n * Sets the type of input\n *\n * @param type\n * @type {string}\n * @default 'text'\n */\n get type(): HdsFormTextInputTypes {\n const { type = DEFAULT_TYPE } = this.args;\n\n assert(\n `@type for \"Hds::Form::TextInput\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${type}`,\n TYPES.includes(type)\n );\n\n return type;\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(): string {\n const classes = ['hds-form-text-input'];\n\n // add typographic classes\n classes.push('hds-typography-body-200', 'hds-font-weight-regular');\n\n // add a class based on the @isInvalid argument\n if (this.args.isInvalid) {\n classes.push(`hds-form-text-input--is-invalid`);\n }\n\n // add a class based on the @hasVisibilityToggle argument\n if (this.args.hasVisibilityToggle) {\n classes.push(`hds-form-text-input--has-visibility-toggle`);\n }\n\n // add a class based on the @isLoading argument\n if (this.args.isLoading) {\n classes.push(`hds-form-text-input--is-loading`);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_TYPE","HdsFormTextInputTypeValues","Text","TYPES","Object","values","HdsFormTextInputBase","Component","type","args","assert","join","includes","classNames","classes","push","isInvalid","hasVisibilityToggle","isLoading","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,4LAA4L;;ACD9N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/components/dist/components/hds/form/text-input/field.js b/packages/components/dist/components/hds/form/text-input/field.js new file mode 100644 index 0000000000..ca2660426d --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/field.js @@ -0,0 +1,63 @@ +import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-81503waH.js'; +import Component from '@glimmer/component'; +import { tracked } from '@glimmer/tracking'; +import { action } from '@ember/object'; +import '../character-count/index.js'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n {{! Notice: the order of the elements is not relevant here, because is controlled at \"Hds::Form::Field\" component level }}\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\n {{#if F.CharacterCount}}\n {{yield (hash CharacterCount=(component F.CharacterCount value=@value))}}\n {{/if}}\n \n
    \n \n {{#if this.showVisibilityToggle}}\n \n {{/if}}\n
    \n
    \n"); + +var _class, _descriptor, _descriptor2; +let HdsFormTextInputField = (_class = class HdsFormTextInputField extends Component { + constructor(owner, args) { + super(owner, args); + _initializerDefineProperty(this, "isPasswordMasked", _descriptor, this); + _initializerDefineProperty(this, "type", _descriptor2, this); + this.type = this.args.type ?? 'text'; + } + get hasVisibilityToggle() { + return this.args.hasVisibilityToggle ?? true; + } + get showVisibilityToggle() { + return this.args.type === 'password' && this.hasVisibilityToggle; + } + get visibilityToggleAriaLabel() { + if (this.args.visibilityToggleAriaLabel) { + return this.args.visibilityToggleAriaLabel; + } else if (this.isPasswordMasked) { + return 'Show password'; + } else { + return 'Hide password'; + } + } + get visibilityToggleAriaMessageText() { + if (this.args.visibilityToggleAriaMessageText) { + return this.args.visibilityToggleAriaMessageText; + } else if (this.isPasswordMasked) { + return 'Password is hidden'; + } else { + return 'Password is visible'; + } + } + onClickTogglePasswordReadability() { + this.isPasswordMasked = !this.isPasswordMasked; + this.type = this.isPasswordMasked ? 'password' : 'text'; + } +}, _descriptor = _applyDecoratedDescriptor(_class.prototype, "isPasswordMasked", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: function () { + return true; + } +}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "type", [tracked], { + configurable: true, + enumerable: true, + writable: true, + initializer: null +}), _applyDecoratedDescriptor(_class.prototype, "onClickTogglePasswordReadability", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickTogglePasswordReadability"), _class.prototype), _class); +setComponentTemplate(TEMPLATE, HdsFormTextInputField); + +export { HdsFormTextInputField as default }; +//# sourceMappingURL=field.js.map diff --git a/packages/components/dist/components/hds/form/text-input/field.js.map b/packages/components/dist/components/hds/form/text-input/field.js.map new file mode 100644 index 0000000000..200bacaf19 --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/field.js.map @@ -0,0 +1 @@ +{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/text-input/field.hbs","../../../../../src/components/hds/form/text-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n {{! Notice: the order of the elements is not relevant here, because is controlled at \\\"Hds::Form::Field\\\" component level }}\\n {{yield (hash Label=F.Label HelperText=F.HelperText Error=F.Error)}}\\n {{#if F.CharacterCount}}\\n {{yield (hash CharacterCount=(component F.CharacterCount value=@value))}}\\n {{/if}}\\n \\n
    \\n \\n {{#if this.showVisibilityToggle}}\\n \\n {{/if}}\\n
    \\n
    \\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormTextInputBaseSignature } from './base';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormVisibilityToggleSignature } from '../visibility-toggle';\nimport HdsFormCharacterCountComponent from '../character-count/index.ts';\n\nexport interface HdsFormTextInputFieldSignature {\n Args: Omit &\n HdsFormTextInputBaseSignature['Args'] & {\n visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel'];\n visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText'];\n };\n Blocks: {\n default: [\n {\n Label?: ComponentLike;\n HelperText?: ComponentLike;\n Error?: ComponentLike;\n CharacterCount?: WithBoundArgs<\n typeof HdsFormCharacterCountComponent,\n 'value'\n >;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormTextInputField extends Component {\n @tracked isPasswordMasked = true;\n @tracked type;\n\n constructor(owner: unknown, args: HdsFormTextInputFieldSignature['Args']) {\n super(owner, args);\n this.type = this.args.type ?? 'text';\n }\n\n get hasVisibilityToggle(): boolean {\n return this.args.hasVisibilityToggle ?? true;\n }\n\n get showVisibilityToggle(): boolean {\n return this.args.type === 'password' && this.hasVisibilityToggle;\n }\n\n get visibilityToggleAriaLabel(): string | undefined {\n if (this.args.visibilityToggleAriaLabel) {\n return this.args.visibilityToggleAriaLabel;\n } else if (this.isPasswordMasked) {\n return 'Show password';\n } else {\n return 'Hide password';\n }\n }\n\n get visibilityToggleAriaMessageText(): string | undefined {\n if (this.args.visibilityToggleAriaMessageText) {\n return this.args.visibilityToggleAriaMessageText;\n } else if (this.isPasswordMasked) {\n return 'Password is hidden';\n } else {\n return 'Password is visible';\n }\n }\n\n @action\n onClickTogglePasswordReadability(): void {\n this.isPasswordMasked = !this.isPasswordMasked;\n this.type = this.isPasswordMasked ? 'password' : 'text';\n }\n}\n"],"names":["HdsFormTextInputField","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","type","hasVisibilityToggle","showVisibilityToggle","visibilityToggleAriaLabel","isPasswordMasked","visibilityToggleAriaMessageText","onClickTogglePasswordReadability","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,0+CAA0+C;;;ACuCv/CA,IAAAA,qBAAqB,IAAAC,MAAA,GAA3B,MAAMD,qBAAqB,SAASE,SAAS,CAAiC;AAI3FC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAA4C,EAAE;AACxE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAACC,IAAAA,0BAAA,2BAAAC,WAAA,EAAA,IAAA,CAAA;AAAAD,IAAAA,0BAAA,eAAAE,YAAA,EAAA,IAAA,CAAA;IACnB,IAAI,CAACC,IAAI,GAAG,IAAI,CAACJ,IAAI,CAACI,IAAI,IAAI,MAAM;AACtC;EAEA,IAAIC,mBAAmBA,GAAY;AACjC,IAAA,OAAO,IAAI,CAACL,IAAI,CAACK,mBAAmB,IAAI,IAAI;AAC9C;EAEA,IAAIC,oBAAoBA,GAAY;IAClC,OAAO,IAAI,CAACN,IAAI,CAACI,IAAI,KAAK,UAAU,IAAI,IAAI,CAACC,mBAAmB;AAClE;EAEA,IAAIE,yBAAyBA,GAAuB;AAClD,IAAA,IAAI,IAAI,CAACP,IAAI,CAACO,yBAAyB,EAAE;AACvC,MAAA,OAAO,IAAI,CAACP,IAAI,CAACO,yBAAyB;AAC5C,KAAC,MAAM,IAAI,IAAI,CAACC,gBAAgB,EAAE;AAChC,MAAA,OAAO,eAAe;AACxB,KAAC,MAAM;AACL,MAAA,OAAO,eAAe;AACxB;AACF;EAEA,IAAIC,+BAA+BA,GAAuB;AACxD,IAAA,IAAI,IAAI,CAACT,IAAI,CAACS,+BAA+B,EAAE;AAC7C,MAAA,OAAO,IAAI,CAACT,IAAI,CAACS,+BAA+B;AAClD,KAAC,MAAM,IAAI,IAAI,CAACD,gBAAgB,EAAE;AAChC,MAAA,OAAO,oBAAoB;AAC7B,KAAC,MAAM;AACL,MAAA,OAAO,qBAAqB;AAC9B;AACF;AAGAE,EAAAA,gCAAgCA,GAAS;AACvC,IAAA,IAAI,CAACF,gBAAgB,GAAG,CAAC,IAAI,CAACA,gBAAgB;IAC9C,IAAI,CAACJ,IAAI,GAAG,IAAI,CAACI,gBAAgB,GAAG,UAAU,GAAG,MAAM;AACzD;AACF,CAAC,EAAAN,WAAA,GAAAS,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAAA,kBAAA,EAAA,CAzCEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAoB,IAAI;AAAA;AAAA,CAAAd,CAAAA,EAAAA,YAAA,GAAAQ,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,WAC/BC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAf,MAAA,CAAAgB,SAAA,EAmCPM,kCAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAAxB,MAAA,CAAAgB,SAAA,EAAA,kCAAA,CAAA,EAAAhB,MAAA,CAAAgB,SAAA,GAAAhB,MAAA;AArCiCyB,oBAAA,CAAAC,QAAA,EAArB3B,qBAAqB,CAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/text-input/types.js b/packages/components/dist/components/hds/form/text-input/types.js new file mode 100644 index 0000000000..a15fe991cd --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/types.js @@ -0,0 +1,22 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ + +let HdsFormTextInputTypeValues = /*#__PURE__*/function (HdsFormTextInputTypeValues) { + HdsFormTextInputTypeValues["Text"] = "text"; + HdsFormTextInputTypeValues["Email"] = "email"; + HdsFormTextInputTypeValues["Password"] = "password"; + HdsFormTextInputTypeValues["Url"] = "url"; + HdsFormTextInputTypeValues["Date"] = "date"; + HdsFormTextInputTypeValues["Time"] = "time"; + HdsFormTextInputTypeValues["DateTimeLocal"] = "datetime-local"; + HdsFormTextInputTypeValues["Search"] = "search"; + HdsFormTextInputTypeValues["Month"] = "month"; + HdsFormTextInputTypeValues["Week"] = "week"; + HdsFormTextInputTypeValues["Tel"] = "tel"; + return HdsFormTextInputTypeValues; +}({}); + +export { HdsFormTextInputTypeValues }; +//# sourceMappingURL=types.js.map diff --git a/packages/components/dist/components/hds/form/text-input/types.js.map b/packages/components/dist/components/hds/form/text-input/types.js.map new file mode 100644 index 0000000000..ba2f591aba --- /dev/null +++ b/packages/components/dist/components/hds/form/text-input/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sources":["../../../../../src/components/hds/form/text-input/types.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport enum HdsFormTextInputTypeValues {\n Text = 'text',\n Email = 'email',\n Password = 'password',\n Url = 'url',\n Date = 'date',\n Time = 'time',\n DateTimeLocal = 'datetime-local',\n Search = 'search',\n Month = 'month',\n Week = 'week',\n Tel = 'tel',\n}\n\nexport type HdsFormTextInputTypes = `${HdsFormTextInputTypeValues}`;\n"],"names":["HdsFormTextInputTypeValues"],"mappings":"AAAA;AACA;AACA;AACA;;AAEYA,IAAAA,0BAA0B,0BAA1BA,0BAA0B,EAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,OAAA,CAAA,GAAA,OAAA;EAA1BA,0BAA0B,CAAA,UAAA,CAAA,GAAA,UAAA;EAA1BA,0BAA0B,CAAA,KAAA,CAAA,GAAA,KAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,eAAA,CAAA,GAAA,gBAAA;EAA1BA,0BAA0B,CAAA,QAAA,CAAA,GAAA,QAAA;EAA1BA,0BAA0B,CAAA,OAAA,CAAA,GAAA,OAAA;EAA1BA,0BAA0B,CAAA,MAAA,CAAA,GAAA,MAAA;EAA1BA,0BAA0B,CAAA,KAAA,CAAA,GAAA,KAAA;AAAA,EAAA,OAA1BA,0BAA0B;AAAA,CAAA,CAAA,EAAA;;;;"} \ No newline at end of file diff --git a/packages/components/dist/components/hds/form/textarea/base.js b/packages/components/dist/components/hds/form/textarea/base.js new file mode 100644 index 0000000000..396b42534f --- /dev/null +++ b/packages/components/dist/components/hds/form/textarea/base.js @@ -0,0 +1,34 @@ +import Component from '@glimmer/component'; +import { precompileTemplate } from '@ember/template-compilation'; +import { setComponentTemplate } from '@ember/component'; + +var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{! Notice: this is not the native HTML