@ayseaistudio/ui-components 3.2.0 → 3.2.2
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/dist/MultipleAvatar/MultipleAvatar.d.ts +1 -1
- package/dist/PrimaryButton/PrimaryButton.js +4 -1
- package/dist/Profile/Profile.js +1 -1
- package/dist/Profile/style.css +12 -12
- package/dist/ProfileSelector/ProfileSelector.d.ts +2 -2
- package/dist/ProfileSelector/ProfileSelector.js +3 -3
- package/dist/TabButton/style.css +2 -0
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ interface Props {
|
|
|
12
12
|
maxVisible?: number;
|
|
13
13
|
withPlusValue?: boolean;
|
|
14
14
|
plusValue?: string | number;
|
|
15
|
-
size: "large" | "medium" | "small";
|
|
15
|
+
size: "large" | "medium" | "small" | "x-small";
|
|
16
16
|
className?: string;
|
|
17
17
|
}
|
|
18
18
|
export declare const MultipleAvatar: {
|
|
@@ -10,13 +10,16 @@ export const PrimaryButton = ({ text, size, color, status, className, leftIcon,
|
|
|
10
10
|
});
|
|
11
11
|
return (_jsxs("div", { className: `primary-button ${state.size} ${state.status} ${state.color} ${className}`, "data-primitives-mode": ["black", "blue", "lime", "mauve", "olive"].includes(state.color)
|
|
12
12
|
? "value"
|
|
13
|
-
: undefined, onClick: onClick, onMouseLeave: () => {
|
|
13
|
+
: undefined, onClick: state.status === "disabled" ? undefined : onClick, onMouseLeave: () => {
|
|
14
14
|
dispatch("mouse_leave");
|
|
15
15
|
}, onMouseEnter: () => {
|
|
16
16
|
dispatch("mouse_enter");
|
|
17
17
|
}, children: [leftIcon && (_jsx("span", { className: `${state.size === "small" ? "class icon" : "class-2 icon"}`, children: leftIcon })), text && _jsx("div", { className: "button", children: text }), rightIcon && (_jsx("span", { className: `${state.size === "small" ? "class icon" : "class-2 icon"}`, children: rightIcon }))] }));
|
|
18
18
|
};
|
|
19
19
|
function reducer(state, action) {
|
|
20
|
+
if (state.status === "disabled") {
|
|
21
|
+
return state;
|
|
22
|
+
}
|
|
20
23
|
switch (action) {
|
|
21
24
|
case "mouse_enter":
|
|
22
25
|
return {
|
package/dist/Profile/Profile.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import PropTypes from "prop-types";
|
|
3
3
|
import "./style.css";
|
|
4
4
|
import { Avatar } from "../Avatar";
|
|
5
|
-
export const Profile = ({ text, subtext, size, className, avatarSize
|
|
5
|
+
export const Profile = ({ text, subtext, size, className, avatarSize, avatarColor = "grey", avatarSizeMediumColorClassName, avatarLetter = "AB", }) => {
|
|
6
6
|
return (_jsxs("div", { className: `profile size-0-${size} ${className}`, children: [_jsx(Avatar, { className: avatarSizeMediumColorClassName, color: avatarColor, letter: avatarLetter, size: avatarSize, status: "default", version: "default" }), text && (_jsxs("div", { className: "texts", children: [_jsx("div", { className: "text", children: text }), subtext && _jsx("div", { className: "subtext", children: subtext })] }))] }));
|
|
7
7
|
};
|
|
8
8
|
Profile.propTypes = {
|
package/dist/Profile/style.css
CHANGED
|
@@ -195,12 +195,12 @@
|
|
|
195
195
|
|
|
196
196
|
.profile.size-0-medium .text {
|
|
197
197
|
-webkit-line-clamp: 1;
|
|
198
|
-
font-family: var(--
|
|
199
|
-
font-size: var(--
|
|
200
|
-
font-style: var(--
|
|
201
|
-
font-weight: var(--
|
|
202
|
-
letter-spacing: var(--
|
|
203
|
-
line-height: var(--
|
|
198
|
+
font-family: var(--b2-bold-font-family);
|
|
199
|
+
font-size: var(--b2-bold-font-size);
|
|
200
|
+
font-style: var(--b2-bold-font-style);
|
|
201
|
+
font-weight: var(--b2-bold-font-weight);
|
|
202
|
+
letter-spacing: var(--b2-bold-letter-spacing);
|
|
203
|
+
line-height: var(--b2-bold-line-height);
|
|
204
204
|
cursor: default;
|
|
205
205
|
}
|
|
206
206
|
|
|
@@ -246,12 +246,12 @@
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
.profile.size-0-medium .subtext {
|
|
249
|
-
font-family: var(--
|
|
250
|
-
font-size: var(--
|
|
251
|
-
font-style: var(--
|
|
252
|
-
font-weight: var(--
|
|
253
|
-
letter-spacing: var(--
|
|
254
|
-
line-height: var(--
|
|
249
|
+
font-family: var(--b3-medium-font-family);
|
|
250
|
+
font-size: var(--b3-medium-font-size);
|
|
251
|
+
font-style: var(--b3-medium-font-style);
|
|
252
|
+
font-weight: var(--b3-medium-font-weight);
|
|
253
|
+
letter-spacing: var(--b3-medium-letter-spacing);
|
|
254
|
+
line-height: var(--b3-medium-line-height);
|
|
255
255
|
cursor: default;
|
|
256
256
|
}
|
|
257
257
|
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
subtext?: string;
|
|
17
17
|
avatarLetter?: string;
|
|
18
18
|
avatars?: AvatarData[];
|
|
19
|
-
|
|
19
|
+
avatarSize?: "large" | "medium" | "small" | "x-small";
|
|
20
20
|
multipleAvatarClassName?: any;
|
|
21
21
|
multipleAvatarWithPlus?: boolean;
|
|
22
22
|
multipleAvatarPlusValue?: string | number;
|
|
@@ -36,7 +36,7 @@ interface Props {
|
|
|
36
36
|
onClick?: () => void;
|
|
37
37
|
}
|
|
38
38
|
export declare const ProfileSelector: {
|
|
39
|
-
({ icon, size, version, className, text, subtext, avatarLetter, avatars,
|
|
39
|
+
({ icon, size, version, className, text, subtext, avatarLetter, avatars, avatarSize, multipleAvatarClassName, multipleAvatarWithPlus, multipleAvatarPlusValue, multipleAvatarAvatarColor, multipleAvatarAvatarColor1, multipleAvatarAvatarColor2, multipleAvatarAvatarColor3, multipleAvatarAvatarColor4, multipleAvatarAvatarLetter, multipleAvatarAvatarLetter1, multipleAvatarAvatarLetter2, multipleAvatarAvatarLetter3, multipleAvatarAvatarLetter4, multipleAvatarSizeLargeClassName, multipleAvatarLabelText, multipleAvatarWithFifth, onClick, }: Props): React.JSX.Element;
|
|
40
40
|
propTypes: {
|
|
41
41
|
icon: PropTypes.Requireable<boolean>;
|
|
42
42
|
status: PropTypes.Requireable<string>;
|
|
@@ -5,7 +5,7 @@ import "./style.css";
|
|
|
5
5
|
import { IconSelector } from "@tabler/icons-react";
|
|
6
6
|
import { MultipleAvatar } from "../MultipleAvatar";
|
|
7
7
|
import { Profile } from "../Profile/Profile";
|
|
8
|
-
export const ProfileSelector = ({ icon, size, version, className, text, subtext, avatarLetter, avatars,
|
|
8
|
+
export const ProfileSelector = ({ icon, size, version, className, text, subtext, avatarLetter, avatars, avatarSize, multipleAvatarClassName, multipleAvatarWithPlus, multipleAvatarPlusValue, multipleAvatarAvatarColor, multipleAvatarAvatarColor1, multipleAvatarAvatarColor2, multipleAvatarAvatarColor3, multipleAvatarAvatarColor4, multipleAvatarAvatarLetter, multipleAvatarAvatarLetter1, multipleAvatarAvatarLetter2, multipleAvatarAvatarLetter3, multipleAvatarAvatarLetter4, multipleAvatarSizeLargeClassName, multipleAvatarLabelText, multipleAvatarWithFifth, onClick, }) => {
|
|
9
9
|
const [state, dispatch] = useReducer(reducer, {
|
|
10
10
|
status: "default",
|
|
11
11
|
size: size || "large",
|
|
@@ -15,14 +15,14 @@ export const ProfileSelector = ({ icon, size, version, className, text, subtext,
|
|
|
15
15
|
dispatch("mouse_leave");
|
|
16
16
|
}, onMouseEnter: () => {
|
|
17
17
|
dispatch("mouse_enter");
|
|
18
|
-
}, onClick: onClick, children: [state.version === "single" && (_jsx(Profile, { className: "profile-instance", size:
|
|
18
|
+
}, onClick: onClick, children: [state.version === "single" && (_jsx(Profile, { className: "profile-instance", size: avatarSize, subtext: subtext || "Subtext", text: text || "Text", avatarLetter: avatarLetter || "AB", avatarSize: avatarSize })), state.version === "multiple" && (_jsx(MultipleAvatar, { avatars: avatars ||
|
|
19
19
|
[
|
|
20
20
|
...(multipleAvatarAvatarLetter1 && multipleAvatarAvatarColor1 ? [{ letter: multipleAvatarAvatarLetter1, color: multipleAvatarAvatarColor1 }] : []),
|
|
21
21
|
...(multipleAvatarAvatarLetter2 && multipleAvatarAvatarColor2 ? [{ letter: multipleAvatarAvatarLetter2, color: multipleAvatarAvatarColor2 }] : []),
|
|
22
22
|
...(multipleAvatarAvatarLetter3 && multipleAvatarAvatarColor3 ? [{ letter: multipleAvatarAvatarLetter3, color: multipleAvatarAvatarColor3 }] : []),
|
|
23
23
|
...(multipleAvatarAvatarLetter && multipleAvatarAvatarColor ? [{ letter: multipleAvatarAvatarLetter, color: multipleAvatarAvatarColor }] : []),
|
|
24
24
|
...(multipleAvatarAvatarLetter4 && multipleAvatarAvatarColor4 ? [{ letter: multipleAvatarAvatarLetter4, color: multipleAvatarAvatarColor4 }] : []),
|
|
25
|
-
], size:
|
|
25
|
+
], size: avatarSize, className: multipleAvatarClassName || multipleAvatarSizeLargeClassName, withPlusValue: multipleAvatarWithPlus ?? multipleAvatarWithFifth, plusValue: multipleAvatarPlusValue || multipleAvatarLabelText })), icon && (_jsx(IconSelector, { className: `${state.size === "medium" ? "class-3" : "class-4"}` }))] }));
|
|
26
26
|
};
|
|
27
27
|
function reducer(state, action) {
|
|
28
28
|
switch (action) {
|
package/dist/TabButton/style.css
CHANGED