@koaris/bloom-ui 1.2.5 → 1.2.6
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/index.cjs +346 -81
- package/dist/index.d.cts +58 -19
- package/dist/index.d.ts +58 -19
- package/dist/index.mjs +348 -82
- package/package.json +1 -1
- package/tailwind.css +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2990,6 +2990,8 @@ var Input = forwardRef2(
|
|
|
2990
2990
|
return "password";
|
|
2991
2991
|
case "email":
|
|
2992
2992
|
return "email";
|
|
2993
|
+
case "datePicker":
|
|
2994
|
+
return "date";
|
|
2993
2995
|
case "date":
|
|
2994
2996
|
case "cpf":
|
|
2995
2997
|
case "phone":
|
|
@@ -3154,76 +3156,205 @@ TextInput.displayName = "TextInput";
|
|
|
3154
3156
|
// src/components/TextArea/index.tsx
|
|
3155
3157
|
import {
|
|
3156
3158
|
useEffect as useEffect3,
|
|
3157
|
-
useState as useState5
|
|
3159
|
+
useState as useState5,
|
|
3160
|
+
forwardRef as forwardRef4
|
|
3158
3161
|
} from "react";
|
|
3159
|
-
import { jsx as jsx8 } from "react/jsx-runtime";
|
|
3160
|
-
var TextArea = (
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
|
|
3173
|
-
|
|
3174
|
-
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3185
|
-
},
|
|
3186
|
-
|
|
3187
|
-
"
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3162
|
+
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
3163
|
+
var TextArea = forwardRef4(
|
|
3164
|
+
({
|
|
3165
|
+
className,
|
|
3166
|
+
disabled,
|
|
3167
|
+
placeholder,
|
|
3168
|
+
value,
|
|
3169
|
+
validated,
|
|
3170
|
+
error,
|
|
3171
|
+
required,
|
|
3172
|
+
resize = "vertical",
|
|
3173
|
+
type = "text",
|
|
3174
|
+
onClick,
|
|
3175
|
+
errorMessage,
|
|
3176
|
+
onChange: externalOnChange,
|
|
3177
|
+
label,
|
|
3178
|
+
helperText,
|
|
3179
|
+
id,
|
|
3180
|
+
maxLength,
|
|
3181
|
+
minRows = 3,
|
|
3182
|
+
maxRows = 8,
|
|
3183
|
+
size = "md",
|
|
3184
|
+
variant = "primary",
|
|
3185
|
+
showCount = false,
|
|
3186
|
+
autoGrow = false,
|
|
3187
|
+
...rest
|
|
3188
|
+
}, ref) => {
|
|
3189
|
+
const [selected, setSelected] = useState5(false);
|
|
3190
|
+
const [inputValue, setInputValue] = useState5(value || "");
|
|
3191
|
+
const [isValid, setIsValid] = useState5(true);
|
|
3192
|
+
const [rows, setRows] = useState5(minRows);
|
|
3193
|
+
const sizeStyles = {
|
|
3194
|
+
sm: "px-2 py-1 text-sm",
|
|
3195
|
+
md: "px-3 py-2 text-base",
|
|
3196
|
+
lg: "px-4 py-3 text-lg"
|
|
3197
|
+
};
|
|
3198
|
+
const variantStyles = {
|
|
3199
|
+
primary: "border-gray-400 focus:border-orange-500",
|
|
3200
|
+
secondary: "border-neutral-500 bg-neutral-100 focus:border-orange-500",
|
|
3201
|
+
outline: "border-gray-300 bg-transparent focus:border-orange-500"
|
|
3202
|
+
};
|
|
3203
|
+
const resizeStyles = {
|
|
3204
|
+
none: "resize-none",
|
|
3205
|
+
vertical: "resize-y",
|
|
3206
|
+
horizontal: "resize-x",
|
|
3207
|
+
both: "resize"
|
|
3208
|
+
};
|
|
3209
|
+
const handleFocus = () => {
|
|
3210
|
+
setSelected(true);
|
|
3211
|
+
};
|
|
3212
|
+
const handleBlur = () => {
|
|
3213
|
+
setSelected(false);
|
|
3214
|
+
validateInput(inputValue);
|
|
3215
|
+
};
|
|
3216
|
+
const validateInput = (value2) => {
|
|
3217
|
+
if (required && (!value2 || value2.trim().length === 0)) {
|
|
3218
|
+
setIsValid(false);
|
|
3219
|
+
return false;
|
|
3220
|
+
}
|
|
3221
|
+
if (maxLength && value2.length > maxLength) {
|
|
3222
|
+
setIsValid(false);
|
|
3223
|
+
return false;
|
|
3224
|
+
}
|
|
3225
|
+
if (type === "json" && value2.trim().length > 0) {
|
|
3226
|
+
try {
|
|
3227
|
+
JSON.parse(value2);
|
|
3228
|
+
setIsValid(true);
|
|
3229
|
+
return true;
|
|
3230
|
+
} catch (e) {
|
|
3231
|
+
setIsValid(false);
|
|
3232
|
+
return false;
|
|
3233
|
+
}
|
|
3234
|
+
}
|
|
3235
|
+
setIsValid(true);
|
|
3236
|
+
return true;
|
|
3237
|
+
};
|
|
3238
|
+
const handleInput = (event) => {
|
|
3239
|
+
const newValue = event.currentTarget.value;
|
|
3240
|
+
setInputValue(newValue);
|
|
3241
|
+
validateInput(newValue);
|
|
3242
|
+
if (autoGrow) {
|
|
3243
|
+
const textareaLineHeight = 24;
|
|
3244
|
+
const newRows = Math.max(
|
|
3245
|
+
minRows,
|
|
3246
|
+
Math.min(
|
|
3247
|
+
maxRows,
|
|
3248
|
+
Math.floor(event.currentTarget.scrollHeight / textareaLineHeight)
|
|
3249
|
+
)
|
|
3250
|
+
);
|
|
3251
|
+
setRows(newRows);
|
|
3252
|
+
}
|
|
3253
|
+
if (externalOnChange) {
|
|
3254
|
+
externalOnChange(event);
|
|
3255
|
+
}
|
|
3256
|
+
};
|
|
3257
|
+
useEffect3(() => {
|
|
3258
|
+
setInputValue(value || "");
|
|
3259
|
+
if (value) {
|
|
3260
|
+
validateInput(value);
|
|
3261
|
+
}
|
|
3262
|
+
}, [value, required, maxLength]);
|
|
3263
|
+
const characterCount = inputValue?.length || 0;
|
|
3264
|
+
const hasMaxLength = maxLength !== void 0 && maxLength > 0;
|
|
3265
|
+
const isOverLimit = hasMaxLength && characterCount > maxLength;
|
|
3266
|
+
const textareaClasses = twMerge(
|
|
3267
|
+
"w-full border-2 rounded-sm focus:outline-none transition-all duration-200",
|
|
3268
|
+
"hover:shadow-md hover:shadow-neutral-500",
|
|
3269
|
+
sizeStyles[size],
|
|
3270
|
+
variantStyles[variant],
|
|
3271
|
+
resizeStyles[resize],
|
|
3272
|
+
disabled && "opacity-50 cursor-not-allowed",
|
|
3273
|
+
selected && "border-orange-500",
|
|
3274
|
+
validated && isValid && "border-green-500",
|
|
3275
|
+
(error || !isValid && inputValue !== "") && "border-red-900",
|
|
3276
|
+
className
|
|
3277
|
+
);
|
|
3278
|
+
return /* @__PURE__ */ jsxs7("div", { className: "w-full", children: [
|
|
3279
|
+
label && /* @__PURE__ */ jsxs7(
|
|
3280
|
+
"label",
|
|
3281
|
+
{
|
|
3282
|
+
htmlFor: id,
|
|
3283
|
+
className: "block text-sm font-medium text-gray-700 mb-1",
|
|
3284
|
+
children: [
|
|
3285
|
+
label,
|
|
3286
|
+
required && /* @__PURE__ */ jsx8("span", { className: "text-red-500 ml-1", children: "*" })
|
|
3287
|
+
]
|
|
3288
|
+
}
|
|
3200
3289
|
),
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3290
|
+
/* @__PURE__ */ jsx8(
|
|
3291
|
+
"textarea",
|
|
3292
|
+
{
|
|
3293
|
+
ref,
|
|
3294
|
+
id,
|
|
3295
|
+
rows,
|
|
3296
|
+
disabled,
|
|
3297
|
+
required,
|
|
3298
|
+
className: textareaClasses,
|
|
3299
|
+
onClick,
|
|
3300
|
+
onFocus: handleFocus,
|
|
3301
|
+
onChange: handleInput,
|
|
3302
|
+
onBlur: handleBlur,
|
|
3303
|
+
placeholder,
|
|
3304
|
+
value: inputValue,
|
|
3305
|
+
maxLength: hasMaxLength && !showCount ? maxLength : void 0,
|
|
3306
|
+
"aria-invalid": error || !isValid,
|
|
3307
|
+
"aria-describedby": error || !isValid ? `${id}-error` : helperText ? `${id}-helper` : void 0,
|
|
3308
|
+
...rest
|
|
3309
|
+
}
|
|
3310
|
+
),
|
|
3311
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between mt-1", children: [
|
|
3312
|
+
(error || !isValid && inputValue !== "") && /* @__PURE__ */ jsx8("p", { id: `${id}-error`, className: "text-sm text-red-900", role: "alert", children: errorMessage || "This field is invalid." }),
|
|
3313
|
+
helperText && isValid && !error && /* @__PURE__ */ jsx8("p", { id: `${id}-helper`, className: "text-sm text-gray-500", children: helperText }),
|
|
3314
|
+
showCount && hasMaxLength && /* @__PURE__ */ jsxs7(
|
|
3315
|
+
"p",
|
|
3316
|
+
{
|
|
3317
|
+
className: `text-sm ml-auto ${isOverLimit ? "text-red-600" : "text-gray-500"}`,
|
|
3318
|
+
children: [
|
|
3319
|
+
characterCount,
|
|
3320
|
+
"/",
|
|
3321
|
+
maxLength
|
|
3322
|
+
]
|
|
3323
|
+
}
|
|
3324
|
+
)
|
|
3325
|
+
] })
|
|
3326
|
+
] });
|
|
3327
|
+
}
|
|
3328
|
+
);
|
|
3329
|
+
TextArea.displayName = "TextArea";
|
|
3211
3330
|
|
|
3212
3331
|
// src/components/Text/index.tsx
|
|
3213
3332
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
3214
3333
|
var Text = ({
|
|
3215
3334
|
children,
|
|
3216
|
-
color = "neutral
|
|
3335
|
+
color = "neutral",
|
|
3336
|
+
colorShade = "800",
|
|
3217
3337
|
size = "md",
|
|
3218
3338
|
tag = "p",
|
|
3339
|
+
weight = "normal",
|
|
3340
|
+
tracking = "normal",
|
|
3341
|
+
leading = "normal",
|
|
3342
|
+
alignment = "left",
|
|
3343
|
+
truncate = false,
|
|
3344
|
+
italic = false,
|
|
3345
|
+
uppercase = false,
|
|
3346
|
+
lowercase = false,
|
|
3347
|
+
capitalize = false,
|
|
3219
3348
|
className,
|
|
3220
3349
|
...rest
|
|
3221
3350
|
}) => {
|
|
3222
3351
|
const fontSize = {
|
|
3223
|
-
xxs: "text-
|
|
3352
|
+
xxs: "text-xs",
|
|
3353
|
+
// fallback to xs since xxs isn't standard in Tailwind
|
|
3224
3354
|
xs: "text-xs",
|
|
3225
3355
|
sm: "text-sm",
|
|
3226
|
-
md: "text-
|
|
3356
|
+
md: "text-base",
|
|
3357
|
+
// fixed from 'text-md' to 'text-base'
|
|
3227
3358
|
lg: "text-lg",
|
|
3228
3359
|
xl: "text-xl",
|
|
3229
3360
|
"2xl": "text-2xl",
|
|
@@ -3235,22 +3366,88 @@ var Text = ({
|
|
|
3235
3366
|
"8xl": "text-8xl",
|
|
3236
3367
|
"9xl": "text-9xl"
|
|
3237
3368
|
}[size];
|
|
3369
|
+
const fontWeight = {
|
|
3370
|
+
thin: "font-thin",
|
|
3371
|
+
extralight: "font-extralight",
|
|
3372
|
+
light: "font-light",
|
|
3373
|
+
normal: "font-normal",
|
|
3374
|
+
medium: "font-medium",
|
|
3375
|
+
semibold: "font-semibold",
|
|
3376
|
+
bold: "font-bold",
|
|
3377
|
+
extrabold: "font-extrabold",
|
|
3378
|
+
black: "font-black"
|
|
3379
|
+
}[weight];
|
|
3380
|
+
const letterTracking = {
|
|
3381
|
+
tighter: "tracking-tighter",
|
|
3382
|
+
tight: "tracking-tight",
|
|
3383
|
+
normal: "tracking-normal",
|
|
3384
|
+
wide: "tracking-wide",
|
|
3385
|
+
wider: "tracking-wider",
|
|
3386
|
+
widest: "tracking-widest"
|
|
3387
|
+
}[tracking];
|
|
3388
|
+
const lineHeight = {
|
|
3389
|
+
none: "leading-none",
|
|
3390
|
+
tight: "leading-tight",
|
|
3391
|
+
snug: "leading-snug",
|
|
3392
|
+
normal: "leading-normal",
|
|
3393
|
+
relaxed: "leading-relaxed",
|
|
3394
|
+
loose: "leading-loose"
|
|
3395
|
+
}[leading];
|
|
3396
|
+
const textAlignment = {
|
|
3397
|
+
left: "text-left",
|
|
3398
|
+
center: "text-center",
|
|
3399
|
+
right: "text-right",
|
|
3400
|
+
justify: "text-justify"
|
|
3401
|
+
}[alignment];
|
|
3402
|
+
const colorClass = `text-${color}-${colorShade}`;
|
|
3403
|
+
const truncateClass = truncate ? "truncate" : "";
|
|
3404
|
+
const italicClass = italic ? "italic" : "";
|
|
3405
|
+
let transformClass = "";
|
|
3406
|
+
if (uppercase) transformClass = "uppercase";
|
|
3407
|
+
else if (lowercase) transformClass = "lowercase";
|
|
3408
|
+
else if (capitalize) transformClass = "capitalize";
|
|
3238
3409
|
const Tag = tag;
|
|
3239
|
-
return /* @__PURE__ */ jsx9(
|
|
3410
|
+
return /* @__PURE__ */ jsx9(
|
|
3411
|
+
Tag,
|
|
3412
|
+
{
|
|
3413
|
+
className: twMerge(
|
|
3414
|
+
colorClass,
|
|
3415
|
+
fontSize,
|
|
3416
|
+
fontWeight,
|
|
3417
|
+
letterTracking,
|
|
3418
|
+
lineHeight,
|
|
3419
|
+
textAlignment,
|
|
3420
|
+
truncateClass,
|
|
3421
|
+
italicClass,
|
|
3422
|
+
transformClass,
|
|
3423
|
+
className
|
|
3424
|
+
),
|
|
3425
|
+
...rest,
|
|
3426
|
+
children
|
|
3427
|
+
}
|
|
3428
|
+
);
|
|
3240
3429
|
};
|
|
3430
|
+
Text.displayName = "Text";
|
|
3241
3431
|
|
|
3242
3432
|
// src/components/Heading/index.tsx
|
|
3243
3433
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
3244
3434
|
var Heading = ({
|
|
3245
3435
|
children,
|
|
3246
|
-
color = "neutral
|
|
3436
|
+
color = "neutral",
|
|
3437
|
+
colorShade = "800",
|
|
3247
3438
|
size = "lg",
|
|
3248
3439
|
tag = "h2",
|
|
3249
|
-
|
|
3440
|
+
weight = "bold",
|
|
3441
|
+
tracking = "normal",
|
|
3442
|
+
alignment = "left",
|
|
3443
|
+
truncate = false,
|
|
3444
|
+
uppercase = false,
|
|
3445
|
+
className,
|
|
3446
|
+
...rest
|
|
3250
3447
|
}) => {
|
|
3251
3448
|
const fontSize = {
|
|
3252
3449
|
sm: "text-sm",
|
|
3253
|
-
md: "text-
|
|
3450
|
+
md: "text-base",
|
|
3254
3451
|
lg: "text-lg",
|
|
3255
3452
|
xl: "text-xl",
|
|
3256
3453
|
"2xl": "text-2xl",
|
|
@@ -3262,32 +3459,101 @@ var Heading = ({
|
|
|
3262
3459
|
"8xl": "text-8xl",
|
|
3263
3460
|
"9xl": "text-9xl"
|
|
3264
3461
|
}[size];
|
|
3462
|
+
const fontWeight = {
|
|
3463
|
+
normal: "font-normal",
|
|
3464
|
+
medium: "font-medium",
|
|
3465
|
+
semibold: "font-semibold",
|
|
3466
|
+
bold: "font-bold",
|
|
3467
|
+
extrabold: "font-extrabold"
|
|
3468
|
+
}[weight];
|
|
3469
|
+
const letterTracking = {
|
|
3470
|
+
tighter: "tracking-tighter",
|
|
3471
|
+
tight: "tracking-tight",
|
|
3472
|
+
normal: "tracking-normal",
|
|
3473
|
+
wide: "tracking-wide",
|
|
3474
|
+
wider: "tracking-wider",
|
|
3475
|
+
widest: "tracking-widest"
|
|
3476
|
+
}[tracking];
|
|
3477
|
+
const textAlignment = {
|
|
3478
|
+
left: "text-left",
|
|
3479
|
+
center: "text-center",
|
|
3480
|
+
right: "text-right"
|
|
3481
|
+
}[alignment];
|
|
3482
|
+
const colorClass = `text-${color}-${colorShade}`;
|
|
3483
|
+
const truncateClass = truncate ? "truncate" : "";
|
|
3484
|
+
const uppercaseClass = uppercase ? "uppercase" : "";
|
|
3265
3485
|
const Tag = tag;
|
|
3266
|
-
return /* @__PURE__ */ jsx10(
|
|
3486
|
+
return /* @__PURE__ */ jsx10(
|
|
3487
|
+
Tag,
|
|
3488
|
+
{
|
|
3489
|
+
className: twMerge(
|
|
3490
|
+
colorClass,
|
|
3491
|
+
fontSize,
|
|
3492
|
+
fontWeight,
|
|
3493
|
+
letterTracking,
|
|
3494
|
+
textAlignment,
|
|
3495
|
+
truncateClass,
|
|
3496
|
+
uppercaseClass,
|
|
3497
|
+
className
|
|
3498
|
+
),
|
|
3499
|
+
...rest,
|
|
3500
|
+
children
|
|
3501
|
+
}
|
|
3502
|
+
);
|
|
3267
3503
|
};
|
|
3268
3504
|
|
|
3269
3505
|
// src/components/Box/index.tsx
|
|
3506
|
+
import { forwardRef as forwardRef5 } from "react";
|
|
3270
3507
|
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
3271
|
-
var Box = ({
|
|
3508
|
+
var Box = forwardRef5(({
|
|
3272
3509
|
className,
|
|
3273
3510
|
children,
|
|
3274
3511
|
tag = "div",
|
|
3275
|
-
variant = "secondary"
|
|
3276
|
-
|
|
3512
|
+
variant = "secondary",
|
|
3513
|
+
size = "md",
|
|
3514
|
+
elevated = false,
|
|
3515
|
+
hasBorder = true,
|
|
3516
|
+
isInteractive = false,
|
|
3517
|
+
fullWidth = false,
|
|
3518
|
+
...props
|
|
3519
|
+
}, ref) => {
|
|
3277
3520
|
const Tag = tag;
|
|
3521
|
+
const variantStyles = {
|
|
3522
|
+
primary: "text-neutral-800 bg-neutral-200 border-neutral-300",
|
|
3523
|
+
secondary: "text-neutral-200 bg-neutral-600 border-neutral-800",
|
|
3524
|
+
ghost: "text-neutral-800 bg-transparent border-transparent",
|
|
3525
|
+
outline: "text-neutral-800 bg-transparent border-neutral-300"
|
|
3526
|
+
};
|
|
3527
|
+
const sizeStyles = {
|
|
3528
|
+
sm: "p-3 text-sm",
|
|
3529
|
+
md: "p-6 text-base",
|
|
3530
|
+
lg: "p-8 text-lg",
|
|
3531
|
+
xl: "p-10 text-xl"
|
|
3532
|
+
};
|
|
3533
|
+
const elevationStyles = elevated ? "shadow-md hover:shadow-lg transition-shadow duration-200" : "";
|
|
3534
|
+
const borderStyles = hasBorder ? "border" : "border-0";
|
|
3535
|
+
const interactiveStyles = isInteractive ? "cursor-pointer hover:brightness-105 active:brightness-95 transition-all duration-200" : "";
|
|
3536
|
+
const widthStyles = fullWidth ? "w-full" : "";
|
|
3278
3537
|
return /* @__PURE__ */ jsx11(
|
|
3279
3538
|
Tag,
|
|
3280
3539
|
{
|
|
3540
|
+
ref,
|
|
3281
3541
|
className: twMerge(
|
|
3282
|
-
"
|
|
3283
|
-
|
|
3284
|
-
|
|
3542
|
+
"rounded-md",
|
|
3543
|
+
borderStyles,
|
|
3544
|
+
sizeStyles[size],
|
|
3545
|
+
variantStyles[variant],
|
|
3546
|
+
elevationStyles,
|
|
3547
|
+
interactiveStyles,
|
|
3548
|
+
widthStyles,
|
|
3285
3549
|
className
|
|
3286
3550
|
),
|
|
3551
|
+
...props,
|
|
3287
3552
|
children
|
|
3288
3553
|
}
|
|
3289
3554
|
);
|
|
3290
|
-
};
|
|
3555
|
+
});
|
|
3556
|
+
Box.displayName = "Box";
|
|
3291
3557
|
|
|
3292
3558
|
// src/components/Form/index.tsx
|
|
3293
3559
|
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
@@ -3333,10 +3599,10 @@ var Avatar = ({ className, ...rest }) => {
|
|
|
3333
3599
|
};
|
|
3334
3600
|
|
|
3335
3601
|
// src/components/MultiStep/index.tsx
|
|
3336
|
-
import { jsx as jsx14, jsxs as
|
|
3602
|
+
import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3337
3603
|
var MultiStep = ({ className, size, currentStep }) => {
|
|
3338
|
-
return /* @__PURE__ */
|
|
3339
|
-
/* @__PURE__ */ jsx14(Text, { tag: "label", color: "
|
|
3604
|
+
return /* @__PURE__ */ jsxs8("div", { className: "w-full", children: [
|
|
3605
|
+
/* @__PURE__ */ jsx14(Text, { tag: "label", color: "primary", size: "xs", children: `Passo ${currentStep} de ${size}` }),
|
|
3340
3606
|
/* @__PURE__ */ jsx14("div", { className: `grid gap-2 grid-cols-${size} grid-flow-col mt-1`, children: Array.from(Array(size).keys()).map((_, index) => {
|
|
3341
3607
|
return /* @__PURE__ */ jsx14(
|
|
3342
3608
|
"div",
|
|
@@ -3354,7 +3620,7 @@ var MultiStep = ({ className, size, currentStep }) => {
|
|
|
3354
3620
|
};
|
|
3355
3621
|
|
|
3356
3622
|
// src/components/Toggle/index.tsx
|
|
3357
|
-
import { jsx as jsx15, jsxs as
|
|
3623
|
+
import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3358
3624
|
var Toggle = ({
|
|
3359
3625
|
className,
|
|
3360
3626
|
disabled,
|
|
@@ -3393,7 +3659,7 @@ var Toggle = ({
|
|
|
3393
3659
|
}
|
|
3394
3660
|
}
|
|
3395
3661
|
};
|
|
3396
|
-
return /* @__PURE__ */
|
|
3662
|
+
return /* @__PURE__ */ jsxs9(
|
|
3397
3663
|
"div",
|
|
3398
3664
|
{
|
|
3399
3665
|
className: twMerge("flex items-center gap-3", className),
|
|
@@ -3474,7 +3740,7 @@ var Skeleton = ({
|
|
|
3474
3740
|
Skeleton.displayName = "Skeleton";
|
|
3475
3741
|
|
|
3476
3742
|
// src/components/Loading/index.tsx
|
|
3477
|
-
import { jsx as jsx17, jsxs as
|
|
3743
|
+
import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3478
3744
|
var Loading = ({
|
|
3479
3745
|
size = "md",
|
|
3480
3746
|
color = "primary",
|
|
@@ -3502,7 +3768,7 @@ var Loading = ({
|
|
|
3502
3768
|
md: "text-base",
|
|
3503
3769
|
lg: "text-lg"
|
|
3504
3770
|
};
|
|
3505
|
-
return /* @__PURE__ */
|
|
3771
|
+
return /* @__PURE__ */ jsxs10(
|
|
3506
3772
|
"div",
|
|
3507
3773
|
{
|
|
3508
3774
|
className: twMerge(
|
|
@@ -3512,7 +3778,7 @@ var Loading = ({
|
|
|
3512
3778
|
),
|
|
3513
3779
|
role: "status",
|
|
3514
3780
|
children: [
|
|
3515
|
-
/* @__PURE__ */
|
|
3781
|
+
/* @__PURE__ */ jsxs10(
|
|
3516
3782
|
"svg",
|
|
3517
3783
|
{
|
|
3518
3784
|
className: twMerge(
|
|
@@ -3560,7 +3826,7 @@ Loading.displayName = "Loading";
|
|
|
3560
3826
|
|
|
3561
3827
|
// src/components/Modal/index.tsx
|
|
3562
3828
|
import { useEffect as useEffect4, useState as useState6, useRef } from "react";
|
|
3563
|
-
import { jsx as jsx18, jsxs as
|
|
3829
|
+
import { jsx as jsx18, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3564
3830
|
var Modal = ({
|
|
3565
3831
|
className,
|
|
3566
3832
|
isOpen,
|
|
@@ -3621,7 +3887,7 @@ var Modal = ({
|
|
|
3621
3887
|
"aria-modal": "true",
|
|
3622
3888
|
role: "dialog",
|
|
3623
3889
|
...rest,
|
|
3624
|
-
children: /* @__PURE__ */
|
|
3890
|
+
children: /* @__PURE__ */ jsxs11(
|
|
3625
3891
|
"div",
|
|
3626
3892
|
{
|
|
3627
3893
|
ref: modalRef,
|
|
@@ -3632,7 +3898,7 @@ var Modal = ({
|
|
|
3632
3898
|
className
|
|
3633
3899
|
),
|
|
3634
3900
|
children: [
|
|
3635
|
-
(title || showCloseButton) && /* @__PURE__ */
|
|
3901
|
+
(title || showCloseButton) && /* @__PURE__ */ jsxs11("div", { className: "flex items-center justify-between px-6 py-4 border-b border-gray-200 dark:border-gray-700", children: [
|
|
3636
3902
|
title && /* @__PURE__ */ jsx18("h3", { className: "text-lg font-medium text-gray-900 dark:text-gray-100", children: title }),
|
|
3637
3903
|
showCloseButton && /* @__PURE__ */ jsx18(
|
|
3638
3904
|
"button",
|
|
@@ -3656,7 +3922,7 @@ var Modal = ({
|
|
|
3656
3922
|
|
|
3657
3923
|
// src/components/Toast/index.tsx
|
|
3658
3924
|
import { useEffect as useEffect5, useState as useState7, useRef as useRef2 } from "react";
|
|
3659
|
-
import { Fragment, jsx as jsx19, jsxs as
|
|
3925
|
+
import { Fragment, jsx as jsx19, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3660
3926
|
var ToastService = class _ToastService {
|
|
3661
3927
|
constructor() {
|
|
3662
3928
|
this.listeners = /* @__PURE__ */ new Set();
|
|
@@ -3734,7 +4000,7 @@ var Toast = ({
|
|
|
3734
4000
|
warning: /* @__PURE__ */ jsx19("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx19("path", { fillRule: "evenodd", d: "M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z", clipRule: "evenodd" }) }),
|
|
3735
4001
|
info: /* @__PURE__ */ jsx19("svg", { className: "w-5 h-5", fill: "currentColor", viewBox: "0 0 20 20", children: /* @__PURE__ */ jsx19("path", { fillRule: "evenodd", d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z", clipRule: "evenodd" }) })
|
|
3736
4002
|
};
|
|
3737
|
-
return /* @__PURE__ */
|
|
4003
|
+
return /* @__PURE__ */ jsxs12(
|
|
3738
4004
|
"div",
|
|
3739
4005
|
{
|
|
3740
4006
|
className: twMerge(
|
|
@@ -3746,7 +4012,7 @@ var Toast = ({
|
|
|
3746
4012
|
role: "alert",
|
|
3747
4013
|
children: [
|
|
3748
4014
|
/* @__PURE__ */ jsx19("div", { className: `flex-shrink-0 mr-3 text-${variant}-500`, children: icons[variant] }),
|
|
3749
|
-
/* @__PURE__ */
|
|
4015
|
+
/* @__PURE__ */ jsxs12("div", { className: "flex-1", children: [
|
|
3750
4016
|
title && /* @__PURE__ */ jsx19("h3", { className: "font-medium text-sm", children: title }),
|
|
3751
4017
|
/* @__PURE__ */ jsx19("div", { className: "text-sm", children: message })
|
|
3752
4018
|
] }),
|
|
@@ -3813,7 +4079,7 @@ var useToast = () => {
|
|
|
3813
4079
|
};
|
|
3814
4080
|
};
|
|
3815
4081
|
var ToastProvider = ({ position = "top-right", children }) => {
|
|
3816
|
-
return /* @__PURE__ */
|
|
4082
|
+
return /* @__PURE__ */ jsxs12(Fragment, { children: [
|
|
3817
4083
|
children,
|
|
3818
4084
|
/* @__PURE__ */ jsx19(ToastContainer, { position })
|
|
3819
4085
|
] });
|
package/package.json
CHANGED