@hashicorp/design-system-components 4.5.0 → 4.5.2

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 (27) hide show
  1. package/declarations/components/hds/form/error/index.d.ts +6 -0
  2. package/declarations/components/hds/form/error/index.d.ts.map +1 -1
  3. package/declarations/components/hds/form/field/index.d.ts +3 -4
  4. package/declarations/components/hds/form/field/index.d.ts.map +1 -1
  5. package/declarations/components/hds/form/fieldset/index.d.ts +3 -4
  6. package/declarations/components/hds/form/fieldset/index.d.ts.map +1 -1
  7. package/declarations/components/hds/form/radio-card/index.d.ts +0 -3
  8. package/declarations/components/hds/form/radio-card/index.d.ts.map +1 -1
  9. package/declarations/template-registry.d.ts +2 -2
  10. package/declarations/template-registry.d.ts.map +1 -1
  11. package/declarations/utils/hds-aria-described-by.d.ts +20 -0
  12. package/declarations/utils/hds-aria-described-by.d.ts.map +1 -0
  13. package/dist/components/hds/form/error/index.js +18 -1
  14. package/dist/components/hds/form/error/index.js.map +1 -1
  15. package/dist/components/hds/form/field/index.js +12 -35
  16. package/dist/components/hds/form/field/index.js.map +1 -1
  17. package/dist/components/hds/form/fieldset/index.js +12 -31
  18. package/dist/components/hds/form/fieldset/index.js.map +1 -1
  19. package/dist/components/hds/form/radio-card/index.js +8 -35
  20. package/dist/components/hds/form/radio-card/index.js.map +1 -1
  21. package/dist/utils/hds-aria-described-by.js +73 -0
  22. package/dist/utils/hds-aria-described-by.js.map +1 -0
  23. package/package.json +2 -2
  24. package/declarations/utils/hds-set-aria-described-by.d.ts +0 -6
  25. package/declarations/utils/hds-set-aria-described-by.d.ts.map +0 -1
  26. package/dist/utils/hds-set-aria-described-by.js +0 -17
  27. package/dist/utils/hds-set-aria-described-by.js.map +0 -1
