@linzjs/lui 17.35.1 → 17.35.3
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 +16 -0
- package/README.md +1 -1
- package/dist/components/LuiFormElements/LuiTextInput/LuiTextInput.d.ts +3 -3
- package/dist/components/LuiTabs/LuiTab/LuiTab.d.ts +2 -2
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/lui.css +4 -8
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +7 -7
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/MenuV2/menu-v2.scss +4 -9
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## [17.35.3](https://github.com/linz/lui/compare/v17.35.2...v17.35.3) (2023-02-15)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* LuiTextInputProps now forwardsRefs ([#853](https://github.com/linz/lui/issues/853)) ([7160fdc](https://github.com/linz/lui/commit/7160fdcf16d0668f920c04bbe531ceb37e40cb3a))
|
|
7
|
+
|
|
8
|
+
## [17.35.2](https://github.com/linz/lui/compare/v17.35.1...v17.35.2) (2023-02-15)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* adds type=button to LuiTab as we don't want this to submit form ([94ec8d4](https://github.com/linz/lui/commit/94ec8d4bbf77567cd43e7d6d073b73a7ddee3c4b))
|
|
14
|
+
* fix Drawer option style ([#852](https://github.com/linz/lui/issues/852)) ([05639cb](https://github.com/linz/lui/commit/05639cb4b01e458b9e7f2907f6ab661d3beb1224))
|
|
15
|
+
* makes onclick optional, rather than maybe undefined ([931cbef](https://github.com/linz/lui/commit/931cbef58378bf2986bd8c7cd84cfeaa7222d88c))
|
|
16
|
+
|
|
1
17
|
## [17.35.1](https://github.com/linz/lui/compare/v17.35.0...v17.35.1) (2023-02-15)
|
|
2
18
|
|
|
3
19
|
|
package/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ChangeEventHandler
|
|
1
|
+
import React, { ChangeEventHandler } from 'react';
|
|
2
2
|
export interface LuiTextInputProps {
|
|
3
3
|
onChange?: ChangeEventHandler<HTMLInputElement>;
|
|
4
|
-
inputProps?: Omit<
|
|
4
|
+
inputProps?: Omit<JSX.IntrinsicElements['input'], 'ref'>;
|
|
5
5
|
error?: string;
|
|
6
6
|
warning?: string;
|
|
7
7
|
hideLabel?: boolean;
|
|
@@ -20,4 +20,4 @@ export interface LuiTextInputProps {
|
|
|
20
20
|
size?: 'sm';
|
|
21
21
|
}
|
|
22
22
|
export declare function useGenerateOrDefaultId(idFromProps?: string): string;
|
|
23
|
-
export declare const LuiTextInput:
|
|
23
|
+
export declare const LuiTextInput: React.ForwardRefExoticComponent<LuiTextInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { MouseEvent } from 'react';
|
|
2
2
|
interface LuiTabProps {
|
|
3
|
-
onClick: (e
|
|
3
|
+
onClick: (e: MouseEvent) => void | (() => void);
|
|
4
4
|
active: boolean;
|
|
5
5
|
id: string;
|
|
6
6
|
ariaControls: string;
|
package/dist/index.js
CHANGED
|
@@ -15434,7 +15434,7 @@ var LuiTabs = function (props) {
|
|
|
15434
15434
|
};
|
|
15435
15435
|
|
|
15436
15436
|
var LuiTab = function (props) {
|
|
15437
|
-
return (React__default["default"].createElement("button", { className: clsx$1('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.children));
|
|
15437
|
+
return (React__default["default"].createElement("button", { className: clsx$1('LuiTab', props.active && 'LuiTab--active'), id: props.id, role: "tab", type: "button", "aria-selected": props.active, "aria-controls": "".concat(props.ariaControls), title: props.titleAttribute, onClick: props.onClick }, props.children));
|
|
15438
15438
|
};
|
|
15439
15439
|
|
|
15440
15440
|
// import './LuiTabsGroup.scss';
|
|
@@ -15662,8 +15662,8 @@ function useGenerateOrDefaultId(idFromProps) {
|
|
|
15662
15662
|
var id = React$1.useState(idFromProps ? idFromProps : v4())[0];
|
|
15663
15663
|
return id;
|
|
15664
15664
|
}
|
|
15665
|
-
var BareInput = function (props) { return
|
|
15666
|
-
var LuiTextInput = function (props) {
|
|
15665
|
+
var BareInput = React$1.forwardRef(function (props, ref) { return React__default["default"].createElement("input", __assign$3({}, props, { ref: ref })); });
|
|
15666
|
+
var LuiTextInput = React$1.forwardRef(function (props, ref) {
|
|
15667
15667
|
var _a, _b, _c;
|
|
15668
15668
|
var id = useGenerateOrDefaultId((_a = props.inputProps) === null || _a === void 0 ? void 0 : _a.id);
|
|
15669
15669
|
var LuiInput = ((_b = props.inputProps) === null || _b === void 0 ? void 0 : _b.type) === 'date' ? DateInput : BareInput;
|
|
@@ -15673,7 +15673,7 @@ var LuiTextInput = function (props) {
|
|
|
15673
15673
|
React__default["default"].createElement("span", { className: 'LuiTextInput-label-text ' +
|
|
15674
15674
|
clsx$1(props.hideLabel ? 'LuiScreenReadersOnly' : '') }, props.label),
|
|
15675
15675
|
React__default["default"].createElement("span", { className: "LuiTextInput-inputWrapper" },
|
|
15676
|
-
React__default["default"].createElement(LuiInput, __assign$3({ className: clsx$1('LuiTextInput-input', props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '', props.size ? "LuiTextInput-".concat(props.size) : ''), min: ((_c = props.inputProps) === null || _c === void 0 ? void 0 : _c.type) === 'date' ? undefined : '0', value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
|
|
15676
|
+
React__default["default"].createElement(LuiInput, __assign$3({ ref: ref, className: clsx$1('LuiTextInput-input', props.showPadlockIcon ? 'LuiTextInput-padlock-icon ' : '', props.size ? "LuiTextInput-".concat(props.size) : ''), min: ((_c = props.inputProps) === null || _c === void 0 ? void 0 : _c.type) === 'date' ? undefined : '0', value: props.value, onChange: props.onChange }, props.inputProps, { id: id })),
|
|
15677
15677
|
props.icon),
|
|
15678
15678
|
props.error && (React__default["default"].createElement("span", { className: "LuiTextInput-error" },
|
|
15679
15679
|
React__default["default"].createElement(LuiIcon, { alt: "error", name: "ic_error", className: "LuiTextInput-error-icon", size: "sm", status: "error" }),
|
|
@@ -15681,7 +15681,7 @@ var LuiTextInput = function (props) {
|
|
|
15681
15681
|
props.warning && (React__default["default"].createElement("span", { className: "LuiTextInput-warning" },
|
|
15682
15682
|
React__default["default"].createElement(LuiIcon, { alt: "warning", name: "ic_warning", className: "LuiTextInput-warning-icon", size: "sm", status: "warning" }),
|
|
15683
15683
|
props.warning)))));
|
|
15684
|
-
};
|
|
15684
|
+
});
|
|
15685
15685
|
|
|
15686
15686
|
var LuiCheckboxInput = function (props) {
|
|
15687
15687
|
var _a;
|
|
@@ -40328,7 +40328,7 @@ var LuiHeaderV2 = function (_a) {
|
|
|
40328
40328
|
React__default["default"].createElement("div", { className: "LuiHeaderV2-col" }, children))));
|
|
40329
40329
|
};
|
|
40330
40330
|
var LuiHeaderMenuItemV2 = React$1.forwardRef(function (_a, ref) {
|
|
40331
|
-
var icon = _a.icon, _b = _a.iconColor, iconColor = _b === void 0 ? '#
|
|
40331
|
+
var icon = _a.icon, _b = _a.iconColor, iconColor = _b === void 0 ? '#E2F3F7' : _b, label = _a.label, badge = _a.badge, hide = _a.hide, onClick = _a.onClick, _c = _a["data-testid"], dataTestId = _c === void 0 ? 'menu-item' : _c, children = _a.children;
|
|
40332
40332
|
var menuItemClasses = clsx$1('LuiHeaderV2-menu-item', hide && buildHideClassDict(hide));
|
|
40333
40333
|
var resolvedIcon = !icon && !label ? 'ic_menu' : icon;
|
|
40334
40334
|
return (React__default["default"].createElement("div", { className: menuItemClasses, ref: ref },
|
|
@@ -40457,7 +40457,7 @@ var LuiDrawerMenuOptionV2 = function (_a) {
|
|
|
40457
40457
|
React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option-label" },
|
|
40458
40458
|
typeof icon === 'string' ? (React__default["default"].createElement(LuiIcon, { size: iconSize, name: icon, alt: '', color: iconColor, "data-testid": 'drawer-option-icon' })) : (icon),
|
|
40459
40459
|
label),
|
|
40460
|
-
badge));
|
|
40460
|
+
badge && (React__default["default"].createElement("div", { className: "LuiHeaderMenuV2-drawer-option-badge" }, badge))));
|
|
40461
40461
|
};
|
|
40462
40462
|
var LuiDrawerMenuV2 = function (_a) {
|
|
40463
40463
|
var children = _a.children, _b = _a.hasStickyHeader, hasStickyHeader = _b === void 0 ? true : _b, menuPropsCopy = __rest$1(_a, ["children", "hasStickyHeader"]);
|