@carbon/react 1.106.0-rc.0 → 1.106.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.
|
@@ -80,15 +80,22 @@ const DatePickerInput = forwardRef((props, ref) => {
|
|
|
80
80
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && normalizedProps.warn
|
|
81
81
|
});
|
|
82
82
|
const datePickerInputHelperId = !helperText ? void 0 : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
|
|
83
|
+
let ariaDescribedBy;
|
|
84
|
+
if (normalizedProps.invalid) ariaDescribedBy = normalizedProps.invalidId;
|
|
85
|
+
else if (normalizedProps.warn) ariaDescribedBy = normalizedProps.warnId;
|
|
86
|
+
else ariaDescribedBy = helperText ? datePickerInputHelperId : void 0;
|
|
83
87
|
const inputProps = {
|
|
84
88
|
...rest,
|
|
85
89
|
...datePickerInputProps,
|
|
86
90
|
className: inputClasses,
|
|
87
91
|
disabled: normalizedProps.disabled,
|
|
88
92
|
ref,
|
|
89
|
-
["aria-describedby"]:
|
|
93
|
+
["aria-describedby"]: ariaDescribedBy
|
|
90
94
|
};
|
|
91
|
-
if (normalizedProps.invalid)
|
|
95
|
+
if (normalizedProps.invalid) {
|
|
96
|
+
inputProps["data-invalid"] = true;
|
|
97
|
+
inputProps["aria-invalid"] = true;
|
|
98
|
+
}
|
|
92
99
|
const input = /* @__PURE__ */ jsx("input", { ...inputProps });
|
|
93
100
|
const candidate = slug ?? decorator;
|
|
94
101
|
const normalizedDecorator = isComponentElement(candidate, AILabel) ? cloneElement(candidate, { size: "mini" }) : candidate;
|
|
@@ -84,15 +84,22 @@ const DatePickerInput = (0, react.forwardRef)((props, ref) => {
|
|
|
84
84
|
[`${prefix}--date-picker--fluid--warn`]: isFluid && normalizedProps.warn
|
|
85
85
|
});
|
|
86
86
|
const datePickerInputHelperId = !helperText ? void 0 : `datepicker-input-helper-text-${datePickerInputInstanceId}`;
|
|
87
|
+
let ariaDescribedBy;
|
|
88
|
+
if (normalizedProps.invalid) ariaDescribedBy = normalizedProps.invalidId;
|
|
89
|
+
else if (normalizedProps.warn) ariaDescribedBy = normalizedProps.warnId;
|
|
90
|
+
else ariaDescribedBy = helperText ? datePickerInputHelperId : void 0;
|
|
87
91
|
const inputProps = {
|
|
88
92
|
...rest,
|
|
89
93
|
...datePickerInputProps,
|
|
90
94
|
className: inputClasses,
|
|
91
95
|
disabled: normalizedProps.disabled,
|
|
92
96
|
ref,
|
|
93
|
-
["aria-describedby"]:
|
|
97
|
+
["aria-describedby"]: ariaDescribedBy
|
|
94
98
|
};
|
|
95
|
-
if (normalizedProps.invalid)
|
|
99
|
+
if (normalizedProps.invalid) {
|
|
100
|
+
inputProps["data-invalid"] = true;
|
|
101
|
+
inputProps["aria-invalid"] = true;
|
|
102
|
+
}
|
|
96
103
|
const input = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...inputProps });
|
|
97
104
|
const candidate = slug ?? decorator;
|
|
98
105
|
const normalizedDecorator = require_utils.isComponentElement(candidate, require_index.AILabel) ? (0, react.cloneElement)(candidate, { size: "mini" }) : candidate;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/react",
|
|
3
3
|
"description": "React components for the Carbon Design System",
|
|
4
|
-
"version": "1.106.0
|
|
4
|
+
"version": "1.106.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"types": "lib/index.d.ts",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
54
|
"@babel/runtime": "^7.27.3",
|
|
55
|
-
"@carbon/feature-flags": "^1.3.0
|
|
56
|
-
"@carbon/icons-react": "^11.79.0
|
|
57
|
-
"@carbon/layout": "^11.52.0
|
|
58
|
-
"@carbon/styles": "^1.105.0
|
|
59
|
-
"@carbon/utilities": "^0.19.0
|
|
55
|
+
"@carbon/feature-flags": "^1.3.0",
|
|
56
|
+
"@carbon/icons-react": "^11.79.0",
|
|
57
|
+
"@carbon/layout": "^11.52.0",
|
|
58
|
+
"@carbon/styles": "^1.105.0",
|
|
59
|
+
"@carbon/utilities": "^0.19.0",
|
|
60
60
|
"@floating-ui/react": "^0.27.4",
|
|
61
61
|
"@ibm/telemetry-js": "^1.5.0",
|
|
62
62
|
"classnames": "2.5.1",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"@babel/preset-react": "^7.27.1",
|
|
80
80
|
"@babel/preset-typescript": "^7.27.1",
|
|
81
81
|
"@carbon/test-utils": "^10.41.0",
|
|
82
|
-
"@carbon/themes": "^11.72.0
|
|
82
|
+
"@carbon/themes": "^11.72.0",
|
|
83
83
|
"@figma/code-connect": "^1.4.2",
|
|
84
84
|
"@stackblitz/sdk": "^1.11.0",
|
|
85
85
|
"@storybook/addon-a11y": "^9.1.8",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"**/*.scss",
|
|
126
126
|
"**/*.css"
|
|
127
127
|
],
|
|
128
|
-
"gitHead": "
|
|
128
|
+
"gitHead": "5e89339998bd16c8ddd42e1cc6a2d0c15b3b0af5"
|
|
129
129
|
}
|