@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
@@ -1,5 +1,5 @@
1
1
  import { __assign } from 'tslib';
2
- import { useState, useRef, useCallback, useEffect } from 'react';
2
+ import { useState, useRef, useCallback } from 'react';
3
3
  import { createRichTextEditor } from '../createRichTextEditor.mjs';
4
4
 
5
5
  /**
@@ -46,33 +46,30 @@ attributes, options) {
46
46
  // eslint-disable-next-line react-hooks/exhaustive-deps
47
47
  [editableStatusRef]);
48
48
  var editorRef = useCallback(function (node) {
49
- if (node !== null) {
50
- var instance = createRichTextEditor({
51
- node: node,
52
- initialEditorState: editorState,
53
- onChange: setEditorState,
54
- isEditable: function () {
55
- return editableStatusRef.current;
56
- },
57
- attributes: attributes
58
- });
59
- destroyEditorRef.current = instance.destroy;
60
- dispatchTransactionRef.current = instance.dispatchTransaction;
49
+ if (node === null) {
50
+ if (destroyEditorRef.current) {
51
+ destroyEditorRef.current();
52
+ destroyEditorRef.current = undefined;
53
+ }
54
+ return;
61
55
  }
56
+ var instance = createRichTextEditor({
57
+ node: node,
58
+ initialEditorState: editorState,
59
+ onChange: setEditorState,
60
+ isEditable: function () {
61
+ return editableStatusRef.current;
62
+ },
63
+ attributes: attributes
64
+ });
65
+ destroyEditorRef.current = instance.destroy;
66
+ dispatchTransactionRef.current = instance.dispatchTransaction;
62
67
  },
63
68
  // Including editorState in the dependencies here will cause an endless
64
69
  // loop as the initialization changes its value
65
70
  // @todo: Fix if possible - avoiding breaking in eslint upgrade
66
71
  // eslint-disable-next-line react-hooks/exhaustive-deps
67
72
  [setEditorState, editableStatusRef]);
68
- // Tear down ProseMirror when the consuming component is unmounted
69
- useEffect(function () {
70
- return function () {
71
- if (destroyEditorRef.current) {
72
- destroyEditorRef.current();
73
- }
74
- };
75
- }, [destroyEditorRef]);
76
73
  return [editorRef, editorState, dispatchTransaction, setEditableStatus];
77
74
  };
78
75
  export { useRichTextEditor };
@@ -22,6 +22,8 @@ import { transformSelectItemToCollectionElement } from './utils/transformSelectI
22
22
  import styles from './SingleSelect.module.scss.mjs';
23
23
 
24
24
  /**
25
+ * @deprecated SingleSelect is deprecated in v3 and will be replaced in v4.
26
+ *
25
27
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3081896474/Select Guidance} |
26
28
  * {@link https://cultureamp.design/?path=/docs/components-select--docs Storybook}
27
29
  */
