@kaizen/components 2.2.4 → 2.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.
Files changed (37) hide show
  1. package/dist/cjs/src/MenuV1/index.cjs +4 -3
  2. package/dist/cjs/src/TitleBlock/TitleBlock.cjs +26 -36
  3. package/dist/cjs/src/TitleBlock/TitleBlock.module.scss.cjs +3 -0
  4. package/dist/cjs/src/TitleBlock/subcomponents/MainActions.cjs +90 -45
  5. package/dist/cjs/src/TitleBlock/subcomponents/MainActions.module.scss.cjs +3 -1
  6. package/dist/cjs/src/TitleBlock/subcomponents/SecondaryActions.cjs +51 -14
  7. package/dist/esm/src/MenuV1/index.mjs +5 -3
  8. package/dist/esm/src/TitleBlock/TitleBlock.mjs +27 -37
  9. package/dist/esm/src/TitleBlock/TitleBlock.module.scss.mjs +3 -0
  10. package/dist/esm/src/TitleBlock/subcomponents/MainActions.mjs +92 -47
  11. package/dist/esm/src/TitleBlock/subcomponents/MainActions.module.scss.mjs +3 -1
  12. package/dist/esm/src/TitleBlock/subcomponents/SecondaryActions.mjs +51 -14
  13. package/dist/styles.css +51 -201
  14. package/dist/types/TitleBlock/TitleBlock.d.ts +1 -1
  15. package/dist/types/TitleBlock/subcomponents/MainActions.d.ts +4 -3
  16. package/package.json +1 -1
  17. package/src/TitleBlock/TitleBlock.module.scss +28 -10
  18. package/src/TitleBlock/TitleBlock.spec.tsx +33 -461
  19. package/src/TitleBlock/TitleBlock.tsx +4 -24
  20. package/src/TitleBlock/_docs/TitleBlock.stories.tsx +25 -5
  21. package/src/TitleBlock/_mixins.scss +6 -0
  22. package/src/TitleBlock/subcomponents/MainActions.module.scss +27 -2
  23. package/src/TitleBlock/subcomponents/MainActions.tsx +127 -70
  24. package/src/TitleBlock/subcomponents/SecondaryActions.tsx +105 -45
  25. package/src/TitleBlock/subcomponents/Toolbar.tsx +1 -0
  26. package/dist/cjs/src/MenuV1/subcomponents/MenuHeading/MenuHeading.cjs +0 -27
  27. package/dist/cjs/src/MenuV1/subcomponents/MenuHeading/MenuHeading.module.scss.cjs +0 -6
  28. package/dist/cjs/src/TitleBlock/subcomponents/MobileActions.cjs +0 -306
  29. package/dist/cjs/src/TitleBlock/subcomponents/MobileActions.module.scss.cjs +0 -16
  30. package/dist/esm/src/MenuV1/subcomponents/MenuHeading/MenuHeading.mjs +0 -21
  31. package/dist/esm/src/MenuV1/subcomponents/MenuHeading/MenuHeading.module.scss.mjs +0 -4
  32. package/dist/esm/src/TitleBlock/subcomponents/MobileActions.mjs +0 -300
  33. package/dist/esm/src/TitleBlock/subcomponents/MobileActions.module.scss.mjs +0 -14
  34. package/dist/types/TitleBlock/subcomponents/MobileActions.d.ts +0 -14
  35. package/src/TitleBlock/subcomponents/MobileActions.module.scss +0 -208
  36. package/src/TitleBlock/subcomponents/MobileActions.spec.tsx +0 -210
  37. package/src/TitleBlock/subcomponents/MobileActions.tsx +0 -472
