@kaizen/components 0.0.0-canary-debug-tab-20251015223744 → 0.0.0-canary-container-query-titleblock-20251105031251

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 (115) hide show
  1. package/dist/cjs/src/RichTextEditor/RichTextEditor/RichTextEditor.cjs +9 -24
  2. package/dist/cjs/src/RichTextEditor/RichTextEditor/RichTextEditor.module.scss.cjs +1 -1
  3. package/dist/cjs/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/ToolbarControls.cjs +51 -0
  4. package/dist/cjs/src/RichTextEditor/RichTextEditor/utils/controlmap.cjs +44 -10
  5. package/dist/cjs/src/RichTextEditor/utils/core/hooks/useRichTextEditor.cjs +17 -20
  6. package/dist/cjs/src/SingleSelect/SingleSelect.cjs +2 -0
  7. package/dist/cjs/src/Tabs/subcomponents/TabList/TabList.cjs +21 -29
  8. package/dist/cjs/src/Tile/InformationTile/InformationTile.cjs +2 -0
  9. package/dist/cjs/src/Tile/MultiActionTile/MultiActionTile.cjs +2 -0
  10. package/dist/cjs/src/Tile/TileGrid/TileGrid.cjs +2 -0
  11. package/dist/cjs/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.cjs +3 -3
  12. package/dist/esm/src/RichTextEditor/RichTextEditor/RichTextEditor.mjs +10 -25
  13. package/dist/esm/src/RichTextEditor/RichTextEditor/RichTextEditor.module.scss.mjs +1 -1
  14. package/dist/esm/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/ToolbarControls.mjs +43 -0
  15. package/dist/esm/src/RichTextEditor/RichTextEditor/utils/controlmap.mjs +44 -10
  16. package/dist/esm/src/RichTextEditor/utils/core/hooks/useRichTextEditor.mjs +18 -21
  17. package/dist/esm/src/SingleSelect/SingleSelect.mjs +2 -0
  18. package/dist/esm/src/Tabs/subcomponents/TabList/TabList.mjs +21 -29
  19. package/dist/esm/src/Tile/InformationTile/InformationTile.mjs +2 -0
  20. package/dist/esm/src/Tile/MultiActionTile/MultiActionTile.mjs +2 -0
  21. package/dist/esm/src/Tile/TileGrid/TileGrid.mjs +2 -0
  22. package/dist/esm/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.mjs +3 -3
  23. package/dist/styles.css +64 -69
  24. package/dist/types/RichTextEditor/RichTextEditor/RichTextEditor.d.ts +2 -2
  25. package/dist/types/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/ToolbarControls.d.ts +12 -0
  26. package/dist/types/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/index.d.ts +1 -0
  27. package/dist/types/RichTextEditor/RichTextEditor/utils/controlmap.d.ts +1 -1
  28. package/dist/types/SingleSelect/SingleSelect.d.ts +2 -0
  29. package/dist/types/Tile/InformationTile/InformationTile.d.ts +2 -0
  30. package/dist/types/Tile/MultiActionTile/MultiActionTile.d.ts +2 -0
  31. package/dist/types/Tile/TileGrid/TileGrid.d.ts +2 -0
  32. package/locales/ar.json +37 -1
  33. package/locales/bg.json +37 -1
  34. package/locales/cs.json +37 -1
  35. package/locales/cy.json +37 -1
  36. package/locales/da.json +37 -1
  37. package/locales/de.json +37 -1
  38. package/locales/el.json +37 -1
  39. package/locales/en-GB.json +37 -1
  40. package/locales/en.json +40 -4
  41. package/locales/es-419.json +37 -1
  42. package/locales/es.json +37 -1
  43. package/locales/et.json +37 -1
  44. package/locales/fi.json +37 -1
  45. package/locales/fr-CA.json +37 -1
  46. package/locales/fr.json +37 -1
  47. package/locales/he.json +37 -1
  48. package/locales/hi.json +37 -1
  49. package/locales/ht.json +37 -1
  50. package/locales/hu.json +37 -1
  51. package/locales/id.json +37 -1
  52. package/locales/it.json +37 -1
  53. package/locales/ja.json +37 -1
  54. package/locales/km-KH.json +37 -1
  55. package/locales/ko.json +37 -1
  56. package/locales/lt.json +37 -1
  57. package/locales/lv.json +37 -1
  58. package/locales/mi.json +37 -1
  59. package/locales/ms.json +37 -1
  60. package/locales/nb.json +37 -1
  61. package/locales/nl.json +37 -1
  62. package/locales/pl.json +37 -1
  63. package/locales/pt-BR.json +37 -1
  64. package/locales/pt.json +37 -1
  65. package/locales/ro.json +37 -1
  66. package/locales/ru.json +37 -1
  67. package/locales/si-LK.json +37 -1
  68. package/locales/sk.json +37 -1
  69. package/locales/sr.json +37 -1
  70. package/locales/sv.json +37 -1
  71. package/locales/th.json +37 -1
  72. package/locales/tl.json +37 -1
  73. package/locales/tr.json +37 -1
  74. package/locales/uk.json +37 -1
  75. package/locales/vi.json +37 -1
  76. package/locales/zh-TW.json +37 -1
  77. package/locales/zh.json +37 -1
  78. package/package.json +1 -1
  79. package/src/RichTextEditor/RichTextEditor/RichTextEditor.module.scss +8 -20
  80. package/src/RichTextEditor/RichTextEditor/RichTextEditor.spec.tsx +4 -4
  81. package/src/RichTextEditor/RichTextEditor/RichTextEditor.tsx +12 -30
  82. package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/Toolbar.module.scss +0 -1
  83. package/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/ToolbarControls.tsx +62 -0
  84. package/src/RichTextEditor/RichTextEditor/subcomponents/ToolbarControls/index.ts +1 -0
  85. package/src/RichTextEditor/RichTextEditor/utils/controlmap.tsx +46 -9
  86. package/src/RichTextEditor/utils/commands/fixtures/data.json +1 -1
  87. package/src/RichTextEditor/utils/commands/listIsActive.spec.ts +2 -2
  88. package/src/RichTextEditor/utils/core/hooks/useRichTextEditor.spec.tsx +11 -0
  89. package/src/RichTextEditor/utils/core/hooks/useRichTextEditor.ts +17 -21
  90. package/src/SingleSelect/SingleSelect.tsx +2 -0
  91. package/src/SingleSelect/_docs/SingleSelect--api-specification.mdx +4 -2
  92. package/src/SingleSelect/_docs/SingleSelect--usage-guidelines.mdx +10 -2
  93. package/src/SingleSelect/_docs/SingleSelect.stickersheet.stories.tsx +1 -1
  94. package/src/SingleSelect/_docs/SingleSelect.stories.tsx +1 -1
  95. package/src/Tabs/subcomponents/TabList/TabList.tsx +30 -40
  96. package/src/Tile/InformationTile/InformationTile.tsx +2 -0
  97. package/src/Tile/InformationTile/_docs/InformationTile.mdx +3 -1
  98. package/src/Tile/InformationTile/_docs/InformationTile.stickersheet.stories.tsx +1 -1
  99. package/src/Tile/InformationTile/_docs/InformationTile.stories.tsx +1 -1
  100. package/src/Tile/MultiActionTile/MultiActionTile.tsx +2 -0
  101. package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +3 -1
  102. package/src/Tile/MultiActionTile/_docs/MultiActionTile.stickersheet.stories.tsx +1 -1
  103. package/src/Tile/MultiActionTile/_docs/MultiActionTile.stories.tsx +1 -1
  104. package/src/Tile/TileGrid/TileGrid.tsx +2 -0
  105. package/src/Tile/TileGrid/_docs/TileGrid.mdx +3 -1
  106. package/src/Tile/TileGrid/_docs/TileGrid.stickersheet.stories.tsx +1 -1
  107. package/src/Tile/TileGrid/_docs/TileGrid.stories.tsx +1 -1
  108. package/src/TitleBlock/TitleBlock.module.scss +13 -8
  109. package/src/TitleBlock/_docs/{TitkeBlock--usage-guidelines.mdx → TitleBlock--usage-guidelines.mdx} +9 -1
  110. package/src/TitleBlock/_docs/TitleBlock.stories.tsx +71 -0
  111. package/src/TitleBlock/_mixins.scss +6 -6
  112. package/src/TitleBlock/subcomponents/NavigationTabs.module.scss +0 -1
  113. package/src/__alpha__/SingleSelect/_docs/SingleSelect.spec.stories.tsx +1 -1
  114. package/src/__alpha__/SingleSelect/subcomponents/ComboBoxTrigger/ComboBoxTrigger.tsx +4 -3
  115. package/src/__alpha__/SingleSelect/subcomponents/ListItem/ListItem.module.css +0 -4
