@linzjs/lui 21.40.0 → 21.40.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 +14 -0
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/dist/lui.esm.js +3 -8
- package/dist/lui.esm.js.map +1 -1
- package/dist/scss/Components/LuiSwitchButton/LuiSwitchButton.scss +46 -29
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [21.40.3](https://github.com/linz/lui/compare/v21.40.2...v21.40.3) (2024-07-17)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* trigger release for switch button style change ([#1143](https://github.com/linz/lui/issues/1143)) ([7cf3f50](https://github.com/linz/lui/commit/7cf3f50f93ef3eac919ba7b24f72e1581c246424))
|
|
7
|
+
|
|
8
|
+
## [21.40.1](https://github.com/linz/lui/compare/v21.40.0...v21.40.1) (2024-07-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **LuiModalV2:** set modal appElement via props ([#1140](https://github.com/linz/lui/issues/1140)) ([a2f52a5](https://github.com/linz/lui/commit/a2f52a59edecf2d691bf480eb41916affd3408b7))
|
|
14
|
+
|
|
1
15
|
# [21.40.0](https://github.com/linz/lui/compare/v21.39.3...v21.40.0) (2024-07-16)
|
|
2
16
|
|
|
3
17
|
|
package/dist/index.js
CHANGED
|
@@ -42266,14 +42266,9 @@ var LuiModalV2 = function (props) {
|
|
|
42266
42266
|
var showHelpButton = Boolean(props.helpLink);
|
|
42267
42267
|
var showButtons = showCloseButton || showHelpButton;
|
|
42268
42268
|
var showHeadingIcon = props.headingIcon && !props.isLoading;
|
|
42269
|
-
// this is here for the tests
|
|
42270
|
-
React.useEffect(function () {
|
|
42271
|
-
if (isProcess && !isTest)
|
|
42272
|
-
Modal.setAppElement('#root');
|
|
42273
|
-
}, []);
|
|
42274
42269
|
return (React__default["default"].createElement(Modal, { key: props.key, isOpen: true,
|
|
42275
42270
|
// disble the `shouldClose` props as we handle them ourselves
|
|
42276
|
-
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim',
|
|
42271
|
+
shouldCloseOnOverlayClick: false, shouldCloseOnEsc: false, overlayClassName: "modal", className: props.lowContrast ? 'lui-scrim-low-contrast' : 'lui-scrim', appElement: document.getElementById('root'),
|
|
42277
42272
|
// required to prevent warnings that are not applicable in real usage
|
|
42278
42273
|
ariaHideApp: !isTest, parentSelector: props.appendToElement },
|
|
42279
42274
|
React__default["default"].createElement("div", { ref: function (el) {
|
|
@@ -47024,14 +47019,14 @@ var LuiSidePanelProvider = function (_a) {
|
|
|
47024
47019
|
React__default["default"].createElement(LuiSidePanelContainer, __assign({}, props))));
|
|
47025
47020
|
};
|
|
47026
47021
|
|
|
47027
|
-
var css_248z$g = ".lui-switch-checkbox {\n height: 0;\n width: 0;\n visibility: hidden;\n}\n\n.lui-switch-label {\n display: flex;\n align-items: center;\n
|
|
47022
|
+
var css_248z$g = ".lui-switch-checkbox {\n height: 0;\n width: 0;\n visibility: hidden;\n}\n\n.lui-switch-label {\n display: flex;\n align-items: center;\n cursor: pointer;\n width: 40px;\n padding: 2px;\n background: #ffffff;\n border: 1px solid #007198;\n border-radius: 40px;\n position: relative;\n transition: background-color 0.2s;\n}\n\n.lui-switch-label .lui-switch-button {\n content: \"\";\n position: relative;\n width: 14px;\n height: 14px;\n border-radius: 50%;\n transition: 0.2s;\n background: #007198;\n box-shadow: 0 0 2px 0 rgba(10, 10, 10, 0.29);\n}\n\n.lui-switch-label-checked {\n background: #007198;\n}\n.lui-switch-label-checked .lui-switch-button {\n transform: translateX(20px);\n background: #ffffff;\n}\n\n.lui-switch-checkbox:disabled + .lui-switch-label {\n border: 1px solid #989189;\n background: #eaeaea;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label .lui-switch-button {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked {\n background: #989189;\n}\n.lui-switch-checkbox:disabled + .lui-switch-label-checked .lui-switch-button {\n background: #eaeaea;\n}";
|
|
47028
47023
|
styleInject(css_248z$g);
|
|
47029
47024
|
|
|
47030
47025
|
var LuiSwitchButton = function (props) {
|
|
47031
47026
|
var generatedId = useGenerateOrDefaultId();
|
|
47032
47027
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
47033
47028
|
React__default["default"].createElement("input", __assign({ className: "lui-switch-checkbox", type: "checkbox", "data-testid": 'lui-switch-new', id: generatedId }, props)),
|
|
47034
|
-
React__default["default"].createElement("label", { "data-testid": "label",
|
|
47029
|
+
React__default["default"].createElement("label", { "data-testid": "label", className: clsx('lui-switch-label', props.checked ? 'lui-switch-label-checked' : null), htmlFor: generatedId },
|
|
47035
47030
|
React__default["default"].createElement("span", { className: "lui-switch-button" }))));
|
|
47036
47031
|
};
|
|
47037
47032
|
|