@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.mjs
CHANGED
|
@@ -2537,12 +2537,12 @@ var Card = (_a) => {
|
|
|
2537
2537
|
className: twMerge(
|
|
2538
2538
|
"flex items-center justify-center rounded-lg cursor-pointer bg-neutral",
|
|
2539
2539
|
"hover:shadow-md hover:shadow-neutral-500 border border-neutral-500 text-neutral-1000",
|
|
2540
|
-
className,
|
|
2541
2540
|
size === "medium" && "w-64 px-8 py-4",
|
|
2542
2541
|
size === "large" && "w-96 pr-5",
|
|
2543
2542
|
direction === "col" && "flex-col",
|
|
2544
2543
|
selected === true && "border-2 border-orange-500",
|
|
2545
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2544
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2545
|
+
className
|
|
2546
2546
|
),
|
|
2547
2547
|
onClick,
|
|
2548
2548
|
children: [
|
|
@@ -2576,13 +2576,13 @@ var Button = (_a) => {
|
|
|
2576
2576
|
"button",
|
|
2577
2577
|
__spreadValues({
|
|
2578
2578
|
className: twMerge(
|
|
2579
|
-
"flex items-center justify-center rounded-lg px-8 py-2 text-md font-medium hover:shadow-md hover:shadow-neutral-500",
|
|
2580
|
-
className,
|
|
2579
|
+
"flex items-center justify-center rounded-lg px-8 py-2 text-md font-medium hover:shadow-md hover:shadow-neutral-500 w-full",
|
|
2581
2580
|
variant === "primary" && "bg-orange-500 text-neutral hover:bg-orange-700",
|
|
2582
2581
|
variant === "secondary" && "bg-neutral text-orange-500 border border-orange-500 hover:bg-neutral-200",
|
|
2583
2582
|
size === "sm" && "px-6 py-1",
|
|
2584
2583
|
typeof rest.children !== "string" && "px-4",
|
|
2585
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2584
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2585
|
+
className
|
|
2586
2586
|
),
|
|
2587
2587
|
onClick
|
|
2588
2588
|
}, rest)
|
|
@@ -2599,7 +2599,8 @@ var RadioGroup = ({
|
|
|
2599
2599
|
{ id: 1, value: "option1", label: "Op\xE7\xE3o 1" },
|
|
2600
2600
|
{ id: 2, value: "option2", label: "Op\xE7\xE3o 2" }
|
|
2601
2601
|
],
|
|
2602
|
-
required = false
|
|
2602
|
+
required = false,
|
|
2603
|
+
className
|
|
2603
2604
|
}) => {
|
|
2604
2605
|
const [selectedOption, setSelectedOption] = useState("");
|
|
2605
2606
|
const handleOptionChange = (value) => {
|
|
@@ -2613,7 +2614,8 @@ var RadioGroup = ({
|
|
|
2613
2614
|
className: twMerge(
|
|
2614
2615
|
"relative rounded-full border-2 w-5 h-5 flex items-center justify-center hover:border-orange-500 hover:cursor-pointer",
|
|
2615
2616
|
selectedOption === option.value ? "bg-orange-500 border-orange-500" : "border-neutral-500 hover:shadow-md hover:shadow-orange-500",
|
|
2616
|
-
disabled === true && "opacity-50 cursor-not-allowed"
|
|
2617
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2618
|
+
className
|
|
2617
2619
|
),
|
|
2618
2620
|
children: [
|
|
2619
2621
|
/* @__PURE__ */ jsx3(
|
|
@@ -2745,49 +2747,12 @@ var masks = {
|
|
|
2745
2747
|
};
|
|
2746
2748
|
var masks_default = masks;
|
|
2747
2749
|
|
|
2748
|
-
// src/components/Text/index.tsx
|
|
2749
|
-
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
2750
|
-
var Text = (_a) => {
|
|
2751
|
-
var _b = _a, {
|
|
2752
|
-
children,
|
|
2753
|
-
color = "neutral-800",
|
|
2754
|
-
size = "md",
|
|
2755
|
-
variant = "p",
|
|
2756
|
-
className
|
|
2757
|
-
} = _b, rest = __objRest(_b, [
|
|
2758
|
-
"children",
|
|
2759
|
-
"color",
|
|
2760
|
-
"size",
|
|
2761
|
-
"variant",
|
|
2762
|
-
"className"
|
|
2763
|
-
]);
|
|
2764
|
-
const fontSize = {
|
|
2765
|
-
xxs: "text-xxs",
|
|
2766
|
-
xs: "text-xs",
|
|
2767
|
-
sm: "text-sm",
|
|
2768
|
-
md: "text-md",
|
|
2769
|
-
lg: "text-lg",
|
|
2770
|
-
xl: "text-xl",
|
|
2771
|
-
"2xl": "text-2xl",
|
|
2772
|
-
"3xl": "text-3xl",
|
|
2773
|
-
"4xl": "text-4xl",
|
|
2774
|
-
"5xl": "text-5xl",
|
|
2775
|
-
"6xl": "text-6xl",
|
|
2776
|
-
"7xl": "text-7xl",
|
|
2777
|
-
"8xl": "text-8xl",
|
|
2778
|
-
"9xl": "text-9xl"
|
|
2779
|
-
}[size];
|
|
2780
|
-
const Tag = variant;
|
|
2781
|
-
return /* @__PURE__ */ jsx5(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
2782
|
-
};
|
|
2783
|
-
|
|
2784
2750
|
// src/components/Input/index.tsx
|
|
2785
|
-
import { Fragment, jsx as
|
|
2751
|
+
import { Fragment, jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2786
2752
|
var Input = (_a) => {
|
|
2787
2753
|
var _b = _a, {
|
|
2788
2754
|
className,
|
|
2789
2755
|
disabled,
|
|
2790
|
-
label,
|
|
2791
2756
|
placeholder,
|
|
2792
2757
|
value,
|
|
2793
2758
|
validated,
|
|
@@ -2798,7 +2763,6 @@ var Input = (_a) => {
|
|
|
2798
2763
|
} = _b, rest = __objRest(_b, [
|
|
2799
2764
|
"className",
|
|
2800
2765
|
"disabled",
|
|
2801
|
-
"label",
|
|
2802
2766
|
"placeholder",
|
|
2803
2767
|
"value",
|
|
2804
2768
|
"validated",
|
|
@@ -2831,22 +2795,10 @@ var Input = (_a) => {
|
|
|
2831
2795
|
setHasEightCharacteres((value2 == null ? void 0 : value2.match(masks_default.password[2])) !== null);
|
|
2832
2796
|
};
|
|
2833
2797
|
return /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
2834
|
-
label && /* @__PURE__ */ jsx6(
|
|
2835
|
-
Text,
|
|
2836
|
-
{
|
|
2837
|
-
htmlFor: rest.id,
|
|
2838
|
-
variant: "label",
|
|
2839
|
-
color: rest.color,
|
|
2840
|
-
className: "leading-8",
|
|
2841
|
-
children: label
|
|
2842
|
-
}
|
|
2843
|
-
),
|
|
2844
2798
|
type === "text" || type === "password" || type === "date" ? /* @__PURE__ */ jsxs4(Fragment, { children: [
|
|
2845
|
-
/* @__PURE__ */
|
|
2799
|
+
/* @__PURE__ */ jsx5(
|
|
2846
2800
|
"input",
|
|
2847
|
-
{
|
|
2848
|
-
id: rest.id,
|
|
2849
|
-
name: rest.name,
|
|
2801
|
+
__spreadValues({
|
|
2850
2802
|
type,
|
|
2851
2803
|
required,
|
|
2852
2804
|
className: twMerge(
|
|
@@ -2863,27 +2815,25 @@ var Input = (_a) => {
|
|
|
2863
2815
|
onBlur: handleBlur,
|
|
2864
2816
|
placeholder,
|
|
2865
2817
|
value: inputValue
|
|
2866
|
-
}
|
|
2818
|
+
}, rest)
|
|
2867
2819
|
),
|
|
2868
2820
|
type === "password" && (!hasEightCharacteres || !hasSpecialCharacteres || !hasNumber) && /* @__PURE__ */ jsxs4("ul", { className: "py-1", children: [
|
|
2869
2821
|
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2870
|
-
hasEightCharacteres ? /* @__PURE__ */
|
|
2871
|
-
/* @__PURE__ */
|
|
2822
|
+
hasEightCharacteres ? /* @__PURE__ */ jsx5(FiCheck3, {}) : /* @__PURE__ */ jsx5(FiX, {}),
|
|
2823
|
+
/* @__PURE__ */ jsx5("span", { className: "px-1", children: "Pelo menos 8 caracteres" })
|
|
2872
2824
|
] }),
|
|
2873
2825
|
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2874
|
-
hasSpecialCharacteres ? /* @__PURE__ */
|
|
2875
|
-
/* @__PURE__ */
|
|
2826
|
+
hasSpecialCharacteres ? /* @__PURE__ */ jsx5(FiCheck3, {}) : /* @__PURE__ */ jsx5(FiX, {}),
|
|
2827
|
+
/* @__PURE__ */ jsx5("span", { className: "px-1", children: "Pelo menos 1 s\xEDmbolo (@, !, $, etc)" })
|
|
2876
2828
|
] }),
|
|
2877
2829
|
/* @__PURE__ */ jsxs4("li", { className: "flex items-center px-2", children: [
|
|
2878
|
-
hasNumber ? /* @__PURE__ */
|
|
2879
|
-
/* @__PURE__ */
|
|
2830
|
+
hasNumber ? /* @__PURE__ */ jsx5(FiCheck3, {}) : /* @__PURE__ */ jsx5(FiX, {}),
|
|
2831
|
+
/* @__PURE__ */ jsx5("span", { className: "px-1", children: "Deve conter 1 n\xFAmero" })
|
|
2880
2832
|
] })
|
|
2881
2833
|
] })
|
|
2882
|
-
] }) : /* @__PURE__ */
|
|
2834
|
+
] }) : /* @__PURE__ */ jsx5(
|
|
2883
2835
|
"input",
|
|
2884
|
-
{
|
|
2885
|
-
id: rest.id,
|
|
2886
|
-
name: rest.name,
|
|
2836
|
+
__spreadValues({
|
|
2887
2837
|
type,
|
|
2888
2838
|
required,
|
|
2889
2839
|
className: twMerge(
|
|
@@ -2899,9 +2849,9 @@ var Input = (_a) => {
|
|
|
2899
2849
|
onBlur: handleBlur,
|
|
2900
2850
|
placeholder,
|
|
2901
2851
|
value: inputValue
|
|
2902
|
-
}
|
|
2852
|
+
}, rest)
|
|
2903
2853
|
),
|
|
2904
|
-
error === true && /* @__PURE__ */
|
|
2854
|
+
error === true && /* @__PURE__ */ jsx5("label", { htmlFor: rest.id, className: "text-red-900", children: "Campo inv\xE1lido." })
|
|
2905
2855
|
] });
|
|
2906
2856
|
};
|
|
2907
2857
|
|
|
@@ -2911,7 +2861,7 @@ import {
|
|
|
2911
2861
|
useState as useState4,
|
|
2912
2862
|
forwardRef
|
|
2913
2863
|
} from "react";
|
|
2914
|
-
import {
|
|
2864
|
+
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2915
2865
|
var TextInput = forwardRef(
|
|
2916
2866
|
(_a, ref) => {
|
|
2917
2867
|
var _b = _a, {
|
|
@@ -2921,6 +2871,8 @@ var TextInput = forwardRef(
|
|
|
2921
2871
|
prefix,
|
|
2922
2872
|
placeholder,
|
|
2923
2873
|
error,
|
|
2874
|
+
type = "text",
|
|
2875
|
+
variant = "primary",
|
|
2924
2876
|
onClick
|
|
2925
2877
|
} = _b, rest = __objRest(_b, [
|
|
2926
2878
|
"className",
|
|
@@ -2929,6 +2881,8 @@ var TextInput = forwardRef(
|
|
|
2929
2881
|
"prefix",
|
|
2930
2882
|
"placeholder",
|
|
2931
2883
|
"error",
|
|
2884
|
+
"type",
|
|
2885
|
+
"variant",
|
|
2932
2886
|
"onClick"
|
|
2933
2887
|
]);
|
|
2934
2888
|
const [selected, setSelected] = useState4(false);
|
|
@@ -2945,56 +2899,44 @@ var TextInput = forwardRef(
|
|
|
2945
2899
|
useEffect2(() => {
|
|
2946
2900
|
setInputValue(value);
|
|
2947
2901
|
}, [value]);
|
|
2948
|
-
return /* @__PURE__ */ jsxs5(
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
className: twMerge(
|
|
2987
|
-
"flex items-center justify-center bg-neutral-800 rounded-sm w-full px-1 py-2 text-md",
|
|
2988
|
-
"focus:outline-none text-neutral",
|
|
2989
|
-
className,
|
|
2990
|
-
disabled === true && "cursor-not-allowed"
|
|
2991
|
-
)
|
|
2992
|
-
}
|
|
2993
|
-
)
|
|
2994
|
-
]
|
|
2995
|
-
}
|
|
2996
|
-
)
|
|
2997
|
-
] });
|
|
2902
|
+
return /* @__PURE__ */ jsxs5(
|
|
2903
|
+
"div",
|
|
2904
|
+
{
|
|
2905
|
+
className: twMerge(
|
|
2906
|
+
" py-2 px-4 border-2 rounded-sm box-border flex items-baseline bg-neutral-200",
|
|
2907
|
+
"hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2908
|
+
variant === "secondary" && "bg-neutral-800 border-neutral-800 ",
|
|
2909
|
+
selected === true && "border-2 border-orange-500",
|
|
2910
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2911
|
+
error === true && "border-2 border-red-900"
|
|
2912
|
+
),
|
|
2913
|
+
children: [
|
|
2914
|
+
!!prefix && /* @__PURE__ */ jsx6("span", { className: "text-neutral-500 sm:text-sm", children: prefix }),
|
|
2915
|
+
/* @__PURE__ */ jsx6(
|
|
2916
|
+
"input",
|
|
2917
|
+
__spreadValues({
|
|
2918
|
+
type,
|
|
2919
|
+
required: rest.required,
|
|
2920
|
+
onClick,
|
|
2921
|
+
onFocus: handleFocus,
|
|
2922
|
+
onChange: handleInput,
|
|
2923
|
+
onBlur: handleBlur,
|
|
2924
|
+
value: inputValue,
|
|
2925
|
+
placeholder,
|
|
2926
|
+
disabled,
|
|
2927
|
+
ref,
|
|
2928
|
+
className: twMerge(
|
|
2929
|
+
"flex items-center justify-center bg-neutral-200 rounded-sm w-full px-1 py-2 text-md",
|
|
2930
|
+
"focus:outline-none text-neutral-800",
|
|
2931
|
+
disabled === true && "cursor-not-allowed",
|
|
2932
|
+
variant === "secondary" && "bg-neutral-800 text-neutral",
|
|
2933
|
+
className
|
|
2934
|
+
)
|
|
2935
|
+
}, rest)
|
|
2936
|
+
)
|
|
2937
|
+
]
|
|
2938
|
+
}
|
|
2939
|
+
);
|
|
2998
2940
|
}
|
|
2999
2941
|
);
|
|
3000
2942
|
TextInput.displayName = "TextInput";
|
|
@@ -3004,7 +2946,7 @@ import {
|
|
|
3004
2946
|
useEffect as useEffect3,
|
|
3005
2947
|
useState as useState5
|
|
3006
2948
|
} from "react";
|
|
3007
|
-
import {
|
|
2949
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
3008
2950
|
var TextArea = (_a) => {
|
|
3009
2951
|
var _b = _a, {
|
|
3010
2952
|
className,
|
|
@@ -3037,41 +2979,63 @@ var TextArea = (_a) => {
|
|
|
3037
2979
|
useEffect3(() => {
|
|
3038
2980
|
setInputValue(value);
|
|
3039
2981
|
}, [value]);
|
|
3040
|
-
return /* @__PURE__ */
|
|
3041
|
-
|
|
3042
|
-
|
|
3043
|
-
|
|
3044
|
-
|
|
3045
|
-
|
|
3046
|
-
|
|
3047
|
-
|
|
3048
|
-
|
|
3049
|
-
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
3054
|
-
|
|
3055
|
-
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
|
|
3059
|
-
|
|
3060
|
-
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
|
|
3070
|
-
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
2982
|
+
return /* @__PURE__ */ jsx7(
|
|
2983
|
+
"textarea",
|
|
2984
|
+
__spreadValues({
|
|
2985
|
+
required,
|
|
2986
|
+
disabled,
|
|
2987
|
+
className: twMerge(
|
|
2988
|
+
"rounded-sm w-full px-3 py-2 border-2 border-neutral text-md hover:shadow-md hover:shadow-neutral-500 focus:outline-none",
|
|
2989
|
+
"resize-y h-32",
|
|
2990
|
+
className,
|
|
2991
|
+
disabled === true && "opacity-50 cursor-not-allowed",
|
|
2992
|
+
selected === true && "border-2 border-orange-500",
|
|
2993
|
+
error === true && "border-2 border-red-900"
|
|
2994
|
+
),
|
|
2995
|
+
onClick,
|
|
2996
|
+
onFocus: handleFocus,
|
|
2997
|
+
onChange: handleInput,
|
|
2998
|
+
onBlur: handleBlur,
|
|
2999
|
+
placeholder,
|
|
3000
|
+
value: inputValue
|
|
3001
|
+
}, rest)
|
|
3002
|
+
);
|
|
3003
|
+
};
|
|
3004
|
+
|
|
3005
|
+
// src/components/Text/index.tsx
|
|
3006
|
+
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
3007
|
+
var Text = (_a) => {
|
|
3008
|
+
var _b = _a, {
|
|
3009
|
+
children,
|
|
3010
|
+
color = "neutral-800",
|
|
3011
|
+
size = "md",
|
|
3012
|
+
tag = "p",
|
|
3013
|
+
className
|
|
3014
|
+
} = _b, rest = __objRest(_b, [
|
|
3015
|
+
"children",
|
|
3016
|
+
"color",
|
|
3017
|
+
"size",
|
|
3018
|
+
"tag",
|
|
3019
|
+
"className"
|
|
3020
|
+
]);
|
|
3021
|
+
const fontSize = {
|
|
3022
|
+
xxs: "text-xxs",
|
|
3023
|
+
xs: "text-xs",
|
|
3024
|
+
sm: "text-sm",
|
|
3025
|
+
md: "text-md",
|
|
3026
|
+
lg: "text-lg",
|
|
3027
|
+
xl: "text-xl",
|
|
3028
|
+
"2xl": "text-2xl",
|
|
3029
|
+
"3xl": "text-3xl",
|
|
3030
|
+
"4xl": "text-4xl",
|
|
3031
|
+
"5xl": "text-5xl",
|
|
3032
|
+
"6xl": "text-6xl",
|
|
3033
|
+
"7xl": "text-7xl",
|
|
3034
|
+
"8xl": "text-8xl",
|
|
3035
|
+
"9xl": "text-9xl"
|
|
3036
|
+
}[size];
|
|
3037
|
+
const Tag = tag;
|
|
3038
|
+
return /* @__PURE__ */ jsx8(Tag, __spreadProps(__spreadValues({}, rest), { className: twMerge(`text-${color} ${fontSize}`, className), children }));
|
|
3075
3039
|
};
|
|
3076
3040
|
|
|
3077
3041
|
// src/components/Heading/index.tsx
|
|
@@ -3080,7 +3044,8 @@ var Heading = ({
|
|
|
3080
3044
|
children,
|
|
3081
3045
|
color = "neutral-800",
|
|
3082
3046
|
size = "lg",
|
|
3083
|
-
|
|
3047
|
+
tag = "h2",
|
|
3048
|
+
className
|
|
3084
3049
|
}) => {
|
|
3085
3050
|
const fontSize = {
|
|
3086
3051
|
sm: "text-sm",
|
|
@@ -3096,8 +3061,8 @@ var Heading = ({
|
|
|
3096
3061
|
"8xl": "text-8xl",
|
|
3097
3062
|
"9xl": "text-9xl"
|
|
3098
3063
|
}[size];
|
|
3099
|
-
const Tag =
|
|
3100
|
-
return /* @__PURE__ */ jsx9(Tag, { className: twMerge(`text-${color} ${fontSize}
|
|
3064
|
+
const Tag = tag;
|
|
3065
|
+
return /* @__PURE__ */ jsx9(Tag, { className: twMerge(`text-${color} ${fontSize}`, className), children });
|
|
3101
3066
|
};
|
|
3102
3067
|
|
|
3103
3068
|
// src/components/Box/index.tsx
|
|
@@ -3105,13 +3070,17 @@ import { jsx as jsx10 } from "react/jsx-runtime";
|
|
|
3105
3070
|
var Box = ({
|
|
3106
3071
|
className,
|
|
3107
3072
|
children,
|
|
3108
|
-
|
|
3073
|
+
tag = "div",
|
|
3074
|
+
variant = "secondary"
|
|
3109
3075
|
}) => {
|
|
3076
|
+
const Tag = tag;
|
|
3110
3077
|
return /* @__PURE__ */ jsx10(
|
|
3111
|
-
|
|
3078
|
+
Tag,
|
|
3112
3079
|
{
|
|
3113
3080
|
className: twMerge(
|
|
3114
|
-
|
|
3081
|
+
"p-6 rounded-md bottom-1 border-2",
|
|
3082
|
+
variant === "primary" && "text-neutral-800 bg-neutral-200 border-neutral-300",
|
|
3083
|
+
variant === "secondary" && "text-neutral-200 bg-neutral-600 border-neutral-800",
|
|
3115
3084
|
className
|
|
3116
3085
|
),
|
|
3117
3086
|
children
|
|
@@ -3119,36 +3088,68 @@ var Box = ({
|
|
|
3119
3088
|
);
|
|
3120
3089
|
};
|
|
3121
3090
|
|
|
3091
|
+
// src/components/Form/index.tsx
|
|
3092
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
3093
|
+
var Form = (_a) => {
|
|
3094
|
+
var _b = _a, {
|
|
3095
|
+
className,
|
|
3096
|
+
children,
|
|
3097
|
+
variant = "secondary",
|
|
3098
|
+
orientation = "row"
|
|
3099
|
+
} = _b, rest = __objRest(_b, [
|
|
3100
|
+
"className",
|
|
3101
|
+
"children",
|
|
3102
|
+
"variant",
|
|
3103
|
+
"orientation"
|
|
3104
|
+
]);
|
|
3105
|
+
return /* @__PURE__ */ jsx11(
|
|
3106
|
+
"form",
|
|
3107
|
+
__spreadProps(__spreadValues({
|
|
3108
|
+
className: twMerge(
|
|
3109
|
+
"flex flex-row gap-2 p-6 rounded-md border-2",
|
|
3110
|
+
variant === "primary" && "text-neutral-800 bg-neutral-200 border-neutral-300",
|
|
3111
|
+
variant === "secondary" && "text-neutral-200 bg-neutral-600 border-neutral-800",
|
|
3112
|
+
orientation === "col" && "flex-col",
|
|
3113
|
+
className
|
|
3114
|
+
)
|
|
3115
|
+
}, rest), {
|
|
3116
|
+
children
|
|
3117
|
+
})
|
|
3118
|
+
);
|
|
3119
|
+
};
|
|
3120
|
+
|
|
3122
3121
|
// src/components/Avatar/index.tsx
|
|
3123
3122
|
import { FaUser } from "react-icons/fa";
|
|
3124
|
-
import { jsx as
|
|
3123
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
3125
3124
|
var Avatar = (_a) => {
|
|
3126
|
-
var rest = __objRest(
|
|
3127
|
-
return /* @__PURE__ */
|
|
3125
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
3126
|
+
return /* @__PURE__ */ jsx12(
|
|
3128
3127
|
"div",
|
|
3129
3128
|
{
|
|
3130
|
-
className: twMerge(
|
|
3129
|
+
className: twMerge(
|
|
3130
|
+
`
|
|
3131
3131
|
rounded-full w-16 h-16 overflow-hidden flex items-center
|
|
3132
|
-
bg-neutral-600 justify-center
|
|
3133
|
-
|
|
3134
|
-
|
|
3132
|
+
bg-neutral-600 justify-center`,
|
|
3133
|
+
className
|
|
3134
|
+
),
|
|
3135
|
+
children: rest.src ? /* @__PURE__ */ jsx12("img", __spreadValues({ className: "w-full h-full object-cover rounded-full" }, rest)) : /* @__PURE__ */ jsx12(FaUser, { color: "#FFFFFF", size: 24 })
|
|
3135
3136
|
}
|
|
3136
3137
|
);
|
|
3137
3138
|
};
|
|
3138
3139
|
|
|
3139
3140
|
// src/components/MultiStep/index.tsx
|
|
3140
|
-
import { jsx as
|
|
3141
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
3141
3142
|
var MultiStep = ({ className, size, currentStep }) => {
|
|
3142
|
-
return /* @__PURE__ */
|
|
3143
|
-
/* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
return /* @__PURE__ */
|
|
3143
|
+
return /* @__PURE__ */ jsxs6("div", { className: "w-full", children: [
|
|
3144
|
+
/* @__PURE__ */ jsx13(Text, { tag: "label", color: "neutral-100", size: "xs", children: `Passo ${currentStep} de ${size}` }),
|
|
3145
|
+
/* @__PURE__ */ jsx13("div", { className: `grid gap-2 grid-cols-${size} grid-flow-col mt-1`, children: Array.from(Array(size).keys()).map((_, index) => {
|
|
3146
|
+
return /* @__PURE__ */ jsx13(
|
|
3146
3147
|
"div",
|
|
3147
3148
|
{
|
|
3148
3149
|
className: twMerge(
|
|
3149
|
-
className,
|
|
3150
3150
|
"h-1 rounded-full",
|
|
3151
|
-
currentStep && index < currentStep ? "bg-orange-500" : "bg-neutral-500"
|
|
3151
|
+
currentStep && index < currentStep ? "bg-orange-500" : "bg-neutral-500",
|
|
3152
|
+
className
|
|
3152
3153
|
)
|
|
3153
3154
|
},
|
|
3154
3155
|
index
|
|
@@ -3162,6 +3163,7 @@ export {
|
|
|
3162
3163
|
Button,
|
|
3163
3164
|
Card,
|
|
3164
3165
|
Checkbox,
|
|
3166
|
+
Form,
|
|
3165
3167
|
Heading,
|
|
3166
3168
|
Input,
|
|
3167
3169
|
MultiStep,
|
package/dist/tailwind.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
! tailwindcss v3.4.
|
|
2
|
+
! tailwindcss v3.4.1 | MIT License | https://tailwindcss.com
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
/*
|
|
@@ -632,6 +632,10 @@ video {
|
|
|
632
632
|
grid-auto-flow: column;
|
|
633
633
|
}
|
|
634
634
|
|
|
635
|
+
.flex-row {
|
|
636
|
+
flex-direction: row;
|
|
637
|
+
}
|
|
638
|
+
|
|
635
639
|
.flex-col {
|
|
636
640
|
flex-direction: column;
|
|
637
641
|
}
|
|
@@ -690,6 +694,11 @@ video {
|
|
|
690
694
|
border-color: rgb(255 255 255 / var(--tw-border-opacity));
|
|
691
695
|
}
|
|
692
696
|
|
|
697
|
+
.border-neutral-300 {
|
|
698
|
+
--tw-border-opacity: 1;
|
|
699
|
+
border-color: rgb(227 227 226 / var(--tw-border-opacity));
|
|
700
|
+
}
|
|
701
|
+
|
|
693
702
|
.border-neutral-500 {
|
|
694
703
|
--tw-border-opacity: 1;
|
|
695
704
|
border-color: rgb(157 157 157 / var(--tw-border-opacity));
|
|
@@ -710,16 +719,16 @@ video {
|
|
|
710
719
|
border-color: rgb(158 0 63 / var(--tw-border-opacity));
|
|
711
720
|
}
|
|
712
721
|
|
|
713
|
-
.border-s-neutral-600 {
|
|
714
|
-
--tw-border-opacity: 1;
|
|
715
|
-
border-inline-start-color: rgb(50 60 69 / var(--tw-border-opacity));
|
|
716
|
-
}
|
|
717
|
-
|
|
718
722
|
.bg-neutral {
|
|
719
723
|
--tw-bg-opacity: 1;
|
|
720
724
|
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
|
|
721
725
|
}
|
|
722
726
|
|
|
727
|
+
.bg-neutral-200 {
|
|
728
|
+
--tw-bg-opacity: 1;
|
|
729
|
+
background-color: rgb(246 246 246 / var(--tw-bg-opacity));
|
|
730
|
+
}
|
|
731
|
+
|
|
723
732
|
.bg-neutral-500 {
|
|
724
733
|
--tw-bg-opacity: 1;
|
|
725
734
|
background-color: rgb(157 157 157 / var(--tw-bg-opacity));
|
|
@@ -870,10 +879,6 @@ video {
|
|
|
870
879
|
font-weight: 500;
|
|
871
880
|
}
|
|
872
881
|
|
|
873
|
-
.leading-8 {
|
|
874
|
-
line-height: 2rem;
|
|
875
|
-
}
|
|
876
|
-
|
|
877
882
|
.leading-tight {
|
|
878
883
|
line-height: 1.25;
|
|
879
884
|
}
|
|
@@ -888,11 +893,21 @@ video {
|
|
|
888
893
|
color: rgb(0 0 0 / var(--tw-text-opacity));
|
|
889
894
|
}
|
|
890
895
|
|
|
896
|
+
.text-neutral-200 {
|
|
897
|
+
--tw-text-opacity: 1;
|
|
898
|
+
color: rgb(246 246 246 / var(--tw-text-opacity));
|
|
899
|
+
}
|
|
900
|
+
|
|
891
901
|
.text-neutral-500 {
|
|
892
902
|
--tw-text-opacity: 1;
|
|
893
903
|
color: rgb(157 157 157 / var(--tw-text-opacity));
|
|
894
904
|
}
|
|
895
905
|
|
|
906
|
+
.text-neutral-800 {
|
|
907
|
+
--tw-text-opacity: 1;
|
|
908
|
+
color: rgb(28 33 38 / var(--tw-text-opacity));
|
|
909
|
+
}
|
|
910
|
+
|
|
896
911
|
.text-orange-500 {
|
|
897
912
|
--tw-text-opacity: 1;
|
|
898
913
|
color: rgb(243 98 70 / var(--tw-text-opacity));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koaris/bloom-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Bloom-ui is a public design system from the Koaris Project developed with React, Typescript, and Tailwind.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"type": "git",
|
|
26
26
|
"url": "https://github.com/guilhermesalviano/bloom-ui.git"
|
|
27
27
|
},
|
|
28
|
-
"license": "
|
|
28
|
+
"license": "GPL-3.0-only",
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@koaris/eslint-config": "*",
|
|
31
31
|
"@koaris/tokens": "*",
|