@hashicorp/design-system-components 4.6.0 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/addon-main.cjs +16 -1
- package/declarations/components/hds/app-footer/status-link.d.ts +1 -1
- package/declarations/components/hds/badge/index.d.ts +2 -2
- package/declarations/components/hds/badge/index.d.ts.map +1 -1
- package/declarations/components/hds/button/index.d.ts +1 -1
- package/declarations/components/hds/button/index.d.ts.map +1 -1
- package/declarations/components/hds/dialog-primitive/body.d.ts +17 -0
- package/declarations/components/hds/dialog-primitive/body.d.ts.map +1 -0
- package/declarations/components/hds/dialog-primitive/description.d.ts +17 -0
- package/declarations/components/hds/dialog-primitive/description.d.ts.map +1 -0
- package/declarations/components/hds/dialog-primitive/footer.d.ts +22 -0
- package/declarations/components/hds/dialog-primitive/footer.d.ts.map +1 -0
- package/declarations/components/hds/dialog-primitive/header.d.ts +28 -0
- package/declarations/components/hds/dialog-primitive/header.d.ts.map +1 -0
- package/declarations/components/hds/dialog-primitive/overlay.d.ts +14 -0
- package/declarations/components/hds/dialog-primitive/overlay.d.ts.map +1 -0
- package/declarations/components/hds/dialog-primitive/wrapper.d.ts +16 -0
- package/declarations/components/hds/dialog-primitive/wrapper.d.ts.map +1 -0
- package/declarations/components/hds/dropdown/list-item/checkbox.d.ts +1 -1
- package/declarations/components/hds/dropdown/list-item/checkbox.d.ts.map +1 -1
- package/declarations/components/hds/dropdown/list-item/radio.d.ts +1 -1
- package/declarations/components/hds/dropdown/list-item/radio.d.ts.map +1 -1
- package/declarations/components/hds/flyout/body.d.ts +14 -1
- package/declarations/components/hds/flyout/body.d.ts.map +1 -1
- package/declarations/components/hds/flyout/description.d.ts +15 -0
- package/declarations/components/hds/flyout/description.d.ts.map +1 -1
- package/declarations/components/hds/flyout/footer.d.ts +19 -0
- package/declarations/components/hds/flyout/footer.d.ts.map +1 -1
- package/declarations/components/hds/flyout/header.d.ts +21 -1
- package/declarations/components/hds/flyout/header.d.ts.map +1 -1
- package/declarations/components/hds/flyout/index.d.ts +42 -12
- package/declarations/components/hds/flyout/index.d.ts.map +1 -1
- package/declarations/components/hds/flyout/types.d.ts +6 -0
- package/declarations/components/hds/flyout/types.d.ts.map +1 -0
- package/declarations/components/hds/form/character-count/index.d.ts +37 -10
- package/declarations/components/hds/form/character-count/index.d.ts.map +1 -1
- package/declarations/components/hds/form/checkbox/base.d.ts +13 -1
- package/declarations/components/hds/form/checkbox/base.d.ts.map +1 -1
- package/declarations/components/hds/form/checkbox/field.d.ts +28 -1
- package/declarations/components/hds/form/checkbox/field.d.ts.map +1 -1
- package/declarations/components/hds/form/checkbox/group.d.ts +29 -1
- package/declarations/components/hds/form/checkbox/group.d.ts.map +1 -1
- package/declarations/components/hds/form/error/index.d.ts +27 -6
- package/declarations/components/hds/form/error/index.d.ts.map +1 -1
- package/declarations/components/hds/form/error/message.d.ts +14 -1
- package/declarations/components/hds/form/error/message.d.ts.map +1 -1
- package/declarations/components/hds/form/field/index.d.ts +50 -15
- package/declarations/components/hds/form/field/index.d.ts.map +1 -1
- package/declarations/components/hds/form/field/types.d.ts +10 -0
- package/declarations/components/hds/form/field/types.d.ts.map +1 -0
- package/declarations/components/hds/form/fieldset/index.d.ts +43 -14
- package/declarations/components/hds/form/fieldset/index.d.ts.map +1 -1
- package/declarations/components/hds/form/fieldset/types.d.ts +10 -0
- package/declarations/components/hds/form/fieldset/types.d.ts.map +1 -0
- package/declarations/components/hds/form/file-input/base.d.ts +10 -1
- package/declarations/components/hds/form/file-input/base.d.ts.map +1 -1
- package/declarations/components/hds/form/file-input/field.d.ts +25 -1
- package/declarations/components/hds/form/file-input/field.d.ts.map +1 -1
- package/declarations/components/hds/form/helper-text/index.d.ts +20 -5
- package/declarations/components/hds/form/helper-text/index.d.ts.map +1 -1
- package/declarations/components/hds/form/indicator/index.d.ts +15 -3
- package/declarations/components/hds/form/indicator/index.d.ts.map +1 -1
- package/declarations/components/hds/form/label/index.d.ts +20 -4
- package/declarations/components/hds/form/label/index.d.ts.map +1 -1
- package/declarations/components/hds/form/legend/index.d.ts +18 -3
- package/declarations/components/hds/form/legend/index.d.ts.map +1 -1
- package/declarations/components/hds/form/masked-input/base.d.ts +26 -5
- package/declarations/components/hds/form/masked-input/base.d.ts.map +1 -1
- package/declarations/components/hds/form/masked-input/field.d.ts +28 -1
- package/declarations/components/hds/form/masked-input/field.d.ts.map +1 -1
- package/declarations/components/hds/form/radio/base.d.ts +13 -1
- package/declarations/components/hds/form/radio/base.d.ts.map +1 -1
- package/declarations/components/hds/form/radio/field.d.ts +28 -1
- package/declarations/components/hds/form/radio/field.d.ts.map +1 -1
- package/declarations/components/hds/form/radio/group.d.ts +29 -1
- package/declarations/components/hds/form/radio/group.d.ts.map +1 -1
- package/declarations/components/hds/form/radio-card/description.d.ts +14 -1
- package/declarations/components/hds/form/radio-card/description.d.ts.map +1 -1
- package/declarations/components/hds/form/radio-card/group.d.ts +32 -1
- package/declarations/components/hds/form/radio-card/group.d.ts.map +1 -1
- package/declarations/components/hds/form/radio-card/index.d.ts +45 -9
- package/declarations/components/hds/form/radio-card/index.d.ts.map +1 -1
- package/declarations/components/hds/form/radio-card/label.d.ts +14 -1
- package/declarations/components/hds/form/radio-card/label.d.ts.map +1 -1
- package/declarations/components/hds/form/radio-card/types.d.ts +15 -0
- package/declarations/components/hds/form/radio-card/types.d.ts.map +1 -0
- package/declarations/components/hds/form/select/base.d.ts +22 -3
- package/declarations/components/hds/form/select/base.d.ts.map +1 -1
- package/declarations/components/hds/form/select/field.d.ts +28 -1
- package/declarations/components/hds/form/select/field.d.ts.map +1 -1
- package/declarations/components/hds/form/text-input/base.d.ts +22 -6
- package/declarations/components/hds/form/text-input/base.d.ts.map +1 -1
- package/declarations/components/hds/form/text-input/field.d.ts +36 -7
- package/declarations/components/hds/form/text-input/field.d.ts.map +1 -1
- package/declarations/components/hds/form/text-input/types.d.ts +19 -0
- package/declarations/components/hds/form/text-input/types.d.ts.map +1 -0
- package/declarations/components/hds/form/textarea/base.d.ts +15 -3
- package/declarations/components/hds/form/textarea/base.d.ts.map +1 -1
- package/declarations/components/hds/form/textarea/field.d.ts +28 -1
- package/declarations/components/hds/form/textarea/field.d.ts.map +1 -1
- package/declarations/components/hds/form/toggle/base.d.ts +13 -1
- package/declarations/components/hds/form/toggle/base.d.ts.map +1 -1
- package/declarations/components/hds/form/toggle/field.d.ts +27 -1
- package/declarations/components/hds/form/toggle/field.d.ts.map +1 -1
- package/declarations/components/hds/form/toggle/group.d.ts +29 -1
- package/declarations/components/hds/form/toggle/group.d.ts.map +1 -1
- package/declarations/components/hds/form/visibility-toggle/index.d.ts +15 -1
- package/declarations/components/hds/form/visibility-toggle/index.d.ts.map +1 -1
- package/declarations/components/hds/modal/body.d.ts +14 -1
- package/declarations/components/hds/modal/body.d.ts.map +1 -1
- package/declarations/components/hds/modal/footer.d.ts +19 -1
- package/declarations/components/hds/modal/footer.d.ts.map +1 -1
- package/declarations/components/hds/modal/header.d.ts +21 -1
- package/declarations/components/hds/modal/header.d.ts.map +1 -1
- package/declarations/components/hds/modal/index.d.ts +44 -15
- package/declarations/components/hds/modal/index.d.ts.map +1 -1
- package/declarations/components/hds/modal/types.d.ts +17 -0
- package/declarations/components/hds/modal/types.d.ts.map +1 -0
- package/declarations/components/hds/stepper/task/indicator.d.ts +1 -1
- package/declarations/components/hds/stepper/task/indicator.d.ts.map +1 -1
- package/declarations/components.d.ts +57 -1
- package/declarations/components.d.ts.map +1 -1
- package/declarations/instance-initializers/load-sprite.d.ts +13 -0
- package/declarations/instance-initializers/load-sprite.d.ts.map +1 -0
- package/declarations/modifiers/hds-clipboard.d.ts +2 -2
- package/declarations/modifiers/hds-clipboard.d.ts.map +1 -1
- package/declarations/template-registry.d.ts +144 -0
- package/declarations/template-registry.d.ts.map +1 -1
- package/declarations/utils/hds-aria-described-by.d.ts +6 -8
- package/declarations/utils/hds-aria-described-by.d.ts.map +1 -1
- package/declarations/utils/hds-get-element-id.d.ts +5 -1
- package/declarations/utils/hds-get-element-id.d.ts.map +1 -1
- package/dist/_app_/components/hds/dialog-primitive/body.js +1 -0
- package/dist/_app_/components/hds/dialog-primitive/description.js +1 -0
- package/dist/_app_/components/hds/dialog-primitive/footer.js +1 -0
- package/dist/_app_/components/hds/dialog-primitive/header.js +1 -0
- package/dist/_app_/components/hds/dialog-primitive/overlay.js +1 -0
- package/dist/_app_/components/hds/dialog-primitive/wrapper.js +1 -0
- package/dist/components/hds/alert/description.js +2 -2
- package/dist/components/hds/alert/description.js.map +1 -1
- package/dist/components/hds/alert/title.js +2 -2
- package/dist/components/hds/alert/title.js.map +1 -1
- package/dist/components/hds/application-state/body.js +2 -2
- package/dist/components/hds/application-state/body.js.map +1 -1
- package/dist/components/hds/application-state/header.js +2 -2
- package/dist/components/hds/application-state/header.js.map +1 -1
- package/dist/components/hds/application-state/index.js +2 -2
- package/dist/components/hds/application-state/index.js.map +1 -1
- package/dist/components/hds/badge/index.js.map +1 -1
- package/dist/components/hds/button-set/index.js +2 -2
- package/dist/components/hds/button-set/index.js.map +1 -1
- package/dist/components/hds/code-block/copy-button.js +2 -2
- package/dist/components/hds/code-block/copy-button.js.map +1 -1
- package/dist/components/hds/code-block/description.js +2 -2
- package/dist/components/hds/code-block/description.js.map +1 -1
- package/dist/components/hds/code-block/title.js +2 -2
- package/dist/components/hds/code-block/title.js.map +1 -1
- package/dist/components/hds/dialog-primitive/body.js +16 -0
- package/dist/components/hds/dialog-primitive/body.js.map +1 -0
- package/dist/components/hds/dialog-primitive/description.js +16 -0
- package/dist/components/hds/dialog-primitive/description.js.map +1 -0
- package/dist/components/hds/dialog-primitive/footer.js +16 -0
- package/dist/components/hds/dialog-primitive/footer.js.map +1 -0
- package/dist/components/hds/dialog-primitive/header.js +37 -0
- package/dist/components/hds/dialog-primitive/header.js.map +1 -0
- package/dist/components/hds/dialog-primitive/overlay.js +16 -0
- package/dist/components/hds/dialog-primitive/overlay.js.map +1 -0
- package/dist/components/hds/dialog-primitive/wrapper.js +16 -0
- package/dist/components/hds/dialog-primitive/wrapper.js.map +1 -0
- package/dist/components/hds/dropdown/footer.js +2 -2
- package/dist/components/hds/dropdown/footer.js.map +1 -1
- package/dist/components/hds/dropdown/header.js +2 -2
- package/dist/components/hds/dropdown/header.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/checkbox.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/generic.js +2 -2
- package/dist/components/hds/dropdown/list-item/generic.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/radio.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/separator.js +2 -2
- package/dist/components/hds/dropdown/list-item/separator.js.map +1 -1
- package/dist/components/hds/dropdown/toggle/chevron.js +2 -2
- package/dist/components/hds/dropdown/toggle/chevron.js.map +1 -1
- package/dist/components/hds/flyout/body.js +24 -4
- package/dist/components/hds/flyout/body.js.map +1 -1
- package/dist/components/hds/flyout/description.js +24 -4
- package/dist/components/hds/flyout/description.js.map +1 -1
- package/dist/components/hds/flyout/footer.js +24 -4
- package/dist/components/hds/flyout/footer.js.map +1 -1
- package/dist/components/hds/flyout/header.js +24 -4
- package/dist/components/hds/flyout/header.js.map +1 -1
- package/dist/components/hds/flyout/index.js +19 -11
- package/dist/components/hds/flyout/index.js.map +1 -1
- package/dist/components/hds/flyout/types.js +8 -0
- package/dist/components/hds/flyout/types.js.map +1 -0
- package/dist/components/hds/form/character-count/index.js +27 -22
- package/dist/components/hds/form/character-count/index.js.map +1 -1
- package/dist/components/hds/form/checkbox/base.js +9 -3
- package/dist/components/hds/form/checkbox/base.js.map +1 -1
- package/dist/components/hds/form/checkbox/field.js +9 -3
- package/dist/components/hds/form/checkbox/field.js.map +1 -1
- package/dist/components/hds/form/checkbox/group.js +9 -3
- package/dist/components/hds/form/checkbox/group.js.map +1 -1
- package/dist/components/hds/form/error/index.js +10 -8
- package/dist/components/hds/form/error/index.js.map +1 -1
- package/dist/components/hds/form/error/message.js +9 -3
- package/dist/components/hds/form/error/message.js.map +1 -1
- package/dist/components/hds/form/field/index.js +34 -29
- package/dist/components/hds/form/field/index.js.map +1 -1
- package/dist/components/hds/form/field/types.js +13 -0
- package/dist/components/hds/form/field/types.js.map +1 -0
- package/dist/components/hds/form/fieldset/index.js +29 -25
- package/dist/components/hds/form/fieldset/index.js.map +1 -1
- package/dist/components/hds/form/fieldset/types.js +13 -0
- package/dist/components/hds/form/fieldset/types.js.map +1 -0
- package/dist/components/hds/form/file-input/base.js +9 -3
- package/dist/components/hds/form/file-input/base.js.map +1 -1
- package/dist/components/hds/form/file-input/field.js +9 -3
- package/dist/components/hds/form/file-input/field.js.map +1 -1
- package/dist/components/hds/form/helper-text/index.js +8 -7
- package/dist/components/hds/form/helper-text/index.js.map +1 -1
- package/dist/components/hds/form/indicator/index.js +5 -5
- package/dist/components/hds/form/indicator/index.js.map +1 -1
- package/dist/components/hds/form/label/index.js +6 -6
- package/dist/components/hds/form/label/index.js.map +1 -1
- package/dist/components/hds/form/legend/index.js +5 -5
- package/dist/components/hds/form/legend/index.js.map +1 -1
- package/dist/components/hds/form/masked-input/base.js +2 -2
- package/dist/components/hds/form/masked-input/base.js.map +1 -1
- package/dist/components/hds/form/masked-input/field.js +9 -3
- package/dist/components/hds/form/masked-input/field.js.map +1 -1
- package/dist/components/hds/form/radio/base.js +9 -3
- package/dist/components/hds/form/radio/base.js.map +1 -1
- package/dist/components/hds/form/radio/field.js +9 -3
- package/dist/components/hds/form/radio/field.js.map +1 -1
- package/dist/components/hds/form/radio/group.js +9 -3
- package/dist/components/hds/form/radio/group.js.map +1 -1
- package/dist/components/hds/form/radio-card/description.js +9 -3
- package/dist/components/hds/form/radio-card/description.js.map +1 -1
- package/dist/components/hds/form/radio-card/group.js +9 -3
- package/dist/components/hds/form/radio-card/group.js.map +1 -1
- package/dist/components/hds/form/radio-card/index.js +12 -11
- package/dist/components/hds/form/radio-card/index.js.map +1 -1
- package/dist/components/hds/form/radio-card/label.js +9 -3
- package/dist/components/hds/form/radio-card/label.js.map +1 -1
- package/dist/components/hds/form/radio-card/types.js +18 -0
- package/dist/components/hds/form/radio-card/types.js.map +1 -0
- package/dist/components/hds/form/select/base.js +2 -2
- package/dist/components/hds/form/select/base.js.map +1 -1
- package/dist/components/hds/form/select/field.js +9 -3
- package/dist/components/hds/form/select/field.js.map +1 -1
- package/dist/components/hds/form/super-select/after-options.js +2 -2
- package/dist/components/hds/form/super-select/after-options.js.map +1 -1
- package/dist/components/hds/form/super-select/multiple/field.js.map +1 -1
- package/dist/components/hds/form/super-select/placeholder.js +2 -2
- package/dist/components/hds/form/super-select/placeholder.js.map +1 -1
- package/dist/components/hds/form/super-select/single/field.js.map +1 -1
- package/dist/components/hds/form/text-input/base.js +8 -5
- package/dist/components/hds/form/text-input/base.js.map +1 -1
- package/dist/components/hds/form/text-input/field.js +2 -1
- package/dist/components/hds/form/text-input/field.js.map +1 -1
- package/dist/components/hds/form/text-input/types.js +22 -0
- package/dist/components/hds/form/text-input/types.js.map +1 -0
- package/dist/components/hds/form/textarea/base.js +2 -2
- package/dist/components/hds/form/textarea/base.js.map +1 -1
- package/dist/components/hds/form/textarea/field.js +9 -3
- package/dist/components/hds/form/textarea/field.js.map +1 -1
- package/dist/components/hds/form/toggle/base.js +9 -3
- package/dist/components/hds/form/toggle/base.js.map +1 -1
- package/dist/components/hds/form/toggle/field.js +9 -3
- package/dist/components/hds/form/toggle/field.js.map +1 -1
- package/dist/components/hds/form/toggle/group.js +9 -3
- package/dist/components/hds/form/toggle/group.js.map +1 -1
- package/dist/components/hds/form/visibility-toggle/index.js +9 -3
- package/dist/components/hds/form/visibility-toggle/index.js.map +1 -1
- package/dist/components/hds/modal/body.js +24 -4
- package/dist/components/hds/modal/body.js.map +1 -1
- package/dist/components/hds/modal/footer.js +24 -4
- package/dist/components/hds/modal/footer.js.map +1 -1
- package/dist/components/hds/modal/header.js +24 -4
- package/dist/components/hds/modal/header.js.map +1 -1
- package/dist/components/hds/modal/index.js +21 -14
- package/dist/components/hds/modal/index.js.map +1 -1
- package/dist/components/hds/modal/types.js +20 -0
- package/dist/components/hds/modal/types.js.map +1 -0
- package/dist/components/hds/page-header/actions.js +2 -2
- package/dist/components/hds/page-header/actions.js.map +1 -1
- package/dist/components/hds/page-header/badges.js +2 -2
- package/dist/components/hds/page-header/badges.js.map +1 -1
- package/dist/components/hds/page-header/description.js +2 -2
- package/dist/components/hds/page-header/description.js.map +1 -1
- package/dist/components/hds/page-header/index.js +2 -2
- package/dist/components/hds/page-header/index.js.map +1 -1
- package/dist/components/hds/page-header/subtitle.js +2 -2
- package/dist/components/hds/page-header/subtitle.js.map +1 -1
- package/dist/components/hds/page-header/title.js +2 -2
- package/dist/components/hds/page-header/title.js.map +1 -1
- package/dist/components/hds/pagination/nav/ellipsis.js +2 -2
- package/dist/components/hds/pagination/nav/ellipsis.js.map +1 -1
- package/dist/components/hds/rich-tooltip/index.js.map +1 -1
- package/dist/components/hds/segmented-group/index.js +2 -2
- package/dist/components/hds/segmented-group/index.js.map +1 -1
- package/dist/components/hds/side-nav/base.js +2 -2
- package/dist/components/hds/side-nav/base.js.map +1 -1
- package/dist/components/hds/side-nav/header/index.js +2 -2
- package/dist/components/hds/side-nav/header/index.js.map +1 -1
- package/dist/components/hds/side-nav/list/back-link.js +2 -2
- package/dist/components/hds/side-nav/list/back-link.js.map +1 -1
- package/dist/components/hds/side-nav/list/index.js +2 -2
- package/dist/components/hds/side-nav/list/index.js.map +1 -1
- package/dist/components/hds/side-nav/list/item.js +2 -2
- package/dist/components/hds/side-nav/list/item.js.map +1 -1
- package/dist/components/hds/side-nav/list/link.js +2 -2
- package/dist/components/hds/side-nav/list/link.js.map +1 -1
- package/dist/components/hds/side-nav/list/title.js +2 -2
- package/dist/components/hds/side-nav/list/title.js.map +1 -1
- package/dist/components/hds/side-nav/toggle-button.js +2 -2
- package/dist/components/hds/side-nav/toggle-button.js.map +1 -1
- package/dist/components/hds/toast/index.js +2 -2
- package/dist/components/hds/toast/index.js.map +1 -1
- package/dist/components/hds/yield/index.js +2 -2
- package/dist/components/hds/yield/index.js.map +1 -1
- package/dist/components.js +56 -0
- package/dist/components.js.map +1 -1
- package/dist/instance-initializers/load-sprite.js +33 -0
- package/dist/instance-initializers/load-sprite.js.map +1 -0
- package/dist/modifiers/hds-clipboard.js.map +1 -1
- package/dist/styles/@hashicorp/design-system-components.css +118 -148
- package/dist/styles/@hashicorp/design-system-components.scss +1 -0
- package/dist/styles/components/dialog-primitive.scss +143 -0
- package/dist/styles/components/flyout.scss +8 -70
- package/dist/styles/components/form/text-input.scss +6 -2
- package/dist/styles/components/modal.scss +18 -84
- package/dist/utils/hds-aria-described-by.js +1 -0
- package/dist/utils/hds-aria-described-by.js.map +1 -1
- package/dist/utils/hds-get-element-id.js +2 -0
- package/dist/utils/hds-get-element-id.js.map +1 -1
- package/package.json +9 -2
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<label class={{this.classNames}} for={{@controlId}} id={{this.id}} ...attributes>\n {{yield}}\n <Hds::Form::Indicator @isRequired={{@isRequired}} @isOptional={{@isOptional}} />\n</label>");
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -10,14 +10,14 @@ var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
const ID_PREFIX = 'label-';
|
|
13
|
-
class
|
|
13
|
+
class HdsFormLabelComponent extends Component {
|
|
14
14
|
/**
|
|
15
15
|
* Determines the unique ID to assign to the element
|
|
16
16
|
* @method id
|
|
17
17
|
* @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided
|
|
18
18
|
*/
|
|
19
19
|
get id() {
|
|
20
|
-
|
|
20
|
+
const {
|
|
21
21
|
controlId
|
|
22
22
|
} = this.args;
|
|
23
23
|
if (controlId) {
|
|
@@ -32,7 +32,7 @@ class HdsFormLabelIndexComponent extends Component {
|
|
|
32
32
|
* @return {string} The "class" attribute to apply to the component.
|
|
33
33
|
*/
|
|
34
34
|
get classNames() {
|
|
35
|
-
|
|
35
|
+
const classes = ['hds-form-label'];
|
|
36
36
|
|
|
37
37
|
// add typographic classes
|
|
38
38
|
classes.push('hds-typography-body-200', 'hds-font-weight-semibold');
|
|
@@ -46,7 +46,7 @@ class HdsFormLabelIndexComponent extends Component {
|
|
|
46
46
|
return classes.join(' ');
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
setComponentTemplate(TEMPLATE,
|
|
49
|
+
setComponentTemplate(TEMPLATE, HdsFormLabelComponent);
|
|
50
50
|
|
|
51
|
-
export { ID_PREFIX,
|
|
51
|
+
export { ID_PREFIX, HdsFormLabelComponent as default };
|
|
52
52
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/label/index.hbs","../../../../../src/components/hds/form/label/index.
|
|
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<label class={{this.classNames}} for={{@controlId}} id={{this.id}} ...attributes>\\n {{yield}}\\n <Hds::Form::Indicator @isRequired={{@isRequired}} @isOptional={{@isOptional}} />\\n</label>\")","/**\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 HdsFormLabelComponent extends Component<HdsFormLabelSignature> {\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","HdsFormLabelComponent","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,SAAQ;AAiBlB,MAAMC,qBAAqB,SAASC,SAAS,CAAwB;AAClF;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAkB;IACtB,MAAM;AAAEC,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACC,IAAI,CAAA;AAC/B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGJ,EAAAA,SAAS,CAAGI,EAAAA,SAAS,CAAE,CAAA,CAAA;AACnC,KAAA;AACA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAElC;AACAA,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,CAAA;;AAEnE;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,eAAe,EAAE;MAC7BF,OAAO,CAACC,IAAI,CAAC,IAAI,CAACH,IAAI,CAACI,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOF,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlCoBX,qBAAqB,CAAA;;;;"}
|
|
@@ -2,21 +2,21 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<legend class={{this.classNames}} ...attributes>\n {{yield}}\n <Hds::Form::Indicator @isRequired={{@isRequired}} @isOptional={{@isOptional}} />\n</legend>");
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) HashiCorp, Inc.
|
|
9
9
|
* SPDX-License-Identifier: MPL-2.0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
class
|
|
12
|
+
class HdsFormLegendComponent extends Component {
|
|
13
13
|
/**
|
|
14
14
|
* Get the class names to apply to the component.
|
|
15
15
|
* @method classNames
|
|
16
16
|
* @return {string} The "class" attribute to apply to the component.
|
|
17
17
|
*/
|
|
18
18
|
get classNames() {
|
|
19
|
-
|
|
19
|
+
const classes = ['hds-form-legend'];
|
|
20
20
|
|
|
21
21
|
// add typographic classes
|
|
22
22
|
classes.push('hds-typography-body-200', 'hds-font-weight-semibold');
|
|
@@ -30,7 +30,7 @@ class HdsFormLegendIndexComponent extends Component {
|
|
|
30
30
|
return classes.join(' ');
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
|
-
setComponentTemplate(TEMPLATE,
|
|
33
|
+
setComponentTemplate(TEMPLATE, HdsFormLegendComponent);
|
|
34
34
|
|
|
35
|
-
export {
|
|
35
|
+
export { HdsFormLegendComponent as default };
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/legend/index.hbs","../../../../../src/components/hds/form/legend/index.
|
|
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<legend class={{this.classNames}} ...attributes>\\n {{yield}}\\n <Hds::Form::Indicator @isRequired={{@isRequired}} @isOptional={{@isOptional}} />\\n</legend>\")","/**\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 HdsFormLegendComponent extends Component<HdsFormLegendSignature> {\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":["HdsFormLegendComponent","Component","classNames","classes","push","args","contextualClass","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,4OAA4O;;ACD9Q;AACA;AACA;AACA;;AAkBe,MAAMA,sBAAsB,SAASC,SAAS,CAAyB;AACpF;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,iBAAiB,CAAC,CAAA;;AAEnC;AACAA,IAAAA,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,CAAA;;AAEnE;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,eAAe,EAAE;MAC7BH,OAAO,CAACC,IAAI,CAAC,IAAI,CAACC,IAAI,CAACC,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EArBoBT,sBAAsB,CAAA;;;;"}
|
|
@@ -6,7 +6,7 @@ import { getElementId } from '../../../../utils/hds-get-element-id.js';
|
|
|
6
6
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
7
|
import { setComponentTemplate } from '@ember/component';
|
|
8
8
|
|
|
9
|
-
var TEMPLATE = precompileTemplate("{{
|
|
9
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} {{style width=@width}}>\n {{#if @isMultiline}}\n <Hds::Form::Textarea::Base\n class=\"hds-form-masked-input__control\"\n @value={{@value}}\n @isInvalid={{@isInvalid}}\n @height={{@height}}\n id={{this.id}}\n ...attributes\n />\n {{else}}\n <Hds::Form::TextInput::Base\n class=\"hds-form-masked-input__control\"\n @value={{@value}}\n @isInvalid={{@isInvalid}}\n id={{this.id}}\n ...attributes\n />\n {{/if}}\n <Hds::Form::VisibilityToggle\n @isVisible={{this.isContentMasked}}\n @ariaLabel={{this.visibilityToggleAriaLabel}}\n @ariaMessageText={{this.visibilityToggleAriaMessageText}}\n aria-controls={{this.id}}\n class=\"hds-form-masked-input__toggle-button\"\n {{on \"click\" this.onClickToggleMasking}}\n />\n {{#if @hasCopyButton}}\n <Hds::Copy::Button\n class=\"hds-form-masked-input__copy-button\"\n @text={{this.copyButtonText}}\n @isIconOnly={{true}}\n @targetToCopy=\"#{{this.id}}\"\n />\n {{/if}}\n</div>");
|
|
10
10
|
|
|
11
11
|
var _class, _descriptor;
|
|
12
12
|
let HdsFormMaskedInputBaseComponent = (_class = class HdsFormMaskedInputBaseComponent extends Component {
|
|
@@ -74,7 +74,7 @@ let HdsFormMaskedInputBaseComponent = (_class = class HdsFormMaskedInputBaseComp
|
|
|
74
74
|
* @return {string} The "class" attribute to apply to the component.
|
|
75
75
|
*/
|
|
76
76
|
get classNames() {
|
|
77
|
-
|
|
77
|
+
const classes = ['hds-form-masked-input'];
|
|
78
78
|
if (this.isContentMasked) {
|
|
79
79
|
classes.push(`hds-form-masked-input--is-masked`);
|
|
80
80
|
} else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/masked-input/base.hbs","../../../../../src/components/hds/form/masked-input/base.
|
|
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<div class={{this.classNames}} {{style width=@width}}>\\n {{#if @isMultiline}}\\n <Hds::Form::Textarea::Base\\n class=\\\"hds-form-masked-input__control\\\"\\n @value={{@value}}\\n @isInvalid={{@isInvalid}}\\n @height={{@height}}\\n id={{this.id}}\\n ...attributes\\n />\\n {{else}}\\n <Hds::Form::TextInput::Base\\n class=\\\"hds-form-masked-input__control\\\"\\n @value={{@value}}\\n @isInvalid={{@isInvalid}}\\n id={{this.id}}\\n ...attributes\\n />\\n {{/if}}\\n <Hds::Form::VisibilityToggle\\n @isVisible={{this.isContentMasked}}\\n @ariaLabel={{this.visibilityToggleAriaLabel}}\\n @ariaMessageText={{this.visibilityToggleAriaMessageText}}\\n aria-controls={{this.id}}\\n class=\\\"hds-form-masked-input__toggle-button\\\"\\n {{on \\\"click\\\" this.onClickToggleMasking}}\\n />\\n {{#if @hasCopyButton}}\\n <Hds::Copy::Button\\n class=\\\"hds-form-masked-input__copy-button\\\"\\n @text={{this.copyButtonText}}\\n @isIconOnly={{true}}\\n @targetToCopy=\\\"#{{this.id}}\\\"\\n />\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { getElementId } from '../../../../utils/hds-get-element-id.ts';\nimport type { HdsCopyButtonSignature } from '../../copy/button/index.ts';\nimport type { HdsFormVisibilityToggleSignature } from '../visibility-toggle/index.ts';\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 HdsFormMaskedInputBaseComponent extends Component<HdsFormMaskedInputBaseSignature> {\n @tracked isContentMasked = this.args.isContentMasked ?? true;\n\n @action\n onClickToggleMasking(): void {\n this.isContentMasked = !this.isContentMasked;\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 ariaLabel\n * @type {string}\n * @default 'Show masked content'\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 /**\n * @param ariaMessageText\n * @type {string}\n * @default 'Input content is now hidden'\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 /**\n * @param copyButtonText\n * @type {string}\n * @default 'Copy masked content'\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 /**\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-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":["HdsFormMaskedInputBaseComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","onClickToggleMasking","isContentMasked","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,+BAA+B,IAAAC,MAAA,GAArC,MAAMD,+BAA+B,SAASE,SAAS,CAAkC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,0BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAItGC,EAAAA,oBAAoBA,GAAS;AAC3B,IAAA,IAAI,CAACC,eAAe,GAAG,CAAC,IAAI,CAACA,eAAe,CAAA;AAC9C,GAAA;;AAEA;AACF;AACA;EACE,IAAIC,EAAEA,GAAW;IACf,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,yBAAyBA,GAAW;AACtC,IAAA,IAAI,IAAI,CAACP,IAAI,CAACO,yBAAyB,EAAE;AACvC,MAAA,OAAO,IAAI,CAACP,IAAI,CAACO,yBAAyB,CAAA;AAC5C,KAAC,MAAM,IAAI,IAAI,CAACH,eAAe,EAAE;AAC/B,MAAA,OAAO,qBAAqB,CAAA;AAC9B,KAAC,MAAM;AACL,MAAA,OAAO,qBAAqB,CAAA;AAC9B,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAII,+BAA+BA,GAAW;AAC5C,IAAA,IAAI,IAAI,CAACR,IAAI,CAACQ,+BAA+B,EAAE;AAC7C,MAAA,OAAO,IAAI,CAACR,IAAI,CAACQ,+BAA+B,CAAA;AAClD,KAAC,MAAM,IAAI,IAAI,CAACJ,eAAe,EAAE;AAC/B,MAAA,OAAO,yBAAyB,CAAA;AAClC,KAAC,MAAM;AACL,MAAA,OAAO,0BAA0B,CAAA;AACnC,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIK,cAAcA,GAAW;AAC3B,IAAA,IAAI,IAAI,CAACT,IAAI,CAACS,cAAc,EAAE;AAC5B,MAAA,OAAO,IAAI,CAACT,IAAI,CAACS,cAAc,CAAA;AACjC,KAAC,MAAM;AACL,MAAA,OAAO,qBAAqB,CAAA;AAC9B,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,uBAAuB,CAAC,CAAA;IAEzC,IAAI,IAAI,CAACP,eAAe,EAAE;AACxBO,MAAAA,OAAO,CAACC,IAAI,CAAC,CAAA,gCAAA,CAAkC,CAAC,CAAA;AAClD,KAAC,MAAM;AACLD,MAAAA,OAAO,CAACC,IAAI,CAAC,CAAA,oCAAA,CAAsC,CAAC,CAAA;AACtD,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAC,GAAAX,WAAA,GAAAY,yBAAA,CAAAjB,MAAA,CAAAkB,SAAA,EAAA,iBAAA,EAAA,CAzEEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAmB,IAAI,CAACpB,IAAI,CAACI,eAAe,IAAI,IAAI,CAAA;AAAA,GAAA;AAAA,CAAAU,CAAAA,EAAAA,yBAAA,CAAAjB,MAAA,CAAAkB,SAAA,EAE3DM,sBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAA1B,MAAA,CAAAkB,SAAA,EAAA,sBAAA,CAAA,EAAAlB,MAAA,CAAAkB,SAAA,IAAAlB,MAAA,EAAA;AAH2C2B,oBAAA,CAAAC,QAAA,EAA/B7B,+BAA+B,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Form::Field\n @layout=\"vertical\"\n @extraAriaDescribedBy={{@extraAriaDescribedBy}}\n @isRequired={{@isRequired}}\n @isOptional={{@isOptional}}\n @id={{@id}}\n as |F|\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 <F.Control>\n <Hds::Form::MaskedInput::Base\n @hasCopyButton={{@hasCopyButton}}\n @isMultiline={{@isMultiline}}\n @isContentMasked={{@isContentMasked}}\n @visibilityToggleAriaLabel={{@visibilityToggleAriaLabel}}\n @visibilityToggleAriaMessageText={{@visibilityToggleAriaMessageText}}\n @value={{@value}}\n @isInvalid={{@isInvalid}}\n @width={{@width}}\n @height={{@height}}\n @id={{F.id}}\n required={{@isRequired}}\n ...attributes\n aria-describedby={{F.ariaDescribedBy}}\n />\n </F.Control>\n</Hds::Form::Field>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormMaskedInputFieldComponent = templateOnlyComponent();
|
|
13
|
+
var field = setComponentTemplate(TEMPLATE, HdsFormMaskedInputFieldComponent);
|
|
8
14
|
|
|
9
15
|
export { field as default };
|
|
10
16
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/masked-input/field.hbs","../../../../../src/components/hds/form/masked-input/field.
|
|
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<Hds::Form::Field\\n @layout=\\\"vertical\\\"\\n @extraAriaDescribedBy={{@extraAriaDescribedBy}}\\n @isRequired={{@isRequired}}\\n @isOptional={{@isOptional}}\\n @id={{@id}}\\n as |F|\\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 <F.Control>\\n <Hds::Form::MaskedInput::Base\\n @hasCopyButton={{@hasCopyButton}}\\n @isMultiline={{@isMultiline}}\\n @isContentMasked={{@isContentMasked}}\\n @visibilityToggleAriaLabel={{@visibilityToggleAriaLabel}}\\n @visibilityToggleAriaMessageText={{@visibilityToggleAriaMessageText}}\\n @value={{@value}}\\n @isInvalid={{@isInvalid}}\\n @width={{@width}}\\n @height={{@height}}\\n @id={{F.id}}\\n required={{@isRequired}}\\n ...attributes\\n aria-describedby={{F.ariaDescribedBy}}\\n />\\n </F.Control>\\n</Hds::Form::Field>\")","/**\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\ninterface HdsFormMaskedInputFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'> &\n HdsFormMaskedInputBaseSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n CharacterCount?: WithBoundArgs<\n typeof HdsFormCharacterCountComponent,\n 'value'\n >;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormMaskedInputFieldComponent =\n templateOnlyComponent<HdsFormMaskedInputFieldSignature>();\n\nexport default HdsFormMaskedInputFieldComponent;\n"],"names":["HdsFormMaskedInputFieldComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ipCAAipC;;ACDnrC;AACA;AACA;AACA;;AA8BA,MAAMA,gCAAgC,GACpCC,qBAAqB,EAAoC,CAAA;AAE3D,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,gCAAgC,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<input type=\"radio\" class=\"hds-form-radio\" ...attributes value={{@value}} />");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioBaseComponent = templateOnlyComponent();
|
|
13
|
+
var base = setComponentTemplate(TEMPLATE, HdsFormRadioBaseComponent);
|
|
8
14
|
|
|
9
15
|
export { base as default };
|
|
10
16
|
//# sourceMappingURL=base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/radio/base.hbs","../../../../../src/components/hds/form/radio/base.
|
|
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<input type=\\\"radio\\\" class=\\\"hds-form-radio\\\" ...attributes value={{@value}} />\")","/**\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 HdsFormRadioBaseComponent =\n templateOnlyComponent<HdsFormRadioBaseSignature>();\n\nexport default HdsFormRadioBaseComponent;\n"],"names":["HdsFormRadioBaseComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gKAAgK;;ACDlM;AACA;AACA;AACA;;AAWA,MAAMA,yBAAyB,GAC7BC,qBAAqB,EAA6B,CAAA;AAEpD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,yBAAyB,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Form::Field\n @layout=\"flag\"\n @contextualClass={{@contextualClass}}\n @extraAriaDescribedBy={{@extraAriaDescribedBy}}\n @id={{@id}}\n as |F|\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 <F.Control>\n <Hds::Form::Radio::Base\n @value={{@value}}\n name={{@name}}\n required={{@isRequired}}\n ...attributes\n id={{F.id}}\n aria-describedby={{F.ariaDescribedBy}}\n />\n </F.Control>\n</Hds::Form::Field>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioFieldComponent = templateOnlyComponent();
|
|
13
|
+
var field = setComponentTemplate(TEMPLATE, HdsFormRadioFieldComponent);
|
|
8
14
|
|
|
9
15
|
export { field as default };
|
|
10
16
|
//# sourceMappingURL=field.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/radio/field.hbs","../../../../../src/components/hds/form/radio/field.
|
|
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<Hds::Form::Field\\n @layout=\\\"flag\\\"\\n @contextualClass={{@contextualClass}}\\n @extraAriaDescribedBy={{@extraAriaDescribedBy}}\\n @id={{@id}}\\n as |F|\\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 <F.Control>\\n <Hds::Form::Radio::Base\\n @value={{@value}}\\n name={{@name}}\\n required={{@isRequired}}\\n ...attributes\\n id={{F.id}}\\n aria-describedby={{F.ariaDescribedBy}}\\n />\\n </F.Control>\\n</Hds::Form::Field>\")","/**\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<HdsFormFieldSignature['Args'], 'isOptional'> & {\n value?: string;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormRadioFieldComponent =\n templateOnlyComponent<HdsFormRadioFieldSignature>();\n\nexport default HdsFormRadioFieldComponent;\n"],"names":["HdsFormRadioFieldComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,srBAAsrB;;ACDxtB;AACA;AACA;AACA;;AA0BA,MAAMA,0BAA0B,GAC9BC,qBAAqB,EAA8B,CAAA;AAErD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,0BAA0B,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Form::Fieldset @layout={{@layout}} @isRequired={{@isRequired}} @isOptional={{@isOptional}} ...attributes as |F|>\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 <F.Control>\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 </F.Control>\n</Hds::Form::Fieldset>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioGroupComponent = templateOnlyComponent();
|
|
13
|
+
var group = setComponentTemplate(TEMPLATE, HdsFormRadioGroupComponent);
|
|
8
14
|
|
|
9
15
|
export { group as default };
|
|
10
16
|
//# sourceMappingURL=group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio/group.hbs","../../../../../src/components/hds/form/radio/group.
|
|
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<Hds::Form::Fieldset @layout={{@layout}} @isRequired={{@isRequired}} @isOptional={{@isOptional}} ...attributes as |F|>\\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 <F.Control>\\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 </F.Control>\\n</Hds::Form::Fieldset>\")","/**\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\ninterface HdsFormRadioGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike<HdsFormLegendSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n RadioField?: ComponentLike<HdsFormRadioFieldSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormRadioGroupComponent =\n templateOnlyComponent<HdsFormRadioGroupSignature>();\n\nexport default HdsFormRadioGroupComponent;\n"],"names":["HdsFormRadioGroupComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6uBAA6uB;;ACD/wB;AACA;AACA;AACA;;AA2BA,MAAMA,0BAA0B,GAC9BC,qBAAqB,EAA8B,CAAA;AAErD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,0BAA0B,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Text::Body\n class=\"hds-form-radio-card__description\"\n @tag=\"span\"\n @size=\"100\"\n ...attributes\n>{{yield}}</Hds::Text::Body>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioCardDescriptionComponent = templateOnlyComponent();
|
|
13
|
+
var description = setComponentTemplate(TEMPLATE, HdsFormRadioCardDescriptionComponent);
|
|
8
14
|
|
|
9
15
|
export { description as default };
|
|
10
16
|
//# sourceMappingURL=description.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"description.js","sources":["../../../../../src/components/hds/form/radio-card/description.hbs","../../../../../src/components/hds/form/radio-card/description.
|
|
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<Hds::Text::Body\\n class=\\\"hds-form-radio-card__description\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n ...attributes\\n>{{yield}}</Hds::Text::Body>\")","/**\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 HdsFormRadioCardDescriptionComponent =\n templateOnlyComponent<HdsFormRadioCardDescriptionSignature>();\n\nexport default HdsFormRadioCardDescriptionComponent;\n"],"names":["HdsFormRadioCardDescriptionComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+NAA+N;;ACDjQ;AACA;AACA;AACA;;AAYA,MAAMA,oCAAoC,GACxCC,qBAAqB,EAAwC,CAAA;AAE/D,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,oCAAoC,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Form::Fieldset\n class=\"hds-form-group--radio-cards\"\n @layout={{if (eq @layout \"vertical\") \"vertical\" \"horizontal\"}}\n @
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Form::Fieldset\n class=\"hds-form-group--radio-cards\"\n @layout={{if (eq @layout \"vertical\") \"vertical\" \"horizontal\"}}\n @isRequired={{@isRequired}}\n @isOptional={{@isOptional}}\n ...attributes\n as |F|\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 <F.Control>\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 </F.Control>\n</Hds::Form::Fieldset>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioCardGroupComponent = templateOnlyComponent();
|
|
13
|
+
var group = setComponentTemplate(TEMPLATE, HdsFormRadioCardGroupComponent);
|
|
8
14
|
|
|
9
15
|
export { group as default };
|
|
10
16
|
//# sourceMappingURL=group.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio-card/group.hbs","../../../../../src/components/hds/form/radio-card/group.
|
|
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(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Form::Fieldset\\n class=\\\"hds-form-group--radio-cards\\\"\\n @layout={{if (eq @layout \\\"vertical\\\") \\\"vertical\\\" \\\"horizontal\\\"}}\\n @isRequired={{@isRequired}}\\n @isOptional={{@isOptional}}\\n ...attributes\\n as |F|\\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 <F.Control>\\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 </F.Control>\\n</Hds::Form::Fieldset>\")","/**\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\ninterface HdsFormRadioCardGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n controlPosition: HdsFormRadioCardControlPositions;\n alignment: HdsFormRadioCardAlignments;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike<HdsFormLegendSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n RadioCard?: ComponentLike<HdsFormRadioCardSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormRadioCardGroupComponent =\n templateOnlyComponent<HdsFormRadioCardGroupSignature>();\n\nexport default HdsFormRadioCardGroupComponent;\n"],"names":["HdsFormRadioCardGroupComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,42BAA42B;;ACD94B;AACA;AACA;AACA;;AAiCA,MAAMA,8BAA8B,GAClCC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,8BAA8B,CAAA;;;;"}
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { assert } from '@ember/debug';
|
|
3
|
+
import { HdsFormRadioCardControlPositionValues, HdsFormRadioCardAlignmentValues } from './types.js';
|
|
3
4
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
5
|
import { setComponentTemplate } from '@ember/component';
|
|
5
6
|
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{
|
|
7
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<label class={{this.classNames}} {{style maxWidth=@maxWidth}}>\n <span class=\"hds-form-radio-card__content\">\n {{yield (hash Icon=(component \"flight-icon\" size=\"24\" isInlineBlock=false))}}\n {{yield (hash Label=(component \"hds/form/radio-card/label\"))}}\n {{yield (hash Badge=(component \"hds/badge\"))}}\n {{yield (hash Description=(component \"hds/form/radio-card/description\"))}}\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </span>\n <span class=\"hds-form-radio-card__control-wrapper\">\n <Hds::Form::Radio::Base\n class=\"hds-form-radio-card__control\"\n @value={{@value}}\n name={{@name}}\n checked={{@checked}}\n disabled={{@disabled}}\n aria-describedby={{@extraAriaDescribedBy}}\n ...attributes\n />\n </span>\n</label>");
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Copyright (c) HashiCorp, Inc.
|
|
10
11
|
* SPDX-License-Identifier: MPL-2.0
|
|
11
12
|
*/
|
|
12
13
|
|
|
13
|
-
const DEFAULT_CONTROL_POSITION =
|
|
14
|
-
const DEFAULT_ALIGNMENT =
|
|
15
|
-
const CONTROL_POSITIONS =
|
|
16
|
-
const ALIGNMENTS =
|
|
17
|
-
class
|
|
14
|
+
const DEFAULT_CONTROL_POSITION = HdsFormRadioCardControlPositionValues.Bottom;
|
|
15
|
+
const DEFAULT_ALIGNMENT = HdsFormRadioCardAlignmentValues.Left;
|
|
16
|
+
const CONTROL_POSITIONS = Object.values(HdsFormRadioCardControlPositionValues);
|
|
17
|
+
const ALIGNMENTS = Object.values(HdsFormRadioCardAlignmentValues);
|
|
18
|
+
class HdsFormRadioCardComponent extends Component {
|
|
18
19
|
/**
|
|
19
20
|
* Sets the position of the control
|
|
20
21
|
* Accepted values: buttom, left
|
|
@@ -24,7 +25,7 @@ class HdsFormRadioCardIndexComponent extends Component {
|
|
|
24
25
|
* @default 'bottom'
|
|
25
26
|
*/
|
|
26
27
|
get controlPosition() {
|
|
27
|
-
|
|
28
|
+
const {
|
|
28
29
|
controlPosition = DEFAULT_CONTROL_POSITION
|
|
29
30
|
} = this.args;
|
|
30
31
|
assert(`@controlPosition for "Hds::Form::RadioCard" must be one of the following: ${CONTROL_POSITIONS.join(', ')}; received: ${controlPosition}`, CONTROL_POSITIONS.includes(controlPosition));
|
|
@@ -40,7 +41,7 @@ class HdsFormRadioCardIndexComponent extends Component {
|
|
|
40
41
|
* @default 'left'
|
|
41
42
|
*/
|
|
42
43
|
get alignment() {
|
|
43
|
-
|
|
44
|
+
const {
|
|
44
45
|
alignment = DEFAULT_ALIGNMENT
|
|
45
46
|
} = this.args;
|
|
46
47
|
assert(`@alignment for "Hds::Form::RadioCard" must be one of the following: ${ALIGNMENTS.join(', ')}; received: ${alignment}`, ALIGNMENTS.includes(alignment));
|
|
@@ -53,7 +54,7 @@ class HdsFormRadioCardIndexComponent extends Component {
|
|
|
53
54
|
* @return {string} The "class" attribute to apply to the component.
|
|
54
55
|
*/
|
|
55
56
|
get classNames() {
|
|
56
|
-
|
|
57
|
+
const classes = ['hds-form-radio-card'];
|
|
57
58
|
if (this.args.checked) {
|
|
58
59
|
classes.push('hds-form-radio-card--checked');
|
|
59
60
|
}
|
|
@@ -74,7 +75,7 @@ class HdsFormRadioCardIndexComponent extends Component {
|
|
|
74
75
|
return classes.join(' ');
|
|
75
76
|
}
|
|
76
77
|
}
|
|
77
|
-
setComponentTemplate(TEMPLATE,
|
|
78
|
+
setComponentTemplate(TEMPLATE, HdsFormRadioCardComponent);
|
|
78
79
|
|
|
79
|
-
export { ALIGNMENTS, CONTROL_POSITIONS, DEFAULT_ALIGNMENT, DEFAULT_CONTROL_POSITION,
|
|
80
|
+
export { ALIGNMENTS, CONTROL_POSITIONS, DEFAULT_ALIGNMENT, DEFAULT_CONTROL_POSITION, HdsFormRadioCardComponent as default };
|
|
80
81
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/radio-card/index.hbs","../../../../../src/components/hds/form/radio-card/index.
|
|
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<label class={{this.classNames}} {{style maxWidth=@maxWidth}}>\\n <span class=\\\"hds-form-radio-card__content\\\">\\n {{yield (hash Icon=(component \\\"flight-icon\\\" size=\\\"24\\\" isInlineBlock=false))}}\\n {{yield (hash Label=(component \\\"hds/form/radio-card/label\\\"))}}\\n {{yield (hash Badge=(component \\\"hds/badge\\\"))}}\\n {{yield (hash Description=(component \\\"hds/form/radio-card/description\\\"))}}\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </span>\\n <span class=\\\"hds-form-radio-card__control-wrapper\\\">\\n <Hds::Form::Radio::Base\\n class=\\\"hds-form-radio-card__control\\\"\\n @value={{@value}}\\n name={{@name}}\\n checked={{@checked}}\\n disabled={{@disabled}}\\n aria-describedby={{@extraAriaDescribedBy}}\\n ...attributes\\n />\\n </span>\\n</label>\")","/**\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 { FlightIconSignature } from '@hashicorp/ember-flight-icons/components/flight-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<FlightIconSignature>;\n Label?: ComponentLike<HdsFormRadioCardLabelSignature>;\n Badge?: ComponentLike<HdsBadgeSignature>;\n Description?: ComponentLike<HdsFormRadioCardDescriptionSignature>;\n Generic?: ComponentLike<HdsYieldSignature>;\n },\n ];\n };\n Element: HdsFormRadioBaseSignature['Element'];\n}\n\nexport default class HdsFormRadioCardComponent extends Component<HdsFormRadioCardSignature> {\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","HdsFormRadioCardComponent","Component","controlPosition","args","assert","join","includes","alignment","classNames","classes","checked","push","disabled","maxWidth","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,w3BAAw3B;;ACD15B;AACA;AACA;AACA;;AAqBaA,MAAAA,wBAAwB,GACnCC,qCAAqC,CAACC,OAAM;AACjCC,MAAAA,iBAAiB,GAAGC,+BAA+B,CAACC,KAAI;AAC9D,MAAMC,iBAA2B,GAAGC,MAAM,CAACC,MAAM,CACtDP,qCACF,EAAC;AACM,MAAMQ,UAAoB,GAAGF,MAAM,CAACC,MAAM,CAC/CJ,+BACF,EAAC;AA2Bc,MAAMM,yBAAyB,SAASC,SAAS,CAA4B;AAC1F;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,eAAeA,GAAqC;IACtD,MAAM;AAAEA,MAAAA,eAAe,GAAGZ,wBAAAA;KAA0B,GAAG,IAAI,CAACa,IAAI,CAAA;AAEhEC,IAAAA,MAAM,CACJ,CAA6ER,0EAAAA,EAAAA,iBAAiB,CAACS,IAAI,CACjG,IACF,CAAC,CAAA,YAAA,EAAeH,eAAe,CAAA,CAAE,EACjCN,iBAAiB,CAACU,QAAQ,CAACJ,eAAe,CAC5C,CAAC,CAAA;AAED,IAAA,OAAOA,eAAe,CAAA;AACxB,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIK,SAASA,GAA+B;IAC1C,MAAM;AAAEA,MAAAA,SAAS,GAAGd,iBAAAA;KAAmB,GAAG,IAAI,CAACU,IAAI,CAAA;AAEnDC,IAAAA,MAAM,CACJ,CAAuEL,oEAAAA,EAAAA,UAAU,CAACM,IAAI,CACpF,IACF,CAAC,CAAA,YAAA,EAAeE,SAAS,CAAA,CAAE,EAC3BR,UAAU,CAACO,QAAQ,CAACC,SAAS,CAC/B,CAAC,CAAA;AAED,IAAA,OAAOA,SAAS,CAAA;AAClB,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAEvC,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,OAAO,EAAE;AACrBD,MAAAA,OAAO,CAACE,IAAI,CAAC,8BAA8B,CAAC,CAAA;AAC9C,KAAA;AACA,IAAA,IAAI,IAAI,CAACR,IAAI,CAACS,QAAQ,EAAE;AACtBH,MAAAA,OAAO,CAACE,IAAI,CAAC,+BAA+B,CAAC,CAAA;AAC/C,KAAA;AACA,IAAA,IAAI,IAAI,CAACR,IAAI,CAACU,QAAQ,EAAE;AACtBJ,MAAAA,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC,CAAA;AACtD,KAAC,MAAM;AACLF,MAAAA,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC,CAAA;AACtD,KAAA;;AAEA;IACAF,OAAO,CAACE,IAAI,CAAC,CAAA,6BAAA,EAAgC,IAAI,CAACT,eAAe,EAAE,CAAC,CAAA;;AAEpE;IACAO,OAAO,CAACE,IAAI,CAAC,CAAA,2BAAA,EAA8B,IAAI,CAACJ,SAAS,EAAE,CAAC,CAAA;AAE5D,IAAA,OAAOE,OAAO,CAACJ,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACS,oBAAA,CAAAC,QAAA,EAvEoBf,yBAAyB,CAAA;;;;"}
|
|
@@ -1,10 +1,16 @@
|
|
|
1
|
-
import
|
|
1
|
+
import templateOnlyComponent from '@ember/component/template-only';
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Text::Display\n class=\"hds-form-radio-card__label\"\n @tag=\"span\"\n @size=\"300\"\n @weight=\"bold\"\n ...attributes\n>{{yield}}</Hds::Text::Display>");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Copyright (c) HashiCorp, Inc.
|
|
9
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
const HdsFormRadioCardLabelComponent = templateOnlyComponent();
|
|
13
|
+
var label = setComponentTemplate(TEMPLATE, HdsFormRadioCardLabelComponent);
|
|
8
14
|
|
|
9
15
|
export { label as default };
|
|
10
16
|
//# sourceMappingURL=label.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.js","sources":["../../../../../src/components/hds/form/radio-card/label.hbs","../../../../../src/components/hds/form/radio-card/label.
|
|
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<Hds::Text::Display\\n class=\\\"hds-form-radio-card__label\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"300\\\"\\n @weight=\\\"bold\\\"\\n ...attributes\\n>{{yield}}</Hds::Text::Display>\")","/**\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 HdsFormRadioCardLabelComponent =\n templateOnlyComponent<HdsFormRadioCardLabelSignature>();\n\nexport default HdsFormRadioCardLabelComponent;\n"],"names":["HdsFormRadioCardLabelComponent","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mPAAmP;;ACDrR;AACA;AACA;AACA;;AAYA,MAAMA,8BAA8B,GAClCC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,8BAA8B,CAAA;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
let HdsFormRadioCardControlPositionValues = /*#__PURE__*/function (HdsFormRadioCardControlPositionValues) {
|
|
7
|
+
HdsFormRadioCardControlPositionValues["Bottom"] = "bottom";
|
|
8
|
+
HdsFormRadioCardControlPositionValues["Left"] = "left";
|
|
9
|
+
return HdsFormRadioCardControlPositionValues;
|
|
10
|
+
}({});
|
|
11
|
+
let HdsFormRadioCardAlignmentValues = /*#__PURE__*/function (HdsFormRadioCardAlignmentValues) {
|
|
12
|
+
HdsFormRadioCardAlignmentValues["Left"] = "left";
|
|
13
|
+
HdsFormRadioCardAlignmentValues["Center"] = "center";
|
|
14
|
+
return HdsFormRadioCardAlignmentValues;
|
|
15
|
+
}({});
|
|
16
|
+
|
|
17
|
+
export { HdsFormRadioCardAlignmentValues, HdsFormRadioCardControlPositionValues };
|
|
18
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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,CAAA;EAArCA,qCAAqC,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;AAAA,EAAA,OAArCA,qCAAqC,CAAA;AAAA,CAAA,CAAA,EAAA,EAAA;AAQrCC,IAAAA,+BAA+B,0BAA/BA,+BAA+B,EAAA;EAA/BA,+BAA+B,CAAA,MAAA,CAAA,GAAA,MAAA,CAAA;EAA/BA,+BAA+B,CAAA,QAAA,CAAA,GAAA,QAAA,CAAA;AAAA,EAAA,OAA/BA,+BAA+B,CAAA;AAAA,CAAA,CAAA,EAAA;;;;"}
|
|
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
|
|
|
2
2
|
import { precompileTemplate } from '@ember/template-compilation';
|
|
3
3
|
import { setComponentTemplate } from '@ember/component';
|
|
4
4
|
|
|
5
|
-
var TEMPLATE = precompileTemplate("{{
|
|
5
|
+
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<select class={{this.classNames}} {{style width=@width}} ...attributes>\n {{yield (hash Options=(component \"hds/yield\"))}}\n</select>");
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Copyright (c) HashiCorp, Inc.
|
|
@@ -16,7 +16,7 @@ class HdsFormSelectBaseComponent extends Component {
|
|
|
16
16
|
* @return {string} The "class" attribute to apply to the component.
|
|
17
17
|
*/
|
|
18
18
|
get classNames() {
|
|
19
|
-
|
|
19
|
+
const classes = ['hds-form-select'];
|
|
20
20
|
|
|
21
21
|
// add typographic classes
|
|
22
22
|
classes.push('hds-typography-body-200', 'hds-font-weight-regular');
|