@hashicorp/design-system-components 4.13.0 → 4.13.1

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.
Files changed (155) hide show
  1. package/declarations/components/hds/accordion/index.d.ts +1 -2
  2. package/declarations/components/hds/accordion/index.d.ts.map +1 -1
  3. package/declarations/components/hds/accordion/item/button.d.ts +1 -2
  4. package/declarations/components/hds/accordion/item/button.d.ts.map +1 -1
  5. package/declarations/components/hds/alert/index.d.ts +1 -28
  6. package/declarations/components/hds/alert/index.d.ts.map +1 -1
  7. package/declarations/components/hds/button-set/index.d.ts +1 -1
  8. package/declarations/components/hds/button-set/index.d.ts.map +1 -1
  9. package/declarations/components/hds/dropdown/toggle/chevron.d.ts +1 -1
  10. package/declarations/components/hds/dropdown/toggle/chevron.d.ts.map +1 -1
  11. package/declarations/components/hds/flyout/body.d.ts +2 -1
  12. package/declarations/components/hds/flyout/body.d.ts.map +1 -1
  13. package/declarations/components/hds/flyout/description.d.ts +3 -3
  14. package/declarations/components/hds/flyout/description.d.ts.map +1 -1
  15. package/declarations/components/hds/flyout/footer.d.ts +1 -2
  16. package/declarations/components/hds/flyout/footer.d.ts.map +1 -1
  17. package/declarations/components/hds/form/character-count/index.d.ts +1 -2
  18. package/declarations/components/hds/form/character-count/index.d.ts.map +1 -1
  19. package/declarations/components/hds/form/checkbox/group.d.ts +1 -1
  20. package/declarations/components/hds/form/checkbox/group.d.ts.map +1 -1
  21. package/declarations/components/hds/form/file-input/base.d.ts +1 -1
  22. package/declarations/components/hds/form/file-input/base.d.ts.map +1 -1
  23. package/declarations/components/hds/form/file-input/field.d.ts +1 -1
  24. package/declarations/components/hds/form/file-input/field.d.ts.map +1 -1
  25. package/declarations/components/hds/form/masked-input/field.d.ts +1 -1
  26. package/declarations/components/hds/form/masked-input/field.d.ts.map +1 -1
  27. package/declarations/components/hds/form/radio/group.d.ts +1 -1
  28. package/declarations/components/hds/form/radio/group.d.ts.map +1 -1
  29. package/declarations/components/hds/form/radio-card/group.d.ts +1 -1
  30. package/declarations/components/hds/form/radio-card/group.d.ts.map +1 -1
  31. package/declarations/components/hds/form/select/field.d.ts +1 -1
  32. package/declarations/components/hds/form/select/field.d.ts.map +1 -1
  33. package/declarations/components/hds/form/super-select/after-options.d.ts +1 -1
  34. package/declarations/components/hds/form/super-select/after-options.d.ts.map +1 -1
  35. package/declarations/components/hds/form/super-select/multiple/field.d.ts +1 -2
  36. package/declarations/components/hds/form/super-select/multiple/field.d.ts.map +1 -1
  37. package/declarations/components/hds/form/super-select/option-group.d.ts +1 -2
  38. package/declarations/components/hds/form/super-select/option-group.d.ts.map +1 -1
  39. package/declarations/components/hds/form/super-select/placeholder.d.ts +1 -1
  40. package/declarations/components/hds/form/super-select/placeholder.d.ts.map +1 -1
  41. package/declarations/components/hds/form/super-select/single/field.d.ts +1 -2
  42. package/declarations/components/hds/form/super-select/single/field.d.ts.map +1 -1
  43. package/declarations/components/hds/form/text-input/field.d.ts +1 -2
  44. package/declarations/components/hds/form/text-input/field.d.ts.map +1 -1
  45. package/declarations/components/hds/form/textarea/field.d.ts +1 -1
  46. package/declarations/components/hds/form/textarea/field.d.ts.map +1 -1
  47. package/declarations/components/hds/form/toggle/base.d.ts +1 -1
  48. package/declarations/components/hds/form/toggle/base.d.ts.map +1 -1
  49. package/declarations/components/hds/form/toggle/group.d.ts +1 -1
  50. package/declarations/components/hds/form/toggle/group.d.ts.map +1 -1
  51. package/declarations/components/hds/modal/body.d.ts +2 -1
  52. package/declarations/components/hds/modal/body.d.ts.map +1 -1
  53. package/declarations/components/hds/page-header/index.d.ts +1 -1
  54. package/declarations/components/hds/page-header/index.d.ts.map +1 -1
  55. package/declarations/components/hds/pagination/compact/index.d.ts +1 -1
  56. package/declarations/components/hds/pagination/compact/index.d.ts.map +1 -1
  57. package/declarations/components/hds/pagination/info/index.d.ts +1 -2
  58. package/declarations/components/hds/pagination/info/index.d.ts.map +1 -1
  59. package/declarations/components/hds/pagination/nav/arrow.d.ts +1 -1
  60. package/declarations/components/hds/pagination/nav/arrow.d.ts.map +1 -1
  61. package/declarations/components/hds/pagination/nav/number.d.ts +1 -1
  62. package/declarations/components/hds/pagination/nav/number.d.ts.map +1 -1
  63. package/declarations/components/hds/pagination/size-selector/index.d.ts +1 -2
  64. package/declarations/components/hds/pagination/size-selector/index.d.ts.map +1 -1
  65. package/declarations/components/hds/reveal/index.d.ts +1 -2
  66. package/declarations/components/hds/reveal/index.d.ts.map +1 -1
  67. package/declarations/components/hds/rich-tooltip/index.d.ts +1 -2
  68. package/declarations/components/hds/rich-tooltip/index.d.ts.map +1 -1
  69. package/declarations/components/hds/segmented-group/index.d.ts +1 -1
  70. package/declarations/components/hds/segmented-group/index.d.ts.map +1 -1
  71. package/declarations/components/hds/separator/index.d.ts +1 -2
  72. package/declarations/components/hds/separator/index.d.ts.map +1 -1
  73. package/declarations/components/hds/side-nav/header/home-link.d.ts +1 -2
  74. package/declarations/components/hds/side-nav/header/home-link.d.ts.map +1 -1
  75. package/declarations/components/hds/side-nav/header/icon-button.d.ts +1 -2
  76. package/declarations/components/hds/side-nav/header/icon-button.d.ts.map +1 -1
  77. package/declarations/components/hds/side-nav/header/index.d.ts +1 -1
  78. package/declarations/components/hds/side-nav/header/index.d.ts.map +1 -1
  79. package/declarations/components/hds/side-nav/index.d.ts +1 -2
  80. package/declarations/components/hds/side-nav/index.d.ts.map +1 -1
  81. package/declarations/components/hds/side-nav/portal/index.d.ts +1 -1
  82. package/declarations/components/hds/side-nav/portal/index.d.ts.map +1 -1
  83. package/declarations/components/hds/side-nav/portal/target.d.ts +2 -3
  84. package/declarations/components/hds/side-nav/portal/target.d.ts.map +1 -1
  85. package/declarations/components/hds/side-nav/toggle-button.d.ts +1 -1
  86. package/declarations/components/hds/side-nav/toggle-button.d.ts.map +1 -1
  87. package/declarations/components/hds/stepper/step/indicator.d.ts +1 -2
  88. package/declarations/components/hds/stepper/step/indicator.d.ts.map +1 -1
  89. package/declarations/components/hds/stepper/task/indicator.d.ts +1 -2
  90. package/declarations/components/hds/stepper/task/indicator.d.ts.map +1 -1
  91. package/declarations/components/hds/tabs/index.d.ts +1 -2
  92. package/declarations/components/hds/tabs/index.d.ts.map +1 -1
  93. package/declarations/components/hds/tag/index.d.ts +1 -2
  94. package/declarations/components/hds/tag/index.d.ts.map +1 -1
  95. package/declarations/modifiers/hds-anchored-position.d.ts +9 -0
  96. package/declarations/modifiers/hds-anchored-position.d.ts.map +1 -1
  97. package/declarations/modifiers/hds-register-event.d.ts +9 -0
  98. package/declarations/modifiers/hds-register-event.d.ts.map +1 -1
  99. package/dist/components/hds/accordion/index.js.map +1 -1
  100. package/dist/components/hds/accordion/item/button.js.map +1 -1
  101. package/dist/components/hds/alert/index.js +11 -33
  102. package/dist/components/hds/alert/index.js.map +1 -1
  103. package/dist/components/hds/button-set/index.js.map +1 -1
  104. package/dist/components/hds/dropdown/toggle/chevron.js.map +1 -1
  105. package/dist/components/hds/flyout/body.js +2 -2
  106. package/dist/components/hds/flyout/body.js.map +1 -1
  107. package/dist/components/hds/flyout/description.js +2 -2
  108. package/dist/components/hds/flyout/description.js.map +1 -1
  109. package/dist/components/hds/flyout/footer.js.map +1 -1
  110. package/dist/components/hds/form/character-count/index.js.map +1 -1
  111. package/dist/components/hds/form/checkbox/group.js.map +1 -1
  112. package/dist/components/hds/form/file-input/base.js.map +1 -1
  113. package/dist/components/hds/form/file-input/field.js.map +1 -1
  114. package/dist/components/hds/form/masked-input/field.js.map +1 -1
  115. package/dist/components/hds/form/radio/group.js.map +1 -1
  116. package/dist/components/hds/form/radio-card/group.js.map +1 -1
  117. package/dist/components/hds/form/select/field.js.map +1 -1
  118. package/dist/components/hds/form/super-select/after-options.js.map +1 -1
  119. package/dist/components/hds/form/super-select/multiple/field.js.map +1 -1
  120. package/dist/components/hds/form/super-select/option-group.js.map +1 -1
  121. package/dist/components/hds/form/super-select/placeholder.js.map +1 -1
  122. package/dist/components/hds/form/super-select/single/field.js.map +1 -1
  123. package/dist/components/hds/form/text-input/field.js.map +1 -1
  124. package/dist/components/hds/form/textarea/field.js.map +1 -1
  125. package/dist/components/hds/form/toggle/base.js.map +1 -1
  126. package/dist/components/hds/form/toggle/group.js.map +1 -1
  127. package/dist/components/hds/modal/body.js +2 -2
  128. package/dist/components/hds/modal/body.js.map +1 -1
  129. package/dist/components/hds/page-header/index.js.map +1 -1
  130. package/dist/components/hds/pagination/compact/index.js.map +1 -1
  131. package/dist/components/hds/pagination/info/index.js.map +1 -1
  132. package/dist/components/hds/pagination/nav/arrow.js.map +1 -1
  133. package/dist/components/hds/pagination/nav/number.js.map +1 -1
  134. package/dist/components/hds/pagination/size-selector/index.js.map +1 -1
  135. package/dist/components/hds/reveal/index.js.map +1 -1
  136. package/dist/components/hds/rich-tooltip/index.js.map +1 -1
  137. package/dist/components/hds/segmented-group/index.js.map +1 -1
  138. package/dist/components/hds/separator/index.js.map +1 -1
  139. package/dist/components/hds/side-nav/header/home-link.js.map +1 -1
  140. package/dist/components/hds/side-nav/header/icon-button.js.map +1 -1
  141. package/dist/components/hds/side-nav/header/index.js.map +1 -1
  142. package/dist/components/hds/side-nav/index.js.map +1 -1
  143. package/dist/components/hds/side-nav/portal/index.js.map +1 -1
  144. package/dist/components/hds/side-nav/portal/target.js.map +1 -1
  145. package/dist/components/hds/side-nav/toggle-button.js.map +1 -1
  146. package/dist/components/hds/stepper/step/indicator.js.map +1 -1
  147. package/dist/components/hds/stepper/task/indicator.js.map +1 -1
  148. package/dist/components/hds/tabs/index.js.map +1 -1
  149. package/dist/components/hds/tag/index.js.map +1 -1
  150. package/dist/components/hds/toast/index.js +1 -1
  151. package/dist/components/hds/toast/index.js.map +1 -1
  152. package/dist/components/hds/tooltip-button/index.js.map +1 -1
  153. package/dist/modifiers/hds-anchored-position.js.map +1 -1
  154. package/dist/modifiers/hds-register-event.js.map +1 -1
  155. package/package.json +4 -2
@@ -8,7 +8,7 @@ import { HdsAlertTypeValues, HdsAlertColorValues } from './types.js';
8
8
  import { precompileTemplate } from '@ember/template-compilation';
9
9
  import { setComponentTemplate } from '@ember/component';
10
10
 
