@moda/om 21.6.6 → 21.6.8
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/dist/index.cjs.js +11 -18
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +11 -18
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/RadioButton/RadioButton.stories.d.ts +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/components/RadioButton/RadioButton.scss +5 -0
- package/src/components/RadioButton/RadioButton.stories.tsx +18 -20
- package/src/components/RadioButton/RadioButton.tsx +3 -15
- package/src/components/SearchInput/SearchInput.test.tsx +3 -3
- package/src/components/SearchInput/SearchInput.tsx +9 -3
package/dist/index.cjs.js
CHANGED
|
@@ -10375,11 +10375,13 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
10375
10375
|
return /*#__PURE__*/React.createElement("div", {
|
|
10376
10376
|
className: classNames('SearchInput', className)
|
|
10377
10377
|
}, /*#__PURE__*/React.createElement("div", {
|
|
10378
|
-
className: "SearchInput__icon"
|
|
10378
|
+
className: "SearchInput__icon",
|
|
10379
|
+
"aria-hidden": "true"
|
|
10379
10380
|
}, /*#__PURE__*/React.createElement(Search20, {
|
|
10380
10381
|
height: "".concat(searchIconSize, "px"),
|
|
10381
10382
|
width: "".concat(searchIconSize, "px")
|
|
10382
10383
|
})), /*#__PURE__*/React.createElement(TextInput, _extends$1({
|
|
10384
|
+
type: "search",
|
|
10383
10385
|
className: classNames('SearchInput__input', {
|
|
10384
10386
|
'SearchInput__input--round-borders': roundBorders,
|
|
10385
10387
|
'SearchInput__input--no-borders': noBorders
|
|
@@ -10390,8 +10392,11 @@ var SearchInput = function SearchInput(_ref) {
|
|
|
10390
10392
|
}, rest)), controlledValue && /*#__PURE__*/React.createElement(Clickable, {
|
|
10391
10393
|
className: "SearchInput__clear",
|
|
10392
10394
|
onClick: handleClear,
|
|
10393
|
-
type: "reset"
|
|
10394
|
-
|
|
10395
|
+
type: "reset",
|
|
10396
|
+
"aria-label": "Clear search"
|
|
10397
|
+
}, /*#__PURE__*/React.createElement(Exit20, {
|
|
10398
|
+
"aria-hidden": "true"
|
|
10399
|
+
})));
|
|
10395
10400
|
};
|
|
10396
10401
|
|
|
10397
10402
|
var t = function t(_t) {
|
|
@@ -12442,46 +12447,34 @@ var PromoBanner = function PromoBanner(_ref) {
|
|
|
12442
12447
|
})));
|
|
12443
12448
|
};
|
|
12444
12449
|
|
|
12445
|
-
var _excluded$7 = ["className", "checked", "children", "value", "
|
|
12450
|
+
var _excluded$7 = ["className", "checked", "children", "value", "disabled"];
|
|
12446
12451
|
var RadioButton = function RadioButton(_ref) {
|
|
12447
12452
|
var className = _ref.className,
|
|
12448
12453
|
checked = _ref.checked,
|
|
12449
12454
|
children = _ref.children,
|
|
12450
12455
|
value = _ref.value,
|
|
12451
|
-
tabIndex = _ref.tabIndex,
|
|
12452
12456
|
disabled = _ref.disabled,
|
|
12453
12457
|
rest = _objectWithoutProperties(_ref, _excluded$7);
|
|
12454
|
-
var inputRef = React.useRef(null);
|
|
12455
12458
|
return /*#__PURE__*/React.createElement("label", {
|
|
12456
|
-
tabIndex: tabIndex !== null && tabIndex !== void 0 ? tabIndex : 0,
|
|
12457
|
-
onKeyDown: function onKeyDown(_ref2) {
|
|
12458
|
-
var _inputRef$current;
|
|
12459
|
-
var key = _ref2.key;
|
|
12460
|
-
return (key === 'Enter' || key === ' ') && ((_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.click());
|
|
12461
|
-
},
|
|
12462
12459
|
className: classNames('RadioButton', className, {
|
|
12463
12460
|
'RadioButton--checked': checked,
|
|
12464
12461
|
'RadioButton--disabled': disabled
|
|
12465
12462
|
})
|
|
12466
12463
|
}, /*#__PURE__*/React.createElement("span", {
|
|
12467
|
-
|
|
12464
|
+
"aria-hidden": "true",
|
|
12468
12465
|
className: classNames('RadioButton__indicator', {
|
|
12469
12466
|
'RadioButton__indicator--checked': checked,
|
|
12470
12467
|
'RadioButton__indicator--unchecked': !checked,
|
|
12471
12468
|
'RadioButton__indicator--disabled': disabled
|
|
12472
12469
|
})
|
|
12473
12470
|
}), /*#__PURE__*/React.createElement("input", _extends$1({
|
|
12474
|
-
ref: inputRef,
|
|
12475
|
-
tabIndex: -1,
|
|
12476
12471
|
className: "RadioButton__input",
|
|
12477
12472
|
type: "radio",
|
|
12478
|
-
role: "radio",
|
|
12479
12473
|
checked: checked,
|
|
12480
12474
|
value: value,
|
|
12481
12475
|
disabled: disabled
|
|
12482
12476
|
}, rest)), children && /*#__PURE__*/React.createElement("span", {
|
|
12483
|
-
className: "RadioButton__label"
|
|
12484
|
-
tabIndex: -1
|
|
12477
|
+
className: "RadioButton__label"
|
|
12485
12478
|
}, children));
|
|
12486
12479
|
};
|
|
12487
12480
|
|