diff --git a/showcase/app/components/mock/components/form/super-select/generic-content.gts b/showcase/app/components/mock/components/form/super-select/generic-content.gts deleted file mode 100644 index ea6c61384f5..00000000000 --- a/showcase/app/components/mock/components/form/super-select/generic-content.gts +++ /dev/null @@ -1,27 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -import type { TemplateOnlyComponent } from '@ember/component/template-only'; -import StyleModifier from 'ember-style-modifier'; - -import ShwPlaceholder from 'showcase/components/shw/placeholder'; -import type { ShwPlaceholderSignature } from 'showcase/components/shw/placeholder'; - -export interface MockFormSuperSelectGenericContentSignature { - Element: ShwPlaceholderSignature['Element']; -} - -// This is not an HDS component, but a supporting file for `form/super-select.hbs` which requires a component to be passed in for the showcase -const MockFormSuperSelectGenericContent: TemplateOnlyComponent = - ; - -export default MockFormSuperSelectGenericContent; diff --git a/showcase/app/components/mock/components/form/super-select/selected-component-multiple.gts b/showcase/app/components/mock/components/form/super-select/selected-component-multiple.gts deleted file mode 100644 index 1572fd4d0e1..00000000000 --- a/showcase/app/components/mock/components/form/super-select/selected-component-multiple.gts +++ /dev/null @@ -1,26 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -import type { TemplateOnlyComponent } from '@ember/component/template-only'; - -export interface MockFormSuperSelectSelectedComponentMultipleSignature { - Args: { - option: { - size: string; - }; - }; - Element: HTMLSpanElement; -} - -// This is not an HDS component, but a supporting file for `form/super-select.hbs` which requires a component to be passed in for the showcase - -const MockFormSuperSelectSelectedComponentMultiple: TemplateOnlyComponent = - ; - -export default MockFormSuperSelectSelectedComponentMultiple; diff --git a/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-base-element.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-base-element.gts new file mode 100644 index 00000000000..09be8679270 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-base-element.gts @@ -0,0 +1,106 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { fn } from '@ember/helper'; +import { tracked } from '@glimmer/tracking'; +import type Owner from '@ember/owner'; + +import CodeFragmentWithOptionsGenericContent from 'showcase/components/page-components/form/super-select/code-fragments/with-options-generic-content'; + +import { HdsFormSuperSelectMultipleBase } from '@hashicorp/design-system-components/components'; + +import type { HdsFormSuperSelectMultipleBaseSignature } from '@hashicorp/design-system-components/components/hds/form/super-select/multiple/base'; + +const OPTIONS = ['Option 1', 'Option 2', 'Option 3']; + +const PLACES_OPTIONS = [ + 'Oregon (us-west-2)', + 'N. Virginia (us-east-1)', + 'ALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenString', + 'Ireland (eu-west-1)', + 'London(eu-west-2)', + 'Frankfurt (eu-central-1)', +]; + +export interface CodeFragmentWithMultipleBaseElementSignature { + Args: { + options?: 'basic' | 'places'; + isSelected?: boolean; + hasBeforeOptionsComponent?: boolean; + hasAfterOptionsComponent?: boolean; + hasResultCountMessage?: boolean; + placeholder?: HdsFormSuperSelectMultipleBaseSignature['Args']['placeholder']; + disabled?: HdsFormSuperSelectMultipleBaseSignature['Args']['disabled']; + isInvalid?: HdsFormSuperSelectMultipleBaseSignature['Args']['isInvalid']; + matchTriggerWidth?: HdsFormSuperSelectMultipleBaseSignature['Args']['matchTriggerWidth']; + initiallyOpened?: HdsFormSuperSelectMultipleBaseSignature['Args']['initiallyOpened']; + verticalPosition?: HdsFormSuperSelectMultipleBaseSignature['Args']['verticalPosition']; + horizontalPosition?: HdsFormSuperSelectMultipleBaseSignature['Args']['horizontalPosition']; + searchEnabled?: HdsFormSuperSelectMultipleBaseSignature['Args']['searchEnabled']; + dropdownMaxWidth?: HdsFormSuperSelectMultipleBaseSignature['Args']['dropdownMaxWidth']; + showAfterOptions?: HdsFormSuperSelectMultipleBaseSignature['Args']['showAfterOptions']; + afterOptionsContent?: HdsFormSuperSelectMultipleBaseSignature['Args']['afterOptionsContent']; + }; + Element: HdsFormSuperSelectMultipleBaseSignature['Element']; +} + +export default class CodeFragmentWithMultipleBaseElement extends Component { + @tracked selectedOptions; + + options = OPTIONS; + + constructor( + owner: Owner, + args: CodeFragmentWithMultipleBaseElementSignature['Args'], + ) { + super(owner, args); + if (args.isSelected) { + this.selectedOptions = + args.options === 'places' + ? [PLACES_OPTIONS[0], PLACES_OPTIONS[1]] + : [OPTIONS[0], OPTIONS[1]]; + } + if (args.options === 'places') { + this.options = PLACES_OPTIONS; + } + } + + get resultCountMessage() { + return `Custom result count: ${this.options.length} options`; + } + + +} diff --git a/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-field-element.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-field-element.gts new file mode 100644 index 00000000000..4337b7d8d5f --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-multiple-field-element.gts @@ -0,0 +1,176 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { fn, hash } from '@ember/helper'; +import { tracked } from '@glimmer/tracking'; +import { eq } from 'ember-truth-helpers'; +import type Owner from '@ember/owner'; + +import CodeFragmentWithSelectedComponent from 'showcase/components/page-components/form/super-select/code-fragments/with-selected-component'; + +import { HdsFormSuperSelectMultipleField } from '@hashicorp/design-system-components/components'; + +import type { HdsFormSuperSelectMultipleFieldSignature } from '@hashicorp/design-system-components/components/hds/form/super-select/multiple/field'; + +interface GroupedOption { + groupName: string; + options: (string | GroupedOption)[]; +} + +const OPTIONS = ['Option 1', 'Option 2', 'Option 3']; + +const CLUSTER_SIZE_OPTIONS = [ + { + size: 'Extra Small', + description: '2 vCPU | 1 GiB RAM', + price: '$0.02', + }, + { + size: 'Small', + description: '2 vCPU | 2 GiB RAM', + price: '$0.04', + disabled: true, + }, + { + size: 'Medium', + description: '4 vCPU | 4 GiB RAM', + price: '$0.08', + disabled: true, + }, + { size: 'Large', description: '8 vCPU | 8 GiB RAM', price: '$0.16' }, + { + size: 'Extra Large', + description: '16 vCPU | 16 GiB RAM', + price: '$0.32', + }, +]; + +const GROUPED_OPTIONS = [ + { groupName: 'Group', options: ['Option 1', 'Option 2'] }, + { groupName: 'Group', options: ['Option 3', 'Option 4'] }, + { + groupName: 'Group', + options: [ + { groupName: 'Subgroup', options: ['Option 5', 'Option 6'] }, + { groupName: 'Subgroup', options: ['Option 7', 'Option 8'] }, + ], + }, + { + groupName: 'Group', + options: [ + { groupName: 'Subgroup', options: ['Option 10', 'Option 11'] }, + { groupName: 'Subgroup', options: ['Option 12', 'Option 13'] }, + ], + }, +]; + +export interface CodeFragmentWithMultipleFieldElementSignature { + Args: { + options?: 'basic' | 'cluster-size' | 'grouped'; + isSelected?: boolean; + hasSelectedItemComponent?: boolean; + hasRichContent?: boolean; + isInvalid?: HdsFormSuperSelectMultipleFieldSignature['Args']['isInvalid']; + isRequired?: HdsFormSuperSelectMultipleFieldSignature['Args']['isRequired']; + isOptional?: HdsFormSuperSelectMultipleFieldSignature['Args']['isOptional']; + disabled?: HdsFormSuperSelectMultipleFieldSignature['Args']['disabled']; + initiallyOpened?: HdsFormSuperSelectMultipleFieldSignature['Args']['initiallyOpened']; + verticalPosition?: HdsFormSuperSelectMultipleFieldSignature['Args']['verticalPosition']; + horizontalPosition?: HdsFormSuperSelectMultipleFieldSignature['Args']['horizontalPosition']; + }; + Blocks: { + default: [ + { + Label?: HdsFormSuperSelectMultipleFieldSignature['Blocks']['default'][0]['Label']; + HelperText?: HdsFormSuperSelectMultipleFieldSignature['Blocks']['default'][0]['HelperText']; + Error?: HdsFormSuperSelectMultipleFieldSignature['Blocks']['default'][0]['Error']; + Options?: HdsFormSuperSelectMultipleFieldSignature['Blocks']['default'][0]['Options']; + options?: unknown; + }, + ]; + }; +} + +export default class CodeFragmentWithMultipleFieldElement extends Component { + @tracked selectedOptions; + + constructor( + owner: Owner, + args: CodeFragmentWithMultipleFieldElementSignature['Args'], + ) { + super(owner, args); + if (args.isSelected) { + if (args.options === 'grouped') { + this.selectedOptions = [ + (this.options as GroupedOption[])[0]?.options[0] as + | GroupedOption + | string, + (this.options as GroupedOption[])[1]?.options[0] as + | GroupedOption + | string, + ]; + } else { + this.selectedOptions = [this.options[0], this.options[1]]; + } + } + } + + get options() { + const { options } = this.args; + + if (options === 'cluster-size') { + return CLUSTER_SIZE_OPTIONS; + } else if (options === 'grouped') { + return GROUPED_OPTIONS; + } else { + return OPTIONS; + } + } + + +} diff --git a/showcase/app/components/page-components/form/super-select/code-fragments/with-options-generic-content.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-options-generic-content.gts new file mode 100644 index 00000000000..4302550afc8 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-options-generic-content.gts @@ -0,0 +1,19 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import style from 'ember-style-modifier'; + +import ShwPlaceholder from 'showcase/components/shw/placeholder'; + +const CodeFragmentWithOptionsGenericContent: TemplateOnlyComponent = ; + +export default CodeFragmentWithOptionsGenericContent; diff --git a/showcase/app/components/mock/components/form/super-select/selected-component-single.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-selected-component.gts similarity index 51% rename from showcase/app/components/mock/components/form/super-select/selected-component-single.gts rename to showcase/app/components/page-components/form/super-select/code-fragments/with-selected-component.gts index 8c55875d63b..04559d9f3d5 100644 --- a/showcase/app/components/mock/components/form/super-select/selected-component-single.gts +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-selected-component.gts @@ -2,12 +2,11 @@ * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ - import type { TemplateOnlyComponent } from '@ember/component/template-only'; import { HdsTextBody } from '@hashicorp/design-system-components/components'; -export interface MockFormSuperSelectSelectedComponentSingleSignature { +export interface CodeFragmentWithSelectedComponentSignature { Args: { option: { size: string; @@ -16,10 +15,9 @@ export interface MockFormSuperSelectSelectedComponentSingleSignature { Element: HTMLSpanElement; } -// This is not an HDS component, but a supporting file for `form/super-select.hbs` which requires a component to be passed in for the showcase -const MockFormSuperSelectSelectedComponentSingle: TemplateOnlyComponent = +const CodeFragmentWithSelectedComponent: TemplateOnlyComponent = ; -export default MockFormSuperSelectSelectedComponentSingle; +export default CodeFragmentWithSelectedComponent; diff --git a/showcase/app/components/page-components/form/super-select/code-fragments/with-single-base-element.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-single-base-element.gts new file mode 100644 index 00000000000..9f9159e1ac7 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-single-base-element.gts @@ -0,0 +1,104 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { fn } from '@ember/helper'; +import { tracked } from '@glimmer/tracking'; +import type Owner from '@ember/owner'; + +import CodeFragmentWithOptionsGenericContent from 'showcase/components/page-components/form/super-select/code-fragments/with-options-generic-content'; + +import { HdsFormSuperSelectSingleBase } from '@hashicorp/design-system-components/components'; + +import type { HdsFormSuperSelectSingleBaseSignature } from '@hashicorp/design-system-components/components/hds/form/super-select/single/base'; + +const OPTIONS = ['Option 1', 'Option 2', 'Option 3']; + +const PLACES_OPTIONS = [ + 'Oregon (us-west-2)', + 'N. Virginia (us-east-1)', + 'ALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenString', + 'Ireland (eu-west-1)', + 'London(eu-west-2)', + 'Frankfurt (eu-central-1)', +]; + +export interface CodeFragmentWithSingleBaseElementSignature { + Args: { + options?: 'basic' | 'places'; + isSelected?: boolean; + hasBeforeOptionsComponent?: boolean; + hasAfterOptionsComponent?: boolean; + hasResultCountMessage?: boolean; + placeholder?: HdsFormSuperSelectSingleBaseSignature['Args']['placeholder']; + disabled?: HdsFormSuperSelectSingleBaseSignature['Args']['disabled']; + isInvalid?: HdsFormSuperSelectSingleBaseSignature['Args']['isInvalid']; + matchTriggerWidth?: HdsFormSuperSelectSingleBaseSignature['Args']['matchTriggerWidth']; + initiallyOpened?: HdsFormSuperSelectSingleBaseSignature['Args']['initiallyOpened']; + verticalPosition?: HdsFormSuperSelectSingleBaseSignature['Args']['verticalPosition']; + horizontalPosition?: HdsFormSuperSelectSingleBaseSignature['Args']['horizontalPosition']; + searchEnabled?: HdsFormSuperSelectSingleBaseSignature['Args']['searchEnabled']; + dropdownMaxWidth?: HdsFormSuperSelectSingleBaseSignature['Args']['dropdownMaxWidth']; + showAfterOptions?: HdsFormSuperSelectSingleBaseSignature['Args']['showAfterOptions']; + afterOptionsContent?: HdsFormSuperSelectSingleBaseSignature['Args']['afterOptionsContent']; + }; + Element: HdsFormSuperSelectSingleBaseSignature['Element']; +} + +export default class CodeFragmentWithSingleBaseElement extends Component { + @tracked selectedOption; + + options = OPTIONS; + + constructor( + owner: Owner, + args: CodeFragmentWithSingleBaseElementSignature['Args'], + ) { + super(owner, args); + if (args.isSelected) { + this.selectedOption = + args.options === 'places' ? PLACES_OPTIONS[0] : OPTIONS[0]; + } + if (args.options === 'places') { + this.options = PLACES_OPTIONS; + } + } + + get resultCountMessage() { + return `Custom result count: ${this.options.length} options`; + } + + +} diff --git a/showcase/app/components/page-components/form/super-select/code-fragments/with-single-field-element.gts b/showcase/app/components/page-components/form/super-select/code-fragments/with-single-field-element.gts new file mode 100644 index 00000000000..3d933c2bbcc --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/code-fragments/with-single-field-element.gts @@ -0,0 +1,170 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import Component from '@glimmer/component'; +import { fn, hash } from '@ember/helper'; +import { tracked } from '@glimmer/tracking'; +import { eq } from 'ember-truth-helpers'; +import type Owner from '@ember/owner'; + +import CodeFragmentWithSelectedComponent from 'showcase/components/page-components/form/super-select/code-fragments/with-selected-component'; + +import { HdsFormSuperSelectSingleField } from '@hashicorp/design-system-components/components'; + +import type { HdsFormSuperSelectSingleFieldSignature } from '@hashicorp/design-system-components/components/hds/form/super-select/single/field'; + +interface GroupedOption { + groupName: string; + options: (string | GroupedOption)[]; +} + +const OPTIONS = ['Option 1', 'Option 2', 'Option 3']; + +const CLUSTER_SIZE_OPTIONS = [ + { + size: 'Extra Small', + description: '2 vCPU | 1 GiB RAM', + price: '$0.02', + }, + { + size: 'Small', + description: '2 vCPU | 2 GiB RAM', + price: '$0.04', + disabled: true, + }, + { + size: 'Medium', + description: '4 vCPU | 4 GiB RAM', + price: '$0.08', + disabled: true, + }, + { size: 'Large', description: '8 vCPU | 8 GiB RAM', price: '$0.16' }, + { + size: 'Extra Large', + description: '16 vCPU | 16 GiB RAM', + price: '$0.32', + }, +]; + +const GROUPED_OPTIONS = [ + { groupName: 'Group', options: ['Option 1', 'Option 2'] }, + { groupName: 'Group', options: ['Option 3', 'Option 4'] }, + { + groupName: 'Group', + options: [ + { groupName: 'Subgroup', options: ['Option 5', 'Option 6'] }, + { groupName: 'Subgroup', options: ['Option 7', 'Option 8'] }, + ], + }, + { + groupName: 'Group', + options: [ + { groupName: 'Subgroup', options: ['Option 10', 'Option 11'] }, + { groupName: 'Subgroup', options: ['Option 12', 'Option 13'] }, + ], + }, +]; + +export interface CodeFragmentWithSingleFieldElementSignature { + Args: { + options?: 'basic' | 'cluster-size' | 'grouped'; + isSelected?: boolean; + hasSelectedItemComponent?: boolean; + hasRichContent?: boolean; + isInvalid?: HdsFormSuperSelectSingleFieldSignature['Args']['isInvalid']; + isRequired?: HdsFormSuperSelectSingleFieldSignature['Args']['isRequired']; + isOptional?: HdsFormSuperSelectSingleFieldSignature['Args']['isOptional']; + disabled?: HdsFormSuperSelectSingleFieldSignature['Args']['disabled']; + initiallyOpened?: HdsFormSuperSelectSingleFieldSignature['Args']['initiallyOpened']; + verticalPosition?: HdsFormSuperSelectSingleFieldSignature['Args']['verticalPosition']; + horizontalPosition?: HdsFormSuperSelectSingleFieldSignature['Args']['horizontalPosition']; + }; + Blocks: { + default: [ + { + Label?: HdsFormSuperSelectSingleFieldSignature['Blocks']['default'][0]['Label']; + HelperText?: HdsFormSuperSelectSingleFieldSignature['Blocks']['default'][0]['HelperText']; + Error?: HdsFormSuperSelectSingleFieldSignature['Blocks']['default'][0]['Error']; + Options?: HdsFormSuperSelectSingleFieldSignature['Blocks']['default'][0]['Options']; + options?: unknown; + }, + ]; + }; +} + +export default class CodeFragmentWithSingleFieldElement extends Component { + @tracked selectedOption; + + constructor( + owner: Owner, + args: CodeFragmentWithSingleFieldElementSignature['Args'], + ) { + super(owner, args); + if (args.isSelected) { + if (args.options === 'grouped') { + this.selectedOption = (this.options as GroupedOption[])[0] + ?.options[0] as string | GroupedOption; + } else { + this.selectedOption = this.options[0]; + } + } + } + + get options() { + const { options } = this.args; + + if (options === 'cluster-size') { + return CLUSTER_SIZE_OPTIONS; + } else if (options === 'grouped') { + return GROUPED_OPTIONS; + } else { + return OPTIONS; + } + } + + +} diff --git a/showcase/app/components/page-components/form/super-select/index.gts b/showcase/app/components/page-components/form/super-select/index.gts new file mode 100644 index 00000000000..b7c59eef204 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/index.gts @@ -0,0 +1,38 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import { pageTitle } from 'ember-page-title'; + +import ShwTextH1 from 'showcase/components/shw/text/h1'; + +import BasicDropdownWormhole from 'ember-basic-dropdown/components/basic-dropdown-wormhole'; + +import SubSectionAfterOptions from 'showcase/components/page-components/form/super-select/sub-sections/after-options'; +import SubSectionBaseElements from 'showcase/components/page-components/form/super-select/sub-sections/base-elements'; +import SubSectionMultipleBaseElement from 'showcase/components/page-components/form/super-select/sub-sections/multiple-base-element'; +import SubSectionMultipleFieldElement from 'showcase/components/page-components/form/super-select/sub-sections/multiple-field-element'; +import SubSectionOptionGroup from 'showcase/components/page-components/form/super-select/sub-sections/option-group'; +import SubSectionSingleBaseElement from 'showcase/components/page-components/form/super-select/sub-sections/single-base-element'; +import SubSectionSingleFieldElement from 'showcase/components/page-components/form/super-select/sub-sections/single-field-element'; + +const FormSuperSelectIndex: TemplateOnlyComponent = ; + +export default FormSuperSelectIndex; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/after-options.gts b/showcase/app/components/page-components/form/super-select/sub-sections/after-options.gts new file mode 100644 index 00000000000..768802b854c --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/after-options.gts @@ -0,0 +1,192 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import style from 'ember-style-modifier'; +import { hash } from '@ember/helper'; + +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwTextH4 from 'showcase/components/shw/text/h4'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwOutliner from 'showcase/components/shw/outliner'; +import NOOP from 'showcase/utils/noop'; + +import { + HdsFormSuperSelectAfterOptions, + HdsFormSuperSelectOptionGroup, +} from '@hashicorp/design-system-components/components'; + +const SubSectionAfterOptions: TemplateOnlyComponent = ; + +export default SubSectionAfterOptions; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/base-elements.gts b/showcase/app/components/page-components/form/super-select/sub-sections/base-elements.gts new file mode 100644 index 00000000000..3e42fe19bc3 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/base-elements.gts @@ -0,0 +1,266 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import { capitalize } from '@ember/string'; +import style from 'ember-style-modifier'; + +import ShwTextH2 from 'showcase/components/shw/text/h2'; +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwTextH4 from 'showcase/components/shw/text/h4'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwDivider from 'showcase/components/shw/divider'; +import ShwOutliner from 'showcase/components/shw/outliner'; + +const STATES = ['default', 'hover', 'focus']; +const OPTIONS_STATES = ['default', 'hover', 'active']; + +const SubSectionBaseElements: TemplateOnlyComponent = ; + +export default SubSectionBaseElements; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/multiple-base-element.gts b/showcase/app/components/page-components/form/super-select/sub-sections/multiple-base-element.gts new file mode 100644 index 00000000000..b558e8aa03f --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/multiple-base-element.gts @@ -0,0 +1,263 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import style from 'ember-style-modifier'; +import { capitalize } from '@ember/string'; +import { eq, and } from 'ember-truth-helpers'; + +import ShwTextH2 from 'showcase/components/shw/text/h2'; +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwTextH4 from 'showcase/components/shw/text/h4'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwGrid from 'showcase/components/shw/grid'; +import ShwDivider from 'showcase/components/shw/divider'; + +import CodeFragmentWithMultipleBaseElement from 'showcase/components/page-components/form/super-select/code-fragments/with-multiple-base-element'; + +const STATES = ['default', 'hover', 'focus']; +const VARIANTS = ['base', 'invalid', 'disabled']; + +const SubSectionMultipleBaseElement: TemplateOnlyComponent = ; + +export default SubSectionMultipleBaseElement; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/multiple-field-element.gts b/showcase/app/components/page-components/form/super-select/sub-sections/multiple-field-element.gts new file mode 100644 index 00000000000..15126dfb2b8 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/multiple-field-element.gts @@ -0,0 +1,198 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import style from 'ember-style-modifier'; + +import ShwTextH2 from 'showcase/components/shw/text/h2'; +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwGrid from 'showcase/components/shw/grid'; +import ShwDivider from 'showcase/components/shw/divider'; + +import CodeFragmentWithMultipleFieldElement from 'showcase/components/page-components/form/super-select/code-fragments/with-multiple-field-element'; + +import { + HdsLayoutFlex, + HdsLinkInline, +} from '@hashicorp/design-system-components/components'; + +const SubSectionMultipleFieldElement: TemplateOnlyComponent = ; + +export default SubSectionMultipleFieldElement; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/option-group.gts b/showcase/app/components/page-components/form/super-select/sub-sections/option-group.gts new file mode 100644 index 00000000000..01d84507310 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/option-group.gts @@ -0,0 +1,153 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import { capitalize } from '@ember/string'; +import style from 'ember-style-modifier'; +import { hash } from '@ember/helper'; + +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwDivider from 'showcase/components/shw/divider'; +import ShwPlaceholder from 'showcase/components/shw/placeholder'; + +import { HdsFormSuperSelectOptionGroup } from '@hashicorp/design-system-components/components'; + +const VARIANTS = ['single', 'multiple']; + +const SubSectionOptionGroup: TemplateOnlyComponent = ; + +export default SubSectionOptionGroup; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/single-base-element.gts b/showcase/app/components/page-components/form/super-select/sub-sections/single-base-element.gts new file mode 100644 index 00000000000..d28495dc6b3 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/single-base-element.gts @@ -0,0 +1,264 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import { capitalize } from '@ember/string'; +import style from 'ember-style-modifier'; +import { eq, and } from 'ember-truth-helpers'; + +import ShwTextH2 from 'showcase/components/shw/text/h2'; +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwTextH4 from 'showcase/components/shw/text/h4'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwGrid from 'showcase/components/shw/grid'; +import ShwDivider from 'showcase/components/shw/divider'; + +import CodeFragmentWithSingleBaseElement from 'showcase/components/page-components/form/super-select/code-fragments/with-single-base-element'; + +const STATES = ['default', 'hover', 'focus']; +const VARIANTS = ['base', 'invalid', 'disabled']; + +const SubSectionSingleBaseElement: TemplateOnlyComponent = ; + +export default SubSectionSingleBaseElement; diff --git a/showcase/app/components/page-components/form/super-select/sub-sections/single-field-element.gts b/showcase/app/components/page-components/form/super-select/sub-sections/single-field-element.gts new file mode 100644 index 00000000000..a5d1f6e9442 --- /dev/null +++ b/showcase/app/components/page-components/form/super-select/sub-sections/single-field-element.gts @@ -0,0 +1,199 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; +import style from 'ember-style-modifier'; + +import ShwTextH2 from 'showcase/components/shw/text/h2'; +import ShwTextH3 from 'showcase/components/shw/text/h3'; +import ShwFlex from 'showcase/components/shw/flex'; +import ShwGrid from 'showcase/components/shw/grid'; +import ShwDivider from 'showcase/components/shw/divider'; + +import CodeFragmentWithSingleFieldElement from 'showcase/components/page-components/form/super-select/code-fragments/with-single-field-element'; + +import { + HdsLayoutFlex, + HdsLinkInline, +} from '@hashicorp/design-system-components/components'; + +const SubSectionSingleFieldElement: TemplateOnlyComponent = ; + +export default SubSectionSingleFieldElement; diff --git a/showcase/app/controllers/page-components/form/super-select.ts b/showcase/app/controllers/page-components/form/super-select.ts deleted file mode 100644 index 5dbcc9094d9..00000000000 --- a/showcase/app/controllers/page-components/form/super-select.ts +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -import Controller from '@ember/controller'; -import { action } from '@ember/object'; - -import type { PageComponentsFormSuperSelectModel } from 'showcase/routes/page-components/form/super-select'; - -export default class PageComponentsFormSuperSelectController extends Controller { - declare model: PageComponentsFormSuperSelectModel; - - @action - resultCountMessage(resultCount: number) { - return `${resultCount} total`; - } - - @action - noop() {} -} diff --git a/showcase/app/routes/page-components/form/super-select.ts b/showcase/app/routes/page-components/form/super-select.ts index 7afbeac8ffc..ec4a6844db7 100644 --- a/showcase/app/routes/page-components/form/super-select.ts +++ b/showcase/app/routes/page-components/form/super-select.ts @@ -10,104 +10,4 @@ import type { ModelFrom } from 'showcase/utils/ModelFromRoute'; export type PageComponentsFormSuperSelectModel = ModelFrom; -export default class PageComponentsFormSuperSelectRoute extends Route { - model() { - // these are used only for presentation purpose in the showcase - const STATES = ['default', 'hover', 'focus']; - - // Options data - const OPTIONS = ['Option 1', 'Option 2', 'Option 3']; - const SELECTED_OPTION = OPTIONS[0]; - const SELECTED_OPTIONS = [OPTIONS[0], OPTIONS[1]]; - const SELECTED_OPTIONS_SINGLE = [OPTIONS[0]]; - - const GROUPED_OPTIONS = [ - { groupName: 'Group', options: ['Option 1', 'Option 2'] }, - { groupName: 'Group', options: ['Option 3', 'Option 4'] }, - { - groupName: 'Group', - options: [ - { groupName: 'Subgroup', options: ['Option 5', 'Option 6'] }, - { groupName: 'Subgroup', options: ['Option 7', 'Option 8'] }, - ], - }, - { - groupName: 'Group', - options: [ - { groupName: 'Subgroup', options: ['Option 10', 'Option 11'] }, - { groupName: 'Subgroup', options: ['Option 12', 'Option 13'] }, - ], - }, - ]; - const SELECTED_GROUPED_OPTION = GROUPED_OPTIONS[0]?.options[0]; - const SELECTED_GROUPED_OPTIONS = [ - GROUPED_OPTIONS[0]?.options[0], - GROUPED_OPTIONS[1]?.options[0], - ]; - - const PLACES_OPTIONS = [ - 'Oregon (us-west-2)', - 'N. Virginia (us-east-1)', - 'ALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenStringALongUnbrokenString', - 'Ireland (eu-west-1)', - 'London(eu-west-2)', - 'Frankfurt (eu-central-1)', - ]; - const SELECTED_PLACES_OPTION = PLACES_OPTIONS[0]; - const SELECTED_PLACES_OPTIONS = [ - PLACES_OPTIONS[0], - PLACES_OPTIONS[1], - PLACES_OPTIONS[3], - ]; - const SELECTED_PLACES_OPTIONS_SINGLE = [PLACES_OPTIONS[0]]; - - const CLUSTER_SIZE_OPTIONS = [ - { - size: 'Extra Small', - description: '2 vCPU | 1 GiB RAM', - price: '$0.02', - }, - { - size: 'Small', - description: '2 vCPU | 2 GiB RAM', - price: '$0.04', - disabled: true, - }, - { - size: 'Medium', - description: '4 vCPU | 4 GiB RAM', - price: '$0.08', - disabled: true, - }, - { size: 'Large', description: '8 vCPU | 8 GiB RAM', price: '$0.16' }, - { - size: 'Extra Large', - description: '16 vCPU | 16 GiB RAM', - price: '$0.32', - }, - ]; - const SELECTED_CLUSTER_SIZE_OPTION = CLUSTER_SIZE_OPTIONS[1]; - const SELECTED_CLUSTER_SIZE_OPTIONS = [ - CLUSTER_SIZE_OPTIONS[1], - CLUSTER_SIZE_OPTIONS[3], - ]; - - return { - STATES, - OPTIONS, - SELECTED_OPTION, - SELECTED_OPTIONS, - SELECTED_OPTIONS_SINGLE, - GROUPED_OPTIONS, - SELECTED_GROUPED_OPTION, - SELECTED_GROUPED_OPTIONS, - SELECTED_PLACES_OPTIONS_SINGLE, - PLACES_OPTIONS, - SELECTED_PLACES_OPTION, - SELECTED_PLACES_OPTIONS, - CLUSTER_SIZE_OPTIONS, - SELECTED_CLUSTER_SIZE_OPTION, - SELECTED_CLUSTER_SIZE_OPTIONS, - }; - } -} +export default class PageComponentsFormSuperSelectRoute extends Route {} diff --git a/showcase/app/styles/app.scss b/showcase/app/styles/app.scss index fb06fee50bd..4df2b448959 100644 --- a/showcase/app/styles/app.scss +++ b/showcase/app/styles/app.scss @@ -58,7 +58,6 @@ @use "./showcase-pages/form/masked-input.scss" as showcase-masked-input; @use "./showcase-pages/form/radio" as showcase-radio; @use "./showcase-pages/form/select" as showcase-select; -@use "./showcase-pages/form/super-select" as showcase-super-select; @use "./showcase-pages/form/text-input" as showcase-text-input; @use "./showcase-pages/form/textarea" as showcase-textarea; @use "./showcase-pages/form/toggle" as showcase-toggle; diff --git a/showcase/app/styles/showcase-pages/form/super-select.scss b/showcase/app/styles/showcase-pages/form/super-select.scss deleted file mode 100644 index 7910ae4e66e..00000000000 --- a/showcase/app/styles/showcase-pages/form/super-select.scss +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) HashiCorp, Inc. - * SPDX-License-Identifier: MPL-2.0 - */ - -// FORM > SUPER_SELECT - -body.page-components-form-super-select { - .shw-component-form-super-select-option-rich-header { - display: flex; - justify-content: space-between; - } -} diff --git a/showcase/app/templates/page-components/form/super-select.gts b/showcase/app/templates/page-components/form/super-select.gts new file mode 100644 index 00000000000..0fa848bb348 --- /dev/null +++ b/showcase/app/templates/page-components/form/super-select.gts @@ -0,0 +1,13 @@ +/** + * Copyright (c) HashiCorp, Inc. + * SPDX-License-Identifier: MPL-2.0 + */ +import type { TemplateOnlyComponent } from '@ember/component/template-only'; + +import FormSuperSelectIndex from 'showcase/components/page-components/form/super-select'; + +const PageComponentsFormSuperSelect: TemplateOnlyComponent = ; + +export default PageComponentsFormSuperSelect; diff --git a/showcase/app/templates/page-components/form/super-select.hbs b/showcase/app/templates/page-components/form/super-select.hbs deleted file mode 100644 index 29cc71c1db7..00000000000 --- a/showcase/app/templates/page-components/form/super-select.hbs +++ /dev/null @@ -1,1578 +0,0 @@ -{{! - Copyright (c) HashiCorp, Inc. - SPDX-License-Identifier: MPL-2.0 -}} - -{{page-title "Form::SuperSelect Components"}} - - - -Form::SuperSelect - -
- Form::SuperSelect::Single::Base - - Interaction status - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - States - - - {{#let (array "base" "invalid" "disabled") as |variants|}} - {{#each @model.STATES as |state|}} - - - {{#each variants as |variant|}} - {{#let (and (eq variant "disabled") (eq state "focus")) as |dontDisplay|}} - {{#unless dontDisplay}} - - - {{option}} - - - {{/unless}} - {{/let}} - {{/each}} - - - {{/each}} - {{/let}} - - - - - List - - - - - {{option}} - - - - - {{option}} - - - - - List position - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - List width - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - Before & after options - - - - - {{option}} - - - {{! left empty on purpose }} - - - - - - - {{option}} - - - - - {{option}} - - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - Custom result count message - - - - - {{option}} - - - - - - - Form::SuperSelect::Single::Field - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - This is the helper text - with a link - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - This is the error - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - This is the error - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - First error message - Second error message - - - - - - - - Required and optional - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - - - States - - - - - Lorem ipsum dolor - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - - - Complex content - - - - - Label - - {{#let F.options as |option|}} -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.size}} - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.price}}/hr -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} -
{{option.description}}
- {{/let}} -
-
-
- - - Label - - {{#let F.options as |option|}} -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.size}} - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.price}}/hr -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} -
{{option.description}}
- {{/let}} -
-
-
- - - Label - - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - -
- - - - Form::SuperSelect::Multiple::Base - - Interaction status - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - States - - - {{#let (array "base" "invalid" "disabled") as |variants|}} - {{#each @model.STATES as |state|}} - - - {{#each variants as |variant|}} - {{#let (and (eq variant "disabled") (eq state "focus")) as |dontDisplay|}} - {{#unless dontDisplay}} - - - {{option}} - - - {{/unless}} - {{/let}} - {{/each}} - - - {{/each}} - {{/let}} - - - - - List - - - - - {{option}} - - - - - - {{option}} - - - - - List position - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - List width - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - - - Before & after options - - - - - {{option}} - - - {{! left empty on purpose }} - - - - - - - {{option}} - - - - - {{option}} - - - - - - - - {{option}} - - - - - {{option}} - - - - - {{option}} - - - - - Custom result count message - - - - - {{option}} - - - - - - - Form::SuperSelect::Multiple::Field - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - This is the helper text - with a link - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - This is the label - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - This is the error - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - This is the error - - - - - This is the label - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - First error message - Second error message - - - - - - - - Required and optional - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - Lorem ipsum dolor - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - - - States - - - - - Lorem ipsum dolor - This is the helper text - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - - - - - Complex content - - - - - Label - - {{#let F.options as |option|}} -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.size}} - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.price}}/hr -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} -
{{option.description}}
- {{/let}} -
-
-
- - - Label - - {{#let F.options as |option|}} -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.size}} - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{option.price}}/hr -
- {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} -
{{option.description}}
- {{/let}} -
-
-
- - - Label - - {{! @glint-expect-error - https://hashicorp.atlassian.net/browse/HDS-5090 }} - {{F.options}} - - - -
- - - - Base elements - - Trigger - - - {{#each @model.STATES as |state|}} - -
-
-
- - Option - - -
-
-
-
- {{/each}} -
- - - - Dropdown - - Search input - - - {{#each @model.STATES as |state|}} - -
-
- - - -
-
-
- {{/each}} -
- - Options (single selection) - - - -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} -
  • - {{/each}} - {{/let}} -
  • - disabled -
  • -
-
-
-
-
- -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} -
  • - {{/each}} - {{/let}} -
  • - disabled -
  • -
-
-
-
-
- -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} - - this is a long text that should wrap on multiple lines -
  • - {{/each}} - {{/let}} -
-
-
-
-
-
- - Options (multiple selection) - - - -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} -
  • - {{/each}} - {{/let}} -
  • - disabled -
  • -
-
-
-
-
- -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} -
  • - {{/each}} - {{/let}} -
  • - disabled -
  • -
-
-
-
-
- -
-
-
-
    - {{! there is no focused state for the `select-option` }} - {{#let (array "default" "hover" "active") as |states|}} - {{#each states as |state|}} -
  • - {{state}} - - this is a long text that should wrap on multiple lines -
  • - {{/each}} - {{/let}} -
-
-
-
-
-
- - - - Form::SuperSelect::OptionGroup - - {{#let (array "single" "multiple") as |variants|}} - {{#each variants as |variant|}} - - -
-
-
-
    - - - - - - {{! template-lint-disable require-context-role }} -
  • - Option 1 -
  • -
  • - Option 2 -
  • -
    -
-
-
-
-
- -
-
-
-
    - - {{! template-lint-disable require-context-role }} -
  • - Level 1 - Option 1A -
  • - - {{! template-lint-disable require-context-role }} -
  • - Level 2 - Option 2A -
  • -
  • - Level 2 - Option 2B -
  • - - {{! template-lint-disable require-context-role }} -
  • - Level 3 - Option 3A -
  • -
  • - Level 3 - Option 3B -
  • -
    -
    - - - -
  • - Level 1 - Option 1B -
  • -
    -
-
-
-
-
-
- {{/each}} - {{/let}} - - - - Form::SuperSelect::AfterOptions - - Content - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Within a dropdown with options - - - -
-
-
-
    - - {{! template-lint-disable require-context-role }} -
  • - Option 1 -
  • -
  • - Option 2 -
  • -
    -
- -
-
-
-
-
-
\ No newline at end of file diff --git a/showcase/types/template-registry.ts b/showcase/types/template-registry.ts index 0f3840300ab..33350d69ba7 100644 --- a/showcase/types/template-registry.ts +++ b/showcase/types/template-registry.ts @@ -35,10 +35,6 @@ import MockAppFooterAppFooter from '../app/components/mock/app/footer/app-footer import MockDemoBreakpointsRuler from '../app/components/mock/demo/breakpoints-ruler'; import MockDemoBreakpointsVisualization from '../app/components/mock/demo/breakpoints-visualization'; -import MockFormSuperSelectGenericContent from '../app/components/mock/components/form/super-select/generic-content'; -import MockFormSuperSelectSelectedComponentSingle from '../app/components/mock/components/form/super-select/selected-component-single'; -import MockFormSuperSelectSelectedComponentMultiple from '../app/components/mock/components/form/super-select/selected-component-multiple'; - export default interface ShowcaseTemplateRegistry { // SHW COMPONENTS 'Shw::Autoscrollable': typeof ShwAutoscrollable; @@ -102,12 +98,4 @@ export default interface ShowcaseTemplateRegistry { 'mock/demo/breakpoints-visualizaton': typeof MockDemoBreakpointsVisualization; 'Mock::Demo::BreakpointsRuler': typeof MockDemoBreakpointsRuler; 'mock/demo/breakpoints-ruler': typeof MockDemoBreakpointsRuler; - - // MOCK COMPONENTS - 'Mock::Form::SuperSelect::GenericContent': typeof MockFormSuperSelectGenericContent; - 'mock/components/form/super-select/generic-content': typeof MockFormSuperSelectGenericContent; - 'Mock::Form::SuperSelect::SelectedComponentSingle': typeof MockFormSuperSelectSelectedComponentSingle; - 'mock/components/form/super-select/selected-component-single': typeof MockFormSuperSelectSelectedComponentSingle; - 'Mock::Form::SuperSelect::SelectedComponentMultiple': typeof MockFormSuperSelectSelectedComponentMultiple; - 'mock/components/form/super-select/selected-component-multiple': typeof MockFormSuperSelectSelectedComponentMultiple; }