@@ -20,7 +20,7 @@ describe('listIsActive()', () => {
20
20
  })
21
21
  let currentState = testEditorStateWitList
22
22
 
23
- dispatchTransaction(simulateSelectionByText('Bullet List Item Node'))
23
+ dispatchTransaction(simulateSelectionByText('Bullet list Item Node'))
24
24
  dispatchTransaction((editorState: EditorState) => {
25
25
  currentState = editorState
26
26
  return true
@@ -40,7 +40,7 @@ describe('listIsActive()', () => {
40
40
  })
41
41
  let currentState = testEditorStateWitList
42
42
 
43
- dispatchTransaction(simulateSelectionByText('Bullet List Item Node'))
43
+ dispatchTransaction(simulateSelectionByText('Bullet list Item Node'))
44
44
  dispatchTransaction((editorState: EditorState) => {
45
45
  currentState = editorState
46
46
  return true
@@ -150,4 +150,15 @@ describe('useRichTextEditor()', () => {
150
150
  expect(editor.children[0]).toHaveAttribute('contenteditable', 'true')
151
151
  })
152
152
  })
153
+
154
+ it('is removed from DOM when unmounted', async () => {
155
+ const { unmount } = render(<Scenario />)
156
+
157
+ const editor = screen.getByTestId('testid--editor')
158
+ expect(editor).toBeInTheDocument()
159
+
160
+ unmount()
161
+
162
+ expect(screen.queryByTestId('testid--editor')).not.toBeInTheDocument()
163
+ })
153
164
  })
