@kaizen/components 0.0.0-canary-04-titleblock-logic-20251211225600 → 0.0.0-canary-05-titleblock-20251212010438

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.
@@ -43,17 +43,10 @@ var renderSecondaryOverflowMenu = function (secondaryOverflowMenuItems, reversed
43
43
  };
44
44
  // New: combined overflow menu (secondary actions converted + overflow menu items)
45
45
  var renderCombinedSecondaryOverflowMenu = function (secondaryActions, secondaryOverflowMenuItems, reversed) {
46
- console.log('this is renderCombinedSecondaryOverflowMenu called');
47
46
  var secondaryConverted = secondaryActions ? utils.convertSecondaryActionsToMenuItems(secondaryActions) : [];
48
47
  var overflowItems = secondaryOverflowMenuItems !== null && secondaryOverflowMenuItems !== void 0 ? secondaryOverflowMenuItems : [];
49
- console.log('this is secondaryConverted', secondaryConverted);
50
- console.log('this is secondaryConverted:', secondaryConverted);
51
- console.log('this is overflowItems:', overflowItems);
52
- // Only render if we have at least one secondary action AND at least one overflow item to avoid duplicating single menus
53
- // || overflowItems.length === 0
54
- if (secondaryConverted.length === 0) return undefined;
48
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined;
55
49
  var combined = tslib.__spreadArray(tslib.__spreadArray([], secondaryConverted, true), overflowItems, true);
56
- console.log('this is combined:', combined);
57
50
  return React__default.default.createElement("div", {
58
51
  className: TitleBlock_module.secondaryOverflowCombinedMenu
59
52
  }, React__default.default.createElement(index.Menu, {
@@ -127,8 +120,6 @@ var SecondaryActions = function (_a) {
127
120
  }) : [];
128
121
  var overflowMenu = renderSecondaryOverflowMenu(secondaryOverflowMenuItems, reversed);
129
122
  var combinedOverflowMenu = renderCombinedSecondaryOverflowMenu(secondaryActions, secondaryOverflowMenuItems, reversed);
130
- console.log('SecondaryActions this is overflowMenu:', overflowMenu);
131
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu);
132
123
  var toolbarItems = tslib.__spreadArray(tslib.__spreadArray(tslib.__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
133
124
  key: 'overflowMenu',
134
125
  node: overflowMenu
@@ -35,17 +35,10 @@ var renderSecondaryOverflowMenu = function (secondaryOverflowMenuItems, reversed
35
35
  };
36
36
  // New: combined overflow menu (secondary actions converted + overflow menu items)
37
37
  var renderCombinedSecondaryOverflowMenu = function (secondaryActions, secondaryOverflowMenuItems, reversed) {
38
- console.log('this is renderCombinedSecondaryOverflowMenu called');
39
38
  var secondaryConverted = secondaryActions ? convertSecondaryActionsToMenuItems(secondaryActions) : [];
40
39
  var overflowItems = secondaryOverflowMenuItems !== null && secondaryOverflowMenuItems !== void 0 ? secondaryOverflowMenuItems : [];
41
- console.log('this is secondaryConverted', secondaryConverted);
42
- console.log('this is secondaryConverted:', secondaryConverted);
43
- console.log('this is overflowItems:', overflowItems);
44
- // Only render if we have at least one secondary action AND at least one overflow item to avoid duplicating single menus
45
- // || overflowItems.length === 0
46
- if (secondaryConverted.length === 0) return undefined;
40
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined;
47
41
  var combined = __spreadArray(__spreadArray([], secondaryConverted, true), overflowItems, true);
48
- console.log('this is combined:', combined);
49
42
  return /*#__PURE__*/React.createElement("div", {
50
43
  className: styles.secondaryOverflowCombinedMenu
51
44
  }, /*#__PURE__*/React.createElement(Menu, {
@@ -120,8 +113,6 @@ const SecondaryActions = /*#__PURE__*/function () {
120
113
  }) : [];
121
114
  var overflowMenu = renderSecondaryOverflowMenu(secondaryOverflowMenuItems, reversed);
122
115
  var combinedOverflowMenu = renderCombinedSecondaryOverflowMenu(secondaryActions, secondaryOverflowMenuItems, reversed);
123
- console.log('SecondaryActions this is overflowMenu:', overflowMenu);
124
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu);
125
116
  var toolbarItems = __spreadArray(__spreadArray(__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
126
117
  key: 'overflowMenu',
127
118
  node: overflowMenu
package/dist/styles.css CHANGED
@@ -148,6 +148,7 @@
148
148
  font-family: var(--typography-heading-1-font-family);
149
149
  font-weight: var(--typography-heading-1-font-weight);
150
150
  letter-spacing: var(--typography-heading-3-letter-spacing);
151
+ overflow-wrap: normal;
151
152
  }
152
153
 
153
154
  .Avatar-module_initials__85roP.Avatar-module_longName__02zNk::before {
@@ -10522,6 +10523,11 @@
10522
10523
  display: flex;
10523
10524
  }
10524
10525
  }
10526
+ @container (max-width: calc(768px - 1px)) {
10527
+ .TitleBlock-module_secondaryActionsContainer__-4q0l {
10528
+ margin-top: -3px;
10529
+ }
10530
+ }
10525
10531
  .TitleBlock-module_breadcrumb__lVNKz {
10526
10532
  appearance: none;
10527
10533
  display: inline;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "0.0.0-canary-04-titleblock-logic-20251211225600",
3
+ "version": "0.0.0-canary-05-titleblock-20251212010438",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -95,6 +95,7 @@
95
95
  font-family: var(--typography-heading-1-font-family);
96
96
  font-weight: var(--typography-heading-1-font-weight);
97
97
  letter-spacing: var(--typography-heading-3-letter-spacing);
98
+ overflow-wrap: normal;
98
99
  }
99
100
 
100
101
  .initials.longName::before {
@@ -541,6 +541,10 @@
541
541
  display: flex;
542
542
  }
543
543
  }
544
+
545
+ @include title-block-small {
546
+ margin-top: -3px;
547
+ }
544
548
  }
545
549
 
546
550
  .breadcrumb {
@@ -121,6 +121,33 @@ export const Viewports: Story = {
121
121
  },
122
122
  }
123
123
 
124
+ export const WithNoSecondaryOverflow: Story = {
125
+ parameters: {
126
+ viewport: {
127
+ viewports: {
128
+ default: {
129
+ name: 'Above or equal to 1366',
130
+ styles: { width: '1366px', height: '800px' },
131
+ type: 'desktop',
132
+ },
133
+ under1366: {
134
+ name: 'Under 1366',
135
+ styles: { width: '1365px', height: '800px' },
136
+ type: 'desktop',
137
+ },
138
+ },
139
+ defaultViewport: 'default',
140
+ },
141
+ chromatic: {
142
+ disable: false,
143
+ viewports: [1365, 1366, 760, 360],
144
+ },
145
+ },
146
+ args: {
147
+ title: 'Test no secondary overflow menu items',
148
+ secondaryOverflowMenuItems: undefined,
149
+ },
150
+ }
124
151
  export const HasLongTitle: Story = {
125
152
  parameters: {
126
153
  viewport: {
@@ -140,7 +167,7 @@ export const HasLongTitle: Story = {
140
167
  },
141
168
  chromatic: {
142
169
  disable: false,
143
- viewports: [1365, 1366],
170
+ viewports: [1365, 1366, 760, 360],
144
171
  },
145
172
  },
146
173
  args: { title: 'A long title with over thirty characters' },
@@ -52,20 +52,14 @@ const renderCombinedSecondaryOverflowMenu = (
52
52
  secondaryOverflowMenuItems?: TitleBlockMenuItemProps[],
53
53
  reversed?: boolean,
54
54
  ): JSX.Element | undefined => {
55
- console.log('this is renderCombinedSecondaryOverflowMenu called')
56
55
  const secondaryConverted = secondaryActions
57
56
  ? convertSecondaryActionsToMenuItems(secondaryActions)
58
57
  : []
59
58
  const overflowItems = secondaryOverflowMenuItems ?? []
60
- console.log('this is secondaryConverted', secondaryConverted)
61
- console.log('this is secondaryConverted:', secondaryConverted)
62
- console.log('this is overflowItems:', overflowItems)
63
- // Only render if we have at least one secondary action AND at least one overflow item to avoid duplicating single menus
64
59
 
65
- // || overflowItems.length === 0
66
- if (secondaryConverted.length === 0) return undefined
60
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined
67
61
  const combined = [...secondaryConverted, ...overflowItems]
68
- console.log('this is combined:', combined)
62
+
69
63
  return (
70
64
  <div className={styles.secondaryOverflowCombinedMenu}>
71
65
  <Menu
@@ -161,9 +155,6 @@ export const SecondaryActions = ({
161
155
  reversed,
162
156
  )
163
157
 
164
- console.log('SecondaryActions this is overflowMenu:', overflowMenu)
165
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu)
166
-
167
158
  const toolbarItems = [
168
159
  ...secondaryActionsAsToolbarItems,
169
160
  ...(overflowMenu