@kaizen/components 0.0.0-canary-react-19-peer-20250303031741 → 0.0.0-canary-add-length-check-for-tabs-20250313022700

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/Modal/ConfirmationModal/ConfirmationModal.cjs +4 -2
  2. package/dist/cjs/Modal/ContextModal/ContextModal.cjs +4 -2
  3. package/dist/cjs/Modal/GenericModal/GenericModal.cjs +4 -2
  4. package/dist/cjs/Modal/InputEditModal/InputEditModal.cjs +12 -14
  5. package/dist/cjs/Modal/InputEditModal/InputEditModal.module.scss.cjs +0 -1
  6. package/dist/cjs/__next__/Tabs/subcomponents/TabList/TabList.cjs +1 -1
  7. package/dist/esm/Modal/ConfirmationModal/ConfirmationModal.mjs +4 -2
  8. package/dist/esm/Modal/ContextModal/ContextModal.mjs +4 -2
  9. package/dist/esm/Modal/GenericModal/GenericModal.mjs +4 -2
  10. package/dist/esm/Modal/InputEditModal/InputEditModal.mjs +12 -14
  11. package/dist/esm/Modal/InputEditModal/InputEditModal.module.scss.mjs +0 -1
  12. package/dist/esm/__next__/Tabs/subcomponents/TabList/TabList.mjs +1 -1
  13. package/dist/styles.css +1820 -1823
  14. package/dist/types/Modal/ConfirmationModal/ConfirmationModal.d.ts +1 -1
  15. package/dist/types/Modal/ContextModal/ContextModal.d.ts +1 -1
  16. package/dist/types/Modal/GenericModal/GenericModal.d.ts +2 -1
  17. package/dist/types/Modal/InputEditModal/InputEditModal.d.ts +1 -2
  18. package/dist/types/SplitButton/subcomponents/BaseButton/BaseButton.d.ts +1 -1
  19. package/package.json +6 -6
  20. package/src/AvatarGroup/AvatarGroup.tsx +1 -1
  21. package/src/Content/Content.module.scss +3 -1
  22. package/src/Modal/ConfirmationModal/ConfirmationModal.module.scss +6 -6
  23. package/src/Modal/ConfirmationModal/ConfirmationModal.tsx +2 -0
  24. package/src/Modal/ContextModal/ContextModal.module.scss +2 -2
  25. package/src/Modal/ContextModal/ContextModal.tsx +2 -0
  26. package/src/Modal/GenericModal/GenericModal.module.scss +1 -1
  27. package/src/Modal/GenericModal/GenericModal.tsx +3 -0
  28. package/src/Modal/GenericModal/subcomponents/ModalAccessibleLabel/ModalAccessibleLabel.module.scss +1 -1
  29. package/src/Modal/GenericModal/subcomponents/ModalFooter/ModalFooter.module.scss +5 -5
  30. package/src/Modal/GenericModal/subcomponents/ModalHeader/ModalHeader.module.scss +2 -2
  31. package/src/Modal/InputEditModal/InputEditModal.module.scss +1 -5
  32. package/src/Modal/InputEditModal/InputEditModal.tsx +5 -16
  33. package/src/SplitButton/subcomponents/BaseButton/BaseButton.tsx +1 -1
  34. package/src/Tag/Tag.tsx +1 -1
  35. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +1 -1
  36. package/src/TitleBlockZen/TitleBlockZen.tsx +1 -1
  37. package/src/__next__/Tabs/subcomponents/TabList/TabList.tsx +1 -1
