@kaizen/components 2.0.7 → 2.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.
Files changed (65) hide show
  1. package/dist/cjs/src/SingleSelect/SingleSelect.cjs +0 -2
  2. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.cjs +3 -3
  3. package/dist/esm/src/SingleSelect/SingleSelect.mjs +0 -2
  4. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.mjs +3 -3
  5. package/dist/styles.css +57 -53
  6. package/dist/types/SingleSelect/SingleSelect.d.ts +0 -2
  7. package/locales/ar.json +3 -3
  8. package/locales/bg.json +3 -3
  9. package/locales/cs.json +3 -3
  10. package/locales/cy.json +3 -3
  11. package/locales/da.json +3 -3
  12. package/locales/de.json +3 -3
  13. package/locales/el.json +3 -3
  14. package/locales/en-GB.json +3 -3
  15. package/locales/en.json +3 -3
  16. package/locales/es-419.json +3 -3
  17. package/locales/es.json +3 -3
  18. package/locales/et.json +3 -3
  19. package/locales/fi.json +3 -3
  20. package/locales/fr-CA.json +3 -3
  21. package/locales/fr.json +3 -3
  22. package/locales/he.json +3 -3
  23. package/locales/hi.json +3 -3
  24. package/locales/ht.json +3 -3
  25. package/locales/hu.json +3 -3
  26. package/locales/id.json +3 -3
  27. package/locales/it.json +3 -3
  28. package/locales/ja.json +3 -3
  29. package/locales/km-KH.json +3 -3
  30. package/locales/ko.json +3 -3
  31. package/locales/lt.json +3 -3
  32. package/locales/lv.json +3 -3
  33. package/locales/mi.json +3 -3
  34. package/locales/ms.json +3 -3
  35. package/locales/nb.json +3 -3
  36. package/locales/nl.json +3 -3
  37. package/locales/pl.json +3 -3
  38. package/locales/pt-BR.json +3 -3
  39. package/locales/pt.json +3 -3
  40. package/locales/ro.json +3 -3
  41. package/locales/ru.json +3 -3
  42. package/locales/si-LK.json +3 -3
  43. package/locales/sk.json +2 -2
  44. package/locales/sr.json +3 -3
  45. package/locales/sv.json +3 -3
  46. package/locales/th.json +3 -3
  47. package/locales/tl.json +3 -3
  48. package/locales/tr.json +3 -3
  49. package/locales/uk.json +3 -3
  50. package/locales/vi.json +3 -3
  51. package/locales/zh-TW.json +3 -3
  52. package/locales/zh.json +3 -3
  53. package/package.json +1 -1
  54. package/src/SingleSelect/SingleSelect.tsx +0 -2
  55. package/src/SingleSelect/_docs/SingleSelect--api-specification.mdx +1 -3
  56. package/src/SingleSelect/_docs/SingleSelect--usage-guidelines.mdx +1 -3
  57. package/src/SingleSelect/_docs/SingleSelect.stickersheet.stories.tsx +1 -1
  58. package/src/SingleSelect/_docs/SingleSelect.stories.tsx +1 -1
  59. package/src/TitleBlock/TitleBlock.module.scss +13 -8
  60. package/src/TitleBlock/_docs/{TitkeBlock--usage-guidelines.mdx → TitleBlock--usage-guidelines.mdx} +9 -1
  61. package/src/TitleBlock/_docs/TitleBlock.stories.tsx +71 -0
  62. package/src/TitleBlock/_mixins.scss +6 -6
  63. package/src/TitleBlock/subcomponents/NavigationTabs.module.scss +0 -1
  64. package/src/__alpha__/SingleSelect/_docs/SingleSelect.spec.stories.tsx +1 -1
  65. package/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.tsx +4 -3
@@ -53,6 +53,7 @@
53
53
 
54
54
  .adminVariant .titleRow {
55
55
  background-color: $color-white;
56
+ margin-bottom: 3px; // needed to correctly position the active tab label :after element
56
57
  }
57
58
 
58
59
  %titleBlockInner {
@@ -207,7 +208,7 @@
207
208
  max-width: 100%;
208
209
  }
209
210
 
