@hashicorp/design-system-components 5.0.0-rc-20251006205604 → 5.0.0-rc-20251007190932
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/addon-main.cjs +0 -3
- package/declarations/components/hds/advanced-table/th.d.ts +0 -1
- package/declarations/components/hds/application-state/index.d.ts +2 -0
- package/declarations/components/hds/dropdown/index.d.ts +5 -4
- package/declarations/components/hds/dropdown/list-item/interactive.d.ts +0 -7
- package/declarations/components/hds/form/text-input/field.d.ts +1 -1
- package/declarations/components/hds/icon/index.d.ts +1 -1
- package/declarations/components/hds/side-nav/index.d.ts +0 -8
- package/declarations/components/hds/stepper/task/indicator.d.ts +1 -1
- package/declarations/components.d.ts +0 -2
- package/declarations/template-registry.d.ts +0 -30
- package/dist/README.md +3 -3
- package/dist/components/hds/advanced-table/index.js +1 -1
- package/dist/components/hds/advanced-table/th.js.map +1 -1
- package/dist/components/hds/app-side-nav/portal/target.js +2 -2
- package/dist/components/hds/app-side-nav/portal/target.js.map +1 -1
- package/dist/components/hds/application-state/index.js +6 -0
- package/dist/components/hds/application-state/index.js.map +1 -1
- package/dist/components/hds/dropdown/index.js.map +1 -1
- package/dist/components/hds/dropdown/list-item/interactive.js +2 -24
- package/dist/components/hds/dropdown/list-item/interactive.js.map +1 -1
- package/dist/components/hds/side-nav/index.js +2 -21
- package/dist/components/hds/side-nav/index.js.map +1 -1
- package/dist/components/hds/side-nav/portal/target.js +2 -2
- package/dist/components/hds/side-nav/portal/target.js.map +1 -1
- package/dist/components/hds/time/index.js +2 -2
- package/dist/components/hds/time/index.js.map +1 -1
- package/dist/components/hds/time/range.js +2 -2
- package/dist/components/hds/time/range.js.map +1 -1
- package/dist/components.js +0 -2
- package/dist/components.js.map +1 -1
- package/dist/instance-initializers/load-sprite.js +1 -4
- package/dist/instance-initializers/load-sprite.js.map +1 -1
- package/dist/styles/@hashicorp/design-system-components.css +3 -79
- package/dist/styles/@hashicorp/design-system-components.scss +0 -1
- package/dist/styles/components/application-state.scss +5 -1
- package/dist/styles/components/dropdown.scss +1 -1
- package/dist/styles/components/side-nav/header.scss +0 -26
- package/package.json +4 -12
- package/declarations/components/hds/flyout/body.d.ts +0 -16
- package/declarations/components/hds/flyout/description.d.ts +0 -17
- package/declarations/components/hds/flyout/footer.d.ts +0 -20
- package/declarations/components/hds/flyout/header.d.ts +0 -22
- package/declarations/components/hds/menu-primitive/index.d.ts +0 -36
- package/declarations/components/hds/modal/body.d.ts +0 -16
- package/declarations/components/hds/modal/footer.d.ts +0 -20
- package/declarations/components/hds/modal/header.d.ts +0 -22
- package/declarations/components/hds/side-nav/header/icon-button.d.ts +0 -19
- package/dist/_app_/components/hds/flyout/body.js +0 -1
- package/dist/_app_/components/hds/flyout/description.js +0 -1
- package/dist/_app_/components/hds/flyout/footer.js +0 -1
- package/dist/_app_/components/hds/flyout/header.js +0 -1
- package/dist/_app_/components/hds/menu-primitive.js +0 -1
- package/dist/_app_/components/hds/modal/body.js +0 -1
- package/dist/_app_/components/hds/modal/footer.js +0 -1
- package/dist/_app_/components/hds/modal/header.js +0 -1
- package/dist/_app_/components/hds/side-nav/header/icon-button.js +0 -1
- package/dist/components/hds/flyout/body.js +0 -31
- package/dist/components/hds/flyout/body.js.map +0 -1
- package/dist/components/hds/flyout/description.js +0 -31
- package/dist/components/hds/flyout/description.js.map +0 -1
- package/dist/components/hds/flyout/footer.js +0 -31
- package/dist/components/hds/flyout/footer.js.map +0 -1
- package/dist/components/hds/flyout/header.js +0 -31
- package/dist/components/hds/flyout/header.js.map +0 -1
- package/dist/components/hds/menu-primitive/index.js +0 -98
- package/dist/components/hds/menu-primitive/index.js.map +0 -1
- package/dist/components/hds/modal/body.js +0 -31
- package/dist/components/hds/modal/body.js.map +0 -1
- package/dist/components/hds/modal/footer.js +0 -31
- package/dist/components/hds/modal/footer.js.map +0 -1
- package/dist/components/hds/modal/header.js +0 -31
- package/dist/components/hds/modal/header.js.map +0 -1
- package/dist/components/hds/side-nav/header/icon-button.js +0 -38
- package/dist/components/hds/side-nav/header/icon-button.js.map +0 -1
- package/dist/styles/components/menu-primitive.scss +0 -13
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../../src/components/hds/flyout/header.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsIconSignature } from '../icon';\nimport type Owner from '@ember/owner';\n\nexport interface HdsFlyoutHeaderSignature {\n Args: {\n id?: string;\n tagline?: string;\n onDismiss: (event: MouseEvent) => void;\n icon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsFlyoutHeader extends Component<HdsFlyoutHeaderSignature> {\n constructor(owner: Owner, args: HdsFlyoutHeaderSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Flyout::Header` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Header` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.flyout.header',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.6.0',\n available: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsFlyoutHeader","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","available","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAoBe,MAAMA,eAAe,SAASC,SAAS,CAA2B;AAC/EC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAsC,EAAE;AAChE,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,iNAAiN,EACjN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,8BAA8B;AAClCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAO;AAChBC,QAAAA,SAAS,EAAE;AACb;AACF,KACF,CAAC;AACH,EAAA;AACF;AAACC,oBAAA,CAAAC,QAAA,EAnBoBd,eAAe,CAAA;;;;"}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { deprecate } from '@ember/debug';
|
|
3
|
-
import { tracked } from '@glimmer/tracking';
|
|
4
|
-
import { action } from '@ember/object';
|
|
5
|
-
import { schedule } from '@ember/runloop';
|
|
6
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
7
|
-
import { g, i, n } from 'decorator-transforms/runtime';
|
|
8
|
-
import { setComponentTemplate } from '@ember/component';
|
|
9
|
-
|
|
10
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS COMPONENT IS NOW DEPRECATED\n}}\n{{! template-lint-disable no-invalid-interactive }}\n<div\n class=\"hds-menu-primitive\"\n ...attributes\n {{did-insert this.didInsert}}\n {{on \"focusout\" this.onFocusOut}}\n {{on \"keyup\" this.onKeyUp}}\n>\n <div class=\"hds-menu-primitive__toggle\" tabindex=\"-1\">\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\"toggle\"}}\n </div>\n {{#if this.isOpen}}\n <div class=\"hds-menu-primitive__content\" tabindex=\"-1\">\n {{yield (hash close=this.close) to=\"content\"}}\n </div>\n {{/if}}\n</div>\n{{! template-lint-enable no-invalid-interactive }}");
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Copyright (c) HashiCorp, Inc.
|
|
14
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
class MenuPrimitive extends Component {
|
|
18
|
-
static {
|
|
19
|
-
g(this.prototype, "isOpen", [tracked]);
|
|
20
|
-
}
|
|
21
|
-
#isOpen = (i(this, "isOpen"), void 0);
|
|
22
|
-
static {
|
|
23
|
-
g(this.prototype, "toggleRef", [tracked]);
|
|
24
|
-
}
|
|
25
|
-
#toggleRef = (i(this, "toggleRef"), void 0); // notice: if in the future we need to add a "@isOpen" prop to control the status from outside (eg to have the MenuPrimitive opened on render) just add "this.args.isOpen" here to initalize the variable
|
|
26
|
-
static {
|
|
27
|
-
g(this.prototype, "_element", [tracked]);
|
|
28
|
-
}
|
|
29
|
-
#_element = (i(this, "_element"), void 0);
|
|
30
|
-
constructor(owner, args) {
|
|
31
|
-
super(owner, args);
|
|
32
|
-
deprecate('The `Hds::MenuPrimitive` component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`.', false, {
|
|
33
|
-
id: 'hds.components.menu-primitive',
|
|
34
|
-
until: '5.0.0',
|
|
35
|
-
url: 'https://helios.hashicorp.design/components/menu-primitive?tab=version%20history#460',
|
|
36
|
-
for: '@hashicorp/design-system-components',
|
|
37
|
-
since: {
|
|
38
|
-
enabled: '4.10.0',
|
|
39
|
-
available: '4.10.0'
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
}
|
|
43
|
-
didInsert(element) {
|
|
44
|
-
this._element = element;
|
|
45
|
-
}
|
|
46
|
-
static {
|
|
47
|
-
n(this.prototype, "didInsert", [action]);
|
|
48
|
-
}
|
|
49
|
-
onClickToggle(event) {
|
|
50
|
-
// we store a reference to the DOM node that has the "onClickToggle" event associated with it
|
|
51
|
-
if (!this.toggleRef) {
|
|
52
|
-
this.toggleRef = event.currentTarget;
|
|
53
|
-
}
|
|
54
|
-
this.isOpen = !this.isOpen;
|
|
55
|
-
// we explicitly apply a focus state to the toggle element to overcome a bug in WebKit (see https://github.com/hashicorp/design-system/commit/40cd7f6b3cb15c45f9a1235fafd0fb3ed58e6e62)
|
|
56
|
-
this.toggleRef?.focus();
|
|
57
|
-
}
|
|
58
|
-
static {
|
|
59
|
-
n(this.prototype, "onClickToggle", [action]);
|
|
60
|
-
}
|
|
61
|
-
onFocusOut(event) {
|
|
62
|
-
// due to inconsistent implementation of relatedTarget across browsers we use the activeElement as a fallback
|
|
63
|
-
// if the related target is not part of the disclosed content we close the disclosed container
|
|
64
|
-
if (!this._element.contains(event.relatedTarget || document.activeElement)) {
|
|
65
|
-
this.close();
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
static {
|
|
69
|
-
n(this.prototype, "onFocusOut", [action]);
|
|
70
|
-
}
|
|
71
|
-
onKeyUp(event) {
|
|
72
|
-
if (event.key === 'Escape') {
|
|
73
|
-
this.close();
|
|
74
|
-
this.toggleRef?.focus();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
static {
|
|
78
|
-
n(this.prototype, "onKeyUp", [action]);
|
|
79
|
-
}
|
|
80
|
-
close() {
|
|
81
|
-
// we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation
|
|
82
|
-
// eslint-disable-next-line ember/no-runloop
|
|
83
|
-
schedule('afterRender', () => {
|
|
84
|
-
this.isOpen = false;
|
|
85
|
-
// we call the "onClose" callback if it exists (and is a function)
|
|
86
|
-
if (this.args.onClose && typeof this.args.onClose === 'function') {
|
|
87
|
-
this.args.onClose();
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
static {
|
|
92
|
-
n(this.prototype, "close", [action]);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
setComponentTemplate(TEMPLATE, MenuPrimitive);
|
|
96
|
-
|
|
97
|
-
export { MenuPrimitive as default };
|
|
98
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/components/hds/menu-primitive/index.ts"],"sourcesContent":["/**\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 { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { schedule } from '@ember/runloop';\nimport type Owner from '@ember/owner';\n\nexport interface MenuPrimitiveSignature {\n Args: {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClose?: (...args: any[]) => void;\n };\n Blocks: {\n toggle?: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onClickToggle: (event: MouseEvent, ...args: any[]) => void;\n isOpen?: boolean;\n },\n ];\n content?: [\n {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n close: (...args: any[]) => void;\n },\n ];\n };\n Element: HTMLDivElement;\n}\n\nexport default class MenuPrimitive extends Component<MenuPrimitiveSignature> {\n @tracked isOpen: boolean | undefined; // notice: if in the future we need to add a \"@isOpen\" prop to control the status from outside (eg to have the MenuPrimitive opened on render) just add \"this.args.isOpen\" here to initalize the variable\n @tracked toggleRef: HTMLElement | undefined;\n @tracked _element!: HTMLElement;\n\n constructor(owner: Owner, args: MenuPrimitiveSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::MenuPrimitive` component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`.',\n false,\n {\n id: 'hds.components.menu-primitive',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/menu-primitive?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n enabled: '4.10.0',\n available: '4.10.0',\n },\n }\n );\n }\n\n @action\n didInsert(element: HTMLElement): void {\n this._element = element;\n }\n\n @action\n onClickToggle(event: MouseEvent): void {\n // we store a reference to the DOM node that has the \"onClickToggle\" event associated with it\n if (!this.toggleRef) {\n this.toggleRef = event.currentTarget as HTMLElement;\n }\n this.isOpen = !this.isOpen;\n // we explicitly apply a focus state to the toggle element to overcome a bug in WebKit (see https://github.com/hashicorp/design-system/commit/40cd7f6b3cb15c45f9a1235fafd0fb3ed58e6e62)\n this.toggleRef?.focus();\n }\n\n @action\n onFocusOut(event: FocusEvent): void {\n // due to inconsistent implementation of relatedTarget across browsers we use the activeElement as a fallback\n // if the related target is not part of the disclosed content we close the disclosed container\n if (\n !this._element.contains(\n (event.relatedTarget as Node) || (document.activeElement as Node)\n )\n ) {\n this.close();\n }\n }\n\n @action\n onKeyUp(event: KeyboardEvent): void {\n if (event.key === 'Escape') {\n this.close();\n this.toggleRef?.focus();\n }\n }\n\n @action\n close(): void {\n // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation\n // eslint-disable-next-line ember/no-runloop\n schedule('afterRender', (): void => {\n this.isOpen = false;\n // we call the \"onClose\" callback if it exists (and is a function)\n if (this.args.onClose && typeof this.args.onClose === 'function') {\n this.args.onClose();\n }\n });\n }\n}\n"],"names":["MenuPrimitive","Component","g","prototype","tracked","i","void 0","constructor","owner","args","deprecate","id","until","url","for","since","enabled","available","didInsert","element","_element","n","action","onClickToggle","event","toggleRef","currentTarget","isOpen","focus","onFocusOut","contains","relatedTarget","document","activeElement","close","onKeyUp","key","schedule","onClose","setComponentTemplate","TEMPLATE"],"mappings":"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"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { deprecate } from '@ember/debug';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n<div class=\"hds-modal__body\" ...attributes>\n {{yield}}\n</div>");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Copyright (c) HashiCorp, Inc.
|
|
10
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
class HdsModalBody extends Component {
|
|
14
|
-
constructor(owner, args) {
|
|
15
|
-
super(owner, args);
|
|
16
|
-
deprecate('The `Hds::Modal::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
|
-
id: 'hds.components.modal.body',
|
|
18
|
-
until: '5.0.0',
|
|
19
|
-
url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',
|
|
20
|
-
for: '@hashicorp/design-system-components',
|
|
21
|
-
since: {
|
|
22
|
-
available: '4.6.0',
|
|
23
|
-
enabled: '4.6.0'
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
setComponentTemplate(TEMPLATE, HdsModalBody);
|
|
29
|
-
|
|
30
|
-
export { HdsModalBody as default };
|
|
31
|
-
//# sourceMappingURL=body.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"body.js","sources":["../../../../src/components/hds/modal/body.ts"],"sourcesContent":["/**\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 Owner from '@ember/owner';\n\nexport interface HdsModalBodySignature {\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 HdsModalBody extends Component<HdsModalBodySignature> {\n constructor(owner: Owner, args: HdsModalBodySignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Modal::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.modal.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 available: '4.6.0',\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsModalBody","Component","constructor","owner","args","deprecate","id","until","url","for","since","available","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAgBe,MAAMA,YAAY,SAASC,SAAS,CAAwB;AACzEC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAmC,EAAE;AAC7D,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,4MAA4M,EAC5M,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,2BAA2B;AAC/BC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,SAAS,EAAE,OAAO;AAClBC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH,EAAA;AACF;AAACC,oBAAA,CAAAC,QAAA,EAnBoBd,YAAY,CAAA;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { deprecate } from '@ember/debug';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n<div class=\"hds-modal__footer\" ...attributes>\n {{yield (hash close=@onDismiss)}}\n</div>");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Copyright (c) HashiCorp, Inc.
|
|
10
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
class HdsModalFooter extends Component {
|
|
14
|
-
constructor(owner, args) {
|
|
15
|
-
super(owner, args);
|
|
16
|
-
deprecate('The `Hds::Modal::Footer` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Footer` as one-to-one replacement.', false, {
|
|
17
|
-
id: 'hds.components.modal.footer',
|
|
18
|
-
until: '5.0.0',
|
|
19
|
-
url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',
|
|
20
|
-
for: '@hashicorp/design-system-components',
|
|
21
|
-
since: {
|
|
22
|
-
enabled: '4.6.0',
|
|
23
|
-
available: '4.6.0'
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
setComponentTemplate(TEMPLATE, HdsModalFooter);
|
|
29
|
-
|
|
30
|
-
export { HdsModalFooter as default };
|
|
31
|
-
//# sourceMappingURL=footer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"footer.js","sources":["../../../../src/components/hds/modal/footer.ts"],"sourcesContent":["/**\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 Owner from '@ember/owner';\n\nexport interface HdsModalFooterSignature {\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 HdsModalFooter extends Component<HdsModalFooterSignature> {\n constructor(owner: Owner, args: HdsModalFooterSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Modal::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.modal.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 available: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsModalFooter","Component","constructor","owner","args","deprecate","id","until","url","for","since","enabled","available","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAgBe,MAAMA,cAAc,SAASC,SAAS,CAA0B;AAC7EC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAqC,EAAE;AAC/D,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,gNAAgN,EAChN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,6BAA6B;AACjCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,OAAO,EAAE,OAAO;AAChBC,QAAAA,SAAS,EAAE;AACb;AACF,KACF,CAAC;AACH,EAAA;AACF;AAACC,oBAAA,CAAAC,QAAA,EAnBoBd,cAAc,CAAA;;;;"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { deprecate } from '@ember/debug';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n<div class=\"hds-modal__header\" ...attributes>\n {{#if @icon}}\n <Hds::Icon class=\"hds-modal__icon\" @name={{@icon}} @size=\"24\" />\n {{/if}}\n <Hds::Text::Display class=\"hds-modal__title\" @tag=\"div\" @size=\"300\" @weight=\"semibold\" id={{@id}}>\n {{#if @tagline}}\n <Hds::Text::Body class=\"hds-modal__tagline\" @tag=\"div\" @size=\"100\" @weight=\"regular\">\n {{@tagline}}\n </Hds::Text::Body>\n {{/if}}\n {{yield}}\n </Hds::Text::Display>\n <Hds::DismissButton class=\"hds-modal__dismiss\" {{on \"click\" @onDismiss}} />\n</div>");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Copyright (c) HashiCorp, Inc.
|
|
10
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
class HdsModalHeader extends Component {
|
|
14
|
-
constructor(owner, args) {
|
|
15
|
-
super(owner, args);
|
|
16
|
-
deprecate('The `Hds::Modal::Header` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Header` as one-to-one replacement.', false, {
|
|
17
|
-
id: 'hds.components.modal.header',
|
|
18
|
-
until: '5.0.0',
|
|
19
|
-
url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',
|
|
20
|
-
for: '@hashicorp/design-system-components',
|
|
21
|
-
since: {
|
|
22
|
-
available: '4.6.0',
|
|
23
|
-
enabled: '4.6.0'
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
setComponentTemplate(TEMPLATE, HdsModalHeader);
|
|
29
|
-
|
|
30
|
-
export { HdsModalHeader as default };
|
|
31
|
-
//# sourceMappingURL=header.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"header.js","sources":["../../../../src/components/hds/modal/header.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { deprecate } from '@ember/debug';\nimport type { HdsIconSignature } from '../icon';\nimport type Owner from '@ember/owner';\n\nexport interface HdsModalHeaderSignature {\n Args: {\n id?: string;\n tagline?: string;\n onDismiss: (event: MouseEvent) => void;\n icon?: HdsIconSignature['Args']['name'];\n };\n Blocks: {\n default: [];\n };\n Element: HTMLDivElement;\n}\n\nexport default class HdsModalHeader extends Component<HdsModalHeaderSignature> {\n constructor(owner: Owner, args: HdsModalHeaderSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::Modal::Header` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::DialogPrimitive::Header` as one-to-one replacement.',\n false,\n {\n id: 'hds.components.modal.header',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/flyout?tab=version%20history#460',\n for: '@hashicorp/design-system-components',\n since: {\n available: '4.6.0',\n enabled: '4.6.0',\n },\n }\n );\n }\n}\n"],"names":["HdsModalHeader","Component","constructor","owner","args","deprecate","id","until","url","for","since","available","enabled","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAoBe,MAAMA,cAAc,SAASC,SAAS,CAA0B;AAC7EC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAqC,EAAE;AAC/D,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,gNAAgN,EAChN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,6BAA6B;AACjCC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,6EAA6E;AAClFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,SAAS,EAAE,OAAO;AAClBC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH,EAAA;AACF;AAACC,oBAAA,CAAAC,QAAA,EAnBoBd,cAAc,CAAA;;;;"}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import Component from '@glimmer/component';
|
|
2
|
-
import { deprecate, assert } from '@ember/debug';
|
|
3
|
-
import { precompileTemplate } from '@ember/template-compilation';
|
|
4
|
-
import { setComponentTemplate } from '@ember/component';
|
|
5
|
-
|
|
6
|
-
var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n{{!\n THIS SUBCOMPONENT IS NOW DEPRECATED\n}}\n<Hds::Interactive\n class=\"hds-side-nav__icon-button\"\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n ...attributes\n aria-label={{this.ariaLabel}}\n>\n <Hds::Icon @name={{@icon}} @stretched={{true}} @size=\"24\" />\n</Hds::Interactive>");
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Copyright (c) HashiCorp, Inc.
|
|
10
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
class HdsSideNavHeaderIconButton extends Component {
|
|
14
|
-
constructor(owner, args) {
|
|
15
|
-
super(owner, args);
|
|
16
|
-
deprecate('The `Hds::SideNav::Header::IconButton` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::Button` with the `isIconOnly` variant instead.', false, {
|
|
17
|
-
id: 'hds.components.sidenav.header.iconbutton',
|
|
18
|
-
until: '5.0.0',
|
|
19
|
-
url: 'https://helios.hashicorp.design/components/side-nav?tab=version%20history#4100',
|
|
20
|
-
for: '@hashicorp/design-system-components',
|
|
21
|
-
since: {
|
|
22
|
-
available: '4.10.0',
|
|
23
|
-
enabled: '4.10.0'
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
get ariaLabel() {
|
|
28
|
-
const {
|
|
29
|
-
ariaLabel
|
|
30
|
-
} = this.args;
|
|
31
|
-
assert('@ariaLabel for "Hds::SideNav::Header::IconButton" must have a valid value', ariaLabel !== undefined);
|
|
32
|
-
return ariaLabel;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
setComponentTemplate(TEMPLATE, HdsSideNavHeaderIconButton);
|
|
36
|
-
|
|
37
|
-
export { HdsSideNavHeaderIconButton as default };
|
|
38
|
-
//# sourceMappingURL=icon-button.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon-button.js","sources":["../../../../../src/components/hds/side-nav/header/icon-button.ts"],"sourcesContent":["/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert, deprecate } from '@ember/debug';\n\nimport type { HdsIconSignature } from '../../icon';\nimport type { HdsInteractiveSignature } from '../../interactive/';\nimport type Owner from '@ember/owner';\n\nexport interface HdsSideNavHeaderIconButtonSignature {\n Args: HdsInteractiveSignature['Args'] & {\n icon: HdsIconSignature['Args']['name'];\n ariaLabel: string;\n };\n Element: HdsInteractiveSignature['Element'];\n}\n\nexport default class HdsSideNavHeaderIconButton extends Component<HdsSideNavHeaderIconButtonSignature> {\n constructor(owner: Owner, args: HdsSideNavHeaderIconButtonSignature['Args']) {\n super(owner, args);\n\n deprecate(\n 'The `Hds::SideNav::Header::IconButton` sub-component is now deprecated and will be removed in the next major version of `@hashicorp/design-system-components`. Use `Hds::Button` with the `isIconOnly` variant instead.',\n false,\n {\n id: 'hds.components.sidenav.header.iconbutton',\n until: '5.0.0',\n url: 'https://helios.hashicorp.design/components/side-nav?tab=version%20history#4100',\n for: '@hashicorp/design-system-components',\n since: {\n available: '4.10.0',\n enabled: '4.10.0',\n },\n }\n );\n }\n\n get ariaLabel(): string {\n const { ariaLabel } = this.args;\n\n assert(\n '@ariaLabel for \"Hds::SideNav::Header::IconButton\" must have a valid value',\n ariaLabel !== undefined\n );\n\n return ariaLabel;\n }\n}\n"],"names":["HdsSideNavHeaderIconButton","Component","constructor","owner","args","deprecate","id","until","url","for","since","available","enabled","ariaLabel","assert","undefined","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;;AAiBe,MAAMA,0BAA0B,SAASC,SAAS,CAAsC;AACrGC,EAAAA,WAAWA,CAACC,KAAY,EAAEC,IAAiD,EAAE;AAC3E,IAAA,KAAK,CAACD,KAAK,EAAEC,IAAI,CAAC;AAElBC,IAAAA,SAAS,CACP,yNAAyN,EACzN,KAAK,EACL;AACEC,MAAAA,EAAE,EAAE,0CAA0C;AAC9CC,MAAAA,KAAK,EAAE,OAAO;AACdC,MAAAA,GAAG,EAAE,gFAAgF;AACrFC,MAAAA,GAAG,EAAE,qCAAqC;AAC1CC,MAAAA,KAAK,EAAE;AACLC,QAAAA,SAAS,EAAE,QAAQ;AACnBC,QAAAA,OAAO,EAAE;AACX;AACF,KACF,CAAC;AACH,EAAA;EAEA,IAAIC,SAASA,GAAW;IACtB,MAAM;AAAEA,MAAAA;KAAW,GAAG,IAAI,CAACT,IAAI;AAE/BU,IAAAA,MAAM,CACJ,2EAA2E,EAC3ED,SAAS,KAAKE,SAChB,CAAC;AAED,IAAA,OAAOF,SAAS;AAClB,EAAA;AACF;AAACG,oBAAA,CAAAC,QAAA,EA9BoBjB,0BAA0B,CAAA;;;;"}
|