@uxf/ui 1.0.0-beta.81 → 1.0.0-beta.83
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/avatar/index.d.ts +1 -1
- package/avatar/index.js +15 -3
- package/badge/index.d.ts +1 -1
- package/badge/index.js +15 -3
- package/chip/chip.d.ts +4 -1
- package/chip/chip.js +8 -3
- package/chip/chip.stories.d.ts +8 -1
- package/chip/chip.stories.js +16 -6
- package/chip/index.d.ts +1 -1
- package/chip/index.js +15 -3
- package/chip/theme.d.ts +12 -3
- package/combobox/combobox.d.ts +0 -1
- package/combobox/combobox.js +3 -5
- package/css/button.css +13 -12
- package/css/button.old.css +9 -9
- package/css/chip.css +144 -10
- package/css/chip.old.css +37 -0
- package/css/combobox.css +6 -2
- package/css/combobox.old.css +102 -0
- package/css/dropdown.css +1 -1
- package/css/dropdown.old.css +24 -0
- package/css/input.css +17 -11
- package/css/input.old.css +193 -0
- package/css/pagination.css +4 -3
- package/css/select.css +6 -2
- package/css/select.old.css +66 -0
- package/hooks/use-dropdown.js +3 -1
- package/input/input.stories.d.ts +1 -0
- package/input/input.stories.js +14 -4
- package/input/theme.d.ts +1 -0
- package/list-item/index.d.ts +1 -1
- package/list-item/index.js +15 -3
- package/package.json +1 -1
- package/select/select.d.ts +0 -1
- package/select/select.js +3 -5
- package/tabs/index.d.ts +1 -1
- package/tabs/index.js +15 -3
- package/text-link/index.d.ts +1 -1
- package/text-link/index.js +15 -3
- package/utils/storybook-config.d.ts +8 -1
- package/utils/storybook-config.js +6 -1
- package/checkbox-input/checkbox-input.d.ts +0 -2
- package/checkbox-input/checkbox-input.js +0 -12
- package/checkbox-input/checkbox-input.stories.d.ts +0 -7
- package/checkbox-input/checkbox-input.stories.js +0 -17
- package/checkbox-input/index.d.ts +0 -1
- package/checkbox-input/index.js +0 -17
- package/css/checkbox-input.css +0 -3
package/avatar/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./avatar";
|
package/avatar/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
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
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
var avatar_1 = require("./avatar");
|
|
5
|
-
Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return avatar_1.Avatar; } });
|
|
17
|
+
__exportStar(require("./avatar"), exports);
|
package/badge/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./badge";
|
package/badge/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
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
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
var badge_1 = require("./badge");
|
|
5
|
-
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return badge_1.Badge; } });
|
|
17
|
+
__exportStar(require("./badge"), exports);
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import React, { HTMLAttributes } from "react";
|
|
2
|
-
import { ChipColors } from "@uxf/ui/chip/theme";
|
|
2
|
+
import { ChipColors, ChipSizes } from "@uxf/ui/chip/theme";
|
|
3
3
|
export declare type ChipColor = keyof ChipColors;
|
|
4
|
+
export declare type ChipSize = keyof ChipSizes;
|
|
4
5
|
export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
6
|
color?: ChipColor;
|
|
7
|
+
size?: ChipSize;
|
|
8
|
+
onClose?: () => void;
|
|
6
9
|
}
|
|
7
10
|
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLDivElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -8,7 +8,12 @@ const cx_1 = require("@uxf/core/utils/cx");
|
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const forwardRef_1 = require("@uxf/core/utils/forwardRef");
|
|
10
10
|
exports.Chip = (0, forwardRef_1.forwardRef)("Chip", (props, ref) => {
|
|
11
|
-
var _a;
|
|
12
|
-
const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "
|
|
13
|
-
return (react_1.default.createElement("div", { ref: ref, className: chipClassName },
|
|
11
|
+
var _a, _b;
|
|
12
|
+
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"}`, props.onClose && "has-button", props.className);
|
|
13
|
+
return (react_1.default.createElement("div", { ref: ref, className: chipClassName },
|
|
14
|
+
typeof props.children === "string" ? (react_1.default.createElement("span", { className: "uxf-chip__text" }, props.children)) : (props.children),
|
|
15
|
+
props.onClose && (react_1.default.createElement("button", { type: "button", onClick: props.onClose, className: "uxf-chip__button" },
|
|
16
|
+
react_1.default.createElement("span", { className: "sr-only" }, "Remove option"),
|
|
17
|
+
react_1.default.createElement("svg", { stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
|
|
18
|
+
react_1.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" }))))));
|
|
14
19
|
});
|
package/chip/chip.stories.d.ts
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
/// <reference types="mdx" />
|
|
1
2
|
import React from "react";
|
|
3
|
+
import Docs from "./chip.docs.mdx";
|
|
2
4
|
declare const _default: {
|
|
3
5
|
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("
|
|
6
|
+
component: React.ForwardRefExoticComponent<import("@uxf/ui/chip").ChipProps & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
docs: {
|
|
9
|
+
page: typeof Docs;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
5
12
|
};
|
|
6
13
|
export default _default;
|
|
7
14
|
export declare function Default(): JSX.Element;
|
package/chip/chip.stories.js
CHANGED
|
@@ -6,17 +6,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.Default = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const chip_1 = require("@uxf/ui/chip");
|
|
9
|
+
const storybook_config_1 = require("../utils/storybook-config");
|
|
10
|
+
const chip_docs_mdx_1 = __importDefault(require("./chip.docs.mdx"));
|
|
9
11
|
exports.default = {
|
|
10
12
|
title: "UI/Chip",
|
|
11
13
|
component: chip_1.Chip,
|
|
14
|
+
parameters: {
|
|
15
|
+
docs: {
|
|
16
|
+
page: chip_docs_mdx_1.default,
|
|
17
|
+
},
|
|
18
|
+
},
|
|
12
19
|
};
|
|
13
20
|
function Default() {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
react_1.default.createElement(chip_1.Chip, { color: "error" }, "Error")));
|
|
21
|
+
const config = (0, storybook_config_1.useStorybookConfig)("Chip");
|
|
22
|
+
const allChips = config.colors.map((color) => (react_1.default.createElement(chip_1.Chip, { key: color, color: color, onClose: () => null }, color)));
|
|
23
|
+
const allChipsLarge = config.colors.map((color) => (react_1.default.createElement(chip_1.Chip, { key: color, color: color, size: "large" }, color)));
|
|
18
24
|
return (react_1.default.createElement("div", { className: "flex flex-col lg:flex-row" },
|
|
19
|
-
react_1.default.createElement("div", { className: "light space-
|
|
20
|
-
|
|
25
|
+
react_1.default.createElement("div", { className: "light space-y-4 rounded bg-white p-8" },
|
|
26
|
+
react_1.default.createElement("div", { className: "space-x-4" }, allChips),
|
|
27
|
+
react_1.default.createElement("div", { className: "space-x-4" }, allChipsLarge)),
|
|
28
|
+
react_1.default.createElement("div", { className: "dark space-y-4 rounded bg-gray-900 p-8" },
|
|
29
|
+
react_1.default.createElement("div", { className: "space-x-4" }, allChips),
|
|
30
|
+
react_1.default.createElement("div", { className: "space-x-4" }, allChipsLarge))));
|
|
21
31
|
}
|
|
22
32
|
exports.Default = Default;
|
package/chip/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from "./chip";
|
package/chip/index.js
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
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
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports
|
|
4
|
-
var chip_1 = require("./chip");
|
|
5
|
-
Object.defineProperty(exports, "Chip", { enumerable: true, get: function () { return chip_1.Chip; } });
|
|
17
|
+
__exportStar(require("./chip"), exports);
|
package/chip/theme.d.ts
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
export interface ChipColors {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
default: true;
|
|
3
|
+
red: true;
|
|
4
|
+
yellow: true;
|
|
5
|
+
green: true;
|
|
6
|
+
blue: true;
|
|
7
|
+
indigo: true;
|
|
8
|
+
purple: true;
|
|
9
|
+
pink: true;
|
|
10
|
+
}
|
|
11
|
+
export interface ChipSizes {
|
|
12
|
+
default: true;
|
|
13
|
+
large: true;
|
|
5
14
|
}
|
package/combobox/combobox.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export interface ComboboxProps<Value = ComboboxValue, Option = ComboboxOption<Va
|
|
|
14
14
|
helperText?: ReactNode;
|
|
15
15
|
hiddenLabel?: boolean;
|
|
16
16
|
iconName?: keyof IconsSet;
|
|
17
|
-
iconSize?: number;
|
|
18
17
|
id?: string;
|
|
19
18
|
keyExtractor?: (option: Option) => string | number;
|
|
20
19
|
label: string;
|
package/combobox/combobox.js
CHANGED
|
@@ -36,7 +36,7 @@ const use_dropdown_1 = require("../hooks/use-dropdown");
|
|
|
36
36
|
const icon_1 = require("../icon");
|
|
37
37
|
const label_1 = require("../label");
|
|
38
38
|
exports.Combobox = (0, forwardRef_1.forwardRef)("Combobox", (props, ref) => {
|
|
39
|
-
var _a, _b, _c
|
|
39
|
+
var _a, _b, _c;
|
|
40
40
|
const generatedId = (0, react_2.useId)();
|
|
41
41
|
const id = (_a = props.id) !== null && _a !== void 0 ? _a : generatedId;
|
|
42
42
|
const [query, setQuery] = (0, react_2.useState)("");
|
|
@@ -47,14 +47,12 @@ exports.Combobox = (0, forwardRef_1.forwardRef)("Combobox", (props, ref) => {
|
|
|
47
47
|
const input = (0, useInputFocus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
|
|
48
48
|
const dropdown = (0, use_dropdown_1.useDropdown)((_b = props.dropdownPlacement) !== null && _b !== void 0 ? _b : "bottom", true);
|
|
49
49
|
const stableRef = (0, react_2.useMemo)(() => (0, composeRefs_1.composeRefs)(innerRef, ref, dropdown.reference), [ref, dropdown.reference]);
|
|
50
|
-
const
|
|
51
|
-
const iconName = (_c = props.iconName) !== null && _c !== void 0 ? _c : "caretDown";
|
|
52
|
-
const iconSize = (_d = props.iconSize) !== null && _d !== void 0 ? _d : 24;
|
|
50
|
+
const iconName = (_c = props.iconName) !== null && _c !== void 0 ? _c : "chevronDown";
|
|
53
51
|
return (react_2.default.createElement(react_1.Combobox, { as: "div", className: (0, cx_1.cx)("uxf-combobox", props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isRequired && classes_1.CLASSES.IS_REQUIRED, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.className), onChange: (v) => { var _a; return (_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, v.id); }, value: selectedOption, disabled: props.isDisabled || props.isReadOnly }, (renderProps) => (react_2.default.createElement(react_2.default.Fragment, null,
|
|
54
52
|
react_2.default.createElement(react_1.Combobox.Label, { as: label_1.Label, isHidden: props.hiddenLabel, onClick: props.isDisabled || props.isReadOnly ? undefined : input.focus }, props.label),
|
|
55
53
|
react_2.default.createElement(react_1.Combobox.Button, { as: "div", className: (0, cx_1.cx)("uxf-combobox__button", (renderProps.open || input.focused) && classes_1.CLASSES.IS_FOCUSED, renderProps.disabled && classes_1.CLASSES.IS_DISABLED, props.isReadOnly && classes_1.CLASSES.IS_READONLY, props.isInvalid && classes_1.CLASSES.IS_INVALID, dropdown.placement === "bottom" && "is-open--bottom", dropdown.placement === "top" && "is-open--top", renderProps.open && "is-open"), onBlur: input.onBlur, onFocus: input.onFocus, tabIndex: props.isDisabled || props.isReadOnly ? undefined : 0, ref: stableRef, "aria-invalid": props.isInvalid, "aria-describedby": errorId },
|
|
56
54
|
react_2.default.createElement(react_1.Combobox.Input, { className: (0, cx_1.cx)("uxf-combobox__input"), displayValue: (item) => { var _a; return (_a = item === null || item === void 0 ? void 0 : item.label) !== null && _a !== void 0 ? _a : ""; }, onBlur: props.onBlur, onChange: (event) => setQuery(event.target.value), placeholder: props.placeholder, ref: stableRef, type: "text" }),
|
|
57
|
-
react_2.default.createElement(icon_1.Icon, { className:
|
|
55
|
+
react_2.default.createElement(icon_1.Icon, { className: (0, cx_1.cx)("uxf-select__button-icon", renderProps.open && "is-open"), name: iconName })),
|
|
58
56
|
react_2.default.createElement(react_1.Combobox.Options, { className: (0, cx_1.cx)("uxf-dropdown", dropdown.placement === "bottom" && "uxf-dropdown--bottom", dropdown.placement === "top" && "uxf-dropdown--top"), ref: dropdown.floating }, filteredData.map((option) => {
|
|
59
57
|
var _a, _b, _c, _d;
|
|
60
58
|
return (react_2.default.createElement(react_1.Combobox.Option, { key: (_b = (_a = props.keyExtractor) === null || _a === void 0 ? void 0 : _a.call(props, option)) !== null && _b !== void 0 ? _b : option.id, value: option, className: (optionState) => (0, cx_1.cx)("uxf-dropdown__item", optionState.active && classes_1.CLASSES.IS_ACTIVE, optionState.disabled && classes_1.CLASSES.IS_DISABLED, optionState.selected && classes_1.CLASSES.IS_SELECTED) }, (_d = (_c = props.renderOption) === null || _c === void 0 ? void 0 : _c.call(props, option)) !== null && _d !== void 0 ? _d : option.label));
|
package/css/button.css
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.uxf-button {
|
|
8
|
-
@apply inline-flex items-center justify-center rounded-md font-medium shadow-sm
|
|
8
|
+
@apply inline-flex items-center justify-center rounded-md font-medium shadow-sm
|
|
9
|
+
focus:outline-none focus:ring-2 focus:ring-offset-2;
|
|
9
10
|
|
|
10
11
|
.uxf-icon {
|
|
11
12
|
@apply h-6;
|
|
@@ -25,7 +26,7 @@
|
|
|
25
26
|
|
|
26
27
|
&.uxf-button--icon-button.is-loading {
|
|
27
28
|
&::after {
|
|
28
|
-
@apply ml-0
|
|
29
|
+
@apply ml-0;
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -53,7 +54,7 @@
|
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
&--size-xs {
|
|
56
|
-
@apply px-2.5
|
|
57
|
+
@apply px-2.5 h-7 text-xs rounded;
|
|
57
58
|
|
|
58
59
|
&.is-loading::after {
|
|
59
60
|
height: 14px;
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
&.uxf-button--icon-button {
|
|
64
|
-
@apply p-0
|
|
65
|
+
@apply p-0 w-7;
|
|
65
66
|
}
|
|
66
67
|
|
|
67
68
|
.uxf-icon {
|
|
@@ -70,7 +71,7 @@
|
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
&--size-sm {
|
|
73
|
-
@apply px-3
|
|
74
|
+
@apply px-3 h-8 text-sm leading-4;
|
|
74
75
|
|
|
75
76
|
&.is-loading::after {
|
|
76
77
|
height: 16px;
|
|
@@ -78,7 +79,7 @@
|
|
|
78
79
|
}
|
|
79
80
|
|
|
80
81
|
&.uxf-button--icon-button {
|
|
81
|
-
@apply p-0
|
|
82
|
+
@apply p-0 w-8;
|
|
82
83
|
}
|
|
83
84
|
|
|
84
85
|
.uxf-icon {
|
|
@@ -87,26 +88,26 @@
|
|
|
87
88
|
}
|
|
88
89
|
|
|
89
90
|
&--size-default {
|
|
90
|
-
@apply px-4
|
|
91
|
+
@apply px-4 h-9 text-sm;
|
|
91
92
|
|
|
92
93
|
&.uxf-button--icon-button {
|
|
93
|
-
@apply p-0
|
|
94
|
+
@apply p-0 w-9;
|
|
94
95
|
}
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
&--size-lg {
|
|
98
|
-
@apply px-4
|
|
99
|
+
@apply px-4 h-10 text-base;
|
|
99
100
|
|
|
100
101
|
&.uxf-button--icon-button {
|
|
101
|
-
@apply p-0
|
|
102
|
+
@apply p-0 w-10;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
105
|
|
|
105
106
|
&--size-xl {
|
|
106
|
-
@apply px-6
|
|
107
|
+
@apply px-6 h-11 text-base;
|
|
107
108
|
|
|
108
109
|
&.uxf-button--icon-button {
|
|
109
|
-
@apply p-0
|
|
110
|
+
@apply p-0 w-11;
|
|
110
111
|
}
|
|
111
112
|
}
|
|
112
113
|
|
package/css/button.old.css
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
.uxf-button {
|
|
8
8
|
@apply inline-flex items-center justify-center text-center rounded-lg before:rounded-lg font-semibold
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 relative cursor-pointer transition
|
|
10
|
+
before:transition;
|
|
11
11
|
|
|
12
12
|
&__text {
|
|
13
13
|
@apply truncate;
|
|
@@ -88,11 +88,11 @@
|
|
|
88
88
|
|
|
89
89
|
&--variant-outlined {
|
|
90
90
|
@apply before:absolute before:pointer-events-none before:inset-0 before:border is-hoverable:before:border-2
|
|
91
|
-
|
|
91
|
+
bg-transparent;
|
|
92
92
|
|
|
93
93
|
:root .light & {
|
|
94
94
|
@apply before:border-gray-300 is-hoverable:bg-primary-100 is-hoverable:before:border-primary-400
|
|
95
|
-
|
|
95
|
+
focus-visible:ring-primary-500 focus-visible:ring-offset-white;
|
|
96
96
|
|
|
97
97
|
&.is-disabled {
|
|
98
98
|
@apply before:border-gray-100 text-gray-400;
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
|
|
102
102
|
:root .dark & {
|
|
103
103
|
@apply before:border-gray-300 is-hoverable:bg-white/10 focus-visible:ring-primary-500
|
|
104
|
-
|
|
104
|
+
focus-visible:ring-offset-gray-900;
|
|
105
105
|
|
|
106
106
|
&.is-disabled {
|
|
107
107
|
@apply before:border-gray-700 text-gray-600;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
|
|
124
124
|
:root .dark & {
|
|
125
125
|
@apply text-white bg-primary-500 is-hoverable:bg-primary-400 focus-visible:ring-primary-500
|
|
126
|
-
|
|
126
|
+
focus-visible:ring-offset-gray-900;
|
|
127
127
|
|
|
128
128
|
&.is-disabled {
|
|
129
129
|
@apply bg-gray-700 text-gray-400;
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
|
|
163
163
|
:root .dark & {
|
|
164
164
|
@apply text-white bg-success-500 is-hoverable:bg-success-400 focus-visible:ring-success-500
|
|
165
|
-
|
|
165
|
+
focus-visible:ring-offset-gray-900;
|
|
166
166
|
|
|
167
167
|
&.is-disabled {
|
|
168
168
|
@apply bg-gray-700 text-gray-400;
|
|
@@ -181,7 +181,7 @@
|
|
|
181
181
|
|
|
182
182
|
:root .dark & {
|
|
183
183
|
@apply text-white bg-warning-500 is-hoverable:bg-warning-400 focus-visible:ring-warning-500
|
|
184
|
-
|
|
184
|
+
focus-visible:ring-offset-gray-900;
|
|
185
185
|
|
|
186
186
|
&.is-disabled {
|
|
187
187
|
@apply bg-gray-700 text-gray-400;
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
|
|
201
201
|
:root .dark & {
|
|
202
202
|
@apply text-white bg-error-500 is-hoverable:bg-error-400 focus-visible:ring-error-500
|
|
203
|
-
|
|
203
|
+
focus-visible:ring-offset-gray-900;
|
|
204
204
|
|
|
205
205
|
&.is-disabled {
|
|
206
206
|
@apply bg-gray-700 text-gray-400;
|
package/css/chip.css
CHANGED
|
@@ -1,37 +1,171 @@
|
|
|
1
1
|
.uxf-chip {
|
|
2
|
-
@apply inline-block rounded
|
|
2
|
+
@apply inline-block rounded py-0.5 px-2 text-xs font-medium;
|
|
3
|
+
|
|
4
|
+
&.has-button {
|
|
5
|
+
@apply pr-1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&--size-large {
|
|
9
|
+
@apply text-sm rounded-md px-2.5;
|
|
10
|
+
|
|
11
|
+
.uxf-chip__button {
|
|
12
|
+
@apply h-4 w-4;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
3
15
|
|
|
4
16
|
&__text {
|
|
5
17
|
@apply truncate;
|
|
6
18
|
}
|
|
7
19
|
|
|
8
|
-
|
|
20
|
+
&__button {
|
|
21
|
+
@apply ml-1 inline-flex h-4 w-4 flex-shrink-0 items-center justify-center rounded;
|
|
22
|
+
|
|
23
|
+
svg {
|
|
24
|
+
@apply h-2 w-2;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--color-default {
|
|
9
29
|
:root .light & {
|
|
10
|
-
@apply text-
|
|
30
|
+
@apply text-gray-600 bg-gray-100;
|
|
31
|
+
|
|
32
|
+
.uxf-chip__button {
|
|
33
|
+
@apply hover:bg-gray-200;
|
|
34
|
+
}
|
|
11
35
|
}
|
|
12
36
|
|
|
13
37
|
:root .dark & {
|
|
14
|
-
@apply text-white bg-
|
|
38
|
+
@apply text-white bg-gray-600;
|
|
39
|
+
|
|
40
|
+
.uxf-chip__button {
|
|
41
|
+
@apply hover:bg-gray-700;
|
|
42
|
+
}
|
|
15
43
|
}
|
|
16
44
|
}
|
|
17
45
|
|
|
18
|
-
&--color-
|
|
46
|
+
&--color-red {
|
|
19
47
|
:root .light & {
|
|
20
|
-
@apply text-
|
|
48
|
+
@apply text-red-600 bg-red-100;
|
|
49
|
+
|
|
50
|
+
.uxf-chip__button {
|
|
51
|
+
@apply hover:bg-red-200;
|
|
52
|
+
}
|
|
21
53
|
}
|
|
22
54
|
|
|
23
55
|
:root .dark & {
|
|
24
|
-
@apply text-white bg-
|
|
56
|
+
@apply text-white bg-red-600;
|
|
57
|
+
|
|
58
|
+
.uxf-chip__button {
|
|
59
|
+
@apply hover:bg-red-700;
|
|
60
|
+
}
|
|
25
61
|
}
|
|
26
62
|
}
|
|
27
63
|
|
|
28
|
-
&--color-
|
|
64
|
+
&--color-yellow {
|
|
29
65
|
:root .light & {
|
|
30
|
-
@apply text-
|
|
66
|
+
@apply text-yellow-600 bg-yellow-100;
|
|
67
|
+
|
|
68
|
+
.uxf-chip__button {
|
|
69
|
+
@apply hover:bg-yellow-200;
|
|
70
|
+
}
|
|
31
71
|
}
|
|
32
72
|
|
|
33
73
|
:root .dark & {
|
|
34
|
-
@apply text-white bg-
|
|
74
|
+
@apply text-white bg-yellow-600;
|
|
75
|
+
|
|
76
|
+
.uxf-chip__button {
|
|
77
|
+
@apply hover:bg-yellow-700;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&--color-green {
|
|
83
|
+
:root .light & {
|
|
84
|
+
@apply text-green-600 bg-green-100;
|
|
85
|
+
|
|
86
|
+
.uxf-chip__button {
|
|
87
|
+
@apply hover:bg-green-200;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
:root .dark & {
|
|
92
|
+
@apply text-white bg-green-600;
|
|
93
|
+
|
|
94
|
+
.uxf-chip__button {
|
|
95
|
+
@apply hover:bg-green-700;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&--color-blue {
|
|
101
|
+
:root .light & {
|
|
102
|
+
@apply text-blue-600 bg-blue-100;
|
|
103
|
+
|
|
104
|
+
.uxf-chip__button {
|
|
105
|
+
@apply hover:bg-blue-200;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
:root .dark & {
|
|
110
|
+
@apply text-white bg-blue-600;
|
|
111
|
+
|
|
112
|
+
.uxf-chip__button {
|
|
113
|
+
@apply hover:bg-blue-700;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&--color-indigo {
|
|
119
|
+
:root .light & {
|
|
120
|
+
@apply text-indigo-600 bg-indigo-100;
|
|
121
|
+
|
|
122
|
+
.uxf-chip__button {
|
|
123
|
+
@apply hover:bg-indigo-200;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:root .dark & {
|
|
128
|
+
@apply text-white bg-indigo-600;
|
|
129
|
+
|
|
130
|
+
.uxf-chip__button {
|
|
131
|
+
@apply hover:bg-indigo-700;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&--color-purple {
|
|
137
|
+
:root .light & {
|
|
138
|
+
@apply text-purple-600 bg-purple-100;
|
|
139
|
+
|
|
140
|
+
.uxf-chip__button {
|
|
141
|
+
@apply hover:bg-purple-200;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
:root .dark & {
|
|
146
|
+
@apply text-white bg-purple-600;
|
|
147
|
+
|
|
148
|
+
.uxf-chip__button {
|
|
149
|
+
@apply hover:bg-purple-700;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&--color-pink {
|
|
155
|
+
:root .light & {
|
|
156
|
+
@apply text-pink-600 bg-pink-100;
|
|
157
|
+
|
|
158
|
+
.uxf-chip__button {
|
|
159
|
+
@apply hover:bg-pink-200;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
:root .dark & {
|
|
164
|
+
@apply text-white bg-pink-600;
|
|
165
|
+
|
|
166
|
+
.uxf-chip__button {
|
|
167
|
+
@apply hover:bg-pink-700;
|
|
168
|
+
}
|
|
35
169
|
}
|
|
36
170
|
}
|
|
37
171
|
}
|
package/css/chip.old.css
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.uxf-chip {
|
|
2
|
+
@apply inline-block rounded-lg py-1 px-2 text-xs h-fit;
|
|
3
|
+
|
|
4
|
+
&__text {
|
|
5
|
+
@apply truncate;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&--color-success {
|
|
9
|
+
:root .light & {
|
|
10
|
+
@apply text-success-600 bg-success-100;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root .dark & {
|
|
14
|
+
@apply text-white bg-success-600;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--color-warning {
|
|
19
|
+
:root .light & {
|
|
20
|
+
@apply text-warning-600 bg-warning-100;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root .dark & {
|
|
24
|
+
@apply text-white bg-warning-600;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--color-error {
|
|
29
|
+
:root .light & {
|
|
30
|
+
@apply text-error-600 bg-error-100;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:root .dark & {
|
|
34
|
+
@apply text-white bg-error-600;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
package/css/combobox.css
CHANGED
|
@@ -2,11 +2,15 @@
|
|
|
2
2
|
@apply relative;
|
|
3
3
|
|
|
4
4
|
&__button {
|
|
5
|
-
@apply relative flex h-
|
|
5
|
+
@apply relative flex h-9 w-full cursor-default flex-row items-center rounded-lg px-4 text-left
|
|
6
6
|
outline-none before:absolute before:inset-0 before:pointer-events-none before:border before:rounded-lg;
|
|
7
7
|
|
|
8
|
+
.uxf-icon {
|
|
9
|
+
@apply h-4;
|
|
10
|
+
}
|
|
11
|
+
|
|
8
12
|
:root .light & {
|
|
9
|
-
@apply bg-
|
|
13
|
+
@apply bg-white text-lightHigh before:border-gray-200;
|
|
10
14
|
|
|
11
15
|
.is-empty {
|
|
12
16
|
@apply text-lightLow;
|