@uxf/ui 1.0.1 → 10.0.0-beta.10
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/_select-base/_select-base.d.ts +1 -1
- package/_select-base/_select-base.js +3 -2
- package/chip/chip.d.ts +6 -6
- package/chip/chip.js +23 -9
- package/chip/chip.spec.d.ts +1 -0
- package/chip/chip.spec.js +9 -0
- package/chip/chip.stories.d.ts +1 -1
- package/chip/chip.stories.js +30 -10
- package/chip/index.d.ts +3 -1
- package/chip/index.js +3 -15
- package/chip/theme.d.ts +10 -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 +488 -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 +63 -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 +114 -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/image-gallery/components/gallery.d.ts +2 -2
- package/image-gallery/components/gallery.js +12 -5
- package/image-gallery/image-gallery.d.ts +2 -0
- package/image-gallery/image-gallery.js +1 -1
- package/multi-combobox/_multi-combobox-base.js +2 -1
- package/multi-combobox/types.d.ts +3 -0
- package/multi-select/_multi-select-base.js +2 -1
- package/multi-select/types.d.ts +3 -2
- package/package.json +10 -6
- package/textarea/textarea.js +3 -3
- package/tooltip/use-tooltip.d.ts +1 -1
- package/tw-tokens/tw-z-index.d.ts +1 -0
- package/tw-tokens/tw-z-index.js +1 -0
- package/utils/storybook-config.d.ts +1 -1
- package/utils/storybook-config.js +1 -1
- package/utils/tailwind-config.js +1 -0
- package/select/theme.d.ts +0 -5
- package/select/theme.js +0 -2
|
@@ -3,7 +3,7 @@ import type { Combobox as HUICombobox, Listbox as HUIListbox } from "@headlessui
|
|
|
3
3
|
import { IconsSet } from "@uxf/ui/icon/theme";
|
|
4
4
|
import { Clearable, FormControlProps } from "@uxf/ui/types";
|
|
5
5
|
import React, { ReactElement, ReactNode, Ref } from "react";
|
|
6
|
-
import { InputGroupSizes, InputGroupVariants } from "
|
|
6
|
+
import { InputGroupSizes, InputGroupVariants } from "@uxf/ui/input/theme";
|
|
7
7
|
export type SelectBaseValueId = number | string;
|
|
8
8
|
export type SelectBaseValue<ValueId = SelectBaseValueId> = {
|
|
9
9
|
id: ValueId;
|
|
@@ -51,8 +51,9 @@ const InputArrow = (props) => {
|
|
|
51
51
|
return react_2.default.createElement(icon_1.Icon, { className: (0, cx_1.cx)("uxf-select-base__arrow-icon", props.open && classes_1.CLASSES.IS_OPEN), name: iconName });
|
|
52
52
|
};
|
|
53
53
|
const Options = (props) => {
|
|
54
|
+
var _a, _b;
|
|
54
55
|
const HUIComponent = props.HUIComponent;
|
|
55
|
-
return (react_2.default.createElement(HUIComponent.Options, { className: (0, cx_1.cx)("uxf-dropdown", props.placement === "bottom" && "uxf-dropdown--bottom", props.placement === "top" && "uxf-dropdown--top"), ref: props.forwardRef, static: true, style: props.style }, props.options && props.options.length > 0 ? (props.options.map((option) => {
|
|
56
|
+
return (react_2.default.createElement(HUIComponent.Options, { className: (0, cx_1.cx)("uxf-dropdown", `uxf-dropdown--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, `uxf-dropdown--variant-${(_b = props.variant) !== null && _b !== void 0 ? _b : "default"}`, props.placement === "bottom" && "uxf-dropdown--bottom", props.placement === "top" && "uxf-dropdown--top"), ref: props.forwardRef, static: true, style: props.style }, props.options && props.options.length > 0 ? (props.options.map((option) => {
|
|
56
57
|
var _a, _b, _c, _d;
|
|
57
58
|
const optionKey = (_a = props.keyExtractor) === null || _a === void 0 ? void 0 : _a.call(props, option);
|
|
58
59
|
return (react_2.default.createElement(HUIComponent.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), key: optionKey !== null && optionKey !== void 0 ? optionKey : option.id, value: option }, (_d = (_c = (_b = props.renderOption) === null || _b === void 0 ? void 0 : _b.call(props, option)) !== null && _c !== void 0 ? _c : optionKey) !== null && _d !== void 0 ? _d : option.label));
|
|
@@ -87,7 +88,7 @@ const _SelectBase = (props) => {
|
|
|
87
88
|
react_2.default.createElement(InputArrow, { iconName: props.iconName, open: renderProps.open }))) : (react_2.default.createElement(InputArrow, { iconName: props.iconName, open: renderProps.open }))),
|
|
88
89
|
props.rightAddon && react_2.default.createElement(input_1.Input.RightAddon, null, props.rightAddon)),
|
|
89
90
|
renderProps.open && (react_2.default.createElement(react_1.FloatingPortal, null,
|
|
90
|
-
react_2.default.createElement(Options, { HUIComponent: HUIComponent, emptyMessage: props.emptyMessage, forwardRef: dropdown.refs.setFloating, keyExtractor: props.keyExtractor, options: props.options, placement: dropdown.placement, renderOption: props.renderOption, style: dropdown.floatingStyles }))),
|
|
91
|
+
react_2.default.createElement(Options, { HUIComponent: HUIComponent, emptyMessage: props.emptyMessage, forwardRef: dropdown.refs.setFloating, keyExtractor: props.keyExtractor, options: props.options, placement: dropdown.placement, renderOption: props.renderOption, size: props.size, style: dropdown.floatingStyles, variant: props.variant }))),
|
|
91
92
|
props.helperText && (react_2.default.createElement("div", { className: (0, cx_1.cx)("uxf-helper-text", props.isInvalid && classes_1.CLASSES.IS_INVALID), id: errorId }, props.helperText)))))));
|
|
92
93
|
};
|
|
93
94
|
exports._SelectBase = _SelectBase;
|
package/chip/chip.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import React, {
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
export interface ChipProps extends HTMLAttributes<HTMLDivElement> {
|
|
1
|
+
import { ChipColor, ChipSize, ChipVariant } from "@uxf/ui/chip/theme";
|
|
2
|
+
import React, { AnchorHTMLAttributes, MouseEventHandler } from "react";
|
|
3
|
+
import { UseAnchorProps } from "@uxf/core/hooks/useAnchorProps";
|
|
4
|
+
export interface ChipProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "color" | "type">, UseAnchorProps {
|
|
6
5
|
color?: ChipColor;
|
|
7
6
|
onClose?: MouseEventHandler;
|
|
8
7
|
size?: ChipSize;
|
|
9
8
|
suppressFocus?: boolean;
|
|
9
|
+
variant?: ChipVariant;
|
|
10
10
|
}
|
|
11
|
-
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<
|
|
11
|
+
export declare const Chip: React.ForwardRefExoticComponent<ChipProps & React.RefAttributes<HTMLAnchorElement>>;
|
package/chip/chip.js
CHANGED
|
@@ -26,14 +26,28 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.Chip = void 0;
|
|
27
27
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
|
+
const useAnchorProps_1 = require("@uxf/core/hooks/useAnchorProps");
|
|
30
|
+
const CloseButton = (props) => {
|
|
31
|
+
const onClose = (e) => {
|
|
32
|
+
var _a;
|
|
33
|
+
e.stopPropagation();
|
|
34
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
35
|
+
};
|
|
36
|
+
return (react_1.default.createElement("button", { className: "uxf-chip__button", onClick: onClose, tabIndex: props.suppressFocus ? -1 : undefined, type: "button" },
|
|
37
|
+
react_1.default.createElement("span", { className: "uxf-chip__button-label" }, "Odebrat polo\u017Eku"),
|
|
38
|
+
react_1.default.createElement("svg", { className: "uxf-chip__button-icon", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" },
|
|
39
|
+
react_1.default.createElement("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" }))));
|
|
40
|
+
};
|
|
29
41
|
exports.Chip = (0, react_1.forwardRef)((props, ref) => {
|
|
30
|
-
var _a, _b;
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
42
|
+
var _a, _b, _c;
|
|
43
|
+
const { children, className, href, onClose, ...restProps } = props;
|
|
44
|
+
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);
|
|
45
|
+
const anchorProps = (0, useAnchorProps_1.useAnchorProps)({
|
|
46
|
+
className: (0, cx_1.cx)(chipClassName),
|
|
47
|
+
...restProps,
|
|
48
|
+
});
|
|
49
|
+
return (react_1.default.createElement("a", { href: href, className: chipClassName, ref: ref, ...anchorProps },
|
|
50
|
+
typeof children === "string" ? react_1.default.createElement("span", { className: "uxf-chip__text" }, children) : children,
|
|
51
|
+
!!onClose && react_1.default.createElement(CloseButton, { onClose: onClose })));
|
|
38
52
|
});
|
|
39
|
-
exports.Chip.displayName = "
|
|
53
|
+
exports.Chip.displayName = "UxfChip";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const snap_test_1 = require("../utils/snap-test");
|
|
8
|
+
const chip_stories_1 = require("./chip.stories");
|
|
9
|
+
(0, snap_test_1.snapTest)("render stories", react_1.default.createElement(chip_stories_1.Default, null));
|
package/chip/chip.stories.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: React.ForwardRefExoticComponent<import("@uxf/ui/chip").ChipProps & React.RefAttributes<
|
|
4
|
+
component: React.ForwardRefExoticComponent<import("@uxf/ui/chip").ChipProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
5
|
parameters: {
|
|
6
6
|
docs: {};
|
|
7
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,37 @@ exports.default = {
|
|
|
17
16
|
},
|
|
18
17
|
},
|
|
19
18
|
};
|
|
19
|
+
const getChipsForSize = (size, colors) => {
|
|
20
|
+
const lowChips = colors.map((color) => (react_1.default.createElement("div", { className: "flex flex-col items-start space-y-2", key: color },
|
|
21
|
+
react_1.default.createElement(chip_1.Chip, { variant: "low", size: size, color: color }, color),
|
|
22
|
+
react_1.default.createElement(chip_1.Chip, { variant: "low", size: size, color: color, onClose: () => null }, color))));
|
|
23
|
+
const mediumChips = colors.map((color) => (react_1.default.createElement("div", { className: "flex flex-col items-start space-y-2", key: color },
|
|
24
|
+
react_1.default.createElement(chip_1.Chip, { variant: "medium", size: size, color: color }, color),
|
|
25
|
+
react_1.default.createElement(chip_1.Chip, { variant: "medium", size: size, color: color, onClose: () => null }, color))));
|
|
26
|
+
const defaultChips = colors.map((color) => (react_1.default.createElement("div", { className: "flex flex-col items-start space-y-2", key: color },
|
|
27
|
+
react_1.default.createElement(chip_1.Chip, { variant: "default", size: size, color: color }, color),
|
|
28
|
+
react_1.default.createElement(chip_1.Chip, { variant: "default", size: size, color: color, onClose: () => null }, color))));
|
|
29
|
+
return (react_1.default.createElement("div", { className: "grid grid-cols-3 gap-4" },
|
|
30
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, lowChips),
|
|
31
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, mediumChips),
|
|
32
|
+
react_1.default.createElement("div", { className: "flex flex-col gap-2" }, defaultChips)));
|
|
33
|
+
};
|
|
20
34
|
function Default() {
|
|
21
35
|
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
|
-
|
|
36
|
+
return (react_1.default.createElement("div", { className: "flex lg:flex-row" },
|
|
37
|
+
react_1.default.createElement("div", { className: "light space-y-4 rounded bg-white p-10" },
|
|
38
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "small"),
|
|
39
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("small", config.colors)),
|
|
40
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "default"),
|
|
41
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("default", config.colors)),
|
|
42
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "large"),
|
|
43
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("large", config.colors))),
|
|
44
|
+
react_1.default.createElement("div", { className: "dark space-y-4 rounded bg-gray-900 p-10 text-white" },
|
|
45
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "small"),
|
|
46
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("small", config.colors)),
|
|
47
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "default"),
|
|
48
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("default", config.colors)),
|
|
49
|
+
react_1.default.createElement("div", { className: "uxf-typo-h5" }, "large"),
|
|
50
|
+
react_1.default.createElement("div", { className: "flex flex-col space-y-4 px-5" }, getChipsForSize("large", config.colors)))));
|
|
31
51
|
}
|
|
32
52
|
exports.Default = Default;
|
package/chip/index.d.ts
CHANGED
package/chip/index.js
CHANGED
|
@@ -1,17 +1,5 @@
|
|
|
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
|
-
};
|
|
16
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
|
|
3
|
+
exports.Chip = void 0;
|
|
4
|
+
var chip_1 = require("./chip");
|
|
5
|
+
Object.defineProperty(exports, "Chip", { enumerable: true, get: function () { return chip_1.Chip; } });
|
package/chip/theme.d.ts
CHANGED
|
@@ -8,8 +8,18 @@ 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;
|
|
15
17
|
}
|
|
18
|
+
export interface ChipVariants {
|
|
19
|
+
default: true;
|
|
20
|
+
medium: true;
|
|
21
|
+
low: true;
|
|
22
|
+
}
|
|
23
|
+
export type ChipColor = keyof ChipColors;
|
|
24
|
+
export type ChipSize = keyof ChipSizes;
|
|
25
|
+
export type ChipVariant = keyof ChipVariants;
|
|
@@ -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
|
+
}
|