@hashicorp/design-system-components 3.0.2 β†’ 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,19 @@
1
1
  # [HDS Product - Components](https://www.figma.com/file/noyY6dUMDYjmySpHcMjhkN/HDS-Product---Components?type=design&node-id=6790-10926&mode=design&t=Ps0aMGZ6F3z7bAJ4-0)
2
2
 
3
+ ## November 6th, 2023
4
+
5
+ `CodeBlock` - Added new component.
6
+
7
+ ## November 3rd, 2023
8
+
9
+ `Breadcrumb` - Updated the number of `breadcrumb / _items` to the component.
10
+
11
+ ## October 23rd, 2023
12
+
13
+ `Button` - Updated icon only button variants to be square to match the ToggleIcon.
14
+
15
+ `Dropdown / ToggleIcon` - Fixed the small variant so that it’s the correct size (28px height) to match the other small Buttons and ToggleButton.
16
+
3
17
  ## September 15th, 2023
4
18
 
5
19
  `IconTile` and `IconTile-Logo` - Added a new product variant for Vault Secrets.
@@ -1,2 +1,13 @@
1
1
  # [HDS Product - Foundations](https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?type=design&node-id=4728-1879&mode=design&t=vM0eNG3c9YY5rmmu-0)
2
2
 
3
+ ## November 2nd, 2023
4
+
5
+ `Elevation / Mid` - Fixed style not being correctly published to consuming libraries.
6
+
7
+ ## October 31st, 2023
8
+
9
+ `Components / Code Block / Code / 200` - Added component-specific text style for the CodeBlock.
10
+
11
+ ## October 20th, 2023
12
+
13
+ `Components / Code Block / Syntax` - Added syntax highlighting styles used by the CodeBlock component.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,70 @@
1
1
  # @hashicorp/design-system-components
2
2
 
