@kaizen/components 3.0.11 → 3.0.13

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 (31) hide show
  1. package/dist/cjs/src/SingleSelect/subcomponents/Option/Option.cjs +2 -1
  2. package/dist/cjs/src/Tile/MultiActionTile/MultiActionTile.cjs +1 -1
  3. package/dist/cjs/src/Tile/MultiActionTile/MultiActionTile.module.css.cjs +7 -0
  4. package/dist/cjs/src/Tile/TileGrid/TileGrid.cjs +1 -1
  5. package/dist/cjs/src/Tile/TileGrid/TileGrid.module.css.cjs +6 -0
  6. package/dist/cjs/src/Tile/subcomponents/GenericTile/GenericTile.cjs +1 -1
  7. package/dist/cjs/src/Tile/subcomponents/GenericTile/GenericTile.module.css.cjs +19 -0
  8. package/dist/esm/src/SingleSelect/subcomponents/Option/Option.mjs +2 -1
  9. package/dist/esm/src/Tile/MultiActionTile/MultiActionTile.mjs +3 -3
  10. package/dist/esm/src/Tile/MultiActionTile/MultiActionTile.module.css.mjs +5 -0
  11. package/dist/esm/src/Tile/TileGrid/TileGrid.mjs +2 -2
  12. package/dist/esm/src/Tile/TileGrid/TileGrid.module.css.mjs +4 -0
  13. package/dist/esm/src/Tile/subcomponents/GenericTile/GenericTile.mjs +14 -14
  14. package/dist/esm/src/Tile/subcomponents/GenericTile/GenericTile.module.css.mjs +17 -0
  15. package/dist/styles.css +18 -18
  16. package/package.json +5 -5
  17. package/src/SingleSelect/subcomponents/Option/Option.tsx +2 -1
  18. package/src/Tile/MultiActionTile/{MultiActionTile.module.scss → MultiActionTile.module.css} +1 -3
  19. package/src/Tile/MultiActionTile/MultiActionTile.tsx +1 -1
  20. package/src/Tile/TileGrid/TileGrid.module.css +31 -0
  21. package/src/Tile/TileGrid/TileGrid.tsx +1 -1
  22. package/src/Tile/subcomponents/GenericTile/{GenericTile.module.scss → GenericTile.module.css} +19 -28
  23. package/src/Tile/subcomponents/GenericTile/GenericTile.tsx +1 -1
  24. package/dist/cjs/src/Tile/MultiActionTile/MultiActionTile.module.scss.cjs +0 -7
  25. package/dist/cjs/src/Tile/TileGrid/TileGrid.module.scss.cjs +0 -6
  26. package/dist/cjs/src/Tile/subcomponents/GenericTile/GenericTile.module.scss.cjs +0 -19
  27. package/dist/esm/src/Tile/MultiActionTile/MultiActionTile.module.scss.mjs +0 -5
  28. package/dist/esm/src/Tile/TileGrid/TileGrid.module.scss.mjs +0 -4
  29. package/dist/esm/src/Tile/subcomponents/GenericTile/GenericTile.module.scss.mjs +0 -17
  30. package/src/Tile/TileGrid/TileGrid.module.scss +0 -28
  31. package/src/Tile/subcomponents/GenericTile/_variables.scss +0 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "3.0.11",
3
+ "version": "3.0.13",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -123,7 +123,7 @@
123
123
  "react-select": "^5.10.2",
124
124
  "react-textfit": "^1.1.1",
125
125
  "use-debounce": "^10.1.1",
126
- "uuid": "^13.0.0"
126
+ "uuid": "^14.0.0"
127
127
  },
