@kaizen/components 0.0.0-canary-03-LOGS-titleblock-20251211222949 → 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,15 +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 overflowItems:', overflowItems);
51
- // Only render if we have at least one secondary action AND at least one overflow item to avoid duplicating single menus
52
- if (secondaryConverted.length === 0 || overflowItems.length === 0) return undefined;
48
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined;
53
49
  var combined = tslib.__spreadArray(tslib.__spreadArray([], secondaryConverted, true), overflowItems, true);
54
- console.log('this is combined:', combined);
55
50
  return React__default.default.createElement("div", {
56
51
  className: TitleBlock_module.secondaryOverflowCombinedMenu
57
52
  }, React__default.default.createElement(index.Menu, {
@@ -125,8 +120,6 @@ var SecondaryActions = function (_a) {
125
120
  }) : [];
126
121
  var overflowMenu = renderSecondaryOverflowMenu(secondaryOverflowMenuItems, reversed);
127
122
  var combinedOverflowMenu = renderCombinedSecondaryOverflowMenu(secondaryActions, secondaryOverflowMenuItems, reversed);
128
- console.log('SecondaryActions this is overflowMenu:', overflowMenu);
129
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu);
130
123
  var toolbarItems = tslib.__spreadArray(tslib.__spreadArray(tslib.__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
131
124
  key: 'overflowMenu',
132
125
  node: overflowMenu
@@ -35,15 +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 overflowItems:', overflowItems);
43
- // Only render if we have at least one secondary action AND at least one overflow item to avoid duplicating single menus
44
- if (secondaryConverted.length === 0 || overflowItems.length === 0) return undefined;
40
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined;
45
41
  var combined = __spreadArray(__spreadArray([], secondaryConverted, true), overflowItems, true);
46
- console.log('this is combined:', combined);
47
42
  return /*#__PURE__*/React.createElement("div", {
48
43
  className: styles.secondaryOverflowCombinedMenu
49
44
  }, /*#__PURE__*/React.createElement(Menu, {
@@ -118,8 +113,6 @@ const SecondaryActions = /*#__PURE__*/function () {
118
113
  }) : [];
119
114
  var overflowMenu = renderSecondaryOverflowMenu(secondaryOverflowMenuItems, reversed);
120
115
  var combinedOverflowMenu = renderCombinedSecondaryOverflowMenu(secondaryActions, secondaryOverflowMenuItems, reversed);
121
- console.log('SecondaryActions this is overflowMenu:', overflowMenu);
122
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu);
123
116
  var toolbarItems = __spreadArray(__spreadArray(__spreadArray([], secondaryActionsAsToolbarItems, true), overflowMenu ? [{
124
117
  key: 'overflowMenu',
125
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-03-LOGS-titleblock-20251211222949",
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,18 +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
59
 
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
- if (secondaryConverted.length === 0 || overflowItems.length === 0) return undefined
60
+ if (secondaryConverted.length === 0 && overflowItems.length === 0) return undefined
65
61
  const combined = [...secondaryConverted, ...overflowItems]
66
- console.log('this is combined:', combined)
62
+
67
63
  return (
68
64
  <div className={styles.secondaryOverflowCombinedMenu}>
69
65
  <Menu
@@ -159,9 +155,6 @@ export const SecondaryActions = ({
159
155
  reversed,
160
156
  )
161
157
 
162
- console.log('SecondaryActions this is overflowMenu:', overflowMenu)
163
- console.log('SecondaryActions this is combinedOverflowMenu :', combinedOverflowMenu)
164
-
165
158
  const toolbarItems = [
166
159
  ...secondaryActionsAsToolbarItems,
167
160
  ...(overflowMenu