@kaizen/components 1.68.4 → 1.68.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/cjs/Tile/subcomponents/GenericTile/GenericTile.cjs +23 -2
  2. package/dist/cjs/__actions__/Button/v3/Button.cjs +5 -3
  3. package/dist/esm/Tile/subcomponents/GenericTile/GenericTile.mjs +24 -3
  4. package/dist/esm/__actions__/Button/v3/Button.mjs +5 -3
  5. package/dist/styles.css +124 -312
  6. package/dist/types/__actions__/Button/v3/Button.d.ts +5 -0
  7. package/locales/ar.json +8 -0
  8. package/locales/bg.json +8 -0
  9. package/locales/cs.json +8 -0
  10. package/locales/cy.json +8 -0
  11. package/locales/da.json +8 -0
  12. package/locales/de.json +8 -0
  13. package/locales/el.json +8 -0
  14. package/locales/en-GB.json +8 -0
  15. package/locales/es-419.json +8 -0
  16. package/locales/es.json +8 -0
  17. package/locales/et.json +8 -0
  18. package/locales/fi.json +8 -0
  19. package/locales/fr-CA.json +8 -0
  20. package/locales/fr.json +8 -0
  21. package/locales/he.json +8 -0
  22. package/locales/hi.json +8 -0
  23. package/locales/ht.json +8 -0
  24. package/locales/hu.json +8 -0
  25. package/locales/id.json +8 -0
  26. package/locales/it.json +8 -0
  27. package/locales/ja.json +8 -0
  28. package/locales/km-KH.json +8 -0
  29. package/locales/ko.json +8 -0
  30. package/locales/lt.json +8 -0
  31. package/locales/lv.json +8 -0
  32. package/locales/mi.json +8 -0
  33. package/locales/ms.json +8 -0
  34. package/locales/nb.json +8 -0
  35. package/locales/nl.json +8 -0
  36. package/locales/pl.json +8 -0
  37. package/locales/pt-BR.json +8 -0
  38. package/locales/pt.json +8 -0
  39. package/locales/ro.json +8 -0
  40. package/locales/ru.json +8 -0
  41. package/locales/si-LK.json +8 -0
  42. package/locales/sk.json +8 -0
  43. package/locales/sr.json +8 -0
  44. package/locales/sv.json +8 -0
  45. package/locales/th.json +8 -0
  46. package/locales/tl.json +8 -0
  47. package/locales/tr.json +8 -0
  48. package/locales/uk.json +8 -0
  49. package/locales/vi.json +8 -0
  50. package/locales/zh-TW.json +8 -0
  51. package/locales/zh.json +8 -0
  52. package/package.json +1 -1
  53. package/src/AvatarGroup/AvatarGroup.module.scss +1 -4
  54. package/src/DateInput/DateInputWithIconButton/DateInputWithIconButton.module.scss +1 -5
  55. package/src/DateRangePicker/DateRangePicker.module.scss +5 -29
  56. package/src/Filter/FilterMultiSelect/subcomponents/MenuPopup/MenuPopup.module.scss +1 -5
  57. package/src/GuidanceBlock/GuidanceBlock.module.css +5 -42
  58. package/src/Input/Input/Input.module.scss +5 -40
  59. package/src/LikertScaleLegacy/LikertScaleLegacy.module.scss +11 -63
  60. package/src/Tag/_docs/Tag.mdx +7 -6
  61. package/src/TextField/_docs/TextField.mdx +1 -1
  62. package/src/Tile/TileGrid/_docs/TileGrid.stories.tsx +41 -8
  63. package/src/Tile/subcomponents/GenericTile/GenericTile.spec.stories.tsx +58 -0
  64. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +24 -1
  65. package/src/TitleBlockZen/subcomponents/NavigationTabs.module.scss +2 -14
  66. package/src/TitleBlockZen/subcomponents/TitleBlockMenuItem.module.scss +1 -5
  67. package/src/ToggleSwitch/ToggleSwitch/ToggleSwitch.module.scss +2 -14
  68. package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +1 -7
  69. package/src/__actions__/Button/v3/Button.tsx +9 -2
  70. package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +2 -2
  71. package/src/__actions__/Menu/v1/subcomponents/MenuDropdown/MenuDropdown.module.scss +1 -5
  72. package/src/__actions__/Menu/v1/subcomponents/MenuItem/MenuItem.module.scss +1 -5
  73. package/src/__future__/Icon/Icon.module.css +7 -11
  74. package/src/__future__/Tag/Tag/_docs/Tag.mdx +1 -3