@@ -1,4 +1,4 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react'
1
+ import { useCallback, useRef, useState } from 'react'
2
2
  import { type EditorState } from 'prosemirror-state'
3
3
  import { createRichTextEditor } from '../createRichTextEditor'
4
4
  import { type CommandOrTransaction } from '../types'
@@ -71,17 +71,23 @@ export const useRichTextEditor = (
71
71
 
72
72
  const editorRef = useCallback(
73
73
  (node: HTMLElement) => {
74
- if (node !== null) {
75
- const instance = createRichTextEditor({
76
- node,
77
- initialEditorState: editorState,
78
- onChange: setEditorState,
79
- isEditable: () => editableStatusRef.current,
80
- attributes,
81
- })
82
- destroyEditorRef.current = instance.destroy
83
- dispatchTransactionRef.current = instance.dispatchTransaction
74
+ if (node === null) {
75
+ if (destroyEditorRef.current) {
76
+ destroyEditorRef.current()
77
+ destroyEditorRef.current = undefined
78
+ }
79
+ return
84
80
  }
81
+
82
+ const instance = createRichTextEditor({
83
+ node,
84
+ initialEditorState: editorState,
85
+ onChange: setEditorState,
86
+ isEditable: () => editableStatusRef.current,
87
+ attributes,
88
+ })
89
+ destroyEditorRef.current = instance.destroy
90
+ dispatchTransactionRef.current = instance.dispatchTransaction
85
91
  },
86
92
 
87
93
  // Including editorState in the dependencies here will cause an endless
@@ -91,15 +97,5 @@ export const useRichTextEditor = (
91
97
  [setEditorState, editableStatusRef],
92
98
  )
93
99
 
94
- // Tear down ProseMirror when the consuming component is unmounted
95
- useEffect(
96
- () => () => {
97
- if (destroyEditorRef.current) {
98
- destroyEditorRef.current()
99
- }
100
- },
101
- [destroyEditorRef],
102
- )
103
-
104
100
  return [editorRef, editorState, dispatchTransaction, setEditableStatus]
105
101
  }
@@ -81,6 +81,8 @@ export type SingleSelectProps<Option extends SingleSelectOption = SingleSelectOp
81
81
  } & OverrideClassName<Omit<AriaSelectProps<Option>, OmittedAriaSelectProps>>
82
82
 
83
83
  /**
84
+ * @deprecated SingleSelect is deprecated in v3 and will be replaced in v4.
85
+ *
84
86
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896474/Select Guidance} |
85
87
  * {@link https://cultureamp.design/?path=/docs/components-select--docs Storybook}
86
88
  */
@@ -1,11 +1,13 @@
1
1
  import { Canvas, Meta, Controls, ArgTypes, DocsStory } from '@storybook/blocks'
2
- import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
2
+ import { ResourceLinks, KAIOInstallation, LinkTo, ReplacementNotice } from '~storybook/components'
3
3
  import * as SingleSelectStories from './SingleSelect.stories'
4
4
 
5
- <Meta title="Components/SingleSelect/API Specification" />
5
+ <Meta title="Components/SingleSelect (Deprecated)/API Specification" />
6
6
 
7
7
  # SingleSelect
8
8
 
9
+ <ReplacementNotice isFuture={true} />
10
+
9
11
  <ResourceLinks
10
12
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/SingleSelect"
11
13
  figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=9%3A37837&mode=dev"
@@ -1,11 +1,19 @@
1
1
  import { Canvas, DocsStory, Meta, Controls } from '@storybook/blocks'
2
- import { ResourceLinks, KAIOInstallation, DosAndDonts, DoOrDont } from '~storybook/components'
2
+ import {
3
+ ResourceLinks,
4
+ KAIOInstallation,
5
+ DosAndDonts,
6
+ DoOrDont,
7
+ ReplacementNotice,
8
+ } from '~storybook/components'
3
9
  import * as SingleSelectStories from './SingleSelect.stories'
4
10
 
5
- <Meta title="Components/SingleSelect/Usage Guidelines" />
11
+ <Meta title="Components/SingleSelect (Deprecated)/Usage Guidelines" />
6
12
 
7
13
  # SingleSelect
8
14
 
15
+ <ReplacementNotice isFuture={true} />
16
+
9
17
  <ResourceLinks
10
18
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/SingleSelect"
11
19
  figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=9%3A37837&mode=dev"
@@ -14,7 +14,7 @@ import {
14
14
  const IS_CHROMATIC = isChromatic()
15
15
 
16
16
  export default {
17
- title: 'Components/SingleSelect',
17
+ title: 'Components/SingleSelect (Deprecated)',
18
18
  parameters: {
19
19
  chromatic: { disable: false },
20
20
  controls: { disable: true },
@@ -10,7 +10,7 @@ import { type SingleSelectOption } from '../types'
10
10
  import { groupedMockItems, mixedMockItemsDisabled, singleMockItems } from './mockData'
11
11
 
12
12
  const meta = {
13
- title: 'Components/SingleSelect',
13
+ title: 'Components/SingleSelect (Deprecated)',
14
14
  component: SingleSelect,
15
15
  argTypes: {
16
16
  items: {
@@ -66,49 +66,39 @@ export const TabList = (props: TabListProps): JSX.Element => {
66
66
  return
67
67
  }
68
68
 
69
- let firstTabObserver: IntersectionObserver | null = null
70
- let lastTabObserver: IntersectionObserver | null = null
69
+ const firstTabObserver = new IntersectionObserver(
70
+ (entries) => {
71
+ if (!entries[0].isIntersecting) {
72
+ setLeftArrowEnabled(true)
73
+ return
74
+ }
75
+ setLeftArrowEnabled(false)
76
+ },
77
+ {
78
+ threshold: 0.8,
79
+ root: containerElement,
80
+ },
81
+ )
82
+ firstTabObserver.observe(isRTL ? tabs[tabs.length - 1] : tabs[0])
71
83
 
72
- requestAnimationFrame(() => {
73
- const tabList = tabListRef.current
74
- if (!tabList) {
75
- return
76
- }
77
-
78
- firstTabObserver = new IntersectionObserver(
79
- (entries) => {
80
- if (!entries[0].isIntersecting) {
81
- setLeftArrowEnabled(true)
82
- return
83
- }
84
- setLeftArrowEnabled(false)
85
- },
86
- {
87
- threshold: 0.8,
88
- root: containerElement,
89
- },
90
- )
91
- firstTabObserver.observe(isRTL ? tabs[tabs.length - 1] : tabs[0])
92
-
93
- lastTabObserver = new IntersectionObserver(
94
- (entries) => {
95
- if (!entries[0].isIntersecting) {
96
- setRightArrowEnabled(true)
97
- return
98
- }
99
- setRightArrowEnabled(false)
100
- },
101
- {
102
- threshold: 0.8,
103
- root: containerElement,
104
- },
105
- )
106
- lastTabObserver.observe(isRTL ? tabs[0] : tabs[tabs.length - 1])
107
- })
84
+ const lastTabObserver = new IntersectionObserver(
85
+ (entries) => {
86
+ if (!entries[0].isIntersecting) {
87
+ setRightArrowEnabled(true)
88
+ return
89
+ }
90
+ setRightArrowEnabled(false)
91
+ },
92
+ {
93
+ threshold: 0.8,
94
+ root: containerElement,
95
+ },
96
+ )
97
+ lastTabObserver.observe(isRTL ? tabs[0] : tabs[tabs.length - 1])
108
98
 
109
99
  return () => {
110
- firstTabObserver?.disconnect()
111
- lastTabObserver?.disconnect()
100
+ firstTabObserver.disconnect()
101
+ lastTabObserver.disconnect()
112
102
  }
113
103
  }, [isDocumentReady, containerElement, isRTL, tabListContext?.collection.size])
114
104
 
@@ -4,6 +4,8 @@ import { GenericTile, type GenericTileProps } from '../subcomponents/GenericTile
4
4
  export type InformationTileProps = GenericTileProps
5
5
 
6
6
  /**
7
+ * @deprecated InformationTile is deprecated in v3 and will be removed in v4.
8
+ *
7
9
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#InformationTile%3A Guidance} |
8
10
  * {@link https://cultureamp.design/?path=/docs/components-tiles-informationtile--docs Storybook}
9
11
  */
@@ -1,11 +1,13 @@
1
1
  import { Canvas, Controls, Meta } from '@storybook/blocks'
2
- import { ResourceLinks, KAIOInstallation } from '~storybook/components'
2
+ import { ResourceLinks, KAIOInstallation, RemovalNotice } from '~storybook/components'
3
3
  import * as InformationTileStories from './InformationTile.stories'
4
4
 
5
5
  <Meta of={InformationTileStories} />
6
6
 
7
7
  # InformationTile
8
8
 
9
+ <RemovalNotice />
10
+
9
11
  <ResourceLinks
10
12
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Tile/InformationTile"
11
13
  figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=9%3A37846&t=QliptwSIGF2YVAnx-1"
@@ -4,7 +4,7 @@ import { StickerSheet, type StickerSheetStory } from '~storybook/components/Stic
4
4
  import { InformationTile, type InformationTileProps } from '../index'
5
5
 
6
6
  export default {
7
- title: 'Components/Tiles/InformationTile',
7
+ title: 'Components/Tiles/InformationTile (Deprecated)',
8
8
  parameters: {
9
9
  chromatic: { disable: false },
10
10
  controls: { disable: true },
@@ -3,7 +3,7 @@ import { type Meta, type StoryObj } from '@storybook/react'
3
3
  import { InformationTile } from '../index'
4
4
 
5
5
  const meta = {
6
- title: 'Components/Tiles/InformationTile',
6
+ title: 'Components/Tiles/InformationTile (Deprecated)',
7
7
  component: InformationTile,
8
8
  args: {
9
9
  title: 'Title',
@@ -20,6 +20,8 @@ const renderActions = (primaryAction: TileAction, secondaryAction?: TileAction):
20
20
  )
21
21
 
22
22
  /**
23
+ * @deprecated MultiActionTile is deprecated in v3 and will be removed in v4.
24
+ *
23
25
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#MultiActionTile.1 Guidance} |
24
26
  * {@link https://cultureamp.design/?path=/docs/components-tiles-multiactiontile--docs Storybook}
25
27
  */
@@ -1,11 +1,13 @@
1
1
  import { Canvas, Controls, Meta } from '@storybook/blocks'
2
- import { ResourceLinks, KAIOInstallation } from '~storybook/components'
2
+ import { ResourceLinks, KAIOInstallation, RemovalNotice } from '~storybook/components'
3
3
  import * as MultiActionTileStories from './MultiActionTile.stories'
4
4
 
5
5
  <Meta of={MultiActionTileStories} />
6
6
 
7
7
  # MultiActionTile
8
8
 
9
+ <RemovalNotice />
10
+
9
11
  <ResourceLinks
10
12
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Tile/MultiActionTile"
11
13
  figma="https://www.figma.com/file/ZRfnoNUXbGZv4eVWLbF4Az/%EF%B8%8F%F0%9F%96%BC%EF%B8%8F-Component-Gallery?node-id=9%3A37846&t=QliptwSIGF2YVAnx-1"
@@ -4,7 +4,7 @@ import { StickerSheet, type StickerSheetStory } from '~storybook/components/Stic
4
4
  import { MultiActionTile, type MultiActionTileProps } from '../index'
5
5
 
6
6
  export default {
7
- title: 'Components/Tiles/MultiActionTile',
7
+ title: 'Components/Tiles/MultiActionTile (Deprecated)',
8
8
  parameters: {
9
9
  chromatic: { disable: false },
10
10
  controls: { disable: true },
@@ -3,7 +3,7 @@ import { type Meta, type StoryObj } from '@storybook/react'
3
3
  import { MultiActionTile } from '../index'
4
4
 
5
5
  const meta = {
6
- title: 'Components/Tiles/MultiActionTile',
6
+ title: 'Components/Tiles/MultiActionTile (Deprecated)',
7
7
  component: MultiActionTile,
8
8
  args: {
9
9
  title: 'Title',
@@ -14,6 +14,8 @@ export interface TileGridProps extends OverrideClassName<HTMLAttributes<HTMLULis
14
14
  }
15
15
 
16
16
  /**
17
+ * @deprecated TileGrid is deprecated in v3 and will be removed in v4.
18
+ *
17
19
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#TileGrid Guidance} |
18
20
  * {@link https://cultureamp.design/storybook/?path=/docs/components-tiles-tilegrid--docs Storybook}
19
21
  */
@@ -1,11 +1,13 @@
1
1
  import { Canvas, Controls, Meta } from '@storybook/blocks'
2
- import { ResourceLinks, KAIOInstallation } from '~storybook/components'
2
+ import { ResourceLinks, KAIOInstallation, RemovalNotice } from '~storybook/components'
3
3
  import * as TileGridStories from './TileGrid.stories'
4
4
 
5
5
  <Meta of={TileGridStories} />
6
6
 
7
7
  # TileGrid
8
8
 
9
+ <RemovalNotice />
10
+
9
11
  <ResourceLinks
10
12
  sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Tile/TileGrid"
11
13
  designGuidelines="https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#TileGrid"
@@ -5,7 +5,7 @@ import { StickerSheet, type StickerSheetStory } from '~storybook/components/Stic
5
5
  import { TileGrid } from '../index'
6
6
 
7
7
  export default {
8
- title: 'Components/Tiles/TileGrid',
8
+ title: 'Components/Tiles/TileGrid (Deprecated)',
9
9
  parameters: {
10
10
  chromatic: { disable: false },
11
11
  controls: { disable: true },
@@ -5,7 +5,7 @@ import { InformationTile } from '~components/Tile'
5
5
  import { TileGrid } from '../index'
6
6
 
7
7
  const meta = {
8
- title: 'Components/Tiles/TileGrid',
8
+ title: 'Components/Tiles/TileGrid (Deprecated)',
9
9
  component: TileGrid,
10
10
  args: {
11
11
  children: (
@@ -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
  )
@@ -1,8 +1,4 @@
1
1
  @layer kz-components {
2
- ul {
3
- padding-inline-start: 0;
4
- }
5
-
6
2
  .listItem {
7
3
  font-family: var(--typography-paragraph-body-font-family);
8
4
  font-weight: var(--typography-paragraph-body-font-weight);