@kaizen/components 1.40.6 → 1.41.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 (62) hide show
  1. package/dist/cjs/Icon/ThumbsDownIcon.cjs +2 -1
  2. package/dist/cjs/Icon/ThumbsDownIcon.cjs.map +1 -1
  3. package/dist/cjs/Icon/ThumbsDownOffIcon.cjs +17 -0
  4. package/dist/cjs/Icon/ThumbsDownOffIcon.cjs.map +1 -0
  5. package/dist/cjs/Icon/ThumbsDownOnIcon.cjs +17 -0
  6. package/dist/cjs/Icon/ThumbsDownOnIcon.cjs.map +1 -0
  7. package/dist/cjs/Icon/ThumbsUpIcon.cjs +2 -1
  8. package/dist/cjs/Icon/ThumbsUpIcon.cjs.map +1 -1
  9. package/dist/cjs/Icon/ThumbsUpOffIcon.cjs +17 -0
  10. package/dist/cjs/Icon/ThumbsUpOffIcon.cjs.map +1 -0
  11. package/dist/cjs/Icon/ThumbsUpOnIcon.cjs +17 -0
  12. package/dist/cjs/Icon/ThumbsUpOnIcon.cjs.map +1 -0
  13. package/dist/cjs/dts/Icon/ThumbsDownIcon.d.ts +1 -0
  14. package/dist/cjs/dts/Icon/ThumbsDownOffIcon.d.ts +3 -0
  15. package/dist/cjs/dts/Icon/ThumbsDownOnIcon.d.ts +3 -0
  16. package/dist/cjs/dts/Icon/ThumbsUpIcon.d.ts +1 -0
  17. package/dist/cjs/dts/Icon/ThumbsUpOffIcon.d.ts +3 -0
  18. package/dist/cjs/dts/Icon/ThumbsUpOnIcon.d.ts +3 -0
  19. package/dist/cjs/dts/Icon/index.d.ts +4 -0
  20. package/dist/cjs/dts/index.d.ts +1 -0
  21. package/dist/cjs/dts/utils/index.d.ts +1 -0
  22. package/dist/cjs/index.cjs +11 -0
  23. package/dist/cjs/index.cjs.map +1 -1
  24. package/dist/cjs/index.css +49 -49
  25. package/dist/esm/Icon/ThumbsDownIcon.mjs +2 -1
  26. package/dist/esm/Icon/ThumbsDownIcon.mjs.map +1 -1
  27. package/dist/esm/Icon/ThumbsDownOffIcon.mjs +15 -0
  28. package/dist/esm/Icon/ThumbsDownOffIcon.mjs.map +1 -0
  29. package/dist/esm/Icon/ThumbsDownOnIcon.mjs +15 -0
  30. package/dist/esm/Icon/ThumbsDownOnIcon.mjs.map +1 -0
  31. package/dist/esm/Icon/ThumbsUpIcon.mjs +2 -1
  32. package/dist/esm/Icon/ThumbsUpIcon.mjs.map +1 -1
  33. package/dist/esm/Icon/ThumbsUpOffIcon.mjs +15 -0
  34. package/dist/esm/Icon/ThumbsUpOffIcon.mjs.map +1 -0
  35. package/dist/esm/Icon/ThumbsUpOnIcon.mjs +15 -0
  36. package/dist/esm/Icon/ThumbsUpOnIcon.mjs.map +1 -0
  37. package/dist/esm/dts/Icon/ThumbsDownIcon.d.ts +1 -0
  38. package/dist/esm/dts/Icon/ThumbsDownOffIcon.d.ts +3 -0
  39. package/dist/esm/dts/Icon/ThumbsDownOnIcon.d.ts +3 -0
  40. package/dist/esm/dts/Icon/ThumbsUpIcon.d.ts +1 -0
  41. package/dist/esm/dts/Icon/ThumbsUpOffIcon.d.ts +3 -0
  42. package/dist/esm/dts/Icon/ThumbsUpOnIcon.d.ts +3 -0
  43. package/dist/esm/dts/Icon/index.d.ts +4 -0
  44. package/dist/esm/dts/index.d.ts +1 -0
  45. package/dist/esm/dts/utils/index.d.ts +1 -0
  46. package/dist/esm/index.css +49 -49
  47. package/dist/esm/index.mjs +5 -0
  48. package/dist/esm/index.mjs.map +1 -1
  49. package/dist/index.d.ts +40 -4
  50. package/dist/styles.css +1 -1
  51. package/package.json +5 -4
  52. package/src/Icon/ThumbsDownIcon.tsx +2 -1
  53. package/src/Icon/ThumbsDownOffIcon.tsx +18 -0
  54. package/src/Icon/ThumbsDownOnIcon.tsx +18 -0
  55. package/src/Icon/ThumbsUpIcon.tsx +2 -1
  56. package/src/Icon/ThumbsUpOffIcon.tsx +18 -0
  57. package/src/Icon/ThumbsUpOnIcon.tsx +18 -0
  58. package/src/Icon/_docs/Icon.stories.tsx +31 -37
  59. package/src/Icon/_docs/icon.stories.scss +15 -8
  60. package/src/Icon/index.ts +4 -0
  61. package/src/index.ts +1 -0
  62. package/src/utils/index.ts +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.40.6",
