@bolttech/atoms-segmented-control 0.22.2 → 0.24.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.
- package/index.cjs.js +5 -0
- package/package.json +4 -4
package/index.cjs.js
CHANGED
|
@@ -2402,6 +2402,9 @@ const SegmentedControl = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2402
2402
|
children: "Two options at minimum are required."
|
|
2403
2403
|
});
|
|
2404
2404
|
return options.map(option => jsxRuntime.jsx(Option, Object.assign({
|
|
2405
|
+
role: "radio",
|
|
2406
|
+
"aria-checked": option.value === value,
|
|
2407
|
+
"aria-disabled": option.disabled,
|
|
2405
2408
|
"data-testid": `segmentedcontrol-option-${option.value}${option.value === value ? '-active' : ''}`,
|
|
2406
2409
|
onClick: () => {
|
|
2407
2410
|
if (!option.disabled) {
|
|
@@ -2422,6 +2425,7 @@ const SegmentedControl = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2422
2425
|
}), `segmentedcontrol-option-${option.value}`));
|
|
2423
2426
|
};
|
|
2424
2427
|
return jsxRuntime.jsxs(SegmentedControlContainer, Object.assign({
|
|
2428
|
+
role: "radiogroup",
|
|
2425
2429
|
id: id,
|
|
2426
2430
|
"data-testid": dataTestId,
|
|
2427
2431
|
"$fullWidth": fullWidth,
|
|
@@ -2432,6 +2436,7 @@ const SegmentedControl = /*#__PURE__*/react.forwardRef((_a, ref) => {
|
|
|
2432
2436
|
onFocus: onFocus,
|
|
2433
2437
|
children: renderOptions()
|
|
2434
2438
|
}), errorMessage && jsxRuntime.jsx(LabelError, {
|
|
2439
|
+
role: 'alert',
|
|
2435
2440
|
"data-testid": `${dataTestId}-error`,
|
|
2436
2441
|
children: errorMessage
|
|
2437
2442
|
})]
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bolttech/atoms-segmented-control",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.24.0",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@bolttech/frontend-foundations": "0.
|
|
5
|
+
"@bolttech/frontend-foundations": "0.12.1",
|
|
6
6
|
"styled-components": "6.1.1",
|
|
7
|
-
"react": "19.1.
|
|
8
|
-
"@bolttech/ui-utils": "0.
|
|
7
|
+
"react": "19.1.2",
|
|
8
|
+
"@bolttech/ui-utils": "0.6.4"
|
|
9
9
|
},
|
|
10
10
|
"main": "./index.cjs.js",
|
|
11
11
|
"type": "commonjs",
|