@uxf/ui 1.0.0-beta.76 → 1.0.0-beta.78
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/checkbox/checkbox.js +1 -1
- package/checkbox-button/checkbox-button.js +1 -1
- package/config/icons-config.d.ts +1 -1
- package/config/icons-config.js +1 -1
- package/config/icons.d.ts +5 -0
- package/config/icons.js +1 -0
- package/css/chip.css +1 -1
- package/css/layout.css +47 -0
- package/layout/index.d.ts +1 -0
- package/layout/index.js +17 -0
- package/layout/layout.d.ts +9 -0
- package/layout/layout.js +60 -0
- package/layout/layout.stories.d.ts +8 -0
- package/layout/layout.stories.js +21 -0
- package/layout/uxf-logo.d.ts +6 -0
- package/layout/uxf-logo.js +13 -0
- package/package.json +1 -1
- package/toggle/toggle.js +1 -1
- package/utils/icons-config.js +5 -0
package/checkbox/checkbox.js
CHANGED
|
@@ -17,7 +17,7 @@ exports.Checkbox = (0, forwardRef_1.forwardRef)("Checkbox", (props, ref) => {
|
|
|
17
17
|
var _a;
|
|
18
18
|
return (react_2.default.createElement(react_1.Switch.Group, null,
|
|
19
19
|
react_2.default.createElement("div", { className: `uxf-checkbox__wrapper ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}` },
|
|
20
|
-
react_2.default.createElement(react_1.Switch, { checked: props.value, className: (0, cx_1.cx)(props.
|
|
20
|
+
react_2.default.createElement(react_1.Switch, { checked: props.value, className: (0, cx_1.cx)(props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.value && classes_1.CLASSES.IS_SELECTED, "uxf-checkbox"), disabled: props.isDisabled, name: props.name, onChange: props.onChange, ref: ref, style: props.style },
|
|
21
21
|
react_2.default.createElement("span", { className: "uxf-checkbox__icon" },
|
|
22
22
|
react_2.default.createElement(CheckIcon, null))),
|
|
23
23
|
react_2.default.createElement(react_1.Switch.Label, { className: "uxf-checkbox__label" }, props.label))));
|
|
@@ -14,7 +14,7 @@ function CheckIcon() {
|
|
|
14
14
|
react_2.default.createElement("path", { d: "M13.333 4 6 11.333 2.667 8", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "2" })));
|
|
15
15
|
}
|
|
16
16
|
exports.CheckboxButton = (0, forwardRef_1.forwardRef)("CheckboxButton", (props, ref) => {
|
|
17
|
-
return (react_2.default.createElement(react_1.Switch, { checked: props.value, className: (0, cx_1.cx)(props.
|
|
17
|
+
return (react_2.default.createElement(react_1.Switch, { checked: props.value, className: (0, cx_1.cx)("uxf-checkbox-button", props.className, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.value && classes_1.CLASSES.IS_SELECTED), disabled: props.isDisabled, name: props.name, onChange: props.onChange, ref: ref, style: props.style },
|
|
18
18
|
react_2.default.createElement("span", { className: "uxf-checkbox-button__label" }, props.label),
|
|
19
19
|
react_2.default.createElement("span", { className: "uxf-checkbox-button__icon" },
|
|
20
20
|
react_2.default.createElement(CheckIcon, null))));
|
package/config/icons-config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ICONS_VERSION = "
|
|
1
|
+
export declare const ICONS_VERSION = "1668119882752";
|
|
2
2
|
export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/config/icons-config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
|
|
4
|
-
exports.ICONS_VERSION = "
|
|
4
|
+
exports.ICONS_VERSION = "1668119882752";
|
|
5
5
|
exports.ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/config/icons.d.ts
CHANGED
|
@@ -11,6 +11,10 @@ export declare const ICONS: {
|
|
|
11
11
|
readonly w: 320;
|
|
12
12
|
readonly h: 512;
|
|
13
13
|
};
|
|
14
|
+
readonly bars: {
|
|
15
|
+
readonly w: 448;
|
|
16
|
+
readonly h: 512;
|
|
17
|
+
};
|
|
14
18
|
readonly check: {
|
|
15
19
|
readonly w: 512;
|
|
16
20
|
readonly h: 512;
|
|
@@ -46,6 +50,7 @@ declare module "@uxf/ui/icon/theme" {
|
|
|
46
50
|
calendar: true;
|
|
47
51
|
camera: true;
|
|
48
52
|
caretDown: true;
|
|
53
|
+
bars: true;
|
|
49
54
|
check: true;
|
|
50
55
|
chevronDown: true;
|
|
51
56
|
chevronLeft: true;
|
package/config/icons.js
CHANGED
package/css/chip.css
CHANGED
package/css/layout.css
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
body {
|
|
2
|
+
@apply bg-neutral-100;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.uxf-layout {
|
|
6
|
+
&__content {
|
|
7
|
+
@apply flex flex-1 flex-col md:pl-64 pt-14;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.uxf-app-bar {
|
|
12
|
+
@apply fixed w-full top-0 left-0 flex items-center bg-primary-600 h-14;
|
|
13
|
+
|
|
14
|
+
&__left-container {
|
|
15
|
+
@apply flex items-center grow;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__menu-button {
|
|
19
|
+
@apply px-5 focus:outline-none focus:ring-2 focus:ring-inset focus:ring-indigo-500 md:hidden;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__logo {
|
|
23
|
+
@apply md:px-2
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.uxf-sidebar {
|
|
28
|
+
@apply hidden md:fixed md:inset-y-0 md:flex md:w-64 md:flex-col bg-white;
|
|
29
|
+
|
|
30
|
+
&__content {
|
|
31
|
+
@apply flex flex-grow flex-col overflow-y-auto border-r border-r-gray-200 pt-14;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__logo {
|
|
35
|
+
@apply flex justify-center;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.uxf-drawer {
|
|
40
|
+
&__content {
|
|
41
|
+
@apply flex flex-grow flex-col overflow-y-auto border-r border-r-gray-200;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&__logo {
|
|
45
|
+
@apply flex justify-center;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./layout";
|
package/layout/index.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./layout"), exports);
|
package/layout/layout.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.Layout = void 0;
|
|
27
|
+
const react_1 = __importStar(require("react"));
|
|
28
|
+
const react_2 = require("@headlessui/react");
|
|
29
|
+
const icon_1 = require("../icon");
|
|
30
|
+
const uxf_logo_1 = require("./uxf-logo");
|
|
31
|
+
const Layout = (props) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
const [sidebarOpen, setSidebarOpen] = (0, react_1.useState)(false);
|
|
34
|
+
return (react_1.default.createElement("div", { className: "uxf-layout" },
|
|
35
|
+
react_1.default.createElement("div", { className: "uxf-sidebar" },
|
|
36
|
+
react_1.default.createElement("div", { className: "uxf-sidebar__content" }, props.sidebar)),
|
|
37
|
+
react_1.default.createElement("div", { className: "uxf-app-bar" },
|
|
38
|
+
react_1.default.createElement("div", { className: "uxf-app-bar__left-container" },
|
|
39
|
+
react_1.default.createElement("button", { type: "button", className: "uxf-app-bar__menu-button", onClick: () => setSidebarOpen(true) },
|
|
40
|
+
react_1.default.createElement(icon_1.Icon, { name: "bars", className: "text-white", size: 26 })),
|
|
41
|
+
react_1.default.createElement("div", { className: "uxf-app-bar__logo" }, (_a = props.logo) !== null && _a !== void 0 ? _a : react_1.default.createElement(uxf_logo_1.UxfLogo, null))),
|
|
42
|
+
react_1.default.createElement("div", { className: "uxf-app-bar__right-container" }, props.toolbarRight)),
|
|
43
|
+
react_1.default.createElement(react_2.Transition.Root, { show: sidebarOpen, as: react_1.Fragment },
|
|
44
|
+
react_1.default.createElement(react_2.Dialog, { as: "div", className: "relative z-40 md:hidden", onClose: setSidebarOpen },
|
|
45
|
+
react_1.default.createElement(react_2.Transition.Child, { as: react_1.Fragment, enter: "transition-opacity ease-linear duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "transition-opacity ease-linear duration-300", leaveFrom: "opacity-100", leaveTo: "opacity-0" },
|
|
46
|
+
react_1.default.createElement("div", { className: "fixed inset-0 bg-gray-600 bg-opacity-75" })),
|
|
47
|
+
react_1.default.createElement("div", { className: "fixed inset-0 z-40 flex" },
|
|
48
|
+
react_1.default.createElement(react_2.Transition.Child, { as: react_1.Fragment, enter: "transition ease-in-out duration-300 transform", enterFrom: "-translate-x-full", enterTo: "translate-x-0", leave: "transition ease-in-out duration-300 transform", leaveFrom: "translate-x-0", leaveTo: "-translate-x-full" },
|
|
49
|
+
react_1.default.createElement(react_2.Dialog.Panel, { className: "relative flex w-full max-w-xs flex-1 flex-col bg-white pt-5 pb-4" },
|
|
50
|
+
react_1.default.createElement(react_2.Transition.Child, { as: react_1.Fragment, enter: "ease-in-out duration-300", enterFrom: "opacity-0", enterTo: "opacity-100", leave: "ease-in-out duration-300", leaveFrom: "opacity-100", leaveTo: "opacity-0" },
|
|
51
|
+
react_1.default.createElement("div", { className: "absolute top-0 right-0 -mr-12 pt-2" },
|
|
52
|
+
react_1.default.createElement("button", { type: "button", className: "ml-1 flex h-10 w-10 items-center justify-center rounded-full focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white", onClick: () => setSidebarOpen(false) },
|
|
53
|
+
react_1.default.createElement("span", { className: "sr-only" }, "Close sidebar"),
|
|
54
|
+
react_1.default.createElement(icon_1.Icon, { name: "xmarkLarge", size: 24, className: "text-white" })))),
|
|
55
|
+
react_1.default.createElement("div", { className: "uxf-drawer__logo" }, (_b = props.logo) !== null && _b !== void 0 ? _b : react_1.default.createElement(uxf_logo_1.UxfLogo, { isDark: true })),
|
|
56
|
+
react_1.default.createElement("div", { className: "uxf-drawer__content" }, props.sidebar))),
|
|
57
|
+
react_1.default.createElement("div", { className: "w-14 flex-shrink-0", "aria-hidden": "true" })))),
|
|
58
|
+
react_1.default.createElement("main", { className: "uxf-layout__content" }, props.children)));
|
|
59
|
+
};
|
|
60
|
+
exports.Layout = Layout;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Default = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const layout_1 = require("./layout");
|
|
9
|
+
exports.default = {
|
|
10
|
+
title: "Admin/Layout",
|
|
11
|
+
component: layout_1.Layout,
|
|
12
|
+
layout: "fulscreen",
|
|
13
|
+
};
|
|
14
|
+
function Default() {
|
|
15
|
+
return (react_1.default.createElement(layout_1.Layout, { sidebar: react_1.default.createElement("div", { className: "p-8" },
|
|
16
|
+
react_1.default.createElement("div", { className: "flex h-64 items-center justify-center rounded-xl border-4 border-dashed border-gray-200 text-xl font-semibold text-gray-300" }, "sidebar")), toolbarRight: react_1.default.createElement("div", { className: "p-8" },
|
|
17
|
+
react_1.default.createElement("div", { className: "flex items-center justify-center rounded-xl border-4 border-dashed border-gray-200 px-5 text-xl font-semibold text-gray-300" }, "toolbarRight")) },
|
|
18
|
+
react_1.default.createElement("div", { className: "p-8" },
|
|
19
|
+
react_1.default.createElement("div", { className: "flex h-64 items-center justify-center rounded-xl border-4 border-dashed border-gray-200 text-xl font-semibold text-gray-300" }, "children"))));
|
|
20
|
+
}
|
|
21
|
+
exports.Default = Default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.UxfLogo = void 0;
|
|
7
|
+
const react_1 = __importDefault(require("react"));
|
|
8
|
+
const UxfLogo = (props) => {
|
|
9
|
+
return (react_1.default.createElement("svg", { width: "179", height: "40" },
|
|
10
|
+
react_1.default.createElement("path", { fill: "#FF4F06", fillRule: "evenodd", d: "M33.563 12.874a9.103 9.103 0 0 0 0-12.874L20.69 12.874l.107.105a9.103 9.103 0 0 0 12.766-.105Zm-20.69-6.437a9.103 9.103 0 0 1 .106 12.766l-.105.107L0 6.437a9.103 9.103 0 0 1 12.874 0ZM40 33.563 27.127 20.69l-.106.107a9.103 9.103 0 0 0 12.98 12.766Zm-20.69-6.437-.107-.105A9.103 9.103 0 0 0 6.437 40l12.874-12.874Z", clipRule: "evenodd" }),
|
|
11
|
+
react_1.default.createElement("path", { fill: props.isDark ? "#140939" : "#FFF", fillRule: "evenodd", d: "m84.325 7.295 5.133 8.675h.199l5.158-8.675h6.078l-7.768 12.727 7.942 12.727h-6.19l-5.22-8.687h-.199l-5.22 8.687h-6.165l7.967-12.727-7.818-12.727h6.103Zm-24.194 0v16.07c0 .97.214 1.832.64 2.586a4.58 4.58 0 0 0 1.809 1.777c.779.431 1.686.647 2.722.647 1.044 0 1.953-.216 2.728-.647a4.591 4.591 0 0 0 1.802-1.777c.427-.754.64-1.616.64-2.585V7.296h5.382v16.53c0 1.856-.441 3.48-1.324 4.872-.882 1.392-2.115 2.475-3.697 3.25-1.583.775-3.426 1.162-5.531 1.162-2.113 0-3.96-.387-5.543-1.162-1.583-.775-2.813-1.858-3.692-3.25-.878-1.392-1.317-3.016-1.317-4.872V7.296h5.381ZM170.25 13.41c2.411 0 4.311.51 5.698 1.529 1.388 1.019 2.198 2.407 2.43 4.164l-4.847.298a2.555 2.555 0 0 0-.534-1.125 2.942 2.942 0 0 0-1.075-.808c-.444-.203-.972-.304-1.585-.304-.821 0-1.512.172-2.076.515-.563.344-.845.802-.845 1.374 0 .456.182.84.547 1.156.364.315.99.567 1.877.758l3.455.696c1.856.381 3.24.994 4.151 1.84.912.845 1.367 1.955 1.367 3.33 0 1.252-.366 2.35-1.1 3.294-.733.945-1.736 1.68-3.007 2.206-1.272.526-2.737.79-4.394.79-2.527 0-4.539-.529-6.034-1.585-1.496-1.057-2.372-2.496-2.629-4.32l5.208-.273c.157.77.538 1.357 1.143 1.759.605.402 1.38.603 2.324.603.928 0 1.676-.18 2.244-.54.567-.361.855-.827.864-1.4-.009-.48-.212-.875-.609-1.186-.398-.31-1.011-.55-1.84-.715l-3.306-.659c-1.864-.372-3.25-1.019-4.157-1.938-.908-.92-1.361-2.093-1.361-3.518 0-1.226.333-2.283 1-3.17.667-.886 1.608-1.57 2.821-2.05 1.214-.48 2.637-.72 4.27-.72Zm-36.686.373a12.285 12.285 0 0 0-3.051-.373c-1.525 0-2.865.23-4.021.69-1.156.46-2.098 1.114-2.827 1.964-.73.849-1.219 1.854-1.467 3.014l4.897.397c.182-.63.555-1.153 1.119-1.572.563-.418 1.321-.627 2.274-.627.903 0 1.601.215 2.094.646.493.43.74 1.04.74 1.827v.075c0 .405-.153.712-.46.92-.307.206-.8.362-1.479.465-.68.104-1.574.214-2.685.33-.944.09-1.845.248-2.703.472a7.698 7.698 0 0 0-2.293.994 4.727 4.727 0 0 0-1.591 1.74c-.39.721-.584 1.612-.584 2.673 0 1.259.275 2.31.826 3.15a5.147 5.147 0 0 0 2.256 1.902c.953.427 2.038.64 3.257.64.944 0 1.777-.126 2.498-.38a5.55 5.55 0 0 0 1.852-1.055 5.31 5.31 0 0 0 1.23-1.573h.149v2.648h5.022V19.873c0-1.135-.22-2.11-.659-2.927a5.655 5.655 0 0 0-1.796-2.007 8.039 8.039 0 0 0-2.598-1.156Zm-13.424-2.05V7.294h-16.853v25.454h5.381V22.235h10.354v-4.438h-10.354v-6.065h11.472Zm32.603 1.677c1.326 0 2.482.29 3.468.87.986.58 1.753 1.407 2.3 2.48.546 1.073.82 2.35.82 3.834V32.75h-5.295V21.539c.008-1.169-.29-2.082-.895-2.74-.605-.66-1.437-.989-2.498-.989-.713 0-1.34.153-1.883.46a3.166 3.166 0 0 0-1.268 1.336c-.302.584-.458 1.286-.466 2.107V32.75h-5.295V13.659h5.047v3.368H147a5.358 5.358 0 0 1 2.126-2.641c.994-.65 2.2-.976 3.616-.976Zm-20.061 10.782c.286-.087.512-.184.678-.292v2.026c0 .671-.17 1.272-.51 1.802-.34.53-.808.951-1.404 1.262-.597.31-1.285.466-2.064.466-.812 0-1.481-.189-2.007-.566-.526-.377-.789-.925-.789-1.646 0-.497.128-.914.385-1.25.257-.335.617-.602 1.082-.801a6.547 6.547 0 0 1 1.628-.435l.969-.143a24.15 24.15 0 0 0 1.069-.186c.356-.071.677-.15.963-.237Z", clipRule: "evenodd" })));
|
|
12
|
+
};
|
|
13
|
+
exports.UxfLogo = UxfLogo;
|
package/package.json
CHANGED
package/toggle/toggle.js
CHANGED
|
@@ -13,7 +13,7 @@ exports.Toggle = (0, forwardRef_1.forwardRef)("Toggle", (props, ref) => {
|
|
|
13
13
|
var _a, _b;
|
|
14
14
|
return (react_1.default.createElement(react_2.Switch.Group, null,
|
|
15
15
|
react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-toggle__wrapper", `uxf-toggle__wrapper--${(_a = props.variant) !== null && _a !== void 0 ? _a : "default"}`, props.hiddenLabel && "uxf-toggle__wrapper--hiddenLabel", props.className) },
|
|
16
|
-
react_1.default.createElement(react_2.Switch, { checked: props.value, className: (0, cx_1.cx)(props.
|
|
16
|
+
react_1.default.createElement(react_2.Switch, { checked: props.value, className: (0, cx_1.cx)(props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.value && classes_1.CLASSES.IS_SELECTED, "uxf-toggle", `uxf-toggle--${(_b = props.variant) !== null && _b !== void 0 ? _b : "default"}`), disabled: props.isDisabled, name: props.name, onChange: props.onChange, style: props.style, ref: ref },
|
|
17
17
|
react_1.default.createElement("span", { className: "uxf-toggle__inner" })),
|
|
18
18
|
react_1.default.createElement(react_2.Switch.Label, { hidden: props.hiddenLabel, className: "uxf-toggle__label" }, props.label))));
|
|
19
19
|
});
|
package/utils/icons-config.js
CHANGED
|
@@ -15,6 +15,11 @@ module.exports = {
|
|
|
15
15
|
height: 512,
|
|
16
16
|
data: `<path d="M137.4 374.6a32.05 32.05 0 0 0 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9S301 191.9 288 191.9L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z" fill="currentColor"/>`,
|
|
17
17
|
},
|
|
18
|
+
bars: {
|
|
19
|
+
width: 448,
|
|
20
|
+
height: 512,
|
|
21
|
+
data: `<path d="M0 96C0 78.3 14.3 64 32 64H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32C14.3 128 0 113.7 0 96zM0 256c0-17.7 14.3-32 32-32H416c17.7 0 32 14.3 32 32s-14.3 32-32 32H32c-17.7 0-32-14.3-32-32zM448 416c0 17.7-14.3 32-32 32H32c-17.7 0-32-14.3-32-32s14.3-32 32-32H416c17.7 0 32 14.3 32 32z" fill="currentColor" />`,
|
|
22
|
+
},
|
|
18
23
|
check: {
|
|
19
24
|
width: 512,
|
|
20
25
|
height: 512,
|