prometeo-design-system 2.5.1 → 2.5.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/{CardProfile-Fn44kEnM.js → CardProfile-DV3gwvqE.js} +20 -20
- package/dist/CardProfile.es.js +1 -1
- package/dist/Icons/Icons.d.ts +2 -0
- package/dist/OtpInput.es.js +143 -138
- package/dist/SegmentedButton.es.js +16 -16
- package/dist/components/FAB/FAButton.d.ts +21 -0
- package/dist/components/OtpInput/OtpInput.d.ts +5 -2
- package/dist/exports/FAButton.d.ts +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/pages/ButtonsPage.d.ts +2 -0
- package/dist/pages/OtpPage.d.ts +2 -0
- package/dist/preview/FABPreview.d.ts +2 -0
- package/dist/preview/OTPPreview.d.ts +2 -0
- package/dist/preview/SegmentedButtonPreview.d.ts +2 -0
- package/dist/prometeo-design-system.css +1 -1
- package/dist/prometeo-design-system.es.js +329 -269
- package/package.json +1 -1
- package/src/styles/intellisense.css +10 -1
- package/dist/pages/Buttons.d.ts +0 -2
|
@@ -3,7 +3,7 @@ import { c as s } from "./cn-B6yFEsav.js";
|
|
|
3
3
|
import z, { useState as M, useMemo as C, useEffect as L } from "react";
|
|
4
4
|
import { motion as E } from "framer-motion";
|
|
5
5
|
const X = (T) => {
|
|
6
|
-
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value:
|
|
6
|
+
const [c, _] = M({}), { size: t = "medium", color: R = "default", options: l, value: h, name: x, onChange: j, icon: y, allowExpand: n = !1, disabled: d = !1 } = T, m = Math.max(l.findIndex((e) => e.value === h), 0), w = l.length, N = 9, b = 26, o = {
|
|
7
7
|
small: 120,
|
|
8
8
|
medium: 120,
|
|
9
9
|
large: 120
|
|
@@ -17,36 +17,36 @@ const X = (T) => {
|
|
|
17
17
|
large: { container: "p-6" }
|
|
18
18
|
}, f = {
|
|
19
19
|
default: {
|
|
20
|
-
switch: "bg-primary-medium-default text-neutral-weak-default
|
|
20
|
+
switch: "bg-primary-medium-default text-neutral-weak-default",
|
|
21
21
|
container: "border-neutral-default-default",
|
|
22
22
|
icon: "text-neutral-weak-default",
|
|
23
|
-
option: "text-neutral-medium-
|
|
23
|
+
option: "text-neutral-medium-pressed"
|
|
24
24
|
},
|
|
25
25
|
success: {
|
|
26
26
|
switch: "bg-success-medium-default text-neutral-weak-default",
|
|
27
27
|
container: "border-neutral-default-default",
|
|
28
28
|
icon: "text-neutral-weak-default",
|
|
29
|
-
option: "text-neutral-medium-
|
|
29
|
+
option: "text-neutral-medium-pressed"
|
|
30
30
|
},
|
|
31
31
|
danger: {
|
|
32
32
|
switch: "bg-error-medium-default text-neutral-weak-default",
|
|
33
33
|
container: "border-neutral-default-default",
|
|
34
34
|
icon: "text-neutral-weak-default",
|
|
35
|
-
option: "text-neutral-medium-
|
|
35
|
+
option: "text-neutral-medium-pressed"
|
|
36
36
|
},
|
|
37
37
|
warning: {
|
|
38
38
|
switch: "bg-warning-medium-default text-neutral-weak-default",
|
|
39
39
|
container: "border-neutral-default-default",
|
|
40
40
|
icon: "text-neutral-weak-default",
|
|
41
|
-
option: "text-neutral-medium-
|
|
41
|
+
option: "text-neutral-medium-pressed"
|
|
42
42
|
},
|
|
43
43
|
disabled: {
|
|
44
44
|
switch: "bg-primary-medium-disabled text-neutral-strong-disabled",
|
|
45
45
|
container: "border-neutral-default-disabled",
|
|
46
46
|
icon: "text-neutral-strong-disabled",
|
|
47
|
-
option: "text-neutral-
|
|
47
|
+
option: "text-neutral-medium-pressed"
|
|
48
48
|
}
|
|
49
|
-
}, I = l.find((e) => e.value ===
|
|
49
|
+
}, I = l.find((e) => e.value === h) ?? l[0], g = I.label.length * N + k * 2 + b, W = () => C(() => Object.values(c).reduce((i, r) => i + r, 0) + b, [c]), v = {
|
|
50
50
|
small: n ? W() : (w - 1) * a.small + o.small,
|
|
51
51
|
medium: n ? W() : (w - 1) * a.medium + o.medium,
|
|
52
52
|
large: n ? W() : (w - 1) * a.large + o.large
|
|
@@ -62,7 +62,7 @@ const X = (T) => {
|
|
|
62
62
|
if (d) return;
|
|
63
63
|
const e = m === l.length - 1 ? l[0] : l[m + 1];
|
|
64
64
|
j?.(x, e.value);
|
|
65
|
-
},
|
|
65
|
+
}, p = d ? "disabled" : R;
|
|
66
66
|
return /* @__PURE__ */ u.jsxs(
|
|
67
67
|
"button",
|
|
68
68
|
{
|
|
@@ -75,8 +75,8 @@ const X = (T) => {
|
|
|
75
75
|
},
|
|
76
76
|
className: s(
|
|
77
77
|
S[t].container,
|
|
78
|
-
f[
|
|
79
|
-
"border
|
|
78
|
+
f[p].container,
|
|
79
|
+
"border",
|
|
80
80
|
!d && "cursor-pointer",
|
|
81
81
|
"relative"
|
|
82
82
|
),
|
|
@@ -98,7 +98,7 @@ const X = (T) => {
|
|
|
98
98
|
className: s(
|
|
99
99
|
"absolute top-0 left-0 h-full rounded-[6px] z-30",
|
|
100
100
|
"flex items-center justify-center gap-[2px] p-4",
|
|
101
|
-
f[
|
|
101
|
+
f[p].switch
|
|
102
102
|
),
|
|
103
103
|
onClick: () => {
|
|
104
104
|
!d && D();
|
|
@@ -106,7 +106,7 @@ const X = (T) => {
|
|
|
106
106
|
children: [
|
|
107
107
|
y && z.cloneElement(y, { className: s(
|
|
108
108
|
"w-6 h-6 text-neutral-weak-default min-w-6 min-h-6",
|
|
109
|
-
f[
|
|
109
|
+
f[p].icon
|
|
110
110
|
) }),
|
|
111
111
|
/* @__PURE__ */ u.jsx(
|
|
112
112
|
"p",
|
|
@@ -114,7 +114,7 @@ const X = (T) => {
|
|
|
114
114
|
className: s(
|
|
115
115
|
"prometeo-fonts-label-large ",
|
|
116
116
|
" overflow-hidden overflow-ellipsis text-nowrap select-none ",
|
|
117
|
-
f[
|
|
117
|
+
f[p].switch
|
|
118
118
|
),
|
|
119
119
|
children: I.label
|
|
120
120
|
}
|
|
@@ -130,7 +130,7 @@ const X = (T) => {
|
|
|
130
130
|
"flex justify-center"
|
|
131
131
|
),
|
|
132
132
|
children: l?.map((e, i) => {
|
|
133
|
-
const r = e.value === (
|
|
133
|
+
const r = e.value === (h || l[0].value), A = n ? c[i] + b : o[t], P = n ? c[i] : a[t], O = r ? A : P;
|
|
134
134
|
return /* @__PURE__ */ u.jsx(
|
|
135
135
|
E.span,
|
|
136
136
|
{
|
|
@@ -164,7 +164,7 @@ const X = (T) => {
|
|
|
164
164
|
},
|
|
165
165
|
className: s(
|
|
166
166
|
"px-3 place-content-center overflow-hidden text-ellipsis text-wrap prometeo-fonts-label-large h-full select-none",
|
|
167
|
-
f[
|
|
167
|
+
f[p].option
|
|
168
168
|
),
|
|
169
169
|
children: e.label
|
|
170
170
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ColorVariant, ButtonVariant } from '../Shared/types';
|
|
3
|
+
import { IconComponent } from '../../Icons/Icons';
|
|
4
|
+
export interface FAButtonProps {
|
|
5
|
+
icon?: IconComponent;
|
|
6
|
+
label?: string;
|
|
7
|
+
attachToParent?: boolean;
|
|
8
|
+
position?: {
|
|
9
|
+
left?: number | string;
|
|
10
|
+
top?: number | string;
|
|
11
|
+
right?: number | string;
|
|
12
|
+
bottom?: number | string;
|
|
13
|
+
};
|
|
14
|
+
color?: ColorVariant;
|
|
15
|
+
variant?: ButtonVariant;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
className?: string;
|
|
18
|
+
onClick: () => void;
|
|
19
|
+
}
|
|
20
|
+
declare const FAButton: React.MemoExoticComponent<(props: FAButtonProps) => import("react/jsx-runtime").JSX.Element>;
|
|
21
|
+
export default FAButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
export interface OtpInputProps {
|
|
3
3
|
value?: string;
|
|
4
|
-
onChange?: (value: string) => void;
|
|
4
|
+
onChange?: (value: string, name?: string) => void;
|
|
5
5
|
onComplete?: (value: string) => void;
|
|
6
6
|
onBlur?: () => void;
|
|
7
7
|
maxLength?: number;
|
|
@@ -23,5 +23,8 @@ export interface OtpInputProps {
|
|
|
23
23
|
name?: string;
|
|
24
24
|
variant?: 'default' | 'error' | 'success';
|
|
25
25
|
}
|
|
26
|
-
declare const OtpInputComponent:
|
|
26
|
+
declare const OtpInputComponent: {
|
|
27
|
+
({ value, name, onChange, onComplete, onBlur, maxLength, placeholder, disabled, className, autoFocus, pasteTransformer, errorComponent, hasError, helperComponent, helperAlignment, slotClassName, variant, hideSlotsMiddleSeparator }: OtpInputProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
27
30
|
export default OtpInputComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '../components/FAB/FAButton';
|
package/dist/index.d.ts
CHANGED
|
@@ -37,6 +37,7 @@ export { default as Toast } from './components/Toaster/Toaster';
|
|
|
37
37
|
export { default as ToastProvider } from './components/Toaster/ToastProvider';
|
|
38
38
|
export { toastpyrion } from './components/Toaster/Toaster';
|
|
39
39
|
export { default as SelectSearch } from './components/SelectSearch/SelectSearch';
|
|
40
|
+
export { default as FAButton } from './components/FAB/FAButton';
|
|
40
41
|
export * from './components/Sidebar';
|
|
41
42
|
export { SecondaryBar } from './components/Sidebar/SecondaryBar/SecondaryBar';
|
|
42
43
|
export { Badge } from './components/Sidebar/components/badge';
|
|
@@ -99,4 +100,5 @@ export type { CustomSelectionDisplayProps } from './components/Select/Select';
|
|
|
99
100
|
export type { CustomSelectOptionRendererProps } from './components/Select/Select';
|
|
100
101
|
export type { SelectOptionType } from './components/Select/Select';
|
|
101
102
|
export type { SelectSearchProps } from './components/SelectSearch/SelectSearch';
|
|
103
|
+
export type { FAButtonProps } from './components/FAB/FAButton';
|
|
102
104
|
export { Icons } from './Icons/Icons';
|