@@ -1,25 +1,105 @@
1
- import { __assign, __spreadArray } from 'tslib';
1
+ import { __spreadArray, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { Button } from '../../ButtonV1/Button/Button.mjs';
4
4
  import { IconButton } from '../../ButtonV1/IconButton/IconButton.mjs';
5
5
  import { Icon } from '../../Icon/Icon.mjs';
6
6
  import { Menu, MenuList } from '../../MenuV1/index.mjs';
7
+ import '../TitleBlock.mjs';
8
+ import './NavigationTabs.mjs';
7
9
  import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from '../constants.mjs';
8
- import { isMenuGroupNotButton } from '../utils.mjs';
10
+ import { createTabletOverflowMenuItems, isMenuGroupNotButton } from '../utils.mjs';
9
11
  import { TitleBlockMenuItem } from './TitleBlockMenuItem.mjs';
10
12
  import { Toolbar } from './Toolbar.mjs';
11
13
  import styles from './MainActions.module.scss.mjs';
14
+ var renderSecondaryAndOverflowMenu = function (secondaryOverflowMenuItems, reversed) {
15
+ if (!secondaryOverflowMenuItems) return undefined;
16
+ return /*#__PURE__*/React.createElement(Menu, {
17
+ align: "right",
18
+ button: /*#__PURE__*/React.createElement(IconButton, {
19
+ label: 'Open secondary and overflow menu',
20
+ reversed: reversed,
21
+ icon: /*#__PURE__*/React.createElement(Icon, {
22
+ name: "more_horiz",
23
+ isPresentational: true
24
+ }),
25
+ id: TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID,
26
+ classNameOverride: styles.overflowMenuButton
27
+ })
28
+ }, /*#__PURE__*/React.createElement(MenuList, null, secondaryOverflowMenuItems.map(function (menuItem, i) {
29
+ return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({
30
+ key: i
31
+ }, menuItem));
32
+ })));
33
+ };
12
34
  const MainActions = /*#__PURE__*/function () {
13
35
  const MainActions = function (_a) {
14
- var _b, _c, _d, _e;
36
+ var _b, _c, _d;
15
37
  var primaryAction = _a.primaryAction,
16
38
  defaultAction = _a.defaultAction,
17
- _f = _a.reversed,
18
- reversed = _f === void 0 ? false : _f,
19
- overflowMenuItems = _a.overflowMenuItems,
20
- _g = _a.showOverflowMenu,
21
- showOverflowMenu = _g === void 0 ? false : _g;
39
+ secondaryActions = _a.secondaryActions,
40
+ secondaryOverflowMenuItems = _a.secondaryOverflowMenuItems,
41
+ _e = _a.reversed,
42
+ reversed = _e === void 0 ? false : _e;
22
43
  var items;
44
+ // Build combined secondary + overflow menu items once, to be spread into the toolbar items
45
+ var secondaryAndOverflowMenu = [];
46
+ // Convert defaultAction to menu item format and prepend to combined list
47
+ var defaultActionMenuItem;
48
+ if (defaultAction) {
49
+ if ('component' in defaultAction) {
50
+ defaultActionMenuItem = defaultAction;
51
+ } else if ('onClick' in defaultAction) {
52
+ defaultActionMenuItem = {
53
+ label: defaultAction.label,
54
+ icon: defaultAction.icon,
55
+ onClick: defaultAction.onClick,
56
+ disabled: defaultAction.disabled
57
+ };
58
+ } else if ('href' in defaultAction) {
59
+ defaultActionMenuItem = {
60
+ label: defaultAction.label,
61
+ icon: defaultAction.icon,
62
+ href: defaultAction.href,
63
+ disabled: defaultAction.disabled
64
+ };
65
+ }
66
+ }
67
+ var combinedSecondaryOverflowItems = createTabletOverflowMenuItems(secondaryActions, secondaryOverflowMenuItems);
68
+ // Prepend defaultAction to the combined list if it exists
69
+ var allMenuItems = defaultActionMenuItem ? __spreadArray([defaultActionMenuItem], combinedSecondaryOverflowItems, true) : combinedSecondaryOverflowItems;
70
+ if (allMenuItems.length > 0) {
71
+ secondaryAndOverflowMenu.push({
72
+ key: 'overflowMenu',
73
+ node: renderSecondaryAndOverflowMenu(allMenuItems, reversed)
74
+ });
75
+ }
76
+ var defaultActionItem = defaultAction ? [{
77
+ key: 'defaultAction',
78
+ node: (/*#__PURE__*/React.createElement(Button, __assign({
79
+ classNameOverride: styles.defaultActionButton
80
+ }, defaultAction, {
81
+ reversed: (_b = defaultAction.reversed) !== null && _b !== void 0 ? _b : reversed,
82
+ "data-automation-id": "title-block-default-action-button",
83
+ "data-testid": "title-block-default-action-button"
84
+ })))
85
+ }] : [];
86
+ var defaultActionItemMinimized = defaultAction ? [{
87
+ key: 'defaultActionMinimized',
88
+ node: (/*#__PURE__*/React.createElement("div", {
89
+ className: styles.defaultActionButtonMinimized
90
+ }, /*#__PURE__*/React.createElement(Menu, {
91
+ align: "right",
92
+ button: /*#__PURE__*/React.createElement(IconButton, {
93
+ label: 'Open default action overflow menu',
94
+ reversed: reversed,
95
+ icon: /*#__PURE__*/React.createElement(Icon, {
96
+ name: "more_horiz",
97
+ isPresentational: true
98
+ }),
99
+ id: TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID
100
+ })
101
+ }, /*#__PURE__*/React.createElement(MenuList, null, defaultActionMenuItem && /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({}, defaultActionMenuItem))))))
102
+ }] : [];
23
103
  if (primaryAction && isMenuGroupNotButton(primaryAction)) {
24
104
  var menuContent = primaryAction.menuItems.map(function (item, idx) {
25
105
  return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({}, item, {
@@ -28,14 +108,7 @@ const MainActions = /*#__PURE__*/function () {
28
108
  "data-testid": "main-action-primary-menu-item-".concat(idx)
29
109
  }));
30
110
  });
31
- items = __spreadArray(__spreadArray([], defaultAction ? [{
32
- key: 'defaultAction',
33
- node: (/*#__PURE__*/React.createElement(Button, __assign({}, defaultAction, {
34
- reversed: (_b = defaultAction.reversed) !== null && _b !== void 0 ? _b : reversed,
35
- "data-automation-id": "title-block-default-action-button",
36
- "data-testid": "title-block-default-action-button"
37
- })))
38
- }] : [], true), primaryAction ? [{
111
+ items = __spreadArray(__spreadArray(__spreadArray([], defaultActionItem, true), defaultActionItemMinimized, true), primaryAction ? [{
39
112
  key: 'primaryAction',
40
113
  node: (/*#__PURE__*/React.createElement(Menu, {
41
114
  align: "right",
@@ -57,18 +130,11 @@ const MainActions = /*#__PURE__*/function () {
57
130
  }, /*#__PURE__*/React.createElement(MenuList, null, menuContent)))
58
131
  }] : [], true);
59
132
  } else {
60
- items = __spreadArray(__spreadArray([], defaultAction ? [{
61
- key: 'defaultAction',
62
- node: (/*#__PURE__*/React.createElement(Button, __assign({}, defaultAction, {
63
- reversed: (_c = defaultAction.reversed) !== null && _c !== void 0 ? _c : reversed,
64
- "data-automation-id": "title-block-default-action-button",
65
- "data-testid": "title-block-default-action-button"
66
- })))
67
- }] : [], true), primaryAction ? [{
133
+ items = __spreadArray(__spreadArray(__spreadArray([], defaultActionItem, true), defaultActionItemMinimized, true), primaryAction ? [{
68
134
  key: 'primaryAction',
69
135
  node: (/*#__PURE__*/React.createElement(Button, __assign({}, primaryAction, {
70
- primary: (_d = primaryAction.primary) !== null && _d !== void 0 ? _d : true,
71
- reversed: (_e = primaryAction.reversed) !== null && _e !== void 0 ? _e : reversed,
136
+ primary: (_c = primaryAction.primary) !== null && _c !== void 0 ? _c : true,
137
+ reversed: (_d = primaryAction.reversed) !== null && _d !== void 0 ? _d : reversed,
72
138
  "data-automation-id": "title-block-primary-action-button",
73
139
  "data-testid": "title-block-primary-action-button",
74
140
  badge: primaryAction.badge ? __assign(__assign({}, primaryAction.badge), {
@@ -77,27 +143,6 @@ const MainActions = /*#__PURE__*/function () {
77
143
  })))
78
144
  }] : [], true);
79
145
  }
80
- if (overflowMenuItems && showOverflowMenu && overflowMenuItems.length > 0) {
81
- items = __spreadArray([{
82
- key: 'overflowMenu',
83
- node: (/*#__PURE__*/React.createElement(Menu, {
84
- align: "right",
85
- button: /*#__PURE__*/React.createElement(IconButton, {
86
- id: TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID,
87
- label: "Open secondary menu",
88
- reversed: reversed,
89
- icon: /*#__PURE__*/React.createElement(Icon, {
90
- name: "more_horiz",
91
- isPresentational: true
92
- })
93
- })
94
- }, /*#__PURE__*/React.createElement(MenuList, null, overflowMenuItems.map(function (menuItem, idx) {
95
- return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({}, menuItem, {
96
- key: "main-action-overflow-item-menu-item-".concat(idx)
97
- }));
98
- }))))
99
- }], items, true);
100
- }
101
146
  return /*#__PURE__*/React.createElement("div", {
102
147
  className: styles.mainActionsContainer
103
148
  }, /*#__PURE__*/React.createElement(Toolbar, {
@@ -1,4 +1,6 @@
1
1
  var styles = {
2
- "mainActionsContainer": "MainActions-module_mainActionsContainer__pk-78"
2
+ "mainActionsContainer": "MainActions-module_mainActionsContainer__pk-78",
3
+ "defaultActionButtonMinimized": "MainActions-module_defaultActionButtonMinimized__XePRS",
4
+ "defaultActionButton": "MainActions-module_defaultActionButton__VbER1"
3
5
  };
4
6
  export { styles as default };
@@ -6,26 +6,57 @@ import { Icon } from '../../Icon/Icon.mjs';
6
6
  import { Menu, MenuList } from '../../MenuV1/index.mjs';
7
7
  import styles from '../TitleBlock.module.scss.mjs';
8
8
  import { TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID } from '../constants.mjs';
9
+ import { convertSecondaryActionsToMenuItems } from '../utils.mjs';
9
10
  import { TitleBlockMenuItem } from './TitleBlockMenuItem.mjs';
10
11
  import { Toolbar } from './Toolbar.mjs';
11
12
  var renderSecondaryOverflowMenu = function (secondaryOverflowMenuItems, reversed) {
12
- if (!secondaryOverflowMenuItems) return undefined;
13
- return /*#__PURE__*/React.createElement(Menu, {
13
+ if (!secondaryOverflowMenuItems || secondaryOverflowMenuItems.length === 0) return undefined;
14
+ return /*#__PURE__*/React.createElement("div", {
15
+ className: styles.secondaryOverflowMenu
16
+ }, /*#__PURE__*/React.createElement(Menu, {
17
+ align: "right",
18
+ button: /*#__PURE__*/React.createElement(Button, {
19
+ secondary: true,
20
+ reversed: reversed,
21
+ label: "Menu",
22
+ "data-automation-id": TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID,
23
+ "data-testid": TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID,
24
+ icon: /*#__PURE__*/React.createElement(Icon, {
25
+ name: "keyboard_arrow_down",
26
+ isPresentational: true
27
+ }),
28
+ iconPosition: 'end'
29
+ })
30
+ }, /*#__PURE__*/React.createElement(MenuList, null, secondaryOverflowMenuItems.map(function (menuItem, i) {
31
+ return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({
32
+ key: i
33
+ }, menuItem));
34
+ }))));
35
+ };
36
+ // New: combined overflow menu (secondary actions converted + overflow menu items)
37
+ var renderCombinedSecondaryOverflowMenu = function (secondaryActions, secondaryOverflowMenuItems, reversed) {
38
+ var secondaryConverted = secondaryActions ? convertSecondaryActionsToMenuItems(secondaryActions) : [];
39
+ var overflowItems = secondaryOverflowMenuItems !== null && secondaryOverflowMenuItems !== void 0 ? secondaryOverflowMenuItems : [];
40
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined;
41
+ var combined = __spreadArray(__spreadArray([], secondaryConverted, true), overflowItems, true);
42
+ return /*#__PURE__*/React.createElement("div", {
43
+ className: styles.secondaryOverflowCombinedMenu
44
+ }, /*#__PURE__*/React.createElement(Menu, {
14
45
  align: "right",
15
46
  button: /*#__PURE__*/React.createElement(IconButton, {
16
- label: "Open secondary menu",
47
+ label: "Open combined secondary + overflow menu",
17
48
  reversed: reversed,
18
49
  icon: /*#__PURE__*/React.createElement(Icon, {
19
50
  name: "more_horiz",
20
51
  isPresentational: true
21
52
  }),
22
- id: TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID
53
+ id: "".concat(TITLE_BLOCK_ZEN_SECONDARY_MENU_HTML_ID, "__combined")
23
54
  })
24
- }, /*#__PURE__*/React.createElement(MenuList, null, secondaryOverflowMenuItems.map(function (menuItem, i) {
55
+ }, /*#__PURE__*/React.createElement(MenuList, null, combined.map(function (menuItem, i) {
25
56
  return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({
26
57
  key: i
27
58
  }, menuItem));
28
- })));
59
+ }))));
29
60
  };
30
61
  // Unfortunately, you'll notice below, that I needed to use the array index,
31
62
  // against react best practices (https://reactjs.org/docs/lists-and-keys.html)
@@ -40,9 +71,10 @@ const SecondaryActions = /*#__PURE__*/function () {
40
71
  var secondaryActionsAsToolbarItems = secondaryActions ? secondaryActions.map(function (action, i) {
41
72
  if ('menuItems' in action) {
42
73
  return {
43
- key: "".concat(i),
44
- // We shouldn't use an index here, see note above
45
- node: (/*#__PURE__*/React.createElement(Menu, {
74
+ key: "titleblock_secondary_action_".concat(i),
75
+ node: (/*#__PURE__*/React.createElement("div", {
76
+ className: styles.secondaryButtonContainer
77
+ }, /*#__PURE__*/React.createElement(Menu, {
46
78
  align: "right",
47
79
  button: /*#__PURE__*/React.createElement(Button, {
48
80
  secondary: true,
@@ -58,7 +90,7 @@ const SecondaryActions = /*#__PURE__*/function () {
58
90
  return /*#__PURE__*/React.createElement(TitleBlockMenuItem, __assign({
59
91
  key: i2
60
92
  }, menuItem));
61
- }))))
93
+ })))))
62
94
  };
63
95
  } else {
64
96
  if ('onClick' in action && 'href' in action) {
@@ -67,21 +99,26 @@ const SecondaryActions = /*#__PURE__*/function () {
67
99
  }
68
100
  return {
69
101
  key: "".concat(i),
70
- // We shouldn't use an index here, see note above
71
- node: (/*#__PURE__*/React.createElement(Button, __assign({
102
+ node: (/*#__PURE__*/React.createElement("div", {
103
+ className: styles.secondaryButtonContainer
104
+ }, /*#__PURE__*/React.createElement(Button, __assign({
72
105
  secondary: true,
73
106
  reversed: reversed
74
107
  }, action, {
75
108
  "data-automation-id": "title-block-secondary-actions-button",
76
109
  "data-testid": "title-block-secondary-actions-button"
77
- })))
110
+ }))))
78
111
  };
79
112
  }
80
113
  }) : [];
81
114
  var overflowMenu = renderSecondaryOverflowMenu(secondaryOverflowMenuItems, reversed);
82
- var toolbarItems = __spreadArray(__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
115
+ var combinedOverflowMenu = renderCombinedSecondaryOverflowMenu(secondaryActions, secondaryOverflowMenuItems, reversed);
116
+ var toolbarItems = __spreadArray(__spreadArray(__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
83
117
  key: 'overflowMenu',
84
118
  node: overflowMenu
119
+ }] : [], true), combinedOverflowMenu ? [{
120
+ key: 'combinedOverflowMenu',
121
+ node: combinedOverflowMenu
85
122
  }] : [], true);
86
123
  return /*#__PURE__*/React.createElement("div", {
87
124
  className: styles.secondaryActionsContainer
package/dist/styles.css CHANGED
@@ -10018,199 +10018,33 @@
10018
10018
  margin-inline-end: 0;
10019
10019
  margin-inline-start: calc(1.5rem / 2);
10020
10020
  }
10021
- @container (max-width: calc(768px - 1px)) {
10022
- .MainActions-module_mainActionsContainer__pk-78 {
10023
- display: none;
10024
- }
10025
- }
10026
- }
10027
- /** THIS IS AN AUTOGENERATED FILE **/
10028
- /** THIS IS AN AUTOGENERATED FILE **/
10029
- /** THIS IS AN AUTOGENERATED FILE **/
10030
- /** THIS IS AN AUTOGENERATED FILE **/
10031
- /** THIS IS AN AUTOGENERATED FILE **/
10032
- /* stylelint-disable scss/at-if-no-null, declaration-block-no-redundant-longhand-properties */
10033
- /** THIS IS AN AUTOGENERATED FILE **/
10034
- /** THIS IS AN AUTOGENERATED FILE **/
10035
- /** THIS IS AN AUTOGENERATED FILE **/
10036
- /** THIS IS AN AUTOGENERATED FILE **/
10037
- /** THIS IS AN AUTOGENERATED FILE **/
10038
- /* 16px */
10039
- /* 16px */
10040
- /* 16px */
10041
- /*
10042
- Because these components are deprecated, we've kept any inline/non-token values as values from the Zen theme to prevent any style regressions,
10043
- as this is what consumers would have expected when pulling them in a the time.
10044
- */
10045
- /* stylelint-enable scss/at-if-no-null, declaration-block-no-redundant-longhand-properties */
10046
- /** THIS IS AN AUTOGENERATED FILE **/
10047
- @layer kz-components {
10048
- /* stylelint-disable no-descending-specificity */
10049
- .MobileActions-module_mobileActionsContainer__XoepA {
10021
+ .MainActions-module_mainActionsContainer__pk-78 .MainActions-module_defaultActionButtonMinimized__XePRS {
10050
10022
  display: none;
10051
- z-index: 1030;
10052
- flex-direction: column;
10053
- position: fixed;
10054
- bottom: 0;
10055
- left: 0;
10056
- right: 0;
10057
- border-start-start-radius: var(--border-solid-border-radius, 7px);
10058
- border-start-end-radius: var(--border-solid-border-radius, 7px);
10059
- -webkit-font-smoothing: antialiased;
10060
- -moz-osx-font-smoothing: grayscale;
10061
- overflow: hidden;
10062
- transform: translateY(calc(100% - 60px));
10063
- transition: 0.4s ease;
10064
- animation: MobileActions-module_slide-up__xezn3 1s ease;
10065
- }
10066
- .MobileActions-module_mobileActionsContainer__XoepA.MobileActions-module_isOpen__D40v5 {
10067
- transform: translateY(0%);
10068
- }
10069
- .MobileActions-module_mobileActionsContainer__XoepA.MobileActions-module_isOpen__D40v5 .MobileActions-module_mobileActionsMenuContainer__x--Eb {
10070
- visibility: visible;
10071
- }
10072
- @container (max-width: calc(768px - 1px)) {
10073
- .MobileActions-module_mobileActionsContainer__XoepA {
10074
- display: flex;
10075
- }
10076
- }
10077
- .MobileActions-module_mobileActionsTopRow__RXNFZ {
10078
- display: flex;
10079
- align-items: center;
10080
- justify-content: space-between;
10081
- height: 60px;
10082
- }
10083
- .MobileActions-module_mobileActionsTopRow__RXNFZ.MobileActions-module_mobileActionsTopRowSingleButton__5EjiI {
10084
- justify-content: center;
10085
- }
10086
- .MobileActions-module_mobileActionsMenuContainer__x--Eb {
10087
- visibility: hidden;
10088
- width: 100%;
10089
- background: var(--color-white, #ffffff);
10090
- padding: var(--spacing-xs, 0.375rem) 0;
10091
- transition: visibility 0.4s;
10092
- }
10093
- .MobileActions-module_drawerHandleIcon__q9ewm {
10094
- display: flex;
10095
- justify-content: center;
10096
- align-items: center;
10097
- margin-inline-end: calc(1.5rem / 2);
10098
- margin-inline-start: 0;
10099
- }
10100
- .MobileActions-module_drawerHandleLabelText__MwJTA + .MobileActions-module_drawerHandleIcon__q9ewm {
10101
10023
  margin-inline-end: 0;
10102
- margin-inline-start: calc(1.5rem / 2);
10103
- }
10104
- .MobileActions-module_mobileActionsPrimaryLabel__8yfuH {
10105
- text-align: left;
10106
- text-decoration: none;
10107
- color: var(--color-white, #ffffff);
10108
- font-family: var(--typography-button-primary-font-family, "Inter", "Noto Sans", Helvetica, Arial, sans-serif);
10109
- font-weight: var(--typography-button-primary-font-weight, 500);
10110
- font-size: var(--typography-button-primary-font-size, 1.125rem);
10111
- line-height: var(--typography-button-primary-line-height, 1.5rem);
10112
- letter-spacing: var(--typography-button-primary-letter-spacing, normal);
10113
- padding-inline-end: 0;
10114
- padding-inline-start: 1.125rem;
10115
- }
10116
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-,
10117
- .MobileActions-module_mobileActionsExpandButton__XuHNU {
10118
- display: flex;
10119
- position: relative;
10120
- justify-content: flex-start;
10121
- align-items: center;
10122
- height: 100%;
10123
- border: 0;
10124
- box-sizing: border-box;
10125
- color: var(--color-white, #ffffff);
10126
- background-color: var(--color-blue-500, #0168b3);
10127
- }
10128
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:focus,
10129
- .MobileActions-module_mobileActionsExpandButton__XuHNU:focus {
10130
- background-color: var(--color-blue-600, #004970);
10131
- outline: none;
10132
- }
10133
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:focus-visible,
10134
- .MobileActions-module_mobileActionsExpandButton__XuHNU:focus-visible {
10135
- height: 52px;
10136
- }
10137
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:focus-visible::after,
10138
- .MobileActions-module_mobileActionsExpandButton__XuHNU:focus-visible::after {
10139
- content: "";
10140
- position: absolute;
10141
- background: transparent;
10142
- border-width: 2px;
10143
- border-style: var(--border-focus-ring-border-style, solid);
10144
- border-color: var(--color-blue-500, #0168b3);
10145
- inset: calc(-1 * calc(var(--border-focus-ring-border-width, 2px) * 2));
10146
- }
10147
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:hover,
10148
- .MobileActions-module_mobileActionsExpandButton__XuHNU:hover {
10149
- text-decoration: none;
10150
- }
10151
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:only-child,
10152
- .MobileActions-module_mobileActionsExpandButton__XuHNU:only-child {
10153
- flex-basis: 100%;
10154
- border-start-start-radius: var(--border-solid-border-radius, 7px);
10155
- border-start-end-radius: var(--border-solid-border-radius, 7px);
10156
- }
10157
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:only-child:focus-visible,
10158
- .MobileActions-module_mobileActionsExpandButton__XuHNU:only-child:focus-visible {
10159
- flex-basis: calc(100% - 8px);
10160
10024
  }
10161
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:only-child:focus-visible::after,
10162
- .MobileActions-module_mobileActionsExpandButton__XuHNU:only-child:focus-visible::after {
10163
- border-start-start-radius: var(--border-focus-ring-border-radius, 10px);
10164
- border-start-end-radius: var(--border-focus-ring-border-radius, 10px);
10165
- }
10166
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:not(:only-child) {
10167
- flex: 0 0 calc(100% - 3.75rem);
10168
- }
10169
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:not(:only-child):focus-visible {
10170
- flex-basis: calc(100% - 3.75rem - 8px);
10171
- margin-left: 4px;
10172
- border-start-start-radius: var(--border-solid-border-radius, 7px);
10173
- }
10174
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:not(:only-child):focus-visible + .MobileActions-module_mobileActionsExpandButton__XuHNU {
10175
- border-color: var(--color-white, #ffffff);
10176
- }
10177
- .MobileActions-module_mobileActionsPrimaryButton__Xsvo-:not(:only-child):focus-visible::after {
10178
- border-start-start-radius: var(--border-focus-ring-border-radius, 10px);
10179
- }
10180
- .MobileActions-module_mobileActionsExpandButton__XuHNU:not(:only-child) {
10181
- flex: 0 0 3.75rem;
10182
- border-left: 2px solid var(--color-blue-200, #bde2f5);
10183
- justify-content: center;
10184
- }
10185
- .MobileActions-module_mobileActionsExpandButton__XuHNU:not(:only-child):focus-visible {
10186
- border-color: var(--color-white, #ffffff);
10187
- flex-basis: calc(3.75rem - 8px);
10188
- margin-right: 4px;
10189
- border-start-end-radius: var(--border-solid-border-radius, 7px);
10190
- }
10191
- .MobileActions-module_mobileActionsExpandButton__XuHNU:not(:only-child):focus-visible::after {
10192
- border-start-end-radius: var(--border-focus-ring-border-radius, 10px);
10193
- }
10194
- .MobileActions-module_mobileActionsChevronSquare__SPIsI {
10195
- display: flex;
10196
- justify-content: center;
10197
- align-items: center;
10198
- height: 100%;
10199
- position: absolute;
10200
- inset-inline-end: 20px;
10201
- inset-inline-start: auto;
10202
- }
10203
- /* stylelint-enable no-descending-specificity */
10204
- }
10205
- @keyframes MobileActions-module_slide-up__xezn3 {
10206
- 0% {
10207
- transform: translateY(100%);
10208
- }
10209
- 50% {
10210
- transform: translateY(100%);
10211
- }
10212
- 100% {
10213
- transform: translateY(calc(100% - 60px));
10025
+ @container (max-width: 511px) {
10026
+ .MainActions-module_mainActionsContainer__pk-78 {
10027
+ padding-top: 12px;
10028
+ justify-content: flex-start;
10029
+ padding-left: 1.25rem;
10030
+ }
10031
+ @media (max-width: 511px) {
10032
+ .MainActions-module_mainActionsContainer__pk-78 {
10033
+ padding-top: 0;
10034
+ padding-left: 3.375rem;
10035
+ }
10036
+ }
10037
+ @media (max-width: 360px) {
10038
+ .MainActions-module_mainActionsContainer__pk-78 .MainActions-module_defaultActionButton__VbER1 {
10039
+ display: none;
10040
+ margin-inline-end: 0;
10041
+ }
10042
+ .MainActions-module_mainActionsContainer__pk-78 .MainActions-module_defaultActionButtonMinimized__XePRS {
10043
+ display: flex;
10044
+ margin-inline-end: 3px;
10045
+ margin-left: -0.5rem;
10046
+ }
10047
+ }
10214
10048
  }
10215
10049
  }
10216
10050
  /** THIS IS AN AUTOGENERATED FILE **/
@@ -10289,6 +10123,11 @@
10289
10123
  .TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_titleRowInner__SlArS {
10290
10124
  border-bottom: 1px solid var(--color-gray-300, #eaeaec);
10291
10125
  }
10126
+ @container (max-width: 511px) {
10127
+ .TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_titleRowInner__SlArS {
10128
+ padding-bottom: 12px;
10129
+ }
10130
+ }
10292
10131
  .TitleBlock-module_titleRowInnerContent__NhTHV {
10293
10132
  position: relative;
10294
10133
  display: flex;
@@ -10309,6 +10148,11 @@
10309
10148
  border-bottom: none;
10310
10149
  }
10311
10150
  }
10151
+ @container (max-width: 511px) {
10152
+ .TitleBlock-module_titleRowInnerContent__NhTHV {
10153
+ flex-wrap: wrap;
10154
+ }
10155
+ }
10312
10156
  .TitleBlock-module_title__c5JWR {
10313
10157
  display: flex;
10314
10158
  align-items: center;
@@ -10391,10 +10235,10 @@
10391
10235
  }
10392
10236
  @container (max-width: calc(1080px - 1px)) {
10393
10237
  .TitleBlock-module_titleTextOverride__VhhQU.TitleBlock-module_titleTextOverride__VhhQU {
10394
- font-size: var(--typography-heading-4-font-size, 1.125rem);
10395
- line-height: var(--typography-heading-4-line-height, 1.5rem);
10396
- letter-spacing: var(--typography-heading-4-letter-spacing, normal);
10397
- padding: 0;
10238
+ font-size: var(--typography-heading-3-font-size, 1.375rem);
10239
+ line-height: var(--typography-heading-3-line-height, 1.875rem);
10240
+ letter-spacing: var(--typography-heading-3-letter-spacing, normal);
10241
+ padding: 8px 0;
10398
10242
  }
10399
10243
  }
10400
10244
  .TitleBlock-module_avatar__mEjJ8 {
@@ -10429,7 +10273,6 @@
10429
10273
  @container (max-width: calc(1080px - 1px)) {
10430
10274
  .TitleBlock-module_hamburger__qe4R0 {
10431
10275
  display: flex;
10432
- align-items: center;
10433
10276
  }
10434
10277
  }
10435
10278
  .TitleBlock-module_subtitle__AI9tj {
@@ -10665,10 +10508,17 @@
10665
10508
  .TitleBlock-module_lightVariant__1EeLV .TitleBlock-module_secondaryActionsContainer__-4q0l, .TitleBlock-module_educationVariant__YvpWa .TitleBlock-module_secondaryActionsContainer__-4q0l, .TitleBlock-module_adminVariant__s95nS .TitleBlock-module_secondaryActionsContainer__-4q0l {
10666
10509
  color: var(--color-blue-500, #0168b3);
10667
10510
  }
10511
+ .TitleBlock-module_secondaryActionsContainer__-4q0l .TitleBlock-module_secondaryOverflowCombinedMenu__CTddK {
10512
+ display: none;
10513
+ }
10668
10514
  @container (max-width: calc(1080px - 1px)) {
10669
- .TitleBlock-module_secondaryActionsContainer__-4q0l {
10515
+ .TitleBlock-module_secondaryActionsContainer__-4q0l .TitleBlock-module_secondaryButtonContainer__xFL9X,
10516
+ .TitleBlock-module_secondaryActionsContainer__-4q0l .TitleBlock-module_secondaryOverflowMenu__gvmgW {
10670
10517
  display: none;
10671
10518
  }
10519
+ .TitleBlock-module_secondaryActionsContainer__-4q0l .TitleBlock-module_secondaryOverflowCombinedMenu__CTddK {
10520
+ display: flex;
10521
+ }
10672
10522
  }
10673
10523
  .TitleBlock-module_breadcrumb__lVNKz {
10674
10524
  appearance: none;
@@ -10717,11 +10567,6 @@
10717
10567
  }
10718
10568
  }
10719
10569
  }
10720
- @container (max-width: calc(1080px - 1px)) {
10721
- .TitleBlock-module_breadcrumb__lVNKz {
10722
- display: none;
10723
- }
10724
- }
10725
10570
  .TitleBlock-module_breadcrumbTextLink__ngx82 {
10726
10571
  clip-path: rect(0 0 0 0);
10727
10572
  height: 1px;
@@ -10815,6 +10660,11 @@
10815
10660
  color: var(--color-blue-500, #0168b3);
10816
10661
  background-color: rgba(var(--color-blue-500-rgb, 1, 104, 179), 0.1);
10817
10662
  }
10663
+ @container (max-width: calc(1080px - 1px)) {
10664
+ .TitleBlock-module_circle__68z-T {
10665
+ display: none;
10666
+ }
10667
+ }
10818
10668
  /* stylelint-enable no-descending-specificity */
10819
10669
  }
10820
10670
  @keyframes TitleBlock-module_slide-fade__o5TnP {
@@ -4,6 +4,6 @@ import { type TitleBlockProps } from './types';
4
4
  * {@link https://cultureamp.design/?path=/docs/components-titleblock-api-specification--docs Storybook}
5
5
  */
6
6
  export declare const TitleBlock: {
7
- ({ title, variant, breadcrumb, avatar, subtitle, sectionTitle, sectionTitleDescription, renderSectionTitle, pageSwitcherSelect, handleHamburgerClick, primaryAction, defaultAction, secondaryActions, secondaryOverflowMenuItems, navigationTabs, collapseNavigationAreaWhenPossible, textDirection, surveyStatus, id, titleAutomationId, avatarAutomationId, subtitleAutomationId, sectionTitleAutomationId, sectionTitleDescriptionAutomationId, breadcrumbAutomationId, breadcrumbTextAutomationId, autoHideMobileActionsMenu, }: TitleBlockProps): JSX.Element;
7
+ ({ title, variant, breadcrumb, avatar, subtitle, sectionTitle, sectionTitleDescription, renderSectionTitle, pageSwitcherSelect, handleHamburgerClick, primaryAction, defaultAction, secondaryActions, secondaryOverflowMenuItems, navigationTabs, collapseNavigationAreaWhenPossible, textDirection, surveyStatus, id, titleAutomationId, avatarAutomationId, subtitleAutomationId, sectionTitleAutomationId, sectionTitleDescriptionAutomationId, breadcrumbAutomationId, breadcrumbTextAutomationId, }: TitleBlockProps): JSX.Element;
8
8
  displayName: string;
9
9
  };
@@ -1,13 +1,14 @@
1
- import { type DefaultActionProps, type PrimaryActionProps, type TitleBlockMenuItemProps } from '../types';
1
+ import { type DefaultActionProps, type PrimaryActionProps, type SecondaryActionsProps, type TitleBlockMenuItemProps } from '../types';
2
2
  type MainActionsProps = {
3
3
  primaryAction?: PrimaryActionProps;
4
4
  defaultAction?: DefaultActionProps;
5
5
  reversed?: boolean;
6
- overflowMenuItems?: TitleBlockMenuItemProps[];
6
+ secondaryActions?: SecondaryActionsProps;
7
+ secondaryOverflowMenuItems?: TitleBlockMenuItemProps[];
7
8
  showOverflowMenu?: boolean;
8
9
  };
9
10
  export declare const MainActions: {
10
- ({ primaryAction, defaultAction, reversed, overflowMenuItems, showOverflowMenu, }: MainActionsProps): JSX.Element;
11
+ ({ primaryAction, defaultAction, secondaryActions, secondaryOverflowMenuItems, reversed, }: MainActionsProps): JSX.Element;
11
12
  displayName: string;
12
13
  };
13
14
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "2.2.4",
3
+ "version": "2.3.0",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",