@@ -13,6 +13,12 @@ export default class HdsFormErrorIndexComponent extends Component<any> {
13
13
  * @default () => {}
14
14
  */
15
15
  get onInsert(): Function;
16
+ /**
17
+ * @param onRemove
18
+ * @type {function}
19
+ * @default () => {}
20
+ */
21
+ get onRemove(): Function;
16
22
  /**
17
23
  * Get the class names to apply to the component.
18
24
  * @method classNames
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/error/index.js"],"names":[],"mappings":"AAMA,iCAAkC;AAIlC;IAiFumH,uCAAwU;IAhF76H;;;;OAIG;IACH,wBAMC;IAED;;;;OAIG;IACH,yBASC;IAED;;;;OAIG;IACH,yBAWC;CAkCF;sBArFqB,oBAAoB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/error/index.js"],"names":[],"mappings":"AAMA,iCAAkC;AAIlC;IAiG2qG,uCAAwU;IAhGj/G;;;;OAIG;IACH,wBAMC;IAED;;;;OAIG;IACH,yBASC;IAED;;;;OAIG;IACH,yBASC;IACD;;;;OAIG;IACH,yBAWC;CAmCF;sBArGqB,oBAAoB"}
@@ -1,10 +1,9 @@
1
1
  export const LAYOUT_TYPES: string[];
2
- export default class HdsFormFieldIndexComponent extends Component<any> {
2
+ export default HdsFormFieldIndexComponent;
3
+ declare class HdsFormFieldIndexComponent extends Component<any> {
3
4
  constructor(owner: unknown, args: any);
4
- ariaDescribedBy: any;
5
- descriptors: any[];
6
5
  appendDescriptor(element: any): void;
7
- setAriaDescribedBy(): void;
6
+ removeDescriptor(element: any): void;
8
7
  /**
9
8
  * Sets the layout of the field
10
9
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/field/index.js"],"names":[],"mappings":"AAaA,oCAAiD;AAEjD;IAsHkqE,uCAAwU;IArHx+E,qBAA0D;IAC1D,mBAA0B;IAE1B,qCAGC;IAED,2BAMC;IAED;;;;;OAKG;IACH,qBAWC;IAED;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,yBAcC;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,0BAEC;CAqCF;sBA/HqB,oBAAoB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/field/index.js"],"names":[],"mappings":"AAeA,oCAAiD;;AAEjD;IAiH63E,uCAAwU;IA/GnsF,qCAGC;IAED,qCAEC;IAED;;;;;OAKG;IACH,qBAWC;IAED;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,yBAcC;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,0BAEC;CAoCF;sBA1HqB,oBAAoB"}
@@ -1,9 +1,8 @@
1
- export default class HdsFormFieldsetIndexComponent extends Component<any> {
1
+ export default HdsFormFieldsetIndexComponent;
2
+ declare class HdsFormFieldsetIndexComponent extends Component<any> {
2
3
  constructor(owner: unknown, args: any);
3
- ariaDescribedBy: any;
4
- descriptors: any[];
5
4
  appendDescriptor(element: any): void;
6
- setAriaDescribedBy(): void;
5
+ removeDescriptor(element: any): void;
7
6
  /**
8
7
  * Sets the layout of the group
9
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/fieldset/index.js"],"names":[],"mappings":"AAWA;IAkGw/F,uCAAwU;IAjG9zG,qBAA0D;IAC1D,mBAA0B;IAE1B,qCAGC;IAED,2BAGC;IAED;;;;;;OAMG;IACH,mBAEC;IAED;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,yBAQC;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,0BAEC;CAkCF;sBAvGqB,oBAAoB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/fieldset/index.js"],"names":[],"mappings":";AAcA;IAgGoiG,uCAAwU;IA9F12G,qCAGC;IAED,qCAEC;IAED;;;;;;OAMG;IACH,mBAEC;IAED;;OAEG;IACH,cAEC;IAED;;;;OAIG;IACH,yBAQC;IAED;;;;OAIG;IACH,0BAEC;IAED;;;;OAIG;IACH,0BAEC;CAiCF;sBAtGqB,oBAAoB"}
@@ -4,9 +4,6 @@ export const CONTROL_POSITIONS: string[];
4
4
  export const ALIGNMENTS: string[];
5
5
  export default class HdsFormRadioCardIndexComponent extends Component<any> {
6
6
  constructor(owner: unknown, args: any);
7
- ariaDescribedBy: any;
8
- descriptors: any[];
9
- setAriaDescribedBy(): void;
10
7
  /**
11
8
  * Sets the position of the control
12
9
  * Accepted values: buttom, left
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/index.js"],"names":[],"mappings":"AAYA,gDAAiD;AACjD,uCAAwC;AACxC,yCAAoD;AACpD,kCAA6C;AAE7C;IAsI+7C,uCAAwU;IArIrwD,qBAA0D;IAC1D,mBAA0B;IAE1B,2BAMC;IAED;;;;;;;OAOG;IACH,8BAWC;IAED;;;;;;;OAOG;IACH,wBAWC;IAED;;;;OAIG;IACH,yBAsBC;CAoDF;sBAjJqB,oBAAoB"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/hds/form/radio-card/index.js"],"names":[],"mappings":"AAQA,gDAAiD;AACjD,uCAAwC;AACxC,yCAAoD;AACpD,kCAA6C;AAE7C;IA0HkhE,uCAAwU;IAzHx1E;;;;;;;OAOG;IACH,8BAWC;IAED;;;;;;;OAOG;IACH,wBAWC;IAED;;;;OAIG;IACH,yBAsBC;CAmDF;sBAjIqB,oBAAoB"}
@@ -71,8 +71,8 @@ import type HdsTagComponent from './components/hds/tag';
71
71
  import type HdsToastComponent from './components/hds/toast';
72
72
  import type HdsTextCodeComponent from './components/hds/text/code';
73
73
  import type HdsYieldComponent from './components/hds/yield';
74
- import type HdsLinkToModelsHelper from './helpers/hds-link-to-models';
75
- import type HdsLinkToQueryHelper from './helpers/hds-link-to-query';
74
+ import type HdsLinkToModelsHelper from './helpers/hds-link-to-models.ts';
75
+ import type HdsLinkToQueryHelper from './helpers/hds-link-to-query.ts';
76
76
  import type HdsClipboardModifier from './modifiers/hds-clipboard.ts';
77
77
  export default interface HdsComponentsRegistry {
78
78
  'Hds::Accordion': typeof HdsAccordionComponent;
@@ -1 +1 @@
1
- {"version":3,"file":"template-registry.d.ts","sourceRoot":"","sources":["../src/template-registry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,qBAAqB,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,yBAAyB,MAAM,iCAAiC,CAAC;AAC7E,OAAO,KAAK,+BAA+B,MAAM,wCAAwC,CAAC;AAC1F,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,4BAA4B,MAAM,oCAAoC,CAAC;AACnF,OAAO,KAAK,sBAAsB,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,qBAAqB,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,8BAA8B,MAAM,uCAAuC,CAAC;AACxF,OAAO,KAAK,yBAAyB,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,+BAA+B,MAAM,yCAAyC,CAAC;AAC3F,OAAO,KAAK,yBAAyB,MAAM,kCAAkC,CAAC;AAC9E,OAAO,KAAK,+BAA+B,MAAM,yCAAyC,CAAC;AAC3F,OAAO,KAAK,iBAAiB,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,sBAAsB,MAAM,8BAA8B,CAAC;AACvE,OAAO,KAAK,kBAAkB,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,qBAAqB,MAAM,6BAA6B,CAAC;AACrE,OAAO,KAAK,oBAAoB,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,0BAA0B,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,0BAA0B,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,wBAAwB,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,0BAA0B,MAAM,yCAAyC,CAAC;AACtF,OAAO,KAAK,2BAA2B,MAAM,0CAA0C,CAAC;AACxF,OAAO,KAAK,4BAA4B,MAAM,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CAAC;IACnD,mBAAmB,EAAE,OAAO,oBAAoB,CAAC;IAGjD,eAAe,EAAE,OAAO,oBAAoB,CAAC;CAC9C"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+ import type Component from '@glimmer/component';
6
+ interface AriaDescribedByArgs {
7
+ Args: {
8
+ extraAriaDescribedBy: string;
9
+ };
10
+ }
11
+ interface AriaDescribedByComponent extends Component<AriaDescribedByArgs> {
12
+ __ARIA_DESCRIPTION_IDS__: string[];
13
+ ariaDescribedBy: string;
14
+ }
15
+ type ClassOf<T> = new () => T;
16
+ export declare function ariaDescribedBy(BaseComponent: ClassOf<AriaDescribedByComponent>): ClassOf<AriaDescribedByComponent>;
17
+ export declare function registerAriaDescriptionElement(component: AriaDescribedByComponent, element: HTMLElement): void;
18
+ export declare function unregisterAriaDescriptionElement(component: AriaDescribedByComponent, element: HTMLElement): void;
19
+ export {};
20
+ //# sourceMappingURL=hds-aria-described-by.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hds-aria-described-by.d.ts","sourceRoot":"","sources":["../../src/utils/hds-aria-described-by.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAC;AAmChD,UAAU,mBAAmB;IAC3B,IAAI,EAAE;QACJ,oBAAoB,EAAE,MAAM,CAAC;KAC9B,CAAC;CACH;AAED,UAAU,wBAAyB,SAAQ,SAAS,CAAC,mBAAmB,CAAC;IACvE,wBAAwB,EAAE,MAAM,EAAE,CAAC;IACnC,eAAe,EAAE,MAAM,CAAC;CACzB;AAGD,KAAK,OAAO,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC;AAE9B,wBAAgB,eAAe,CAC7B,aAAa,EAAE,OAAO,CAAC,wBAAwB,CAAC,GAC/C,OAAO,CAAC,wBAAwB,CAAC,CAenC;AAQD,wBAAgB,8BAA8B,CAC5C,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,WAAW,QAIrB;AAED,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,wBAAwB,EACnC,OAAO,EAAE,WAAW,QAIrB"}
@@ -2,7 +2,7 @@ import Component from '@glimmer/component';
2
2
  import { precompileTemplate } from '@ember/template-compilation';
3
3
  import { setComponentTemplate } from '@ember/component';
4
4
 
5
- var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} id={{this.id}} {{did-insert this.onInsert}} ...attributes>\n <FlightIcon class=\"hds-form-error__icon\" @name=\"alert-diamond-fill\" />\n <Hds::Text::Body class=\"hds-form-error__content\" @tag=\"div\" @size=\"100\" @weight=\"medium\">\n {{yield (hash Message=(component \"hds/form/error/message\"))}}\n </Hds::Text::Body>\n</div>");
5
+ var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} id={{this.id}} {{did-insert this.onInsert}} {{will-destroy this.onRemove}} ...attributes>\n <FlightIcon class=\"hds-form-error__icon\" @name=\"alert-diamond-fill\" />\n <Hds::Text::Body class=\"hds-form-error__content\" @tag=\"div\" @size=\"100\" @weight=\"medium\">\n {{yield (hash Message=(component \"hds/form/error/message\"))}}\n </Hds::Text::Body>\n</div>\n");
6
6
 
7
7
  /**
8
8
  * Copyright (c) HashiCorp, Inc.
@@ -45,6 +45,23 @@ class HdsFormErrorIndexComponent extends Component {
45
45
  }
46
46
  }
47
47
 
48
+ /**
49
+ * @param onRemove
50
+ * @type {function}
51
+ * @default () => {}
52
+ */
53
+ get onRemove() {
54
+ let {
55
+ onRemove
56
+ } = this.args;
57
+
58
+ // notice: this is a guard used to prevent triggering an error when the component is used as standalone element
59
+ if (typeof onRemove === 'function') {
60
+ return onRemove;
61
+ } else {
62
+ return NOOP;
63
+ }
64
+ }
48
65
  /**
49
66
  * Get the class names to apply to the component.
50
67
  * @method classNames
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/error/index.hbs","../../../../../src/components/hds/form/error/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class={{this.classNames}} id={{this.id}} {{did-insert this.onInsert}} ...attributes>\\n <FlightIcon class=\\\"hds-form-error__icon\\\" @name=\\\"alert-diamond-fill\\\" />\\n <Hds::Text::Body class=\\\"hds-form-error__content\\\" @tag=\\\"div\\\" @size=\\\"100\\\" @weight=\\\"medium\\\">\\n {{yield (hash Message=(component \\\"hds/form/error/message\\\"))}}\\n </Hds::Text::Body>\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nexport const ID_PREFIX = 'error-';\n\nconst NOOP = () => {};\n\nexport default class HdsFormErrorIndexComponent extends Component {\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id() {\n let { 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 get onInsert() {\n let { onInsert } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-form-error'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormErrorIndexComponent","Component","id","controlId","args","onInsert","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,weAAwe;;ACD1gB;AACA;AACA;AACA;;AAGO,MAAMA,SAAS,GAAG,SAAQ;AAEjC,MAAMC,IAAI,GAAGA,MAAM,EAAE,CAAA;AAEN,MAAMC,0BAA0B,SAASC,SAAS,CAAC;AAChE;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,IAAI;AAAEC,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACC,IAAI,CAAA;AAC7B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGL,EAAAA,SAAS,CAAGK,EAAAA,SAAS,CAAE,CAAA,CAAA;AACnC,KAAA;AACA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,QAAQA,GAAG;IACb,IAAI;AAAEA,MAAAA,QAAAA;KAAU,GAAG,IAAI,CAACD,IAAI,CAAA;;AAE5B;AACA,IAAA,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAC,MAAM;AACL,MAAA,OAAON,IAAI,CAAA;AACb,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIO,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAEhC;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACH,IAAI,CAACI,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACL,IAAI,CAACI,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA/CoBZ,0BAA0B,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/error/index.hbs","../../../../../src/components/hds/form/error/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class={{this.classNames}} id={{this.id}} {{did-insert this.onInsert}} {{will-destroy this.onRemove}} ...attributes>\\n <FlightIcon class=\\\"hds-form-error__icon\\\" @name=\\\"alert-diamond-fill\\\" />\\n <Hds::Text::Body class=\\\"hds-form-error__content\\\" @tag=\\\"div\\\" @size=\\\"100\\\" @weight=\\\"medium\\\">\\n {{yield (hash Message=(component \\\"hds/form/error/message\\\"))}}\\n </Hds::Text::Body>\\n</div>\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nexport const ID_PREFIX = 'error-';\n\nconst NOOP = () => {};\n\nexport default class HdsFormErrorIndexComponent extends Component {\n /**\n * Determines the unique ID to assign to the element\n * @method id\n * @return {(string|null)} The \"id\" attribute to apply to the element or null, if no controlId is provided\n */\n get id() {\n let { 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 get onInsert() {\n let { onInsert } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onInsert === 'function') {\n return onInsert;\n } else {\n return NOOP;\n }\n }\n\n /**\n * @param onRemove\n * @type {function}\n * @default () => {}\n */\n get onRemove() {\n let { onRemove } = this.args;\n\n // notice: this is a guard used to prevent triggering an error when the component is used as standalone element\n if (typeof onRemove === 'function') {\n return onRemove;\n } else {\n return NOOP;\n }\n }\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-form-error'];\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n // the reason for this is that the contextual component declarations don't pass attributes to the component\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["ID_PREFIX","NOOP","HdsFormErrorIndexComponent","Component","id","controlId","args","onInsert","onRemove","classNames","classes","contextualClass","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,ygBAAygB;;ACD3iB;AACA;AACA;AACA;;AAGO,MAAMA,SAAS,GAAG,SAAQ;AAEjC,MAAMC,IAAI,GAAGA,MAAM,EAAE,CAAA;AAEN,MAAMC,0BAA0B,SAASC,SAAS,CAAC;AAChE;AACF;AACA;AACA;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,IAAI;AAAEC,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACC,IAAI,CAAA;AAC7B,IAAA,IAAID,SAAS,EAAE;AACb,MAAA,OAAO,CAAGL,EAAAA,SAAS,CAAGK,EAAAA,SAAS,CAAE,CAAA,CAAA;AACnC,KAAA;AACA,IAAA,OAAO,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIE,QAAQA,GAAG;IACb,IAAI;AAAEA,MAAAA,QAAAA;KAAU,GAAG,IAAI,CAACD,IAAI,CAAA;;AAE5B;AACA,IAAA,IAAI,OAAOC,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAC,MAAM;AACL,MAAA,OAAON,IAAI,CAAA;AACb,KAAA;AACF,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIO,QAAQA,GAAG;IACb,IAAI;AAAEA,MAAAA,QAAAA;KAAU,GAAG,IAAI,CAACF,IAAI,CAAA;;AAE5B;AACA,IAAA,IAAI,OAAOE,QAAQ,KAAK,UAAU,EAAE;AAClC,MAAA,OAAOA,QAAQ,CAAA;AACjB,KAAC,MAAM;AACL,MAAA,OAAOP,IAAI,CAAA;AACb,KAAA;AACF,GAAA;AACA;AACF;AACA;AACA;AACA;EACE,IAAIQ,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAEhC;AACA;AACA;AACA,IAAA,IAAI,IAAI,CAACJ,IAAI,CAACK,eAAe,EAAE;MAC7BD,OAAO,CAACE,IAAI,CAAC,IAAI,CAACN,IAAI,CAACK,eAAe,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACG,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EA9DoBb,0BAA0B,CAAA;;;;"}
@@ -1,32 +1,23 @@
1
- import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-KIi_qCIU.js';
1
+ import { _ as _applyDecoratedDescriptor } from '../../../../_rollupPluginBabelHelpers-KIi_qCIU.js';
2
2
  import Component from '@glimmer/component';
3
- import { tracked } from '@glimmer/tracking';
4
3
  import { assert } from '@ember/debug';
5
4
  import { action } from '@ember/object';
6
- import { schedule } from '@ember/runloop';
7
5
  import { getElementId } from '../../../../utils/hds-get-element-id.js';
8
- import { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';
6
+ import { ariaDescribedBy, registerAriaDescriptionElement, unregisterAriaDescriptionElement } from '../../../../utils/hds-aria-described-by.js';
9
7
  import { precompileTemplate } from '@ember/template-compilation';
8
+ import { c } from 'decorator-transforms/runtime';
10
9
  import { setComponentTemplate } from '@ember/component';
11
10
 
12
- var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} {{did-insert this.setAriaDescribedBy}} ...attributes>\n {{yield\n (hash\n Label=(component\n \"hds/form/label\"\n controlId=this.id\n isRequired=this.isRequired\n isOptional=this.isOptional\n contextualClass=\"hds-form-field__label\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__helper-text\"\n )\n )\n }}\n <div class=\"hds-form-field__control\">\n {{yield (hash Control=(component \"hds/yield\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\n </div>\n {{yield\n (hash\n CharacterCount=(component\n \"hds/form/character-count\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__character-count\"\n )\n )\n }}\n {{yield\n (hash\n Error=(component\n \"hds/form/error\" controlId=this.id onInsert=this.appendDescriptor contextualClass=\"hds-form-field__error\"\n )\n )\n }}\n</div>");
11
+ var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class={{this.classNames}} ...attributes>\n {{yield\n (hash\n Label=(component\n \"hds/form/label\"\n controlId=this.id\n isRequired=this.isRequired\n isOptional=this.isOptional\n contextualClass=\"hds-form-field__label\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__helper-text\"\n )\n )\n }}\n <div class=\"hds-form-field__control\">\n {{yield (hash Control=(component \"hds/yield\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\n </div>\n {{yield\n (hash\n CharacterCount=(component\n \"hds/form/character-count\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-field__character-count\"\n )\n )\n }}\n {{yield\n (hash\n Error=(component\n \"hds/form/error\"\n controlId=this.id\n onInsert=this.appendDescriptor\n onRemove=this.removeDescriptor\n contextualClass=\"hds-form-field__error\"\n )\n )\n }}\n</div>\n");
13
12
 
14
- var _class, _descriptor, _descriptor2;
13
+ var _class;
15
14
  const LAYOUT_TYPES = ['vertical', 'flag'];
16
- let HdsFormFieldIndexComponent = (_class = class HdsFormFieldIndexComponent extends Component {
17
- constructor(...args) {
18
- super(...args);
19
- _initializerDefineProperty(this, "ariaDescribedBy", _descriptor, this);
20
- _initializerDefineProperty(this, "descriptors", _descriptor2, this);
21
- }
15
+ const HdsFormFieldIndexComponent = c((_class = class HdsFormFieldIndexComponent extends Component {
22
16
  appendDescriptor(element) {
23
- this.descriptors.push(element.id);
17
+ registerAriaDescriptionElement(this, element);
24
18
  }
25
- setAriaDescribedBy() {
26
- // we schedule this afterRender to capture all descriptors registered onInsert
27
- schedule('afterRender', () => {
28
- setAriaDescribedBy(this);
29
- });
19
+ removeDescriptor(element) {
20
+ unregisterAriaDescriptionElement(this, element);
30
21
  }
31
22
 
32
23
  /**
@@ -86,22 +77,8 @@ let HdsFormFieldIndexComponent = (_class = class HdsFormFieldIndexComponent exte
86
77
  get isOptional() {
87
78
  return this.args.isOptional || false;
88
79
  }
89
- }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "ariaDescribedBy", [tracked], {
90
- configurable: true,
91
- enumerable: true,
92
- writable: true,
93
- initializer: function () {
94
- return this.args.extraAriaDescribedBy;
95
- }
96
- }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "descriptors", [tracked], {
97
- configurable: true,
98
- enumerable: true,
99
- writable: true,
100
- initializer: function () {
101
- return [];
102
- }
103
- }), _applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "setAriaDescribedBy", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setAriaDescribedBy"), _class.prototype)), _class);
104
- setComponentTemplate(TEMPLATE, HdsFormFieldIndexComponent);
80
+ }, (_applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "removeDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "removeDescriptor"), _class.prototype)), _class), [ariaDescribedBy]);
81
+ var index = setComponentTemplate(TEMPLATE, HdsFormFieldIndexComponent);
105
82
 
106
- export { LAYOUT_TYPES, HdsFormFieldIndexComponent as default };
83
+ export { LAYOUT_TYPES, index as default };
107
84
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/field/index.hbs","../../../../../src/components/hds/form/field/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class={{this.classNames}} {{did-insert this.setAriaDescribedBy}} ...attributes>\\n {{yield\\n (hash\\n Label=(component\\n \\\"hds/form/label\\\"\\n controlId=this.id\\n isRequired=this.isRequired\\n isOptional=this.isOptional\\n contextualClass=\\\"hds-form-field__label\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__helper-text\\\"\\n )\\n )\\n }}\\n <div class=\\\"hds-form-field__control\\\">\\n {{yield (hash Control=(component \\\"hds/yield\\\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\\n </div>\\n {{yield\\n (hash\\n CharacterCount=(component\\n \\\"hds/form/character-count\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__character-count\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\" controlId=this.id onInsert=this.appendDescriptor contextualClass=\\\"hds-form-field__error\\\"\\n )\\n )\\n }}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { assert } from '@ember/debug';\nimport { action } from '@ember/object';\nimport { schedule } from '@ember/runloop';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\nimport { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';\n\nexport const LAYOUT_TYPES = ['vertical', 'flag'];\n\nexport default class HdsFormFieldIndexComponent extends Component {\n @tracked ariaDescribedBy = this.args.extraAriaDescribedBy;\n @tracked descriptors = [];\n\n @action\n appendDescriptor(element) {\n this.descriptors.push(element.id);\n }\n\n @action\n setAriaDescribedBy() {\n // we schedule this afterRender to capture all descriptors registered onInsert\n schedule('afterRender', () => {\n setAriaDescribedBy(this);\n });\n }\n\n /**\n * Sets the layout of the field\n *\n * @param layout\n * @type {string}\n */\n get layout() {\n let { layout } = this.args;\n\n assert(\n `@layout for \"Hds::Form::Field\" must be one of the following: ${LAYOUT_TYPES.join(\n ', '\n )}; received: ${layout}`,\n LAYOUT_TYPES.includes(layout)\n );\n\n return layout;\n }\n\n /**\n * Calculates the unique ID to assign to the form control\n */\n get id() {\n return getElementId(this);\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [];\n\n if (this.args.layout) {\n classes.push(`hds-form-field--layout-${this.layout}`);\n }\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired() {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional() {\n return this.args.isOptional || false;\n }\n}\n"],"names":["LAYOUT_TYPES","HdsFormFieldIndexComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","appendDescriptor","element","descriptors","push","id","setAriaDescribedBy","schedule","layout","assert","join","includes","getElementId","classNames","classes","contextualClass","isRequired","isOptional","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","extraAriaDescribedBy","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,6vCAA6vC;;;MCYlxCA,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAC;AAE3BC,IAAAA,0BAA0B,IAAAC,MAAA,GAAhC,MAAMD,0BAA0B,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,0BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,sBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;EAKhEC,gBAAgBA,CAACC,OAAO,EAAE;IACxB,IAAI,CAACC,WAAW,CAACC,IAAI,CAACF,OAAO,CAACG,EAAE,CAAC,CAAA;AACnC,GAAA;AAGAC,EAAAA,kBAAkBA,GAAG;AACnB;IACAC,QAAQ,CAAC,aAAa,EAAE,MAAM;MAC5BD,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAC1B,KAAC,CAAC,CAAA;AACJ,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,MAAMA,GAAG;IACX,IAAI;AAAEA,MAAAA,MAAAA;KAAQ,GAAG,IAAI,CAACX,IAAI,CAAA;AAE1BY,IAAAA,MAAM,CACJ,CAAgEjB,6DAAAA,EAAAA,YAAY,CAACkB,IAAI,CAC/E,IACF,CAAC,CAAA,YAAA,EAAeF,MAAM,CAAA,CAAE,EACxBhB,YAAY,CAACmB,QAAQ,CAACH,MAAM,CAC9B,CAAC,CAAA;AAED,IAAA,OAAOA,MAAM,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AAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAe,EAAE,CAAA;AAAA,GAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,EAAA,kBAAA,EAAA,CAExBO,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAAyB,SAAA,EAAAzB,kBAAAA,CAAAA,EAAAA,MAAA,CAAAyB,SAAA,CAAA,EAAAD,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,yBAKNO,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAlC,MAAA,CAAAyB,SAAA,EAAA,oBAAA,CAAA,EAAAzB,MAAA,CAAAyB,SAAA,IAAAzB,MAAA,EAAA;AATsCmC,oBAAA,CAAAC,QAAA,EAA1BrC,0BAA0B,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/field/index.hbs","../../../../../src/components/hds/form/field/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class={{this.classNames}} ...attributes>\\n {{yield\\n (hash\\n Label=(component\\n \\\"hds/form/label\\\"\\n controlId=this.id\\n isRequired=this.isRequired\\n isOptional=this.isOptional\\n contextualClass=\\\"hds-form-field__label\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__helper-text\\\"\\n )\\n )\\n }}\\n <div class=\\\"hds-form-field__control\\\">\\n {{yield (hash Control=(component \\\"hds/yield\\\") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}\\n </div>\\n {{yield\\n (hash\\n CharacterCount=(component\\n \\\"hds/form/character-count\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-field__character-count\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n onRemove=this.removeDescriptor\\n contextualClass=\\\"hds-form-field__error\\\"\\n )\\n )\\n }}\\n</div>\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { action } from '@ember/object';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\nimport {\n ariaDescribedBy,\n registerAriaDescriptionElement,\n unregisterAriaDescriptionElement,\n} from '../../../../utils/hds-aria-described-by.ts';\n\nexport const LAYOUT_TYPES = ['vertical', 'flag'];\n\n@ariaDescribedBy\nclass HdsFormFieldIndexComponent extends Component {\n @action\n appendDescriptor(element) {\n registerAriaDescriptionElement(this, element);\n }\n\n @action removeDescriptor(element) {\n unregisterAriaDescriptionElement(this, element);\n }\n\n /**\n * Sets the layout of the field\n *\n * @param layout\n * @type {string}\n */\n get layout() {\n let { layout } = this.args;\n\n assert(\n `@layout for \"Hds::Form::Field\" must be one of the following: ${LAYOUT_TYPES.join(\n ', '\n )}; received: ${layout}`,\n LAYOUT_TYPES.includes(layout)\n );\n\n return layout;\n }\n\n /**\n * Calculates the unique ID to assign to the form control\n */\n get id() {\n return getElementId(this);\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [];\n\n if (this.args.layout) {\n classes.push(`hds-form-field--layout-${this.layout}`);\n }\n\n // add a class based on the @contextualClass argument\n // notice: this will *not* be documented for public use\n if (this.args.contextualClass) {\n classes.push(this.args.contextualClass);\n }\n\n return classes.join(' ');\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired() {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional() {\n return this.args.isOptional || false;\n }\n}\n\nexport default HdsFormFieldIndexComponent;\n"],"names":["LAYOUT_TYPES","HdsFormFieldIndexComponent","c","_class","Component","appendDescriptor","element","registerAriaDescriptionElement","removeDescriptor","unregisterAriaDescriptionElement","layout","args","assert","join","includes","id","getElementId","classNames","classes","push","contextualClass","isRequired","isOptional","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","ariaDescribedBy","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,2xCAA2xC;;;MCchzCA,YAAY,GAAG,CAAC,UAAU,EAAE,MAAM,EAAC;AAAC,MAG3CC,0BAA0B,GAAAC,CAAA,EAAAC,MAAA,GAA1BF,MAAAA,0BAA0B,SAASG,SAAS,CAAC;EAEjDC,gBAAgBA,CAACC,OAAO,EAAE;AACxBC,IAAAA,8BAA8B,CAAC,IAAI,EAAED,OAAO,CAAC,CAAA;AAC/C,GAAA;EAEQE,gBAAgBA,CAACF,OAAO,EAAE;AAChCG,IAAAA,gCAAgC,CAAC,IAAI,EAAEH,OAAO,CAAC,CAAA;AACjD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAII,MAAMA,GAAG;IACX,IAAI;AAAEA,MAAAA,MAAAA;KAAQ,GAAG,IAAI,CAACC,IAAI,CAAA;AAE1BC,IAAAA,MAAM,CACJ,CAAgEZ,6DAAAA,EAAAA,YAAY,CAACa,IAAI,CAC/E,IACF,CAAC,CAAA,YAAA,EAAeH,MAAM,CAAA,CAAE,EACxBV,YAAY,CAACc,QAAQ,CAACJ,MAAM,CAC9B,CAAC,CAAA;AAED,IAAA,OAAOA,MAAM,CAAA;AACf,GAAA;;AAEA;AACF;AACA;EACE,IAAIK,EAAEA,GAAG;IACP,OAAOC,YAAY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A;;;;"}
@@ -1,26 +1,21 @@
1
- import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-KIi_qCIU.js';
1
+ import { _ as _applyDecoratedDescriptor } from '../../../../_rollupPluginBabelHelpers-KIi_qCIU.js';
2
2
  import Component from '@glimmer/component';
3
- import { tracked } from '@glimmer/tracking';
4
3
  import { action } from '@ember/object';
5
4
  import { getElementId } from '../../../../utils/hds-get-element-id.js';
6
- import { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';
5
+ import { ariaDescribedBy, registerAriaDescriptionElement, unregisterAriaDescriptionElement } from '../../../../utils/hds-aria-described-by.js';
6
+ import { c } from 'decorator-transforms/runtime';
7
7
  import { precompileTemplate } from '@ember/template-compilation';
8
8
  import { setComponentTemplate } from '@ember/component';
9
9
 
10
- var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<fieldset class={{this.classNames}} id={{this.id}} {{did-insert this.setAriaDescribedBy}} ...attributes>\n {{yield\n (hash\n Legend=(component\n \"hds/form/legend\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\"hds-form-group__legend\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-group__helper-text\"\n )\n )\n }}\n <div class=\"hds-form-group__control-fields-wrapper\">\n {{yield (hash Control=(component \"hds/yield\") ariaDescribedBy=this.ariaDescribedBy)}}\n </div>\n {{yield\n (hash\n Error=(component\n \"hds/form/error\" controlId=this.id onInsert=this.appendDescriptor contextualClass=\"hds-form-group__error\"\n )\n )\n }}\n</fieldset>");
10
+ var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<fieldset class={{this.classNames}} id={{this.id}} ...attributes>\n {{yield\n (hash\n Legend=(component\n \"hds/form/legend\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\"hds-form-group__legend\"\n )\n )\n }}\n {{yield\n (hash\n HelperText=(component\n \"hds/form/helper-text\"\n controlId=this.id\n onInsert=this.appendDescriptor\n contextualClass=\"hds-form-group__helper-text\"\n )\n )\n }}\n <div class=\"hds-form-group__control-fields-wrapper\">\n {{yield (hash Control=(component \"hds/yield\") ariaDescribedBy=this.ariaDescribedBy)}}\n </div>\n {{yield\n (hash\n Error=(component\n \"hds/form/error\" controlId=this.id onInsert=this.appendDescriptor onRemove=this.removeDescriptor contextualClass=\"hds-form-group__error\"\n )\n )\n }}\n</fieldset>\n");
11
11
 
12
- var _class, _descriptor, _descriptor2;
13
- let HdsFormFieldsetIndexComponent = (_class = class HdsFormFieldsetIndexComponent extends Component {
14
- constructor(...args) {
15
- super(...args);
16
- _initializerDefineProperty(this, "ariaDescribedBy", _descriptor, this);
17
- _initializerDefineProperty(this, "descriptors", _descriptor2, this);
18
- }
12
+ var _class;
13
+ const HdsFormFieldsetIndexComponent = c((_class = class HdsFormFieldsetIndexComponent extends Component {
19
14
  appendDescriptor(element) {
20
- this.descriptors.push(element.id);
15
+ registerAriaDescriptionElement(this, element);
21
16
  }
22
- setAriaDescribedBy() {
23
- setAriaDescribedBy(this);
17
+ removeDescriptor(element) {
18
+ unregisterAriaDescriptionElement(this, element);
24
19
  }
25
20
 
26
21
  /**
@@ -72,22 +67,8 @@ let HdsFormFieldsetIndexComponent = (_class = class HdsFormFieldsetIndexComponen
72
67
  get isOptional() {
73
68
  return this.args.isOptional || false;
74
69
  }
75
- }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "ariaDescribedBy", [tracked], {
76
- configurable: true,
77
- enumerable: true,
78
- writable: true,
79
- initializer: function () {
80
- return this.args.extraAriaDescribedBy;
81
- }
82
- }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "descriptors", [tracked], {
83
- configurable: true,
84
- enumerable: true,
85
- writable: true,
86
- initializer: function () {
87
- return [];
88
- }
89
- }), _applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "setAriaDescribedBy", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setAriaDescribedBy"), _class.prototype)), _class);
90
- setComponentTemplate(TEMPLATE, HdsFormFieldsetIndexComponent);
70
+ }, (_applyDecoratedDescriptor(_class.prototype, "appendDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "appendDescriptor"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "removeDescriptor", [action], Object.getOwnPropertyDescriptor(_class.prototype, "removeDescriptor"), _class.prototype)), _class), [ariaDescribedBy]);
71
+ var index = setComponentTemplate(TEMPLATE, HdsFormFieldsetIndexComponent);
91
72
 
92
- export { HdsFormFieldsetIndexComponent as default };
73
+ export { index as default };
93
74
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/fieldset/index.hbs","../../../../../src/components/hds/form/fieldset/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<fieldset class={{this.classNames}} id={{this.id}} {{did-insert this.setAriaDescribedBy}} ...attributes>\\n {{yield\\n (hash\\n Legend=(component\\n \\\"hds/form/legend\\\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\\\"hds-form-group__legend\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-group__helper-text\\\"\\n )\\n )\\n }}\\n <div class=\\\"hds-form-group__control-fields-wrapper\\\">\\n {{yield (hash Control=(component \\\"hds/yield\\\") ariaDescribedBy=this.ariaDescribedBy)}}\\n </div>\\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\" controlId=this.id onInsert=this.appendDescriptor contextualClass=\\\"hds-form-group__error\\\"\\n )\\n )\\n }}\\n</fieldset>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\nimport { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';\n\nexport default class HdsFormFieldsetIndexComponent extends Component {\n @tracked ariaDescribedBy = this.args.extraAriaDescribedBy;\n @tracked descriptors = [];\n\n @action\n appendDescriptor(element) {\n this.descriptors.push(element.id);\n }\n\n @action\n setAriaDescribedBy() {\n setAriaDescribedBy(this);\n }\n\n /**\n * Sets the layout of the group\n *\n * @param layout\n * @type {enum}\n * @default 'vertical'\n */\n get layout() {\n return this.args.layout ?? 'vertical';\n }\n\n /**\n * Calculates the unique ID to assign to the fieldset\n */\n get id() {\n return getElementId(this);\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n // we just need a class for the layout\n let classes = ['hds-form-group'];\n\n // add a class based on the @layout argument\n classes.push(`hds-form-group--layout-${this.layout}`);\n\n return classes.join(' ');\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired() {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional() {\n return this.args.isOptional || false;\n }\n}\n"],"names":["HdsFormFieldsetIndexComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","appendDescriptor","element","descriptors","push","id","setAriaDescribedBy","layout","getElementId","classNames","classes","join","isRequired","isOptional","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","extraAriaDescribedBy","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,o/BAAo/B;;;ACUjgCA,IAAAA,6BAA6B,IAAAC,MAAA,GAAnC,MAAMD,6BAA6B,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,0BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,sBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;EAKnEC,gBAAgBA,CAACC,OAAO,EAAE;IACxB,IAAI,CAACC,WAAW,CAACC,IAAI,CAACF,OAAO,CAACG,EAAE,CAAC,CAAA;AACnC,GAAA;AAGAC,EAAAA,kBAAkBA,GAAG;IACnBA,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAC1B,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,MAAMA,GAAG;AACX,IAAA,OAAO,IAAI,CAACV,IAAI,CAACU,MAAM,IAAI,UAAU,CAAA;AACvC,GAAA;;AAEA;AACF;AACA;EACE,IAAIF,EAAEA,GAAG;IACP,OAAOG,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf;AACA,IAAA,IAAIC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAEhC;IACAA,OAAO,CAACN,IAAI,CAAC,CAAA,uBAAA,EAA0B,IAAI,CAACG,MAAM,EAAE,CAAC,CAAA;AAErD,IAAA,OAAOG,OAAO,CAACC,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,OAAO,I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.hbs","../../../../../src/components/hds/form/fieldset/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<fieldset class={{this.classNames}} id={{this.id}} ...attributes>\\n {{yield\\n (hash\\n Legend=(component\\n \\\"hds/form/legend\\\" isRequired=this.isRequired isOptional=this.isOptional contextualClass=\\\"hds-form-group__legend\\\"\\n )\\n )\\n }}\\n {{yield\\n (hash\\n HelperText=(component\\n \\\"hds/form/helper-text\\\"\\n controlId=this.id\\n onInsert=this.appendDescriptor\\n contextualClass=\\\"hds-form-group__helper-text\\\"\\n )\\n )\\n }}\\n <div class=\\\"hds-form-group__control-fields-wrapper\\\">\\n {{yield (hash Control=(component \\\"hds/yield\\\") ariaDescribedBy=this.ariaDescribedBy)}}\\n </div>\\n {{yield\\n (hash\\n Error=(component\\n \\\"hds/form/error\\\" controlId=this.id onInsert=this.appendDescriptor onRemove=this.removeDescriptor contextualClass=\\\"hds-form-group__error\\\"\\n )\\n )\\n }}\\n</fieldset>\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { getElementId } from '../../../../utils/hds-get-element-id.js';\nimport {\n ariaDescribedBy,\n registerAriaDescriptionElement,\n unregisterAriaDescriptionElement,\n} from '../../../../utils/hds-aria-described-by.ts';\n\n@ariaDescribedBy\nclass HdsFormFieldsetIndexComponent extends Component {\n @action\n appendDescriptor(element) {\n registerAriaDescriptionElement(this, element);\n }\n\n @action removeDescriptor(element) {\n unregisterAriaDescriptionElement(this, element);\n }\n\n /**\n * Sets the layout of the group\n *\n * @param layout\n * @type {enum}\n * @default 'vertical'\n */\n get layout() {\n return this.args.layout ?? 'vertical';\n }\n\n /**\n * Calculates the unique ID to assign to the fieldset\n */\n get id() {\n return getElementId(this);\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n // we just need a class for the layout\n let classes = ['hds-form-group'];\n\n // add a class based on the @layout argument\n classes.push(`hds-form-group--layout-${this.layout}`);\n\n return classes.join(' ');\n }\n\n /**\n * @param isRequired\n * @type {boolean}\n * @default false\n */\n get isRequired() {\n return this.args.isRequired || false;\n }\n\n /**\n * @param isOptional\n * @type {boolean}\n * @default false\n */\n get isOptional() {\n return this.args.isOptional || false;\n }\n}\n\nexport default HdsFormFieldsetIndexComponent;\n"],"names":["HdsFormFieldsetIndexComponent","c","_class","Component","appendDescriptor","element","registerAriaDescriptionElement","removeDescriptor","unregisterAriaDescriptionElement","layout","args","id","getElementId","classNames","classes","push","join","isRequired","isOptional","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","ariaDescribedBy","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;AACA,eAAe,kBAAkB,CAAC,8+BAA8+B;;;ACW59B,MAG9CA,6BAA6B,GAAAC,CAAA,EAAAC,MAAA,GAA7BF,MAAAA,6BAA6B,SAASG,SAAS,CAAC;EAEpDC,gBAAgBA,CAACC,OAAO,EAAE;AACxBC,IAAAA,8BAA8B,CAAC,IAAI,EAAED,OAAO,CAAC,CAAA;AAC/C,GAAA;EAEQE,gBAAgBA,CAACF,OAAO,EAAE;AAChCG,IAAAA,gCAAgC,CAAC,IAAI,EAAEH,OAAO,CAAC,CAAA;AACjD,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;EACE,IAAII,MAAMA,GAAG;AACX,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,MAAM,IAAI,UAAU,CAAA;AACvC,GAAA;;AAEA;AACF;AACA;EACE,IAAIE,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf;AACA,IAAA,IAAIC,OAAO,GAAG,CAAC,gBAAgB,CAAC,CAAA;;AAEhC;IACAA,OAAO,CAACC,IAAI,CAAC,CAAA,uBAAA,EAA0B,IAAI,CAACN,MAAM,EAAE,CAAC,CAAA;AAErD,IAAA,OAAOK,OAAO,CAACE,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,OAAO,IAAI,CAACP,IAAI,CAACO,UAAU,IAAI,KAAK,CAAA;AACtC,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,OAAO,IAAI,CAACR,IAAI,CAACQ,UAAU,IAAI,KAAK,CAAA;AACtC,GAAA;AACF,CAAC,GAAAC,yBAAA,CAAAjB,MAAA,CAAAkB,SAAA,uBA3DEC,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAkB,SAAA,EAAAlB,kBAAAA,CAAAA,EAAAA,MAAA,CAAAkB,SAAA,CAAA,EAAAD,yBAAA,CAAAjB,MAAA,CAAAkB,SAAA,EAAA,kBAAA,EAAA,CAKNC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAArB,MAAA,CAAAkB,SAAA,uBAAAlB,MAAA,CAAAkB,SAAA,CAAAlB,GAAAA,MAAA,IAPRsB,eAAe,CAAA,CAAA,CAAA;AA+DhB,YAAAC,oBAAA,CAAAC,QAAA,EAAe1B,6BAA6B,CAAA;;;;"}
@@ -1,33 +1,20 @@
1
- import { _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-KIi_qCIU.js';
2
1
  import Component from '@glimmer/component';
3
- import { tracked } from '@glimmer/tracking';
4
- import { action } from '@ember/object';
5
2
  import { assert } from '@ember/debug';
6
- import { schedule } from '@ember/runloop';
7
- import { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';
8
3
  import { precompileTemplate } from '@ember/template-compilation';
9
4
  import { setComponentTemplate } from '@ember/component';
10
5
 
11
- var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<label class={{this.classNames}} {{did-insert this.setAriaDescribedBy}} {{style maxWidth=@maxWidth}}>\n <span class=\"hds-form-radio-card__content\">\n {{yield (hash Icon=(component \"flight-icon\" size=\"24\" isInlineBlock=false))}}\n {{yield (hash Label=(component \"hds/form/radio-card/label\"))}}\n {{yield (hash Badge=(component \"hds/badge\"))}}\n {{yield (hash Description=(component \"hds/form/radio-card/description\"))}}\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </span>\n <span class=\"hds-form-radio-card__control-wrapper\">\n <Hds::Form::Radio::Base\n class=\"hds-form-radio-card__control\"\n @value={{@value}}\n name={{@name}}\n checked={{@checked}}\n disabled={{@disabled}}\n aria-describedby={{this.ariaDescribedBy}}\n ...attributes\n />\n </span>\n</label>");
6
+ var TEMPLATE = precompileTemplate("{{! @glint-nocheck: not typesafe yet }}\n{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<label class={{this.classNames}} {{style maxWidth=@maxWidth}}>\n <span class=\"hds-form-radio-card__content\">\n {{yield (hash Icon=(component \"flight-icon\" size=\"24\" isInlineBlock=false))}}\n {{yield (hash Label=(component \"hds/form/radio-card/label\"))}}\n {{yield (hash Badge=(component \"hds/badge\"))}}\n {{yield (hash Description=(component \"hds/form/radio-card/description\"))}}\n {{yield (hash Generic=(component \"hds/yield\"))}}\n </span>\n <span class=\"hds-form-radio-card__control-wrapper\">\n <Hds::Form::Radio::Base\n class=\"hds-form-radio-card__control\"\n @value={{@value}}\n name={{@name}}\n checked={{@checked}}\n disabled={{@disabled}}\n aria-describedby={{@extraAriaDescribedBy}}\n ...attributes\n />\n </span>\n</label>\n");
7
+
8
+ /**
9
+ * Copyright (c) HashiCorp, Inc.
10
+ * SPDX-License-Identifier: MPL-2.0
11
+ */
12
12
 
13
- var _class, _descriptor, _descriptor2;
14
13
  const DEFAULT_CONTROL_POSITION = 'bottom';
15
14
  const DEFAULT_ALIGNMENT = 'left';
16
15
  const CONTROL_POSITIONS = ['bottom', 'left'];
17
16
  const ALIGNMENTS = ['left', 'center'];
18
- let HdsFormRadioCardIndexComponent = (_class = class HdsFormRadioCardIndexComponent extends Component {
19
- constructor(...args) {
20
- super(...args);
21
- _initializerDefineProperty(this, "ariaDescribedBy", _descriptor, this);
22
- _initializerDefineProperty(this, "descriptors", _descriptor2, this);
23
- }
24
- setAriaDescribedBy() {
25
- // we schedule this afterRender to capture all descriptors registered onInsert
26
- schedule('afterRender', () => {
27
- setAriaDescribedBy(this);
28
- });
29
- }
30
-
17
+ class HdsFormRadioCardIndexComponent extends Component {
31
18
  /**
32
19
  * Sets the position of the control
33
20
  * Accepted values: buttom, left
@@ -86,21 +73,7 @@ let HdsFormRadioCardIndexComponent = (_class = class HdsFormRadioCardIndexCompon
86
73
  classes.push(`hds-form-radio-card--align-${this.alignment}`);
87
74
  return classes.join(' ');
88
75
  }
89
- }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "ariaDescribedBy", [tracked], {
90
- configurable: true,
91
- enumerable: true,
92
- writable: true,
93
- initializer: function () {
94
- return this.args.extraAriaDescribedBy;
95
- }
96
- }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "descriptors", [tracked], {
97
- configurable: true,
98
- enumerable: true,
99
- writable: true,
100
- initializer: function () {
101
- return [];
102
- }
103
- }), _applyDecoratedDescriptor(_class.prototype, "setAriaDescribedBy", [action], Object.getOwnPropertyDescriptor(_class.prototype, "setAriaDescribedBy"), _class.prototype)), _class);
76
+ }
104
77
  setComponentTemplate(TEMPLATE, HdsFormRadioCardIndexComponent);
105
78
 
106
79
  export { ALIGNMENTS, CONTROL_POSITIONS, DEFAULT_ALIGNMENT, DEFAULT_CONTROL_POSITION, HdsFormRadioCardIndexComponent as default };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/radio-card/index.hbs","../../../../../src/components/hds/form/radio-card/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<label class={{this.classNames}} {{did-insert this.setAriaDescribedBy}} {{style maxWidth=@maxWidth}}>\\n <span class=\\\"hds-form-radio-card__content\\\">\\n {{yield (hash Icon=(component \\\"flight-icon\\\" size=\\\"24\\\" isInlineBlock=false))}}\\n {{yield (hash Label=(component \\\"hds/form/radio-card/label\\\"))}}\\n {{yield (hash Badge=(component \\\"hds/badge\\\"))}}\\n {{yield (hash Description=(component \\\"hds/form/radio-card/description\\\"))}}\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </span>\\n <span class=\\\"hds-form-radio-card__control-wrapper\\\">\\n <Hds::Form::Radio::Base\\n class=\\\"hds-form-radio-card__control\\\"\\n @value={{@value}}\\n name={{@name}}\\n checked={{@checked}}\\n disabled={{@disabled}}\\n aria-describedby={{this.ariaDescribedBy}}\\n ...attributes\\n />\\n </span>\\n</label>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\nimport { schedule } from '@ember/runloop';\nimport { setAriaDescribedBy } from '../../../../utils/hds-set-aria-described-by.js';\n\nexport const DEFAULT_CONTROL_POSITION = 'bottom';\nexport const DEFAULT_ALIGNMENT = 'left';\nexport const CONTROL_POSITIONS = ['bottom', 'left'];\nexport const ALIGNMENTS = ['left', 'center'];\n\nexport default class HdsFormRadioCardIndexComponent extends Component {\n @tracked ariaDescribedBy = this.args.extraAriaDescribedBy;\n @tracked descriptors = [];\n\n @action\n setAriaDescribedBy() {\n // we schedule this afterRender to capture all descriptors registered onInsert\n schedule('afterRender', () => {\n setAriaDescribedBy(this);\n });\n }\n\n /**\n * Sets the position of the control\n * Accepted values: buttom, left\n *\n * @param type\n * @type {string}\n * @default 'bottom'\n */\n get controlPosition() {\n let { controlPosition = DEFAULT_CONTROL_POSITION } = this.args;\n\n assert(\n `@controlPosition for \"Hds::Form::RadioCard\" must be one of the following: ${CONTROL_POSITIONS.join(\n ', '\n )}; received: ${controlPosition}`,\n CONTROL_POSITIONS.includes(controlPosition)\n );\n\n return controlPosition;\n }\n\n /**\n * Sets the alignment of the content\n * Accepted values: left, center\n *\n * @param alignnment\n * @type {string}\n * @default 'left'\n */\n get alignment() {\n let { alignment = DEFAULT_ALIGNMENT } = this.args;\n\n assert(\n `@alignment for \"Hds::Form::RadioCard\" must be one of the following: ${ALIGNMENTS.join(\n ', '\n )}; received: ${alignment}`,\n ALIGNMENTS.includes(alignment)\n );\n\n return alignment;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-form-radio-card'];\n\n if (this.args.checked) {\n classes.push('hds-form-radio-card--checked');\n }\n if (this.args.disabled) {\n classes.push('hds-form-radio-card--disabled');\n }\n if (this.args.maxWidth) {\n classes.push('hds-form-radio-card--has-fixed-width');\n } else {\n classes.push('hds-form-radio-card--has-fluid-width');\n }\n\n // add a class based on the @controlPosition argument\n classes.push(`hds-form-radio-card--control-${this.controlPosition}`);\n\n // add a class based on the @alignment argument\n classes.push(`hds-form-radio-card--align-${this.alignment}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_CONTROL_POSITION","DEFAULT_ALIGNMENT","CONTROL_POSITIONS","ALIGNMENTS","HdsFormRadioCardIndexComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","setAriaDescribedBy","schedule","controlPosition","assert","join","includes","alignment","classNames","classes","checked","push","disabled","maxWidth","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","extraAriaDescribedBy","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;;;AACA,eAAe,kBAAkB,CAAC,u8BAAu8B;;;ACWl+B,MAAMA,wBAAwB,GAAG,SAAQ;AACzC,MAAMC,iBAAiB,GAAG,OAAM;MAC1BC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAC;MACtCC,UAAU,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAC;AAEvBC,IAAAA,8BAA8B,IAAAC,MAAA,GAApC,MAAMD,8BAA8B,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,0BAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,sBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAKpEC,EAAAA,kBAAkBA,GAAG;AACnB;IACAC,QAAQ,CAAC,aAAa,EAAE,MAAM;MAC5BD,kBAAkB,CAAC,IAAI,CAAC,CAAA;AAC1B,KAAC,CAAC,CAAA;AACJ,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIE,eAAeA,GAAG;IACpB,IAAI;AAAEA,MAAAA,eAAe,GAAGd,wBAAAA;KAA0B,GAAG,IAAI,CAACQ,IAAI,CAAA;AAE9DO,IAAAA,MAAM,CACJ,CAA6Eb,0EAAAA,EAAAA,iBAAiB,CAACc,IAAI,CACjG,IACF,CAAC,CAAA,YAAA,EAAeF,eAAe,CAAA,CAAE,EACjCZ,iBAAiB,CAACe,QAAQ,CAACH,eAAe,CAC5C,CAAC,CAAA;AAED,IAAA,OAAOA,eAAe,CAAA;AACxB,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;A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SAAA,EAAA,iBAAA,EAAA,CAjFEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAmB,IAAI,CAACvB,IAAI,CAACwB,oBAAoB,CAAA;AAAA,GAAA;AAAA,CAAArB,CAAAA,EAAAA,YAAA,GAAAc,yBAAA,CAAApB,MAAA,CAAAqB,SAAA,kBACxDC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAe,EAAE,CAAA;AAAA,GAAA;AAAA,CAAAN,CAAAA,EAAAA,yBAAA,CAAApB,MAAA,CAAAqB,SAAA,EAExBO,oBAAAA,EAAAA,CAAAA,MAAM,GAAAC,MAAA,CAAAC,wBAAA,CAAA9B,MAAA,CAAAqB,SAAA,EAAA,oBAAA,CAAA,EAAArB,MAAA,CAAAqB,SAAA,IAAArB,MAAA,EAAA;AAJ0C+B,oBAAA,CAAAC,QAAA,EAA9BjC,8BAA8B,CAAA;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/form/radio-card/index.hbs","../../../../../src/components/hds/form/radio-card/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{! @glint-nocheck: not typesafe yet }}\\n{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<label class={{this.classNames}} {{style maxWidth=@maxWidth}}>\\n <span class=\\\"hds-form-radio-card__content\\\">\\n {{yield (hash Icon=(component \\\"flight-icon\\\" size=\\\"24\\\" isInlineBlock=false))}}\\n {{yield (hash Label=(component \\\"hds/form/radio-card/label\\\"))}}\\n {{yield (hash Badge=(component \\\"hds/badge\\\"))}}\\n {{yield (hash Description=(component \\\"hds/form/radio-card/description\\\"))}}\\n {{yield (hash Generic=(component \\\"hds/yield\\\"))}}\\n </span>\\n <span class=\\\"hds-form-radio-card__control-wrapper\\\">\\n <Hds::Form::Radio::Base\\n class=\\\"hds-form-radio-card__control\\\"\\n @value={{@value}}\\n name={{@name}}\\n checked={{@checked}}\\n disabled={{@disabled}}\\n aria-describedby={{@extraAriaDescribedBy}}\\n ...attributes\\n />\\n </span>\\n</label>\\n\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_CONTROL_POSITION = 'bottom';\nexport const DEFAULT_ALIGNMENT = 'left';\nexport const CONTROL_POSITIONS = ['bottom', 'left'];\nexport const ALIGNMENTS = ['left', 'center'];\n\nexport default class HdsFormRadioCardIndexComponent extends Component {\n /**\n * Sets the position of the control\n * Accepted values: buttom, left\n *\n * @param type\n * @type {string}\n * @default 'bottom'\n */\n get controlPosition() {\n let { controlPosition = DEFAULT_CONTROL_POSITION } = this.args;\n\n assert(\n `@controlPosition for \"Hds::Form::RadioCard\" must be one of the following: ${CONTROL_POSITIONS.join(\n ', '\n )}; received: ${controlPosition}`,\n CONTROL_POSITIONS.includes(controlPosition)\n );\n\n return controlPosition;\n }\n\n /**\n * Sets the alignment of the content\n * Accepted values: left, center\n *\n * @param alignnment\n * @type {string}\n * @default 'left'\n */\n get alignment() {\n let { alignment = DEFAULT_ALIGNMENT } = this.args;\n\n assert(\n `@alignment for \"Hds::Form::RadioCard\" must be one of the following: ${ALIGNMENTS.join(\n ', '\n )}; received: ${alignment}`,\n ALIGNMENTS.includes(alignment)\n );\n\n return alignment;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-form-radio-card'];\n\n if (this.args.checked) {\n classes.push('hds-form-radio-card--checked');\n }\n if (this.args.disabled) {\n classes.push('hds-form-radio-card--disabled');\n }\n if (this.args.maxWidth) {\n classes.push('hds-form-radio-card--has-fixed-width');\n } else {\n classes.push('hds-form-radio-card--has-fluid-width');\n }\n\n // add a class based on the @controlPosition argument\n classes.push(`hds-form-radio-card--control-${this.controlPosition}`);\n\n // add a class based on the @alignment argument\n classes.push(`hds-form-radio-card--align-${this.alignment}`);\n\n return classes.join(' ');\n }\n}\n"],"names":["DEFAULT_CONTROL_POSITION","DEFAULT_ALIGNMENT","CONTROL_POSITIONS","ALIGNMENTS","HdsFormRadioCardIndexComponent","Component","controlPosition","args","assert","join","includes","alignment","classNames","classes","checked","push","disabled","maxWidth","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,m6BAAm6B;;ACDr8B;AACA;AACA;AACA;;AAKO,MAAMA,wBAAwB,GAAG,SAAQ;AACzC,MAAMC,iBAAiB,GAAG,OAAM;MAC1BC,iBAAiB,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAC;MACtCC,UAAU,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAC;AAE7B,MAAMC,8BAA8B,SAASC,SAAS,CAAC;AACpE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIC,eAAeA,GAAG;IACpB,IAAI;AAAEA,MAAAA,eAAe,GAAGN,wBAAAA;KAA0B,GAAG,IAAI,CAACO,IAAI,CAAA;AAE9DC,IAAAA,MAAM,CACJ,CAA6EN,0EAAAA,EAAAA,iBAAiB,CAACO,IAAI,CACjG,IACF,CAAC,CAAA,YAAA,EAAeH,eAAe,CAAA,CAAE,EACjCJ,iBAAiB,CAACQ,QAAQ,CAACJ,eAAe,CAC5C,CAAC,CAAA;AAED,IAAA,OAAOA,eAAe,CAAA;AACxB,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,IAAIK,SAASA,GAAG;IACd,IAAI;AAAEA,MAAAA,SAAS,GAAGV,iBAAAA;KAAmB,GAAG,IAAI,CAACM,IAAI,CAAA;AAEjDC,IAAAA,MAAM,CACJ,CAAuEL,oEAAAA,EAAAA,UAAU,CAACM,IAAI,CACpF,IACF,CAAC,CAAA,YAAA,EAAeE,SAAS,CAAA,CAAE,EAC3BR,UAAU,CAACO,QAAQ,CAACC,SAAS,CAC/B,CAAC,CAAA;AAED,IAAA,OAAOA,SAAS,CAAA;AAClB,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,qBAAqB,CAAC,CAAA;AAErC,IAAA,IAAI,IAAI,CAACN,IAAI,CAACO,OAAO,EAAE;AACrBD,MAAAA,OAAO,CAACE,IAAI,CAAC,8BAA8B,CAAC,CAAA;AAC9C,KAAA;AACA,IAAA,IAAI,IAAI,CAACR,IAAI,CAACS,QAAQ,EAAE;AACtBH,MAAAA,OAAO,CAACE,IAAI,CAAC,+BAA+B,CAAC,CAAA;AAC/C,KAAA;AACA,IAAA,IAAI,IAAI,CAACR,IAAI,CAACU,QAAQ,EAAE;AACtBJ,MAAAA,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC,CAAA;AACtD,KAAC,MAAM;AACLF,MAAAA,OAAO,CAACE,IAAI,CAAC,sCAAsC,CAAC,CAAA;AACtD,KAAA;;AAEA;IACAF,OAAO,CAACE,IAAI,CAAC,CAAA,6BAAA,EAAgC,IAAI,CAACT,eAAe,EAAE,CAAC,CAAA;;AAEpE;IACAO,OAAO,CAACE,IAAI,CAAC,CAAA,2BAAA,EAA8B,IAAI,CAACJ,SAAS,EAAE,CAAC,CAAA;AAE5D,IAAA,OAAOE,OAAO,CAACJ,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACS,oBAAA,CAAAC,QAAA,EAvEoBf,8BAA8B,CAAA;;;;"}
@@ -0,0 +1,73 @@
1
+ import { a as _defineProperty, _ as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../_rollupPluginBabelHelpers-KIi_qCIU.js';
2
+ import { tracked } from '@glimmer/tracking';
3
+ import { scheduleOnce } from '@ember/runloop';
4
+
5
+ class AriaDescriptorMap {
6
+ constructor() {
7
+ _defineProperty(this, "_elements", new WeakMap());
8
+ }
9
+ register(obj, element) {
10
+ const elements = this.findOrCreateElementSet(obj);
11
+ elements.add(element);
12
+ }
13
+ unregister(obj, element) {
14
+ const elements = this.findOrCreateElementSet(obj);
15
+ elements.delete(element);
16
+ }
17
+ entries(obj) {
18
+ const elements = this.findOrCreateElementSet(obj);
19
+ return Array.from(elements.values());
20
+ }
21
+ findOrCreateElementSet(obj) {
22
+ if (this._elements.has(obj)) {
23
+ return this._elements.get(obj);
24
+ }
25
+ const elements = new Set();
26
+ this._elements.set(obj, elements);
27
+ return elements;
28
+ }
29
+ }
30
+ const ariaDescriptorMap = new AriaDescriptorMap();
31
+
32
+ // essentially a type that says we return a subclass of the given type T
33
+
34
+ function ariaDescribedBy(BaseComponent) {
35
+ var _class, _descriptor;
36
+ let EnhancedComponent = (_class = class EnhancedComponent extends BaseComponent {
37
+ constructor(...args) {
38
+ super(...args);
39
+ _initializerDefineProperty(this, "__ARIA_DESCRIPTION_IDS__", _descriptor, this);
40
+ }
41
+ get ariaDescribedBy() {
42
+ let descriptors = this.__ARIA_DESCRIPTION_IDS__;
43
+ if (this.args.extraAriaDescribedBy) {
44
+ descriptors = descriptors.concat(this.args.extraAriaDescribedBy);
45
+ }
46
+ return descriptors.join(' ');
47
+ }
48
+ }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "__ARIA_DESCRIPTION_IDS__", [tracked], {
49
+ configurable: true,
50
+ enumerable: true,
51
+ writable: true,
52
+ initializer: function () {
53
+ return [];
54
+ }
55
+ })), _class);
56
+ return EnhancedComponent;
57
+ }
58
+ function synchronizeDescriptors(component) {
59
+ if (component.isDestroying || component.isDestroyed) return;
60
+ const descriptors = ariaDescriptorMap.entries(component);
61
+ component.__ARIA_DESCRIPTION_IDS__ = descriptors.map(element => element.id);
62
+ }
63
+ function registerAriaDescriptionElement(component, element) {
64
+ ariaDescriptorMap.register(component, element);
65
+ scheduleOnce('afterRender', component, synchronizeDescriptors, component);
66
+ }
67
+ function unregisterAriaDescriptionElement(component, element) {
68
+ ariaDescriptorMap.unregister(component, element);
69
+ scheduleOnce('afterRender', component, synchronizeDescriptors, component);
70
+ }
71
+
72
+ export { ariaDescribedBy, registerAriaDescriptionElement, unregisterAriaDescriptionElement };
73
+ //# sourceMappingURL=hds-aria-described-by.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hds-aria-described-by.js","sources":["../../src/utils/hds-aria-described-by.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { tracked } from '@glimmer/tracking';\nimport { scheduleOnce } from '@ember/runloop';\nimport type Component from '@glimmer/component';\n\ntype ElementSet = Set<HTMLElement>;\n\nclass AriaDescriptorMap {\n private _elements = new WeakMap<AriaDescribedByComponent, ElementSet>();\n\n register(obj: AriaDescribedByComponent, element: HTMLElement) {\n const elements = this.findOrCreateElementSet(obj);\n elements.add(element);\n }\n\n unregister(obj: AriaDescribedByComponent, element: HTMLElement) {\n const elements = this.findOrCreateElementSet(obj);\n elements.delete(element);\n }\n\n entries(obj: AriaDescribedByComponent) {\n const elements = this.findOrCreateElementSet(obj);\n return Array.from(elements.values());\n }\n\n private findOrCreateElementSet(obj: AriaDescribedByComponent): ElementSet {\n if (this._elements.has(obj)) {\n return this._elements.get(obj) as ElementSet;\n }\n\n const elements: ElementSet = new Set();\n this._elements.set(obj, elements);\n return elements;\n }\n}\n\nconst ariaDescriptorMap = new AriaDescriptorMap();\n\ninterface AriaDescribedByArgs {\n Args: {\n extraAriaDescribedBy: string;\n };\n}\n\ninterface AriaDescribedByComponent extends Component<AriaDescribedByArgs> {\n __ARIA_DESCRIPTION_IDS__: string[];\n ariaDescribedBy: string;\n}\n\n// essentially a type that says we return a subclass of the given type T\ntype ClassOf<T> = new () => T;\n\nexport function ariaDescribedBy(\n BaseComponent: ClassOf<AriaDescribedByComponent>\n): ClassOf<AriaDescribedByComponent> {\n class EnhancedComponent extends BaseComponent {\n @tracked __ARIA_DESCRIPTION_IDS__: string[] = [];\n\n get ariaDescribedBy() {\n let descriptors = this.__ARIA_DESCRIPTION_IDS__;\n\n if (this.args.extraAriaDescribedBy) {\n descriptors = descriptors.concat(this.args.extraAriaDescribedBy);\n }\n\n return descriptors.join(' ');\n }\n }\n return EnhancedComponent;\n}\n\nfunction synchronizeDescriptors(component: AriaDescribedByComponent) {\n if (component.isDestroying || component.isDestroyed) return;\n const descriptors = ariaDescriptorMap.entries(component);\n component.__ARIA_DESCRIPTION_IDS__ = descriptors.map((element) => element.id);\n}\n\nexport function registerAriaDescriptionElement(\n component: AriaDescribedByComponent,\n element: HTMLElement\n) {\n ariaDescriptorMap.register(component, element);\n scheduleOnce('afterRender', component, synchronizeDescriptors, component);\n}\n\nexport function unregisterAriaDescriptionElement(\n component: AriaDescribedByComponent,\n element: HTMLElement\n) {\n ariaDescriptorMap.unregister(component, element);\n scheduleOnce('afterRender', component, synchronizeDescriptors, component);\n}\n"],"names":["AriaDescriptorMap","constructor","_defineProperty","WeakMap","register","obj","element","elements","findOrCreateElementSet","add","unregister","delete","entries","Array","from","values","_elements","has","get","Set","set","ariaDescriptorMap","ariaDescribedBy","BaseComponent","_class","_descriptor","EnhancedComponent","args","_initializerDefineProperty","descriptors","__ARIA_DESCRIPTION_IDS__","extraAriaDescribedBy","concat","join","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","synchronizeDescriptors","component","isDestroying","isDestroyed","map","id","registerAriaDescriptionElement","scheduleOnce","unregisterAriaDescriptionElement"],"mappings":";;;;AAWA,MAAMA,iBAAiB,CAAC;EAAAC,WAAA,GAAA;AAAAC,IAAAA,eAAA,CACF,IAAA,EAAA,WAAA,EAAA,IAAIC,OAAO,EAAwC,CAAA,CAAA;AAAA,GAAA;AAEvEC,EAAAA,QAAQA,CAACC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EAC9C0C,YAAY,CAAC,aAAa,EAAEN,SAAS,EAAED,sBAAsB,EAAEC,SAAS,CAAC,CAAA;AAC3E,CAAA;AAEO,SAASO,gCAAgCA,CAC9CP,SAAmC,EACnCpC,OAAoB,EACpB;AACAe,EAAAA,iBAAiB,CAACX,UAAU,CAACgC,SAAS,EAAEpC,OAAO,CAAC,CAAA;EAChD0C,YAAY,CAAC,aAAa,EAAEN,SAAS,EAAED,sBAAsB,EAAEC,SAAS,CAAC,CAAA;AAC3E;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "4.5.0",
3
+ "version": "4.5.2",
4
4
  "description": "Helios Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",
@@ -39,7 +39,7 @@
39
39
  "@embroider/addon-shim": "^1.8.7",
40
40
  "@floating-ui/dom": "^1.6.3",
41
41
  "@hashicorp/design-system-tokens": "^2.1.0",
42
- "@hashicorp/ember-flight-icons": "^5.1.0",
42
+ "@hashicorp/ember-flight-icons": "^5.1.1",
43
43
  "@oddbird/popover-polyfill": "^0.4.3",
44
44
  "decorator-transforms": "^1.1.0",
45
45
  "ember-a11y-refocus": "^4.1.0",
@@ -1,6 +0,0 @@
1
- /**
2
- * Copyright (c) HashiCorp, Inc.
3
- * SPDX-License-Identifier: MPL-2.0
4
- */
5
- export function setAriaDescribedBy(element: any): void;
6
- //# sourceMappingURL=hds-set-aria-described-by.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hds-set-aria-described-by.d.ts","sourceRoot":"","sources":["../../src/utils/hds-set-aria-described-by.js"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,uDASC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright (c) HashiCorp, Inc.
3
- * SPDX-License-Identifier: MPL-2.0
4
- */
5
-
6
- function setAriaDescribedBy(element) {
7
- // append @extraAriaDescribedBy arg, if provided
8
- if (element.args.extraAriaDescribedBy) {
9
- element.descriptors.push(element.args.extraAriaDescribedBy);
10
- }
11
- if (element.descriptors.length) {
12
- element.ariaDescribedBy = element.descriptors.join(' ');
13
- }
14
- }
15
-
16
- export { setAriaDescribedBy };
17
- //# sourceMappingURL=hds-set-aria-described-by.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"hds-set-aria-described-by.js","sources":["../../src/utils/hds-set-aria-described-by.js"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nexport function setAriaDescribedBy(element) {\n // append @extraAriaDescribedBy arg, if provided\n if (element.args.extraAriaDescribedBy) {\n element.descriptors.push(element.args.extraAriaDescribedBy);\n }\n\n if (element.descriptors.length) {\n element.ariaDescribedBy = element.descriptors.join(' ');\n }\n}\n"],"names":["setAriaDescribedBy","element","args","extraAriaDescribedBy","descriptors","push","length","ariaDescribedBy","join"],"mappings":"AAAA;AACA;AACA;AACA;;AAEO,SAASA,kBAAkBA,CAACC,OAAO,EAAE;AAC1C;AACA,EAAA,IAAIA,OAAO,CAACC,IAAI,CAACC,oBAAoB,EAAE;IACrCF,OAAO,CAACG,WAAW,CAACC,IAAI,CAACJ,OAAO,CAACC,IAAI,CAACC,oBAAoB,CAAC,CAAA;AAC7D,GAAA;AAEA,EAAA,IAAIF,OAAO,CAACG,WAAW,CAACE,MAAM,EAAE;IAC9BL,OAAO,CAACM,eAAe,GAAGN,OAAO,CAACG,WAAW,CAACI,IAAI,CAAC,GAAG,CAAC,CAAA;AACzD,GAAA;AACF;;;;"}