@linzjs/lui 17.52.3 → 17.54.0
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 +14 -0
- package/dist/components/LuiBadge/LuiBadge.d.ts +5 -2
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/lui.css +21 -1
- package/dist/lui.css.map +1 -1
- package/dist/lui.esm.js +18 -3
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiBadge/LuiBadge.scss +21 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [17.54.0](https://github.com/linz/lui/compare/v17.53.0...v17.54.0) (2023-05-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **LuiSelectInput:** Implement the disabled flag for select options ([#939](https://github.com/linz/lui/issues/939)) ([a38b7bc](https://github.com/linz/lui/commit/a38b7bc869dac8f70264e1781d82a50313e13c89))
|
|
7
|
+
|
|
8
|
+
# [17.53.0](https://github.com/linz/lui/compare/v17.52.3...v17.53.0) (2023-05-05)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* Update LuiBadge to do Same Colour fill and added info type ([#938](https://github.com/linz/lui/issues/938)) ([75d88f1](https://github.com/linz/lui/commit/75d88f1b19bfbb73a2a24534a84fad4a13732896))
|
|
14
|
+
|
|
1
15
|
## [17.52.3](https://github.com/linz/lui/compare/v17.52.2...v17.52.3) (2023-05-02)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
declare type LuiBadgeFillVariation = 'outline' | 'fill';
|
|
2
3
|
export interface ILuiBadge {
|
|
3
4
|
children: React.ReactNode;
|
|
4
5
|
size?: 'sm' | 'default' | 'lg';
|
|
5
6
|
backgroundFill?: boolean;
|
|
6
|
-
variation?: 'default' | 'warning';
|
|
7
|
+
variation?: 'default' | 'warning' | 'info';
|
|
7
8
|
ariaRoleDescription: string;
|
|
9
|
+
fillVariation?: LuiBadgeFillVariation;
|
|
8
10
|
}
|
|
9
|
-
export declare const LuiBadge: (
|
|
11
|
+
export declare const LuiBadge: ({ size, variation, backgroundFill, ariaRoleDescription, fillVariation, children, }: ILuiBadge) => JSX.Element;
|
|
12
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -28306,7 +28306,10 @@ var LuiSelectInput = function (props) {
|
|
|
28306
28306
|
React__default["default"].createElement("div", { className: "LuiSelect-wrapper" },
|
|
28307
28307
|
React__default["default"].createElement("select", __assign({ name: id, id: id, onChange: props.onChange, value: props.value, className: "LuiSelect-select" }, props.selectProps),
|
|
28308
28308
|
props.placeholderText && (React__default["default"].createElement("option", { value: "", disabled: true }, props.placeholderText)),
|
|
28309
|
-
props.options.map(function (selection) {
|
|
28309
|
+
props.options.map(function (selection) {
|
|
28310
|
+
return selection.disabled === true ? (React__default["default"].createElement("option", { key: selection.value, value: selection.value, disabled: true }, selection.label)) : (React__default["default"].createElement("option", { key: selection.value, value: selection.value }, selection.label));
|
|
28311
|
+
}),
|
|
28312
|
+
")"),
|
|
28310
28313
|
React__default["default"].createElement(LuiIcon, { alt: 'Error', name: "ic_keyboard_arrow_down", className: "LuiSelect-chevron-icon", size: "md" })),
|
|
28311
28314
|
props.error && (React__default["default"].createElement("span", { className: "LuiSelect-error" },
|
|
28312
28315
|
React__default["default"].createElement(LuiIcon, { alt: 'Error', name: "ic_error", className: "LuiSelect-error-icon", size: "sm", status: "error" }),
|
|
@@ -55008,7 +55011,7 @@ var LuiModalHeader = function (props) {
|
|
|
55008
55011
|
React__default["default"].createElement(LuiIcon, { name: "ic_clear", alt: "Help", size: "lg" }))))))));
|
|
55009
55012
|
};
|
|
55010
55013
|
|
|
55011
|
-
var css_248z$6 = "@keyframes react-loading-skeleton {\n
|
|
55014
|
+
var css_248z$6 = "@keyframes react-loading-skeleton {\n 100% {\n transform: translateX(100%);\n }\n}\n\n.react-loading-skeleton {\n --base-color: #ebebeb;\n --highlight-color: #f5f5f5;\n --animation-duration: 1.5s;\n --animation-direction: normal;\n --pseudo-element-display: block; /* Enable animation */\n\n background-color: var(--base-color);\n\n width: 100%;\n border-radius: 0.25rem;\n display: inline-flex;\n line-height: 1;\n\n position: relative;\n user-select: none;\n overflow: hidden;\n z-index: 1; /* Necessary for overflow: hidden to work correctly in Safari */\n}\n\n.react-loading-skeleton::after {\n content: ' ';\n display: var(--pseudo-element-display);\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 100%;\n background-repeat: no-repeat;\n background-image: linear-gradient(\n 90deg,\n var(--base-color),\n var(--highlight-color),\n var(--base-color)\n );\n transform: translateX(-100%);\n\n animation-name: react-loading-skeleton;\n animation-direction: var(--animation-direction);\n animation-duration: var(--animation-duration);\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n}\n\n@media (prefers-reduced-motion) {\n .react-loading-skeleton {\n --pseudo-element-display: none; /* Disable animation */\n }\n}\n";
|
|
55012
55015
|
styleInject(css_248z$6);
|
|
55013
55016
|
|
|
55014
55017
|
/**
|
|
@@ -60223,7 +60226,19 @@ function useClickedOutsideElement(refElement, handleClickOutside) {
|
|
|
60223
60226
|
}, []);
|
|
60224
60227
|
}
|
|
60225
60228
|
|
|
60226
|
-
var
|
|
60229
|
+
var getFillClassName = function (fillVariation, backgroundFill) {
|
|
60230
|
+
if (backgroundFill) {
|
|
60231
|
+
return 'LuiBadge--fill';
|
|
60232
|
+
}
|
|
60233
|
+
else if (fillVariation === 'fill') {
|
|
60234
|
+
return 'LuiBadge--fill-color';
|
|
60235
|
+
}
|
|
60236
|
+
return 'LuiBadge--outline';
|
|
60237
|
+
};
|
|
60238
|
+
var LuiBadge = function (_a) {
|
|
60239
|
+
var _b = _a.size, size = _b === void 0 ? 'default' : _b, _c = _a.variation, variation = _c === void 0 ? 'default' : _c, backgroundFill = _a.backgroundFill, ariaRoleDescription = _a.ariaRoleDescription, _d = _a.fillVariation, fillVariation = _d === void 0 ? 'outline' : _d, children = _a.children;
|
|
60240
|
+
return (React__default["default"].createElement("p", { className: clsx('LuiBadge', "LuiBadge--".concat(size), getFillClassName(fillVariation, backgroundFill), "LuiBadge--variation-".concat(variation)), "aria-roledescription": ariaRoleDescription }, children));
|
|
60241
|
+
};
|
|
60227
60242
|
|
|
60228
60243
|
var LuiSidePanelContext = React__default["default"].createContext({ setProps: function () { return undefined; } });
|
|
60229
60244
|
var LuiSidePanel = function (_a) {
|