3
+ "version": "1.41.0",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -94,7 +94,7 @@
94
94
  "@types/react-textfit": "^1.1.4",
95
95
  "@types/uuid": "^9.0.8",
96
96
  "agadoo": "^3.0.0",
97
- "autoprefixer": "^10.4.17",
97
+ "autoprefixer": "^10.4.18",
98
98
  "babel-plugin-pure-static-props": "^0.2.0",
99
99
  "concat-cli": "^4.0.0",
100
100
  "query-string": "^9.0.0",
@@ -108,10 +108,11 @@
108
108
  "serialize-query-params": "^2.0.2",
109
109
  "svgo": "^3.2.0",
110
110
  "ts-jest": "^29.1.2",
111
+ "ts-node": "^10.9.2",
111
112
  "ts-patch": "^3.1.2",
112
113
  "typescript-transform-paths": "^3.4.7",
113
- "@kaizen/design-tokens": "10.3.18",
114
- "@kaizen/tailwind": "1.2.4"
114
+ "@kaizen/design-tokens": "10.3.19",
115
+ "@kaizen/tailwind": "1.2.5"
115
116
  },
116
117
  "peerDependencies": {
117
118
  "@cultureamp/i18n-react-intl": "^2.5.1",
@@ -5,6 +5,7 @@ import React, { useId } from "react"
5
5
  import { SVG } from "~components/Icon/subcomponents/SVG"
6
6
  import type { IconProps } from "~components/Icon/types"
7
7
 
8
+ /** @deprecated Use `<ThumbsDownIconOn/>` or `<ThumbsDownIconOff/>` */
8
9
  export const ThumbsDownIcon = (props: IconProps): JSX.Element => {
9
10
  const uniqueId = useId()
10
11
  const svgContent = (
@@ -12,7 +13,7 @@ export const ThumbsDownIcon = (props: IconProps): JSX.Element => {
12
13
  <defs>
13
14
  <path
14
15
  id={uniqueId}
15
- d="M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821c-.061.156-.095.32-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z"
16
+ d="M5.91 3.183c-.566 0-1.05.341-1.254.832L2.597 8.821q-.093.233-.095.497v1.364c0 .75.613 1.363 1.363 1.363h4.301L7.52 15.16l-.02.218c0 .28.115.539.3.723l.722.716 4.492-4.493c.245-.245.395-.586.395-.96V4.546c0-.75-.613-1.364-1.363-1.364zm8.862 8.18h2.726v-8.18h-2.726z"
16
17
  />
17
18
  </defs>
18
19
  <use fill="currentColor" href={`#${uniqueId}`} fillRule="evenodd" />
@@ -0,0 +1,18 @@
1
+ // This file is autogenerated by wrapSVGs.ts
2
+ // Changes to this file will be overwritten
3
+
4
+ import React from "react"
5
+ import { SVG } from "~components/Icon/subcomponents/SVG"
6
+ import type { IconProps } from "~components/Icon/types"
7
+
8
+ export const ThumbsDownOffIcon = (props: IconProps): JSX.Element => {
9
+ const svgContent = (
10
+ <>
11
+ <path
12
+ fill="currentColor"
13
+ d="M5.224 3.253h8.766v10L8.461 18.75l-.705-.705a1 1 0 0 1-.215-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834H2.756q-.594 0-1.05-.456t-.456-1.05V10.4q0-.13.034-.28a3 3 0 0 1 .075-.281l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m7.516 1.25H5.224a.4.4 0 0 0-.18.048.3.3 0 0 0-.14.16L2.5 10.337v1.41a.25.25 0 0 0 .072.185.25.25 0 0 0 .184.072H9.92L8.875 16.57l3.865-3.849zm1.25 8.75v-1.25h2.677v-7.5H13.99v-1.25h3.927v10z"
14
+ />
15
+ </>
16
+ )
17
+ return <SVG {...props}>{svgContent}</SVG>
18
+ }
@@ -0,0 +1,18 @@
1
+ // This file is autogenerated by wrapSVGs.ts
2
+ // Changes to this file will be overwritten
3
+
4
+ import React from "react"
5
+ import { SVG } from "~components/Icon/subcomponents/SVG"
6
+ import type { IconProps } from "~components/Icon/types"
7
+
8
+ export const ThumbsDownOnIcon = (props: IconProps): JSX.Element => {
9
+ const svgContent = (
10
+ <>
11
+ <path
12
+ fill="currentColor"
13
+ d="M5.224 3.253h8.253v10L7.95 18.75l-.705-.705a1 1 0 0 1-.216-.344 1.1 1.1 0 0 1-.086-.403v-.211l.885-3.834h-5.07q-.595 0-1.051-.456t-.456-1.05V10.4a1.6 1.6 0 0 1 .109-.561l2.388-5.635q.18-.4.6-.676a1.6 1.6 0 0 1 .877-.276m9.503 10v-10h3.19v10z"
14
+ />
15
+ </>
16
+ )
17
+ return <SVG {...props}>{svgContent}</SVG>
18
+ }
@@ -5,6 +5,7 @@ import React, { useId } from "react"
5
5
  import { SVG } from "~components/Icon/subcomponents/SVG"
6
6
  import type { IconProps } from "~components/Icon/types"
7
7
 
8
+ /** @deprecated Use `<ThumbsUpIconOn/>` or `<ThumbsUpIconOff/>` */
8
9
  export const ThumbsUpIcon = (props: IconProps): JSX.Element => {
9
10
  const uniqueId = useId()
10
11
  const svgContent = (
@@ -12,7 +13,7 @@ export const ThumbsUpIcon = (props: IconProps): JSX.Element => {
12
13
  <defs>
13
14
  <path
14
15
  id={uniqueId}
15
- d="M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.333 1.333 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806c.061-.156.095-.32.095-.497V9.318c0-.75-.613-1.363-1.363-1.363"
16
+ d="M5.228 16.817v-8.18H2.502v8.18zm10.907-8.862h-4.301l.647-3.115.02-.218c0-.28-.115-.539-.3-.723l-.722-.716-4.485 4.493a1.33 1.33 0 0 0-.402.96v6.817c0 .75.613 1.364 1.363 1.364h6.135c.566 0 1.05-.341 1.254-.832l2.059-4.806q.093-.233.095-.497V9.318c0-.75-.613-1.363-1.363-1.363"
16
17
  />
17
18
  </defs>
18
19
  <use fill="currentColor" href={`#${uniqueId}`} fillRule="evenodd" />
@@ -0,0 +1,18 @@
1
+ // This file is autogenerated by wrapSVGs.ts
2
+ // Changes to this file will be overwritten
3
+
4
+ import React from "react"
5
+ import { SVG } from "~components/Icon/subcomponents/SVG"
6
+ import type { IconProps } from "~components/Icon/types"
7
+
8
+ export const ThumbsUpOffIcon = (props: IconProps): JSX.Element => {
9
+ const svgContent = (
10
+ <>
11
+ <path
12
+ fill="currentColor"
13
+ d="M14.776 17.083H6.01v-10l5.529-5.496.705.705q.13.129.215.344.086.213.086.403v.211l-.885 3.833h5.584q.594 0 1.05.456t.456 1.05v1.347q0 .13-.034.28-.033.15-.075.28l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-7.516-1.25h7.516a.4.4 0 0 0 .18-.048.3.3 0 0 0 .14-.16L17.5 10V8.59a.25.25 0 0 0-.072-.184.25.25 0 0 0-.184-.073H10.08l1.045-4.567-3.865 3.85zm-1.25-8.75v1.25H3.333v7.5H6.01v1.25H2.083v-10z"
14
+ />
15
+ </>
16
+ )
17
+ return <SVG {...props}>{svgContent}</SVG>
18
+ }
@@ -0,0 +1,18 @@
1
+ // This file is autogenerated by wrapSVGs.ts
2
+ // Changes to this file will be overwritten
3
+
4
+ import React from "react"
5
+ import { SVG } from "~components/Icon/subcomponents/SVG"
6
+ import type { IconProps } from "~components/Icon/types"
7
+
8
+ export const ThumbsUpOnIcon = (props: IconProps): JSX.Element => {
9
+ const svgContent = (
10
+ <>
11
+ <path
12
+ fill="currentColor"
13
+ d="M14.776 17.083H6.522v-10l5.53-5.496.704.705q.13.129.216.344.086.213.086.403v.211l-.885 3.833h5.07q.595 0 1.051.456t.456 1.05v1.347a1.6 1.6 0 0 1-.109.56l-2.388 5.635q-.18.401-.6.677a1.6 1.6 0 0 1-.877.275m-9.504-10v10H2.083v-10z"
14
+ />
15
+ </>
16
+ )
17
+ return <SVG {...props}>{svgContent}</SVG>
18
+ }
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react"
2
2
  import { Meta, StoryObj } from "@storybook/react"
3
3
  import * as ICONS from "~components/Icon"
4
- import { SearchField } from "~components/SearchField"
4
+ import { Text } from "~components/Text"
5
5
  import { Tag } from "~components/__future__/Tag"
6
6
  import { AddIcon } from "../index"
7
7
  import styles from "./icon.stories.scss"
@@ -63,12 +63,17 @@ const ReferenceButton = ({
63
63
  <li key={iconName}>
64
64
  <button type="button" className={styles.button} onClick={handleCopy}>
65
65
  {copied ? (
66
- <Tag color="green" classNameOverride={styles.tag}>
67
- Copied!
68
- </Tag>
66
+ <span className={styles.copiedTag}>
67
+ <Tag color="green" classNameOverride={styles.tag}>
68
+ Copied!
69
+ </Tag>
70
+ </span>
69
71
  ) : (
70
72
  <>
71
- {icon} {iconName}
73
+ <span className={styles.icon}>{icon}</span>
74
+ <Text variant="small" tag="span">
75
+ {iconName}
76
+ </Text>
72
77
  </>
73
78
  )}
74
79
  </button>
@@ -76,39 +81,28 @@ const ReferenceButton = ({
76
81
  )
77
82
  }
78
83
 
79
- export const Reference: Story = {
80
- render: () => {
81
- const [searchTerm, setSearchTerm] = useState<string>("")
84
+ /**
85
+ * Deprecated icons will still exist in as a React component but have been removed from the assets folder
86
+ * This will remove them from the documentation but give us time to remove them in the next major
87
+ */
88
+ const deprecatedList: string[] = ["ThumbsUpIcon", "ThumbsDownIcon"]
82
89
 
83
- return (
84
- <div className="flex flex-col gap-16">
85
- <SearchField
86
- labelText="Find icon by name"
87
- onChange={event => {
88
- setSearchTerm(event.target.value)
89
- }}
90
- />
91
- <ul className={styles.grid}>
92
- {Object.keys(ICONS)
93
- .filter(iconName => {
94
- const term = new RegExp(searchTerm, "i")
95
- return iconName.match(term)
90
+ export const Reference: Story = {
91
+ render: () => (
92
+ <div className="flex flex-col gap-16">
93
+ <ul className={styles.grid}>
94
+ {Object.keys(ICONS)
95
+ .filter(iconName => !deprecatedList.includes(iconName))
96
+ .map(iconName => {
97
+ const icon = ICONS[iconName as keyof typeof ICONS]({
98
+ role: "presentation",
96
99
  })
97
- .map(iconName => {
98
- const icon = ICONS[iconName as keyof typeof ICONS]({
99
- role: "presentation",
100
- })
101
100
 
102
- return (
103
- <ReferenceButton
104
- key={iconName}
105
- icon={icon}
106
- iconName={iconName}
107
- />
108
- )
109
- })}
110
- </ul>
111
- </div>
112
- )
113
- },
101
+ return (
102
+ <ReferenceButton key={iconName} icon={icon} iconName={iconName} />
103
+ )
104
+ })}
105
+ </ul>
106
+ </div>
107
+ ),
114
108
  }
@@ -2,8 +2,8 @@
2
2
 
3
3
  .grid {
4
4
  display: grid;
5
- grid-template-columns: repeat(6, 1fr);
6
- grid-template-rows: repeat(6, 1fr);
5
+ grid-template-columns: repeat(6, 150px);
6
+ grid-template-rows: min-content;
7
7
  grid-gap: var(--spacing-8);
8
8
  margin: 0;
9
9
  padding: 0;
@@ -13,14 +13,13 @@
13
13
  .button {
14
14
  @include button-reset;
15
15
 
16
- display: flex;
16
+ display: inline-flex;
17
17
  flex-direction: column;
18
18
  align-items: center;
19
- justify-content: center;
20
- gap: var(--spacing-16);
21
- padding: var(--spacing-8);
22
- width: 150px;
23
- height: 100px;
19
+ gap: var(--spacing-8);
20
+ padding: var(--spacing-16);
21
+ width: 100%;
22
+ height: 100%;
24
23
  background-color: var(--color-gray-100);
25
24
  border-radius: var(--border-solid-border-radius);
26
25
  word-break: break-all;
@@ -31,6 +30,14 @@
31
30
  }
32
31
  }
33
32
 
33
+ .copiedTag {
34
+ margin: auto;
35
+ }
36
+
37
+ .icon {
38
+ margin-bottom: var(--spacing-8);
39
+ }
40
+
34
41
  .tag {
35
42
  border: 1px solid var(--color-green-500);
36
43
  }
package/src/Icon/index.ts CHANGED
@@ -217,7 +217,11 @@ export * from "./TemplateWhiteIcon"
217
217
  export * from "./TextAnalyticsIcon"
218
218
  export * from "./TextAnalyticsWhiteIcon"
219
219
  export * from "./ThumbsDownIcon"
220
+ export * from "./ThumbsDownOffIcon"
221
+ export * from "./ThumbsDownOnIcon"
220
222
  export * from "./ThumbsUpIcon"
223
+ export * from "./ThumbsUpOffIcon"
224
+ export * from "./ThumbsUpOnIcon"
221
225
  export * from "./TimeIcon"
222
226
  export * from "./TimeWhiteIcon"
223
227
  export * from "./TranslationIcon"
package/src/index.ts CHANGED
@@ -57,6 +57,7 @@ export * from "./TimeField"
57
57
  export * from "./TitleBlockZen"
58
58
  export * from "./ToggleSwitch"
59
59
  export * from "./Tooltip"
60
+ export * from "./utils"
60
61
  export * from "./VisuallyHidden"
61
62
  export * from "./Well"
62
63
  export * from "./Workflow"
@@ -0,0 +1,2 @@
1
+ // Not all utils are exported because most are intended for internal use only
2
+ export * from "./useMediaQueries"