package/locales/th.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "ไปที่หน้าแรก"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "ดูข้อมูลเพิ่มเติม:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "ซ่อนข้อมูล:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "การดำเนินการเพิ่มเติม"
package/locales/tl.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "Pumunta sa Home"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "Tingnan ang iba pang impormasyon"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "Itago ang impormasyon:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "Karagdagang mga aksiyon"
package/locales/tr.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "Ana Sayfaya Git"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "Daha fazla bilgi görüntüleyin:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "Bilgileri gizleyin:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "Ek eylemler"
package/locales/uk.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "Перейти на головну"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "Переглянути додаткову інформацію:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "Приховати інформацію:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "Додаткові дії"
package/locales/vi.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "Vào Trang chủ"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "Xem thêm thông tin:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "Ẩn thông tin:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "Các hành động bổ sung"
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "前往首頁"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "檢視更多資訊:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "隱藏資訊:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "其他行動"
package/locales/zh.json CHANGED
@@ -164,6 +164,14 @@
164
164
  "description" : "Home button label",
165
165
  "message" : "转到主页"
166
166
  },
167
+ "kzGenericTile.infoButtonLabel" : {
168
+ "description" : "Prompts user to interact with button to reveal more information",
169
+ "message" : "查看更多信息:"
170
+ },
171
+ "kzGenericTile.infoButtonReturnLabel" : {
172
+ "description" : "Prompts user to interact with button to hide information",
173
+ "message" : "隐藏信息:"
174
+ },
167
175
  "splitButton.dropdownButton.label" : {
168
176
  "description" : "Label for a dropdown menu holding additional actions",
169
177
  "message" : "附加操作"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.68.4",
3
+ "version": "1.68.6",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -19,6 +19,7 @@ $avatar-lg: 4.5rem;
19
19
  }
20
20
 
21
21
  .AvatarCounter {
22
+ direction: ltr;
22
23
  align-items: center;
23
24
  background: $color-gray-300;
24
25
  border: 3px solid $color-white;
@@ -28,10 +29,6 @@ $avatar-lg: 4.5rem;
28
29
  display: flex;
29
30
  justify-content: center;
30
31
  overflow: hidden;
31
-
32
- [dir="rtl"] & {
33
- direction: ltr;
34
- }
35
32
  }
36
33
 
37
34
  .small {
@@ -14,13 +14,9 @@ $input-disabled-opacity: 0.3;
14
14
  border: $border-solid-border-width $border-solid-border-style transparent;
15
15
  border-radius: $border-solid-border-radius;
16
16
  position: relative;
17
- right: -0.35rem;
17
+ inset-inline-end: -0.35rem;
18
18
  top: -40%;
19
19
 
20
- [dir="rtl"] & {
21
- right: 0.25rem;
22
- }
23
-
24
20
  :focus {
25
21
  outline: none;
26
22
  }
@@ -26,7 +26,7 @@ $placeholder-opacity: 0.7;
26
26
  font-weight: $typography-paragraph-body-font-weight;
27
27
  line-height: 1.5;
28
28
  letter-spacing: $typography-paragraph-body-letter-spacing;
29
- text-align: left;
29
+ text-align: start;
30
30
  background-color: $color-white;
31
31
  background-clip: padding-box;
32
32
  border: $border-solid-border-width $border-solid-border-style $color-gray-500;
@@ -34,10 +34,6 @@ $placeholder-opacity: 0.7;
34
34
  margin-top: $spacing-6;
35
35
  padding: 0 $button-base-padding-horizontal;
36
36
 
37
- [dir="rtl"] & {
38
- text-align: right;
39
- }
40
-
41
37
  &:focus-visible:not([disabled]),
42
38
  &:hover:not([disabled]) {
43
39
  background-color: $color-gray-200;
@@ -63,14 +59,7 @@ $placeholder-opacity: 0.7;
63
59
  }
64
60
 
65
61
  .value {
66
- padding-right: $button-base-padding-horizontal;
67
- padding-left: 1.75rem;
68
-
69
- &[dir="rtl"],
70
- [dir="rtl"] & {
71
- padding-right: 1.75rem;
72
- padding-left: $button-base-padding-horizontal;
73
- }
62
+ padding-inline: 1.75rem $button-base-padding-horizontal;
74
63
  }
75
64
  }