3
+ ## 3.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ Added `@ember/string` as a direct dependency
8
+
9
+ <small>[#1782](https://github.com/hashicorp/design-system/pull/1782)</small>
10
+
11
+ ---
12
+
13
+ **πŸ”„ Updated dependencies:**
14
+
15
+ - @hashicorp/ember-flight-icons@4.0.3
16
+
17
+ ## 3.1.0
18
+
19
+ ### Minor Changes
20
+
21
+ `CodeBlock` - Added new component
22
+
23
+ <small>[#1687](https://github.com/hashicorp/design-system/pull/1687)</small>
24
+
25
+ ---
26
+
27
+ ### Patch Changes
28
+
29
+ Upgraded the following dependencies:
30
+
31
+ - `@ember/test-waiters` from `3.0.2` to `3.1.0`
32
+ - `ember-cli-htmlbars` from `6.2.0` to `6.3.0`
33
+ - `ember-focus-trap` from `1.0.2` to `1.1.0`
34
+ - `ember-keyboard` from `8.2.0` to `8.2.1`
35
+ - `sass` from `1.62.1` to `1.69.5`
36
+
37
+ <small>[#1756](https://github.com/hashicorp/design-system/pull/1756)</small>
38
+
39
+ ---
40
+
41
+ `Breadcrumb` - Added support for external links
42
+
43
+ <small>[#1774](https://github.com/hashicorp/design-system/pull/1774)</small>
44
+
45
+ ---
46
+
47
+ Upgraded the following dependencies:
48
+
49
+ - `ember-cached-decorator-polyfill` from `0.1.4` to `1.0.2`
50
+ - `ember-cli-babel` from `7.26.11` to `8.2.0`
51
+ - `ember-cli-sass` from `10.0.1` to `11.0.1`
52
+ - `ember-composable-helpers` from `4.5.0` to `5.0.0`
53
+
54
+ <small>[#1761](https://github.com/hashicorp/design-system/pull/1761)</small>
55
+
56
+ ---
57
+
58
+ `Button` - Fixed `HdsInteractiveSignature` type import
59
+
60
+ <small>[#1769](https://github.com/hashicorp/design-system/pull/1769)</small>
61
+
62
+ ---
63
+
64
+ **πŸ”„ Updated dependencies:**
65
+
66
+ - @hashicorp/ember-flight-icons@4.0.2
67
+
3
68
  ## 3.0.2
4
69
 
5
70
  ### Patch Changes
@@ -1,70 +1,89 @@
1
1
  # New Component Checklist
2
2
 
3
- This is the quest issue/engineering checklist for the COMPONENT_NAME Component. All new components will have their own feature branch, and any PR that adds an item from the checklist should target the feature branch, and not `main`.
3
+ This is the checklist the HDS team uses for any new component project. All new components will have their own feature branch, and any PR that adds an item from the checklist should target the feature branch, and not `main`.
4
4
 
5
5
  ## Pre-Flight Checklist
6
- Update this list and these links as appropriate.
7
6
 
8
- - [Component Audit](https://www.figma.com/file/h3LtloARmbYVwh7z6XWHVb/Component-Audits-FY23?node-id=0%3A1): This audit should be completed by ambassadors before any work gets started.
9
- - [Component Requirement Document (CRD)](https://docs.google.com/document/d/1kGcdfnb_z5tVUUvkSJGQPOssNd1yl2SVyd7bqk1KXII/): This file should exist before any design explorations or code is written.
10
- - ["System of Systems" Storybook](https://unofficial-design-system-search.vercel.app) (storybook of storybooks): use for reference, to consider existing features that we might need to replicate in the component.
7
+ The following should be available as resources for the Project Kickoff.
11
8
 
9
+ - [Component Audit](https://www.figma.com/file/wPDhYo23Rk5WDZ5lHC04W3/Component-Audits-FY24?type=design&t=yWY94cHxIGiat5L7-6): This audit is performed by HDS Ambassadors and should be **complete** before the kickoff.
10
+ - [Component Requirement Document (CRD)](https://docs.google.com/document/d/1kGcdfnb_z5tVUUvkSJGQPOssNd1yl2SVyd7bqk1KXII/): This file should be started before the kickoff and include an early estimate of scope and any open questions that need to be answered during the kickoff.
11
+
12
+ ## Project Kickoff
13
+
14
+ A project kickoff will be scheduled before the project start date. The kickoff will be used to align on project scope, timelines, and milestones and as a space to discuss any open questions. In attendance should be Design System team leadership, lead Designer and Engineer on the project, and Design/Engineer buddies (if applicable).
12
15
 
13
16
  ## Design Checklist
14
- The design checklist has 5 parts:
15
- 1. creating the branch
16
- 2. design explorations and iterations
17
+ The design checklist has 4 primary parts:
18
+ 1. component design
19
+ 2. testing
17
20
  3. documentation
18
- 4. release
19
- 5. testing
21
+ 4. final release
20
22
 
21
- The design process is largely cyclical, so some of these steps may need to be repeated until approval.
23
+ The design process is largely cyclical, so some steps may be repeated until final approval.
22
24
 
23
- ### Component Creation
25
+ ### Component Design
24
26
  - [ ] [create a branch](https://help.figma.com/hc/en-us/articles/360063144053-Create-branches-and-merge-changes#Create_a_branch) in the [product components ui kit](https://www.figma.com/file/noyY6dUMDYjmySpHcMjhkN/HDS-Product---Components)
25
27
  - [ ] add a new page for the component, as needed
26
- - [ ] copy & paste the [stickersheet template](https://www.figma.com/file/noyY6dUMDYjmySpHcMjhkN/HDS-Product---Components?node-id=2279%3A26800) found in UI Helpers to the new page
27
- - [ ] update the status badge to "In progress"
28
- - [ ] change "{DOC TYPE}" to "STICKERSHEET"
28
+ - [ ] copy & paste the [new component template](https://www.figma.com/file/noyY6dUMDYjmySpHcMjhkN/HDS-Product---Components?type=design&node-id=46856-287&mode=design&t=V4zCk5Jv07PcHYzZ-4) to the new page
29
+ - [ ] set the position of this frame to 0, 0
30
+ - [ ] update the status badge in the banner to "In progress"
29
31
  - [ ] change "{Component name}" to the name of the component
30
- - [ ] delete the sunset notice
31
- - [ ] **design**
32
- - [ ] work through design explorations, providing 2-3 visual directions based on existing [foundations](https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?node-id=2916%3A4) and patterns, as well as the findings from the audit and requirements from the CRD
33
- - [ ] review with appropriate stakeholders (typically HDS designers, engineering partner, ambassadors) and iterate
34
- - [ ] review for a11y considerations and iterate, as necessary
35
- - [ ] review with design leadership and iterate, as necessary
36
- - [ ] once approved, build out the design as a component
37
- - ensure the variant and property names align with what was discussed/decided on with your engineering partner
38
- - [ ] test the component with HDS designers and iterate, as necessary
39
- - [ ] sync with your engineering partner (pseudo handoff)
40
- - let them know it's been design approved and discuss any remaining questions (this should be an ongoing process as well)
41
- - [ ] **documentation**
42
- - all documentation should be contained within frames so it can be easily linked to
43
- - [ ] stickersheet
44
- - make sure the component instances can be easily selected and other layers are locked
45
- - [ ] design guidelines
46
- - when complete, lock this frame
47
- - [ ] figma tips, as necessary
48
- - when complete, lock this frame
49
- - [ ] migration details, as necessary
50
- - when complete, lock this frame
51
- - [ ] let your engineering partner know that design guidelines are ready to be added to the scrappy site (they will add it themselves)
52
- - [ ] **release**
53
- - [ ] lock and hide the components leaving only the stickersheets and docs visible, and change the header's badge to Experimental
54
- - [ ] add release notes to the changelog
55
- - [ ] review with situationally appropriate reviewers to get final approval
32
+ - [ ] delete the figma tips frame, if not needed
33
+ - [ ] design and build the component, taking into account existing [foundations](https://www.figma.com/file/oQsMzMMnynfPWpMEt91OpH/HDS-Product---Foundations?node-id=2916%3A4) and patterns, as well as the findings from the audit and requirements from the CRD
34
+ - artifacts should include:
35
+ - component explorations
36
+ - examples in context
37
+ - built component
38
+ - [ ] review with situationally appropriate stakeholders and iterate
39
+ - reviewers should include:
40
+ - HDS designers and manager
41
+ - engineering partner(s)
42
+ - a11y SME
43
+ - other external stakeholders as defined during the kickoff
44
+ - consider also including the design ambassadors
45
+ - reviews should include checks for:
46
+ - alignment to Helios design vision
47
+ - ux solution
48
+ - fulfillment of requirements from the audit and CRD
49
+ - a11y conformance
50
+ - alignment to code API
51
+ - consistent naming conventions
52
+ - token usage
53
+ - [ ] have HDS designers test the component and iterate, as necessary
54
+ - [ ] add a variety of examples to the stickersheet
55
+ - make sure the component instances can be easily selected and other layers are locked
56
+ - [ ] add any necessary figma tips
57
+ - [ ] request a final branch review from HDS designers
58
+ - [ ] sync with your engineering partner
59
+ - let them know it's been approved and answer any remaining questions
60
+
61
+ ### Component Testing
62
+ - [ ] prepare for testing
63
+ - [ ] lock the components
64
+ - [ ] change the badge in the banner to "Experimental"
56
65
  - [ ] merge the branch
57
- - [ ] publish the ui kit
58
- - Important: do not communicate this release to consumers yet! (this will be done later in the process)
59
- - [ ] **testing**
60
- - [ ] add a new page to the [playground](https://www.figma.com/file/95YqaJF4TNV72ucXbyC7A0/Playground?node-id=302%3A10) file and prepare a frame for each ambassador to test
66
+ - [ ] publish the component
67
+ - Important: do not communicate this release to consumers yet (this will be done later in the process)
68
+ - [ ] add a new page to the [playground](https://www.figma.com/file/JnkAC69NeUX83Pug32o7Mr/%F0%9F%AA%81-Playground-FY24?type=design&node-id=302-10&mode=design&t=Ov4rEelxWK7rxLdI-0) file and prepare a frame for each ambassador
61
69
  - provide a variety (basic to complex) of screenshots to recreate based on real world examples from the audit
62
- - [ ] test the component with ambassadors
63
- - if iterations are needed, work through the process until approved (don't forget to branch!)
64
- - [ ] **final release**
65
- - this comes after ambassadors have tested the component in Figma and no other adjustments are needed
66
- - [ ] if changes were required, follow the steps under "release" again
67
- - [ ] share about the release in the slack channel [#team-design-systems](https://hashicorp.slack.com/archives/C7KTUHNUS) and let consumers know that the component is available for use in Figma
70
+ - [ ] ask ambassadors to test the component
71
+ - depending on the complexity, we usually give them 3-4 days to complete the testing
72
+ - [ ] if iterations are needed, work through the process until approved (don't forget to branch!)
73
+
74
+ ### Documentation
75
+ - [ ] while the component is being tested, write the documentation
76
+ - artifacts should include:
77
+ - design guidelines
78
+ - specifications
79
+ - relevant accessibility details
80
+
81
+ ### Release in Figma
82
+ Once ambassadors have tested the component and iterations are approved, prepare for a final release of the component.
83
+
84
+ - [ ] add a changelog entry to [CHANGELOG-FIGMA-COMPONENTS.md](https://github.com/hashicorp/design-system/blob/main/packages/components/CHANGELOG-FIGMA-COMPONENTS.md)
85
+ - [ ] if changes were made, publish the component
86
+ - [ ] once the code has been released, communicate the release in the slack channel [#team-design-systems](https://hashicorp.slack.com/archives/C7KTUHNUS)
68
87
 
69
88
 
70
89
  ## Engineering Checklist
@@ -13,18 +13,38 @@
13
13
  <span class="hds-breadcrumb__text">{{@text}}</span>
14
14
  </div>
15
15
  {{else}}
16
- <LinkTo
17
- class="hds-breadcrumb__link"
18
- @models={{hds-link-to-models @model @models}}
19
- @query={{hds-link-to-query @query}}
20
- @route={{@route}}
21
- >
22
- {{#if @icon}}
23
- <div class="hds-breadcrumb__icon">
24
- <FlightIcon @name={{@icon}} @size="16" @stretched={{true}} />
25
- </div>
26
- {{/if}}
27
- <span class="hds-breadcrumb__text">{{@text}}</span>
28
- </LinkTo>
16
+ {{#if @isRouteExternal}}
17
+ <LinkToExternal
18
+ class="hds-breadcrumb__link"
19
+ @current-when={{@current-when}}
20
+ @models={{hds-link-to-models @model @models}}
21
+ @query={{hds-link-to-query @query}}
22
+ @replace={{@replace}}
23
+ @route={{@route}}
24
+ >
25
+ {{#if @icon}}
26
+ <div class="hds-breadcrumb__icon">
27
+ <FlightIcon @name={{@icon}} @size="16" @stretched={{true}} />
28
+ </div>
29
+ {{/if}}
30
+ <span class="hds-breadcrumb__text">{{@text}}</span>
31
+ </LinkToExternal>
32
+ {{else}}
33
+ <LinkTo
34
+ class="hds-breadcrumb__link"
35
+ @current-when={{@current-when}}
36
+ @models={{hds-link-to-models @model @models}}
37
+ @query={{hds-link-to-query @query}}
38
+ @replace={{@replace}}
39
+ @route={{@route}}
40
+ >
41
+ {{#if @icon}}
42
+ <div class="hds-breadcrumb__icon">
43
+ <FlightIcon @name={{@icon}} @size="16" @stretched={{true}} />
44
+ </div>
45
+ {{/if}}
46
+ <span class="hds-breadcrumb__text">{{@text}}</span>
47
+ </LinkTo>
48
+ {{/if}}
29
49
  {{/if}}
30
50
  </li>
@@ -5,7 +5,7 @@
5
5
 
6
6
  import Component from '@glimmer/component';
7
7
  import { assert } from '@ember/debug';
8
- import { HdsInteractiveSignature } from '../interactive';
8
+ import { type HdsInteractiveSignature } from '../interactive';
9
9
 
10
10
  export const DEFAULT_SIZE = 'medium';
11
11
  export const DEFAULT_COLOR = 'primary';
@@ -0,0 +1,13 @@
1
+ {{!
2
+ Copyright (c) HashiCorp, Inc.
3
+ SPDX-License-Identifier: MPL-2.0
4
+ }}
5
+
6
+ <Hds::Copy::Button
7
+ class="hds-code-block__copy-button"
8
+ @text="Copy"
9
+ @isIconOnly={{true}}
10
+ @size="small"
11
+ @targetToCopy={{@targetToCopy}}
12
+ ...attributes
13
+ />
@@ -0,0 +1,8 @@
1
+ {{!
2
+ Copyright (c) HashiCorp, Inc.
3
+ SPDX-License-Identifier: MPL-2.0
4
+ }}
5
+
6
+ <Hds::Text::Body @tag="p" @size="100" class="hds-code-block__description" ...attributes>
7
+ {{yield}}
8
+ </Hds::Text::Body>
@@ -0,0 +1,30 @@
1
+ {{!
2
+ Copyright (c) HashiCorp, Inc.
3
+ SPDX-License-Identifier: MPL-2.0
4
+ }}
5
+
6
+ <div class={{this.classNames}} ...attributes>
7
+ <div class="hds-code-block__header">
8
+ {{~yield (hash Title=(component "hds/code-block/title"))~}}
9
+ {{~yield (hash Description=(component "hds/code-block/description"))~}}
10
+ </div>
11
+ <div class="hds-code-block__body">
12
+ <pre
13
+ class="hds-code-block__code"
14
+ {{style maxHeight=@maxHeight}}
15
+ data-line={{@highlightLines}}
16
+ id={{this.preCodeId}}
17
+ tabindex="0"
18
+ >
19
+ {{~! ~}}
20
+ <code {{did-insert this.setPrismCode}} {{did-update this.setPrismCode this.code @language}}>
21
+ {{~this.prismCode~}}
22
+ </code>
23
+ {{~! ~}}
24
+ </pre>
25
+
26
+ {{#if @hasCopyButton}}
27
+ <Hds::CodeBlock::CopyButton @targetToCopy="#{{this.preCodeId}}" aria-describedby={{this.preCodeId}} />
28
+ {{/if}}
29
+ </div>
30
+ </div>
@@ -0,0 +1,162 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ import Component from '@glimmer/component';
7
+ import { action } from '@ember/object';
8
+ import { tracked } from '@glimmer/tracking';
9
+ import { assert } from '@ember/debug';
10
+ import { htmlSafe } from '@ember/template';
11
+ import { guidFor } from '@ember/object/internals';
12
+
13
+ import Prism from 'prismjs';
14
+
15
+ import 'prismjs/plugins/line-numbers/prism-line-numbers';
16
+ import 'prismjs/plugins/line-highlight/prism-line-highlight';
17
+
18
+ import 'prismjs/components/prism-bash';
19
+ import 'prismjs/components/prism-go';
20
+ import 'prismjs/components/prism-hcl';
21
+ import 'prismjs/components/prism-json';
22
+ import 'prismjs/components/prism-log';
23
+ import 'prismjs/components/prism-shell-session';
24
+ import 'prismjs/components/prism-yaml';
25
+
26
+ // These imports are required to overcome a global variable clash in Helios website
27
+ // where language import are overriden by the Prism instance in `CodeBlock`
28
+ // Note that `prism-handlebars` is dependant on `prism-markup-templating`
29
+ import 'prismjs/components/prism-markup-templating';
30
+ import 'prismjs/components/prism-handlebars';
31
+
32
+ export default class HdsCodeBlockIndexComponent extends Component {
33
+ @tracked prismCode = '';
34
+
35
+ /**
36
+ * Generates a unique ID for the code content
37
+ *
38
+ * @param preCodeId
39
+ */
40
+ preCodeId = 'pre-code-' + guidFor(this);
41
+
42
+ /**
43
+ * @param code
44
+ * @type {string}
45
+ * @description code text content for the CodeBlock
46
+ */
47
+ get code() {
48
+ const code = this.args.value;
49
+
50
+ assert(
51
+ '@code for "Hds::CodeBlock" must have a valid value',
52
+ code !== undefined
53
+ );
54
+
55
+ if (Prism?.plugins?.NormalizeWhitespace) {
56
+ return Prism.plugins.NormalizeWhitespace.normalize(code);
57
+ }
58
+
59
+ return code;
60
+ }
61
+
62
+ /**
63
+ * @param language
64
+ * @type {string}
65
+ * @default undefined
66
+ * @description name of coding language used within CodeBlock for syntax highlighting
67
+ */
68
+ get language() {
69
+ return this.args.language ?? undefined;
70
+ }
71
+
72
+ /**
73
+ * @param hasLineNumbers
74
+ * @type {boolean}
75
+ * @default true
76
+ * @description Displays line numbers if true
77
+ */
78
+ get hasLineNumbers() {
79
+ return this.args.hasLineNumbers ?? true;
80
+ }
81
+
82
+ /**
83
+ * @param isStandalone
84
+ * @type {boolean}
85
+ * @default true
86
+ * @description Make CodeBlock container corners appear rounded
87
+ */
88
+ get isStandalone() {
89
+ return this.args.isStandalone ?? true;
90
+ }
91
+
92
+ /**
93
+ * @param hasLineWrapping
94
+ * @type {boolean}
95
+ * @default false
96
+ * @description Make text content wrap on multiple lines
97
+ */
98
+ get hasLineWrapping() {
99
+ return this.args.hasLineWrapping ?? false;
100
+ }
101
+
102
+ @action
103
+ setPrismCode(element) {
104
+ const code = this.code;
105
+ const language = this.language;
106
+ const grammar = Prism.languages[language];
107
+
108
+ if (code) {
109
+ if (language && grammar) {
110
+ this.prismCode = htmlSafe(Prism.highlight(code, grammar, language));
111
+ } else {
112
+ this.prismCode = htmlSafe(Prism.util.encode(code));
113
+ }
114
+
115
+ // Force prism-line-numbers plugin initialization, required for Prism.highlight usage
116
+ // See https://github.com/PrismJS/prism/issues/1234
117
+ Prism.hooks.run('complete', {
118
+ code,
119
+ element,
120
+ });
121
+
122
+ // Force prism-line-highlight plugin initialization
123
+ // Context: https://github.com/hashicorp/design-system/pull/1749#discussion_r1374288785
124
+ if (this.args.highlightLines) {
125
+ setTimeout(() => {
126
+ // we piggy-back on the plugin's `resize` event listener to trigger a new call of the `highlightLines` function: https://github.com/PrismJS/prism/blob/master/plugins/line-highlight/prism-line-highlight.js#L337
127
+ if (window) window.dispatchEvent(new Event('resize'));
128
+ }, 100);
129
+ }
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Get the class names to apply to the component.
135
+ * @method classNames
136
+ * @return {string} The "class" attribute to apply to the component.
137
+ */
138
+ get classNames() {
139
+ // Currently there is only one theme so the class name is hard-coded.
140
+ // In the future, additional themes such as a "light" theme could be added.
141
+ let classes = ['hds-code-block', 'hds-code-block--theme-dark'];
142
+
143
+ if (this.language) {
144
+ classes.push(`language-${this.language}`);
145
+ }
146
+
147
+ if (this.isStandalone === true) {
148
+ classes.push('hds-code-block--is-standalone');
149
+ }
150
+
151
+ if (this.hasLineWrapping === true) {
152
+ classes.push('hds-code-block--has-line-wrapping');
153
+ }
154
+
155
+ // Note: Prism.js is using the specific class name "line-numbers" to determine implementation of line numbers in the UI
156
+ if (this.hasLineNumbers || this.args.highlightLines) {
157
+ classes.push('line-numbers');
158
+ }
159
+
160
+ return classes.join(' ');
161
+ }
162
+ }
@@ -0,0 +1,8 @@
1
+ {{!
2
+ Copyright (c) HashiCorp, Inc.
3
+ SPDX-License-Identifier: MPL-2.0
4
+ }}
5
+
6
+ <Hds::Text::Body @size="200" @tag="p" @weight="semibold" class="hds-code-block__title" ...attributes>
7
+ {{yield}}
8
+ </Hds::Text::Body>
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ export { default } from '@hashicorp/design-system-components/components/hds/code-block/copy-button';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ export { default } from '@hashicorp/design-system-components/components/hds/code-block/description';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ export { default } from '@hashicorp/design-system-components/components/hds/code-block/index';
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ export { default } from '@hashicorp/design-system-components/components/hds/code-block/title';
@@ -24,6 +24,7 @@
24
24
  @use "../components/button";
25
25
  @use "../components/button-set";
26
26
  @use "../components/card";
27
+ @use "../components/code-block";
27
28
  @use "../components/copy";
28
29
  @use "../components/disclosure-primitive";
29
30
  @use "../components/dismiss-button";
@@ -0,0 +1,249 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ //
7
+ // CODE-BLOCK
8
+ //
9
+
10
+
11
+ @use "../../mixins/focus-ring" as *;
12
+
13
+ // Note: "theme" contains just color variables and syntax highlighting styles
14
+ @import "theme";
15
+
16
+ // DIMENSIONS
17
+ $code-block-line-numbers-width: 49px; // 3em β‰ˆ 49px
18
+ $code-block-code-padding: 16px;
19
+
20
+ // CODE-BLOCK PARENT/WRAPPER
21
+
22
+ .hds-code-block {
23
+ position: relative;
24
+ color: var(--hds-code-block-color-foreground-primary);
25
+ background-color: var(--hds-code-block-color-surface-primary);
26
+ border: 1px solid var(--hds-code-block-color-border-strong);
27
+
28
+ pre,
29
+ code {
30
+ line-height: 1.4286;
31
+ white-space: pre;
32
+ text-align: left;
33
+ text-shadow: none;
34
+ word-wrap: normal;
35
+ word-break: normal;
36
+ word-spacing: normal;
37
+ tab-size: 4;
38
+ hyphens: none;
39
+
40
+ @media print { text-shadow: none; }
41
+ }
42
+ }
43
+
44
+ // VARIANTS
45
+
46
+ // isStandalone
47
+ .hds-code-block--is-standalone {
48
+ border-radius: 6px;
49
+ }
50
+
51
+ // hasLineWrapping
52
+ .hds-code-block--has-line-wrapping {
53
+ .hds-code-block__code,
54
+ .hds-code-block__code code {
55
+ white-space: pre-wrap;
56
+ }
57
+ }
58
+
59
+ // CHILD COMPONENTS / ELEMENTS
60
+
61
+ // Header (contains title & description)
62
+
63
+ .hds-code-block__title {
64
+ color: var(--hds-code-block-color-foreground-primary);
65
+ }
66
+
67
+ .hds-code-block__description {
68
+ color: var(--hds-code-block-color-foreground-faint);
69
+ }
70
+
71
+ .hds-code-block__header {
72
+ display: flex;
73
+ flex-direction: column;
74
+ gap: 4px;
75
+ padding: 8px $code-block-code-padding;
76
+ background-color: var(--hds-code-block-color-surface-faint);
77
+ border-bottom: 1px solid var(--hds-code-block-color-border-primary);
78
+ border-top-left-radius: inherit;
79
+ border-top-right-radius: inherit;
80
+
81
+ &:empty {
82
+ display: none;
83
+ }
84
+
85
+ // we add very basic styling for elements that may be yielded in the "title"/"description" elements
86
+
87
+ strong {
88
+ font-weight: var(--token-typography-font-weight-semibold);
89
+ }
90
+
91
+ code,
92
+ pre {
93
+ display: inline;
94
+ font-size: 0.9em; // as discussed with designers, we reduce the size for optical/visual balance
95
+ font-family: var(--token-typography-code-100-font-family);
96
+ line-height: 1em;
97
+ }
98
+
99
+ // Default styling for bare HTML links not using HDS::Link components
100
+ a:not([class*="hds-"]) {
101
+ color: var(--hds-code-block-color-foreground-action);
102
+
103
+ &:focus,
104
+ &:focus-visible {
105
+ text-decoration: none;
106
+ outline: 2px solid var(--token-color-focus-action-internal);
107
+ outline-offset: 1px;
108
+ }
109
+
110
+ &:hover {
111
+ color: var(--token-color-foreground-action-hover);
112
+ }
113
+
114
+ &:active {
115
+ color: var(--token-color-foreground-action-active);
116
+ }
117
+ }
118
+ }
119
+
120
+ .hds-code-block__body {
121
+ position: relative;
122
+ border-radius: inherit;
123
+ }
124
+
125
+ // Code
126
+ .hds-code-block__code {
127
+ @include hds-focus-ring-basic();
128
+ display: block;
129
+ margin: 0;
130
+ padding: $code-block-code-padding;
131
+ overflow: auto;
132
+ font-size: 0.8125rem;
133
+ font-family: var(--hds-typography-code-200);
134
+ border-radius: inherit;
135
+
136
+ ::selection {
137
+ color: var(--hds-code-block-color-foreground-selection);
138
+ background-color: var(--hds-code-block-color-surface-selection);
139
+ }
140
+ }
141
+
142
+ // CopyButton
143
+ .hds-code-block__copy-button {
144
+ position: absolute;
145
+ top: 11px; // 12px -1px accounting for border
146
+ right: 12px; // 12px -1px accounting for border
147
+ // Overriding default colors
148
+ color: var(--hds-code-block-color-foreground-primary);
149
+ background-color: var(--hds-code-block-color-surface-faint);
150
+ border: 1px solid var(--hds-code-block-color-border-strong);
151
+
152
+ &:hover,
153
+ &.mock-hover {
154
+ background-color: var(--hds-code-block-color-surface-primary);
155
+ border-color: var(--hds-code-block-color-border-strong);
156
+ }
157
+
158
+ &:active,
159
+ &.mock-active {
160
+ background-color: var(--hds-code-block-color-surface-interactive-active);
161
+ }
162
+
163
+ &:focus,
164
+ &.mock-focus,
165
+ &:focus-visible {
166
+ background-color: var(--hds-code-block-color-surface-faint);
167
+ }
168
+
169
+ &.hds-copy-button--status-success {
170
+ .flight-icon {
171
+ color: var(--hds-code-block-color-foreground-success);
172
+ }
173
+ }
174
+
175
+ &.hds-copy-button--status-error {
176
+ .flight-icon {
177
+ color: var(--hds-code-block-color-foreground-critical);
178
+ }
179
+ }
180
+
181
+ .flight-icon { color: var(--hds-code-block-color-foreground-primary); }
182
+ }
183
+
184
+ .hds-code-block {
185
+ // LineNumbers plugin styles ---------------
186
+ // Note: Prism.js is using the specific class name "line-numbers" to determine implementation of line numbers in the UI
187
+ &.line-numbers {
188
+ counter-reset: linenumber;
189
+
190
+ .hds-code-block__code {
191
+ position: relative;
192
+ // reserve space for line numbers
193
+ padding-left: calc(#{$code-block-line-numbers-width} + #{$code-block-code-padding});
194
+ }
195
+
196
+ .line-numbers-rows {
197
+ position: absolute;
198
+ top: 0;
199
+ left: 0;
200
+ min-width: $code-block-line-numbers-width;
201
+ min-height: 100%;
202
+ padding: $code-block-code-padding 0;
203
+ border-right: 1px solid var(--hds-code-block-color-border-primary);
204
+ user-select: none;
205
+ pointer-events: none;
206
+
207
+ > span {
208
+ display: block;
209
+ counter-increment: linenumber;
210
+
211
+ &::before {
212
+ display: block;
213
+ padding-right: $code-block-code-padding;
214
+ text-align: right;
215
+ content: counter(linenumber);
216
+ }
217
+ }
218
+ }
219
+ }
220
+
221
+ // Highlighted Lines
222
+ .line-highlight {
223
+ position: absolute;
224
+ right: 0;
225
+ left: 0;
226
+ // Note: position seems off by a few px although not sure why
227
+ margin-top: -3px;
228
+ background-color: var(--hds-code-block-color-line-highlight);
229
+ border: solid var(--hds-code-block-color-line-highlight-border);
230
+ border-width: 1px 0 1px 4px;
231
+ mix-blend-mode: screen;
232
+ pointer-events: none;
233
+ }
234
+
235
+ @media print {
236
+ .line-highlight {
237
+ /*
238
+ * This will prevent browsers from replacing the background color with white.
239
+ * It's necessary because the element is layered on top of the displayed code.
240
+ */
241
+ -webkit-print-color-adjust: exact;
242
+ color-adjust: exact;
243
+ }
244
+ }
245
+
246
+ // commmon tokens
247
+ .token.bold { font-weight: bold; }
248
+ .token.italic { font-style: italic; }
249
+ }
@@ -0,0 +1,164 @@
1
+ /**
2
+ * Copyright (c) HashiCorp, Inc.
3
+ * SPDX-License-Identifier: MPL-2.0
4
+ */
5
+
6
+ // THEMING
7
+
8
+ .hds-code-block--theme-dark {
9
+ // COLORS
10
+
11
+ // Descriptive color names:
12
+
13
+ --hds-code-block-color-blue: #2d8eff;
14
+ --hds-code-block-color-cyan: #32fff7;
15
+ --hds-code-block-color-green: #86ff13;
16
+ --hds-code-block-color-orange: #ffa800;
17
+ --hds-code-block-color-purple: #c76cff;
18
+ --hds-code-block-color-red: #ff3b20;
19
+
20
+ // Semantic color names:
21
+
22
+ // Base UI colors:
23
+ --hds-code-block-color-foreground-primary: #d5d7db;
24
+ --hds-code-block-color-foreground-faint: #b2b6bd;
25
+ --hds-code-block-color-surface-primary: #0d0e12;
26
+ --hds-code-block-color-surface-faint: #15181e;
27
+ // status ----
28
+ --hds-code-block-color-foreground-success: #009241;
29
+ --hds-code-block-color-foreground-critical: #ef3016;
30
+ // interactive ---
31
+ --hds-code-block-color-foreground-interactive: #dedfe3;
32
+ --hds-code-block-color-foreground-interactive-hover: #fff;
33
+ --hds-code-block-color-foreground-interactive-active: #f1f2f3;
34
+ --hds-code-block-color-surface-interactive-active: #2b303c;
35
+ // actions ---
36
+ --hds-code-block-color-foreground-action: #2b89ff;
37
+ --hds-code-block-color-foreground-action-hover: #389aff;
38
+ --hds-code-block-color-foreground-action-active: #4ca1ff;
39
+ // borders
40
+ --hds-code-block-color-border-strong: rgba(178, 182, 189, 40%); // #b2b6bd66
41
+ --hds-code-block-color-border-primary: rgba(178, 182, 189, 20%); // #b2b6bd33
42
+ // selection
43
+ --hds-code-block-color-foreground-selection: #0d0e12;
44
+ --hds-code-block-color-surface-selection: #86ff13;
45
+
46
+ // CodeBlock UI:
47
+ // lines of code - highlighted ----
48
+ --hds-code-block-color-line-highlight: rgba(0, 74, 222, 20%);
49
+ --hds-code-block-color-line-highlight-border: #1555d4;
50
+
51
+ // Syntax highlighting tokens:
52
+ // general ----
53
+ --hds-code-block-color-token: var(--hds-code-block-color-green);
54
+ // specific ----
55
+ --hds-code-block-color-atrule: var(--hds-code-block-color-blue);
56
+ --hds-code-block-color-code-block-attr-name: var(--hds-code-block-color-blue);
57
+ --hds-code-block-color-attr-value: var(--hds-code-block-color-blue);
58
+ --hds-code-block-color-boolean: var(--hds-code-block-color-purple);
59
+ --hds-code-block-color-builtin: var(--hds-code-block-color-orange);
60
+ --hds-code-block-color-char: var(--hds-code-block-color-orange);
61
+ --hds-code-block-color-class-name: var(--hds-code-block-color-green);
62
+ --hds-code-block-color-comment: var(--hds-code-block-color-foreground-faint);
63
+ --hds-code-block-color-control: var(--hds-code-block-color-cyan);
64
+ --hds-code-block-color-constant: var(--hds-code-block-color-purple);
65
+ --hds-code-block-color-deleted: var(--hds-code-block-color-red);
66
+ --hds-code-block-color-entity: var(--hds-code-block-color-green);
67
+ --hds-code-block-color-function: var(--hds-code-block-color-blue);
68
+ --hds-code-block-color-important: var(--hds-code-block-color-red);
69
+ --hds-code-block-color-keyword: var(--hds-code-block-color-green);
70
+ --hds-code-block-color-namespace: var(--hds-code-block-color-red);
71
+ --hds-code-block-color-number: var(--hds-code-block-color-purple);
72
+ --hds-code-block-color-operator: var(--hds-code-block-color-cyan);
73
+ --hds-code-block-color-prolog: var(--hds-code-block-color-foreground-primary);
74
+ --hds-code-block-color-property: var(--hds-code-block-color-blue);
75
+ --hds-code-block-color-punctuation: var(--hds-code-block-color-foreground-primary);
76
+ --hds-code-block-color-regex: var(--hds-code-block-color-orange);
77
+ --hds-code-block-color-script: var(--hds-code-block-color-foreground-primary);
78
+ --hds-code-block-color-selector: var(--hds-code-block-color-green);
79
+ --hds-code-block-color-string: var(--hds-code-block-color-orange);
80
+ --hds-code-block-color-symbol: var(--hds-code-block-color-orange);
81
+ --hds-code-block-color-tag: var(--hds-code-block-color-green);
82
+ --hds-code-block-color-url: var(--hds-code-block-color-cyan);
83
+ // language-scoped:
84
+ // css ----
85
+ --hds-code-block-color-lang-css: var(--hds-code-block-color-purple);
86
+ --hds-code-block-color-lang-css-token: var(--hds-code-block-color-green);
87
+ --hds-code-block-color-lang-css-atrule: var(--hds-code-block-color-purple);
88
+ --hds-code-block-color-lang-css-entity: var(--hds-code-block-color-blue);
89
+ --hds-code-block-color-lang-css-function: var(--hds-code-block-color-cyan);
90
+ --hds-code-block-color-lang-css-property: var(--hds-code-block-color-cyan);
91
+ --hds-code-block-color-lang-css-punctuation: var(--hds-code-block-color-orange);
92
+ --hds-code-block-color-lang-css-not-atrule: var(--hds-code-block-color-foreground-primary);
93
+ --hds-code-block-color-lang-css-selector: var(--hds-code-block-color-blue);
94
+ --hds-code-block-color-lang-css-url: var(--hds-code-block-color-orange);
95
+ // javascript ----
96
+ --hds-code-block-color-lang-js-constant: var(--hds-code-block-color-orange);
97
+ // markup/html ----
98
+ --hds-code-block-color-lang-markup-attr-value: var(--hds-code-block-color-yellow);
99
+ --hds-code-block-color-lang-markup-entity-named: var(--hds-code-block-color-purple);
100
+ --hds-code-block-color-lang-markup-entity-not-named: var(--hds-code-block-color-green);
101
+ }
102
+
103
+
104
+ .hds-code-block {
105
+ // Syntax highlighting ----
106
+
107
+ // General tokens
108
+ .token { color: var(--hds-code-block-color-token); }
109
+
110
+ .token.atrule { color: var(--hds-code-block-color-atrule); }
111
+ .token.attr-name { color: var(--hds-code-block-color-attr-name); }
112
+ .token.attr-value { color: var(--hds-code-block-color-attr-value); }
113
+ .token.boolean { color: var(--hds-code-block-color-boolean); }
114
+ .token.builtin { color: var(--hds-code-block-color-builtin); }
115
+ .token.char { color: var(--hds-code-block-color-char); }
116
+ .token.class-name { color: var(--hds-code-block-color-class-name); }
117
+ .token.comment { color: var(--hds-code-block-color-comment); }
118
+ .token.constant { color: var(--hds-code-block-color-constant); }
119
+ .token.deleted { color: var(--hds-code-block-color-deleted); }
120
+ .token.entity { color: var(--hds-code-block-color-entity); }
121
+ .token.function { color: var(--hds-code-block-color-function); }
122
+ .token.important { color: var(--hds-code-block-color-important); }
123
+ .token.keyword { color: var(--hds-code-block-color-keyword); }
124
+ .token.namespace { color: var(--hds-code-block-color-namespace); }
125
+ .token.number { color: var(--hds-code-block-color-number); }
126
+ .token.operator { color: var(--hds-code-block-color-operator); }
127
+ .token.punctuation { color: var(--hds-code-block-color-punctuation); }
128
+ .token.prolog { color: var(--hds-code-block-color-prolog); }
129
+ .token.property { color: var(--hds-code-block-color-property); }
130
+ .token.regex { color: var(--hds-code-block-color-regex); }
131
+ .token.script { color: var(--hds-code-block-color-script); }
132
+ .token.selector { color: var(--hds-code-block-color-selector); }
133
+ .token.string { color: var(--hds-code-block-color-string); }
134
+ .token.symbol { color: var(--hds-code-block-color-symbol); }
135
+ .token.tag { color: var(--hds-code-block-color-tag); }
136
+ .token.url { color: var(--hds-code-block-color-url); }
137
+ .token.variable { color: var(--hds-code-block-color-comment); }
138
+
139
+ // Language-specific
140
+ .language-css {
141
+ color: var(--hds-code-block-color-lang-css);
142
+
143
+ .token { color: var(--hds-code-block-color-lang-css-token); }
144
+ .token.atrule { color: var(--hds-code-block-color-lang-css-atrule); }
145
+ .token.rule:not(.atrule) { color: var(--hds-code-block-color-lang-css-not-atrule); }
146
+ .token.entity { color: var(--hds-code-block-color-lang-css-entity); }
147
+ .token.function { color: var(--hds-code-block-color-lang-css-function); }
148
+ .token.property { color: var(--hds-code-block-color-lang-css-property); }
149
+ .token.punctuation { color: var(--hds-code-block-color-lang-css-punctuatione); }
150
+ .token.selector { color: var(--hds-code-block-color-lang-css-selector); }
151
+ .token.url { color: var(--hds-code-block-color-lang-css-url); }
152
+ }
153
+
154
+ .language-javascript {
155
+ .token.constant { color: var(--hds-code-block-color-lang-js-constant); }
156
+ }
157
+
158
+ .language-markup,
159
+ .language-html {
160
+ .token.attr-value { color: var(--hds-code-block-color-lang-markup-attr-value); }
161
+ .token.entity.named-entity { color: var(--hds-code-block-color-lang-markup-entity-named); }
162
+ .token.entity:not(.named-entity) { color: var(--hds-code-block-color-lang-markup-entity-not-named); }
163
+ }
164
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hashicorp/design-system-components",
3
- "version": "3.0.2",
3
+ "version": "3.1.1",
4
4
  "description": "Helios Design System Components",
5
5
  "keywords": [
6
6
  "hashicorp",
@@ -41,101 +41,86 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@ember/render-modifiers": "^2.0.5",
44
- "@ember/test-waiters": "^3.0.2",
44
+ "@ember/string": "^3.1.1",
45
+ "@ember/test-waiters": "^3.1.0",
45
46
  "@hashicorp/design-system-tokens": "^1.9.0",
46
- "@hashicorp/ember-flight-icons": "^4.0.1",
47
+ "@hashicorp/ember-flight-icons": "^4.0.3",
47
48
  "dialog-polyfill": "^0.5.6",
48
49
  "ember-a11y-refocus": "^3.0.2",
49
50
  "ember-auto-import": "^2.6.3",
50
- "ember-cached-decorator-polyfill": "^0.1.4",
51
- "ember-cli-babel": "^7.26.11",
52
- "ember-cli-htmlbars": "^6.2.0",
53
- "ember-cli-sass": "^10.0.1",
54
- "ember-composable-helpers": "^4.5.0",
51
+ "ember-cached-decorator-polyfill": "^1.0.2",
52
+ "ember-cli-babel": "^8.2.0",
53
+ "ember-cli-htmlbars": "^6.3.0",
54
+ "ember-cli-sass": "^11.0.1",
55
+ "ember-composable-helpers": "^5.0.0",
55
56
  "ember-element-helper": "^0.8.5",
56
- "ember-focus-trap": "^1.0.2",
57
- "ember-keyboard": "^8.2.0",
57
+ "ember-focus-trap": "^1.1.0",
58
+ "ember-keyboard": "^8.2.1",
58
59
  "ember-stargate": "^0.4.3",
59
60
  "ember-style-modifier": "^3.0.1",
60
61
  "ember-truth-helpers": "^3.1.1",
61
- "sass": "^1.62.1",
62
+ "prismjs": "^1.29.0",
63
+ "sass": "^1.69.5",
62
64
  "tippy.js": "^6.3.7"
63
65
  },
64
66
  "devDependencies": {
67
+ "@babel/core": "^7.23.2",
68
+ "@babel/eslint-parser": "^7.22.15",
69
+ "@babel/plugin-proposal-decorators": "^7.23.2",
65
70
  "@ember/optional-features": "^2.0.0",
66
- "@ember/string": "^3.1.1",
67
- "@ember/test-helpers": "^2.9.3",
68
- "@embroider/test-setup": "^2.1.1",
71
+ "@ember/test-helpers": "^3.2.0",
72
+ "@embroider/test-setup": "^3.0.2",
69
73
  "@glimmer/component": "^1.1.2",
70
74
  "@glimmer/tracking": "^1.1.2",
71
- "@glint/core": "^1.1.0",
72
- "@glint/environment-ember-loose": "^1.1.0",
73
- "@glint/template": "^1.1.0",
74
- "@percy/cli": "^1.24.2",
75
+ "@glint/core": "^1.2.1",
76
+ "@glint/environment-ember-loose": "^1.2.1",
77
+ "@glint/template": "^1.2.1",
78
+ "@percy/cli": "^1.27.3",
75
79
  "@percy/ember": "^4.2.0",
76
- "@tsconfig/ember": "latest",
77
- "@types/ember": "latest",
78
- "@types/ember-qunit": "latest",
79
- "@types/ember-resolver": "latest",
80
- "@types/ember__application": "latest",
81
- "@types/ember__array": "latest",
82
- "@types/ember__component": "latest",
83
- "@types/ember__controller": "latest",
84
- "@types/ember__debug": "latest",
85
- "@types/ember__destroyable": "latest",
86
- "@types/ember__engine": "latest",
87
- "@types/ember__error": "latest",
88
- "@types/ember__object": "latest",
89
- "@types/ember__polyfills": "latest",
90
- "@types/ember__routing": "latest",
91
- "@types/ember__runloop": "latest",
92
- "@types/ember__service": "latest",
93
- "@types/ember__string": "latest",
94
- "@types/ember__template": "latest",
95
- "@types/ember__test": "latest",
96
- "@types/ember__test-helpers": "latest",
97
- "@types/ember__utils": "latest",
98
- "@types/qunit": "latest",
99
- "@types/rsvp": "latest",
100
- "babel-eslint": "^10.1.0",
80
+ "@tsconfig/ember": "^3.0.2",
81
+ "@types/ember-qunit": "^6.1.1",
82
+ "@types/ember-resolver": "^9.0.0",
83
+ "@types/qunit": "^2.19.7",
84
+ "@types/rsvp": "^4.0.6",
101
85
  "broccoli-asset-rev": "^3.0.0",
102
- "ember-a11y-testing": "^5.2.1",
86
+ "ember-a11y-testing": "^6.1.1",
103
87
  "ember-body-class": "^3.0.0",
104
- "ember-cli": "~4.12.1",
105
- "ember-cli-dependency-checker": "^3.3.1",
88
+ "ember-cli": "~5.3.0",
89
+ "ember-cli-clean-css": "^3.0.0",
90
+ "ember-cli-dependency-checker": "^3.3.2",
106
91
  "ember-cli-deprecation-workflow": "^2.1.0",
107
92
  "ember-cli-inject-live-reload": "^2.1.0",
108
93
  "ember-cli-sri": "^2.1.1",
109
94
  "ember-cli-string-helpers": "^6.1.0",
110
95
  "ember-cli-terser": "^4.0.2",
111
- "ember-concurrency": "^2.3.7",
96
+ "ember-concurrency": "^3.1.1",
112
97
  "ember-load-initializers": "^2.1.2",
113
- "ember-page-title": "^7.0.0",
114
- "ember-power-select": "^6.0.1",
115
- "ember-qunit": "^6.2.0",
116
- "ember-resolver": "^10.1.0",
117
- "ember-source": "~4.12.0",
98
+ "ember-page-title": "^8.0.0",
99
+ "ember-power-select": "^7.1.2",
100
+ "ember-qunit": "^8.0.1",
101
+ "ember-resolver": "^11.0.1",
102
+ "ember-source": "~5.3.0",
118
103
  "ember-source-channel-url": "^3.0.0",
119
104
  "ember-template-lint": "^4.18.2",
120
- "ember-template-lint-plugin-prettier": "^4.1.0",
121
- "ember-try": "^2.0.0",
122
- "eslint": "^7.32.0",
123
- "eslint-config-prettier": "^8.8.0",
124
- "eslint-plugin-ember": "^11.7.2",
105
+ "ember-template-lint-plugin-prettier": "^4.2.0",
106
+ "ember-try": "^3.0.0",
107
+ "eslint": "^8.52.0",
108
+ "eslint-config-prettier": "^8.10.0",
109
+ "eslint-plugin-ember": "^11.11.1",
125
110
  "eslint-plugin-node": "^11.1.0",
126
111
  "eslint-plugin-prettier": "^4.2.1",
127
- "eslint-plugin-qunit": "^7.3.4",
112
+ "eslint-plugin-qunit": "^8.0.1",
128
113
  "loader.js": "^4.7.0",
129
114
  "npm-run-all": "^4.1.5",
130
115
  "prettier": "^2.8.8",
131
- "qunit": "^2.19.4",
132
- "qunit-dom": "^2.0.0",
133
- "sinon": "^15.2.0",
134
- "stylelint": "^15.10.1",
116
+ "qunit": "^2.20.0",
117
+ "qunit-dom": "^3.0.0",
118
+ "sinon": "^17.0.0",
119
+ "stylelint": "^15.11.0",
135
120
  "stylelint-config-rational-order": "^0.1.2",
136
121
  "stylelint-config-standard-scss": "^5.0.0",
137
- "typescript": "^5.1.6",
138
- "webpack": "^5.84.1"
122
+ "typescript": "^5.2.2",
123
+ "webpack": "^5.89.0"
139
124
  },
140
125
  "engines": {
141
126
  "node": "16.* || >= 18"
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "declarationDir": "declarations",
5
+ "emitDeclarationOnly": true,
6
+ "noEmit": false,
7
+ "rootDir": "."
8
+ },
9
+ "include": ["addon", "addon-test-support"]
10
+ }
package/tsconfig.json CHANGED
@@ -7,6 +7,7 @@
7
7
  // layout, which is not resolvable with the Node resolution algorithm, to
8
8
  // work with TypeScript.
9
9
  "baseUrl": ".",
10
+ "skipLibCheck": true,
10
11
  "paths": {
11
12
  "dummy/tests/*": [
12
13
  "tests/*"
@@ -3,4 +3,5 @@
3
3
  * SPDX-License-Identifier: MPL-2.0
4
4
  */
5
5
 
6
+ import 'ember-source/types';
6
7
  import '@glint/environment-ember-loose';