@@ -53,7 +53,7 @@ export type ConfirmationModalProps = BaseConfirmationModalProps & (ConfirmationM
53
53
  * {@link https://cultureamp.design/?path=/docs/components-modals-confirmationmodal--docs Storybook}
54
54
  */
55
55
  export declare const ConfirmationModal: {
56
- ({ isOpen, isProminent, unpadded, mood, variant, title, onConfirm, onAfterLeave, onAfterEnter, confirmLabel, dismissLabel, confirmWorking, onDismiss: propsOnDismiss, children, ...props }: ConfirmationModalProps): JSX.Element;
56
+ ({ isOpen, isProminent, unpadded, mood, variant, title, onConfirm, onAfterLeave, onAfterEnter, confirmLabel, dismissLabel, confirmWorking, onDismiss: propsOnDismiss, children, className, ...props }: ConfirmationModalProps): JSX.Element;
57
57
  displayName: string;
58
58
  };
59
59
  export {};
@@ -39,6 +39,6 @@ export type ContextModalProps = Readonly<{
39
39
  * {@link https://cultureamp.design/?path=/docs/components-modals--contextmodal--docs Storybook}
40
40
  */
41
41
  export declare const ContextModal: {
42
- ({ isOpen, unpadded, layout, title, onConfirm, onDismiss: propsOnDismiss, onAfterLeave, onAfterEnter, confirmLabel, confirmWorking, renderBackground, children, contentHeader, image, secondaryLabel, onSecondaryAction, ...props }: ContextModalProps): JSX.Element;
42
+ ({ isOpen, unpadded, layout, title, onConfirm, onDismiss: propsOnDismiss, onAfterLeave, onAfterEnter, confirmLabel, confirmWorking, renderBackground, children, contentHeader, image, secondaryLabel, onSecondaryAction, className, ...props }: ContextModalProps): JSX.Element;
43
43
  displayName: string;
44
44
  };
@@ -10,8 +10,9 @@ export type GenericModalProps = {
10
10
  onAfterEnter?: () => void;
11
11
  /** A callback that is triggered after the modal is closed. */
12
12
  onAfterLeave?: () => void;
13
+ className?: string;
13
14
  };
14
15
  export declare const GenericModal: {
15
- ({ id: propsId, children, isOpen, focusLockDisabled, onEscapeKeyup, onOutsideModalClick, onAfterEnter, onAfterLeave: propsOnAfterLeave, }: GenericModalProps): JSX.Element;
16
+ ({ id: propsId, children, isOpen, focusLockDisabled, onEscapeKeyup, onOutsideModalClick, onAfterEnter, onAfterLeave: propsOnAfterLeave, className, }: GenericModalProps): JSX.Element;
16
17
  displayName: string;
17
18
  };
@@ -14,7 +14,6 @@ export type InputEditModalProps = {
14
14
  onAfterEnter?: () => void;
15
15
  /** A callback that is triggered after the modal is closed. */
16
16
  onAfterLeave?: () => void;
17
- localeDirection?: 'rtl' | 'ltr';
18
17
  submitLabel?: string;
19
18
  dismissLabel?: string;
20
19
  secondaryLabel?: string;
@@ -33,6 +32,6 @@ export type InputEditModalProps = {
33
32
  * {@link https://cultureamp.design/?path=/docs/components-modals-inputeditmodal--docs Storybook}
34
33
  */
35
34
  export declare const InputEditModal: {
36
- ({ isOpen, mood, title, onSubmit, onSecondaryAction, onAfterLeave, localeDirection, submitLabel, dismissLabel, secondaryLabel, submitWorking, children, unpadded, onDismiss: propsOnDismiss, onAfterEnter, ...props }: InputEditModalProps): JSX.Element;
35
+ ({ isOpen, mood, title, onSubmit, onSecondaryAction, onAfterLeave, submitLabel, dismissLabel, secondaryLabel, submitWorking, children, unpadded, onDismiss: propsOnDismiss, onAfterEnter, className, ...props }: InputEditModalProps): JSX.Element;
37
36
  displayName: string;
38
37
  };
@@ -5,7 +5,7 @@ type ButtonAttributes = ButtonHTMLAttributes<HTMLButtonElement>;
5
5
  type AnchorButtonAttributes = AnchorAttributes & ButtonAttributes;
6
6
  export type BaseButtonProps = {
7
7
  label: string;
8
- icon?: React.ReactNode;
8
+ icon?: React.SVGAttributes<SVGSymbolElement>;
9
9
  isReversed?: boolean;
10
10
  } & OverrideClassName<AnchorButtonAttributes>;
11
11
  export declare const BaseButton: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "0.0.0-canary-react-19-peer-20250303031741",
3
+ "version": "0.0.0-canary-add-length-check-for-tabs-20250313022700",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -175,8 +175,8 @@
175
175
  "postcss-preset-env": "^10.1.3",
176
176
  "postcss-scss": "^4.0.9",
177
177
  "query-string": "^9.1.1",
178
- "react": "^19.0.0",
179
- "react-dom": "^19.0.0",
178
+ "react": "^18.3.1",
179
+ "react-dom": "^18.3.1",
180
180
  "react-highlight": "^0.15.0",
181
181
  "react-intl": "^7.1.0",
182
182
  "rollup": "^4.30.1",
@@ -185,7 +185,7 @@
185
185
  "svgo": "^3.3.2",
186
186
  "tslib": "^2.8.1",
187
187
  "tsx": "^4.19.2",
188
- "@kaizen/design-tokens": "0.0.0-canary-react-19-peer-20250303031741",
188
+ "@kaizen/design-tokens": "10.8.7",
189
189
  "@kaizen/package-bundler": "2.0.4"
190
190
  },
191
191
  "devDependenciesComments": {
@@ -194,8 +194,8 @@
194
194
  },
195
195
  "peerDependencies": {
196
196
  "@cultureamp/i18n-react-intl": "^2.5.9",
197
- "react": "^18.3.1 || ^19.0.0",
198
- "react-dom": "^18.3.1 || ^19.0.0",
197
+ "react": "^18.3.1",
198
+ "react-dom": "^18.3.1",
199
199
  "react-intl": "^6.6.8 || ^7.0.0",
200
200
  "typescript": "5.x"
201
201
  },
@@ -29,7 +29,7 @@ export type AvatarGroupProps = {
29
29
  avatars: AvatarList
30
30
  } & OverrideClassName<HTMLAttributes<HTMLUListElement>>
31
31
 
32
- const renderCounter = (remainingAvatars: number): JSX.Element | undefined => {
32
+ const renderCounter = (remainingAvatars: number): JSX.Element | void => {
33
33
  if (remainingAvatars <= 0) return
34
34
  return (
35
35
  <li
@@ -6,8 +6,10 @@
6
6
  margin: 0 $layout-content-side-margin;
7
7
  width: 100%;
8
8
 
9
+ // Setting a min-width: 0 will maintain the gutter margins when the inner contents has something wider than the page (e.g. scrollable table)
10
+ min-width: 0;
11
+
9
12
  @media (max-width: calc(#{$layout-breakpoints-large} - 1px)) {
10
13
  margin: 0 $content-margin-width-on-medium-and-small;
11
- width: calc(100% - 2 * #{$content-margin-width-on-medium-and-small});
12
14
  }
13
15
  }
@@ -21,7 +21,7 @@
21
21
  grid-template-columns: 0.2fr 2fr;
22
22
  align-items: center;
23
23
  color: $color-white;
24
- text-align: left;
24
+ text-align: start;
25
25
  border-radius: $border-solid-border-radius $border-solid-border-radius 0 0;
26
26
 
27
27
  &.padded {
@@ -53,9 +53,9 @@
53
53
  height: 30px;
54
54
 
55
55
  @media (max-width: $layout-breakpoints-medium) {
56
- margin-right: 0.9375rem;
56
+ margin-inline-end: 0.9375rem;
57
57
  position: relative;
58
- top: 0.125rem;
58
+ inset-block-start: 0.125rem;
59
59
  }
60
60
  }
61
61
  }
@@ -75,12 +75,12 @@
75
75
 
76
76
  .iconContainer {
77
77
  position: absolute;
78
- top: 8%;
78
+ inset-block-start: 8%;
79
79
 
80
80
  @media (max-width: $layout-breakpoints-medium) {
81
81
  position: relative;
82
- top: 0;
83
- margin-bottom: $spacing-sm;
82
+ inset-block-start: 0;
83
+ margin-block-end: $spacing-sm;
84
84
  }
85
85
  }
86
86
 
@@ -124,6 +124,7 @@ export const ConfirmationModal = ({
124
124
  confirmWorking,
125
125
  onDismiss: propsOnDismiss,
126
126
  children,
127
+ className,
127
128
  ...props
128
129
  }: ConfirmationModalProps): JSX.Element => {
129
130
  const variantName = variant ?? mood
@@ -158,6 +159,7 @@ export const ConfirmationModal = ({
158
159
  onOutsideModalClick={onDismiss}
159
160
  onAfterLeave={onAfterLeave}
160
161
  onAfterEnter={onAfterEnter}
162
+ className={className}
161
163
  >
162
164
  <div className={styles.modal} data-modal {...props}>
163
165
  <ModalHeader onDismiss={onDismiss}>
@@ -58,7 +58,7 @@
58
58
  .footerWithSecondaryAction {
59
59
  @extend %footer;
60
60
 
61
- margin-left: calc(-1 * #{$spacing-sm});
61
+ margin-inline-start: calc(-1 * #{$spacing-sm});
62
62
  }
63
63
 
64
64
  .emptyFooter {
@@ -97,7 +97,7 @@
97
97
  }
98
98
 
99
99
  .content {
100
- padding-left: 0;
100
+ padding-inline-start: 0;
101
101
 
102
102
  @media (min-width: $layout-breakpoints-medium) {
103
103
  max-width: 100%;
@@ -71,6 +71,7 @@ export const ContextModal = ({
71
71
  image,
72
72
  secondaryLabel,
73
73
  onSecondaryAction,
74
+ className,
74
75
  ...props
75
76
  }: ContextModalProps): JSX.Element => {
76
77
  const onDismiss = confirmWorking ? undefined : propsOnDismiss
@@ -105,6 +106,7 @@ export const ContextModal = ({
105
106
  onOutsideModalClick={onDismiss}
106
107
  onAfterLeave={onAfterLeave}
107
108
  onAfterEnter={onAfterEnter}
109
+ className={className}
108
110
  >
109
111
  <div className={styles.modal} data-modal {...props}>
110
112
  {renderBackground?.()}
@@ -115,7 +115,7 @@
115
115
 
116
116
  .pseudoScrollbar {
117
117
  /* Tech debt - this !important existed before Stylelint rules */
118
- padding-right: 15px !important; /* stylelint-disable-line declaration-no-important */
118
+ padding-inline-end: 15px !important; /* stylelint-disable-line declaration-no-important */
119
119
  }
120
120
 
121
121
  .hide {
@@ -17,6 +17,7 @@ export type GenericModalProps = {
17
17
  onAfterEnter?: () => void
18
18
  /** A callback that is triggered after the modal is closed. */
19
19
  onAfterLeave?: () => void
20
+ className?: string
20
21
  }
21
22
 
22
23
  export const GenericModal = ({
@@ -28,6 +29,7 @@ export const GenericModal = ({
28
29
  onOutsideModalClick,
29
30
  onAfterEnter,
30
31
  onAfterLeave: propsOnAfterLeave,
32
+ className,
31
33
  }: GenericModalProps): JSX.Element => {
32
34
  const reactId = useId()
33
35
  const id = propsId ?? reactId
@@ -137,6 +139,7 @@ export const GenericModal = ({
137
139
  afterLeave={onAfterLeaveHandler}
138
140
  data-generic-modal-transition-wrapper
139
141
  onClick={(e: React.MouseEvent): void => e.stopPropagation()}
142
+ className={className}
140
143
  >
141
144
  <FocusLock
142
145
  disabled={focusLockDisabled}
@@ -27,7 +27,7 @@ $ca-breakpoint-small-mobile: 375px;
27
27
 
28
28
  &.prominent {
29
29
  grid-column-start: 2;
30
- text-align: left;
30
+ text-align: start;
31
31
  }
32
32
 
33
33
  &:focus {
@@ -32,10 +32,10 @@
32
32
  }
33
33
 
34
34
  .actionButton + .actionButton {
35
- margin-right: $spacing-sm;
35
+ margin-inline-end: $spacing-sm;
36
36
 
37
37
  @media (max-width: (calc(#{$layout-breakpoints-medium} - 1px))) {
38
- margin-top: $spacing-sm;
38
+ margin-block-start: $spacing-sm;
39
39
  }
40
40
  }
41
41
 
@@ -51,7 +51,7 @@
51
51
  }
52
52
 
53
53
  .border {
54
- border-top: 1px solid $border-solid-border-color;
54
+ border-block-start: 1px solid $border-solid-border-color;
55
55
  }
56
56
 
57
57
  .start {
@@ -66,8 +66,8 @@
66
66
 
67
67
  .fixed {
68
68
  position: absolute;
69
- bottom: 0;
70
- left: 0;
69
+ inset-block-end: 0;
70
+ inset-inline-start: 0;
71
71
  }
72
72
 
73
73
  .filler {
@@ -15,8 +15,8 @@
15
15
 
16
16
  .fixed {
17
17
  position: absolute;
18
- top: 0;
19
- left: 0;
18
+ inset-block-start: 0;
19
+ inset-inline-start: 0;
20
20
  }
21
21
 
22
22
  .filler {
@@ -28,11 +28,7 @@
28
28
 
29
29
  .header {
30
30
  color: $color-purple-800;
31
- text-align: left;
32
-
33
- &.textAlignRTL {
34
- text-align: right;
35
- }
31
+ text-align: start;
36
32
 
37
33
  &.padded {
38
34
  padding: $spacing-md $spacing-lg;
@@ -26,7 +26,6 @@ export type InputEditModalProps = {
26
26
  onAfterEnter?: () => void
27
27
  /** A callback that is triggered after the modal is closed. */
28
28
  onAfterLeave?: () => void
29
- localeDirection?: 'rtl' | 'ltr'
30
29
  submitLabel?: string
31
30
  dismissLabel?: string
32
31
  secondaryLabel?: string
@@ -49,7 +48,6 @@ export const InputEditModal = ({
49
48
  onSubmit,
50
49
  onSecondaryAction,
51
50
  onAfterLeave,
52
- localeDirection = 'ltr',
53
51
  submitLabel = 'Submit',
54
52
  dismissLabel = 'Cancel',
55
53
  secondaryLabel,
@@ -58,6 +56,7 @@ export const InputEditModal = ({
58
56
  unpadded = false,
59
57
  onDismiss: propsOnDismiss,
60
58
  onAfterEnter,
59
+ className,
61
60
  ...props
62
61
  }: InputEditModalProps): JSX.Element => {
63
62
  const onDismiss = submitWorking ? undefined : propsOnDismiss
@@ -87,16 +86,11 @@ export const InputEditModal = ({
87
86
  onEscapeKeyup={onDismiss}
88
87
  onAfterLeave={onAfterLeave}
89
88
  onAfterEnter={onAfterEnter}
89
+ className={className}
90
90
  >
91
- <div className={styles.modal} dir={localeDirection} data-modal {...props}>
91
+ <div className={styles.modal} data-modal {...props}>
92
92
  <ModalHeader onDismiss={onDismiss}>
93
- <div
94
- className={classnames(
95
- styles.header,
96
- localeDirection === 'rtl' && styles.textAlignRTL,
97
- !unpadded && styles.padded,
98
- )}
99
- >
93
+ <div className={classnames(styles.header, !unpadded && styles.padded)}>
100
94
  <ModalAccessibleLabel>
101
95
  <Heading tag="h2" variant="heading-2">
102
96
  {title}
@@ -105,12 +99,7 @@ export const InputEditModal = ({
105
99
  </div>
106
100
  </ModalHeader>
107
101
  <ModalBody>
108
- <div
109
- className={classnames(styles.body, !unpadded && styles.padded)}
110
- dir={localeDirection}
111
- >
112
- {children}
113
- </div>
102
+ <div className={classnames(styles.body, !unpadded && styles.padded)}>{children}</div>
114
103
  </ModalBody>
115
104
  <ModalFooter
116
105
  actions={footerActions}
@@ -12,7 +12,7 @@ const isAnchor = (attributes: AnchorButtonAttributes): boolean =>
12
12
 
13
13
  export type BaseButtonProps = {
14
14
  label: string
15
- icon?: React.ReactNode
15
+ icon?: React.SVGAttributes<SVGSymbolElement>
16
16
  isReversed?: boolean
17
17
  } & OverrideClassName<AnchorButtonAttributes>
18
18
 
package/src/Tag/Tag.tsx CHANGED
@@ -71,7 +71,7 @@ export const Tag = (props: TagProps): JSX.Element => {
71
71
  <div className={styles.layoutContainer}>
72
72
  <>
73
73
  {canShowIcon &&
74
- ((): JSX.Element | undefined => {
74
+ ((): JSX.Element | void => {
75
75
  switch (props.variant) {
76
76
  case 'validationPositive':
77
77
  return (
@@ -130,7 +130,7 @@ export const GenericTile = ({
130
130
  return informationProp
131
131
  }
132
132
 
133
- const renderBack = (): JSX.Element | undefined => {
133
+ const renderBack = (): JSX.Element | void => {
134
134
  if (!information) return
135
135
 
136
136
  const returnButtonLabel = formatMessage({
@@ -21,7 +21,7 @@ import {
21
21
  import { createTabletOverflowMenuItems, isReversed } from './utils'
22
22
  import styles from './TitleBlockZen.module.scss'
23
23
 
24
- const renderTag = (surveyStatus: SurveyStatus): JSX.Element | undefined => {
24
+ const renderTag = (surveyStatus: SurveyStatus): JSX.Element | void => {
25
25
  let tagVariant: React.ComponentPropsWithoutRef<typeof Tag>['variant']
26
26
 
27
27
  if (tagVariant === 'profile') {
@@ -62,7 +62,7 @@ export const TabList = (props: TabListProps): JSX.Element => {
62
62
  }
63
63
 
64
64
  const tabs = containerElement?.querySelectorAll('[data-kz-tab]')
65
- if (!tabs) {
65
+ if (!tabs || tabs.length === 0) {
66
66
  return
67
67
  }
68
68