@popsure/dirty-swan 0.41.14 → 0.41.15
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/cjs/index.js +3 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/components/input/radio/index.d.ts +2 -1
- package/dist/cjs/lib/components/input/radio/index.stories.d.ts +11 -7
- package/dist/esm/components/input/radio/index.js +3 -3
- package/dist/esm/components/input/radio/index.js.map +1 -1
- package/dist/esm/components/input/radio/index.stories.js +32 -28
- package/dist/esm/components/input/radio/index.stories.js.map +1 -1
- package/dist/esm/components/input/radio/index.test.js +14 -0
- package/dist/esm/components/input/radio/index.test.js.map +1 -1
- package/dist/esm/lib/components/input/radio/index.d.ts +2 -1
- package/dist/esm/lib/components/input/radio/index.stories.d.ts +11 -7
- package/dist/index.css +8 -0
- package/dist/index.css.map +1 -1
- package/dist/lib/scss/private/components/_input.scss +12 -1
- package/package.json +1 -1
- package/src/lib/components/input/radio/index.stories.tsx +101 -76
- package/src/lib/components/input/radio/index.test.tsx +19 -0
- package/src/lib/components/input/radio/index.tsx +6 -3
- package/src/lib/scss/private/components/_input.scss +12 -1
package/dist/cjs/index.js
CHANGED
|
@@ -8456,7 +8456,7 @@ styleInject(css_248z$o);
|
|
|
8456
8456
|
|
|
8457
8457
|
var Radio = function (_a) {
|
|
8458
8458
|
var _b;
|
|
8459
|
-
var options = _a.options, value = _a.value, onChange = _a.onChange, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.inlineLayout, inlineLayout = _d === void 0 ? false : _d, _e = _a.inlineIcon, inlineIcon = _e === void 0 ? false : _e, classNamesObj = _a.classNames, _f = _a.bordered, bordered = _f === void 0 ? true : _f;
|
|
8459
|
+
var options = _a.options, value = _a.value, onChange = _a.onChange, _c = _a.wide, wide = _c === void 0 ? false : _c, _d = _a.inlineLayout, inlineLayout = _d === void 0 ? false : _d, _e = _a.inlineIcon, inlineIcon = _e === void 0 ? false : _e, classNamesObj = _a.classNames, _f = _a.bordered, bordered = _f === void 0 ? true : _f, _g = _a.disabled, disabled = _g === void 0 ? false : _g;
|
|
8460
8460
|
var entries = Object.entries(options);
|
|
8461
8461
|
return (jsxRuntime.jsx("div", __assign({ className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.container, styles$n.container, 'd-flex gap8', (_b = {},
|
|
8462
8462
|
_b[styles$n.wide] = wide,
|
|
@@ -8476,12 +8476,12 @@ var Radio = function (_a) {
|
|
|
8476
8476
|
return (jsxRuntime.jsxs("div", __assign({ className: classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.option }, { children: [jsxRuntime.jsx("input", { className: classNames('p-radio', {
|
|
8477
8477
|
'p-radio--no-icon': customIcon || hideIcon,
|
|
8478
8478
|
'p-radio--centered': !label,
|
|
8479
|
-
}), id: currentValue, type: "radio", value: currentValue, onChange: function () { return onChange(currentValue); }, checked: checked, "data-testid": "radio-input-" + currentValue }, void 0),
|
|
8479
|
+
}), id: currentValue, type: "radio", value: currentValue, onChange: function () { return onChange(currentValue); }, checked: checked, "data-testid": "radio-input-" + currentValue, disabled: disabled }, void 0),
|
|
8480
8480
|
jsxRuntime.jsxs("label", __assign({ htmlFor: currentValue, className: classNames(classNamesObj === null || classNamesObj === void 0 ? void 0 : classNamesObj.label, 'p-label', {
|
|
8481
8481
|
'jc-center': customIcon && !inlineIcon,
|
|
8482
8482
|
'fd-column': customIcon && !inlineIcon,
|
|
8483
8483
|
'p-label--bordered': bordered,
|
|
8484
|
-
}), "data-cy": "radio-" + currentValue, "data-testid": "radio-" + currentValue }, { children: [customIcon && (jsxRuntime.jsx("div", __assign({ className: classNames(
|
|
8484
|
+
}), "data-cy": "radio-" + currentValue, "data-testid": "radio-" + currentValue }, { children: [customIcon && (jsxRuntime.jsx("div", __assign({ className: classNames('d-inline-flex ai-center jc-center', inlineIcon ? 'mr8' : 'mt8') }, { children: customIcon === null || customIcon === void 0 ? void 0 : customIcon(checked) }), void 0)),
|
|
8485
8485
|
isRadioLabelObject(label) ? (jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("p", __assign({ className: "p-p" }, { children: label.title }), void 0),
|
|
8486
8486
|
jsxRuntime.jsx("span", __assign({ className: "d-block p-p p-p--small tc-grey-600" }, { children: label.description }), void 0)] }, void 0)) : (label)] }), void 0)] }), currentValue));
|
|
8487
8487
|
}) }), void 0));
|