128
128
  "dependenciesComments": {
129
129
  "react-day-picker": "Version locked until a11y gets fixed (https://github.com/gpbl/react-day-picker/pull/1708)"
@@ -132,7 +132,7 @@
132
132
  "@cultureamp/frontend-apis": "13.3.0",
133
133
  "@cultureamp/i18n-react-intl": "^4.1.1",
134
134
  "@cultureamp/package-bundler": "^4.0.1",
135
- "cssnano": "^7.1.5",
135
+ "cssnano": "^7.1.7",
136
136
  "@testing-library/dom": "^10.4.1",
137
137
  "@types/jest-axe": "^3.5.9",
138
138
  "@types/lodash.debounce": "^4.0.9",
@@ -155,14 +155,14 @@
155
155
  "react-dom": "^19.2.5",
156
156
  "react-highlight": "^0.15.0",
157
157
  "react-intl": "^10.1.2",
158
- "rollup": "^4.60.1",
158
+ "rollup": "^4.60.2",
159
159
  "sass": "1.79.6",
160
160
  "serialize-query-params": "^2.0.4",
161
161
  "svgo": "^4.0.1",
162
162
  "ts-patch": "^3.3.0",
163
163
  "tslib": "^2.8.1",
164
164
  "tsx": "^4.21.0",
165
- "@kaizen/design-tokens": "11.0.4"
165
+ "@kaizen/design-tokens": "11.0.5"
166
166
  },
