@kaizen/components 1.38.4 → 1.38.5

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.38.4",
3
+ "version": "1.38.5",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -44,26 +44,26 @@
44
44
  "dependencies": {
45
45
  "@floating-ui/react-dom": "^2.0.4",
46
46
  "@headlessui/react": "<=1.5.0",
47
- "@internationalized/date": "^3.5.0",
47
+ "@internationalized/date": "^3.5.1",
48
48
  "@kaizen/hosted-assets": "^2.0.3",
49
49
  "@popperjs/core": "^2.11.8",
50
50
  "@reach/tabs": "^0.18.0",
51
- "@react-aria/button": "^3.9.0",
52
- "@react-aria/datepicker": "^3.9.0",
53
- "@react-aria/focus": "^3.15.0",
54
- "@react-aria/i18n": "^3.9.0",
55
- "@react-aria/listbox": "^3.11.2",
56
- "@react-aria/menu": "^3.11.2",
57
- "@react-aria/overlays": "^3.19.0",
58
- "@react-aria/select": "^3.14.0",
59
- "@react-aria/utils": "^3.22.0",
60
- "@react-stately/collections": "^3.10.3",
61
- "@react-stately/datepicker": "^3.9.0",
62
- "@react-stately/list": "^3.10.1",
63
- "@react-stately/menu": "^3.5.7",
64
- "@react-stately/select": "^3.6.0",
51
+ "@react-aria/button": "^3.9.1",
52
+ "@react-aria/datepicker": "^3.9.1",
53
+ "@react-aria/focus": "^3.16.0",
54
+ "@react-aria/i18n": "^3.10.0",
55
+ "@react-aria/listbox": "^3.11.3",
56
+ "@react-aria/menu": "^3.12.0",
57
+ "@react-aria/overlays": "^3.20.0",
58
+ "@react-aria/select": "^3.14.1",
59
+ "@react-aria/utils": "^3.23.0",
60
+ "@react-stately/collections": "^3.10.4",
61
+ "@react-stately/datepicker": "^3.9.1",
62
+ "@react-stately/list": "^3.10.2",
63
+ "@react-stately/menu": "^3.6.0",
64
+ "@react-stately/select": "^3.6.1",
65
65
  "@react-types/shared": "^3.22.0",
66
- "classnames": "^2.3.2",
66
+ "classnames": "^2.5.1",
67
67
  "date-fns": "^2.30.0",
68
68
  "lodash.debounce": "^4.0.8",
69
69
  "nanobus": "^4.5.0",
@@ -96,10 +96,10 @@
96
96
  },
97
97
  "devDependencies": {
98
98
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
99
- "@cultureamp/frontend-apis": "^9.0.2",
100
- "@cultureamp/i18n-react-intl": "^2.1.5",
99
+ "@cultureamp/frontend-apis": "^9.1.3",
100
+ "@cultureamp/i18n-react-intl": "^2.1.8",
101
101
  "@kaizen/design-tokens": "^10.3.17",
102
- "@kaizen/tailwind": "^1.2.1",
102
+ "@kaizen/tailwind": "^1.2.2",
103
103
  "@rollup/plugin-alias": "^5.1.0",
104
104
  "@rollup/plugin-babel": "^6.0.4",
105
105
  "@rollup/plugin-commonjs": "^25.0.7",
@@ -108,7 +108,7 @@
108
108
  "@rollup/plugin-node-resolve": "^15.2.3",
109
109
  "@rollup/plugin-typescript": "^11.1.5",
110
110
  "@types/lodash.debounce": "^4.0.9",
111
- "@types/react-dom": "^18.2.17",
111
+ "@types/react-dom": "^18.2.18",
112
112
  "@types/react-textfit": "^1.1.4",
113
113
  "@types/uuid": "^9.0.7",
114
114
  "agadoo": "^3.0.0",
@@ -117,12 +117,12 @@
117
117
  "concat-cli": "^4.0.0",
118
118
  "query-string": "^8.1.0",
119
119
  "react-intl": "^6.5.5",
120
- "rollup": "^4.6.0",
120
+ "rollup": "^4.9.2",
121
121
  "rollup-plugin-dts": "^6.1.0",
122
122
  "rollup-plugin-ignore": "^1.0.10",
123
123
  "rollup-plugin-node-externals": "^6.1.2",
124
124
  "rollup-plugin-postcss": "^4.0.2",
125
- "sass": "^1.69.5",
125
+ "sass": "^1.69.6",
126
126
  "serialize-query-params": "^2.0.2",
127
127
  "svgo": "^3.1.0",
128
128
  "ts-jest": "^29.1.1",
@@ -130,7 +130,7 @@
130
130
  "typescript-transform-paths": "^3.4.6"
131
131
  },
132
132
  "peerDependencies": {
133
- "@cultureamp/i18n-react-intl": "^2.1.5",
133
+ "@cultureamp/i18n-react-intl": "^2.1.8",
134
134
  "react": "^18.2.0",
135
135
  "react-intl": "^6.5.5"
136
136
  }
@@ -18,7 +18,8 @@ $input-height: 48px;
18
18
  color: $color-purple-800;
19
19
  }
20
20
 
21
- .heading {
21
+ .label {
22
+ display: block;
22
23
  margin-bottom: $spacing-6;
23
24
  }
24
25
 
@@ -8,7 +8,7 @@ import {
8
8
  } from "@react-stately/datepicker"
9
9
  import classnames from "classnames"
10
10
  import { FieldMessage } from "~components/FieldMessage"
11
- import { Heading } from "~components/Heading"
11
+ import { Label } from "~components/Label"
12
12
  import { OverrideClassName } from "~types/OverrideClassName"
13
13
  import { TimeSegment } from "./subcomponents/TimeSegment"
14
14
  import { StatusType, TimeValue, ValueType } from "./types"
@@ -79,7 +79,9 @@ const TimeFieldComponent = ({
79
79
  locale,
80
80
  validationState: status === "default" ? "valid" : "invalid",
81
81
  })
82
- const descriptionId = `${id}-field-message`
82
+
83
+ const hasError = !!validationMessage && status === "error"
84
+ const descriptionId = hasError ? `${id}-field-message` : undefined
83
85
 
84
86
  const inputRef = React.useRef(null)
85
87
  const { fieldProps, labelProps } = useTimeField(
@@ -94,17 +96,13 @@ const TimeFieldComponent = ({
94
96
  )
95
97
  return (
96
98
  <div className={classNameOverride}>
97
- <Heading
98
- tag="div"
99
- variant="heading-6"
99
+ <Label
100
+ disabled={state.isDisabled}
100
101
  {...labelProps}
101
- classNameOverride={classnames(
102
- styles.heading,
103
- state.isDisabled && styles.isDisabled
104
- )}
102
+ classNameOverride={styles.label}
105
103
  >
106
104
  {label}
107
- </Heading>
105
+ </Label>
108
106
  <div className={styles.wrapper}>
109
107
  {/* eslint-disable-next-line jsx-a11y/no-static-element-interactions, jsx-a11y/click-events-have-key-events */}
110
108
  <div
@@ -123,7 +121,7 @@ const TimeFieldComponent = ({
123
121
  <div className={styles.focusRing} />
124
122
  </div>
125
123
  </div>
126
- {validationMessage && status === "error" && (
124
+ {hasError && (
127
125
  <FieldMessage
128
126
  id={descriptionId}
129
127
  message={validationMessage}