210
- @media (min-width: $layout-breakpoints-large) {
211
+ @container (min-width: #{$layout-breakpoints-large}) {
211
212
  display: block;
212
213
  }
213
214
 
@@ -535,12 +536,14 @@
535
536
  }
536
537
  }
537
538
 
538
- @media only screen and (max-width: $breadcrumb-breakpoint-width) {
539
- position: relative;
540
- transform: translateY(0);
541
- margin-inline: 0 var(--spacing-12);
539
+ @media only screen {
540
+ @container (max-width: #{$breadcrumb-breakpoint-width}) {
541
+ position: relative;
542
+ transform: translateY(0);
543
+ margin-inline: 0 var(--spacing-12);
542
544
 
543
- @include ca-position($start: 0);
545
+ @include ca-position($start: 0);
546
+ }
544
547
  }
545
548
 
546
549
  @include title-block-medium-and-small {
@@ -580,8 +583,10 @@
580
583
  @include ca-position($start: $ca-grid);
581
584
  }
582
585
 
583
- @media only screen and (min-width: $breadcrumb-breakpoint-width) {
584
- @include ca-position($start: calc(#{$breadcrumb-circle-width} - #{$ca-grid}));
586
+ @media only screen {
587
+ @container (min-width: #{$breadcrumb-breakpoint-width}) {
588
+ @include ca-position($start: calc(#{$breadcrumb-circle-width} - #{$ca-grid}));
589
+ }
585
590
  }
586
591
 
587
592
  &:hover,
@@ -4,7 +4,7 @@ import * as TitleBlockStories from './TitleBlock.stories'
4
4
 
5
5
  <Meta title="Components/TitleBlock/Usage Guidelines" />
6
6
 
7
- # SingleSelect
7
+ # TitleBlock
8
8
 
9
9
  <ResourceLinks
10
10
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/TitleBlock"
@@ -34,3 +34,11 @@ A consistent pattern to allow users to navigate and complete tasks easily.
34
34
  ### Long titles
35
35
 
36
36
  <Canvas of={TitleBlockStories.HasLongTitle} />
37
+
38
+ ### Admin Variant
39
+
40
+ <Canvas of={TitleBlockStories.AdminVariant} />
41
+
42
+ ### Education Variant
43
+
44
+ <Canvas of={TitleBlockStories.EducationVariant} />
@@ -31,6 +31,7 @@ const meta = {
31
31
  component: TitleBlock,
32
32
  parameters: {
33
33
  chromatic: { disable: false },
34
+ layout: 'fullscreen',
34
35
  },
35
36
  args: {
36
37
  title: 'Page title',
@@ -145,6 +146,76 @@ export const HasLongTitle: Story = {
145
146
  args: { title: 'A long title with over thirty characters' },
146
147
  }
147
148
 
149
+ export const AdminVariant: Story = {
150
+ parameters: {
151
+ viewport: {
152
+ viewports: {
153
+ default: {
154
+ name: 'Above or equal to 1366',
155
+ styles: { width: '1366px', height: '800px' },
156
+ type: 'desktop',
157
+ },
158
+ under1366: {
159
+ name: 'Under 1366',
160
+ styles: { width: '1365px', height: '800px' },
161
+ type: 'desktop',
162
+ },
163
+ },
164
+ defaultViewport: 'default',
165
+ },
166
+ chromatic: {
167
+ disable: false,
168
+ viewports: [1365, 1366],
169
+ },
170
+ },
171
+ args: {
172
+ variant: 'admin',
173
+ navigationTabs: [
174
+ <NavigationTab key="1" variant="admin" text="Label" href="#" active />,
175
+ <NavigationTab key="2" variant="admin" text="Label" href="#" />,
176
+ <NavigationTab key="3" variant="admin" text="Label" href="#" />,
177
+ <NavigationTab key="4" variant="admin" text="Label" href="#" />,
178
+ <NavigationTab key="5" variant="admin" text="Label" href="#" />,
179
+ <NavigationTab key="6" variant="admin" text="Label" href="#" />,
180
+ ],
181
+ },
182
+ }
183
+
184
+ export const EducationVariant: Story = {
185
+ parameters: {
186
+ viewport: {
187
+ viewports: {
188
+ default: {
189
+ name: 'Above or equal to 1366',
190
+ styles: { width: '1366px', height: '800px' },
191
+ type: 'desktop',
192
+ },
193
+ under1366: {
194
+ name: 'Under 1366',
195
+ styles: { width: '1365px', height: '800px' },
196
+ type: 'desktop',
197
+ },
198
+ },
199
+ defaultViewport: 'default',
200
+ },
201
+ chromatic: {
202
+ disable: false,
203
+ viewports: [1365, 1366],
204
+ },
205
+ },
206
+ args: {
207
+ variant: 'education',
208
+ navigationTabs: [
209
+ <NavigationTab key="1" variant="education" text="Label" href="#" active />,
210
+ <NavigationTab key="2" variant="education" text="Label" href="#" />,
211
+ <NavigationTab key="3" variant="education" text="Label" href="#" />,
212
+ <NavigationTab key="4" variant="education" text="Label" href="#" />,
213
+ <NavigationTab key="5" variant="education" text="Label" href="#" />,
214
+ <NavigationTab key="6" variant="education" text="Label" href="#" />,
215
+ ],
216
+ },
217
+ }
218
+
148
219
  export const StickerSheetBreadcrumbs: Story = {
149
220
  name: 'Sticker Sheet (Breadcrumb)',
150
221
  parameters: {
@@ -1,37 +1,37 @@
1
1
  @import '~@kaizen/design-tokens/sass/layout';
2
2
 
3
3
  @mixin title-block-under-1645 {
4
- @media (max-width: 1644px) {
4
+ @container (max-width: 1644px) {
5
5
  @content;
6
6
  }
7
7
  }
8
8
 
9
9
  @mixin title-block-under-1440 {
10
- @media (max-width: 1439px) {
10
+ @container (max-width: 1439px) {
11
11
  @content;
12
12
  }
13
13
  }
14
14
 
15
15
  @mixin title-block-under-1366 {
16
- @media (max-width: 1365px) {
16
+ @container (max-width: 1365px) {
17
17
  @content;
18
18
  }
19
19
  }
20
20
 
21
21
  @mixin title-block-medium-and-small {
22
- @media (max-width: calc(#{$layout-breakpoints-large} - 1px)) {
22
+ @container (max-width: calc(#{$layout-breakpoints-large} - 1px)) {
23
23
  @content;
24
24
  }
25
25
  }
26
26
 
27
27
  @mixin title-block-under-1024 {
28
- @media (max-width: 1023px) {
28
+ @container (max-width: 1023px) {
29
29
  @content;
30
30
  }
31
31
  }
32
32
 
33
33
  @mixin title-block-small {
34
- @media (max-width: $layout-breakpoints-medium - 1px) {
34
+ @container (max-width: calc(#{$layout-breakpoints-medium} - 1px)) {
35
35
  @content;
36
36
  }
37
37
  }
@@ -125,7 +125,6 @@
125
125
 
126
126
  &::before {
127
127
  background-color: $color-blue-500;
128
- top: 3px;
129
128
 
130
129
  @include title-block-medium-and-small {
131
130
  top: auto;
@@ -87,7 +87,7 @@ export const XButtonClearsSelection: Story = {
87
87
  await userEvent.click(options[0])
88
88
 
89
89
  const clearButton = await screen.findByRole('button', {
90
- name: 'Clear Choose a coffee selection',
90
+ name: 'Clear selection: Choose a coffee',
91
91
  })
92
92
  await waitFor(() => expect(clearButton).toBeVisible())
93
93
  await userEvent.click(clearButton)
@@ -19,9 +19,10 @@ const ClearButton = ({ clearButtonRef, inputRef }: ClearButtonProps): JSX.Elemen
19
19
 
20
20
  const clearButtonAlt = formatMessage(
21
21
  {
22
- id: 'singleSelect.clearButtonAlt',
23
- defaultMessage: 'Clear {field} selection',
24
- description: 'Alt text for the clear selection button',
22
+ id: 'singleSelect.clearButtonAlt_v2',
23
+ defaultMessage: 'Clear selection: {field}',
24
+ description:
25
+ 'Alt text for the clear selection button. The button clears the selection the user has made via a dropdown. The field placeholder is the label of the dropdown.',
25
26
  },
26
27
  { field: fieldLabel },
27
28
  )