167
167
  "devDependenciesComments": {
168
168
  "sass": "Prevent deprecation warnings introduced in 1.80 as we plan to move away from sass",
@@ -1,7 +1,8 @@
1
1
  import React, { type HTMLAttributes } from 'react'
2
+ import { useOption } from '@react-aria/listbox'
2
3
  import { type FocusableElement } from '@react-types/shared'
3
4
  import classnames from 'classnames'
4
- import { mergeProps, useFocusRing, useOption } from 'react-aria'
5
+ import { mergeProps, useFocusRing } from 'react-aria'
5
6
  import { Icon } from '~components/Icon'
6
7
  import { type OverrideClassName } from '~components/types/OverrideClassName'
7
8
  import { useSelectContext } from '../../context'
@@ -1,11 +1,9 @@
1
- @import '~@kaizen/design-tokens/sass/spacing';
2
-
3
1
  @layer kz-components {
4
2
  .actions {
5
3
  display: flex;
6
4
  }
7
5
 
8
6
  .secondaryAction {
9
- margin-inline-end: $spacing-8;
7
+ margin-inline-end: var(--spacing-8);
10
8
  }
11
9
  }
@@ -1,7 +1,7 @@
1
1
  import React from 'react'
2
2
  import { Button } from '~components/ButtonV1'
3
3
  import { GenericTile, type GenericTileProps, type TileAction } from '../subcomponents/GenericTile'
4
- import styles from './MultiActionTile.module.scss'
4
+ import styles from './MultiActionTile.module.css'
5
5
 
6
6
  export type MultiActionTileProps = {
7
7
  primaryAction: TileAction
@@ -0,0 +1,31 @@
1
+ @layer kz-components {
2
+ .grid {
3
+ --tile-width: 330px;
4
+ --tile-height: 370px;
5
+
6
+ list-style-type: none;
7
+ padding-inline-start: 0;
8
+ margin-block: 0;
9
+ display: grid;
10
+
11
+ /*
12
+ the more we shave off the width here,
13
+ the less the tiles will grow when they lose one from the row
14
+ */
15
+ grid-template-columns: repeat(auto-fill, minmax(calc(var(--tile-width) - 40px), 1fr));
16
+ gap: var(--spacing-md);
17
+
18
+ /* Replace @include ca-media-mobile */
19
+ @media (width <= 767px) {
20
+ grid-template-columns: repeat(2, minmax(226px, var(--tile-height)));
21
+
22
+ > * {
23
+ width: 100%;
24
+ }
25
+ }
26
+
27
+ @media (width <= 480px) {
28
+ grid-template-columns: repeat(1, 100%);
29
+ }
30
+ }
31
+ }
@@ -3,7 +3,7 @@ import classnames from 'classnames'
3
3
  import { type OverrideClassName } from '~components/types/OverrideClassName'
4
4
  import { type InformationTileProps } from '../InformationTile'
5
5
  import { type MultiActionTileProps } from '../MultiActionTile'
6
- import styles from './TileGrid.module.scss'
6
+ import styles from './TileGrid.module.css'
7
7
 
8
8
  type TileProps = InformationTileProps | MultiActionTileProps
9
9
 
@@ -1,45 +1,36 @@
1
- @import '~@kaizen/design-tokens/sass/border';
2
- @import '~@kaizen/design-tokens/sass/color';
3
- @import '~@kaizen/design-tokens/sass/shadow';
4
- @import '~@kaizen/design-tokens/sass/spacing';
5
- @import '../../../../styles/utils/animation';
6
- @import '../../../../styles/utils/responsive';
7
- @import './variables';
8
-
9
1
  @layer kz-components {
10
- $tilePaddingTop: $spacing-xl;
11
-
12
2
  .root {
13
3
  perspective: 800px;
14
4
  }
15
5
 
16
6
  .tile {
17
7
  position: relative;
18
- width: $tileWidth;
19
- height: $tileHeight;
20
- transition: transform $ca-duration-slow $ca-default;
8
+ width: 330px;
9
+ height: 370px;
10
+ transition: transform var(--animation-duration-slow, 400ms)
11
+ var(--animation-easing-function-ease-in-out, cubic-bezier(0.455, 0.03, 0.515, 0.955));
21
12
  transform-style: preserve-3d;
22
- box-shadow: $shadow-small-box-shadow;
13
+ box-shadow: var(--shadow-small-box-shadow);
23
14
  border-radius: 7px;
24
- background-color: $color-white;
15
+ background-color: var(--color-white);
25
16
 
26
17
  [data-tile-grid] & {
27
18
  width: auto;
28
19
  }
29
20
 
30
- @include ca-media-mobile {
21
+ @media (width <= 767px) {
31
22
  width: 100%;
32
23
  min-width: 226px;
33
- max-width: $tileHeight;
24
+ max-width: 370px;
34
25
  }
35
26
 
36
- @media (max-width: 480px) {
27
+ @media (width <= 480px) {
37
28
  max-width: 100%;
38
29
  }
39
30
  }
40
31
 
41
32
  .titleMeta {
42
- padding-top: $spacing-4;
33
+ padding-top: var(--spacing-4);
43
34
  }
44
35
 
45
36
  .face {
@@ -62,14 +53,14 @@
62
53
 
63
54
  .faceFront {
64
55
  justify-content: space-between;
65
- padding: $tilePaddingTop $spacing-md $spacing-md;
56
+ padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
66
57
  }
67
58
 
68
59
  .faceBack {
69
60
  --generic-tile-border-color: var(--color-blue-400);
70
61
  --generic-tile-background-color: var(--color-blue-100);
71
62
 
72
- padding-top: $tilePaddingTop;
63
+ padding-top: var(--spacing-xl);
73
64
  transform: rotateY(180deg);
74
65
  }
75
66
 
@@ -89,7 +80,7 @@
89
80
 
90
81
  .title {
91
82
  text-align: center;
92
- padding-bottom: $spacing-sm;
83
+ padding-bottom: var(--spacing-sm);
93
84
  backface-visibility: hidden;
94
85
  }
95
86
 
@@ -101,14 +92,14 @@
101
92
  inset-block-start: 0;
102
93
  inset-inline-end: 0;
103
94
  position: absolute;
104
- color: rgba($color-purple-800-rgb, 0.5);
95
+ color: rgb(var(--color-purple-800-rgb), 0.5);
105
96
  }
106
97
 
107
98
  .information {
108
99
  display: flex;
109
- padding-bottom: $spacing-md;
110
- padding-right: $spacing-md;
111
- padding-left: $spacing-md;
100
+ padding-bottom: var(--spacing-md);
101
+ padding-right: var(--spacing-md);
102
+ padding-left: var(--spacing-md);
112
103
  flex-direction: column;
113
104
  align-items: center;
114
105
  justify-content: space-between;
@@ -123,7 +114,7 @@
123
114
  display: flex;
124
115
  align-items: center;
125
116
  justify-content: center;
126
- margin-top: $spacing-sm;
127
- height: $spacing-xl;
117
+ margin-top: var(--spacing-sm);
118
+ height: var(--spacing-xl);
128
119
  }
129
120
  }
@@ -7,7 +7,7 @@ import { Heading, type AllowedHeadingTags } from '~components/Heading'
7
7
  import { Icon } from '~components/Icon'
8
8
  import { Text } from '~components/Text'
9
9
  import { type OverrideClassName } from '~components/types/OverrideClassName'
10
- import styles from './GenericTile.module.scss'
10
+ import styles from './GenericTile.module.css'
11
11
 
12
12
  export type TileAction = GenericButtonProps
13
13
 
@@ -1,7 +0,0 @@
1
- 'use strict';
2
-
3
- var modules_0d682542 = {
4
- "actions": "MultiActionTile_module_actions__60f34f5f",
5
- "secondaryAction": "MultiActionTile_module_secondaryAction__60f34f5f"
6
- };
7
- module.exports = modules_0d682542;
@@ -1,6 +0,0 @@
1
- 'use strict';
2
-
3
- var modules_9b937ad3 = {
4
- "grid": "TileGrid_module_grid__0d070152"
5
- };
6
- module.exports = modules_9b937ad3;
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- var modules_fed39cba = {
4
- "root": "GenericTile_module_root__de9f2627",
5
- "tile": "GenericTile_module_tile__de9f2627",
6
- "titleMeta": "GenericTile_module_titleMeta__de9f2627",
7
- "face": "GenericTile_module_face__de9f2627",
8
- "faceFront": "GenericTile_module_faceFront__de9f2627",
9
- "faceBack": "GenericTile_module_faceBack__de9f2627",
10
- "default": "GenericTile_module_default__de9f2627",
11
- "expert-advice": "GenericTile_module_expertAdvice__de9f2627",
12
- "isFlipped": "GenericTile_module_isFlipped__de9f2627",
13
- "title": "GenericTile_module_title__de9f2627",
14
- "actions": "GenericTile_module_actions__de9f2627",
15
- "informationBtn": "GenericTile_module_informationBtn__de9f2627",
16
- "information": "GenericTile_module_information__de9f2627",
17
- "footer": "GenericTile_module_footer__de9f2627"
18
- };
19
- module.exports = modules_fed39cba;
@@ -1,5 +0,0 @@
1
- var modules_0d682542 = {
2
- "actions": "MultiActionTile_module_actions__60f34f5f",
3
- "secondaryAction": "MultiActionTile_module_secondaryAction__60f34f5f"
4
- };
5
- export { modules_0d682542 as default };
@@ -1,4 +0,0 @@
1
- var modules_9b937ad3 = {
2
- "grid": "TileGrid_module_grid__0d070152"
3
- };
4
- export { modules_9b937ad3 as default };
@@ -1,17 +0,0 @@
1
- var modules_fed39cba = {
2
- "root": "GenericTile_module_root__de9f2627",
3
- "tile": "GenericTile_module_tile__de9f2627",
4
- "titleMeta": "GenericTile_module_titleMeta__de9f2627",
5
- "face": "GenericTile_module_face__de9f2627",
6
- "faceFront": "GenericTile_module_faceFront__de9f2627",
7
- "faceBack": "GenericTile_module_faceBack__de9f2627",
8
- "default": "GenericTile_module_default__de9f2627",
9
- "expert-advice": "GenericTile_module_expertAdvice__de9f2627",
10
- "isFlipped": "GenericTile_module_isFlipped__de9f2627",
11
- "title": "GenericTile_module_title__de9f2627",
12
- "actions": "GenericTile_module_actions__de9f2627",
13
- "informationBtn": "GenericTile_module_informationBtn__de9f2627",
14
- "information": "GenericTile_module_information__de9f2627",
15
- "footer": "GenericTile_module_footer__de9f2627"
16
- };
17
- export { modules_fed39cba as default };
@@ -1,28 +0,0 @@
1
- @import '~@kaizen/design-tokens/sass/spacing';
2
- @import '../../../styles/utils/responsive';
3
- @import '../subcomponents/GenericTile/variables';
4
-
5
- @layer kz-components {
6
- .grid {
7
- list-style-type: none;
8
- padding-inline-start: 0;
9
- margin-block: 0;
10
- display: grid;
11
- // the more we shave off the width here,
12
- // the less the tiles will grow when they lose one from the row
13
- grid-template-columns: repeat(auto-fill, minmax($tileWidth - 40px, 1fr));
14
- gap: $spacing-md;
15
-
16
- @include ca-media-mobile {
17
- grid-template-columns: repeat(2, minmax(226px, $tileHeight));
18
-
19
- > * {
20
- width: 100%;
21
- }
22
- }
23
-
24
- @media (max-width: 480px) {
25
- grid-template-columns: repeat(1, 100%);
26
- }
27
- }
28
- }
@@ -1,2 +0,0 @@
1
- $tileWidth: 330px;
2
- $tileHeight: 370px;