76
65
 
@@ -93,14 +82,7 @@ $placeholder-opacity: 0.7;
93
82
 
94
83
  color: $color-purple-800;
95
84
  opacity: $disabled-opacity;
96
- right: auto;
97
- left: $spacing-sm;
98
-
99
- &[dir="rtl"],
100
- [dir="rtl"] & {
101
- right: $spacing-sm;
102
- left: auto;
103
- }
85
+ inset-inline: $spacing-sm auto;
104
86
  }
105
87
 
106
88
  &:focus-within:not(.disabled),
@@ -111,14 +93,8 @@ $placeholder-opacity: 0.7;
111
93
  }
112
94
 
113
95
  .button {
114
- padding-right: $button-base-padding-horizontal;
115
- padding-left: calc(#{$spacing-md} + #{$button-icon-size});
116
-
117
- &[dir="rtl"],
118
- [dir="rtl"] & {
119
- padding-right: calc(#{$spacing-md} + #{$button-icon-size});
120
- padding-left: $button-base-padding-horizontal;
121
- }
96
+ padding-inline: calc(#{$spacing-md} + #{$button-icon-size})
97
+ $button-base-padding-horizontal;
122
98
  }
123
99
  }
124
100
  /* stylelint-enable no-descending-specificity */
@@ -17,10 +17,6 @@ $menu-container-max-height: 312px;
17
17
  box-shadow: $shadow-large-box-shadow;
18
18
  padding: $spacing-sm 0;
19
19
  margin-top: $spacing-xs;
20
- text-align: left;
20
+ text-align: start;
21
21
  width: $menu-container-width;
22
-
23
- [dir="rtl"] & {
24
- text-align: right;
25
- }
26
22
  }
@@ -97,20 +97,13 @@
97
97
 
98
98
  @media (width >= 1024px) {
99
99
  padding: 0 var(--spacing-12);
100
- text-align: left;
100
+ text-align: start;
101
101
  }
102
102
 
103
103
  @media (width <= 767px) {
104
104
  margin: var(--spacing-12);
105
105
  max-width: 100%;
106
106
  }
107
-
108
- [dir="rtl"] & {
109
- @media (width >= 1024px) {
110
- padding: 0 var(--spacing-12);
111
- text-align: right;
112
- }
113
- }
114
107
  }
115
108
 
116
109
  .descriptionAndActions {
@@ -144,10 +137,6 @@
144
137
  width: 100%;
145
138
  margin-top: var(--spacing-6);
146
139
  }
147
-
148
- [dir="rtl"] & svg {
149
- transform: rotate(180deg);
150
- }
151
140
  }
152
141
 
153
142
  .hidden {
@@ -202,12 +191,7 @@
202
191
  }
203
192
 
