@uxf/ui 1.0.1 → 10.0.0-beta.4
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/chip/chip.d.ts +3 -1
- package/chip/chip.js +6 -5
- package/chip/chip.stories.js +27 -10
- package/chip/theme.d.ts +7 -0
- package/css/avatar-file-input.css +82 -0
- package/css/avatar.css +15 -0
- package/css/badge.css +23 -0
- package/css/button-group.css +22 -0
- package/css/button-list.css +61 -0
- package/css/button.css +335 -0
- package/css/calendar.css +215 -0
- package/css/checkbox-button.css +98 -0
- package/css/checkbox-input.css +24 -0
- package/css/checkbox.css +120 -0
- package/css/chip.css +591 -0
- package/css/color-radio-group.css +21 -0
- package/css/color-radio.css +33 -0
- package/css/component-structure-analyzer.css +31 -0
- package/css/date-picker.css +22 -0
- package/css/datetime-picker.css +11 -0
- package/css/dropdown.css +70 -0
- package/css/dropzone.css +85 -0
- package/css/error-message.css +3 -0
- package/css/file-input.css +80 -0
- package/css/flash-messages.css +28 -0
- package/css/form-component.css +7 -0
- package/css/icon.css +7 -0
- package/css/image-gallery.css +59 -0
- package/css/input-basic.css +18 -0
- package/css/input-with-popover.css +35 -0
- package/css/input.css +270 -0
- package/css/label.css +15 -0
- package/css/layout.css +47 -0
- package/css/list-item.css +29 -0
- package/css/loader.css +23 -0
- package/css/modal.css +65 -0
- package/css/multi-combobox.css +110 -0
- package/css/multi-select.css +27 -0
- package/css/pagination.css +93 -0
- package/css/paper.css +3 -0
- package/css/radio-group.css +169 -0
- package/css/radio.css +101 -0
- package/css/raster-image.css +20 -0
- package/css/select-base.css +50 -0
- package/css/tabs.css +131 -0
- package/css/text-link.css +12 -0
- package/css/textarea.css +124 -0
- package/css/time-picker.css +32 -0
- package/css/toggle.css +80 -0
- package/css/tooltip.css +7 -0
- package/css/typography.css +51 -0
- package/hooks/use-dropdown.d.ts +1 -1
- package/package.json +3 -2
- package/tooltip/use-tooltip.d.ts +1 -1
- package/utils/storybook-config.js +1 -1
package/chip/chip.d.ts
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { ChipColors, ChipSizes } from "@uxf/ui/chip/theme";
|
|
1
|
+
import { ChipColors, ChipSizes, ChipVariants } from "@uxf/ui/chip/theme";
|
|
2
2
|
import React, { HTMLAttributes, MouseEventHandler } from "react";
|
|
3
3
|
export type ChipColor = keyof ChipColors;
|
|
4
4
|
export type ChipSize = keyof ChipSizes;
|
|
5
|
+
export type ChipVariant = keyof ChipVariants;
|
|
5
6
|
export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
7
|
color?: ChipColor;
|
|
7
8
|
onClose?: MouseEventHandler;
|
|
8
9
|
size?: ChipSize;
|
|
9
10
|
suppressFocus?: boolean;
|
|
11
|
+
variant?: ChipVariant;
|
|
10
12
|
}
|
|
11
13
|
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -27,11 +27,12 @@ exports.Chip = void 0;
|
|
|
27
27
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
exports.Chip = (0, react_1.forwardRef)((props, ref) => {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
const { children, className, onClose, suppressFocus, ...restProps } = props;
|
|
32
|
+
const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "default"}`, `uxf-chip--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-chip--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`, onClose && "has-button", className);
|
|
33
|
+
return (react_1.default.createElement("div", { className: chipClassName, ref: ref, ...restProps },
|
|
34
|
+
typeof children === "string" ? react_1.default.createElement("span", { className: "uxf-chip__text" }, children) : children,
|
|
35
|
+
onClose && (react_1.default.createElement("button", { className: "uxf-chip__button", onClick: onClose, tabIndex: suppressFocus ? -1 : undefined, type: "button" },
|
|
35
36
|
react_1.default.createElement("span", { className: "sr-only" }, "Remove option"),
|
|
36
37
|
react_1.default.createElement("svg", { stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
|
|
37
38
|
react_1.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" }))))));
|
package/chip/chip.stories.js
CHANGED
|
@@ -7,7 +7,6 @@ exports.Default = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const chip_1 = require("@uxf/ui/chip");
|
|
9
9
|
const storybook_config_1 = require("../utils/storybook-config");
|
|
10
|
-
// import Docs from "./chip.docs.mdx";
|
|
11
10
|
exports.default = {
|
|
12
11
|
title: "UI/Chip",
|
|
13
12
|
component: chip_1.Chip,
|
|
@@ -17,16 +16,34 @@ exports.default = {
|
|
|
17
16
|
},
|
|
18
17
|
},
|
|
19
18
|
};
|
|
19
|
+
const getChipsForSize = (size, colors) => {
|
|
20
|
+
const lowChips = colors.map((color) => (react_1.default.createElement("div", { key: color },
|
|
21
|
+
react_1.default.createElement(chip_1.Chip, { variant: "low", size: size, color: color, onClose: () => null }, color))));
|
|
22
|
+
const mediumChips = colors.map((color) => (react_1.default.createElement("div", { key: color },
|
|
23
|
+
react_1.default.createElement(chip_1.Chip, { variant: "medium", size: size, color: color }, color))));
|
|
24
|
+
const defaultChips = colors.map((color) => (react_1.default.createElement("div", { key: color },
|
|
25
|
+
react_1.default.createElement(chip_1.Chip, { variant: "default", size: size, color: color }, color))));
|
|
26
|
+
return (react_1.default.createElement("div", { className: "grid grid-cols-3 gap-4" },
|
|
27
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, lowChips),
|
|
28
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, mediumChips),
|
|
29
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, defaultChips)));
|
|
30
|
+
};
|
|
20
31
|
function Default() {
|
|
21
32
|
const config = (0, storybook_config_1.useStorybookConfig)("Chip");
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
react_1.default.createElement("div", { className: "
|
|
27
|
-
react_1.default.createElement("div", { className: "space-
|
|
28
|
-
|
|
29
|
-
react_1.default.createElement("div", { className: "space-
|
|
30
|
-
|
|
33
|
+
return (react_1.default.createElement("div", { className: "flex lg:flex-row" },
|
|
34
|
+
react_1.default.createElement("div", { className: "light space-y-4 rounded bg-white p-10" },
|
|
35
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "small"),
|
|
36
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("small", config.colors)),
|
|
37
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "default"),
|
|
38
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("default", config.colors)),
|
|
39
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "large"),
|
|
40
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("large", config.colors))),
|
|
41
|
+
react_1.default.createElement("div", { className: "dark space-y-4 rounded bg-gray-900 p-10 text-white" },
|
|
42
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "small"),
|
|
43
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("small", config.colors)),
|
|
44
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "default"),
|
|
45
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("default", config.colors)),
|
|
46
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "large"),
|
|
47
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("large", config.colors)))));
|
|
31
48
|
}
|
|
32
49
|
exports.Default = Default;
|
package/chip/theme.d.ts
CHANGED
|
@@ -8,8 +8,15 @@ export interface ChipColors {
|
|
|
8
8
|
green: true;
|
|
9
9
|
blue: true;
|
|
10
10
|
default: true;
|
|
11
|
+
primary: true;
|
|
11
12
|
}
|
|
12
13
|
export interface ChipSizes {
|
|
13
14
|
default: true;
|
|
14
15
|
large: true;
|
|
16
|
+
small: true;
|
|
17
|
+
}
|
|
18
|
+
export interface ChipVariants {
|
|
19
|
+
default: true;
|
|
20
|
+
medium: true;
|
|
21
|
+
low: true;
|
|
15
22
|
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
.uxf-avatar-file-input {
|
|
2
|
+
&__input {
|
|
3
|
+
@apply hidden;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
&__label {
|
|
7
|
+
@apply cursor-pointer h-20 w-20 rounded-full flex items-center justify-center border-2 border-dashed
|
|
8
|
+
transition-all duration-75 ease-in-out;
|
|
9
|
+
|
|
10
|
+
:root .light & {
|
|
11
|
+
@apply border-lightLow;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:root .dark & {
|
|
15
|
+
@apply border-lightBorder;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__icon {
|
|
19
|
+
:root .light & {
|
|
20
|
+
@apply text-lightLow;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root .dark & {
|
|
24
|
+
@apply text-lightBorder;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.is-invalid {
|
|
28
|
+
:root .light & {
|
|
29
|
+
@apply text-error;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:root .dark & {
|
|
33
|
+
@apply text-error;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&:hover {
|
|
39
|
+
@apply border-4;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.is-invalid {
|
|
43
|
+
:root .light & {
|
|
44
|
+
@apply border-error;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:root .dark & {
|
|
48
|
+
@apply border-error;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&.is-disabled {
|
|
53
|
+
@apply cursor-not-allowed bg-lightLow/20;
|
|
54
|
+
|
|
55
|
+
&:hover {
|
|
56
|
+
@apply border-2;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&__label-text {
|
|
62
|
+
@apply text-sm text-center;
|
|
63
|
+
|
|
64
|
+
:root .light & {
|
|
65
|
+
@apply text-lightLow;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
:root .dark & {
|
|
69
|
+
@apply text-lightBorder;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&.is-invalid {
|
|
73
|
+
:root .light & {
|
|
74
|
+
@apply text-error;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
:root .dark & {
|
|
78
|
+
@apply text-error;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
package/css/avatar.css
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
.uxf-avatar {
|
|
2
|
+
@apply relative inline-flex items-center justify-center h-10 w-10 rounded-full;
|
|
3
|
+
|
|
4
|
+
&__image {
|
|
5
|
+
@apply absolute left-0 top-0 block h-full w-full rounded-inherit object-cover;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:root .light & {
|
|
9
|
+
@apply text-gray-700 bg-gray-200;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
:root .dark & {
|
|
13
|
+
@apply text-gray-200 bg-gray-800;
|
|
14
|
+
}
|
|
15
|
+
}
|
package/css/badge.css
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.uxf-badge {
|
|
2
|
+
@apply inline-flex items-center justify-center font-bold;
|
|
3
|
+
|
|
4
|
+
&--size-small {
|
|
5
|
+
@apply h-6 min-w-[24px] text-sm rounded-[12px] px-1.5;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&--size-medium {
|
|
9
|
+
@apply h-8 min-w-[32px] text-base rounded-[16px] px-2;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&--size-large {
|
|
13
|
+
@apply h-10 min-w-[40px] text-lg rounded-[20px] px-2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:root .light & {
|
|
17
|
+
@apply text-white bg-primary;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
:root .dark & {
|
|
21
|
+
@apply text-gray-900 bg-white;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
.uxf-button-group {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
|
|
5
|
+
.uxf-button {
|
|
6
|
+
&:focus {
|
|
7
|
+
position: relative;
|
|
8
|
+
z-index: 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:not(:last-of-type) {
|
|
12
|
+
border-bottom-right-radius: 0;
|
|
13
|
+
border-top-right-radius: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:not(:first-of-type) {
|
|
17
|
+
border-bottom-left-radius: 0;
|
|
18
|
+
border-top-left-radius: 0;
|
|
19
|
+
margin-left: -1px;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.uxf-button-list {
|
|
2
|
+
@apply flex items-center space-x-2;
|
|
3
|
+
|
|
4
|
+
&__menu {
|
|
5
|
+
@apply relative;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__menu-items {
|
|
9
|
+
@apply absolute right-0 mt-2 w-40 divide-y rounded-md shadow-lg ring-1 focus:outline-none z-dropdown;
|
|
10
|
+
|
|
11
|
+
:root .light & {
|
|
12
|
+
@apply divide-gray-100 bg-white ring-black/5;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
:root .dark & {
|
|
16
|
+
@apply divide-gray-700 bg-gray-900 ring-white/10;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&__button {
|
|
21
|
+
@apply space-x-2;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__open-button {
|
|
25
|
+
@apply space-x-2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&__menu-button {
|
|
29
|
+
@apply flex px-3 py-2 space-x-3 text-sm is-hoverable:hover:cursor-pointer;
|
|
30
|
+
|
|
31
|
+
:root .light & {
|
|
32
|
+
@apply text-black hover:text-gray-800;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:root .dark & {
|
|
36
|
+
@apply text-white hover:text-gray-200;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&-icon {
|
|
40
|
+
@apply w-3;
|
|
41
|
+
|
|
42
|
+
:root .light & {
|
|
43
|
+
@apply text-lightMedium;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:root .dark & {
|
|
47
|
+
@apply text-darkMedium;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.is-disabled {
|
|
52
|
+
:root .light & {
|
|
53
|
+
@apply text-lightLow;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:root .dark & {
|
|
57
|
+
@apply text-darkLow;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
package/css/button.css
ADDED
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
@keyframes spinner {
|
|
2
|
+
to {
|
|
3
|
+
transform: rotate(360deg);
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.uxf-button {
|
|
8
|
+
@apply inline-flex items-center justify-center rounded-md font-medium shadow-sm transition-colors
|
|
9
|
+
focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
|
|
10
|
+
|
|
11
|
+
.uxf-icon {
|
|
12
|
+
@apply h-6;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&__text {
|
|
16
|
+
@apply truncate;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&--full-width {
|
|
20
|
+
@apply w-full flex flex-row justify-center;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.is-disabled {
|
|
24
|
+
@apply pointer-events-none;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&.uxf-button--icon-button.is-loading {
|
|
28
|
+
&::after {
|
|
29
|
+
@apply ml-0;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.is-loading {
|
|
34
|
+
@apply pointer-events-none;
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
animation: spinner 0.8s linear infinite;
|
|
38
|
+
border-radius: 50%;
|
|
39
|
+
border-right: 2px solid transparent;
|
|
40
|
+
border-top: 2px solid;
|
|
41
|
+
content: "";
|
|
42
|
+
height: 20px;
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
width: 20px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&.uxf-button--icon-button::after {
|
|
48
|
+
margin-left: 0;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.uxf-icon {
|
|
52
|
+
@apply hidden;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--size-xs {
|
|
57
|
+
height: theme("inputSize.xs");
|
|
58
|
+
|
|
59
|
+
@apply px-2.5 text-xs rounded;
|
|
60
|
+
|
|
61
|
+
&.is-loading::after {
|
|
62
|
+
height: 14px;
|
|
63
|
+
width: 14px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&.uxf-button--icon-button {
|
|
67
|
+
width: theme("inputSize.xs");
|
|
68
|
+
|
|
69
|
+
@apply p-0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.uxf-icon {
|
|
73
|
+
@apply h-4 w-4;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&--size-sm {
|
|
78
|
+
height: theme("inputSize.sm");
|
|
79
|
+
|
|
80
|
+
@apply px-3 text-sm leading-4;
|
|
81
|
+
|
|
82
|
+
&.is-loading::after {
|
|
83
|
+
height: 16px;
|
|
84
|
+
width: 16px;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&.uxf-button--icon-button {
|
|
88
|
+
width: theme("inputSize.sm");
|
|
89
|
+
|
|
90
|
+
@apply p-0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.uxf-icon {
|
|
94
|
+
@apply h-4 w-4;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&--size-default {
|
|
99
|
+
height: theme("inputSize.default");
|
|
100
|
+
|
|
101
|
+
@apply px-4 text-sm;
|
|
102
|
+
|
|
103
|
+
&.uxf-button--icon-button {
|
|
104
|
+
width: theme("inputSize.default");
|
|
105
|
+
|
|
106
|
+
@apply p-0;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&--size-lg {
|
|
111
|
+
height: theme("inputSize.lg");
|
|
112
|
+
|
|
113
|
+
@apply px-4 text-base;
|
|
114
|
+
|
|
115
|
+
&.uxf-button--icon-button {
|
|
116
|
+
width: theme("inputSize.lg");
|
|
117
|
+
|
|
118
|
+
@apply p-0;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&--size-xl {
|
|
123
|
+
height: theme("inputSize.xl");
|
|
124
|
+
|
|
125
|
+
@apply px-6 text-base;
|
|
126
|
+
|
|
127
|
+
&.uxf-button--icon-button {
|
|
128
|
+
width: theme("inputSize.xl");
|
|
129
|
+
|
|
130
|
+
@apply p-0;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&--variant-outlined {
|
|
135
|
+
@apply border;
|
|
136
|
+
|
|
137
|
+
:root .light & {
|
|
138
|
+
@apply bg-white;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
:root .dark & {
|
|
142
|
+
@apply bg-lightHigh;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.uxf-button--color-default {
|
|
146
|
+
@apply focus-visible:ring-primary;
|
|
147
|
+
|
|
148
|
+
:root .light & {
|
|
149
|
+
@apply text-primary border-primary is-hoverable:border-primary-700 is-hoverable:text-primary-700;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:root .dark & {
|
|
153
|
+
@apply text-primary border-primary is-hoverable:border-primary-300 is-hoverable:text-primary-300;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.uxf-button--color-success {
|
|
158
|
+
@apply focus-visible:ring-success;
|
|
159
|
+
|
|
160
|
+
:root .light & {
|
|
161
|
+
@apply text-success border-success is-hoverable:border-success-700 is-hoverable:text-success-700;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
:root .dark & {
|
|
165
|
+
@apply text-success border-success is-hoverable:border-success-300 is-hoverable:text-success-300;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&.uxf-button--color-error {
|
|
170
|
+
@apply focus-visible:ring-error;
|
|
171
|
+
|
|
172
|
+
:root .light & {
|
|
173
|
+
@apply text-error border-error is-hoverable:border-error-700 is-hoverable:text-error-700;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
:root .dark & {
|
|
177
|
+
@apply text-error border-error is-hoverable:border-error-300 is-hoverable:text-error-300;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&.is-disabled {
|
|
182
|
+
:root .light & {
|
|
183
|
+
@apply border-gray-300 bg-gray-300 text-lightLow;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
:root .dark & {
|
|
187
|
+
@apply border-gray-700 bg-gray-700 text-darkLow;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&--variant-default {
|
|
193
|
+
@apply text-white;
|
|
194
|
+
|
|
195
|
+
:root .dark & {
|
|
196
|
+
@apply focus-visible:ring-offset-gray-900;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
&.uxf-button--color-default {
|
|
200
|
+
@apply focus-visible:ring-primary;
|
|
201
|
+
|
|
202
|
+
:root .light & {
|
|
203
|
+
@apply bg-primary is-hoverable:bg-primary-700;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
:root .dark & {
|
|
207
|
+
@apply bg-primary is-hoverable:bg-primary-400;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
&.is-disabled {
|
|
211
|
+
:root .light & {
|
|
212
|
+
@apply bg-gray-300 text-lightLow;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
:root .dark & {
|
|
216
|
+
@apply bg-gray-600 text-gray-400;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&.uxf-button--color-success {
|
|
222
|
+
@apply focus-visible:ring-success;
|
|
223
|
+
|
|
224
|
+
:root .light & {
|
|
225
|
+
@apply bg-success is-hoverable:bg-success-700;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
:root .dark & {
|
|
229
|
+
@apply bg-success is-hoverable:bg-success-400;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&.is-disabled {
|
|
233
|
+
:root .light & {
|
|
234
|
+
@apply bg-gray-300 text-lightLow;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
:root .dark & {
|
|
238
|
+
@apply bg-gray-600 text-gray-400;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&.uxf-button--color-error {
|
|
244
|
+
@apply focus-visible:ring-error;
|
|
245
|
+
|
|
246
|
+
:root .light & {
|
|
247
|
+
@apply bg-error is-hoverable:bg-error-700;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
:root .dark & {
|
|
251
|
+
@apply bg-error is-hoverable:bg-error-400;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
&.is-disabled {
|
|
255
|
+
:root .light & {
|
|
256
|
+
@apply bg-gray-300 text-lightLow;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
:root .dark & {
|
|
260
|
+
@apply bg-gray-600 text-gray-400;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
&--variant-white {
|
|
267
|
+
@apply border focus-visible:ring-primary;
|
|
268
|
+
|
|
269
|
+
:root .light & {
|
|
270
|
+
@apply border-lightBorder bg-white is-hoverable:bg-gray-100 text-lightMedium;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
:root .dark & {
|
|
274
|
+
@apply border-darkBorder text-darkMedium bg-lightHigh is-hoverable:bg-gray-800 is-hoverable:text-darkHigh;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
&.is-disabled {
|
|
278
|
+
:root .light & {
|
|
279
|
+
@apply text-lightLow;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
:root .dark & {
|
|
283
|
+
@apply text-darkLow border-darkBorder;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
&--variant-text {
|
|
289
|
+
@apply shadow-none;
|
|
290
|
+
|
|
291
|
+
&.uxf-button--color-default {
|
|
292
|
+
:root .light & {
|
|
293
|
+
@apply text-lightMedium is-hoverable:text-lightHigh;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
:root .dark & {
|
|
297
|
+
@apply text-darkMedium is-hoverable:text-darkHigh;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&.uxf-button--color-success {
|
|
302
|
+
@apply text-success;
|
|
303
|
+
|
|
304
|
+
:root .light & {
|
|
305
|
+
@apply is-hoverable:text-success-700;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
:root .dark & {
|
|
309
|
+
@apply is-hoverable:text-success-300;
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
&.uxf-button--color-error {
|
|
314
|
+
@apply text-error;
|
|
315
|
+
|
|
316
|
+
:root .light & {
|
|
317
|
+
@apply is-hoverable:text-error-700;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
:root .dark & {
|
|
321
|
+
@apply is-hoverable:text-error-300;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
&.is-disabled {
|
|
326
|
+
:root .light & {
|
|
327
|
+
@apply text-lightLow;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
:root .dark & {
|
|
331
|
+
@apply text-darkLow;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|