@linzjs/lui 21.38.0 → 21.38.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.
- package/CHANGELOG.md +7 -0
- package/dist/components/LuiColourPicker/ColorInput.d.ts +2 -2
- package/dist/index.js +7 -4
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +7 -4
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/lui.esm.js
CHANGED
|
@@ -59322,10 +59322,13 @@ var ColorInputGroup = forwardRef$1(function (props, ref) {
|
|
|
59322
59322
|
return (React__default.createElement("div", __assign({ ref: ref }, props, { role: (_a = props.role) !== null && _a !== void 0 ? _a : 'lui-input-color-group', className: clsx('lui-input-color-group', props.className) })));
|
|
59323
59323
|
});
|
|
59324
59324
|
var ColorInput = forwardRef$1(function (props, ref) {
|
|
59325
|
-
var
|
|
59325
|
+
var _a;
|
|
59326
|
+
var randomId = $bdb11010cef70236$export$f680877a34711e37();
|
|
59327
|
+
var name = props.name, color = props.color, description = props.description, label = props.label, _b = props.id, id = _b === void 0 ? randomId : _b, input = __rest(props, ["name", "color", "description", "label", "id"]);
|
|
59328
|
+
var title = description || color;
|
|
59326
59329
|
return (React__default.createElement(React__default.Fragment, null,
|
|
59327
|
-
React__default.createElement("input", __assign({ ref: ref }, input, { name: name, type: "radio", id:
|
|
59328
|
-
React__default.createElement("label", __assign({}, label, { htmlFor:
|
|
59330
|
+
React__default.createElement("input", __assign({ ref: ref }, input, { title: (_a = input.title) !== null && _a !== void 0 ? _a : title, name: name, type: "radio", id: id, value: color, className: clsx('lui-input-color-radio', input.className) })),
|
|
59331
|
+
React__default.createElement("label", __assign({}, label, { htmlFor: id, style: __assign(__assign({}, label === null || label === void 0 ? void 0 : label.style), { color: color, backgroundColor: color }), className: clsx('lui-input-colour-label', label === null || label === void 0 ? void 0 : label.className), "aria-label": description || color, title: description }))));
|
|
59329
59332
|
});
|
|
59330
59333
|
|
|
59331
59334
|
/**
|
|
@@ -59338,7 +59341,7 @@ var ColorInput = forwardRef$1(function (props, ref) {
|
|
|
59338
59341
|
var ColorPalette = forwardRef$1(function (_a, ref) {
|
|
59339
59342
|
var _b;
|
|
59340
59343
|
var _c = _a.selected, selected = _c === void 0 ? (_b = defaultColours[0]) === null || _b === void 0 ? void 0 : _b.color : _c, onSelect = _a.onSelect; _a.children; var name = _a.name, className = _a.className, divProps = __rest(_a, ["selected", "onSelect", "children", "name", "className"]);
|
|
59341
|
-
var colourGroupIdentifier =
|
|
59344
|
+
var colourGroupIdentifier = $bdb11010cef70236$export$f680877a34711e37();
|
|
59342
59345
|
return (React__default.createElement(ColorInputGroup, __assign({ ref: ref }, divProps, { className: clsx('lui-color-picker', className) }), defaultColours.map(function (_a) {
|
|
59343
59346
|
var color = _a.color, description = _a.description;
|
|
59344
59347
|
return (React__default.createElement(ColorInput, __assign({ key: color, name: name !== null && name !== void 0 ? name : colourGroupIdentifier }, { color: color, description: description }, { checked: color === selected, onChange: function () { return onSelect(color); } })));
|