@@ -54,39 +54,31 @@ var TabList = function (props) {
54
54
  if (!tabs || tabs.length === 0) {
55
55
  return;
56
56
  }
57
- var firstTabObserver = null;
58
- var lastTabObserver = null;
59
- requestAnimationFrame(function () {
60
- var tabList = tabListRef.current;
61
- if (!tabList) {
57
+ var firstTabObserver = new IntersectionObserver(function (entries) {
58
+ if (!entries[0].isIntersecting) {
59
+ setLeftArrowEnabled(true);
62
60
  return;
63
61
  }
64
- firstTabObserver = new IntersectionObserver(function (entries) {
65
- if (!entries[0].isIntersecting) {
66
- setLeftArrowEnabled(true);
67
- return;
68
- }
69
- setLeftArrowEnabled(false);
70
- }, {
71
- threshold: 0.8,
72
- root: containerElement
73
- });
74
- firstTabObserver.observe(isRTL$1 ? tabs[tabs.length - 1] : tabs[0]);
75
- lastTabObserver = new IntersectionObserver(function (entries) {
76
- if (!entries[0].isIntersecting) {
77
- setRightArrowEnabled(true);
78
- return;
79
- }
80
- setRightArrowEnabled(false);
81
- }, {
82
- threshold: 0.8,
83
- root: containerElement
84
- });
85
- lastTabObserver.observe(isRTL$1 ? tabs[0] : tabs[tabs.length - 1]);
62
+ setLeftArrowEnabled(false);
63
+ }, {
64
+ threshold: 0.8,
65
+ root: containerElement
86
66
  });
67
+ firstTabObserver.observe(isRTL$1 ? tabs[tabs.length - 1] : tabs[0]);
68
+ var lastTabObserver = new IntersectionObserver(function (entries) {
69
+ if (!entries[0].isIntersecting) {
70
+ setRightArrowEnabled(true);
71
+ return;
72
+ }
73
+ setRightArrowEnabled(false);
74
+ }, {
75
+ threshold: 0.8,
76
+ root: containerElement
77
+ });
78
+ lastTabObserver.observe(isRTL$1 ? tabs[0] : tabs[tabs.length - 1]);
87
79
  return function () {
88
- firstTabObserver === null || firstTabObserver === void 0 ? void 0 : firstTabObserver.disconnect();
89
- lastTabObserver === null || lastTabObserver === void 0 ? void 0 : lastTabObserver.disconnect();
80
+ firstTabObserver.disconnect();
81
+ lastTabObserver.disconnect();
90
82
  };
91
83
  }, [isDocumentReady, containerElement, isRTL$1, tabListContext === null || tabListContext === void 0 ? void 0 : tabListContext.collection.size]);
92
84
  useEffect(function () {
@@ -3,6 +3,8 @@ import React from 'react';
3
3
  import { GenericTile } from '../subcomponents/GenericTile/GenericTile.mjs';
4
4
 
5
5
  /**
6
+ * @deprecated InformationTile is deprecated in v3 and will be removed in v4.
7
+ *
6
8
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#InformationTile%3A Guidance} |
7
9
  * {@link https://cultureamp.design/?path=/docs/components-tiles-informationtile--docs Storybook}
8
10
  */
@@ -14,6 +14,8 @@ var renderActions = function (primaryAction, secondaryAction) {
14
14
  }, secondaryAction)))), /*#__PURE__*/React.createElement(Button, __assign({}, primaryAction)));
15
15
  };
16
16
  /**
17
+ * @deprecated MultiActionTile is deprecated in v3 and will be removed in v4.
18
+ *
17
19
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#MultiActionTile.1 Guidance} |
18
20
  * {@link https://cultureamp.design/?path=/docs/components-tiles-multiactiontile--docs Storybook}
19
21
  */
@@ -4,6 +4,8 @@ import classnames from 'classnames';
4
4
  import styles from './TileGrid.module.scss.mjs';
5
5
 
6
6
  /**
7
+ * @deprecated TileGrid is deprecated in v3 and will be removed in v4.
8
+ *
7
9
  * {@link https://cultureamp.atlassian.net/wiki/spaces/DesignSystem/pages/3079077889/Tile#TileGrid Guidance} |
8
10
  * {@link https://cultureamp.design/storybook/?path=/docs/components-tiles-tilegrid--docs Storybook}
9
11
  */
@@ -17,9 +17,9 @@ var ClearButton = function (_a) {
17
17
  fieldLabel = _c.fieldLabel;
18
18
  var formatMessage = useIntl().formatMessage;
19
19
  var clearButtonAlt = formatMessage({
20
- id: 'singleSelect.clearButtonAlt',
21
- defaultMessage: 'Clear {field} selection',
22
- description: 'Alt text for the clear selection button'
20
+ id: 'singleSelect.clearButtonAlt_v2',
21
+ defaultMessage: 'Clear selection: {field}',
22
+ description: '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.'
23
23
  }, {
24
24
  field: fieldLabel
25
25
  });