@hashicorp/design-system-components 3.1.2 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +169 -113
- package/addon/components/hds/button/index.hbs +12 -12
- package/addon/components/hds/code-block/index.js +1 -0
- package/addon/components/hds/dropdown/list-item/checkmark.hbs +3 -3
- package/addon/components/hds/dropdown/list-item/interactive.hbs +3 -3
- package/addon/components/hds/form/character-count/index.hbs +28 -0
- package/addon/components/hds/form/character-count/index.js +178 -0
- package/addon/components/hds/form/field/index.hbs +10 -0
- package/addon/components/hds/form/masked-input/field.hbs +1 -1
- package/addon/components/hds/form/text-input/field.hbs +1 -1
- package/addon/components/hds/form/textarea/field.hbs +1 -1
- package/addon/components/hds/link/standalone.hbs +8 -8
- package/addon/components/hds/table/index.hbs +5 -1
- package/addon/components/hds/table/th.hbs +5 -1
- package/app/components/hds/{avatar → form/character-count}/index.js +1 -1
- package/app/styles/@hashicorp/design-system-components.scss +0 -1
- package/app/styles/components/button.scss +5 -0
- package/app/styles/components/dropdown.scss +2 -0
- package/app/styles/components/form/character-count.scss +12 -0
- package/app/styles/components/form/field.scss +4 -0
- package/app/styles/components/form/index.scss +1 -0
- package/app/styles/components/link/standalone.scss +5 -0
- package/app/styles/components/side-nav/toggle-button.scss +1 -1
- package/app/styles/components/side-nav/vars.scss +2 -0
- package/package.json +3 -3
- package/addon/components/hds/avatar/index.hbs +0 -11
- package/app/styles/components/avatar.scss +0 -27
package/CHANGELOG.md
CHANGED
|
@@ -1,26 +1,82 @@
|
|
|
1
1
|
# @hashicorp/design-system-components
|
|
2
2
|
|
|
3
|
+
## 3.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
`Hds::Form::CharacterCount` - Added new component
|
|
8
|
+
`Hds::Form::Field` - Added `CharacterCount` contextual component
|
|
9
|
+
`Hds::Form::MaskedInput::Field` - Added `CharacterCount` contextual component
|
|
10
|
+
`Hds::Form::TextInput::Field` - Added `CharacterCount` contextual component
|
|
11
|
+
`Hds::Form::Textarea::Field` - Added `CharacterCount` contextual component
|
|
12
|
+
|
|
13
|
+
<small class="doc-whats-new-changelog-metadata">[#1802](https://github.com/hashicorp/design-system/pull/1802)</small>
|
|
14
|
+
|
|
15
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
`Button` - updated DOM structure to contain only `span` elements
|
|
20
|
+
|
|
21
|
+
`Dropdown` - updated button elements DOM structure to contain only `span` elements
|
|
22
|
+
|
|
23
|
+
`Link::Standalone` - updated DOM structure to contain only `span` elements
|
|
24
|
+
|
|
25
|
+
<small class="doc-whats-new-changelog-metadata">[#1840](https://github.com/hashicorp/design-system/pull/1840)</small>
|
|
26
|
+
|
|
27
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
28
|
+
|
|
29
|
+
## 3.2.0
|
|
30
|
+
|
|
31
|
+
### Minor Changes
|
|
32
|
+
|
|
33
|
+
`CodeBlock` - Added language support for Ruby syntax
|
|
34
|
+
|
|
35
|
+
<small class="doc-whats-new-changelog-metadata">[#1834](https://github.com/hashicorp/design-system/pull/1834)</small>
|
|
36
|
+
|
|
37
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
38
|
+
|
|
39
|
+
`Hds::Table` - updated `@columns` object to support `isVisuallyHidden` argument
|
|
40
|
+
|
|
41
|
+
- `Hds::Table::Th` - updated to support `isVisuallyHidden` argument
|
|
42
|
+
|
|
43
|
+
<small class="doc-whats-new-changelog-metadata">[#1819](https://github.com/hashicorp/design-system/pull/1819)</small>
|
|
44
|
+
|
|
45
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
`SideNav` - Reduced the width of `SideNav::ToggleButton`
|
|
50
|
+
|
|
51
|
+
<small class="doc-whats-new-changelog-metadata">[#1807](https://github.com/hashicorp/design-system/pull/1807)</small>
|
|
52
|
+
|
|
53
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
54
|
+
|
|
55
|
+
**🔄 Updated dependencies:**
|
|
56
|
+
|
|
57
|
+
- @hashicorp/ember-flight-icons@4.0.4
|
|
58
|
+
|
|
3
59
|
## 3.1.2
|
|
4
60
|
|
|
5
61
|
### Patch Changes
|
|
6
62
|
|
|
7
63
|
`AppFooter` – Fixed predefined statuses by replacing `critical` with `outage` and prevented `statusIconColor` from being overridden by `status`
|
|
8
64
|
|
|
9
|
-
<small>[#1790](https://github.com/hashicorp/design-system/pull/1790)</small>
|
|
65
|
+
<small class="doc-whats-new-changelog-metadata">[#1790](https://github.com/hashicorp/design-system/pull/1790)</small>
|
|
10
66
|
|
|
11
|
-
|
|
67
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
12
68
|
|
|
13
69
|
`SideNav` - Fixed visible scrollbar in collapsed SideNav when scroll bar is set to be always visible
|
|
14
70
|
|
|
15
|
-
<small>[#1786](https://github.com/hashicorp/design-system/pull/1786)</small>
|
|
71
|
+
<small class="doc-whats-new-changelog-metadata">[#1786](https://github.com/hashicorp/design-system/pull/1786)</small>
|
|
16
72
|
|
|
17
|
-
|
|
73
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
18
74
|
|
|
19
75
|
`CodeBlock` - Fixed `@hasLineWrapping` style to make long strings wrap when they overflow the container
|
|
20
76
|
|
|
21
|
-
<small>[#1798](https://github.com/hashicorp/design-system/pull/1798)</small>
|
|
77
|
+
<small class="doc-whats-new-changelog-metadata">[#1798](https://github.com/hashicorp/design-system/pull/1798)</small>
|
|
22
78
|
|
|
23
|
-
|
|
79
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
24
80
|
|
|
25
81
|
## 3.1.1
|
|
26
82
|
|
|
@@ -28,9 +84,9 @@
|
|
|
28
84
|
|
|
29
85
|
Added `@ember/string` as a direct dependency
|
|
30
86
|
|
|
31
|
-
<small>[#1782](https://github.com/hashicorp/design-system/pull/1782)</small>
|
|
87
|
+
<small class="doc-whats-new-changelog-metadata">[#1782](https://github.com/hashicorp/design-system/pull/1782)</small>
|
|
32
88
|
|
|
33
|
-
|
|
89
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
34
90
|
|
|
35
91
|
**🔄 Updated dependencies:**
|
|
36
92
|
|
|
@@ -42,9 +98,9 @@ Added `@ember/string` as a direct dependency
|
|
|
42
98
|
|
|
43
99
|
`CodeBlock` - Added new component
|
|
44
100
|
|
|
45
|
-
<small>[#1687](https://github.com/hashicorp/design-system/pull/1687)</small>
|
|
101
|
+
<small class="doc-whats-new-changelog-metadata">[#1687](https://github.com/hashicorp/design-system/pull/1687)</small>
|
|
46
102
|
|
|
47
|
-
|
|
103
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
48
104
|
|
|
49
105
|
### Patch Changes
|
|
50
106
|
|
|
@@ -56,15 +112,15 @@ Upgraded the following dependencies:
|
|
|
56
112
|
- `ember-keyboard` from `8.2.0` to `8.2.1`
|
|
57
113
|
- `sass` from `1.62.1` to `1.69.5`
|
|
58
114
|
|
|
59
|
-
<small>[#1756](https://github.com/hashicorp/design-system/pull/1756)</small>
|
|
115
|
+
<small class="doc-whats-new-changelog-metadata">[#1756](https://github.com/hashicorp/design-system/pull/1756)</small>
|
|
60
116
|
|
|
61
|
-
|
|
117
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
62
118
|
|
|
63
119
|
`Breadcrumb` - Added support for external links
|
|
64
120
|
|
|
65
|
-
<small>[#1774](https://github.com/hashicorp/design-system/pull/1774)</small>
|
|
121
|
+
<small class="doc-whats-new-changelog-metadata">[#1774](https://github.com/hashicorp/design-system/pull/1774)</small>
|
|
66
122
|
|
|
67
|
-
|
|
123
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
68
124
|
|
|
69
125
|
Upgraded the following dependencies:
|
|
70
126
|
|
|
@@ -73,15 +129,15 @@ Upgraded the following dependencies:
|
|
|
73
129
|
- `ember-cli-sass` from `10.0.1` to `11.0.1`
|
|
74
130
|
- `ember-composable-helpers` from `4.5.0` to `5.0.0`
|
|
75
131
|
|
|
76
|
-
<small>[#1761](https://github.com/hashicorp/design-system/pull/1761)</small>
|
|
132
|
+
<small class="doc-whats-new-changelog-metadata">[#1761](https://github.com/hashicorp/design-system/pull/1761)</small>
|
|
77
133
|
|
|
78
|
-
|
|
134
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
79
135
|
|
|
80
136
|
`Button` - Fixed `HdsInteractiveSignature` type import
|
|
81
137
|
|
|
82
|
-
<small>[#1769](https://github.com/hashicorp/design-system/pull/1769)</small>
|
|
138
|
+
<small class="doc-whats-new-changelog-metadata">[#1769](https://github.com/hashicorp/design-system/pull/1769)</small>
|
|
83
139
|
|
|
84
|
-
|
|
140
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
85
141
|
|
|
86
142
|
**🔄 Updated dependencies:**
|
|
87
143
|
|
|
@@ -93,9 +149,9 @@ Upgraded the following dependencies:
|
|
|
93
149
|
|
|
94
150
|
explicitly added `ember-element-helper` as dependency for the `components` package
|
|
95
151
|
|
|
96
|
-
<small>[#1751](https://github.com/hashicorp/design-system/pull/1751)</small>
|
|
152
|
+
<small class="doc-whats-new-changelog-metadata">[#1751](https://github.com/hashicorp/design-system/pull/1751)</small>
|
|
97
153
|
|
|
98
|
-
|
|
154
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
99
155
|
|
|
100
156
|
## 3.0.1
|
|
101
157
|
|
|
@@ -111,9 +167,9 @@ explicitly added `ember-element-helper` as dependency for the `components` packa
|
|
|
111
167
|
|
|
112
168
|
Drop support for Node 14
|
|
113
169
|
|
|
114
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
170
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
115
171
|
|
|
116
|
-
|
|
172
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
117
173
|
|
|
118
174
|
`Hds::Form::VisibilityToggle` - Added component as a form base element
|
|
119
175
|
|
|
@@ -127,9 +183,9 @@ To migrate:
|
|
|
127
183
|
|
|
128
184
|
- in `Hds::Form::MaskedInput` instances replace `@isMasked` arguments with `@isContentMasked`
|
|
129
185
|
|
|
130
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
186
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
131
187
|
|
|
132
|
-
|
|
188
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
133
189
|
|
|
134
190
|
`Hds::Dropdown` – Removed `@listPosition` `left` and `right` (use `bottom-left` and `bottom-right`, respectively).
|
|
135
191
|
|
|
@@ -139,9 +195,9 @@ To migrate:
|
|
|
139
195
|
- replace `@listPosition="left"` with `@listPosition="bottom-left"`
|
|
140
196
|
- replace `@listPosition="right"` with `@listPosition="bottom-right"`
|
|
141
197
|
|
|
142
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
198
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
143
199
|
|
|
144
|
-
|
|
200
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
145
201
|
|
|
146
202
|
`SideNav` - Renamed `extraBefore/After` generic containers to `ExtraBefore/After` (uppercase `E`).
|
|
147
203
|
|
|
@@ -149,9 +205,9 @@ To migrate:
|
|
|
149
205
|
|
|
150
206
|
- rename all the `extraBefore/After` instances yielded within the `<Hds::SideNav>` component to `ExtraBefore/After`
|
|
151
207
|
|
|
152
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
208
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
153
209
|
|
|
154
|
-
|
|
210
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
155
211
|
|
|
156
212
|
`Form::RadioCard` - Remove the `@layout` property.
|
|
157
213
|
|
|
@@ -162,9 +218,9 @@ To migrate `Form::RadioCard` and `Form::RadioCard::Group` instances without enco
|
|
|
162
218
|
- make sure all instances with `@layout="fixed"` have a `@maxWidth` defined, then remove the `@layout="fixed"` definition
|
|
163
219
|
- remove all `@layout="fluid"` definitions
|
|
164
220
|
|
|
165
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
221
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
166
222
|
|
|
167
|
-
|
|
223
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
168
224
|
|
|
169
225
|
### Minor Changes
|
|
170
226
|
|
|
@@ -172,15 +228,15 @@ To migrate `Form::RadioCard` and `Form::RadioCard::Group` instances without enco
|
|
|
172
228
|
|
|
173
229
|
_Consumers should review the defaults values for this (sub)component in their codebases, to make sure they match the intended visual designs._
|
|
174
230
|
|
|
175
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
231
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
176
232
|
|
|
177
|
-
|
|
233
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
178
234
|
|
|
179
235
|
`Button`, `Interactive` - Converted components to TypeScript.
|
|
180
236
|
|
|
181
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
237
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
182
238
|
|
|
183
|
-
|
|
239
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
184
240
|
|
|
185
241
|
`Copy::Snippet` - Fixed the way in which “width/full-width” is applied to the component + Internal update to the “truncation” implementation.
|
|
186
242
|
|
|
@@ -189,9 +245,9 @@ _Consumers should review the defaults values for this (sub)component in their co
|
|
|
189
245
|
|
|
190
246
|
_Consumers should review the pages where this component is used to make sure its width matches the intended visual designs (in case, use the `@isFullWidth` argument to control its full-width). In case they're using the `hds-copy-snippet__text--truncated` class name, they should also update their code to adapt to the new implementation._
|
|
191
247
|
|
|
192
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
248
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
193
249
|
|
|
194
|
-
|
|
250
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
195
251
|
|
|
196
252
|
Removed `ember-cli-clipboard` as dependency and introduced a custom `hds-clipboard` modifier (using the web [Clipboard API](https://developer.mozilla.org/en-US/docs/Web/API/Clipboard_API))
|
|
197
253
|
|
|
@@ -210,23 +266,23 @@ Removed `ember-cli-clipboard` as dependency and introduced a custom `hds-clipboa
|
|
|
210
266
|
|
|
211
267
|
_Consumers should remove the `@container` argument from all the instances of `Copy::Button` (not needed anymore) and double check that the `Copy::Button/Snippet` instances work exactly as before._
|
|
212
268
|
|
|
213
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
269
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
214
270
|
|
|
215
|
-
|
|
271
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
216
272
|
|
|
217
273
|
### Patch Changes
|
|
218
274
|
|
|
219
275
|
`Copy::Snippet` - Fixed background colors for different states according to Figma specs (main change is the default/base background is now transparent, not white).
|
|
220
276
|
|
|
221
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
277
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
222
278
|
|
|
223
|
-
|
|
279
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
224
280
|
|
|
225
281
|
`Form::MaskedInput` - Changed copy logic for `CopyButton` used inside the component.
|
|
226
282
|
|
|
227
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
283
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
228
284
|
|
|
229
|
-
|
|
285
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
230
286
|
|
|
231
287
|
`Accordion` - Replaced internal text styling (using `Text` component).
|
|
232
288
|
|
|
@@ -252,15 +308,15 @@ _Consumers should remove the `@container` argument from all the instances of `Co
|
|
|
252
308
|
|
|
253
309
|
_No impact is expected on the consumers' applications._
|
|
254
310
|
|
|
255
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
311
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
256
312
|
|
|
257
|
-
|
|
313
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
258
314
|
|
|
259
315
|
`Button` - Applied explicit text alignment to the text to fix alignment on "link" buttons.
|
|
260
316
|
|
|
261
|
-
<small>[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
317
|
+
<small class="doc-whats-new-changelog-metadata">[#1634](https://github.com/hashicorp/design-system/pull/1634)</small>
|
|
262
318
|
|
|
263
|
-
|
|
319
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
264
320
|
|
|
265
321
|
**🔄 Updated dependencies:**
|
|
266
322
|
|
|
@@ -274,13 +330,13 @@ _No impact is expected on the consumers' applications._
|
|
|
274
330
|
|
|
275
331
|
`Dropdown::ToggleIcon` - updated sizing of the "small" variant to match the height of the "small" variant `Button`
|
|
276
332
|
|
|
277
|
-
<small>[#1690](https://github.com/hashicorp/design-system/pull/1690)</small>
|
|
333
|
+
<small class="doc-whats-new-changelog-metadata">[#1690](https://github.com/hashicorp/design-system/pull/1690)</small>
|
|
278
334
|
|
|
279
335
|
### Patch Changes
|
|
280
336
|
|
|
281
337
|
`Pagination` - Removed handling of query parameters from `onPageSizeChange` function.
|
|
282
338
|
|
|
283
|
-
<small>[#1736](https://github.com/hashicorp/design-system/pull/1736)</small>
|
|
339
|
+
<small class="doc-whats-new-changelog-metadata">[#1736](https://github.com/hashicorp/design-system/pull/1736)</small>
|
|
284
340
|
|
|
285
341
|
_Notice: while technically this is a breaking change, we consider this a fast-follow fix for the previous release._
|
|
286
342
|
|
|
@@ -290,13 +346,13 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
290
346
|
|
|
291
347
|
`Pagination` - updated the logic for “Compact” variant to expose `@currentPageSize` and handle controlled/uncontrolled changes
|
|
292
348
|
|
|
293
|
-
<small>[#1724](https://github.com/hashicorp/design-system/pull/1724)</small>
|
|
349
|
+
<small class="doc-whats-new-changelog-metadata">[#1724](https://github.com/hashicorp/design-system/pull/1724)</small>
|
|
294
350
|
|
|
295
|
-
|
|
351
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
296
352
|
|
|
297
353
|
`Tabs` - replace `assert` with `warn` in `setIndicator` function
|
|
298
354
|
|
|
299
|
-
<small>[#1716](https://github.com/hashicorp/design-system/pull/1716)</small>
|
|
355
|
+
<small class="doc-whats-new-changelog-metadata">[#1716](https://github.com/hashicorp/design-system/pull/1716)</small>
|
|
300
356
|
|
|
301
357
|
## 2.14.1
|
|
302
358
|
|
|
@@ -304,7 +360,7 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
304
360
|
|
|
305
361
|
`Tabs` - Fixed issue with `@isSelected` dynamically changed within `#each` loops
|
|
306
362
|
|
|
307
|
-
<small>[#1709](https://github.com/hashicorp/design-system/pull/1709)</small>
|
|
363
|
+
<small class="doc-whats-new-changelog-metadata">[#1709](https://github.com/hashicorp/design-system/pull/1709)</small>
|
|
308
364
|
|
|
309
365
|
## 2.14.0
|
|
310
366
|
|
|
@@ -312,9 +368,9 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
312
368
|
|
|
313
369
|
`Pagination::Compact` - Added option to show "SizeSelector" element
|
|
314
370
|
|
|
315
|
-
<small>[#1700](https://github.com/hashicorp/design-system/pull/1700)</small>
|
|
371
|
+
<small class="doc-whats-new-changelog-metadata">[#1700](https://github.com/hashicorp/design-system/pull/1700)</small>
|
|
316
372
|
|
|
317
|
-
|
|
373
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
318
374
|
|
|
319
375
|
`Tabs` - Refactored logic for `Tabs` component + `Tab/Panel` sub-components to support more complex use cases:
|
|
320
376
|
|
|
@@ -322,7 +378,7 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
322
378
|
- fixed issue with nested tabs not initializing the "selected" indicator correctly
|
|
323
379
|
- fixed issue with dynamic tab content not updating the "selected" indicator correctly
|
|
324
380
|
|
|
325
|
-
<small>[#1688](https://github.com/hashicorp/design-system/pull/1688)</small>
|
|
381
|
+
<small class="doc-whats-new-changelog-metadata">[#1688](https://github.com/hashicorp/design-system/pull/1688)</small>
|
|
326
382
|
|
|
327
383
|
## 2.13.0
|
|
328
384
|
|
|
@@ -330,27 +386,27 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
330
386
|
|
|
331
387
|
`AppFooter` - Added new component
|
|
332
388
|
|
|
333
|
-
<small>[#1623](https://github.com/hashicorp/design-system/pull/1623)</small>
|
|
389
|
+
<small class="doc-whats-new-changelog-metadata">[#1623](https://github.com/hashicorp/design-system/pull/1623)</small>
|
|
334
390
|
|
|
335
|
-
|
|
391
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
336
392
|
|
|
337
393
|
`SideNav` - add `@isCollapsible` (to control if users can collapse the sidenav on 'desktop' viewports) and `@isMinimized` (to control the default state on 'desktop' viewports) arguments
|
|
338
394
|
|
|
339
|
-
<small>[#1630](https://github.com/hashicorp/design-system/pull/1630)</small>
|
|
395
|
+
<small class="doc-whats-new-changelog-metadata">[#1630](https://github.com/hashicorp/design-system/pull/1630)</small>
|
|
340
396
|
|
|
341
397
|
### Patch Changes
|
|
342
398
|
|
|
343
399
|
`Tag` - Updated padding for dismiss button for WCAG conformance
|
|
344
400
|
|
|
345
|
-
<small>[#1696](https://github.com/hashicorp/design-system/pull/1696)</small>
|
|
401
|
+
<small class="doc-whats-new-changelog-metadata">[#1696](https://github.com/hashicorp/design-system/pull/1696)</small>
|
|
346
402
|
|
|
347
|
-
|
|
403
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
348
404
|
|
|
349
405
|
`Link::Standalone` – increase target size
|
|
350
406
|
|
|
351
|
-
<small>[#1678](https://github.com/hashicorp/design-system/pull/1678)</small>
|
|
407
|
+
<small class="doc-whats-new-changelog-metadata">[#1678](https://github.com/hashicorp/design-system/pull/1678)</small>
|
|
352
408
|
|
|
353
|
-
|
|
409
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
354
410
|
|
|
355
411
|
**🔄 Updated dependencies:**
|
|
356
412
|
|
|
@@ -362,15 +418,15 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
362
418
|
|
|
363
419
|
`PowerSelect` - fix style overrides when the list is positioned above
|
|
364
420
|
|
|
365
|
-
<small>[#1655](https://github.com/hashicorp/design-system/pull/1655)</small>
|
|
421
|
+
<small class="doc-whats-new-changelog-metadata">[#1655](https://github.com/hashicorp/design-system/pull/1655)</small>
|
|
366
422
|
|
|
367
|
-
|
|
423
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
368
424
|
|
|
369
425
|
`Text` - Fixed issue with whitespace adding extra underline when used in links (eg. inside a `Link::Inline`)
|
|
370
426
|
|
|
371
|
-
<small>[#1652](https://github.com/hashicorp/design-system/pull/1652)</small>
|
|
427
|
+
<small class="doc-whats-new-changelog-metadata">[#1652](https://github.com/hashicorp/design-system/pull/1652)</small>
|
|
372
428
|
|
|
373
|
-
|
|
429
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
374
430
|
|
|
375
431
|
**🔄 Updated dependencies:**
|
|
376
432
|
|
|
@@ -382,13 +438,13 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
382
438
|
|
|
383
439
|
`Pagination` - Bugfix `aria-label` on the component
|
|
384
440
|
|
|
385
|
-
<small>[#1627](https://github.com/hashicorp/design-system/pull/1627)</small>
|
|
441
|
+
<small class="doc-whats-new-changelog-metadata">[#1627](https://github.com/hashicorp/design-system/pull/1627)</small>
|
|
386
442
|
|
|
387
|
-
|
|
443
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
388
444
|
|
|
389
445
|
`Dropdown` - changed `@height` property to use `max-height` instead of a fixed height.
|
|
390
446
|
|
|
391
|
-
<small>[#1635](https://github.com/hashicorp/design-system/pull/1635)</small>
|
|
447
|
+
<small class="doc-whats-new-changelog-metadata">[#1635](https://github.com/hashicorp/design-system/pull/1635)</small>
|
|
392
448
|
|
|
393
449
|
## 2.12.0
|
|
394
450
|
|
|
@@ -396,33 +452,33 @@ _Notice: while technically this is a breaking change, we consider this a fast-fo
|
|
|
396
452
|
|
|
397
453
|
`IconTile` - updated component to include `vault-secrets` product option
|
|
398
454
|
|
|
399
|
-
<small>[#1640](https://github.com/hashicorp/design-system/pull/1640)</small>
|
|
455
|
+
<small class="doc-whats-new-changelog-metadata">[#1640](https://github.com/hashicorp/design-system/pull/1640)</small>
|
|
400
456
|
|
|
401
457
|
### Patch Changes
|
|
402
458
|
|
|
403
459
|
`Text` - Removed leftover `console.log` from code
|
|
404
460
|
|
|
405
|
-
<small>[#1615](https://github.com/hashicorp/design-system/pull/1615)</small>
|
|
461
|
+
<small class="doc-whats-new-changelog-metadata">[#1615](https://github.com/hashicorp/design-system/pull/1615)</small>
|
|
406
462
|
|
|
407
|
-
|
|
463
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
408
464
|
|
|
409
465
|
Refactored the layout of the `Dropdown` checkbox and radio inputs to make the gap between the inputs and the associated text, as well as the icon and count, clickable.
|
|
410
466
|
|
|
411
|
-
<small>[#1618](https://github.com/hashicorp/design-system/pull/1618)</small>
|
|
467
|
+
<small class="doc-whats-new-changelog-metadata">[#1618](https://github.com/hashicorp/design-system/pull/1618)</small>
|
|
412
468
|
|
|
413
|
-
|
|
469
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
414
470
|
|
|
415
471
|
`Hds::Link::Standalone` - Changed font-weight from 500 to 400 to match font-weight of `Hds::Button`.
|
|
416
472
|
|
|
417
|
-
<small>[#1617](https://github.com/hashicorp/design-system/pull/1617)</small>
|
|
473
|
+
<small class="doc-whats-new-changelog-metadata">[#1617](https://github.com/hashicorp/design-system/pull/1617)</small>
|
|
418
474
|
|
|
419
|
-
|
|
475
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
420
476
|
|
|
421
477
|
`Stepper` - removed some CSS declarations that were not used/applied
|
|
422
478
|
|
|
423
|
-
<small>[#1628](https://github.com/hashicorp/design-system/pull/1628)</small>
|
|
479
|
+
<small class="doc-whats-new-changelog-metadata">[#1628](https://github.com/hashicorp/design-system/pull/1628)</small>
|
|
424
480
|
|
|
425
|
-
|
|
481
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
426
482
|
|
|
427
483
|
**🔄 Updated dependencies:**
|
|
428
484
|
|
|
@@ -435,33 +491,33 @@ Refactored the layout of the `Dropdown` checkbox and radio inputs to make the ga
|
|
|
435
491
|
|
|
436
492
|
`Hds::Text` - Added new `Text` component
|
|
437
493
|
|
|
438
|
-
<small>[#1490](https://github.com/hashicorp/design-system/pull/1490)</small>
|
|
494
|
+
<small class="doc-whats-new-changelog-metadata">[#1490](https://github.com/hashicorp/design-system/pull/1490)</small>
|
|
439
495
|
|
|
440
|
-
|
|
496
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
441
497
|
|
|
442
498
|
`Hds::Form::MaskedInput` - Add `hasCopyButton` argument
|
|
443
499
|
|
|
444
|
-
<small>[#1587](https://github.com/hashicorp/design-system/pull/1587)</small>
|
|
500
|
+
<small class="doc-whats-new-changelog-metadata">[#1587](https://github.com/hashicorp/design-system/pull/1587)</small>
|
|
445
501
|
|
|
446
502
|
### Patch Changes
|
|
447
503
|
|
|
448
504
|
`Form::Indicator` - Remove aria-hidden from the "optional" `<span>`
|
|
449
505
|
|
|
450
|
-
<small>[#1577](https://github.com/hashicorp/design-system/pull/1577) - Thanks [@DingoEatingFuzz](https://github.com/DingoEatingFuzz) for the contribution! 🙏</small>
|
|
506
|
+
<small class="doc-whats-new-changelog-metadata">[#1577](https://github.com/hashicorp/design-system/pull/1577) - Thanks [@DingoEatingFuzz](https://github.com/DingoEatingFuzz) for the contribution! 🙏</small>
|
|
451
507
|
|
|
452
|
-
|
|
508
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
453
509
|
|
|
454
510
|
Removed `ember-named-blocks-polyfill` as all consumers of HDS are on Ember 3.25 or later now. This can be installed locally if it is still needed.
|
|
455
511
|
|
|
456
|
-
<small>[#1606](https://github.com/hashicorp/design-system/pull/1606)</small>
|
|
512
|
+
<small class="doc-whats-new-changelog-metadata">[#1606](https://github.com/hashicorp/design-system/pull/1606)</small>
|
|
457
513
|
|
|
458
|
-
|
|
514
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
459
515
|
|
|
460
516
|
`Alert`, `Toast`: Fixed an issue with anchor tag color styles within Description that had been overriding `Hds::Link` color; changed the default color for HTML links within Description to "neutral" to better align with existing guidance for links in the actions and improve accessible contrast.
|
|
461
517
|
|
|
462
|
-
<small>[#1576](https://github.com/hashicorp/design-system/pull/1576)</small>
|
|
518
|
+
<small class="doc-whats-new-changelog-metadata">[#1576](https://github.com/hashicorp/design-system/pull/1576)</small>
|
|
463
519
|
|
|
464
|
-
|
|
520
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
465
521
|
|
|
466
522
|
**🔄 Updated dependencies:**
|
|
467
523
|
|
|
@@ -473,51 +529,51 @@ Removed `ember-named-blocks-polyfill` as all consumers of HDS are on Ember 3.25
|
|
|
473
529
|
|
|
474
530
|
Added new `FileInput` component
|
|
475
531
|
|
|
476
|
-
<small>[#1535](https://github.com/hashicorp/design-system/pull/1535)</small>
|
|
532
|
+
<small class="doc-whats-new-changelog-metadata">[#1535](https://github.com/hashicorp/design-system/pull/1535)</small>
|
|
477
533
|
|
|
478
534
|
### Patch Changes
|
|
479
535
|
|
|
480
536
|
Remove unnecessary export of `hds/copy/index.js`
|
|
481
537
|
|
|
482
|
-
<small>[#1570](https://github.com/hashicorp/design-system/pull/1570)</small>
|
|
538
|
+
<small class="doc-whats-new-changelog-metadata">[#1570](https://github.com/hashicorp/design-system/pull/1570)</small>
|
|
483
539
|
|
|
484
|
-
|
|
540
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
485
541
|
|
|
486
542
|
`Hds::Tabs` - Fix missing tab indicator when used in Modal or Flyout
|
|
487
543
|
|
|
488
|
-
<small>[#1575](https://github.com/hashicorp/design-system/pull/1575)</small>
|
|
544
|
+
<small class="doc-whats-new-changelog-metadata">[#1575](https://github.com/hashicorp/design-system/pull/1575)</small>
|
|
489
545
|
|
|
490
|
-
|
|
546
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
491
547
|
|
|
492
548
|
`Copy::Snippet` - Added support for container and updated API docs
|
|
493
549
|
|
|
494
|
-
<small>[#1567](https://github.com/hashicorp/design-system/pull/1567)</small>
|
|
550
|
+
<small class="doc-whats-new-changelog-metadata">[#1567](https://github.com/hashicorp/design-system/pull/1567)</small>
|
|
495
551
|
|
|
496
|
-
|
|
552
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
497
553
|
|
|
498
554
|
`Hds::Tabs` - Fixed tabs and panels misbehaving on route change
|
|
499
555
|
|
|
500
|
-
<small>[#1571](https://github.com/hashicorp/design-system/pull/1571)</small>
|
|
556
|
+
<small class="doc-whats-new-changelog-metadata">[#1571](https://github.com/hashicorp/design-system/pull/1571)</small>
|
|
501
557
|
|
|
502
|
-
|
|
558
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
503
559
|
|
|
504
|
-
<small>[#1568](https://github.com/hashicorp/design-system/pull/1568)</small>
|
|
560
|
+
<small class="doc-whats-new-changelog-metadata">[#1568](https://github.com/hashicorp/design-system/pull/1568)</small>
|
|
505
561
|
|
|
506
562
|
`Copy::Button`, `Copy::Snippet` - Updated error icon
|
|
507
563
|
|
|
508
|
-
|
|
564
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
509
565
|
|
|
510
566
|
`Hds::SegmentedGroup` - Prevent `border-radius` from interfering with underlying elements
|
|
511
567
|
|
|
512
|
-
<small>[#1555](https://github.com/hashicorp/design-system/pull/1555)</small>
|
|
568
|
+
<small class="doc-whats-new-changelog-metadata">[#1555](https://github.com/hashicorp/design-system/pull/1555)</small>
|
|
513
569
|
|
|
514
|
-
|
|
570
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
515
571
|
|
|
516
572
|
`Table` - Resolved issue where `ThSort` was not supporting right-aligned text properly
|
|
517
573
|
|
|
518
|
-
<small>[#1565](https://github.com/hashicorp/design-system/pull/1565)</small>
|
|
574
|
+
<small class="doc-whats-new-changelog-metadata">[#1565](https://github.com/hashicorp/design-system/pull/1565)</small>
|
|
519
575
|
|
|
520
|
-
|
|
576
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
521
577
|
|
|
522
578
|
**🔄 Updated dependencies:**
|
|
523
579
|
|
|
@@ -529,39 +585,39 @@ Remove unnecessary export of `hds/copy/index.js`
|
|
|
529
585
|
|
|
530
586
|
Added the `Hds::CopyButton` and `Hds::CopySnippet` components.
|
|
531
587
|
|
|
532
|
-
<small>[#1488](https://github.com/hashicorp/design-system/pull/1488)</small>
|
|
588
|
+
<small class="doc-whats-new-changelog-metadata">[#1488](https://github.com/hashicorp/design-system/pull/1488)</small>
|
|
533
589
|
|
|
534
590
|
### Patch Changes
|
|
535
591
|
|
|
536
592
|
Adjusted closing brace on copywrite headers to avoid terminal noise
|
|
537
593
|
|
|
538
|
-
<small>[#1539](https://github.com/hashicorp/design-system/pull/1539)</small>
|
|
594
|
+
<small class="doc-whats-new-changelog-metadata">[#1539](https://github.com/hashicorp/design-system/pull/1539)</small>
|
|
539
595
|
|
|
540
|
-
|
|
596
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
541
597
|
|
|
542
598
|
`Hds::Modal` - reduce test flakiness around closing Modal when using `@ember/test-helpers`
|
|
543
599
|
|
|
544
|
-
<small>[#1549](https://github.com/hashicorp/design-system/pull/1549) - Thanks [@fivetanley](https://github.com/fivetanley) for the contribution! 🙏</small>
|
|
600
|
+
<small class="doc-whats-new-changelog-metadata">[#1549](https://github.com/hashicorp/design-system/pull/1549) - Thanks [@fivetanley](https://github.com/fivetanley) for the contribution! 🙏</small>
|
|
545
601
|
|
|
546
|
-
|
|
602
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
547
603
|
|
|
548
604
|
Fix Embroider warnings caused by incorrect export of internal utility functions
|
|
549
605
|
|
|
550
|
-
<small>[#1530](https://github.com/hashicorp/design-system/pull/1530)</small>
|
|
606
|
+
<small class="doc-whats-new-changelog-metadata">[#1530](https://github.com/hashicorp/design-system/pull/1530)</small>
|
|
551
607
|
|
|
552
|
-
|
|
608
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
553
609
|
|
|
554
610
|
`Hds::Flyout` - reduce test flakiness around closing Flyout when using `@ember/test-helpers`
|
|
555
611
|
|
|
556
|
-
<small>[#1552](https://github.com/hashicorp/design-system/pull/1552)</small>
|
|
612
|
+
<small class="doc-whats-new-changelog-metadata">[#1552](https://github.com/hashicorp/design-system/pull/1552)</small>
|
|
557
613
|
|
|
558
|
-
|
|
614
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
559
615
|
|
|
560
616
|
`Hds::Form::Field` - Fix error message for unexpected `@layout` values
|
|
561
617
|
|
|
562
|
-
<small>[#1529](https://github.com/hashicorp/design-system/pull/1529)</small>
|
|
618
|
+
<small class="doc-whats-new-changelog-metadata">[#1529](https://github.com/hashicorp/design-system/pull/1529)</small>
|
|
563
619
|
|
|
564
|
-
|
|
620
|
+
<div class="doc-whats-new-changelog-separator"></div>
|
|
565
621
|
|
|
566
622
|
**🔄 Updated dependencies:**
|
|
567
623
|
|
|
@@ -16,30 +16,30 @@
|
|
|
16
16
|
aria-label={{if this.isIconOnly this.text null}}
|
|
17
17
|
>
|
|
18
18
|
{{#if this.isIconOnly}}
|
|
19
|
-
<
|
|
19
|
+
<span class="hds-button__icon">
|
|
20
20
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
21
|
-
</
|
|
21
|
+
</span>
|
|
22
22
|
{{else}}
|
|
23
23
|
{{#if this.icon}}
|
|
24
24
|
{{#if (eq this.iconPosition "leading")}}
|
|
25
|
-
<
|
|
25
|
+
<span class="hds-button__icon">
|
|
26
26
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
27
|
-
</
|
|
28
|
-
<
|
|
27
|
+
</span>
|
|
28
|
+
<span class="hds-button__text">
|
|
29
29
|
{{this.text}}
|
|
30
|
-
</
|
|
30
|
+
</span>
|
|
31
31
|
{{else}}
|
|
32
|
-
<
|
|
32
|
+
<span class="hds-button__text">
|
|
33
33
|
{{this.text}}
|
|
34
|
-
</
|
|
35
|
-
<
|
|
34
|
+
</span>
|
|
35
|
+
<span class="hds-button__icon">
|
|
36
36
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
37
|
-
</
|
|
37
|
+
</span>
|
|
38
38
|
{{/if}}
|
|
39
39
|
{{else}}
|
|
40
|
-
<
|
|
40
|
+
<span class="hds-button__text">
|
|
41
41
|
{{this.text}}
|
|
42
|
-
</
|
|
42
|
+
</span>
|
|
43
43
|
{{/if}}
|
|
44
44
|
{{/if}}
|
|
45
45
|
</Hds::Interactive>
|
|
@@ -20,6 +20,7 @@ import 'prismjs/components/prism-go';
|
|
|
20
20
|
import 'prismjs/components/prism-hcl';
|
|
21
21
|
import 'prismjs/components/prism-json';
|
|
22
22
|
import 'prismjs/components/prism-log';
|
|
23
|
+
import 'prismjs/components/prism-ruby';
|
|
23
24
|
import 'prismjs/components/prism-shell-session';
|
|
24
25
|
import 'prismjs/components/prism-yaml';
|
|
25
26
|
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
aria-selected={{if @selected "true" "false"}}
|
|
21
21
|
>
|
|
22
22
|
{{#if @icon}}
|
|
23
|
-
<
|
|
23
|
+
<span class="hds-dropdown-list-item__interactive-icon">
|
|
24
24
|
<FlightIcon @name={{@icon}} @isInlineBlock={{false}} />
|
|
25
|
-
</
|
|
25
|
+
</span>
|
|
26
26
|
{{/if}}
|
|
27
|
-
<Hds::Text::Body @tag="
|
|
27
|
+
<Hds::Text::Body @tag="span" @size="200" @weight="medium" class="hds-dropdown-list-item__interactive-text">
|
|
28
28
|
{{yield}}
|
|
29
29
|
</Hds::Text::Body>
|
|
30
30
|
{{#if @count}}
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
...attributes
|
|
26
26
|
>
|
|
27
27
|
{{#if @icon}}
|
|
28
|
-
<
|
|
28
|
+
<span class="hds-dropdown-list-item__interactive-icon">
|
|
29
29
|
<FlightIcon @name={{@icon}} @isInlineBlock={{false}} />
|
|
30
|
-
</
|
|
30
|
+
</span>
|
|
31
31
|
{{/if}}
|
|
32
|
-
<Hds::Text::Body class="hds-dropdown-list-item__interactive-text" @tag="
|
|
32
|
+
<Hds::Text::Body class="hds-dropdown-list-item__interactive-text" @tag="span" @size="200" @weight="medium">
|
|
33
33
|
{{this.text}}
|
|
34
34
|
</Hds::Text::Body>
|
|
35
35
|
</Hds::Interactive>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{{!
|
|
2
|
+
Copyright (c) HashiCorp, Inc.
|
|
3
|
+
SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
}}
|
|
5
|
+
<Hds::Text::Body
|
|
6
|
+
@tag="div"
|
|
7
|
+
@size="100"
|
|
8
|
+
class={{this.classNames}}
|
|
9
|
+
id={{this.id}}
|
|
10
|
+
{{did-insert this.onInsert}}
|
|
11
|
+
{{will-destroy this.willDestroyNode}}
|
|
12
|
+
...attributes
|
|
13
|
+
aria-live="polite"
|
|
14
|
+
>
|
|
15
|
+
{{#if (has-block)}}
|
|
16
|
+
{{yield
|
|
17
|
+
(hash
|
|
18
|
+
minLength=this.minLength
|
|
19
|
+
maxLength=this.maxLength
|
|
20
|
+
currentLength=this.currentLength
|
|
21
|
+
remaining=this.remaining
|
|
22
|
+
shortfall=this.shortfall
|
|
23
|
+
)
|
|
24
|
+
}}
|
|
25
|
+
{{else}}
|
|
26
|
+
{{this.message}}
|
|
27
|
+
{{/if}}
|
|
28
|
+
</Hds::Text::Body>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) HashiCorp, Inc.
|
|
3
|
+
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import Component from '@glimmer/component';
|
|
7
|
+
import { tracked } from '@glimmer/tracking';
|
|
8
|
+
import { action } from '@ember/object';
|
|
9
|
+
|
|
10
|
+
const ID_PREFIX = 'character-count-';
|
|
11
|
+
const NOOP = () => {};
|
|
12
|
+
|
|
13
|
+
export default class HdsFormCharacterCountIndexComponent extends Component {
|
|
14
|
+
// The current number of characters in the associated input
|
|
15
|
+
@tracked currentLength;
|
|
16
|
+
inputControl = document.getElementById(this.args.controlId);
|
|
17
|
+
|
|
18
|
+
// Inflector utility function to determine plural or singular for 'character' noun
|
|
19
|
+
pluralize(count, prefix = '', noun = 'character', suffix = 's') {
|
|
20
|
+
return `${count}${prefix ? ' ' + prefix : ''} ${noun}${
|
|
21
|
+
count !== 1 ? suffix : ''
|
|
22
|
+
}`;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @param maxLength
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @default null
|
|
29
|
+
* @description The maximum number of characters allowed.
|
|
30
|
+
*/
|
|
31
|
+
get maxLength() {
|
|
32
|
+
let { maxLength } = this.args;
|
|
33
|
+
return parseInt(maxLength);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @param minLength
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @default null
|
|
40
|
+
* @description The minimum number of characters allowed.
|
|
41
|
+
*/
|
|
42
|
+
get minLength() {
|
|
43
|
+
let { minLength } = this.args;
|
|
44
|
+
return parseInt(minLength);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @param remaining
|
|
49
|
+
* @type {number}
|
|
50
|
+
* @default null
|
|
51
|
+
* @description The remaining number of characters.
|
|
52
|
+
*/
|
|
53
|
+
get remaining() {
|
|
54
|
+
return this.maxLength - this.currentLength;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* @param shortfall
|
|
59
|
+
* @type {number}
|
|
60
|
+
* @default null
|
|
61
|
+
* @description The number of characters the content is falling short of.
|
|
62
|
+
*/
|
|
63
|
+
get shortfall() {
|
|
64
|
+
return this.minLength - this.currentLength;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* @param message
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @default null
|
|
71
|
+
* @description The character count message presented to users
|
|
72
|
+
*/
|
|
73
|
+
get message() {
|
|
74
|
+
let messageText = '';
|
|
75
|
+
if (this.minLength && this.currentLength === 0) {
|
|
76
|
+
messageText = `${this.pluralize(this.minLength)} required`;
|
|
77
|
+
} else if (this.minLength && this.currentLength < this.minLength) {
|
|
78
|
+
messageText = `${this.pluralize(this.shortfall, 'more')} required`;
|
|
79
|
+
} else if (this.maxLength && this.currentLength === 0) {
|
|
80
|
+
messageText = `${this.pluralize(this.maxLength)} allowed`;
|
|
81
|
+
} else if (this.maxLength && this.currentLength <= this.maxLength) {
|
|
82
|
+
messageText = `${this.pluralize(this.remaining)} remaining`;
|
|
83
|
+
} else if (this.currentLength > this.maxLength) {
|
|
84
|
+
messageText = `Exceeded by ${this.pluralize(-this.remaining)}`;
|
|
85
|
+
} else {
|
|
86
|
+
messageText = `${this.pluralize(this.currentLength)} entered`;
|
|
87
|
+
}
|
|
88
|
+
return messageText;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Determines the unique ID to assign to the element
|
|
93
|
+
* @method id
|
|
94
|
+
* @return {(string|null)} The "id" attribute to apply to the element or null, if no controlId is provided
|
|
95
|
+
*/
|
|
96
|
+
get id() {
|
|
97
|
+
let { controlId } = this.args;
|
|
98
|
+
if (controlId) {
|
|
99
|
+
return `${ID_PREFIX}${controlId}`;
|
|
100
|
+
}
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* @param onInsert
|
|
106
|
+
* @type {function}
|
|
107
|
+
* @default () => {}
|
|
108
|
+
*/
|
|
109
|
+
get onInsert() {
|
|
110
|
+
let { onInsert } = this.args;
|
|
111
|
+
|
|
112
|
+
if (!this.inputControl || this.inputControl.value === undefined) {
|
|
113
|
+
console.error(
|
|
114
|
+
'`Hds::Form::CharacterCount` component - `@controlId` selector provided does not point to a valid input element, check the id',
|
|
115
|
+
this.args.controlId
|
|
116
|
+
);
|
|
117
|
+
} else {
|
|
118
|
+
this.updateCurrentLength();
|
|
119
|
+
this.inputControl.addEventListener(
|
|
120
|
+
'input',
|
|
121
|
+
this.updateCurrentLength,
|
|
122
|
+
true
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
// notice: this is a guard used to prevent triggering an error when the component is used as standalone element
|
|
127
|
+
if (typeof onInsert === 'function') {
|
|
128
|
+
return onInsert;
|
|
129
|
+
} else {
|
|
130
|
+
return NOOP;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@action
|
|
135
|
+
willDestroyNode() {
|
|
136
|
+
if (this.inputControl) {
|
|
137
|
+
this.inputControl.removeEventListener(
|
|
138
|
+
'input',
|
|
139
|
+
this.updateCurrentLength,
|
|
140
|
+
true
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
@action
|
|
146
|
+
updateCurrentLength() {
|
|
147
|
+
this.currentLength = this.inputControl?.value?.length;
|
|
148
|
+
|
|
149
|
+
if (typeof this.args.onInput === 'function') {
|
|
150
|
+
this.args.onInput({
|
|
151
|
+
inputControl: this.inputControl,
|
|
152
|
+
currentLength: this.currentLength,
|
|
153
|
+
maxLength: this.maxLength,
|
|
154
|
+
minLength: this.minLength,
|
|
155
|
+
remaining: this.remaining,
|
|
156
|
+
shortfall: this.shortfall,
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Get the class names to apply to the component.
|
|
163
|
+
* @method classNames
|
|
164
|
+
* @return {string} The "class" attribute to apply to the component.
|
|
165
|
+
*/
|
|
166
|
+
get classNames() {
|
|
167
|
+
let classes = ['hds-form-character-count'];
|
|
168
|
+
|
|
169
|
+
// add a class based on the @contextualClass argument
|
|
170
|
+
// notice: this will *not* be documented for public use
|
|
171
|
+
// the reason for this is that the contextual component declarations don't pass attributes to the component
|
|
172
|
+
if (this.args.contextualClass) {
|
|
173
|
+
classes.push(this.args.contextualClass);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
return classes.join(' ');
|
|
177
|
+
}
|
|
178
|
+
}
|
|
@@ -27,6 +27,16 @@
|
|
|
27
27
|
<div class="hds-form-field__control">
|
|
28
28
|
{{yield (hash Control=(component "hds/yield") id=this.id ariaDescribedBy=this.ariaDescribedBy)}}
|
|
29
29
|
</div>
|
|
30
|
+
{{yield
|
|
31
|
+
(hash
|
|
32
|
+
CharacterCount=(component
|
|
33
|
+
"hds/form/character-count"
|
|
34
|
+
controlId=this.id
|
|
35
|
+
onInsert=this.appendDescriptor
|
|
36
|
+
contextualClass="hds-form-field__character-count"
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
}}
|
|
30
40
|
{{yield
|
|
31
41
|
(hash
|
|
32
42
|
Error=(component
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<Hds::Form::MaskedInput::Base
|
|
18
18
|
@hasCopyButton={{@hasCopyButton}}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<div class="hds-form-text-input__wrapper" {{style width=@width}}>
|
|
18
18
|
<Hds::Form::TextInput::Base
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
>
|
|
13
13
|
{{! Notice: the order of the elements is not relevant here, because is controlled at "Hds::Form::Field" component level }}
|
|
14
14
|
{{yield (hash Label=F.Label isRequired=F.isRequired isOptional=F.isOptional)}}
|
|
15
|
-
{{yield (hash HelperText=F.HelperText Error=F.Error)}}
|
|
15
|
+
{{yield (hash HelperText=F.HelperText Error=F.Error CharacterCount=F.CharacterCount)}}
|
|
16
16
|
<F.Control>
|
|
17
17
|
<Hds::Form::Textarea::Base
|
|
18
18
|
@value={{@value}}
|
|
@@ -11,18 +11,18 @@
|
|
|
11
11
|
...attributes
|
|
12
12
|
>
|
|
13
13
|
{{#if (eq this.iconPosition "leading")}}
|
|
14
|
-
<
|
|
14
|
+
<span class="hds-link-standalone__icon">
|
|
15
15
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
16
|
-
</
|
|
17
|
-
<
|
|
16
|
+
</span>
|
|
17
|
+
<span class="hds-link-standalone__text">
|
|
18
18
|
{{this.text}}
|
|
19
|
-
</
|
|
19
|
+
</span>
|
|
20
20
|
{{else}}
|
|
21
|
-
<
|
|
21
|
+
<span class="hds-link-standalone__text">
|
|
22
22
|
{{this.text}}
|
|
23
|
-
</
|
|
24
|
-
<
|
|
23
|
+
</span>
|
|
24
|
+
<span class="hds-link-standalone__icon">
|
|
25
25
|
<FlightIcon @name={{this.icon}} @size={{this.iconSize}} @stretched={{true}} />
|
|
26
|
-
</
|
|
26
|
+
</span>
|
|
27
27
|
{{/if}}
|
|
28
28
|
</Hds::Interactive>
|
|
@@ -22,7 +22,11 @@
|
|
|
22
22
|
{{column.label}}
|
|
23
23
|
</Hds::Table::ThSort>
|
|
24
24
|
{{else}}
|
|
25
|
-
<Hds::Table::Th
|
|
25
|
+
<Hds::Table::Th
|
|
26
|
+
@align={{column.align}}
|
|
27
|
+
@width={{column.width}}
|
|
28
|
+
@isVisuallyHidden={{column.isVisuallyHidden}}
|
|
29
|
+
>{{column.label}}</Hds::Table::Th>
|
|
26
30
|
{{/if}}
|
|
27
31
|
{{/each}}
|
|
28
32
|
</Hds::Table::Tr>
|
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
SPDX-License-Identifier: MPL-2.0
|
|
4
4
|
}}
|
|
5
5
|
<th class={{this.classNames}} {{style width=@width minWidth=@width}} ...attributes scope={{(or @scope "col")}}>
|
|
6
|
-
{{
|
|
6
|
+
{{#if @isVisuallyHidden}}
|
|
7
|
+
<span class="sr-only">{{yield}}</span>
|
|
8
|
+
{{else}}
|
|
9
|
+
{{yield}}
|
|
10
|
+
{{/if}}
|
|
7
11
|
</th>
|
|
@@ -409,11 +409,13 @@ $hds-dropdown-toggle-border-radius: $hds-button-border-radius;
|
|
|
409
409
|
}
|
|
410
410
|
|
|
411
411
|
.hds-dropdown-list-item__interactive-icon {
|
|
412
|
+
display: block;
|
|
412
413
|
margin-top: 2px;
|
|
413
414
|
margin-right: 8px;
|
|
414
415
|
}
|
|
415
416
|
|
|
416
417
|
.hds-dropdown-list-item__interactive-text {
|
|
418
|
+
display: block;
|
|
417
419
|
flex: 1;
|
|
418
420
|
text-align: left; // the button element was centering text
|
|
419
421
|
}
|
|
@@ -31,7 +31,12 @@ $hds-link-standalone-border-width: 1px;
|
|
|
31
31
|
text-decoration-color: transparent;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
.hds-link-standalone__icon {
|
|
35
|
+
display: block;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
.hds-link-standalone__text {
|
|
39
|
+
display: block;
|
|
35
40
|
flex: 1 0 0;
|
|
36
41
|
text-decoration: underline;
|
|
37
42
|
text-decoration-color: transparent;
|
|
@@ -23,6 +23,8 @@
|
|
|
23
23
|
--hds-app-sidenav-animation-duration: 200ms;
|
|
24
24
|
--hds-app-sidenav-animation-delay: var(--hds-app-sidenav-animation-duration);
|
|
25
25
|
--hds-app-sidenav-animation-easing: cubic-bezier(0.65, 0, 0.35, 1);
|
|
26
|
+
// toggle-button
|
|
27
|
+
--hds-app-sidenav-toggle-button-width: 24px;
|
|
26
28
|
}
|
|
27
29
|
|
|
28
30
|
// reduced motion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hashicorp/design-system-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.0",
|
|
4
4
|
"description": "Helios Design System Components",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"hashicorp",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"@ember/string": "^3.1.1",
|
|
45
45
|
"@ember/test-waiters": "^3.1.0",
|
|
46
46
|
"@hashicorp/design-system-tokens": "^1.9.0",
|
|
47
|
-
"@hashicorp/ember-flight-icons": "^4.0.
|
|
47
|
+
"@hashicorp/ember-flight-icons": "^4.0.4",
|
|
48
48
|
"dialog-polyfill": "^0.5.6",
|
|
49
49
|
"ember-a11y-refocus": "^3.0.2",
|
|
50
50
|
"ember-auto-import": "^2.6.3",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"sinon": "^17.0.0",
|
|
119
119
|
"stylelint": "^15.11.0",
|
|
120
120
|
"stylelint-config-rational-order": "^0.1.2",
|
|
121
|
-
"stylelint-config-standard-scss": "^
|
|
121
|
+
"stylelint-config-standard-scss": "^11.1.0",
|
|
122
122
|
"typescript": "^5.2.2",
|
|
123
123
|
"webpack": "^5.89.0"
|
|
124
124
|
},
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{{!
|
|
2
|
-
Copyright (c) HashiCorp, Inc.
|
|
3
|
-
SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
}}
|
|
5
|
-
<div class="hds-avatar" ...attributes aria-hidden="true">
|
|
6
|
-
{{#if @src}}
|
|
7
|
-
<img src={{@src}} alt="" role="none" />
|
|
8
|
-
{{else}}
|
|
9
|
-
<FlightIcon @name="user-circle" @size="24" />
|
|
10
|
-
{{/if}}
|
|
11
|
-
</div>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) HashiCorp, Inc.
|
|
3
|
-
* SPDX-License-Identifier: MPL-2.0
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
//
|
|
7
|
-
// AVATAR COMPONENT
|
|
8
|
-
//
|
|
9
|
-
|
|
10
|
-
.hds-avatar {
|
|
11
|
-
display: inline-flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
width: 32px;
|
|
16
|
-
height: 32px;
|
|
17
|
-
|
|
18
|
-
img {
|
|
19
|
-
width: inherit;
|
|
20
|
-
height: inherit;
|
|
21
|
-
border-radius: 2px;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
svg {
|
|
25
|
-
display: inline-block;
|
|
26
|
-
}
|
|
27
|
-
}
|