analytica-frontend-lib 1.0.57 → 1.0.59
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 +28 -1
- package/dist/Card/index.d.ts +28 -1
- package/dist/Card/index.js +403 -56
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +412 -57
- package/dist/Card/index.mjs.map +1 -1
- package/dist/Menu/index.js +13 -6
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +13 -6
- package/dist/Menu/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 +92 -2
- 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 +577 -62
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +580 -63
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +92 -2
- package/dist/styles.css.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -3695,9 +3695,16 @@ var Menu = forwardRef11(
|
|
|
3695
3695
|
useEffect5(() => {
|
|
3696
3696
|
setValue(propValue ?? defaultValue);
|
|
3697
3697
|
}, [defaultValue, propValue, setValue]);
|
|
3698
|
+
const onValueChangeRef = useRef4(onValueChange);
|
|
3699
|
+
const isInitializedRef = useRef4(false);
|
|
3700
|
+
onValueChangeRef.current = onValueChange;
|
|
3698
3701
|
useEffect5(() => {
|
|
3699
|
-
|
|
3700
|
-
|
|
3702
|
+
if (isInitializedRef.current) {
|
|
3703
|
+
onValueChangeRef.current?.(value);
|
|
3704
|
+
} else {
|
|
3705
|
+
isInitializedRef.current = true;
|
|
3706
|
+
}
|
|
3707
|
+
}, [value]);
|
|
3701
3708
|
const baseClasses = "w-full py-2 px-6 flex flex-row items-center justify-center";
|
|
3702
3709
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
3703
3710
|
return /* @__PURE__ */ jsx25(
|
|
@@ -3802,9 +3809,9 @@ var MenuItem = forwardRef11(
|
|
|
3802
3809
|
{
|
|
3803
3810
|
"data-variant": "breadcrumb",
|
|
3804
3811
|
className: `
|
|
3805
|
-
w-full p-2 rounded-lg hover:text-primary-600 cursor-pointer font-bold text-xs
|
|
3812
|
+
w-full p-2 rounded-lg hover:text-primary-600 cursor-pointer font-bold text-xs
|
|
3806
3813
|
focus:outline-none focus:border-indicator-info focus:border-2
|
|
3807
|
-
${selectedValue === value ? "text-
|
|
3814
|
+
${selectedValue === value ? "text-text-950" : "text-text-600"}
|
|
3808
3815
|
${className ?? ""}
|
|
3809
3816
|
`,
|
|
3810
3817
|
...commonProps,
|
|
@@ -3812,8 +3819,8 @@ var MenuItem = forwardRef11(
|
|
|
3812
3819
|
"span",
|
|
3813
3820
|
{
|
|
3814
3821
|
className: `
|
|
3815
|
-
border-b border-text-600 hover:border-primary-600 text-inherit
|
|
3816
|
-
${selectedValue === value ? "border-b-
|
|
3822
|
+
border-b border-text-600 hover:border-primary-600 text-inherit text-xs
|
|
3823
|
+
${selectedValue === value ? "border-b-0 font-bold" : "border-b-primary-600"}
|
|
3817
3824
|
`,
|
|
3818
3825
|
children
|
|
3819
3826
|
}
|
|
@@ -3934,14 +3941,76 @@ var injectStore3 = (children, store) => Children3.map(children, (child) => {
|
|
|
3934
3941
|
var Menu_default = Menu;
|
|
3935
3942
|
|
|
3936
3943
|
// src/components/Card/Card.tsx
|
|
3937
|
-
import {
|
|
3944
|
+
import {
|
|
3945
|
+
forwardRef as forwardRef12,
|
|
3946
|
+
Fragment as Fragment4,
|
|
3947
|
+
useState as useState8,
|
|
3948
|
+
useRef as useRef5
|
|
3949
|
+
} from "react";
|
|
3938
3950
|
import {
|
|
3939
3951
|
CaretRight as CaretRight2,
|
|
3940
3952
|
ChatCircleText,
|
|
3941
3953
|
CheckCircle as CheckCircle3,
|
|
3954
|
+
DotsThreeVertical,
|
|
3955
|
+
Play,
|
|
3956
|
+
SpeakerHigh,
|
|
3957
|
+
SpeakerLow,
|
|
3958
|
+
SpeakerSimpleX,
|
|
3942
3959
|
XCircle as XCircle2
|
|
3943
3960
|
} from "phosphor-react";
|
|
3944
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
|
+
);
|
|
3945
4014
|
var ACTION_CARD_CLASSES = {
|
|
3946
4015
|
warning: "bg-warning-background",
|
|
3947
4016
|
success: "bg-success-300",
|
|
@@ -4004,7 +4073,7 @@ var CardActivesResults = forwardRef12(
|
|
|
4004
4073
|
children: icon
|
|
4005
4074
|
}
|
|
4006
4075
|
),
|
|
4007
|
-
/* @__PURE__ */ jsx26("
|
|
4076
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "2xs", weight: "medium", className: "text-text-800 uppercase", children: title }),
|
|
4008
4077
|
/* @__PURE__ */ jsx26("p", { className: `text-lg font-bold ${actionSubTitleClasses}`, children: subTitle })
|
|
4009
4078
|
]
|
|
4010
4079
|
}
|
|
@@ -4037,13 +4106,13 @@ var CardQuestions = forwardRef12(
|
|
|
4037
4106
|
const stateLabel = isDone ? "Realizado" : "N\xE3o Realizado";
|
|
4038
4107
|
const buttonLabel = isDone ? "Ver Quest\xE3o" : "Responder";
|
|
4039
4108
|
return /* @__PURE__ */ jsxs21(
|
|
4040
|
-
|
|
4109
|
+
CardBase,
|
|
4041
4110
|
{
|
|
4042
4111
|
ref,
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
`,
|
|
4112
|
+
layout: "horizontal",
|
|
4113
|
+
padding: "medium",
|
|
4114
|
+
minHeight: "medium",
|
|
4115
|
+
className: `justify-between gap-4 ${className}`,
|
|
4047
4116
|
...props,
|
|
4048
4117
|
children: [
|
|
4049
4118
|
/* @__PURE__ */ jsxs21("section", { className: "flex flex-col gap-1", children: [
|
|
@@ -4103,35 +4172,48 @@ var CardProgress = forwardRef12(
|
|
|
4103
4172
|
/* @__PURE__ */ jsx26("p", { className: "text-text-600", children: endDate })
|
|
4104
4173
|
] })
|
|
4105
4174
|
] }),
|
|
4106
|
-
/* @__PURE__ */
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
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
|
+
] })
|
|
4115
4197
|
] }),
|
|
4116
4198
|
vertical: /* @__PURE__ */ jsx26("p", { className: "text-sm text-text-800", children: subhead })
|
|
4117
4199
|
};
|
|
4118
4200
|
return /* @__PURE__ */ jsxs21(
|
|
4119
|
-
|
|
4201
|
+
CardBase,
|
|
4120
4202
|
{
|
|
4121
4203
|
ref,
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
`,
|
|
4204
|
+
layout: isHorizontal ? "horizontal" : "vertical",
|
|
4205
|
+
padding: "none",
|
|
4206
|
+
minHeight: "medium",
|
|
4207
|
+
cursor: "pointer",
|
|
4208
|
+
className: `${isHorizontal ? "h-20" : ""} ${className}`,
|
|
4127
4209
|
...props,
|
|
4128
4210
|
children: [
|
|
4129
4211
|
/* @__PURE__ */ jsx26(
|
|
4130
4212
|
"div",
|
|
4131
4213
|
{
|
|
4132
4214
|
className: `
|
|
4133
|
-
flex justify-center items-center [&>svg]:size-
|
|
4134
|
-
${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"}
|
|
4135
4217
|
`,
|
|
4136
4218
|
style: {
|
|
4137
4219
|
backgroundColor: color
|
|
@@ -4147,7 +4229,7 @@ var CardProgress = forwardRef12(
|
|
|
4147
4229
|
${!isHorizontal && "gap-4"}
|
|
4148
4230
|
`,
|
|
4149
4231
|
children: [
|
|
4150
|
-
/* @__PURE__ */ jsx26(
|
|
4232
|
+
/* @__PURE__ */ jsx26(Text_default, { size: "sm", weight: "bold", className: "text-text-950", children: header }),
|
|
4151
4233
|
contentComponent[direction]
|
|
4152
4234
|
]
|
|
4153
4235
|
}
|
|
@@ -4167,18 +4249,43 @@ var CardTopic = forwardRef12(
|
|
|
4167
4249
|
...props
|
|
4168
4250
|
}, ref) => {
|
|
4169
4251
|
return /* @__PURE__ */ jsxs21(
|
|
4170
|
-
|
|
4252
|
+
CardBase,
|
|
4171
4253
|
{
|
|
4172
4254
|
ref,
|
|
4173
|
-
|
|
4255
|
+
layout: "vertical",
|
|
4256
|
+
padding: "small",
|
|
4257
|
+
minHeight: "medium",
|
|
4258
|
+
cursor: "pointer",
|
|
4259
|
+
className: `justify-center gap-2 py-2 px-4 ${className}`,
|
|
4174
4260
|
...props,
|
|
4175
4261
|
children: [
|
|
4176
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: [
|
|
4177
4263
|
/* @__PURE__ */ jsx26("p", { children: text }),
|
|
4178
4264
|
index < subHead.length - 1 && /* @__PURE__ */ jsx26("p", { children: "\u2022" })
|
|
4179
4265
|
] }, `${text} - ${index}`)) }),
|
|
4180
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4181
|
-
/* @__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
|
+
] })
|
|
4182
4289
|
]
|
|
4183
4290
|
}
|
|
4184
4291
|
);
|
|
@@ -4196,15 +4303,18 @@ var CardPerformance = forwardRef12(
|
|
|
4196
4303
|
}, ref) => {
|
|
4197
4304
|
const hasProgress = progress !== void 0;
|
|
4198
4305
|
return /* @__PURE__ */ jsxs21(
|
|
4199
|
-
|
|
4306
|
+
CardBase,
|
|
4200
4307
|
{
|
|
4201
4308
|
ref,
|
|
4202
|
-
|
|
4309
|
+
layout: "horizontal",
|
|
4310
|
+
padding: "medium",
|
|
4311
|
+
minHeight: "large",
|
|
4312
|
+
className: `justify-between gap-2 ${className}`,
|
|
4203
4313
|
...props,
|
|
4204
4314
|
children: [
|
|
4205
4315
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
4206
4316
|
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row justify-between items-center", children: [
|
|
4207
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4317
|
+
/* @__PURE__ */ jsx26("p", { className: "text-lg font-bold text-text-950", children: header }),
|
|
4208
4318
|
hasProgress && /* @__PURE__ */ jsx26(
|
|
4209
4319
|
Button_default,
|
|
4210
4320
|
{
|
|
@@ -4220,7 +4330,7 @@ var CardPerformance = forwardRef12(
|
|
|
4220
4330
|
!hasProgress && /* @__PURE__ */ jsx26(
|
|
4221
4331
|
CaretRight2,
|
|
4222
4332
|
{
|
|
4223
|
-
className: "size-4.5 text-text-800",
|
|
4333
|
+
className: "size-4.5 text-text-800 cursor-pointer",
|
|
4224
4334
|
"data-testid": "caret-icon",
|
|
4225
4335
|
onClick: () => onClickButton?.(valueButton)
|
|
4226
4336
|
}
|
|
@@ -4243,13 +4353,13 @@ var CardResults = forwardRef12(
|
|
|
4243
4353
|
}, ref) => {
|
|
4244
4354
|
const isRow = direction == "row";
|
|
4245
4355
|
return /* @__PURE__ */ jsxs21(
|
|
4246
|
-
|
|
4356
|
+
CardBase,
|
|
4247
4357
|
{
|
|
4248
4358
|
ref,
|
|
4249
|
-
|
|
4250
|
-
|
|
4251
|
-
|
|
4252
|
-
`,
|
|
4359
|
+
layout: "horizontal",
|
|
4360
|
+
padding: "none",
|
|
4361
|
+
minHeight: "medium",
|
|
4362
|
+
className: `items-center pr-4 ${className}`,
|
|
4253
4363
|
...props,
|
|
4254
4364
|
children: [
|
|
4255
4365
|
/* @__PURE__ */ jsx26(
|
|
@@ -4272,7 +4382,7 @@ var CardResults = forwardRef12(
|
|
|
4272
4382
|
${isRow ? "flex-row items-center" : "flex-col"}
|
|
4273
4383
|
`,
|
|
4274
4384
|
children: [
|
|
4275
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4385
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm font-bold text-text-950", children: header }),
|
|
4276
4386
|
/* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4277
4387
|
/* @__PURE__ */ jsxs21(
|
|
4278
4388
|
Badge_default,
|
|
@@ -4304,7 +4414,7 @@ var CardResults = forwardRef12(
|
|
|
4304
4414
|
]
|
|
4305
4415
|
}
|
|
4306
4416
|
),
|
|
4307
|
-
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4417
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer" })
|
|
4308
4418
|
]
|
|
4309
4419
|
}
|
|
4310
4420
|
);
|
|
@@ -4313,13 +4423,13 @@ var CardResults = forwardRef12(
|
|
|
4313
4423
|
var CardStatus = forwardRef12(
|
|
4314
4424
|
({ header, className, status, ...props }, ref) => {
|
|
4315
4425
|
return /* @__PURE__ */ jsxs21(
|
|
4316
|
-
|
|
4426
|
+
CardBase,
|
|
4317
4427
|
{
|
|
4318
4428
|
ref,
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
`,
|
|
4429
|
+
layout: "horizontal",
|
|
4430
|
+
padding: "none",
|
|
4431
|
+
minHeight: "medium",
|
|
4432
|
+
className: `items-center pr-4 ${className}`,
|
|
4323
4433
|
...props,
|
|
4324
4434
|
children: [
|
|
4325
4435
|
/* @__PURE__ */ jsxs21(
|
|
@@ -4329,7 +4439,7 @@ var CardStatus = forwardRef12(
|
|
|
4329
4439
|
p-4 flex justify-between w-full h-full flex-row items-center
|
|
4330
4440
|
`,
|
|
4331
4441
|
children: [
|
|
4332
|
-
/* @__PURE__ */ jsx26("p", { className: "text-
|
|
4442
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm font-bold text-text-950", children: header }),
|
|
4333
4443
|
status && /* @__PURE__ */ jsxs21("span", { className: "flex flex-row gap-1 items-center", children: [
|
|
4334
4444
|
/* @__PURE__ */ jsx26(
|
|
4335
4445
|
Badge_default,
|
|
@@ -4346,7 +4456,7 @@ var CardStatus = forwardRef12(
|
|
|
4346
4456
|
]
|
|
4347
4457
|
}
|
|
4348
4458
|
),
|
|
4349
|
-
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4459
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800 cursor-pointer" })
|
|
4350
4460
|
]
|
|
4351
4461
|
}
|
|
4352
4462
|
);
|
|
@@ -4355,15 +4465,18 @@ var CardStatus = forwardRef12(
|
|
|
4355
4465
|
var CardSettings = forwardRef12(
|
|
4356
4466
|
({ header, className, icon, ...props }, ref) => {
|
|
4357
4467
|
return /* @__PURE__ */ jsxs21(
|
|
4358
|
-
|
|
4468
|
+
CardBase,
|
|
4359
4469
|
{
|
|
4360
4470
|
ref,
|
|
4361
|
-
|
|
4471
|
+
layout: "horizontal",
|
|
4472
|
+
padding: "small",
|
|
4473
|
+
minHeight: "none",
|
|
4474
|
+
className: `border-none items-center gap-2 text-text-700 ${className}`,
|
|
4362
4475
|
...props,
|
|
4363
4476
|
children: [
|
|
4364
4477
|
/* @__PURE__ */ jsx26("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4365
|
-
/* @__PURE__ */ jsx26("p", { className: "w-full text-
|
|
4366
|
-
/* @__PURE__ */ jsx26(CaretRight2, { size: 24 })
|
|
4478
|
+
/* @__PURE__ */ jsx26("p", { className: "w-full text-sm", children: header }),
|
|
4479
|
+
/* @__PURE__ */ jsx26(CaretRight2, { size: 24, className: "cursor-pointer" })
|
|
4367
4480
|
]
|
|
4368
4481
|
}
|
|
4369
4482
|
);
|
|
@@ -4372,10 +4485,13 @@ var CardSettings = forwardRef12(
|
|
|
4372
4485
|
var CardSupport = forwardRef12(
|
|
4373
4486
|
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4374
4487
|
return /* @__PURE__ */ jsxs21(
|
|
4375
|
-
|
|
4488
|
+
CardBase,
|
|
4376
4489
|
{
|
|
4377
4490
|
ref,
|
|
4378
|
-
|
|
4491
|
+
layout: "horizontal",
|
|
4492
|
+
padding: "medium",
|
|
4493
|
+
minHeight: "none",
|
|
4494
|
+
className: `border-none items-center gap-2 text-text-700 ${className}`,
|
|
4379
4495
|
...props,
|
|
4380
4496
|
children: [
|
|
4381
4497
|
/* @__PURE__ */ jsxs21(
|
|
@@ -4385,12 +4501,12 @@ var CardSupport = forwardRef12(
|
|
|
4385
4501
|
w-full flex ${direction == "col" ? "flex-col" : "flex-row items-center"} gap-2
|
|
4386
4502
|
`,
|
|
4387
4503
|
children: [
|
|
4388
|
-
/* @__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 }) }),
|
|
4389
4505
|
/* @__PURE__ */ jsx26("span", { className: "flex flex-row gap-1", children })
|
|
4390
4506
|
]
|
|
4391
4507
|
}
|
|
4392
4508
|
),
|
|
4393
|
-
/* @__PURE__ */ jsx26(CaretRight2, { className: "text-text-800", size: 24 })
|
|
4509
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "text-text-800 cursor-pointer", size: 24 })
|
|
4394
4510
|
]
|
|
4395
4511
|
}
|
|
4396
4512
|
);
|
|
@@ -4411,10 +4527,14 @@ var CardForum = forwardRef12(
|
|
|
4411
4527
|
...props
|
|
4412
4528
|
}, ref) => {
|
|
4413
4529
|
return /* @__PURE__ */ jsxs21(
|
|
4414
|
-
|
|
4530
|
+
CardBase,
|
|
4415
4531
|
{
|
|
4416
4532
|
ref,
|
|
4417
|
-
|
|
4533
|
+
layout: "horizontal",
|
|
4534
|
+
padding: "medium",
|
|
4535
|
+
minHeight: "none",
|
|
4536
|
+
variant: "minimal",
|
|
4537
|
+
className: `w-auto h-auto gap-3 ${className}`,
|
|
4418
4538
|
...props,
|
|
4419
4539
|
children: [
|
|
4420
4540
|
/* @__PURE__ */ jsx26(
|
|
@@ -4459,6 +4579,395 @@ var CardForum = forwardRef12(
|
|
|
4459
4579
|
);
|
|
4460
4580
|
}
|
|
4461
4581
|
);
|
|
4582
|
+
var CardAudio = forwardRef12(
|
|
4583
|
+
({
|
|
4584
|
+
src,
|
|
4585
|
+
title,
|
|
4586
|
+
onPlay,
|
|
4587
|
+
onPause,
|
|
4588
|
+
onEnded,
|
|
4589
|
+
onAudioTimeUpdate,
|
|
4590
|
+
loop = false,
|
|
4591
|
+
preload = "metadata",
|
|
4592
|
+
tracks,
|
|
4593
|
+
className,
|
|
4594
|
+
...props
|
|
4595
|
+
}, ref) => {
|
|
4596
|
+
const [isPlaying, setIsPlaying] = useState8(false);
|
|
4597
|
+
const [currentTime, setCurrentTime] = useState8(0);
|
|
4598
|
+
const [duration, setDuration] = useState8(0);
|
|
4599
|
+
const [volume, setVolume] = useState8(1);
|
|
4600
|
+
const [showVolumeControl, setShowVolumeControl] = useState8(false);
|
|
4601
|
+
const audioRef = useRef5(null);
|
|
4602
|
+
const formatTime = (time) => {
|
|
4603
|
+
const minutes = Math.floor(time / 60);
|
|
4604
|
+
const seconds = Math.floor(time % 60);
|
|
4605
|
+
return `${minutes}:${seconds.toString().padStart(2, "0")}`;
|
|
4606
|
+
};
|
|
4607
|
+
const handlePlayPause = () => {
|
|
4608
|
+
if (isPlaying) {
|
|
4609
|
+
audioRef.current?.pause();
|
|
4610
|
+
setIsPlaying(false);
|
|
4611
|
+
onPause?.();
|
|
4612
|
+
} else {
|
|
4613
|
+
audioRef.current?.play();
|
|
4614
|
+
setIsPlaying(true);
|
|
4615
|
+
onPlay?.();
|
|
4616
|
+
}
|
|
4617
|
+
};
|
|
4618
|
+
const handleTimeUpdate = () => {
|
|
4619
|
+
const current = audioRef.current?.currentTime ?? 0;
|
|
4620
|
+
const total = audioRef.current?.duration ?? 0;
|
|
4621
|
+
setCurrentTime(current);
|
|
4622
|
+
setDuration(total);
|
|
4623
|
+
onAudioTimeUpdate?.(current, total);
|
|
4624
|
+
};
|
|
4625
|
+
const handleLoadedMetadata = () => {
|
|
4626
|
+
setDuration(audioRef.current?.duration ?? 0);
|
|
4627
|
+
};
|
|
4628
|
+
const handleEnded = () => {
|
|
4629
|
+
setIsPlaying(false);
|
|
4630
|
+
setCurrentTime(0);
|
|
4631
|
+
onEnded?.();
|
|
4632
|
+
};
|
|
4633
|
+
const handleProgressClick = (e) => {
|
|
4634
|
+
const rect = e.currentTarget.getBoundingClientRect();
|
|
4635
|
+
const clickX = e.clientX - rect.left;
|
|
4636
|
+
const width = rect.width;
|
|
4637
|
+
const percentage = clickX / width;
|
|
4638
|
+
const newTime = percentage * duration;
|
|
4639
|
+
if (audioRef.current) {
|
|
4640
|
+
audioRef.current.currentTime = newTime;
|
|
4641
|
+
}
|
|
4642
|
+
setCurrentTime(newTime);
|
|
4643
|
+
};
|
|
4644
|
+
const handleVolumeChange = (e) => {
|
|
4645
|
+
const newVolume = parseFloat(e.target.value);
|
|
4646
|
+
setVolume(newVolume);
|
|
4647
|
+
if (audioRef.current) {
|
|
4648
|
+
audioRef.current.volume = newVolume;
|
|
4649
|
+
}
|
|
4650
|
+
};
|
|
4651
|
+
const toggleVolumeControl = () => {
|
|
4652
|
+
setShowVolumeControl(!showVolumeControl);
|
|
4653
|
+
};
|
|
4654
|
+
const getVolumeIcon = () => {
|
|
4655
|
+
if (volume === 0) {
|
|
4656
|
+
return /* @__PURE__ */ jsx26(SpeakerSimpleX, {});
|
|
4657
|
+
}
|
|
4658
|
+
if (volume < 0.5) {
|
|
4659
|
+
return /* @__PURE__ */ jsx26(SpeakerLow, {});
|
|
4660
|
+
}
|
|
4661
|
+
return /* @__PURE__ */ jsx26(SpeakerHigh, {});
|
|
4662
|
+
};
|
|
4663
|
+
return /* @__PURE__ */ jsxs21(
|
|
4664
|
+
CardBase,
|
|
4665
|
+
{
|
|
4666
|
+
ref,
|
|
4667
|
+
layout: "horizontal",
|
|
4668
|
+
padding: "medium",
|
|
4669
|
+
minHeight: "none",
|
|
4670
|
+
className: `w-auto h-14 items-center gap-2 border-none ${className}`,
|
|
4671
|
+
...props,
|
|
4672
|
+
children: [
|
|
4673
|
+
/* @__PURE__ */ jsx26(
|
|
4674
|
+
"audio",
|
|
4675
|
+
{
|
|
4676
|
+
ref: audioRef,
|
|
4677
|
+
src,
|
|
4678
|
+
loop,
|
|
4679
|
+
preload,
|
|
4680
|
+
onTimeUpdate: handleTimeUpdate,
|
|
4681
|
+
onLoadedMetadata: handleLoadedMetadata,
|
|
4682
|
+
onEnded: handleEnded,
|
|
4683
|
+
"data-testid": "audio-element",
|
|
4684
|
+
"aria-label": title,
|
|
4685
|
+
children: tracks ? tracks.map((track) => /* @__PURE__ */ jsx26(
|
|
4686
|
+
"track",
|
|
4687
|
+
{
|
|
4688
|
+
kind: track.kind,
|
|
4689
|
+
src: track.src,
|
|
4690
|
+
srcLang: track.srcLang,
|
|
4691
|
+
label: track.label,
|
|
4692
|
+
default: track.default
|
|
4693
|
+
},
|
|
4694
|
+
track.src
|
|
4695
|
+
)) : /* @__PURE__ */ jsx26(
|
|
4696
|
+
"track",
|
|
4697
|
+
{
|
|
4698
|
+
kind: "captions",
|
|
4699
|
+
src: "data:text/vtt;base64,",
|
|
4700
|
+
srcLang: "pt",
|
|
4701
|
+
label: "Sem legendas dispon\xEDveis"
|
|
4702
|
+
}
|
|
4703
|
+
)
|
|
4704
|
+
}
|
|
4705
|
+
),
|
|
4706
|
+
/* @__PURE__ */ jsx26(
|
|
4707
|
+
"button",
|
|
4708
|
+
{
|
|
4709
|
+
type: "button",
|
|
4710
|
+
onClick: handlePlayPause,
|
|
4711
|
+
disabled: !src,
|
|
4712
|
+
className: "cursor-pointer text-text-950 hover:text-primary-600 disabled:text-text-400 disabled:cursor-not-allowed",
|
|
4713
|
+
"aria-label": isPlaying ? "Pausar" : "Reproduzir",
|
|
4714
|
+
children: isPlaying ? /* @__PURE__ */ jsx26("div", { className: "w-6 h-6 flex items-center justify-center", children: /* @__PURE__ */ jsxs21("div", { className: "flex gap-0.5", children: [
|
|
4715
|
+
/* @__PURE__ */ jsx26("div", { className: "w-1 h-4 bg-current rounded-sm" }),
|
|
4716
|
+
/* @__PURE__ */ jsx26("div", { className: "w-1 h-4 bg-current rounded-sm" })
|
|
4717
|
+
] }) }) : /* @__PURE__ */ jsx26(Play, { size: 24 })
|
|
4718
|
+
}
|
|
4719
|
+
),
|
|
4720
|
+
/* @__PURE__ */ jsx26("p", { className: "text-text-800 text-sm font-medium min-w-[2.5rem]", children: formatTime(currentTime) }),
|
|
4721
|
+
/* @__PURE__ */ jsx26("div", { className: "flex-1 relative", "data-testid": "progress-bar", children: /* @__PURE__ */ jsx26(
|
|
4722
|
+
"button",
|
|
4723
|
+
{
|
|
4724
|
+
type: "button",
|
|
4725
|
+
className: "w-full h-2 bg-border-100 rounded-full cursor-pointer",
|
|
4726
|
+
onClick: handleProgressClick,
|
|
4727
|
+
onKeyDown: (e) => {
|
|
4728
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
4729
|
+
e.preventDefault();
|
|
4730
|
+
handleProgressClick(
|
|
4731
|
+
e
|
|
4732
|
+
);
|
|
4733
|
+
}
|
|
4734
|
+
},
|
|
4735
|
+
"aria-label": "Barra de progresso do \xE1udio",
|
|
4736
|
+
children: /* @__PURE__ */ jsx26(
|
|
4737
|
+
"div",
|
|
4738
|
+
{
|
|
4739
|
+
className: "h-full bg-primary-600 rounded-full transition-all duration-100",
|
|
4740
|
+
style: {
|
|
4741
|
+
width: duration > 0 ? `${currentTime / duration * 100}%` : "0%"
|
|
4742
|
+
}
|
|
4743
|
+
}
|
|
4744
|
+
)
|
|
4745
|
+
}
|
|
4746
|
+
) }),
|
|
4747
|
+
/* @__PURE__ */ jsx26("p", { className: "text-text-800 text-sm font-medium min-w-[2.5rem]", children: formatTime(duration) }),
|
|
4748
|
+
/* @__PURE__ */ jsxs21("div", { className: "relative", children: [
|
|
4749
|
+
/* @__PURE__ */ jsx26(
|
|
4750
|
+
"button",
|
|
4751
|
+
{
|
|
4752
|
+
type: "button",
|
|
4753
|
+
onClick: toggleVolumeControl,
|
|
4754
|
+
className: "cursor-pointer text-text-950 hover:text-primary-600",
|
|
4755
|
+
"aria-label": "Controle de volume",
|
|
4756
|
+
children: /* @__PURE__ */ jsx26("div", { className: "w-6 h-6 flex items-center justify-center", children: getVolumeIcon() })
|
|
4757
|
+
}
|
|
4758
|
+
),
|
|
4759
|
+
showVolumeControl && /* @__PURE__ */ jsx26(
|
|
4760
|
+
"button",
|
|
4761
|
+
{
|
|
4762
|
+
type: "button",
|
|
4763
|
+
className: "absolute bottom-full right-0 mb-2 p-2 bg-background border border-border-100 rounded-lg shadow-lg focus:outline-none focus:ring-2 focus:ring-primary-500",
|
|
4764
|
+
onKeyDown: (e) => {
|
|
4765
|
+
if (e.key === "Escape") {
|
|
4766
|
+
setShowVolumeControl(false);
|
|
4767
|
+
}
|
|
4768
|
+
},
|
|
4769
|
+
children: /* @__PURE__ */ jsx26(
|
|
4770
|
+
"input",
|
|
4771
|
+
{
|
|
4772
|
+
type: "range",
|
|
4773
|
+
min: "0",
|
|
4774
|
+
max: "1",
|
|
4775
|
+
step: "0.1",
|
|
4776
|
+
value: volume,
|
|
4777
|
+
onChange: handleVolumeChange,
|
|
4778
|
+
onKeyDown: (e) => {
|
|
4779
|
+
if (e.key === "ArrowUp" || e.key === "ArrowRight") {
|
|
4780
|
+
e.preventDefault();
|
|
4781
|
+
const newVolume = Math.min(
|
|
4782
|
+
1,
|
|
4783
|
+
Math.round((volume + 0.1) * 10) / 10
|
|
4784
|
+
);
|
|
4785
|
+
setVolume(newVolume);
|
|
4786
|
+
if (audioRef.current) audioRef.current.volume = newVolume;
|
|
4787
|
+
} else if (e.key === "ArrowDown" || e.key === "ArrowLeft") {
|
|
4788
|
+
e.preventDefault();
|
|
4789
|
+
const newVolume = Math.max(
|
|
4790
|
+
0,
|
|
4791
|
+
Math.round((volume - 0.1) * 10) / 10
|
|
4792
|
+
);
|
|
4793
|
+
setVolume(newVolume);
|
|
4794
|
+
if (audioRef.current) audioRef.current.volume = newVolume;
|
|
4795
|
+
}
|
|
4796
|
+
},
|
|
4797
|
+
className: "w-20 h-2 bg-border-100 rounded-lg appearance-none cursor-pointer",
|
|
4798
|
+
style: {
|
|
4799
|
+
background: `linear-gradient(to right, #3b82f6 0%, #3b82f6 ${volume * 100}%, #e5e7eb ${volume * 100}%, #e5e7eb 100%)`
|
|
4800
|
+
},
|
|
4801
|
+
"aria-label": "Volume",
|
|
4802
|
+
"aria-valuenow": Math.round(volume * 100),
|
|
4803
|
+
"aria-valuemin": 0,
|
|
4804
|
+
"aria-valuemax": 100
|
|
4805
|
+
}
|
|
4806
|
+
)
|
|
4807
|
+
}
|
|
4808
|
+
)
|
|
4809
|
+
] }),
|
|
4810
|
+
/* @__PURE__ */ jsx26(
|
|
4811
|
+
DotsThreeVertical,
|
|
4812
|
+
{
|
|
4813
|
+
size: 24,
|
|
4814
|
+
className: "text-text-950 cursor-pointer hover:text-primary-600"
|
|
4815
|
+
}
|
|
4816
|
+
)
|
|
4817
|
+
]
|
|
4818
|
+
}
|
|
4819
|
+
);
|
|
4820
|
+
}
|
|
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
|
+
);
|
|
4462
4971
|
export {
|
|
4463
4972
|
Alert_default as Alert,
|
|
4464
4973
|
Badge_default as Badge,
|
|
@@ -4503,6 +5012,14 @@ export {
|
|
|
4503
5012
|
SelectTrigger,
|
|
4504
5013
|
SelectValue,
|
|
4505
5014
|
SelectionButton_default as SelectionButton,
|
|
5015
|
+
Skeleton,
|
|
5016
|
+
SkeletonCard,
|
|
5017
|
+
SkeletonCircle,
|
|
5018
|
+
SkeletonList,
|
|
5019
|
+
SkeletonRectangle,
|
|
5020
|
+
SkeletonRounded,
|
|
5021
|
+
SkeletonTable,
|
|
5022
|
+
SkeletonText,
|
|
4506
5023
|
Stepper_default as Stepper,
|
|
4507
5024
|
Table_default as Table,
|
|
4508
5025
|
Text_default as Text,
|