@linzjs/lui 21.40.1 → 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
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
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
|
+
|
|
1
8
|
## [21.40.1](https://github.com/linz/lui/compare/v21.40.0...v21.40.1) (2024-07-16)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.js
CHANGED
|
@@ -47019,14 +47019,14 @@ var LuiSidePanelProvider = function (_a) {
|
|
|
47019
47019
|
React__default["default"].createElement(LuiSidePanelContainer, __assign({}, props))));
|
|
47020
47020
|
};
|
|
47021
47021
|
|
|
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
|
|
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}";
|
|
47023
47023
|
styleInject(css_248z$g);
|
|
47024
47024
|
|
|
47025
47025
|
var LuiSwitchButton = function (props) {
|
|
47026
47026
|
var generatedId = useGenerateOrDefaultId();
|
|
47027
47027
|
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
47028
47028
|
React__default["default"].createElement("input", __assign({ className: "lui-switch-checkbox", type: "checkbox", "data-testid": 'lui-switch-new', id: generatedId }, props)),
|
|
47029
|
-
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 },
|
|
47030
47030
|
React__default["default"].createElement("span", { className: "lui-switch-button" }))));
|
|
47031
47031
|
};
|
|
47032
47032
|
|