11
- var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div\n class={{this.classNames}}\n role={{this.role}}\n aria-live=\"polite\"\n aria-labelledby={{this.ariaLabelledBy}}\n {{did-insert this.didInsert}}\n ...attributes\n>\n {{#if this.icon}}\n <div class=\"hds-alert__icon\">\n <Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </div>\n {{/if}}\n\n <div class=\"hds-alert__content\">\n <div class=\"hds-alert__text {{if (eq @type \'compact\') \'hds-typography-body-100\' \'hds-typography-body-200\'}}\">\n {{yield (hash Title=(component \"hds/alert/title\"))}}\n {{yield (hash Description=(component \"hds/alert/description\"))}}\n </div>\n\n <div class=\"hds-alert__actions\">\n {{yield\n (hash\n Button=(component \"hds/button\" size=\"small\") LinkStandalone=(component \"hds/link/standalone\" size=\"small\")\n )\n }}\n </div>\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </div>\n\n {{#if this.onDismiss}}\n <Hds::DismissButton class=\"hds-alert__dismiss\" {{on \"click\" this.onDismiss}} />\n {{/if}}\n</div>");
11
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div\n class={{this.classNames}}\n role={{this.role}}\n aria-live={{if this.role \"polite\"}}\n aria-labelledby={{this.ariaLabelledBy}}\n {{did-insert this.didInsert}}\n ...attributes\n>\n {{#if this.icon}}\n <div class=\"hds-alert__icon\">\n <Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\n </div>\n {{/if}}\n\n <div class=\"hds-alert__content\">\n <div class=\"hds-alert__text {{if (eq @type \'compact\') \'hds-typography-body-100\' \'hds-typography-body-200\'}}\">\n {{yield (hash Title=(component \"hds/alert/title\"))}}\n {{yield (hash Description=(component \"hds/alert/description\"))}}\n </div>\n\n <div class=\"hds-alert__actions\">\n {{yield\n (hash\n Button=(component \"hds/button\" size=\"small\") LinkStandalone=(component \"hds/link/standalone\" size=\"small\")\n )\n }}\n </div>\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </div>\n\n {{#if this.onDismiss}}\n <Hds::DismissButton class=\"hds-alert__dismiss\" {{on \"click\" this.onDismiss}} />\n {{/if}}\n</div>");
12
12
 
13
13
  var _class, _descriptor, _descriptor2;
14
14
  const TYPES = Object.values(HdsAlertTypeValues);
@@ -32,12 +32,7 @@ let HdsAlert = (_class = class HdsAlert extends Component {
32
32
  assert(`@type for "Hds::Alert" must be one of the following: ${TYPES.join(', ')}; received: ${this.args.type}`, TYPES.includes(this.args.type));
33
33
  }
34
34
 
35
- /**
36
- * @param color
37
- * @type {enum}
38
- * @default neutral
39
- * @description Determines the color scheme for the alert.
40
- */
35
+ // Determines the color scheme for the alert.
41
36
  get color() {
42
37
  const {
43
38
  color = DEFAULT_COLOR
@@ -46,12 +41,7 @@ let HdsAlert = (_class = class HdsAlert extends Component {
46
41
  return color;
47
42
  }
48
43
 
49
- /**
50
- * @param icon
51
- * @type {string}
52
- * @default false
53
- * @description The name of the icon to be used.
54
- */
44
+ // The name of the icon to be used.
55
45
  get icon() {
56
46
  const {
57
47
  icon
@@ -76,11 +66,6 @@ let HdsAlert = (_class = class HdsAlert extends Component {
76
66
  }
77
67
  }
78
68
 
79
- /**
80
- * @param onDismiss
81
- * @type {function}
82
- * @default () => {}
83
- */
84
69
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
85
70
  get onDismiss() {
86
71
  const {
@@ -93,11 +78,7 @@ let HdsAlert = (_class = class HdsAlert extends Component {
93
78
  }
94
79
  }
95
80
 
96
- /**
97
- * @param iconSize
98
- * @type {string}
99
- * @description ensures that the correct icon size is used. Automatically calculated.
100
- */
81
+ // Ensures that the correct icon size is used. Automatically calculated.
101
82
  get iconSize() {
102
83
  if (this.args.type === 'compact') {
103
84
  return '16';
@@ -105,12 +86,6 @@ let HdsAlert = (_class = class HdsAlert extends Component {
105
86
  return '24';
106
87
  }
107
88
  }
108
-
109
- /**
110
- * Get the class names to apply to the component.
111
- * @method Alert#classNames
112
- * @return {string} The "class" attribute to apply to the component.
113
- */
114
89
  get classNames() {
115
90
  const classes = ['hds-alert'];
116
91
 
@@ -123,8 +98,13 @@ let HdsAlert = (_class = class HdsAlert extends Component {
123
98
  }
124
99
  didInsert(element) {
125
100
  const actions = element.querySelectorAll(`${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`);
126
- if (actions.length) {
101
+
102
+ // an Alert which actually alerts users (has role="alert" & aria-live="polite") as opposed to an informational or promo "alert"
103
+ const isSemanticAlert = this.color === 'warning' || this.color === 'critical' || this.color === 'success';
104
+ if (isSemanticAlert && actions.length) {
127
105
  this.role = 'alertdialog';
106
+ } else if (isSemanticAlert) {
107
+ this.role = 'alert';
128
108
  }
129
109
 
130
110
  // `alertdialog` must have an accessible name so we use either the
@@ -140,9 +120,7 @@ let HdsAlert = (_class = class HdsAlert extends Component {
140
120
  configurable: true,
141
121
  enumerable: true,
142
122
  writable: true,
143
- initializer: function () {
144
- return 'alert';
145
- }
123
+ initializer: null
146
124
  }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "ariaLabelledBy", [tracked], {
147
125
  configurable: true,
148
126
  enumerable: true,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/hds/alert/index.hbs","../../../../src/components/hds/alert/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div\\n class={{this.classNames}}\\n role={{this.role}}\\n aria-live=\\\"polite\\\"\\n aria-labelledby={{this.ariaLabelledBy}}\\n {{did-insert this.didInsert}}\\n ...attributes\\n>\\n {{#if this.icon}}\\n <div class=\\\"hds-alert__icon\\\">\\n <Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </div>\\n {{/if}}\\n\\n <div class=\\\"hds-alert__content\\\">\\n <div class=\\\"hds-alert__text {{if (eq @type \\'compact\\') \\'hds-typography-body-100\\' \\'hds-typography-body-200\\'}}\\\">\\n {{yield (hash Title=(component \\\"hds/alert/title\\\"))}}\\n {{yield (hash Description=(component \\\"hds/alert/description\\\"))}}\\n </div>\\n\\n <div class=\\\"hds-alert__actions\\\">\\n {{yield\\n (hash\\n Button=(component \\\"hds/button\\\" size=\\\"small\\\") LinkStandalone=(component \\\"hds/link/standalone\\\" size=\\\"small\\\")\\n )\\n }}\\n </div>\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </div>\\n\\n {{#if this.onDismiss}}\\n <Hds::DismissButton class=\\\"hds-alert__dismiss\\\" {{on \\\"click\\\" this.onDismiss}} />\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\nimport { tracked } from '@glimmer/tracking';\n\nimport { HdsAlertColorValues, HdsAlertTypeValues } from './types.ts';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type HdsButtonComponent from '../button';\nimport type HdsLinkStandaloneComponent from '../link/standalone';\nimport type { HdsYieldSignature } from '../yield';\nimport type { HdsAlertColors, HdsAlertTypes } from './types.ts';\nimport type { HdsAlertTitleSignature } from './title.ts';\nimport type { HdsAlertDescriptionSignature } from './description.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport const TYPES: string[] = Object.values(HdsAlertTypeValues);\nexport const DEFAULT_COLOR = HdsAlertColorValues.Neutral;\nexport const COLORS: string[] = Object.values(HdsAlertColorValues);\n\nexport const MAPPING_COLORS_TO_ICONS = {\n [HdsAlertColorValues.Neutral]: 'info',\n [HdsAlertColorValues.Highlight]: 'info',\n [HdsAlertColorValues.Success]: 'check-circle',\n [HdsAlertColorValues.Warning]: 'alert-triangle',\n [HdsAlertColorValues.Critical]: 'alert-diamond',\n} as const;\n\nconst CONTENT_ELEMENT_SELECTOR = '.hds-alert__content';\nconst TITLE_ELEMENT_SELECTOR = '.hds-alert__title';\nconst DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description';\n\nexport interface HdsAlertSignature {\n Args: {\n type: HdsAlertTypes;\n color?: HdsAlertColors;\n icon?: HdsIconSignature['Args']['name'] | false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onDismiss?: (event: MouseEvent, ...args: any[]) => void;\n };\n Blocks: {\n default: [\n {\n Title?: ComponentLike<HdsAlertTitleSignature>;\n Description?: ComponentLike<HdsAlertDescriptionSignature>;\n Generic?: ComponentLike<HdsYieldSignature>;\n LinkStandalone?: WithBoundArgs<\n typeof HdsLinkStandaloneComponent,\n 'size'\n >;\n Button?: WithBoundArgs<typeof HdsButtonComponent, 'size'>;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAlert extends Component<HdsAlertSignature> {\n @tracked role = 'alert';\n @tracked ariaLabelledBy?: string;\n\n constructor(owner: unknown, args: HdsAlertSignature['Args']) {\n super(owner, args);\n\n assert(\n `@type for \"Hds::Alert\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${this.args.type}`,\n TYPES.includes(this.args.type)\n );\n }\n\n /**\n * @param color\n * @type {enum}\n * @default neutral\n * @description Determines the color scheme for the alert.\n */\n get color(): HdsAlertColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Alert\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * @param icon\n * @type {string}\n * @default false\n * @description The name of the icon to be used.\n */\n get icon(): HdsIconSignature['Args']['name'] | false {\n const { icon } = this.args;\n\n // If `icon` isn't passed, use the pre-defined one from `color`\n if (icon === undefined) {\n if (this.args.type === 'compact') {\n // for the \"compact\" type by default we use filled icons\n return `${MAPPING_COLORS_TO_ICONS[this.color]}-fill`;\n } else {\n // for all the other types by default we use outlined icons\n return MAPPING_COLORS_TO_ICONS[this.color];\n }\n // If `icon` is set explicitly to false, user doesn't want any icon in the alert\n } else if (icon === false) {\n assert(\n `@icon for \"Hds::Alert\" with @type \"compact\" is required`,\n this.args.type !== 'compact'\n );\n\n return false;\n } else {\n // If a name for `icon` is passed, set HdsIcon to that name\n return icon;\n }\n }\n\n /**\n * @param onDismiss\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onDismiss(): ((event: MouseEvent, ...args: any[]) => void) | false {\n const { onDismiss } = this.args;\n\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return false;\n }\n }\n\n /**\n * @param iconSize\n * @type {string}\n * @description ensures that the correct icon size is used. Automatically calculated.\n */\n get iconSize(): HdsIconSignature['Args']['size'] {\n if (this.args.type === 'compact') {\n return '16';\n } else {\n return '24';\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method Alert#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-alert'];\n\n // Add a class based on the @type argument\n classes.push(`hds-alert--type-${this.args.type}`);\n\n // Add a class based on the @color argument\n classes.push(`hds-alert--color-${this.color}`);\n\n return classes.join(' ');\n }\n\n @action\n didInsert(element: HTMLDivElement): void {\n const actions = element.querySelectorAll(\n `${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`\n );\n if (actions.length) {\n this.role = 'alertdialog';\n }\n\n // `alertdialog` must have an accessible name so we use either the\n // title or the description as label for the alert\n const label =\n element.querySelector(TITLE_ELEMENT_SELECTOR) ||\n element.querySelector(DESCRIPTION_ELEMENT_SELECTOR);\n if (label) {\n const labelId = label.getAttribute('id') || guidFor(element);\n label.setAttribute('id', labelId);\n this.ariaLabelledBy = labelId;\n }\n }\n}\n"],"names":["TYPES","Object","values","HdsAlertTypeValues","DEFAULT_COLOR","HdsAlertColorValues","Neutral","COLORS","MAPPING_COLORS_TO_ICONS","Highlight","Success","Warning","Critical","CONTENT_ELEMENT_SELECTOR","TITLE_ELEMENT_SELECTOR","DESCRIPTION_ELEMENT_SELECTOR","HdsAlert","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","assert","join","type","includes","color","icon","undefined","onDismiss","iconSize","classNames","classes","push","didInsert","element","actions","querySelectorAll","length","role","label","querySelector","labelId","getAttribute","guidFor","setAttribute","ariaLabelledBy","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,6oCAA6oC;;;ACqBxqC,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,kBAAkB,EAAC;AACnDC,MAAAA,aAAa,GAAGC,mBAAmB,CAACC,QAAO;AACjD,MAAMC,MAAgB,GAAGN,MAAM,CAACC,MAAM,CAACG,mBAAmB,EAAC;AAE3D,MAAMG,uBAAuB,GAAG;AACrC,EAAA,CAACH,mBAAmB,CAACC,OAAO,GAAG,MAAM;AACrC,EAAA,CAACD,mBAAmB,CAACI,SAAS,GAAG,MAAM;AACvC,EAAA,CAACJ,mBAAmB,CAACK,OAAO,GAAG,cAAc;AAC7C,EAAA,CAACL,mBAAmB,CAACM,OAAO,GAAG,gBAAgB;EAC/C,CAACN,mBAAmB,CAACO,QAAQ,GAAG,eAAA;AAClC,EAAU;AAEV,MAAMC,wBAAwB,GAAG,qBAAqB,CAAA;AACtD,MAAMC,sBAAsB,GAAG,mBAAmB,CAAA;AAClD,MAAMC,4BAA4B,GAAG,yBAAyB,CAAA;AA2BzCC,IAAAA,QAAQ,IAAAC,MAAA,GAAd,MAAMD,QAAQ,SAASE,SAAS,CAAoB;AAIjEC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,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EAAAlC,MAAA,CAAAkC,SAAA,IAAAlC,MAAA,EAAA;AAhHoB0C,oBAAA,CAAAC,QAAA,EAAR5C,QAAQ,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/hds/alert/index.hbs","../../../../src/components/hds/alert/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div\\n class={{this.classNames}}\\n role={{this.role}}\\n aria-live={{if this.role \\\"polite\\\"}}\\n aria-labelledby={{this.ariaLabelledBy}}\\n {{did-insert this.didInsert}}\\n ...attributes\\n>\\n {{#if this.icon}}\\n <div class=\\\"hds-alert__icon\\\">\\n <Hds::Icon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />\\n </div>\\n {{/if}}\\n\\n <div class=\\\"hds-alert__content\\\">\\n <div class=\\\"hds-alert__text {{if (eq @type \\'compact\\') \\'hds-typography-body-100\\' \\'hds-typography-body-200\\'}}\\\">\\n {{yield (hash Title=(component \\\"hds/alert/title\\\"))}}\\n {{yield (hash Description=(component \\\"hds/alert/description\\\"))}}\\n </div>\\n\\n <div class=\\\"hds-alert__actions\\\">\\n {{yield\\n (hash\\n Button=(component \\\"hds/button\\\" size=\\\"small\\\") LinkStandalone=(component \\\"hds/link/standalone\\\" size=\\\"small\\\")\\n )\\n }}\\n </div>\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </div>\\n\\n {{#if this.onDismiss}}\\n <Hds::DismissButton class=\\\"hds-alert__dismiss\\\" {{on \\\"click\\\" this.onDismiss}} />\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { guidFor } from '@ember/object/internals';\nimport { tracked } from '@glimmer/tracking';\n\nimport { HdsAlertColorValues, HdsAlertTypeValues } from './types.ts';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type HdsButtonComponent from '../button';\nimport type HdsLinkStandaloneComponent from '../link/standalone';\nimport type { HdsYieldSignature } from '../yield';\nimport type { HdsAlertColors, HdsAlertTypes } from './types.ts';\nimport type { HdsAlertTitleSignature } from './title.ts';\nimport type { HdsAlertDescriptionSignature } from './description.ts';\nimport type { HdsIconSignature } from '../icon';\n\nexport const TYPES: string[] = Object.values(HdsAlertTypeValues);\nexport const DEFAULT_COLOR = HdsAlertColorValues.Neutral;\nexport const COLORS: string[] = Object.values(HdsAlertColorValues);\n\nexport const MAPPING_COLORS_TO_ICONS = {\n [HdsAlertColorValues.Neutral]: 'info',\n [HdsAlertColorValues.Highlight]: 'info',\n [HdsAlertColorValues.Success]: 'check-circle',\n [HdsAlertColorValues.Warning]: 'alert-triangle',\n [HdsAlertColorValues.Critical]: 'alert-diamond',\n} as const;\n\nconst CONTENT_ELEMENT_SELECTOR = '.hds-alert__content';\nconst TITLE_ELEMENT_SELECTOR = '.hds-alert__title';\nconst DESCRIPTION_ELEMENT_SELECTOR = '.hds-alert__description';\n\nexport interface HdsAlertSignature {\n Args: {\n type: HdsAlertTypes;\n color?: HdsAlertColors;\n icon?: HdsIconSignature['Args']['name'] | false;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onDismiss?: (event: MouseEvent, ...args: any[]) => void;\n };\n Blocks: {\n default: [\n {\n Title?: ComponentLike<HdsAlertTitleSignature>;\n Description?: ComponentLike<HdsAlertDescriptionSignature>;\n Generic?: ComponentLike<HdsYieldSignature>;\n LinkStandalone?: WithBoundArgs<\n typeof HdsLinkStandaloneComponent,\n 'size'\n >;\n Button?: WithBoundArgs<typeof HdsButtonComponent, 'size'>;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsAlert extends Component<HdsAlertSignature> {\n @tracked role?: string;\n @tracked ariaLabelledBy?: string;\n\n constructor(owner: unknown, args: HdsAlertSignature['Args']) {\n super(owner, args);\n\n assert(\n `@type for \"Hds::Alert\" must be one of the following: ${TYPES.join(\n ', '\n )}; received: ${this.args.type}`,\n TYPES.includes(this.args.type)\n );\n }\n\n // Determines the color scheme for the alert.\n get color(): HdsAlertColors {\n const { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Alert\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n // The name of the icon to be used.\n get icon(): HdsIconSignature['Args']['name'] | false {\n const { icon } = this.args;\n\n // If `icon` isn't passed, use the pre-defined one from `color`\n if (icon === undefined) {\n if (this.args.type === 'compact') {\n // for the \"compact\" type by default we use filled icons\n return `${MAPPING_COLORS_TO_ICONS[this.color]}-fill`;\n } else {\n // for all the other types by default we use outlined icons\n return MAPPING_COLORS_TO_ICONS[this.color];\n }\n // If `icon` is set explicitly to false, user doesn't want any icon in the alert\n } else if (icon === false) {\n assert(\n `@icon for \"Hds::Alert\" with @type \"compact\" is required`,\n this.args.type !== 'compact'\n );\n\n return false;\n } else {\n // If a name for `icon` is passed, set HdsIcon to that name\n return icon;\n }\n }\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onDismiss(): ((event: MouseEvent, ...args: any[]) => void) | false {\n const { onDismiss } = this.args;\n\n if (typeof onDismiss === 'function') {\n return onDismiss;\n } else {\n return false;\n }\n }\n\n // Ensures that the correct icon size is used. Automatically calculated.\n get iconSize(): HdsIconSignature['Args']['size'] {\n if (this.args.type === 'compact') {\n return '16';\n } else {\n return '24';\n }\n }\n\n get classNames(): string {\n const classes = ['hds-alert'];\n\n // Add a class based on the @type argument\n classes.push(`hds-alert--type-${this.args.type}`);\n\n // Add a class based on the @color argument\n classes.push(`hds-alert--color-${this.color}`);\n\n return classes.join(' ');\n }\n\n @action\n didInsert(element: HTMLDivElement): void {\n const actions = element.querySelectorAll(\n `${CONTENT_ELEMENT_SELECTOR} button, ${CONTENT_ELEMENT_SELECTOR} a`\n );\n\n // an Alert which actually alerts users (has role=\"alert\" & aria-live=\"polite\") as opposed to an informational or promo \"alert\"\n const isSemanticAlert: boolean =\n this.color === 'warning' ||\n this.color === 'critical' ||\n this.color === 'success';\n\n if (isSemanticAlert && actions.length) {\n this.role = 'alertdialog';\n } else if (isSemanticAlert) {\n this.role = 'alert';\n }\n\n // `alertdialog` must have an accessible name so we use either the\n // title or the description as label for the alert\n const label =\n element.querySelector(TITLE_ELEMENT_SELECTOR) ||\n element.querySelector(DESCRIPTION_ELEMENT_SELECTOR);\n if (label) {\n const labelId = label.getAttribute('id') || guidFor(element);\n label.setAttribute('id', labelId);\n this.ariaLabelledBy = labelId;\n }\n }\n}\n"],"names":["TYPES","Object","values","HdsAlertTypeValues","DEFAULT_COLOR","HdsAlertColorValues","Neutral","COLORS","MAPPING_COLORS_TO_ICONS","Highlight","Success","Warning","Critical","CONTENT_ELEMENT_SELECTOR","TITLE_ELEMENT_SELECTOR","DESCRIPTION_ELEMENT_SELECTOR","HdsAlert","_class","Component","constructor","owner","args","_initializerDefineProperty","_descriptor","_descriptor2","assert","join","type","includes","color","icon","undefined","onDismiss","iconSize","classNames","classes","push","didInsert","element","actions","querySelectorAll","isSemanticAlert","length","role","label","querySelector","labelId","getAttribute","guidFor","setAttribute","ariaLabelledBy","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,8pCAA8pC;;;ACqBzrC,MAAMA,KAAe,GAAGC,MAAM,CAACC,MAAM,CAACC,kBAAkB,EAAC;AACnDC,MAAAA,aAAa,GAAGC,mBAAmB,CAACC,QAAO;AACjD,MAAMC,MAAgB,GAAGN,MAAM,CAACC,MAAM,CAACG,mBAAmB,EAAC;AAE3D,MAAMG,uBAAuB,GAAG;AACrC,EAAA,CAACH,mBAAmB,CAACC,OAAO,GAAG,MAAM;AACrC,EA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SAAA,EAAA,MAAA,EAAA,CApHEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAjC,CAAAA,EAAAA,YAAA,GAAA2B,yBAAA,CAAAlC,MAAA,CAAAmC,SAAA,qBACPC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAAlC,MAAA,CAAAmC,SAAA,EAsFPM,WAAAA,EAAAA,CAAAA,MAAM,GAAAzD,MAAA,CAAA0D,wBAAA,CAAA1C,MAAA,CAAAmC,SAAA,EAAA,WAAA,CAAA,EAAAnC,MAAA,CAAAmC,SAAA,IAAAnC,MAAA,EAAA;AAxFoB2C,oBAAA,CAAAC,QAAA,EAAR7C,QAAQ,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/hds/button-set/index.hbs","../../../../src/components/hds/button-set/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-button-set\\\" ...attributes>\\n {{yield}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\ninterface HdsButtonSetSignature {\n Blocks: { default: [] };\n Element: HTMLDivElement;\n}\nconst HdsButtonSet = TemplateOnlyComponent<HdsButtonSetSignature>();\n\nexport default HdsButtonSet;\n"],"names":["HdsButtonSet","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iJAAiJ;;ACDnL;AACA;AACA;AACA;;AAOA,MAAMA,YAAY,GAAGC,qBAAqB,EAAyB,CAAA;AAEnE,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,YAAY,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/hds/button-set/index.hbs","../../../../src/components/hds/button-set/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-button-set\\\" ...attributes>\\n {{yield}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport TemplateOnlyComponent from '@ember/component/template-only';\nexport interface HdsButtonSetSignature {\n Blocks: { default: [] };\n Element: HTMLDivElement;\n}\nconst HdsButtonSet = TemplateOnlyComponent<HdsButtonSetSignature>();\n\nexport default HdsButtonSet;\n"],"names":["HdsButtonSet","TemplateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iJAAiJ;;ACDnL;AACA;AACA;AACA;;AAOA,MAAMA,YAAY,GAAGC,qBAAqB,EAAyB,CAAA;AAEnE,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,YAAY,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chevron.js","sources":["../../../../../src/components/hds/dropdown/toggle/chevron.hbs","../../../../../src/components/hds/dropdown/toggle/chevron.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-dropdown-toggle-chevron\\\">\\n <Hds::Icon @name=\\\"chevron-down\\\" />\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\ninterface HdsDropdownToggleChevronSignature {\n Element: HTMLDivElement;\n}\n\nconst HdsDropdownToggleChevron =\n templateOnlyComponent<HdsDropdownToggleChevronSignature>();\n\nexport default HdsDropdownToggleChevron;\n"],"names":["HdsDropdownToggleChevron","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,wBAAwB,GAC5BC,qBAAqB,EAAqC,CAAA;AAE5D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,wBAAwB,CAAA;;;;"}
1
+ {"version":3,"file":"chevron.js","sources":["../../../../../src/components/hds/dropdown/toggle/chevron.hbs","../../../../../src/components/hds/dropdown/toggle/chevron.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-dropdown-toggle-chevron\\\">\\n <Hds::Icon @name=\\\"chevron-down\\\" />\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsDropdownToggleChevronSignature {\n Element: HTMLDivElement;\n}\n\nconst HdsDropdownToggleChevron =\n templateOnlyComponent<HdsDropdownToggleChevronSignature>();\n\nexport default HdsDropdownToggleChevron;\n"],"names":["HdsDropdownToggleChevron","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,wBAAwB,GAC5BC,qBAAqB,EAAqC,CAAA;AAE5D,cAAAC,oBAAA,CAAAC,QAAA,EAAeH,wBAAwB,CAAA;;;;"}
@@ -11,8 +11,8 @@ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-
11
11
  */
12
12
 
13
13
  class HdsFlyoutBody extends Component {
14
- constructor(owner) {
15
- super(owner, {});
14
+ constructor(owner, args) {
15
+ super(owner, args);
16
16
  deprecate('The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.', false, {
17
17
  id: 'hds.components.flyout.body',
18
18
  until: '5.0.0',
@@ -1 +1 @@
1
- {"version":3,"file":"body.js","sources":["../../../../src/components/hds/flyout/body.hbs","../../../../src/components/hds/flyout/body.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<div class=\\\"hds-flyout__body\\\" ...attributes>\\n {{yield}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\nexport interface HdsFlyoutBodySignature {\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutBody extends Component<HdsFlyoutBodySignature> {\n constructor(owner: unknown) {\n super(owner, {});\n\n deprecate(\n 'The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.body',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutBody","Component","constructor","owner","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,mMAAmM;;ACDrO;AACA;AACA;AACA;;AAYe,MAAMA,aAAa,SAASC,SAAS,CAAyB;EAC3EC,WAAWA,CAACC,KAAc,EAAE;AAC1B,IAAA,KAAK,CAACA,KAAK,EAAE,EAAE,CAAC,CAAA;AAEhBC,IAAAA,SAAS,CACP,6MAA6M,EAC7M,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,4BAA4B;AAChCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBZ,aAAa,CAAA;;;;"}
1
+ {"version":3,"file":"body.js","sources":["../../../../src/components/hds/flyout/body.hbs","../../../../src/components/hds/flyout/body.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<div class=\\\"hds-flyout__body\\\" ...attributes>\\n {{yield}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\nexport interface HdsFlyoutBodySignature {\n // when component has no args, but constructor still needs to be defined, use `never`\n // see: https://github.com/hashicorp/design-system/pull/2511/files/f2146e5243d0431892a62d2fbf2889f1cbd3e525#r1815255004\n Args: never;\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutBody extends Component<HdsFlyoutBodySignature> {\n constructor(owner: unknown, args: HdsFlyoutBodySignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Body` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Body` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.body',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutBody","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,mMAAmM;;ACDrO;AACA;AACA;AACA;;AAee,MAAMA,aAAa,SAASC,SAAS,CAAyB;AAC3EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAoC,EAAE;AAChE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC,CAAA;AAElBC,IAAAA,SAAS,CACP,6MAA6M,EAC7M,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,4BAA4B;AAChCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,aAAa,CAAA;;;;"}
@@ -11,8 +11,8 @@ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-
11
11
  */
12
12
 
13
13
  class HdsFlyoutDescription extends Component {
14
- constructor(owner) {
15
- super(owner, {});
14
+ constructor(owner, args) {
15
+ super(owner, args);
16
16
  deprecate('The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.', false, {
17
17
  id: 'hds.components.flyout.description',
18
18
  until: '5.0.0',
@@ -1 +1 @@
1
- {"version":3,"file":"description.js","sources":["../../../../src/components/hds/flyout/description.hbs","../../../../src/components/hds/flyout/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<Hds::Text::Body class=\\\"hds-flyout__description\\\" @tag=\\\"div\\\" @size=\\\"200\\\" @color=\\\"primary\\\" ...attributes>\\n {{yield}}\\n</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsTextBodySignature } from '../text/body';\n\ninterface HdsFlyoutDescriptionSignature {\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFlyoutDescription extends Component<HdsFlyoutDescriptionSignature> {\n constructor(owner: unknown) {\n super(owner, {});\n\n deprecate(\n 'The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.description',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutDescription","Component","constructor","owner","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gRAAgR;;ACDlT;AACA;AACA;AACA;;AAae,MAAMA,oBAAoB,SAASC,SAAS,CAAgC;EACzFC,WAAWA,CAACC,KAAc,EAAE;AAC1B,IAAA,KAAK,CAACA,KAAK,EAAE,EAAE,CAAC,CAAA;AAEhBC,IAAAA,SAAS,CACP,2NAA2N,EAC3N,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,mCAAmC;AACvCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBZ,oBAAoB,CAAA;;;;"}
1
+ {"version":3,"file":"description.js","sources":["../../../../src/components/hds/flyout/description.hbs","../../../../src/components/hds/flyout/description.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<Hds::Text::Body class=\\\"hds-flyout__description\\\" @tag=\\\"div\\\" @size=\\\"200\\\" @color=\\\"primary\\\" ...attributes>\\n {{yield}}\\n</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsTextBodySignature } from '../text/body';\n\nexport interface HdsFlyoutDescriptionSignature {\n Args: never;\n Blocks: {\n default: [];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFlyoutDescription extends Component<HdsFlyoutDescriptionSignature> {\n constructor(owner: unknown, args: HdsFlyoutDescriptionSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Description` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Description` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.description',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutDescription","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,gRAAgR;;ACDlT;AACA;AACA;AACA;;AAce,MAAMA,oBAAoB,SAASC,SAAS,CAAgC;AACzFC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAA2C,EAAE;AACvE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC,CAAA;AAElBC,IAAAA,SAAS,CACP,2NAA2N,EAC3N,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,mCAAmC;AACvCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,oBAAoB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"footer.js","sources":["../../../../src/components/hds/flyout/footer.hbs","../../../../src/components/hds/flyout/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<div class=\\\"hds-flyout__footer\\\" ...attributes>\\n {{yield (hash close=@onDismiss)}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\ninterface HdsFlyoutFooterSignature {\n Args: {\n onDismiss?: (event: MouseEvent) => void;\n };\n Blocks: {\n default: [{ close?: (event: MouseEvent) => void }];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutFooter extends Component<HdsFlyoutFooterSignature> {\n constructor(owner: unknown, args: HdsFlyoutFooterSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Footer` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Footer` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.footer',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutFooter","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,6NAA6N;;ACD/P;AACA;AACA;AACA;;AAee,MAAMA,eAAe,SAASC,SAAS,CAA2B;AAC/EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAsC,EAAE;AAClE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC,CAAA;AAElBC,IAAAA,SAAS,CACP,iNAAiN,EACjN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,8BAA8B;AAClCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,eAAe,CAAA;;;;"}
1
+ {"version":3,"file":"footer.js","sources":["../../../../src/components/hds/flyout/footer.hbs","../../../../src/components/hds/flyout/footer.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{!\\n THIS SUBCOMPONENT IS NOW DEPRECATED\\n}}\\n<div class=\\\"hds-flyout__footer\\\" ...attributes>\\n {{yield (hash close=@onDismiss)}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\n\nexport interface HdsFlyoutFooterSignature {\n Args: {\n onDismiss?: (event: MouseEvent) => void;\n };\n Blocks: {\n default: [{ close?: (event: MouseEvent) => void }];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutFooter extends Component<HdsFlyoutFooterSignature> {\n constructor(owner: unknown, args: HdsFlyoutFooterSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Footer` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Footer` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.footer',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutFooter","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,6NAA6N;;ACD/P;AACA;AACA;AACA;;AAee,MAAMA,eAAe,SAASC,SAAS,CAA2B;AAC/EC,EAAAA,WAAWA,CAACC,KAAc,EAAEC,IAAsC,EAAE;AAClE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC,CAAA;AAElBC,IAAAA,SAAS,CACP,iNAAiN,EACjN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,8BAA8B;AAClCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAA;AACX,OAAA;AACF,KACF,CAAC,CAAA;AACH,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAlBoBb,eAAe,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/character-count/index.hbs","../../../../../src/components/hds/form/character-count/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Text::Body\\n @tag=\\\"div\\\"\\n @size=\\\"100\\\"\\n class={{this.classNames}}\\n id={{this.id}}\\n {{did-insert this.onInsert}}\\n ...attributes\\n aria-live=\\\"polite\\\"\\n>\\n {{#if (has-block)}}\\n {{yield\\n (hash\\n minLength=this.minLength\\n maxLength=this.maxLength\\n currentLength=this.currentLength\\n remaining=this.remaining\\n shortfall=this.shortfall\\n )\\n }}\\n {{else}}\\n {{this.message}}\\n {{/if}}\\n</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nconst ID_PREFIX = 'character-count-';\nconst NOOP = (): void => {};\n\ninterface HdsFormCharacterCountSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n maxLength?: number | string;\n minLength?: number | string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onInsert?: (element: HTMLElement, ...args: any[]) => void;\n value?: string;\n };\n Blocks: {\n default?: [\n {\n minLength?: number;\n maxLength?: number;\n currentLength?: number;\n remaining?: number;\n shortfall?: number;\n },\n ];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFormCharacterCount extends Component<HdsFormCharacterCountSignature> {\n // The current number of characters in @value\n get currentLength(): number {\n const { value } = this.args;\n return value ? value.length : 0;\n }\n\n // Inflector utility function to determine plural or singular for 'character' noun\n private _pluralize(\n count?: number,\n prefix = '',\n noun = 'character',\n suffix = 's'\n ): string {\n return `${count}${prefix ? ' ' + prefix : ''} ${noun}${\n count !== 1 ? suffix : ''\n }`;\n }\n\n /**\n * @param maxLength\n * @type {number}\n * @default null\n * @description The maximum number of characters allowed.\n */\n get maxLength(): number | undefined {\n const { maxLength } = this.args;\n if (maxLength) {\n return typeof maxLength === 'number' ? maxLength : parseInt(maxLength);\n }\n }\n\n /**\n * @param minLength\n * @type {number}\n * @default null\n * @description The minimum number of characters allowed.\n */\n get minLength(): number | undefined {\n const { minLength } = this.args;\n if (minLength) {\n return typeof minLength === 'number' ? minLength : parseInt(minLength);\n }\n }\n\n /**\n * @param remaining\n * @type {number}\n * @default null\n * @description The remaining number of characters.\n */\n get remaining(): number | undefined {\n return this.maxLength ? this.maxLength - this.currentLength : undefined;\n }\n\n /**\n * @param shortfall\n * @type {number}\n * @default null\n * @description The number of characters the content is falling short of.\n */\n get shortfall(): number | undefined {\n return this.minLength ? this.minLength - this.currentLength : undefined;\n }\n\n /**\n * @param message\n * @type {string}\n * @default null\n * @description The character count message presented to users\n */\n get message(): string {\n let messageText = '';\n if (this.minLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.minLength)} required`;\n } else if (this.minLength && this.currentLength < this.minLength) {\n messageText = `${this._pluralize(this.shortfall, 'more')} required`;\n } else if (this.maxLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.maxLength)} allowed`;\n } else if (this.maxLength && this.currentLength <= this.maxLength) {\n messageText = `${this._pluralize(this.remaining)} remaining`;\n } else if (\n this.maxLength &&\n this.remaining &&\n this.currentLength > this.maxLength\n ) {\n messageText = `Exceeded by ${this._pluralize(-this.remaining)}`;\n } else {\n messageText = `${this._pluralize(this.currentLength)} entered`;\n }\n return messageText;\n }\n\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\n }\n\n /**\n * @param onInsert\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onInsert(): (element: HTMLElement, ...args: any[]) => void {\n const { onInsert } = this.args;\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\n }\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-character-count'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormCharacterCount","Component","currentLength","value","args","length","_pluralize","count","prefix","noun","suffix","maxLength","parseInt","minLength","remaining","undefined","shortfall","message","messageText","id","controlId","onInsert","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ijBAAijB;;ACDnlB;AACA;AACA;AACA;;AAKA,MAAMA,SAAS,GAAG,kBAAkB,CAAA;AACpC,MAAMC,IAAI,GAAGA,MAAY,EAAE,CAAA;AA0BZ,MAAMC,qBAAqB,SAASC,SAAS,CAAiC;AAC3F;EACA,IAAIC,aAAaA,GAAW;IAC1B,MAAM;AAAEC,MAAAA,KAAAA;KAAO,GAAG,IAAI,CAACC,IAAI,CAAA;AAC3B,IAAA,OAAOD,KAAK,GAAGA,KAAK,CAACE,MAAM,GAAG,CAAC,CAAA;AACjC,GAAA;;AAEA;AACQC,EAAAA,UAAUA,CAChBC,KAAc,EACdC,MAAM,GAAG,EAAE,EACXC,IAAI,GAAG,WAAW,EAClBC,MAAM,GAAG,GAAG,EACJ;IACR,OAAO,CAAA,EAAGH,KAAK,CAAGC,EAAAA,MAAM,GAAG,GAAG,GAAGA,MAAM,GAAG,EAAE,IAAIC,IA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AGsB,EAAAA,SAAS,CAAE,CAAA,CAAA;AACnC,KAAA;AACA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACE;EACA,IAAIC,QAAQA,GAAmD;IAC7D,MAAM;AAAEA,MAAAA,QAAAA;KAAU,GAAG,IAAI,CAACjB,IAAI,CAAA;AAC9B;AACA,IAAA,IAAI,OAAOiB,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAC,MAAM;AACL,MAAA,OAAOtB,IAAI,CAAA;AACb,KAAA;AACF,GAAA;AACA;AACF;AACA;AACA;AACA;EACE,IAAIuB,UAAUA,GAAW;AACvB,IAAA,MAAMC,OAAO,GAAG,CAAC,0BAA0B,CAAC,CAAA;;AAE5C;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACnB,IAAI,CAACoB,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACrB,IAAI,CAACoB,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA1IoB5B,qBAAqB,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/character-count/index.hbs","../../../../../src/components/hds/form/character-count/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Text::Body\\n @tag=\\\"div\\\"\\n @size=\\\"100\\\"\\n class={{this.classNames}}\\n id={{this.id}}\\n {{did-insert this.onInsert}}\\n ...attributes\\n aria-live=\\\"polite\\\"\\n>\\n {{#if (has-block)}}\\n {{yield\\n (hash\\n minLength=this.minLength\\n maxLength=this.maxLength\\n currentLength=this.currentLength\\n remaining=this.remaining\\n shortfall=this.shortfall\\n )\\n }}\\n {{else}}\\n {{this.message}}\\n {{/if}}\\n</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport type { HdsTextBodySignature } from '../../text/body';\n\nconst ID_PREFIX = 'character-count-';\nconst NOOP = (): void => {};\n\nexport interface HdsFormCharacterCountSignature {\n Args: {\n contextualClass?: string;\n controlId?: string;\n maxLength?: number | string;\n minLength?: number | string;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onInsert?: (element: HTMLElement, ...args: any[]) => void;\n value?: string;\n };\n Blocks: {\n default?: [\n {\n minLength?: number;\n maxLength?: number;\n currentLength?: number;\n remaining?: number;\n shortfall?: number;\n },\n ];\n };\n Element: HdsTextBodySignature['Element'];\n}\n\nexport default class HdsFormCharacterCount extends Component<HdsFormCharacterCountSignature> {\n // The current number of characters in @value\n get currentLength(): number {\n const { value } = this.args;\n return value ? value.length : 0;\n }\n\n // Inflector utility function to determine plural or singular for 'character' noun\n private _pluralize(\n count?: number,\n prefix = '',\n noun = 'character',\n suffix = 's'\n ): string {\n return `${count}${prefix ? ' ' + prefix : ''} ${noun}${\n count !== 1 ? suffix : ''\n }`;\n }\n\n /**\n * @param maxLength\n * @type {number}\n * @default null\n * @description The maximum number of characters allowed.\n */\n get maxLength(): number | undefined {\n const { maxLength } = this.args;\n if (maxLength) {\n return typeof maxLength === 'number' ? maxLength : parseInt(maxLength);\n }\n }\n\n /**\n * @param minLength\n * @type {number}\n * @default null\n * @description The minimum number of characters allowed.\n */\n get minLength(): number | undefined {\n const { minLength } = this.args;\n if (minLength) {\n return typeof minLength === 'number' ? minLength : parseInt(minLength);\n }\n }\n\n /**\n * @param remaining\n * @type {number}\n * @default null\n * @description The remaining number of characters.\n */\n get remaining(): number | undefined {\n return this.maxLength ? this.maxLength - this.currentLength : undefined;\n }\n\n /**\n * @param shortfall\n * @type {number}\n * @default null\n * @description The number of characters the content is falling short of.\n */\n get shortfall(): number | undefined {\n return this.minLength ? this.minLength - this.currentLength : undefined;\n }\n\n /**\n * @param message\n * @type {string}\n * @default null\n * @description The character count message presented to users\n */\n get message(): string {\n let messageText = '';\n if (this.minLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.minLength)} required`;\n } else if (this.minLength && this.currentLength < this.minLength) {\n messageText = `${this._pluralize(this.shortfall, 'more')} required`;\n } else if (this.maxLength && this.currentLength === 0) {\n messageText = `${this._pluralize(this.maxLength)} allowed`;\n } else if (this.maxLength && this.currentLength <= this.maxLength) {\n messageText = `${this._pluralize(this.remaining)} remaining`;\n } else if (\n this.maxLength &&\n this.remaining &&\n this.currentLength > this.maxLength\n ) {\n messageText = `Exceeded by ${this._pluralize(-this.remaining)}`;\n } else {\n messageText = `${this._pluralize(this.currentLength)} entered`;\n }\n return messageText;\n }\n\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id(): string | null {\n const { controlId } = this.args;\n if (controlId) {\n return `${ID_PREFIX}${controlId}`;\n }\n return null;\n }\n\n /**\n * @param onInsert\n * @type {function}\n * @default () => {}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n get onInsert(): (element: HTMLElement, ...args: any[]) => void {\n const { onInsert } = this.args;\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\n }\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames(): string {\n const classes = ['hds-form-character-count'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormCharacterCount","Component","currentLength","value","args","length","_pluralize","count","prefix","noun","suffix","maxLength","parseInt","minLength","remaining","undefined","shortfall","message","messageText","id","controlId","onInsert","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ijBAAijB;;ACDnlB;AACA;AACA;AACA;;AAKA,MAAMA,SAAS,GAAG,kBAAkB,CAAA;AACpC,MAAMC,IAAI,GAAGA,MAAY,EAAE,CAAA;AA0BZ,MAAMC,qBAAqB,SAASC,SAAS,CAAiC;AAC3F;EACA,IAAIC,aAAaA,GAAW;IAC1B,MAAM;AAAEC,MAAAA,KAAAA;KAAO,GAAG,IAAI,CAACC,IAAI,CAAA;AAC3B,IAAA,OAAOD,KAAK,GAAGA,KAAK,CAACE,MAAM,GAAG,CAAC,CAAA;AACjC,GAAA;;AAEA;AACQC,EAAAA,UAAUA,CAChBC,KAAc,EACdC,MAAM,GAAG,EAAE,EACXC,IAAI,GAAG,WAAW,EAClBC,MAAM,GAAG,GAAG,EACJ;IACR,OAAO,CAAA,EAAGH,KAAK,CAAGC,EAAAA,MAAM,GAAG,GAAG,GAAGA,MAAM,GAAG,EAAE,IAAIC,IAAI,CAAA,EAClDF,KAAK,KAAK,CAAC,GAAGG,MAAM,GAAG,EAAE,CACzB,CAAA,CAAA;AACJ,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAuB;IAClC,MAAM;AAAEA,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACP,IAAI,CAAA;AAC/B,IAAA,IAAIO,SAAS,EAAE;MACb,OAAO,OAAOA,SAAS,KAAK,QAAQ,GAAGA,SAAS,GAAGC,QAAQ,CAACD,SAAS,CAAC,CAAA;AACxE,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,SAASA,GAAuB;IAClC,MAAM;AAAEA,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACT,IAAI,CAAA;AAC/B,IAAA,IAAIS,SAAS,EAAE;MAC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,IAAI,CAACnB,IAAI,CAACoB,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACrB,IAAI,CAACoB,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA1IoB5B,qBAAqB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/checkbox/group.hbs","../../../../../src/components/hds/form/checkbox/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 CheckboxField=(component\\n \\\"hds/form/checkbox/field\\\"\\n contextualClass=\\\"hds-form-group__control-field\\\"\\n isRequired=@isRequired\\n name=@name\\n extraAriaDescribedBy=F.ariaDescribedBy\\n )\\n )\\n }}\\n </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 { HdsFormCheckboxFieldSignature } from './field';\nimport type { HdsFormErrorSignature } from '../error';\n\ninterface HdsFormCheckboxGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike<HdsFormLegendSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n CheckboxField?: ComponentLike<HdsFormCheckboxFieldSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormCheckboxGroup =\n templateOnlyComponent<HdsFormCheckboxGroupSignature>();\n\nexport default HdsFormCheckboxGroup;\n"],"names":["HdsFormCheckboxGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mvBAAmvB;;ACDrxB;AACA;AACA;AACA;;AA2BA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC,CAAA;AAExD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"}
1
+ {"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/checkbox/group.hbs","../../../../../src/components/hds/form/checkbox/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 CheckboxField=(component\\n \\\"hds/form/checkbox/field\\\"\\n contextualClass=\\\"hds-form-group__control-field\\\"\\n isRequired=@isRequired\\n name=@name\\n extraAriaDescribedBy=F.ariaDescribedBy\\n )\\n )\\n }}\\n </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 { HdsFormCheckboxFieldSignature } from './field';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormCheckboxGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike<HdsFormLegendSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n CheckboxField?: ComponentLike<HdsFormCheckboxFieldSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormCheckboxGroup =\n templateOnlyComponent<HdsFormCheckboxGroupSignature>();\n\nexport default HdsFormCheckboxGroup;\n"],"names":["HdsFormCheckboxGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mvBAAmvB;;ACDrxB;AACA;AACA;AACA;;AA2BA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC,CAAA;AAExD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/file-input/base.hbs","../../../../../src/components/hds/form/file-input/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<input class=\\\"hds-form-file-input hds-typography-body-200\\\" ...attributes type=\\\"file\\\" />\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\ninterface HdsFormFileInputBaseSignature {\n Element: HTMLInputElement;\n}\n\nconst HdsFormFileInputBase =\n templateOnlyComponent<HdsFormFileInputBaseSignature>();\n\nexport default HdsFormFileInputBase;\n"],"names":["HdsFormFileInputBase","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC,CAAA;AAExD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"}
1
+ {"version":3,"file":"base.js","sources":["../../../../../src/components/hds/form/file-input/base.hbs","../../../../../src/components/hds/form/file-input/base.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<input class=\\\"hds-form-file-input hds-typography-body-200\\\" ...attributes type=\\\"file\\\" />\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormFileInputBaseSignature {\n Element: HTMLInputElement;\n}\n\nconst HdsFormFileInputBase =\n templateOnlyComponent<HdsFormFileInputBaseSignature>();\n\nexport default HdsFormFileInputBase;\n"],"names":["HdsFormFileInputBase","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,2KAA2K;;ACD7M;AACA;AACA;AACA;;AAQA,MAAMA,oBAAoB,GACxBC,qBAAqB,EAAiC,CAAA;AAExD,WAAAC,oBAAA,CAAAC,QAAA,EAAeH,oBAAoB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/file-input/field.hbs","../../../../../src/components/hds/form/file-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n <Hds::Form::FileInput::Base\\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 { ComponentLike } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormErrorSignature } from '../error';\n\ninterface HdsFormFileInputFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'>;\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 HdsFormFileInputField =\n templateOnlyComponent<HdsFormFileInputFieldSignature>();\n\nexport default HdsFormFileInputField;\n"],"names":["HdsFormFileInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iqBAAiqB;;ACDnsB;AACA;AACA;AACA;;AAuBA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/file-input/field.hbs","../../../../../src/components/hds/form/file-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n <Hds::Form::FileInput::Base\\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 { ComponentLike } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormErrorSignature } from '../error';\n\nexport interface HdsFormFileInputFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'>;\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 HdsFormFileInputField =\n templateOnlyComponent<HdsFormFileInputFieldSignature>();\n\nexport default HdsFormFileInputField;\n"],"names":["HdsFormFileInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,iqBAAiqB;;ACDnsB;AACA;AACA;AACA;;AAuBA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"}
@@ -1 +1 @@
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 HdsFormMaskedInputField =\n templateOnlyComponent<HdsFormMaskedInputFieldSignature>();\n\nexport default HdsFormMaskedInputField;\n"],"names":["HdsFormMaskedInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ipCAAipC;;ACDnrC;AACA;AACA;AACA;;AA8BA,MAAMA,uBAAuB,GAC3BC,qBAAqB,EAAoC,CAAA;AAE3D,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,uBAAuB,CAAA;;;;"}
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\nexport interface 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 HdsFormMaskedInputField =\n templateOnlyComponent<HdsFormMaskedInputFieldSignature>();\n\nexport default HdsFormMaskedInputField;\n"],"names":["HdsFormMaskedInputField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ipCAAipC;;ACDnrC;AACA;AACA;AACA;;AA8BA,MAAMA,uBAAuB,GAC3BC,qBAAqB,EAAoC,CAAA;AAE3D,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,uBAAuB,CAAA;;;;"}
@@ -1 +1 @@
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 HdsFormRadioGroup = templateOnlyComponent<HdsFormRadioGroupSignature>();\n\nexport default HdsFormRadioGroup;\n"],"names":["HdsFormRadioGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6uBAA6uB;;ACD/wB;AACA;AACA;AACA;;AA2BA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B,CAAA;AAE7E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"}
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\nexport interface 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 HdsFormRadioGroup = templateOnlyComponent<HdsFormRadioGroupSignature>();\n\nexport default HdsFormRadioGroup;\n"],"names":["HdsFormRadioGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6uBAA6uB;;ACD/wB;AACA;AACA;AACA;;AA2BA,MAAMA,iBAAiB,GAAGC,qBAAqB,EAA8B,CAAA;AAE7E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,iBAAiB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio-card/group.hbs","../../../../../src/components/hds/form/radio-card/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 HdsFormRadioCardGroup =\n templateOnlyComponent<HdsFormRadioCardGroupSignature>();\n\nexport default HdsFormRadioCardGroup;\n"],"names":["HdsFormRadioCardGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,m0BAAm0B;;ACDr2B;AACA;AACA;AACA;;AAiCA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"}
1
+ {"version":3,"file":"group.js","sources":["../../../../../src/components/hds/form/radio-card/group.hbs","../../../../../src/components/hds/form/radio-card/group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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\nexport interface HdsFormRadioCardGroupSignature {\n Args: HdsFormFieldsetSignature['Args'] & {\n controlPosition?: HdsFormRadioCardControlPositions;\n alignment?: HdsFormRadioCardAlignments;\n name?: string;\n };\n Blocks: {\n default: [\n {\n Legend?: ComponentLike<HdsFormLegendSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n RadioCard?: ComponentLike<HdsFormRadioCardSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n },\n ];\n };\n Element: HdsFormFieldsetSignature['Element'];\n}\n\nconst HdsFormRadioCardGroup =\n templateOnlyComponent<HdsFormRadioCardGroupSignature>();\n\nexport default HdsFormRadioCardGroup;\n"],"names":["HdsFormRadioCardGroup","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,m0BAAm0B;;ACDr2B;AACA;AACA;AACA;;AAiCA,MAAMA,qBAAqB,GACzBC,qBAAqB,EAAkC,CAAA;AAEzD,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,qBAAqB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/select/field.hbs","../../../../../src/components/hds/form/select/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n <Hds::Form::Select::Base\\n @isInvalid={{@isInvalid}}\\n @width={{@width}}\\n required={{@isRequired}}\\n ...attributes\\n id={{F.id}}\\n aria-describedby={{F.ariaDescribedBy}}\\n as |S|\\n >\\n {{yield (hash Options=S.Options)}}\\n </Hds::Form::Select::Base>\\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 } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormSelectBaseSignature } from './base';\nimport type { HdsYieldSignature } from '../../yield';\n\ninterface HdsFormSelectFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'> &\n HdsFormSelectBaseSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormSelectField = templateOnlyComponent<HdsFormSelectFieldSignature>();\n\nexport default HdsFormSelectField;\n"],"names":["HdsFormSelectField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+yBAA+yB;;ACDj1B;AACA;AACA;AACA;;AA2BA,MAAMA,kBAAkB,GAAGC,qBAAqB,EAA+B,CAAA;AAE/E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,kBAAkB,CAAA;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/select/field.hbs","../../../../../src/components/hds/form/select/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n <Hds::Form::Select::Base\\n @isInvalid={{@isInvalid}}\\n @width={{@width}}\\n required={{@isRequired}}\\n ...attributes\\n id={{F.id}}\\n aria-describedby={{F.ariaDescribedBy}}\\n as |S|\\n >\\n {{yield (hash Options=S.Options)}}\\n </Hds::Form::Select::Base>\\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 } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormSelectBaseSignature } from './base';\nimport type { HdsYieldSignature } from '../../yield';\n\nexport interface HdsFormSelectFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'> &\n HdsFormSelectBaseSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nconst HdsFormSelectField = templateOnlyComponent<HdsFormSelectFieldSignature>();\n\nexport default HdsFormSelectField;\n"],"names":["HdsFormSelectField","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,+yBAA+yB;;ACDj1B;AACA;AACA;AACA;;AA2BA,MAAMA,kBAAkB,GAAGC,qBAAqB,EAA+B,CAAA;AAE/E,YAAAC,oBAAA,CAAAC,QAAA,EAAeH,kBAAkB,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"after-options.js","sources":["../../../../../src/components/hds/form/super-select/after-options.hbs","../../../../../src/components/hds/form/super-select/after-options.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{#if @showNoSelectedMessage}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"200\\\" class=\\\"hds-form-super-select__no-options-selected hds-foreground-strong\\\">\\n No options selected\\n </Hds::Text::Body>\\n{{/if}}\\n<div class=\\\"hds-form-super-select__after-options\\\">\\n {{#if @content}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" class=\\\"hds-foreground-strong\\\">\\n {{@content}}\\n </Hds::Text::Body>\\n {{else}}\\n {{#if (or @showAll @showSelected @clearSelected)}}\\n {{#if @showOnlySelected}}\\n <Hds::Button @text=\\\"Show all\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @showAll}} />\\n {{else}}\\n <Hds::Button @text=\\\"Show selected\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @showSelected}} />\\n {{/if}}\\n {{#if (not-eq @selectedCount \\\"0\\\")}}\\n <Hds::Button @text=\\\"Clear selected\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @clearSelected}} />\\n {{/if}}\\n {{/if}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" class=\\\"hds-form-super-select__result-count hds-foreground-strong\\\">\\n {{@resultCountMessage}}\\n </Hds::Text::Body>\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\ninterface HdsFormSuperSelectAfterOptionsSignature {\n Args: {\n clearSelected: () => void;\n content?: string;\n resultCountMessage?: string;\n selectedCount?: string;\n showAll: () => void;\n showNoSelectedMessage?: boolean;\n showOnlySelected?: boolean;\n showSelected: () => void;\n };\n}\n\nconst HdsFormSuperSelectAfterOptions =\n templateOnlyComponent<HdsFormSuperSelectAfterOptionsSignature>();\n\nexport default HdsFormSuperSelectAfterOptions;\n"],"names":["HdsFormSuperSelectAfterOptions","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6sCAA6sC;;ACD/uC;AACA;AACA;AACA;;AAiBA,MAAMA,8BAA8B,GAClCC,qBAAqB,EAA2C,CAAA;AAElE,mBAAAC,oBAAA,CAAAC,QAAA,EAAeH,8BAA8B,CAAA;;;;"}
1
+ {"version":3,"file":"after-options.js","sources":["../../../../../src/components/hds/form/super-select/after-options.hbs","../../../../../src/components/hds/form/super-select/after-options.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n{{#if @showNoSelectedMessage}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"200\\\" class=\\\"hds-form-super-select__no-options-selected hds-foreground-strong\\\">\\n No options selected\\n </Hds::Text::Body>\\n{{/if}}\\n<div class=\\\"hds-form-super-select__after-options\\\">\\n {{#if @content}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" class=\\\"hds-foreground-strong\\\">\\n {{@content}}\\n </Hds::Text::Body>\\n {{else}}\\n {{#if (or @showAll @showSelected @clearSelected)}}\\n {{#if @showOnlySelected}}\\n <Hds::Button @text=\\\"Show all\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @showAll}} />\\n {{else}}\\n <Hds::Button @text=\\\"Show selected\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @showSelected}} />\\n {{/if}}\\n {{#if (not-eq @selectedCount \\\"0\\\")}}\\n <Hds::Button @text=\\\"Clear selected\\\" @size=\\\"small\\\" @color=\\\"secondary\\\" {{on \\\"click\\\" @clearSelected}} />\\n {{/if}}\\n {{/if}}\\n <Hds::Text::Body @tag=\\\"div\\\" @size=\\\"100\\\" class=\\\"hds-form-super-select__result-count hds-foreground-strong\\\">\\n {{@resultCountMessage}}\\n </Hds::Text::Body>\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormSuperSelectAfterOptionsSignature {\n Args: {\n clearSelected: () => void;\n content?: string;\n resultCountMessage?: string;\n selectedCount?: string;\n showAll: () => void;\n showNoSelectedMessage?: boolean;\n showOnlySelected?: boolean;\n showSelected: () => void;\n };\n}\n\nconst HdsFormSuperSelectAfterOptions =\n templateOnlyComponent<HdsFormSuperSelectAfterOptionsSignature>();\n\nexport default HdsFormSuperSelectAfterOptions;\n"],"names":["HdsFormSuperSelectAfterOptions","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,6sCAA6sC;;ACD/uC;AACA;AACA;AACA;;AAiBA,MAAMA,8BAA8B,GAClCC,qBAAqB,EAA2C,CAAA;AAElE,mBAAAC,oBAAA,CAAAC,QAAA,EAAeH,8BAA8B,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/field.hbs","../../../../../../src/components/hds/form/super-select/multiple/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n <Hds::Form::SuperSelect::Multiple::Base\\n @afterOptionsComponent={{@afterOptionsComponent}}\\n @afterOptionsContent={{@afterOptionsContent}}\\n @ariaDescribedBy={{F.ariaDescribedBy}}\\n @ariaInvalid={{@ariaInvalid}}\\n @ariaLabel={{@ariaLabel}}\\n @ariaLabelledBy={{(concat this.idPrefix F.id)}}\\n @beforeOptionsComponent={{@beforeOptionsComponent}}\\n @disabled={{@disabled}}\\n @dropdownClass={{@dropdownClass}}\\n @dropdownMaxWidth={{@dropdownMaxWidth}}\\n @extra={{@extra}}\\n @groupComponent={{@groupComponent}}\\n @horizontalPosition={{@horizontalPosition}}\\n @initiallyOpened={{@initiallyOpened}}\\n @labelText={{@labelText}}\\n @loadingMessage={{@loadingMessage}}\\n @matcher={{@matcher}}\\n @matchTriggerWidth={{@matchTriggerWidth}}\\n @noMatchesMessage={{@noMatchesMessage}}\\n @onBlur={{@onBlur}}\\n @onChange={{@onChange}}\\n @onClose={{@onClose}}\\n @onFocus={{@onFocus}}\\n @onInput={{@onInput}}\\n @onKeydown={{@onKeydown}}\\n @onOpen={{@onOpen}}\\n @options={{@options}}\\n @optionsComponent={{@optionsComponent}}\\n @placeholder={{@placeholder}}\\n @placeholderComponent={{@placeholderComponent}}\\n @preventScroll={{@preventScroll}}\\n @registerAPI={{@registerAPI}}\\n @renderInPlace={{true}}\\n @resultCountMessage={{@resultCountMessage}}\\n @scrollTo={{@scrollTo}}\\n @search={{@search}}\\n @searchEnabled={{@searchEnabled}}\\n @searchField={{@searchField}}\\n @searchMessage={{@searchMessage}}\\n @searchPlaceholder={{@searchPlaceholder}}\\n @selected={{@selected}}\\n @selectedItemComponent={{@selectedItemComponent}}\\n @showAfterOptions={{@showAfterOptions}}\\n @tabindex={{@tabindex}}\\n @triggerClass={{@triggerClass}}\\n @triggerComponent={{@triggerComponent}}\\n @triggerId={{F.id}}\\n @triggerRole={{@triggerRole}}\\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\\n @verticalPosition={{@verticalPosition}}\\n @isInvalid={{@isInvalid}}\\n ...attributes\\n as |options select|\\n >\\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n </Hds::Form::SuperSelect::Multiple::Base>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectMultipleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\ninterface HdsFormSuperSelectMultipleFieldSignature {\n Args: HdsFormSuperSelectMultipleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleField extends Component<HdsFormSuperSelectMultipleFieldSignature> {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectMultipleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,k2FAAk2F;;ACDp4F;AACA;AACA;AACA;;AAgCe,MAAMA,+BAA+B,SAASC,SAAS,CAA2C;EAC/G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS,CAAA;AAClB,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,+BAA+B,CAAA;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/multiple/field.hbs","../../../../../../src/components/hds/form/super-select/multiple/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n <Hds::Form::SuperSelect::Multiple::Base\\n @afterOptionsComponent={{@afterOptionsComponent}}\\n @afterOptionsContent={{@afterOptionsContent}}\\n @ariaDescribedBy={{F.ariaDescribedBy}}\\n @ariaInvalid={{@ariaInvalid}}\\n @ariaLabel={{@ariaLabel}}\\n @ariaLabelledBy={{(concat this.idPrefix F.id)}}\\n @beforeOptionsComponent={{@beforeOptionsComponent}}\\n @disabled={{@disabled}}\\n @dropdownClass={{@dropdownClass}}\\n @dropdownMaxWidth={{@dropdownMaxWidth}}\\n @extra={{@extra}}\\n @groupComponent={{@groupComponent}}\\n @horizontalPosition={{@horizontalPosition}}\\n @initiallyOpened={{@initiallyOpened}}\\n @labelText={{@labelText}}\\n @loadingMessage={{@loadingMessage}}\\n @matcher={{@matcher}}\\n @matchTriggerWidth={{@matchTriggerWidth}}\\n @noMatchesMessage={{@noMatchesMessage}}\\n @onBlur={{@onBlur}}\\n @onChange={{@onChange}}\\n @onClose={{@onClose}}\\n @onFocus={{@onFocus}}\\n @onInput={{@onInput}}\\n @onKeydown={{@onKeydown}}\\n @onOpen={{@onOpen}}\\n @options={{@options}}\\n @optionsComponent={{@optionsComponent}}\\n @placeholder={{@placeholder}}\\n @placeholderComponent={{@placeholderComponent}}\\n @preventScroll={{@preventScroll}}\\n @registerAPI={{@registerAPI}}\\n @renderInPlace={{true}}\\n @resultCountMessage={{@resultCountMessage}}\\n @scrollTo={{@scrollTo}}\\n @search={{@search}}\\n @searchEnabled={{@searchEnabled}}\\n @searchField={{@searchField}}\\n @searchMessage={{@searchMessage}}\\n @searchPlaceholder={{@searchPlaceholder}}\\n @selected={{@selected}}\\n @selectedItemComponent={{@selectedItemComponent}}\\n @showAfterOptions={{@showAfterOptions}}\\n @tabindex={{@tabindex}}\\n @triggerClass={{@triggerClass}}\\n @triggerComponent={{@triggerComponent}}\\n @triggerId={{F.id}}\\n @triggerRole={{@triggerRole}}\\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\\n @verticalPosition={{@verticalPosition}}\\n @isInvalid={{@isInvalid}}\\n ...attributes\\n as |options select|\\n >\\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n </Hds::Form::SuperSelect::Multiple::Base>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectMultipleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\nexport interface HdsFormSuperSelectMultipleFieldSignature {\n Args: HdsFormSuperSelectMultipleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectMultipleField extends Component<HdsFormSuperSelectMultipleFieldSignature> {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectMultipleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,k2FAAk2F;;ACDp4F;AACA;AACA;AACA;;AAgCe,MAAMA,+BAA+B,SAASC,SAAS,CAA2C;EAC/G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS,CAAA;AAClB,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,+BAA+B,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"option-group.js","sources":["../../../../../src/components/hds/form/super-select/option-group.hbs","../../../../../src/components/hds/form/super-select/option-group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<li class=\\\"hds-form-super-select__option-group\\\" role=\\\"group\\\" aria-labelledby={{this.groupTitleId}}>\\n <Hds::Text::Body\\n @tag=\\\"div\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"semibold\\\"\\n class=\\\"hds-form-super-select__option-group-title\\\"\\n id={{this.groupTitleId}}\\n >\\n {{@group.groupName}}\\n </Hds::Text::Body>\\n {{yield}}\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\ninterface HdsFormSuperSelectOptionGroupSignature {\n Args: {\n group: {\n groupName?: string;\n };\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class HdsFormSuperSelectOptionGroup extends Component<HdsFormSuperSelectOptionGroupSignature> {\n /**\n * Generates a unique ID for the group title\n * @return {string}\n */\n groupTitleId = 'group-title-' + guidFor(this);\n}\n"],"names":["HdsFormSuperSelectOptionGroup","Component","constructor","args","_defineProperty","guidFor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,0aAA0a;;ACkB7b,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAC3G;AACF;AACA;AACA;AAHEC,IAAAA,eAAA,uBAIe,cAAc,GAAGC,OAAO,CAAC,IAAI,CAAC,CAAA,CAAA;AAAA,GAAA;AAC/C,CAAA;AAACC,oBAAA,CAAAC,QAAA,EANoBP,6BAA6B,CAAA;;;;"}
1
+ {"version":3,"file":"option-group.js","sources":["../../../../../src/components/hds/form/super-select/option-group.hbs","../../../../../src/components/hds/form/super-select/option-group.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<li class=\\\"hds-form-super-select__option-group\\\" role=\\\"group\\\" aria-labelledby={{this.groupTitleId}}>\\n <Hds::Text::Body\\n @tag=\\\"div\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"semibold\\\"\\n class=\\\"hds-form-super-select__option-group-title\\\"\\n id={{this.groupTitleId}}\\n >\\n {{@group.groupName}}\\n </Hds::Text::Body>\\n {{yield}}\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { guidFor } from '@ember/object/internals';\n\nexport interface HdsFormSuperSelectOptionGroupSignature {\n Args: {\n group: {\n groupName?: string;\n };\n };\n Blocks: {\n default: [];\n };\n}\n\nexport default class HdsFormSuperSelectOptionGroup extends Component<HdsFormSuperSelectOptionGroupSignature> {\n /**\n * Generates a unique ID for the group title\n * @return {string}\n */\n groupTitleId = 'group-title-' + guidFor(this);\n}\n"],"names":["HdsFormSuperSelectOptionGroup","Component","constructor","args","_defineProperty","guidFor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;AACA,eAAe,kBAAkB,CAAC,0aAA0a;;ACkB7b,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAC3G;AACF;AACA;AACA;AAHEC,IAAAA,eAAA,uBAIe,cAAc,GAAGC,OAAO,CAAC,IAAI,CAAC,CAAA,CAAA;AAAA,GAAA;AAC/C,CAAA;AAACC,oBAAA,CAAAC,QAAA,EANoBP,6BAA6B,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"placeholder.js","sources":["../../../../../src/components/hds/form/super-select/placeholder.hbs","../../../../../src/components/hds/form/super-select/placeholder.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Text::Body @tag=\\\"span\\\" @size=\\\"200\\\" class=\\\"ember-power-select-placeholder\\\">{{@placeholder}}</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\ninterface HdsFormSuperSelectPlaceholderSignature {\n Args: {\n placeholder?: string;\n };\n}\n\nconst HdsFormSuperSelectPlaceholder =\n templateOnlyComponent<HdsFormSuperSelectPlaceholderSignature>();\n\nexport default HdsFormSuperSelectPlaceholder;\n"],"names":["HdsFormSuperSelectPlaceholder","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wMAAwM;;ACD1O;AACA;AACA;AACA;;AAUA,MAAMA,6BAA6B,GACjCC,qBAAqB,EAA0C,CAAA;AAEjE,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,6BAA6B,CAAA;;;;"}
1
+ {"version":3,"file":"placeholder.js","sources":["../../../../../src/components/hds/form/super-select/placeholder.hbs","../../../../../src/components/hds/form/super-select/placeholder.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Text::Body @tag=\\\"span\\\" @size=\\\"200\\\" class=\\\"ember-power-select-placeholder\\\">{{@placeholder}}</Hds::Text::Body>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport templateOnlyComponent from '@ember/component/template-only';\n\nexport interface HdsFormSuperSelectPlaceholderSignature {\n Args: {\n placeholder?: string;\n };\n}\n\nconst HdsFormSuperSelectPlaceholder =\n templateOnlyComponent<HdsFormSuperSelectPlaceholderSignature>();\n\nexport default HdsFormSuperSelectPlaceholder;\n"],"names":["HdsFormSuperSelectPlaceholder","templateOnlyComponent","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,wMAAwM;;ACD1O;AACA;AACA;AACA;;AAUA,MAAMA,6BAA6B,GACjCC,qBAAqB,EAA0C,CAAA;AAEjE,kBAAAC,oBAAA,CAAAC,QAAA,EAAeH,6BAA6B,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/single/field.hbs","../../../../../../src/components/hds/form/super-select/single/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n <Hds::Form::SuperSelect::Single::Base\\n @afterOptionsComponent={{@afterOptionsComponent}}\\n @afterOptionsContent={{@afterOptionsContent}}\\n @ariaDescribedBy={{F.ariaDescribedBy}}\\n @ariaInvalid={{@ariaInvalid}}\\n @ariaLabel={{@ariaLabel}}\\n @ariaLabelledBy={{(concat this.idPrefix F.id)}}\\n @beforeOptionsComponent={{@beforeOptionsComponent}}\\n @closeOnSelect={{@closeOnSelect}}\\n @disabled={{@disabled}}\\n @dropdownClass={{@dropdownClass}}\\n @dropdownMaxWidth={{@dropdownMaxWidth}}\\n @extra={{@extra}}\\n @groupComponent={{@groupComponent}}\\n @horizontalPosition={{@horizontalPosition}}\\n @initiallyOpened={{@initiallyOpened}}\\n @labelText={{@labelText}}\\n @loadingMessage={{@loadingMessage}}\\n @matcher={{@matcher}}\\n @matchTriggerWidth={{@matchTriggerWidth}}\\n @noMatchesMessage={{@noMatchesMessage}}\\n @onBlur={{@onBlur}}\\n @onChange={{@onChange}}\\n @onClose={{@onClose}}\\n @onFocus={{@onFocus}}\\n @onInput={{@onInput}}\\n @onKeydown={{@onKeydown}}\\n @onOpen={{@onOpen}}\\n @options={{@options}}\\n @optionsComponent={{@optionsComponent}}\\n @placeholder={{@placeholder}}\\n @placeholderComponent={{@placeholderComponent}}\\n @preventScroll={{@preventScroll}}\\n @registerAPI={{@registerAPI}}\\n @renderInPlace={{true}}\\n @resultCountMessage={{@resultCountMessage}}\\n @scrollTo={{@scrollTo}}\\n @search={{@search}}\\n @searchEnabled={{@searchEnabled}}\\n @searchField={{@searchField}}\\n @searchMessage={{@searchMessage}}\\n @searchPlaceholder={{@searchPlaceholder}}\\n @selected={{@selected}}\\n @selectedItemComponent={{@selectedItemComponent}}\\n @showAfterOptions={{@showAfterOptions}}\\n @tabindex={{@tabindex}}\\n @triggerClass={{@triggerClass}}\\n @triggerComponent={{@triggerComponent}}\\n @triggerId={{F.id}}\\n @triggerRole={{@triggerRole}}\\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\\n @verticalPosition={{@verticalPosition}}\\n @isInvalid={{@isInvalid}}\\n ...attributes\\n as |options select|\\n >\\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n </Hds::Form::SuperSelect::Single::Base>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectSingleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\ninterface HdsFormSuperSelectSingleFieldSignature {\n Args: HdsFormSuperSelectSingleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectSingleField extends Component<HdsFormSuperSelectSingleFieldSignature> {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectSingleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,u4FAAu4F;;ACDz6F;AACA;AACA;AACA;;AAgCe,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;EAC3G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS,CAAA;AAClB,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,6BAA6B,CAAA;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../../../../../src/components/hds/form/super-select/single/field.hbs","../../../../../../src/components/hds/form/super-select/single/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <F.Control>\\n {{! Important: if an argument is added in base.hbs, it must also be added/processed here }}\\n <Hds::Form::SuperSelect::Single::Base\\n @afterOptionsComponent={{@afterOptionsComponent}}\\n @afterOptionsContent={{@afterOptionsContent}}\\n @ariaDescribedBy={{F.ariaDescribedBy}}\\n @ariaInvalid={{@ariaInvalid}}\\n @ariaLabel={{@ariaLabel}}\\n @ariaLabelledBy={{(concat this.idPrefix F.id)}}\\n @beforeOptionsComponent={{@beforeOptionsComponent}}\\n @closeOnSelect={{@closeOnSelect}}\\n @disabled={{@disabled}}\\n @dropdownClass={{@dropdownClass}}\\n @dropdownMaxWidth={{@dropdownMaxWidth}}\\n @extra={{@extra}}\\n @groupComponent={{@groupComponent}}\\n @horizontalPosition={{@horizontalPosition}}\\n @initiallyOpened={{@initiallyOpened}}\\n @labelText={{@labelText}}\\n @loadingMessage={{@loadingMessage}}\\n @matcher={{@matcher}}\\n @matchTriggerWidth={{@matchTriggerWidth}}\\n @noMatchesMessage={{@noMatchesMessage}}\\n @onBlur={{@onBlur}}\\n @onChange={{@onChange}}\\n @onClose={{@onClose}}\\n @onFocus={{@onFocus}}\\n @onInput={{@onInput}}\\n @onKeydown={{@onKeydown}}\\n @onOpen={{@onOpen}}\\n @options={{@options}}\\n @optionsComponent={{@optionsComponent}}\\n @placeholder={{@placeholder}}\\n @placeholderComponent={{@placeholderComponent}}\\n @preventScroll={{@preventScroll}}\\n @registerAPI={{@registerAPI}}\\n @renderInPlace={{true}}\\n @resultCountMessage={{@resultCountMessage}}\\n @scrollTo={{@scrollTo}}\\n @search={{@search}}\\n @searchEnabled={{@searchEnabled}}\\n @searchField={{@searchField}}\\n @searchMessage={{@searchMessage}}\\n @searchPlaceholder={{@searchPlaceholder}}\\n @selected={{@selected}}\\n @selectedItemComponent={{@selectedItemComponent}}\\n @showAfterOptions={{@showAfterOptions}}\\n @tabindex={{@tabindex}}\\n @triggerClass={{@triggerClass}}\\n @triggerComponent={{@triggerComponent}}\\n @triggerId={{F.id}}\\n @triggerRole={{@triggerRole}}\\n @typeAheadOptionMatcher={{@typeAheadOptionMatcher}}\\n @verticalPosition={{@verticalPosition}}\\n @isInvalid={{@isInvalid}}\\n ...attributes\\n as |options select|\\n >\\n {{yield (hash options=options select=select Options=(component \\\"hds/yield\\\" options=options select=select))}}\\n </Hds::Form::SuperSelect::Single::Base>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { ID_PREFIX } from '../../label/index.ts';\n\nimport type { ComponentLike } from '@glint/template';\nimport type { HdsFormErrorSignature } from '../../error/index.ts';\nimport type { HdsFormFieldSignature } from '../../field/index.ts';\nimport type { HdsFormHelperTextSignature } from '../../helper-text/index.ts';\nimport type { HdsFormLabelSignature } from '../../label';\nimport type { HdsFormSuperSelectSingleBaseSignature } from './base.ts';\nimport type { Select as PowerSelect } from 'ember-power-select/components/power-select';\nimport type { HdsYieldSignature } from '../../../yield/index.ts';\n\nexport interface HdsFormSuperSelectSingleFieldSignature {\n Args: HdsFormSuperSelectSingleBaseSignature['Args'] &\n HdsFormFieldSignature['Args'];\n Blocks: {\n default: [\n {\n Label?: ComponentLike<HdsFormLabelSignature>;\n HelperText?: ComponentLike<HdsFormHelperTextSignature>;\n Error?: ComponentLike<HdsFormErrorSignature>;\n Options?: ComponentLike<HdsYieldSignature>;\n options?: unknown;\n select?: PowerSelect;\n },\n ];\n };\n Element: HdsFormFieldSignature['Element'];\n}\n\nexport default class HdsFormSuperSelectSingleField extends Component<HdsFormSuperSelectSingleFieldSignature> {\n get idPrefix(): string {\n return ID_PREFIX;\n }\n}\n"],"names":["HdsFormSuperSelectSingleField","Component","idPrefix","ID_PREFIX","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,u4FAAu4F;;ACDz6F;AACA;AACA;AACA;;AAgCe,MAAMA,6BAA6B,SAASC,SAAS,CAAyC;EAC3G,IAAIC,QAAQA,GAAW;AACrB,IAAA,OAAOC,SAAS,CAAA;AAClB,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAJoBL,6BAA6B,CAAA;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/text-input/field.hbs","../../../../../src/components/hds/form/text-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <div class=\\\"hds-form-text-input__wrapper\\\" {{style width=@width}}>\\n <Hds::Form::TextInput::Base\\n @type={{this.type}}\\n @value={{@value}}\\n @isInvalid={{@isInvalid}}\\n @isLoading={{@isLoading}}\\n @hasVisibilityToggle={{this.showVisibilityToggle}}\\n required={{@isRequired}}\\n ...attributes\\n id={{F.id}}\\n aria-describedby={{F.ariaDescribedBy}}\\n />\\n {{#if this.showVisibilityToggle}}\\n <Hds::Form::VisibilityToggle\\n @isVisible={{this.isPasswordMasked}}\\n @ariaLabel={{this.visibilityToggleAriaLabel}}\\n @ariaMessageText={{this.visibilityToggleAriaMessageText}}\\n aria-controls={{F.id}}\\n class=\\\"hds-form-text-input__visibility-toggle\\\"\\n {{on \\\"click\\\" this.onClickTogglePasswordReadability}}\\n />\\n {{/if}}\\n </div>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormTextInputBaseSignature } from './base';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormVisibilityToggleSignature } from '../visibility-toggle';\nimport HdsFormCharacterCountComponent from '../character-count/index.ts';\n\ninterface HdsFormTextInputFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'> &\n HdsFormTextInputBaseSignature['Args'] & {\n visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel'];\n visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText'];\n };\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\nexport default class HdsFormTextInputField extends Component<HdsFormTextInputFieldSignature> {\n @tracked isPasswordMasked = true;\n @tracked hasVisibilityToggle = this.args.hasVisibilityToggle ?? true;\n @tracked type = this.args.type ?? 'text';\n\n /**\n * @param showVisibilityToggle\n * @type {boolean}\n * @default false\n */\n get showVisibilityToggle(): boolean {\n return this.args.type === 'password' && this.hasVisibilityToggle;\n }\n\n /**\n * @param visibilityToggleAriaLabel\n * @type {string}\n * @default 'Show password'\n */\n get visibilityToggleAriaLabel(): string | undefined {\n if (this.args.visibilityToggleAriaLabel) {\n return this.args.visibilityToggleAriaLabel;\n } else if (this.isPasswordMasked) {\n return 'Show password';\n } else {\n return 'Hide password';\n }\n }\n\n /**\n * @param visibilityToggleAriaMessageText\n * @type {string}\n * @default 'Password is now hidden'\n */\n get visibilityToggleAriaMessageText(): string | undefined {\n if (this.args.visibilityToggleAriaMessageText) {\n return this.args.visibilityToggleAriaMessageText;\n } else if (this.isPasswordMasked) {\n return 'Password is hidden';\n } else {\n return 'Password is visible';\n }\n }\n\n @action\n onClickTogglePasswordReadability(): void {\n this.isPasswordMasked = !this.isPasswordMasked;\n this.type = this.isPasswordMasked ? 'password' : 'text';\n }\n}\n"],"names":["HdsFormTextInputField","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","showVisibilityToggle","type","hasVisibilityToggle","visibilityToggleAriaLabel","isPasswordMasked","visibilityToggleAriaMessageText","onClickTogglePasswordReadability","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,0+CAA0+C;;;ACuCv/CA,IAAAA,qBAAqB,IAAAC,MAAA,GAA3B,MAAMD,qBAAqB,SAASE,SAAS,CAAiC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,2BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,8BAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAAF,IAAAA,0BAAA,eAAAG,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAK3F;AACF;AACA;AACA;AACA;EACE,IAAIC,oBAAoBA,GAAY;IAClC,OAAO,IAAI,CAACL,IAAI,CAACM,IAAI,KAAK,UAAU,IAAI,IAAI,CAACC,mBAAmB,CAAA;AAClE,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,yBAAyBA,GAAuB;AAClD,IAAA,IAAI,IAAI,CAACR,IAAI,CAACQ,yBAAyB,EAAE;AACvC,MAAA,OAAO,IAAI,CAACR,IAAI,CAACQ,yBAAyB,CAAA;AAC5C,KAAC,MAAM,IAAI,IAAI,CAACC,gBAAgB,EAAE;AAChC,MAAA,OAAO,eAAe,CAAA;AACxB,KAAC,MAAM;AACL,MAAA,OAAO,eAAe,CAAA;AACxB,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,+BAA+BA,GAAuB;AACxD,IAAA,IAAI,IAAI,CAACV,IAAI,CAACU,+BAA+B,EAAE;AAC7C,MAAA,OAAO,IAAI,CAACV,IAAI,CAACU,+BAA+B,CAAA;AAClD,KAAC,MAAM,IAAI,IAAI,CAACD,gBAAgB,EAAE;AAChC,MAAA,OAAO,oBAAoB,CAAA;AAC7B,K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AA,CAAAgB,SAAA,EAAA,kCAAA,CAAA,EAAAhB,MAAA,CAAAgB,SAAA,IAAAhB,MAAA,EAAA;AA5CiCyB,oBAAA,CAAAC,QAAA,EAArB3B,qBAAqB,CAAA;;;;"}
1
+ {"version":3,"file":"field.js","sources":["../../../../../src/components/hds/form/text-input/field.hbs","../../../../../src/components/hds/form/text-input/field.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<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 <div class=\\\"hds-form-text-input__wrapper\\\" {{style width=@width}}>\\n <Hds::Form::TextInput::Base\\n @type={{this.type}}\\n @value={{@value}}\\n @isInvalid={{@isInvalid}}\\n @isLoading={{@isLoading}}\\n @hasVisibilityToggle={{this.showVisibilityToggle}}\\n required={{@isRequired}}\\n ...attributes\\n id={{F.id}}\\n aria-describedby={{F.ariaDescribedBy}}\\n />\\n {{#if this.showVisibilityToggle}}\\n <Hds::Form::VisibilityToggle\\n @isVisible={{this.isPasswordMasked}}\\n @ariaLabel={{this.visibilityToggleAriaLabel}}\\n @ariaMessageText={{this.visibilityToggleAriaMessageText}}\\n aria-controls={{F.id}}\\n class=\\\"hds-form-text-input__visibility-toggle\\\"\\n {{on \\\"click\\\" this.onClickTogglePasswordReadability}}\\n />\\n {{/if}}\\n </div>\\n </F.Control>\\n</Hds::Form::Field>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nimport type { ComponentLike, WithBoundArgs } from '@glint/template';\nimport type { HdsFormFieldSignature } from '../field';\nimport type { HdsFormTextInputBaseSignature } from './base';\nimport type { HdsFormErrorSignature } from '../error';\nimport type { HdsFormHelperTextSignature } from '../helper-text';\nimport type { HdsFormLabelSignature } from '../label';\nimport type { HdsFormVisibilityToggleSignature } from '../visibility-toggle';\nimport HdsFormCharacterCountComponent from '../character-count/index.ts';\n\nexport interface HdsFormTextInputFieldSignature {\n Args: Omit<HdsFormFieldSignature['Args'], 'contextualClass' | 'layout'> &\n HdsFormTextInputBaseSignature['Args'] & {\n visibilityToggleAriaLabel?: HdsFormVisibilityToggleSignature['Args']['ariaLabel'];\n visibilityToggleAriaMessageText?: HdsFormVisibilityToggleSignature['Args']['ariaMessageText'];\n };\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\nexport default class HdsFormTextInputField extends Component<HdsFormTextInputFieldSignature> {\n @tracked isPasswordMasked = true;\n @tracked hasVisibilityToggle = this.args.hasVisibilityToggle ?? true;\n @tracked type = this.args.type ?? 'text';\n\n /**\n * @param showVisibilityToggle\n * @type {boolean}\n * @default false\n */\n get showVisibilityToggle(): boolean {\n return this.args.type === 'password' && this.hasVisibilityToggle;\n }\n\n /**\n * @param visibilityToggleAriaLabel\n * @type {string}\n * @default 'Show password'\n */\n get visibilityToggleAriaLabel(): string | undefined {\n if (this.args.visibilityToggleAriaLabel) {\n return this.args.visibilityToggleAriaLabel;\n } else if (this.isPasswordMasked) {\n return 'Show password';\n } else {\n return 'Hide password';\n }\n }\n\n /**\n * @param visibilityToggleAriaMessageText\n * @type {string}\n * @default 'Password is now hidden'\n */\n get visibilityToggleAriaMessageText(): string | undefined {\n if (this.args.visibilityToggleAriaMessageText) {\n return this.args.visibilityToggleAriaMessageText;\n } else if (this.isPasswordMasked) {\n return 'Password is hidden';\n } else {\n return 'Password is visible';\n }\n }\n\n @action\n onClickTogglePasswordReadability(): void {\n this.isPasswordMasked = !this.isPasswordMasked;\n this.type = this.isPasswordMasked ? 'password' : 'text';\n }\n}\n"],"names":["HdsFormTextInputField","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","showVisibilityToggle","type","hasVisibilityToggle","visibilityToggleAriaLabel","isPasswordMasked","visibilityToggleAriaMessageText","onClickTogglePasswordReadability","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,0+CAA0+C;;;ACuCv/CA,IAAAA,qBAAqB,IAAAC,MAAA,GAA3B,MAAMD,qBAAqB,SAASE,SAAS,CAAiC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,2BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,8BAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAAF,IAAAA,0BAAA,eAAAG,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAK3F;AACF;AACA;AACA;AACA;EACE,IAAIC,oBAAoBA,GAAY;IAClC,OAAO,IAAI,CAACL,IAAI,CAACM,IAAI,KAAK,UAAU,IAAI,IAAI,CAACC,mBAAmB,CAAA;AAClE,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,yBAAyBA,GAAuB;AAClD,IAAA,IAAI,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