204
193
  .illustrationWrapper {
205
- margin-right: var(--spacing-12);
206
-
207
- [dir="rtl"] & {
208
- margin-left: var(--spacing-12);
209
- margin-right: inherit;
210
- }
194
+ margin-inline-end: var(--spacing-12);
211
195
 
212
196
  @media (768px <= width <= 1023px) {
213
197
  padding: 0;
@@ -223,7 +207,7 @@
223
207
  }
224
208
 
225
209
  .descriptionContainer {
226
- text-align: left;
210
+ text-align: start;
227
211
  max-width: unset;
228
212
  min-width: 320px;
229
213
 
@@ -234,18 +218,10 @@
234
218
  @media (width <= 767px) {
235
219
  margin: 0;
236
220
  }
237
-
238
- [dir="rtl"] & {
239
- text-align: right;
240
-
241
- @media (width >= 1024px) {
242
- padding: 0;
243
- }
244
- }
245
221
  }
246
222
 
247
223
  .buttonContainer {
248
- padding-left: var(--spacing-12);
224
+ padding-inline-start: var(--spacing-12);
249
225
  justify-content: flex-start;
250
226
  width: unset;
251
227
  min-width: unset;
@@ -254,11 +230,6 @@
254
230
  flex-direction: row-reverse;
255
231
  }
256
232
 
257
- [dir="rtl"] & {
258
- padding-left: 0;
259
- padding-right: var(--spacing-12);
260
- }
261
-
262
233
  > * {
263
234
  width: unset;
264
235
  }
@@ -283,10 +254,6 @@
283
254
  .descriptionContainer {
284
255
  text-align: center;
285
256
  min-width: unset;
286
-
287
- [dir="rtl"] & {
288
- text-align: center;
289
- }
290
257
  }
291
258
 
292
259
  .buttonContainer {
@@ -299,11 +266,7 @@
299
266
 
300
267
  &.centerContent.smallScreenTextAlignment {
301
268
  .descriptionContainer {
302
- text-align: left;
303
-
304
- [dir="rtl"] & {
305
- text-align: right;
306
- }
269
+ text-align: start;
307
270
  }
308
271
  }
309
272
  }
@@ -98,14 +98,7 @@ $input-with-icon-padding: calc(
98
98
  .startIconAdornment {
99
99
  @include vertically-center-icon;
100
100
 
101
- right: auto;
102
- left: $spacing-sm;
103
-
104
- &[dir="rtl"],
105
- [dir="rtl"] & {
106
- right: $spacing-sm;
107
- left: auto;
108
- }
101
+ inset-inline: $spacing-sm auto;
109
102
  }
110
103
 
111
104
  &.withDisabled {
@@ -115,14 +108,7 @@ $input-with-icon-padding: calc(
115
108
  }
116
109
 
117
110
  .input {
118
- padding-right: $input-base-padding-horizontal;
119
- padding-left: $input-with-icon-padding;
120
-
121
- &[dir="rtl"],
122
- [dir="rtl"] & {
123
- padding-right: $input-with-icon-padding;
124
- padding-left: $input-base-padding-horizontal;
125
- }
111
+ padding-inline: $input-with-icon-padding $input-base-padding-horizontal;
126
112
  }
127
113
  }
128
114
 
@@ -130,14 +116,7 @@ $input-with-icon-padding: calc(
130
116
  .endIconAdornment {
131
117
  @include vertically-center-icon;
132
118
 
133
- right: $spacing-sm;
134
- left: auto;
135
-
136
- &[dir="rtl"],
137
- [dir="rtl"] & {
138
- right: auto;
139
- left: $spacing-sm;
140
- }
119
+ inset-inline: auto $spacing-sm;
141
120
  }
142
121
 
143
122
  &.withDisabled {
@@ -147,27 +126,13 @@ $input-with-icon-padding: calc(
147
126
  }
148
127
 
149
128
  .input {
150
- padding-right: $input-with-icon-padding;
151
- padding-left: $input-base-padding-horizontal;
152
-
153
- &[dir="rtl"],
154
- [dir="rtl"] & {
155
- padding-right: $input-base-padding-horizontal;
156
- padding-left: $input-with-icon-padding;
157
- }
129
+ padding-inline: $input-base-padding-horizontal $input-with-icon-padding;
158
130
  }
159
131
  }
160
132
 
161
133
  .withStartIconAdornment.withEndIconAdornment {
162
134
  .input {
163
- padding-right: $input-with-icon-padding;
164
- padding-left: $input-with-icon-padding;
165
-
166
- &[dir="rtl"],
167
- [dir="rtl"] & {
168
- padding-right: $input-with-icon-padding;
169
- padding-left: $input-with-icon-padding;
170
- }
135
+ padding-inline: $input-with-icon-padding $input-with-icon-padding;
171
136
  }
172
137
  }
173
138
 
@@ -39,55 +39,17 @@ $blue-fifth: $color-blue-500;
39
39
  -webkit-animation: pop cubic-bezier(0, 0.94, 0.32, 1) 0.7s 1;
40
40
  }
41
41
 
42
- @mixin right-likert-item($height) {
43
- border-top-right-radius: $height;
44
- border-bottom-right-radius: $height;
45
- }
46
-
47
- @mixin left-likert-item($height) {
48
- border-top-left-radius: $height;
49
- border-bottom-left-radius: $height;
50
- }
51
-
52
42
  @mixin fill($height) {
53
- &:first-child .likertItemFill {
54
- @include left-likert-item($height);
55
-
56
- [dir="rtl"] & {
57
- border-radius: 0;
58
-
59
- @include right-likert-item($height);
60
- }
61
-
62
- &::after {
63
- @include left-likert-item($height);
64
-
65
- [dir="rtl"] & {
66
- border-radius: 0;
67
-
68
- @include right-likert-item($height);
69
- }
70
- }
43
+ &:first-child .likertItemFill,
44
+ &:first-child .likertItemFill::after {
45
+ border-start-start-radius: $height;
46
+ border-end-start-radius: $height;
71
47
  }
72
48
 
73
- &:last-child .likertItemFill {
74
- @include right-likert-item($height);
75
-
76
- [dir="rtl"] & {
77
- border-radius: 0;
78
-
79
- @include left-likert-item($height);
80
- }
81
-
82
- &::after {
83
- @include right-likert-item($height);
84
-
85
- [dir="rtl"] & {
86
- border-radius: 0;
87
-
88
- @include left-likert-item($height);
89
- }
90
- }
49
+ &:last-child .likertItemFill,
50
+ &:last-child .likertItemFill::after {
51
+ border-start-end-radius: $height;
52
+ border-end-end-radius: $height;
91
53
  }
92
54
  }
93
55
 
@@ -168,8 +130,7 @@ $blue-fifth: $color-blue-500;
168
130
  }
169
131
 
170
132
  .likertItem {
171
- margin-right: 2px;
172
- margin-left: 2px;
133
+ margin-inline: 2px;
173
134
  font-size: 1px;
174
135
  line-height: 1;
175
136
  padding: 0;
@@ -178,27 +139,14 @@ $blue-fifth: $color-blue-500;
178
139
  width: 18.5%; // 5 columns
179
140
  position: relative;
180
141
 
181
- &[dir="rtl"],
182
- [dir="rtl"] & {
183
- &:first-child {
184
- margin-left: 2px;
185
- }
186
-
187
- &:last-child {
188
- margin-right: 2px;
189
- }
190
- }
191
-
192
142
  @include fill($block-height);
193
143
 
194
144
  &:first-child {
195
- margin-right: 2px;
196
- margin-left: 0;
145
+ margin-inline-start: 0;
197
146
  }
198
147
 
199
148
  &:last-child {
200
- margin-left: 2px;
201
- margin-right: 0;
149
+ margin-inline-end: 0;
202
150
  }
203
151
 
204
152
  // Hack to bridge the gaps between items so mouse always hovers on something
@@ -1,4 +1,4 @@
1
- import { Canvas, Controls , Meta } from "@storybook/blocks"
1
+ import { Canvas, Controls , Meta, Unstyled } from "@storybook/blocks"
2
2
  import { InlineNotification } from "~components/Notification"
3
3
  import { ResourceLinks, KAIOInstallation } from "~storybook/components"
4
4
  import * as TagStories from "./Tag.stories"
@@ -14,11 +14,12 @@ import * as TagStories from "./Tag.stories"
14
14
 
15
15
  />
16
16
 
17
-
18
- <InlineNotification type="cautionary" persistent>
19
- {`This version of the Tag will soon be deprecated and will be removed in the next major release.
20
- Import Tag from "@kaizen/components/future" for the latest version and veiw our migration guide in the Future folder` }
21
- </InlineNotification>
17
+ <Unstyled>
18
+ <InlineNotification type="cautionary" persistent>
19
+ {`This version of the Tag will soon be deprecated and will be removed in the next major release.
20
+ Import Tag from "@kaizen/components/future" for the latest version and veiw our migration guide in the Future folder` }
21
+ </InlineNotification>
22
+ </Unstyled>
22
23
 
23
24
  <KAIOInstallation exportNames="Tag" />
24
25
 
@@ -34,7 +34,7 @@ Composed of <LinkTo pageId="components-label">Label</LinkTo>, <LinkTo pageId="co
34
34
  <Canvas of={TextFieldStories.Description} />
35
35
 
36
36
  ### Icon
37
- <Canvas of={TextFieldStories.Icon} />
37
+ <Canvas of={TextFieldStories.IconStory} />
38
38
 
39
39
  ### Validation
40
40
  <Canvas of={TextFieldStories.Validation} />
@@ -1,5 +1,6 @@
1
1
  import React from "react"
2
2
  import { Meta, StoryObj } from "@storybook/react"
3
+ import { expect, waitFor, within } from "@storybook/test"
3
4
  import { InformationTile } from "~components/Tile"
4
5
  import { TileGrid } from "../index"
5
6
 
@@ -10,21 +11,21 @@ const meta = {
10
11
  children: (
11
12
  <>
12
13
  <InformationTile
13
- title="Title"
14
+ title="Title A"
14
15
  metadata="Side A"
15
- information="Side B"
16
+ information="Side A - Back"
16
17
  footer={<>Footer</>}
17
18
  />
18
19
  <InformationTile
19
- title="Title"
20
- metadata="Side A"
21
- information="Side B"
20
+ title="Title B"
21
+ metadata="Side B"
22
+ information="Side B - Back"
22
23
  footer={<>Footer</>}
23
24
  />
24
25
  <InformationTile
25
- title="Title"
26
- metadata="Side A"
27
- information="Side B"
26
+ title="Title C"
27
+ metadata="Side C"
28
+ information="Side C - Back"
28
29
  footer={<>Footer</>}
29
30
  />
30
31
  </>
@@ -45,3 +46,35 @@ export const Playground: Story = {
45
46
  },
46
47
  },
47
48
  }
49
+
50
+ // Test for multiple tiles, flipping one doesn't flip others
51
+ export const FlipOneNotOthers: Story = {
52
+ play: async ({ canvasElement, step }) => {
53
+ const canvas = within(canvasElement)
54
+
55
+ await step("initial render complete", async () => {
56
+ await waitFor(() => {
57
+ canvas.getByRole("button", {
58
+ name: "View more information: Title A",
59
+ })
60
+ })
61
+ })
62
+
63
+ await step("Can focus to button", async () => {
64
+ await waitFor(() => {
65
+ const buttonWithInfoLabel = canvas.getByRole("button", {
66
+ name: "View more information: Title A",
67
+ })
68
+ buttonWithInfoLabel.click()
69
+ })
70
+ })
71
+
72
+ await step("Check other tiles", async () => {
73
+ await waitFor(() => {
74
+ expect(canvas.getByText("Side A - Back")).toBeInTheDocument()
75
+ expect(canvas.getByText("Title B")).toBeInTheDocument()
76
+ expect(canvas.getByText("Title C")).toBeInTheDocument()
77
+ })
78
+ })
79
+ },
80
+ }