@koaris/bloom-ui 1.0.2 → 1.0.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/LICENSE +674 -0
- package/README.md +15 -1
- package/dist/index.d.mts +23 -18
- package/dist/index.d.ts +23 -18
- package/dist/index.js +189 -186
- package/dist/index.mjs +182 -180
- package/dist/tailwind.css +25 -10
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -54,6 +54,7 @@ __export(src_exports, {
|
|
|
54
54
|
Button: () => Button,
|
|
55
55
|
Card: () => Card,
|
|
56
56
|
Checkbox: () => Checkbox,
|
|
57
|
+
Form: () => Form,
|
|
57
58
|
Heading: () => Heading,
|
|
58
59
|
Input: () => Input,
|
|
59
60
|
MultiStep: () => MultiStep,
|
|
@@ -2571,12 +2572,12 @@ var Card = (_a) => {
|
|
|
2571
2572
|
className: twMerge(
|
|
2572
2573
|
"flex items-center justify-center rounded-lg cursor-pointer bg-neutral",
|
|
2573
2574
|
"hover:shadow-md hover:shadow-neutral-500 border border-neutral-500 text-neutral-1000",
|
|
2574
|
-
className,
|
|
2575
2575
|
size === "medium" && "w-64 px-8 py-4",
|
|
2576
2576
|
size === "large" && "w-96 pr-5",
|
|
2577
2577
|
direction === "col" && "flex-col",
|
|
2578
2578
|
selected === true && "border-2 border-orange-500",
|
|
2579
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2579
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2580
|
+
className
|
|
2580
2581
|
),
|
|
2581
2582
|
onClick,
|
|
2582
2583
|
children: [
|
|
@@ -2610,13 +2611,13 @@ var Button = (_a) => {
|
|
|
2610
2611
|
"button",
|
|
2611
2612
|
__spreadValues({
|
|
2612
2613
|
className: twMerge(
|
|
2613
|
-
"flex items-center justify-center rounded-lg px-8 py-2 text-md font-medium hover:shadow-md hover:shadow-neutral-500",
|
|
2614
|
-
className,
|
|
2614
|
+
"flex items-center justify-center rounded-lg px-8 py-2 text-md font-medium hover:shadow-md hover:shadow-neutral-500 w-full",
|
|
2615
2615
|
variant === "primary" && "bg-orange-500 text-neutral hover:bg-orange-700",
|
|
2616
2616
|
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:bg-neutral-200",
|
|
2617
2617
|
size === "sm" && "px-6 py-1",
|
|
2618
2618
|
typeof rest.children !== "string" && "px-4",
|
|
2619
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2619
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2620
|
+
className
|
|
2620
2621
|
),
|
|
2621
2622
|
onClick
|
|
2622
2623
|
}, rest)
|
|
@@ -2633,7 +2634,8 @@ var RadioGroup = ({
|
|
|
2633
2634
|
{ id: 1, value: "option1", label: "Op\xE7\xE3o 1" },
|
|
2634
2635
|
{ id: 2, value: "option2", label: "Op\xE7\xE3o 2" }
|
|
2635
2636
|
],
|
|
2636
|
-
required = false
|
|
2637
|
+
required = false,
|
|
2638
|
+
className
|
|
2637
2639
|
}) => {
|
|
2638
2640
|
const [selectedOption, setSelectedOption] = (0, import_react.useState)("");
|
|
2639
2641
|
const handleOptionChange = (value) => {
|
|
@@ -2647,7 +2649,8 @@ var RadioGroup = ({
|
|
|
2647
2649
|
className: twMerge(
|
|
2648
2650
|
"relative rounded-full border-2 w-5 h-5 flex items-center justify-center hover:border-orange-500 hover:cursor-pointer",
|
|
2649
2651
|
selectedOption === option.value ? "bg-orange-500 border-orange-500" : "border-neutral-500 hover:shadow-md hover:shadow-orange-500",
|
|
2650
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2652
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2653
|
+
className
|
|
2651
2654
|
),
|
|
2652
2655
|
children: [
|
|
2653
2656
|
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
@@ -2776,49 +2779,12 @@ var masks = {
|
|
|
2776
2779
|
};
|
|
2777
2780
|
var masks_default = masks;
|
|
2778
2781
|
|
|
2779
|
-
// src/components/Text/index.tsx
|
|
2780
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2781
|
-
var Text = (_a) => {
|
|
2782
|
-
var _b = _a, {
|
|
2783
|
-
children,
|
|
2784
|
-
color = "neutral-800",
|
|
2785
|
-
size = "md",
|
|
2786
|
-
variant = "p",
|
|
2787
|
-
className
|
|
2788
|
-
} = _b, rest = __objRest(_b, [
|
|
2789
|
-
"children",
|
|
2790
|
-
"color",
|
|
2791
|
-
"size",
|
|
2792
|
-
"variant",
|
|
2793
|
-
"className"
|
|
2794
|
-
]);
|
|
2795
|
-
const fontSize = {
|
|
2796
|
-
xxs: "text-xxs",
|
|
2797
|
-
xs: "text-xs",
|
|
2798
|
-
sm: "text-sm",
|
|
2799
|
-
md: "text-md",
|
|
2800
|
-
lg: "text-lg",
|
|
2801
|
-
xl: "text-xl",
|
|
2802
|
-
"2xl": "text-2xl",
|
|
2803
|
-
"3xl": "text-3xl",
|
|
2804
|
-
"4xl": "text-4xl",
|
|
2805
|
-
"5xl": "text-5xl",
|
|
2806
|
-
"6xl": "text-6xl",
|
|
2807
|
-
"7xl": "text-7xl",
|
|
2808
|
-
"8xl": "text-8xl",
|
|
2809
|
-
"9xl": "text-9xl"
|
|
2810
|
-
}[size];
|
|
2811
|
-
const Tag = variant;
|
|
2812
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
2813
|
-
};
|
|
2814
|
-
|
|
2815
2782
|
// src/components/Input/index.tsx
|
|
2816
|
-
var
|
|
2783
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
2817
2784
|
var Input = (_a) => {
|
|
2818
2785
|
var _b = _a, {
|
|
2819
2786
|
className,
|
|
2820
2787
|
disabled,
|
|
2821
|
-
label,
|
|
2822
2788
|
placeholder,
|
|
2823
2789
|
value,
|
|
2824
2790
|
validated,
|
|
@@ -2829,7 +2795,6 @@ var Input = (_a) => {
|
|
|
2829
2795
|
} = _b, rest = __objRest(_b, [
|
|
2830
2796
|
"className",
|
|
2831
2797
|
"disabled",
|
|
2832
|
-
"label",
|
|
2833
2798
|
"placeholder",
|
|
2834
2799
|
"value",
|
|
2835
2800
|
"validated",
|
|
@@ -2861,23 +2826,11 @@ var Input = (_a) => {
|
|
|
2861
2826
|
setHasNumber((value2 == null ? void 0 : value2.match(masks_default.password[1])) !== null);
|
|
2862
2827
|
setHasEightCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[2])) !== null);
|
|
2863
2828
|
};
|
|
2864
|
-
return /* @__PURE__ */ (0,
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
{
|
|
2868
|
-
htmlFor: rest.id,
|
|
2869
|
-
variant: "label",
|
|
2870
|
-
color: rest.color,
|
|
2871
|
-
className: "leading-8",
|
|
2872
|
-
children: label
|
|
2873
|
-
}
|
|
2874
|
-
),
|
|
2875
|
-
type === "text" || type === "password" || type === "date" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
2876
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
2830
|
+
type === "text" || type === "password" || type === "date" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
2831
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2877
2832
|
"input",
|
|
2878
|
-
{
|
|
2879
|
-
id: rest.id,
|
|
2880
|
-
name: rest.name,
|
|
2833
|
+
__spreadValues({
|
|
2881
2834
|
type,
|
|
2882
2835
|
required,
|
|
2883
2836
|
className: twMerge(
|
|
@@ -2894,27 +2847,25 @@ var Input = (_a) => {
|
|
|
2894
2847
|
onBlur: handleBlur,
|
|
2895
2848
|
placeholder,
|
|
2896
2849
|
value: inputValue
|
|
2897
|
-
}
|
|
2850
|
+
}, rest)
|
|
2898
2851
|
),
|
|
2899
|
-
type === "password" && (!hasEightCharacteres || !hasSpecialCharacteres || !hasNumber) && /* @__PURE__ */ (0,
|
|
2900
|
-
/* @__PURE__ */ (0,
|
|
2901
|
-
hasEightCharacteres ? /* @__PURE__ */ (0,
|
|
2902
|
-
/* @__PURE__ */ (0,
|
|
2852
|
+
type === "password" && (!hasEightCharacteres || !hasSpecialCharacteres || !hasNumber) && /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("ul", { className: "py-1", children: [
|
|
2853
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2854
|
+
hasEightCharacteres ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiX, {}),
|
|
2855
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-1", children: "Pelo menos 8 caracteres" })
|
|
2903
2856
|
] }),
|
|
2904
|
-
/* @__PURE__ */ (0,
|
|
2905
|
-
hasSpecialCharacteres ? /* @__PURE__ */ (0,
|
|
2906
|
-
/* @__PURE__ */ (0,
|
|
2857
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2858
|
+
hasSpecialCharacteres ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiX, {}),
|
|
2859
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2907
2860
|
] }),
|
|
2908
|
-
/* @__PURE__ */ (0,
|
|
2909
|
-
hasNumber ? /* @__PURE__ */ (0,
|
|
2910
|
-
/* @__PURE__ */ (0,
|
|
2861
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("li", { className: "flex items-center px-2", children: [
|
|
2862
|
+
hasNumber ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiCheck, {}) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_fi3.FiX, {}),
|
|
2863
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2911
2864
|
] })
|
|
2912
2865
|
] })
|
|
2913
|
-
] }) : /* @__PURE__ */ (0,
|
|
2866
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
2914
2867
|
"input",
|
|
2915
|
-
{
|
|
2916
|
-
id: rest.id,
|
|
2917
|
-
name: rest.name,
|
|
2868
|
+
__spreadValues({
|
|
2918
2869
|
type,
|
|
2919
2870
|
required,
|
|
2920
2871
|
className: twMerge(
|
|
@@ -2930,15 +2881,15 @@ var Input = (_a) => {
|
|
|
2930
2881
|
onBlur: handleBlur,
|
|
2931
2882
|
placeholder,
|
|
2932
2883
|
value: inputValue
|
|
2933
|
-
}
|
|
2884
|
+
}, rest)
|
|
2934
2885
|
),
|
|
2935
|
-
error === true && /* @__PURE__ */ (0,
|
|
2886
|
+
error === true && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2936
2887
|
] });
|
|
2937
2888
|
};
|
|
2938
2889
|
|
|
2939
2890
|
// src/components/TextInput/index.tsx
|
|
2940
2891
|
var import_react4 = require("react");
|
|
2941
|
-
var
|
|
2892
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
2942
2893
|
var TextInput = (0, import_react4.forwardRef)(
|
|
2943
2894
|
(_a, ref) => {
|
|
2944
2895
|
var _b = _a, {
|
|
@@ -2948,6 +2899,8 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
|
2948
2899
|
prefix,
|
|
2949
2900
|
placeholder,
|
|
2950
2901
|
error,
|
|
2902
|
+
type = "text",
|
|
2903
|
+
variant = "primary",
|
|
2951
2904
|
onClick
|
|
2952
2905
|
} = _b, rest = __objRest(_b, [
|
|
2953
2906
|
"className",
|
|
@@ -2956,6 +2909,8 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
|
2956
2909
|
"prefix",
|
|
2957
2910
|
"placeholder",
|
|
2958
2911
|
"error",
|
|
2912
|
+
"type",
|
|
2913
|
+
"variant",
|
|
2959
2914
|
"onClick"
|
|
2960
2915
|
]);
|
|
2961
2916
|
const [selected, setSelected] = (0, import_react4.useState)(false);
|
|
@@ -2972,63 +2927,51 @@ var TextInput = (0, import_react4.forwardRef)(
|
|
|
2972
2927
|
(0, import_react4.useEffect)(() => {
|
|
2973
2928
|
setInputValue(value);
|
|
2974
2929
|
}, [value]);
|
|
2975
|
-
return /* @__PURE__ */ (0,
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
className: twMerge(
|
|
3014
|
-
"flex items-center justify-center bg-neutral-800 rounded-sm w-full px-1 py-2 text-md",
|
|
3015
|
-
"focus:outline-none text-neutral",
|
|
3016
|
-
className,
|
|
3017
|
-
disabled === true && "cursor-not-allowed"
|
|
3018
|
-
)
|
|
3019
|
-
}
|
|
3020
|
-
)
|
|
3021
|
-
]
|
|
3022
|
-
}
|
|
3023
|
-
)
|
|
3024
|
-
] });
|
|
2930
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
2931
|
+
"div",
|
|
2932
|
+
{
|
|
2933
|
+
className: twMerge(
|
|
2934
|
+
" py-2 px-4 border-2 rounded-sm box-border flex items-baseline bg-neutral-200",
|
|
2935
|
+
"hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2936
|
+
variant === "secondary" && "bg-neutral-800 border-neutral-800 ",
|
|
2937
|
+
selected === true && "border-2 border-orange-500",
|
|
2938
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2939
|
+
error === true && "border-2 border-red-900"
|
|
2940
|
+
),
|
|
2941
|
+
children: [
|
|
2942
|
+
!!prefix && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: "text-neutral-500 sm:text-sm", children: prefix }),
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
2944
|
+
"input",
|
|
2945
|
+
__spreadValues({
|
|
2946
|
+
type,
|
|
2947
|
+
required: rest.required,
|
|
2948
|
+
onClick,
|
|
2949
|
+
onFocus: handleFocus,
|
|
2950
|
+
onChange: handleInput,
|
|
2951
|
+
onBlur: handleBlur,
|
|
2952
|
+
value: inputValue,
|
|
2953
|
+
placeholder,
|
|
2954
|
+
disabled,
|
|
2955
|
+
ref,
|
|
2956
|
+
className: twMerge(
|
|
2957
|
+
"flex items-center justify-center bg-neutral-200 rounded-sm w-full px-1 py-2 text-md",
|
|
2958
|
+
"focus:outline-none text-neutral-800",
|
|
2959
|
+
disabled === true && "cursor-not-allowed",
|
|
2960
|
+
variant === "secondary" && "bg-neutral-800 text-neutral",
|
|
2961
|
+
className
|
|
2962
|
+
)
|
|
2963
|
+
}, rest)
|
|
2964
|
+
)
|
|
2965
|
+
]
|
|
2966
|
+
}
|
|
2967
|
+
);
|
|
3025
2968
|
}
|
|
3026
2969
|
);
|
|
3027
2970
|
TextInput.displayName = "TextInput";
|
|
3028
2971
|
|
|
3029
2972
|
// src/components/TextArea/index.tsx
|
|
3030
2973
|
var import_react5 = require("react");
|
|
3031
|
-
var
|
|
2974
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
3032
2975
|
var TextArea = (_a) => {
|
|
3033
2976
|
var _b = _a, {
|
|
3034
2977
|
className,
|
|
@@ -3061,41 +3004,63 @@ var TextArea = (_a) => {
|
|
|
3061
3004
|
(0, import_react5.useEffect)(() => {
|
|
3062
3005
|
setInputValue(value);
|
|
3063
3006
|
}, [value]);
|
|
3064
|
-
return /* @__PURE__ */ (0,
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
3083
|
-
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
3008
|
+
"textarea",
|
|
3009
|
+
__spreadValues({
|
|
3010
|
+
required,
|
|
3011
|
+
disabled,
|
|
3012
|
+
className: twMerge(
|
|
3013
|
+
"rounded-sm w-full px-3 py-2 border-2 border-neutral text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
3014
|
+
"resize-y h-32",
|
|
3015
|
+
className,
|
|
3016
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
3017
|
+
selected === true && "border-2 border-orange-500",
|
|
3018
|
+
error === true && "border-2 border-red-900"
|
|
3019
|
+
),
|
|
3020
|
+
onClick,
|
|
3021
|
+
onFocus: handleFocus,
|
|
3022
|
+
onChange: handleInput,
|
|
3023
|
+
onBlur: handleBlur,
|
|
3024
|
+
placeholder,
|
|
3025
|
+
value: inputValue
|
|
3026
|
+
}, rest)
|
|
3027
|
+
);
|
|
3028
|
+
};
|
|
3029
|
+
|
|
3030
|
+
// src/components/Text/index.tsx
|
|
3031
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
3032
|
+
var Text = (_a) => {
|
|
3033
|
+
var _b = _a, {
|
|
3034
|
+
children,
|
|
3035
|
+
color = "neutral-800",
|
|
3036
|
+
size = "md",
|
|
3037
|
+
tag = "p",
|
|
3038
|
+
className
|
|
3039
|
+
} = _b, rest = __objRest(_b, [
|
|
3040
|
+
"children",
|
|
3041
|
+
"color",
|
|
3042
|
+
"size",
|
|
3043
|
+
"tag",
|
|
3044
|
+
"className"
|
|
3045
|
+
]);
|
|
3046
|
+
const fontSize = {
|
|
3047
|
+
xxs: "text-xxs",
|
|
3048
|
+
xs: "text-xs",
|
|
3049
|
+
sm: "text-sm",
|
|
3050
|
+
md: "text-md",
|
|
3051
|
+
lg: "text-lg",
|
|
3052
|
+
xl: "text-xl",
|
|
3053
|
+
"2xl": "text-2xl",
|
|
3054
|
+
"3xl": "text-3xl",
|
|
3055
|
+
"4xl": "text-4xl",
|
|
3056
|
+
"5xl": "text-5xl",
|
|
3057
|
+
"6xl": "text-6xl",
|
|
3058
|
+
"7xl": "text-7xl",
|
|
3059
|
+
"8xl": "text-8xl",
|
|
3060
|
+
"9xl": "text-9xl"
|
|
3061
|
+
}[size];
|
|
3062
|
+
const Tag = tag;
|
|
3063
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
3099
3064
|
};
|
|
3100
3065
|
|
|
3101
3066
|
// src/components/Heading/index.tsx
|
|
@@ -3104,7 +3069,8 @@ var Heading = ({
|
|
|
3104
3069
|
children,
|
|
3105
3070
|
color = "neutral-800",
|
|
3106
3071
|
size = "lg",
|
|
3107
|
-
|
|
3072
|
+
tag = "h2",
|
|
3073
|
+
className
|
|
3108
3074
|
}) => {
|
|
3109
3075
|
const fontSize = {
|
|
3110
3076
|
sm: "text-sm",
|
|
@@ -3120,8 +3086,8 @@ var Heading = ({
|
|
|
3120
3086
|
"8xl": "text-8xl",
|
|
3121
3087
|
"9xl": "text-9xl"
|
|
3122
3088
|
}[size];
|
|
3123
|
-
const Tag =
|
|
3124
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tag, { className: twMerge(`text-${color} ${fontSize}
|
|
3089
|
+
const Tag = tag;
|
|
3090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Tag, { className: twMerge(`text-${color} ${fontSize}`, className), children });
|
|
3125
3091
|
};
|
|
3126
3092
|
|
|
3127
3093
|
// src/components/Box/index.tsx
|
|
@@ -3129,13 +3095,17 @@ var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
|
3129
3095
|
var Box = ({
|
|
3130
3096
|
className,
|
|
3131
3097
|
children,
|
|
3132
|
-
|
|
3098
|
+
tag = "div",
|
|
3099
|
+
variant = "secondary"
|
|
3133
3100
|
}) => {
|
|
3101
|
+
const Tag = tag;
|
|
3134
3102
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
3135
|
-
|
|
3103
|
+
Tag,
|
|
3136
3104
|
{
|
|
3137
3105
|
className: twMerge(
|
|
3138
|
-
|
|
3106
|
+
"p-6 rounded-md bottom-1 border-2",
|
|
3107
|
+
variant === "primary" && "text-neutral-800 bg-neutral-200 border-neutral-300",
|
|
3108
|
+
variant === "secondary" && "text-neutral-200 bg-neutral-600 border-neutral-800",
|
|
3139
3109
|
className
|
|
3140
3110
|
),
|
|
3141
3111
|
children
|
|
@@ -3143,36 +3113,68 @@ var Box = ({
|
|
|
3143
3113
|
);
|
|
3144
3114
|
};
|
|
3145
3115
|
|
|
3116
|
+
// src/components/Form/index.tsx
|
|
3117
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
3118
|
+
var Form = (_a) => {
|
|
3119
|
+
var _b = _a, {
|
|
3120
|
+
className,
|
|
3121
|
+
children,
|
|
3122
|
+
variant = "secondary",
|
|
3123
|
+
orientation = "row"
|
|
3124
|
+
} = _b, rest = __objRest(_b, [
|
|
3125
|
+
"className",
|
|
3126
|
+
"children",
|
|
3127
|
+
"variant",
|
|
3128
|
+
"orientation"
|
|
3129
|
+
]);
|
|
3130
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
3131
|
+
"form",
|
|
3132
|
+
__spreadProps(__spreadValues({
|
|
3133
|
+
className: twMerge(
|
|
3134
|
+
"flex flex-row gap-2 p-6 rounded-md border-2",
|
|
3135
|
+
variant === "primary" && "text-neutral-800 bg-neutral-200 border-neutral-300",
|
|
3136
|
+
variant === "secondary" && "text-neutral-200 bg-neutral-600 border-neutral-800",
|
|
3137
|
+
orientation === "col" && "flex-col",
|
|
3138
|
+
className
|
|
3139
|
+
)
|
|
3140
|
+
}, rest), {
|
|
3141
|
+
children
|
|
3142
|
+
})
|
|
3143
|
+
);
|
|
3144
|
+
};
|
|
3145
|
+
|
|
3146
3146
|
// src/components/Avatar/index.tsx
|
|
3147
3147
|
var import_fa = require("react-icons/fa");
|
|
3148
|
-
var
|
|
3148
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
3149
3149
|
var Avatar = (_a) => {
|
|
3150
|
-
var rest = __objRest(
|
|
3151
|
-
return /* @__PURE__ */ (0,
|
|
3150
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
3151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
3152
3152
|
"div",
|
|
3153
3153
|
{
|
|
3154
|
-
className: twMerge(
|
|
3154
|
+
className: twMerge(
|
|
3155
|
+
`
|
|
3155
3156
|
rounded-full w-16 h-16 overflow-hidden flex items-center
|
|
3156
|
-
bg-neutral-600 justify-center
|
|
3157
|
-
|
|
3158
|
-
|
|
3157
|
+
bg-neutral-600 justify-center`,
|
|
3158
|
+
className
|
|
3159
|
+
),
|
|
3160
|
+
children: rest.src ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", __spreadValues({ className: "w-full h-full object-cover rounded-full" }, rest)) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_fa.FaUser, { color: "#FFFFFF", size: 24 })
|
|
3159
3161
|
}
|
|
3160
3162
|
);
|
|
3161
3163
|
};
|
|
3162
3164
|
|
|
3163
3165
|
// src/components/MultiStep/index.tsx
|
|
3164
|
-
var
|
|
3166
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
3165
3167
|
var MultiStep = ({ className, size, currentStep }) => {
|
|
3166
|
-
return /* @__PURE__ */ (0,
|
|
3167
|
-
/* @__PURE__ */ (0,
|
|
3168
|
-
/* @__PURE__ */ (0,
|
|
3169
|
-
return /* @__PURE__ */ (0,
|
|
3168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "w-full", children: [
|
|
3169
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Text, { tag: "label", color: "neutral-100", size: "xs", children: `Passo ${currentStep} de ${size}` }),
|
|
3170
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: `grid gap-2 grid-cols-${size} grid-flow-col mt-1`, children: Array.from(Array(size).keys()).map((_, index) => {
|
|
3171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
3170
3172
|
"div",
|
|
3171
3173
|
{
|
|
3172
3174
|
className: twMerge(
|
|
3173
|
-
className,
|
|
3174
3175
|
"h-1 rounded-full",
|
|
3175
|
-
currentStep && index < currentStep ? "bg-orange-500" : "bg-neutral-500"
|
|
3176
|
+
currentStep && index < currentStep ? "bg-orange-500" : "bg-neutral-500",
|
|
3177
|
+
className
|
|
3176
3178
|
)
|
|
3177
3179
|
},
|
|
3178
3180
|
index
|
|
@@ -3187,6 +3189,7 @@ var MultiStep = ({ className, size, currentStep }) => {
|
|
|
3187
3189
|
Button,
|
|
3188
3190
|
Card,
|
|
3189
3191
|
Checkbox,
|
|
3192
|
+
Form,
|
|
3190
3193
|
Heading,
|
|
3191
3194
|
Input,
|
|
3192
3195
|
MultiStep,
|