analytica-frontend-lib 1.0.58 → 1.0.60
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/Card/index.d.mts +10 -1
- package/dist/Card/index.d.ts +10 -1
- package/dist/Card/index.js +161 -53
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +160 -53
- package/dist/Card/index.mjs.map +1 -1
- package/dist/Skeleton/index.d.mts +39 -0
- package/dist/Skeleton/index.d.ts +39 -0
- package/dist/Skeleton/index.js +191 -0
- package/dist/Skeleton/index.js.map +1 -0
- package/dist/Skeleton/index.mjs +159 -0
- package/dist/Skeleton/index.mjs.map +1 -0
- package/dist/index.css +4521 -275
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +324 -53
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +316 -53
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +4521 -275
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -3959,6 +3959,58 @@ import {
|
|
|
3959
3959
|
XCircle as XCircle2
|
|
3960
3960
|
} from "phosphor-react";
|
|
3961
3961
|
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3962
|
+
var CARD_BASE_CLASSES = {
|
|
3963
|
+
default: "w-full bg-background border border-border-50 rounded-xl",
|
|
3964
|
+
compact: "w-full bg-background border border-border-50 rounded-lg",
|
|
3965
|
+
minimal: "w-full bg-background border border-border-100 rounded-md"
|
|
3966
|
+
};
|
|
3967
|
+
var CARD_PADDING_CLASSES = {
|
|
3968
|
+
none: "",
|
|
3969
|
+
small: "p-2",
|
|
3970
|
+
medium: "p-4",
|
|
3971
|
+
large: "p-6"
|
|
3972
|
+
};
|
|
3973
|
+
var CARD_MIN_HEIGHT_CLASSES = {
|
|
3974
|
+
none: "",
|
|
3975
|
+
small: "min-h-16",
|
|
3976
|
+
medium: "min-h-20",
|
|
3977
|
+
large: "min-h-24"
|
|
3978
|
+
};
|
|
3979
|
+
var CARD_LAYOUT_CLASSES = {
|
|
3980
|
+
horizontal: "flex flex-row",
|
|
3981
|
+
vertical: "flex flex-col"
|
|
3982
|
+
};
|
|
3983
|
+
var CARD_CURSOR_CLASSES = {
|
|
3984
|
+
default: "",
|
|
3985
|
+
pointer: "cursor-pointer"
|
|
3986
|
+
};
|
|
3987
|
+
var CardBase = forwardRef12(
|
|
3988
|
+
({
|
|
3989
|
+
children,
|
|
3990
|
+
variant = "default",
|
|
3991
|
+
layout = "horizontal",
|
|
3992
|
+
padding = "medium",
|
|
3993
|
+
minHeight = "medium",
|
|
3994
|
+
cursor = "default",
|
|
3995
|
+
className = "",
|
|
3996
|
+
...props
|
|
3997
|
+
}, ref) => {
|
|
3998
|
+
const baseClasses = CARD_BASE_CLASSES[variant];
|
|
3999
|
+
const paddingClasses = CARD_PADDING_CLASSES[padding];
|
|
4000
|
+
const minHeightClasses = CARD_MIN_HEIGHT_CLASSES[minHeight];
|
|
4001
|
+
const layoutClasses = CARD_LAYOUT_CLASSES[layout];
|
|
4002
|
+
const cursorClasses = CARD_CURSOR_CLASSES[cursor];
|
|
4003
|
+
const combinedClasses = [
|
|
4004
|
+
baseClasses,
|
|
4005
|
+
paddingClasses,
|
|
4006
|
+
minHeightClasses,
|
|
4007
|
+
layoutClasses,
|
|
4008
|
+
cursorClasses,
|
|
4009
|
+
className
|
|
4010
|
+
].filter(Boolean).join(" ");
|
|
4011
|
+
return /* @__PURE__ */ jsx26("div", { ref, className: combinedClasses, ...props, children });
|
|
4012
|
+
}
|
|
4013
|
+
);
|
|
3962
4014
|
var ACTION_CARD_CLASSES = {
|
|
3963
4015
|
warning: "bg-warning-background",
|
|
3964
4016
|
success: "bg-success-300",
|
|
@@ -4021,7 +4073,7 @@ var CardActivesResults = forwardRef12(
|
|
|
4021
4073
|
children: icon
|
|
4022
4074
|
}
|
|
4023
4075
|
),
|
|
4024
|
-
/* @__PURE__ */ jsx26("
|
|
4076
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "2xs", weight: "medium", className: "text-text-800 uppercase", children: title }),
|
|
4025
4077
|
/* @__PURE__ */ jsx26("p", { className: `text-lg font-bold ${actionSubTitleClasses}`, children: subTitle })
|
|
4026
4078
|
]
|
|
4027
4079
|
}
|
|
@@ -4054,13 +4106,13 @@ var CardQuestions = forwardRef12(
|
|
|
4054
4106
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
4055
4107
|
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
4056
4108
|
return /* @__PURE__ */ jsxs21(
|
|
4057
|
-
|
|
4109
|
+
CardBase,
|
|
4058
4110
|
{
|
|
4059
4111
|
ref,
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
`,
|
|
4112
|
+
layout: "horizontal",
|
|
4113
|
+
padding: "medium",
|
|
4114
|
+
minHeight: "medium",
|
|
4115
|
+
className: `justify-between gap-4 ${className}`,
|
|
4064
4116
|
...props,
|
|
4065
4117
|
children: [
|
|
4066
4118
|
/* @__PURE__ */ jsxs21("section", { className: "flex flex-col gap-1", children: [
|
|
@@ -4120,35 +4172,48 @@ var CardProgress = forwardRef12(
|
|
|
4120
4172
|
/* @__PURE__ */ jsx26("p", { className: "text-text-600", children: endDate })
|
|
4121
4173
|
] })
|
|
4122
4174
|
] }),
|
|
4123
|
-
/* @__PURE__ */
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4175
|
+
/* @__PURE__ */ jsxs21("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4176
|
+
/* @__PURE__ */ jsx26(
|
|
4177
|
+
ProgressBar_default,
|
|
4178
|
+
{
|
|
4179
|
+
size: "small",
|
|
4180
|
+
value: progress,
|
|
4181
|
+
"data-testid": "progress-bar"
|
|
4182
|
+
}
|
|
4183
|
+
),
|
|
4184
|
+
/* @__PURE__ */ jsxs21(
|
|
4185
|
+
Text_default,
|
|
4186
|
+
{
|
|
4187
|
+
size: "xs",
|
|
4188
|
+
weight: "medium",
|
|
4189
|
+
className: `text-text-950 leading-none tracking-normal text-center flex-none`,
|
|
4190
|
+
children: [
|
|
4191
|
+
Math.round(progress),
|
|
4192
|
+
"%"
|
|
4193
|
+
]
|
|
4194
|
+
}
|
|
4195
|
+
)
|
|
4196
|
+
] })
|
|
4132
4197
|
] }),
|
|
4133
4198
|
vertical: /* @__PURE__ */ jsx26("p", { className: "text-sm text-text-800", children: subhead })
|
|
4134
4199
|
};
|
|
4135
4200
|
return /* @__PURE__ */ jsxs21(
|
|
4136
|
-
|
|
4201
|
+
CardBase,
|
|
4137
4202
|
{
|
|
4138
4203
|
ref,
|
|
4139
|
-
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
`,
|
|
4204
|
+
layout: isHorizontal ? "horizontal" : "vertical",
|
|
4205
|
+
padding: "none",
|
|
4206
|
+
minHeight: "medium",
|
|
4207
|
+
cursor: "pointer",
|
|
4208
|
+
className: `${isHorizontal ? "h-20" : ""} ${className}`,
|
|
4144
4209
|
...props,
|
|
4145
4210
|
children: [
|
|
4146
4211
|
/* @__PURE__ */ jsx26(
|
|
4147
4212
|
"div",
|
|
4148
4213
|
{
|
|
4149
4214
|
className: `
|
|
4150
|
-
flex justify-center items-center [&>svg]:size-
|
|
4151
|
-
${isHorizontal ? "w-
|
|
4215
|
+
flex justify-center items-center [&>svg]:size-6 text-text-950
|
|
4216
|
+
${isHorizontal ? "min-w-[80px] min-h-[80px] rounded-l-xl" : "min-h-[50px] w-full rounded-t-xl"}
|
|
4152
4217
|
`,
|
|
4153
4218
|
style: {
|
|
4154
4219
|
backgroundColor: color
|
|
@@ -4164,7 +4229,7 @@ var CardProgress = forwardRef12(
|
|
|
4164
4229
|
${!isHorizontal && "gap-4"}
|
|
4165
4230
|
`,
|
|
4166
4231
|
children: [
|
|
4167
|
-
/* @__PURE__ */ jsx26(
|
|
4232
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: header }),
|
|
4168
4233
|
contentComponent[direction]
|
|
4169
4234
|
]
|
|
4170
4235
|
}
|
|
@@ -4184,18 +4249,43 @@ var CardTopic = forwardRef12(
|
|
|
4184
4249
|
...props
|
|
4185
4250
|
}, ref) => {
|
|
4186
4251
|
return /* @__PURE__ */ jsxs21(
|
|
4187
|
-
|
|
4252
|
+
CardBase,
|
|
4188
4253
|
{
|
|
4189
4254
|
ref,
|
|
4190
|
-
|
|
4255
|
+
layout: "vertical",
|
|
4256
|
+
padding: "small",
|
|
4257
|
+
minHeight: "medium",
|
|
4258
|
+
cursor: "pointer",
|
|
4259
|
+
className: `justify-center gap-2 py-2 px-4 ${className}`,
|
|
4191
4260
|
...props,
|
|
4192
4261
|
children: [
|
|
4193
4262
|
subHead && /* @__PURE__ */ jsx26("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4194
4263
|
/* @__PURE__ */ jsx26("p", { children: text }),
|
|
4195
4264
|
index < subHead.length - 1 && /* @__PURE__ */ jsx26("p", { children: "\u2022" })
|
|
4196
4265
|
] }, `${text} - ${index}`)) }),
|
|
4197
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4198
|
-
/* @__PURE__ */
|
|
4266
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm text-text-950 font-bold", children: header }),
|
|
4267
|
+
/* @__PURE__ */ jsxs21("span", { className: "grid grid-cols-[1fr_auto] items-center gap-2", children: [
|
|
4268
|
+
/* @__PURE__ */ jsx26(
|
|
4269
|
+
ProgressBar_default,
|
|
4270
|
+
{
|
|
4271
|
+
size: "small",
|
|
4272
|
+
value: progress,
|
|
4273
|
+
"data-testid": "progress-bar"
|
|
4274
|
+
}
|
|
4275
|
+
),
|
|
4276
|
+
showPercentage && /* @__PURE__ */ jsxs21(
|
|
4277
|
+
Text_default,
|
|
4278
|
+
{
|
|
4279
|
+
size: "xs",
|
|
4280
|
+
weight: "medium",
|
|
4281
|
+
className: `text-text-950 leading-none tracking-normal text-center flex-none`,
|
|
4282
|
+
children: [
|
|
4283
|
+
Math.round(progress),
|
|
4284
|
+
"%"
|
|
4285
|
+
]
|
|
4286
|
+
}
|
|
4287
|
+
)
|
|
4288
|
+
] })
|
|
4199
4289
|
]
|
|
4200
4290
|
}
|
|
4201
4291
|
);
|
|
@@ -4213,15 +4303,18 @@ var CardPerformance = forwardRef12(
|
|
|
4213
4303
|
}, ref) => {
|
|
4214
4304
|
const hasProgress = progress !== void 0;
|
|
4215
4305
|
return /* @__PURE__ */ jsxs21(
|
|
4216
|
-
|
|
4306
|
+
CardBase,
|
|
4217
4307
|
{
|
|
4218
4308
|
ref,
|
|
4219
|
-
|
|
4309
|
+
layout: "horizontal",
|
|
4310
|
+
padding: "medium",
|
|
4311
|
+
minHeight: "large",
|
|
4312
|
+
className: `justify-between gap-2 ${className}`,
|
|
4220
4313
|
...props,
|
|
4221
4314
|
children: [
|
|
4222
4315
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4223
4316
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4224
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4317
|
+
/* @__PURE__ */ jsx26("p", { className: "text-lg font-bold text-text-950", children: header }),
|
|
4225
4318
|
hasProgress && /* @__PURE__ */ jsx26(
|
|
4226
4319
|
Button_default,
|
|
4227
4320
|
{
|
|
@@ -4260,13 +4353,13 @@ var CardResults = forwardRef12(
|
|
|
4260
4353
|
}, ref) => {
|
|
4261
4354
|
const isRow = direction == "row";
|
|
4262
4355
|
return /* @__PURE__ */ jsxs21(
|
|
4263
|
-
|
|
4356
|
+
CardBase,
|
|
4264
4357
|
{
|
|
4265
4358
|
ref,
|
|
4266
|
-
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
`,
|
|
4359
|
+
layout: "horizontal",
|
|
4360
|
+
padding: "none",
|
|
4361
|
+
minHeight: "medium",
|
|
4362
|
+
className: `items-center pr-4 ${className}`,
|
|
4270
4363
|
...props,
|
|
4271
4364
|
children: [
|
|
4272
4365
|
/* @__PURE__ */ jsx26(
|
|
@@ -4289,7 +4382,7 @@ var CardResults = forwardRef12(
|
|
|
4289
4382
|
${isRow ? "flex-row items-center" : "flex-col"}
|
|
4290
4383
|
`,
|
|
4291
4384
|
children: [
|
|
4292
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4385
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm font-bold text-text-950", children: header }),
|
|
4293
4386
|
/* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4294
4387
|
/* @__PURE__ */ jsxs21(
|
|
4295
4388
|
Badge_default,
|
|
@@ -4330,13 +4423,13 @@ var CardResults = forwardRef12(
|
|
|
4330
4423
|
var CardStatus = forwardRef12(
|
|
4331
4424
|
({ header, className, status, ...props }, ref) => {
|
|
4332
4425
|
return /* @__PURE__ */ jsxs21(
|
|
4333
|
-
|
|
4426
|
+
CardBase,
|
|
4334
4427
|
{
|
|
4335
4428
|
ref,
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4339
|
-
`,
|
|
4429
|
+
layout: "horizontal",
|
|
4430
|
+
padding: "none",
|
|
4431
|
+
minHeight: "medium",
|
|
4432
|
+
className: `items-center pr-4 ${className}`,
|
|
4340
4433
|
...props,
|
|
4341
4434
|
children: [
|
|
4342
4435
|
/* @__PURE__ */ jsxs21(
|
|
@@ -4346,7 +4439,7 @@ var CardStatus = forwardRef12(
|
|
|
4346
4439
|
p-4 flex justify-between w-full h-full flex-row items-center
|
|
4347
4440
|
`,
|
|
4348
4441
|
children: [
|
|
4349
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4442
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm font-bold text-text-950", children: header }),
|
|
4350
4443
|
status && /* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4351
4444
|
/* @__PURE__ */ jsx26(
|
|
4352
4445
|
Badge_default,
|
|
@@ -4372,14 +4465,17 @@ var CardStatus = forwardRef12(
|
|
|
4372
4465
|
var CardSettings = forwardRef12(
|
|
4373
4466
|
({ header, className, icon, ...props }, ref) => {
|
|
4374
4467
|
return /* @__PURE__ */ jsxs21(
|
|
4375
|
-
|
|
4468
|
+
CardBase,
|
|
4376
4469
|
{
|
|
4377
4470
|
ref,
|
|
4378
|
-
|
|
4471
|
+
layout: "horizontal",
|
|
4472
|
+
padding: "small",
|
|
4473
|
+
minHeight: "none",
|
|
4474
|
+
className: `border-none items-center gap-2 text-text-700 ${className}`,
|
|
4379
4475
|
...props,
|
|
4380
4476
|
children: [
|
|
4381
4477
|
/* @__PURE__ */ jsx26("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4382
|
-
/* @__PURE__ */ jsx26("p", { className: "w-full text-
|
|
4478
|
+
/* @__PURE__ */ jsx26("p", { className: "w-full text-sm", children: header }),
|
|
4383
4479
|
/* @__PURE__ */ jsx26(CaretRight2, { size: 24, className: "cursor-pointer" })
|
|
4384
4480
|
]
|
|
4385
4481
|
}
|
|
@@ -4389,10 +4485,13 @@ var CardSettings = forwardRef12(
|
|
|
4389
4485
|
var CardSupport = forwardRef12(
|
|
4390
4486
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4391
4487
|
return /* @__PURE__ */ jsxs21(
|
|
4392
|
-
|
|
4488
|
+
CardBase,
|
|
4393
4489
|
{
|
|
4394
4490
|
ref,
|
|
4395
|
-
|
|
4491
|
+
layout: "horizontal",
|
|
4492
|
+
padding: "medium",
|
|
4493
|
+
minHeight: "none",
|
|
4494
|
+
className: `border-none items-center gap-2 text-text-700 ${className}`,
|
|
4396
4495
|
...props,
|
|
4397
4496
|
children: [
|
|
4398
4497
|
/* @__PURE__ */ jsxs21(
|
|
@@ -4402,7 +4501,7 @@ var CardSupport = forwardRef12(
|
|
|
4402
4501
|
w-full flex ${direction == "col" ? "flex-col" : "flex-row items-center"} gap-2
|
|
4403
4502
|
`,
|
|
4404
4503
|
children: [
|
|
4405
|
-
/* @__PURE__ */ jsx26("span", { className: "w-full", children: /* @__PURE__ */ jsx26("p", { className: "text-
|
|
4504
|
+
/* @__PURE__ */ jsx26("span", { className: "w-full", children: /* @__PURE__ */ jsx26("p", { className: "text-sm text-text-950 font-bold", children: header }) }),
|
|
4406
4505
|
/* @__PURE__ */ jsx26("span", { className: "flex flex-row gap-1", children })
|
|
4407
4506
|
]
|
|
4408
4507
|
}
|
|
@@ -4428,10 +4527,14 @@ var CardForum = forwardRef12(
|
|
|
4428
4527
|
...props
|
|
4429
4528
|
}, ref) => {
|
|
4430
4529
|
return /* @__PURE__ */ jsxs21(
|
|
4431
|
-
|
|
4530
|
+
CardBase,
|
|
4432
4531
|
{
|
|
4433
4532
|
ref,
|
|
4434
|
-
|
|
4533
|
+
layout: "horizontal",
|
|
4534
|
+
padding: "medium",
|
|
4535
|
+
minHeight: "none",
|
|
4536
|
+
variant: "minimal",
|
|
4537
|
+
className: `w-auto h-auto gap-3 ${className}`,
|
|
4435
4538
|
...props,
|
|
4436
4539
|
children: [
|
|
4437
4540
|
/* @__PURE__ */ jsx26(
|
|
@@ -4558,10 +4661,13 @@ var CardAudio = forwardRef12(
|
|
|
4558
4661
|
return /* @__PURE__ */ jsx26(SpeakerHigh, {});
|
|
4559
4662
|
};
|
|
4560
4663
|
return /* @__PURE__ */ jsxs21(
|
|
4561
|
-
|
|
4664
|
+
CardBase,
|
|
4562
4665
|
{
|
|
4563
4666
|
ref,
|
|
4564
|
-
|
|
4667
|
+
layout: "horizontal",
|
|
4668
|
+
padding: "medium",
|
|
4669
|
+
minHeight: "none",
|
|
4670
|
+
className: `w-auto h-14 items-center gap-2 border-none ${className}`,
|
|
4565
4671
|
...props,
|
|
4566
4672
|
children: [
|
|
4567
4673
|
/* @__PURE__ */ jsx26(
|
|
@@ -4713,6 +4819,155 @@ var CardAudio = forwardRef12(
|
|
|
4713
4819
|
);
|
|
4714
4820
|
}
|
|
4715
4821
|
);
|
|
4822
|
+
|
|
4823
|
+
// src/components/Skeleton/Skeleton.tsx
|
|
4824
|
+
import { forwardRef as forwardRef13 } from "react";
|
|
4825
|
+
import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4826
|
+
var SKELETON_ANIMATION_CLASSES = {
|
|
4827
|
+
pulse: "animate-pulse",
|
|
4828
|
+
none: ""
|
|
4829
|
+
};
|
|
4830
|
+
var SKELETON_VARIANT_CLASSES = {
|
|
4831
|
+
text: "h-4 bg-background-200 rounded",
|
|
4832
|
+
circular: "bg-background-200 rounded-full",
|
|
4833
|
+
rectangular: "bg-background-200",
|
|
4834
|
+
rounded: "bg-background-200 rounded-lg"
|
|
4835
|
+
};
|
|
4836
|
+
var SPACING_CLASSES = {
|
|
4837
|
+
none: "",
|
|
4838
|
+
small: "space-y-1",
|
|
4839
|
+
medium: "space-y-2",
|
|
4840
|
+
large: "space-y-3"
|
|
4841
|
+
};
|
|
4842
|
+
var Skeleton = forwardRef13(
|
|
4843
|
+
({
|
|
4844
|
+
variant = "text",
|
|
4845
|
+
width,
|
|
4846
|
+
height,
|
|
4847
|
+
animation = "pulse",
|
|
4848
|
+
lines = 1,
|
|
4849
|
+
spacing = "none",
|
|
4850
|
+
className = "",
|
|
4851
|
+
children,
|
|
4852
|
+
...props
|
|
4853
|
+
}, ref) => {
|
|
4854
|
+
const animationClass = SKELETON_ANIMATION_CLASSES[animation];
|
|
4855
|
+
const variantClass = SKELETON_VARIANT_CLASSES[variant];
|
|
4856
|
+
const spacingClass = SPACING_CLASSES[spacing];
|
|
4857
|
+
const style = {
|
|
4858
|
+
width: typeof width === "number" ? `${width}px` : width,
|
|
4859
|
+
height: typeof height === "number" ? `${height}px` : height
|
|
4860
|
+
};
|
|
4861
|
+
if (variant === "text" && lines > 1) {
|
|
4862
|
+
return /* @__PURE__ */ jsx27(
|
|
4863
|
+
"div",
|
|
4864
|
+
{
|
|
4865
|
+
ref,
|
|
4866
|
+
className: `flex flex-col ${spacingClass} ${className}`,
|
|
4867
|
+
...props,
|
|
4868
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx27(
|
|
4869
|
+
"div",
|
|
4870
|
+
{
|
|
4871
|
+
className: `${variantClass} ${animationClass}`,
|
|
4872
|
+
style: index === lines - 1 ? { width: "60%" } : void 0
|
|
4873
|
+
},
|
|
4874
|
+
index
|
|
4875
|
+
))
|
|
4876
|
+
}
|
|
4877
|
+
);
|
|
4878
|
+
}
|
|
4879
|
+
return /* @__PURE__ */ jsx27(
|
|
4880
|
+
"div",
|
|
4881
|
+
{
|
|
4882
|
+
ref,
|
|
4883
|
+
className: `${variantClass} ${animationClass} ${className}`,
|
|
4884
|
+
style,
|
|
4885
|
+
...props,
|
|
4886
|
+
children
|
|
4887
|
+
}
|
|
4888
|
+
);
|
|
4889
|
+
}
|
|
4890
|
+
);
|
|
4891
|
+
var SkeletonText = forwardRef13(
|
|
4892
|
+
(props, ref) => /* @__PURE__ */ jsx27(Skeleton, { ref, variant: "text", ...props })
|
|
4893
|
+
);
|
|
4894
|
+
var SkeletonCircle = forwardRef13((props, ref) => /* @__PURE__ */ jsx27(Skeleton, { ref, variant: "circular", ...props }));
|
|
4895
|
+
var SkeletonRectangle = forwardRef13((props, ref) => /* @__PURE__ */ jsx27(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
4896
|
+
var SkeletonRounded = forwardRef13((props, ref) => /* @__PURE__ */ jsx27(Skeleton, { ref, variant: "rounded", ...props }));
|
|
4897
|
+
var SkeletonCard = forwardRef13(
|
|
4898
|
+
({
|
|
4899
|
+
showAvatar = true,
|
|
4900
|
+
showTitle = true,
|
|
4901
|
+
showDescription = true,
|
|
4902
|
+
showActions = true,
|
|
4903
|
+
lines = 2,
|
|
4904
|
+
className = "",
|
|
4905
|
+
...props
|
|
4906
|
+
}, ref) => {
|
|
4907
|
+
return /* @__PURE__ */ jsxs22(
|
|
4908
|
+
"div",
|
|
4909
|
+
{
|
|
4910
|
+
ref,
|
|
4911
|
+
className: `w-full p-4 bg-background border border-border-200 rounded-lg ${className}`,
|
|
4912
|
+
...props,
|
|
4913
|
+
children: [
|
|
4914
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-start space-x-3", children: [
|
|
4915
|
+
showAvatar && /* @__PURE__ */ jsx27(SkeletonCircle, { width: 40, height: 40 }),
|
|
4916
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex-1 space-y-2", children: [
|
|
4917
|
+
showTitle && /* @__PURE__ */ jsx27(SkeletonText, { width: "60%", height: 20 }),
|
|
4918
|
+
showDescription && /* @__PURE__ */ jsx27(SkeletonText, { lines, spacing: "small" })
|
|
4919
|
+
] })
|
|
4920
|
+
] }),
|
|
4921
|
+
showActions && /* @__PURE__ */ jsxs22("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
4922
|
+
/* @__PURE__ */ jsx27(SkeletonRectangle, { width: 80, height: 32 }),
|
|
4923
|
+
/* @__PURE__ */ jsx27(SkeletonRectangle, { width: 80, height: 32 })
|
|
4924
|
+
] })
|
|
4925
|
+
]
|
|
4926
|
+
}
|
|
4927
|
+
);
|
|
4928
|
+
}
|
|
4929
|
+
);
|
|
4930
|
+
var SkeletonList = forwardRef13(
|
|
4931
|
+
({
|
|
4932
|
+
items = 3,
|
|
4933
|
+
showAvatar = true,
|
|
4934
|
+
showTitle = true,
|
|
4935
|
+
showDescription = true,
|
|
4936
|
+
lines = 1,
|
|
4937
|
+
className = "",
|
|
4938
|
+
...props
|
|
4939
|
+
}, ref) => {
|
|
4940
|
+
return /* @__PURE__ */ jsx27("div", { ref, className: `space-y-3 ${className}`, ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs22("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
4941
|
+
showAvatar && /* @__PURE__ */ jsx27(SkeletonCircle, { width: 32, height: 32 }),
|
|
4942
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex-1 space-y-2", children: [
|
|
4943
|
+
showTitle && /* @__PURE__ */ jsx27(SkeletonText, { width: "40%", height: 16 }),
|
|
4944
|
+
showDescription && /* @__PURE__ */ jsx27(SkeletonText, { lines, spacing: "small" })
|
|
4945
|
+
] })
|
|
4946
|
+
] }, index)) });
|
|
4947
|
+
}
|
|
4948
|
+
);
|
|
4949
|
+
var SkeletonTable = forwardRef13(
|
|
4950
|
+
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
4951
|
+
return /* @__PURE__ */ jsxs22("div", { ref, className: `w-full ${className}`, ...props, children: [
|
|
4952
|
+
showHeader && /* @__PURE__ */ jsx27("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx27(
|
|
4953
|
+
SkeletonText,
|
|
4954
|
+
{
|
|
4955
|
+
width: `${100 / columns}%`,
|
|
4956
|
+
height: 20
|
|
4957
|
+
},
|
|
4958
|
+
index
|
|
4959
|
+
)) }),
|
|
4960
|
+
/* @__PURE__ */ jsx27("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx27("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx27(
|
|
4961
|
+
SkeletonText,
|
|
4962
|
+
{
|
|
4963
|
+
width: `${100 / columns}%`,
|
|
4964
|
+
height: 16
|
|
4965
|
+
},
|
|
4966
|
+
colIndex
|
|
4967
|
+
)) }, rowIndex)) })
|
|
4968
|
+
] });
|
|
4969
|
+
}
|
|
4970
|
+
);
|
|
4716
4971
|
export {
|
|
4717
4972
|
Alert_default as Alert,
|
|
4718
4973
|
Badge_default as Badge,
|
|
@@ -4757,6 +5012,14 @@ export {
|
|
|
4757
5012
|
SelectTrigger,
|
|
4758
5013
|
SelectValue,
|
|
4759
5014
|
SelectionButton_default as SelectionButton,
|
|
5015
|
+
Skeleton,
|
|
5016
|
+
SkeletonCard,
|
|
5017
|
+
SkeletonCircle,
|
|
5018
|
+
SkeletonList,
|
|
5019
|
+
SkeletonRectangle,
|
|
5020
|
+
SkeletonRounded,
|
|
5021
|
+
SkeletonTable,
|
|
5022
|
+
SkeletonText,
|
|
4760
5023
|
Stepper_default as Stepper,
|
|
4761
5024
|
Table_default as Table,
|
|
4762
5025
|
Text_default as Text,
|