carbon-react 147.7.0 → 147.7.1
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.
|
@@ -48,7 +48,7 @@ const Time = /*#__PURE__*/React.forwardRef(({
|
|
|
48
48
|
} = minutesInputProps;
|
|
49
49
|
const internalHrsId = useRef(hoursInputId || guid());
|
|
50
50
|
const internalMinsId = useRef(minutesInputId || guid());
|
|
51
|
-
const inputHintId = useRef(guid());
|
|
51
|
+
const inputHintId = useRef(inputHint ? guid() : undefined);
|
|
52
52
|
const internalId = useRef(`${internalHrsId.current} ${internalMinsId.current}`);
|
|
53
53
|
const {
|
|
54
54
|
hours: hourValue,
|
|
@@ -151,7 +151,7 @@ const Time = /*#__PURE__*/React.forwardRef(({
|
|
|
151
151
|
name: name,
|
|
152
152
|
id: internalId.current
|
|
153
153
|
}, rest, tagComponent("time", rest), {
|
|
154
|
-
"aria-describedby": combinedAriaDescribedBy
|
|
154
|
+
"aria-describedby": inputHint ? combinedAriaDescribedBy : ariaDescribedBy
|
|
155
155
|
}), inputHint && /*#__PURE__*/React.createElement(Hint, {
|
|
156
156
|
id: inputHintId.current,
|
|
157
157
|
isDisabled: disabled
|
|
@@ -57,7 +57,7 @@ const Time = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
57
57
|
} = minutesInputProps;
|
|
58
58
|
const internalHrsId = (0, _react.useRef)(hoursInputId || (0, _guid.default)());
|
|
59
59
|
const internalMinsId = (0, _react.useRef)(minutesInputId || (0, _guid.default)());
|
|
60
|
-
const inputHintId = (0, _react.useRef)((0, _guid.default)());
|
|
60
|
+
const inputHintId = (0, _react.useRef)(inputHint ? (0, _guid.default)() : undefined);
|
|
61
61
|
const internalId = (0, _react.useRef)(`${internalHrsId.current} ${internalMinsId.current}`);
|
|
62
62
|
const {
|
|
63
63
|
hours: hourValue,
|
|
@@ -160,7 +160,7 @@ const Time = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
160
160
|
name: name,
|
|
161
161
|
id: internalId.current
|
|
162
162
|
}, rest, (0, _tags.default)("time", rest), {
|
|
163
|
-
"aria-describedby": combinedAriaDescribedBy
|
|
163
|
+
"aria-describedby": inputHint ? combinedAriaDescribedBy : ariaDescribedBy
|
|
164
164
|
}), inputHint && /*#__PURE__*/_react.default.createElement(_time.StyledHintText, {
|
|
165
165
|
id: inputHintId.current,
|
|
166
166
|
isDisabled: disabled
|