@linzjs/lui 17.49.1 → 17.49.2
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/LuiFormElements/LuiCheckboxInput/LuiCheckboxInput.d.ts +1 -1
- package/dist/components/LuiIcon/LuiIcon.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +8 -8
- package/dist/lui.esm.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [17.49.2](https://github.com/linz/lui/compare/v17.49.1...v17.49.2) (2023-04-04)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* expose refs to allow for using tooltips with icons and checkboxes ([3c5ebd3](https://github.com/linz/lui/commit/3c5ebd3580547029d4b54647d766e0bd9ea7afa0))
|
|
7
|
+
|
|
1
8
|
## [17.49.1](https://github.com/linz/lui/compare/v17.49.0...v17.49.1) (2023-04-04)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -12,4 +12,4 @@ export interface LuiCheckboxProps {
|
|
|
12
12
|
titleAttribute?: string;
|
|
13
13
|
mandatory?: boolean;
|
|
14
14
|
}
|
|
15
|
-
export declare const LuiCheckboxInput:
|
|
15
|
+
export declare const LuiCheckboxInput: React.ForwardRefExoticComponent<LuiCheckboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICONS } from '../../assets/svg-content';
|
|
2
|
-
import { InputHTMLAttributes } from 'react';
|
|
2
|
+
import React, { InputHTMLAttributes } from 'react';
|
|
3
3
|
export declare type IconSize = keyof typeof ICON_SIZES;
|
|
4
4
|
export declare type IconStatus = keyof typeof ICON_STATUS;
|
|
5
5
|
export declare type IconName = keyof typeof ICONS;
|
|
@@ -32,4 +32,4 @@ export declare const ICON_STATUS: {
|
|
|
32
32
|
interactive: string;
|
|
33
33
|
disabled: string;
|
|
34
34
|
};
|
|
35
|
-
export declare const LuiIcon:
|
|
35
|
+
export declare const LuiIcon: React.ForwardRefExoticComponent<LuiIconProps & React.RefAttributes<HTMLSpanElement>>;
|
package/dist/index.js
CHANGED
|
@@ -570,8 +570,8 @@ var ICON_STATUS = {
|
|
|
570
570
|
interactive: 'LuiIcon--interactive',
|
|
571
571
|
disabled: 'LuiIcon--disabled'
|
|
572
572
|
};
|
|
573
|
-
var LuiIcon = function (
|
|
574
|
-
var name =
|
|
573
|
+
var LuiIcon = React.forwardRef(function (props, ref) {
|
|
574
|
+
var name = props.name, className = props.className, _a = props.size, size = _a === void 0 ? 'ns' : _a, title = props.title, alt = props.alt, _b = props.status, status = _b === void 0 ? 'none' : _b, spanProps = props.spanProps, color = props.color;
|
|
575
575
|
var iconSVG = ICONS[name];
|
|
576
576
|
if (!iconSVG) {
|
|
577
577
|
console.warn("<LuiIcon>: No icon found for: ".concat(iconSVG));
|
|
@@ -579,8 +579,8 @@ var LuiIcon = function (_a) {
|
|
|
579
579
|
}
|
|
580
580
|
var customStyle = color
|
|
581
581
|
? __assign(__assign({}, spanProps === null || spanProps === void 0 ? void 0 : spanProps.style), { fill: color }) : spanProps === null || spanProps === void 0 ? void 0 : spanProps.style;
|
|
582
|
-
return (
|
|
583
|
-
};
|
|
582
|
+
return (React__default["default"].createElement("span", __assign({ ref: ref, className: clsx('LuiIcon', className, size && ICON_SIZES[size], status && ICON_STATUS[status]), "data-icon": name, title: title, "aria-label": alt }, spanProps, { style: customStyle }), iconSVG));
|
|
583
|
+
});
|
|
584
584
|
|
|
585
585
|
function getMaterialIconForLevel(level) {
|
|
586
586
|
switch (level) {
|
|
@@ -28181,10 +28181,10 @@ var LuiTextInput = React.forwardRef(function (props, ref) {
|
|
|
28181
28181
|
props.warning)))));
|
|
28182
28182
|
});
|
|
28183
28183
|
|
|
28184
|
-
var LuiCheckboxInput = function (props) {
|
|
28184
|
+
var LuiCheckboxInput = React.forwardRef(function (props, ref) {
|
|
28185
28185
|
var _a;
|
|
28186
28186
|
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
28187
|
-
return (React__default["default"].createElement("div", { className: clsx('LuiCheckboxInput', {
|
|
28187
|
+
return (React__default["default"].createElement("div", { ref: ref, className: clsx('LuiCheckboxInput', {
|
|
28188
28188
|
'LuiCheckboxInput--isChecked': props.isChecked,
|
|
28189
28189
|
'LuiCheckboxInput--hasError': !!props.error,
|
|
28190
28190
|
'LuiCheckboxInput--isDisabled': !!props.isDisabled
|
|
@@ -28196,7 +28196,7 @@ var LuiCheckboxInput = function (props) {
|
|
|
28196
28196
|
props.label,
|
|
28197
28197
|
React__default["default"].createElement(LuiIcon, { name: props.isIndeterminate ? 'ic_zoom_out' : 'ic_check', size: "md", alt: props.isIndeterminate ? 'Indeterminate Check' : 'Check', className: "LuiCheckboxInput-labelCheck", title: props.titleAttribute }))),
|
|
28198
28198
|
props.error && (React__default["default"].createElement(LuiError, { className: "LuiCheckboxInput", error: props.error }))));
|
|
28199
|
-
};
|
|
28199
|
+
});
|
|
28200
28200
|
|
|
28201
28201
|
var LuiFileInputBox = function (props) {
|
|
28202
28202
|
var _a = React.useState(), file = _a[0], setFile = _a[1];
|