analytica-frontend-lib 1.0.93 → 1.0.94
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/IconRender/index.d.mts +36 -0
- package/dist/IconRender/index.d.ts +36 -0
- package/dist/IconRender/index.js +162 -0
- package/dist/IconRender/index.js.map +1 -0
- package/dist/IconRender/index.mjs +127 -0
- package/dist/IconRender/index.mjs.map +1 -0
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +324 -189
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +313 -189
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -5183,6 +5183,129 @@ var MultipleChoiceList = ({
|
|
|
5183
5183
|
);
|
|
5184
5184
|
};
|
|
5185
5185
|
|
|
5186
|
+
// src/components/IconRender/IconRender.tsx
|
|
5187
|
+
import * as PhosphorIcons from "phosphor-react";
|
|
5188
|
+
import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
5189
|
+
var ChatPT = ({ size, color }) => /* @__PURE__ */ jsxs23(
|
|
5190
|
+
"svg",
|
|
5191
|
+
{
|
|
5192
|
+
width: size,
|
|
5193
|
+
height: size,
|
|
5194
|
+
viewBox: "0 0 32 32",
|
|
5195
|
+
fill: "none",
|
|
5196
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5197
|
+
children: [
|
|
5198
|
+
/* @__PURE__ */ jsx29(
|
|
5199
|
+
"path",
|
|
5200
|
+
{
|
|
5201
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
5202
|
+
fill: color
|
|
5203
|
+
}
|
|
5204
|
+
),
|
|
5205
|
+
/* @__PURE__ */ jsx29(
|
|
5206
|
+
"path",
|
|
5207
|
+
{
|
|
5208
|
+
d: "M21.1758 12V20.5312H19.7168V12H21.1758ZM23.8535 12V13.1719H17.0625V12H23.8535Z",
|
|
5209
|
+
fill: color
|
|
5210
|
+
}
|
|
5211
|
+
),
|
|
5212
|
+
/* @__PURE__ */ jsx29(
|
|
5213
|
+
"path",
|
|
5214
|
+
{
|
|
5215
|
+
d: "M13.2402 17.3496H11.0195V16.1836H13.2402C13.627 16.1836 13.9395 16.1211 14.1777 15.9961C14.416 15.8711 14.5898 15.6992 14.6992 15.4805C14.8125 15.2578 14.8691 15.0039 14.8691 14.7188C14.8691 14.4492 14.8125 14.1973 14.6992 13.9629C14.5898 13.7246 14.416 13.5332 14.1777 13.3887C13.9395 13.2441 13.627 13.1719 13.2402 13.1719H11.4707V20.5312H10V12H13.2402C13.9004 12 14.4609 12.1172 14.9219 12.3516C15.3867 12.582 15.7402 12.9023 15.9824 13.3125C16.2246 13.7188 16.3457 14.1836 16.3457 14.707C16.3457 15.2578 16.2246 15.7305 15.9824 16.125C15.7402 16.5195 15.3867 16.8223 14.9219 17.0332C14.4609 17.2441 13.9004 17.3496 13.2402 17.3496Z",
|
|
5216
|
+
fill: color
|
|
5217
|
+
}
|
|
5218
|
+
)
|
|
5219
|
+
]
|
|
5220
|
+
}
|
|
5221
|
+
);
|
|
5222
|
+
var ChatEN = ({ size, color }) => /* @__PURE__ */ jsxs23(
|
|
5223
|
+
"svg",
|
|
5224
|
+
{
|
|
5225
|
+
width: size,
|
|
5226
|
+
height: size,
|
|
5227
|
+
viewBox: "0 0 32 32",
|
|
5228
|
+
fill: "none",
|
|
5229
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5230
|
+
children: [
|
|
5231
|
+
/* @__PURE__ */ jsx29(
|
|
5232
|
+
"path",
|
|
5233
|
+
{
|
|
5234
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
5235
|
+
fill: color
|
|
5236
|
+
}
|
|
5237
|
+
),
|
|
5238
|
+
/* @__PURE__ */ jsx29(
|
|
5239
|
+
"path",
|
|
5240
|
+
{
|
|
5241
|
+
d: "M22.5488 12V20.5312H21.0781L17.252 14.4199V20.5312H15.7812V12H17.252L21.0898 18.123V12H22.5488Z",
|
|
5242
|
+
fill: color
|
|
5243
|
+
}
|
|
5244
|
+
),
|
|
5245
|
+
/* @__PURE__ */ jsx29(
|
|
5246
|
+
"path",
|
|
5247
|
+
{
|
|
5248
|
+
d: "M14.584 19.3652V20.5312H10.0547V19.3652H14.584ZM10.4707 12V20.5312H9V12H10.4707ZM13.9922 15.5625V16.7109H10.0547V15.5625H13.9922ZM14.5547 12V13.1719H10.0547V12H14.5547Z",
|
|
5249
|
+
fill: color
|
|
5250
|
+
}
|
|
5251
|
+
)
|
|
5252
|
+
]
|
|
5253
|
+
}
|
|
5254
|
+
);
|
|
5255
|
+
var ChatES = ({ size, color }) => /* @__PURE__ */ jsxs23(
|
|
5256
|
+
"svg",
|
|
5257
|
+
{
|
|
5258
|
+
width: size,
|
|
5259
|
+
height: size,
|
|
5260
|
+
viewBox: "0 0 32 32",
|
|
5261
|
+
fill: "none",
|
|
5262
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
5263
|
+
children: [
|
|
5264
|
+
/* @__PURE__ */ jsx29(
|
|
5265
|
+
"path",
|
|
5266
|
+
{
|
|
5267
|
+
d: "M27 6H5.00004C4.4696 6 3.9609 6.21071 3.58582 6.58579C3.21075 6.96086 3.00004 7.46957 3.00004 8V28C2.99773 28.3814 3.10562 28.7553 3.31074 29.0768C3.51585 29.3984 3.80947 29.6538 4.15629 29.8125C4.42057 29.9356 4.7085 29.9995 5.00004 30C5.46954 29.9989 5.92347 29.8315 6.28129 29.5275L6.29254 29.5187L10.375 26H27C27.5305 26 28.0392 25.7893 28.4142 25.4142C28.7893 25.0391 29 24.5304 29 24V8C29 7.46957 28.7893 6.96086 28.4142 6.58579C28.0392 6.21071 27.5305 6 27 6ZM27 24H10C9.75992 24.0001 9.52787 24.0866 9.34629 24.2437L5.00004 28V8H27V24Z",
|
|
5268
|
+
fill: color
|
|
5269
|
+
}
|
|
5270
|
+
),
|
|
5271
|
+
/* @__PURE__ */ jsx29(
|
|
5272
|
+
"path",
|
|
5273
|
+
{
|
|
5274
|
+
d: "M21.1426 17.8027C21.1426 17.627 21.1152 17.4707 21.0605 17.334C21.0098 17.1973 20.918 17.0723 20.7852 16.959C20.6523 16.8457 20.4648 16.7363 20.2227 16.6309C19.9844 16.5215 19.6797 16.4102 19.3086 16.2969C18.9023 16.1719 18.5273 16.0332 18.1836 15.8809C17.8438 15.7246 17.5469 15.5449 17.293 15.3418C17.0391 15.1348 16.8418 14.8984 16.7012 14.6328C16.5605 14.3633 16.4902 14.0527 16.4902 13.7012C16.4902 13.3535 16.5625 13.0371 16.707 12.752C16.8555 12.4668 17.0645 12.2207 17.334 12.0137C17.6074 11.8027 17.9297 11.6406 18.3008 11.5273C18.6719 11.4102 19.082 11.3516 19.5312 11.3516C20.1641 11.3516 20.709 11.4688 21.166 11.7031C21.627 11.9375 21.9805 12.252 22.2266 12.6465C22.4766 13.041 22.6016 13.4766 22.6016 13.9531H21.1426C21.1426 13.6719 21.082 13.4238 20.9609 13.209C20.8438 12.9902 20.6641 12.8184 20.4219 12.6934C20.1836 12.5684 19.8809 12.5059 19.5137 12.5059C19.166 12.5059 18.877 12.5586 18.6465 12.6641C18.416 12.7695 18.2441 12.9121 18.1309 13.0918C18.0176 13.2715 17.9609 13.4746 17.9609 13.7012C17.9609 13.8613 17.998 14.0078 18.0723 14.1406C18.1465 14.2695 18.2598 14.3906 18.4121 14.5039C18.5645 14.6133 18.7559 14.7168 18.9863 14.8145C19.2168 14.9121 19.4883 15.0059 19.8008 15.0957C20.2734 15.2363 20.6855 15.3926 21.0371 15.5645C21.3887 15.7324 21.6816 15.9238 21.916 16.1387C22.1504 16.3535 22.3262 16.5977 22.4434 16.8711C22.5605 17.1406 22.6191 17.4473 22.6191 17.791C22.6191 18.1504 22.5469 18.4746 22.4023 18.7637C22.2578 19.0488 22.0508 19.293 21.7812 19.4961C21.5156 19.6953 21.1953 19.8496 20.8203 19.959C20.4492 20.0645 20.0352 20.1172 19.5781 20.1172C19.168 20.1172 18.7637 20.0625 18.3652 19.9531C17.9707 19.8438 17.6113 19.6777 17.2871 19.4551C16.9629 19.2285 16.7051 18.9473 16.5137 18.6113C16.3223 18.2715 16.2266 17.875 16.2266 17.4219H17.6973C17.6973 17.6992 17.7441 17.9355 17.8379 18.1309C17.9355 18.3262 18.0703 18.4863 18.2422 18.6113C18.4141 18.7324 18.6133 18.8223 18.8398 18.8809C19.0703 18.9395 19.3164 18.9688 19.5781 18.9688C19.9219 18.9688 20.209 18.9199 20.4395 18.8223C20.6738 18.7246 20.8496 18.5879 20.9668 18.4121C21.084 18.2363 21.1426 18.0332 21.1426 17.8027Z",
|
|
5275
|
+
fill: color
|
|
5276
|
+
}
|
|
5277
|
+
),
|
|
5278
|
+
/* @__PURE__ */ jsx29(
|
|
5279
|
+
"path",
|
|
5280
|
+
{
|
|
5281
|
+
d: "M15.4512 18.834V20H10.9219V18.834H15.4512ZM11.3379 11.4688V20H9.86719V11.4688H11.3379ZM14.8594 15.0312V16.1797H10.9219V15.0312H14.8594ZM15.4219 11.4688V12.6406H10.9219V11.4688H15.4219Z",
|
|
5282
|
+
fill: color
|
|
5283
|
+
}
|
|
5284
|
+
)
|
|
5285
|
+
]
|
|
5286
|
+
}
|
|
5287
|
+
);
|
|
5288
|
+
var IconRender = ({
|
|
5289
|
+
iconName,
|
|
5290
|
+
color = "#000000",
|
|
5291
|
+
size = 24,
|
|
5292
|
+
weight = "regular"
|
|
5293
|
+
}) => {
|
|
5294
|
+
switch (iconName) {
|
|
5295
|
+
case "Chat_PT":
|
|
5296
|
+
return /* @__PURE__ */ jsx29(ChatPT, { size, color });
|
|
5297
|
+
case "Chat_EN":
|
|
5298
|
+
return /* @__PURE__ */ jsx29(ChatEN, { size, color });
|
|
5299
|
+
case "Chat_ES":
|
|
5300
|
+
return /* @__PURE__ */ jsx29(ChatES, { size, color });
|
|
5301
|
+
default: {
|
|
5302
|
+
const IconComponent = PhosphorIcons[iconName] || PhosphorIcons.Question;
|
|
5303
|
+
return /* @__PURE__ */ jsx29(IconComponent, { size, color, weight });
|
|
5304
|
+
}
|
|
5305
|
+
}
|
|
5306
|
+
};
|
|
5307
|
+
var IconRender_default = IconRender;
|
|
5308
|
+
|
|
5186
5309
|
// src/components/DropdownMenu/DropdownMenu.tsx
|
|
5187
5310
|
import { SignOut, User } from "phosphor-react";
|
|
5188
5311
|
import {
|
|
@@ -5195,7 +5318,7 @@ import {
|
|
|
5195
5318
|
useState as useState10
|
|
5196
5319
|
} from "react";
|
|
5197
5320
|
import { create as create4, useStore as useStore3 } from "zustand";
|
|
5198
|
-
import { jsx as
|
|
5321
|
+
import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5199
5322
|
function createDropdownStore() {
|
|
5200
5323
|
return create4((set) => ({
|
|
5201
5324
|
open: false,
|
|
@@ -5290,7 +5413,7 @@ var DropdownMenu = ({
|
|
|
5290
5413
|
setOpen(propOpen);
|
|
5291
5414
|
}
|
|
5292
5415
|
}, [propOpen]);
|
|
5293
|
-
return /* @__PURE__ */
|
|
5416
|
+
return /* @__PURE__ */ jsx30("div", { className: "relative", ref: menuRef, children: injectStore3(children, store) });
|
|
5294
5417
|
};
|
|
5295
5418
|
var DropdownMenuTrigger = ({
|
|
5296
5419
|
className,
|
|
@@ -5302,7 +5425,7 @@ var DropdownMenuTrigger = ({
|
|
|
5302
5425
|
const store = useDropdownStore(externalStore);
|
|
5303
5426
|
const open = useStore3(store, (s) => s.open);
|
|
5304
5427
|
const toggleOpen = () => store.setState({ open: !open });
|
|
5305
|
-
return /* @__PURE__ */
|
|
5428
|
+
return /* @__PURE__ */ jsx30(
|
|
5306
5429
|
"button",
|
|
5307
5430
|
{
|
|
5308
5431
|
onClick: (e) => {
|
|
@@ -5338,7 +5461,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
|
|
|
5338
5461
|
profile: "p-6"
|
|
5339
5462
|
};
|
|
5340
5463
|
var MenuLabel = forwardRef14(({ className, inset, store: _store, ...props }, ref) => {
|
|
5341
|
-
return /* @__PURE__ */
|
|
5464
|
+
return /* @__PURE__ */ jsx30(
|
|
5342
5465
|
"div",
|
|
5343
5466
|
{
|
|
5344
5467
|
ref,
|
|
@@ -5377,7 +5500,7 @@ var DropdownMenuContent = forwardRef14(
|
|
|
5377
5500
|
return `absolute ${vertical} ${horizontal}`;
|
|
5378
5501
|
};
|
|
5379
5502
|
const variantClasses = MENUCONTENT_VARIANT_CLASSES[variant];
|
|
5380
|
-
return /* @__PURE__ */
|
|
5503
|
+
return /* @__PURE__ */ jsx30(
|
|
5381
5504
|
"div",
|
|
5382
5505
|
{
|
|
5383
5506
|
ref,
|
|
@@ -5436,7 +5559,7 @@ var DropdownMenuItem = forwardRef14(
|
|
|
5436
5559
|
const getVariantProps = () => {
|
|
5437
5560
|
return variant === "profile" ? { "data-variant": "profile" } : {};
|
|
5438
5561
|
};
|
|
5439
|
-
return /* @__PURE__ */
|
|
5562
|
+
return /* @__PURE__ */ jsxs24(
|
|
5440
5563
|
"div",
|
|
5441
5564
|
{
|
|
5442
5565
|
ref,
|
|
@@ -5458,7 +5581,7 @@ var DropdownMenuItem = forwardRef14(
|
|
|
5458
5581
|
...props,
|
|
5459
5582
|
children: [
|
|
5460
5583
|
iconLeft,
|
|
5461
|
-
/* @__PURE__ */
|
|
5584
|
+
/* @__PURE__ */ jsx30("span", { className: "w-full text-md", children }),
|
|
5462
5585
|
iconRight
|
|
5463
5586
|
]
|
|
5464
5587
|
}
|
|
@@ -5466,7 +5589,7 @@ var DropdownMenuItem = forwardRef14(
|
|
|
5466
5589
|
}
|
|
5467
5590
|
);
|
|
5468
5591
|
DropdownMenuItem.displayName = "DropdownMenuItem";
|
|
5469
|
-
var DropdownMenuSeparator = forwardRef14(({ className, store: _store, ...props }, ref) => /* @__PURE__ */
|
|
5592
|
+
var DropdownMenuSeparator = forwardRef14(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ jsx30(
|
|
5470
5593
|
"div",
|
|
5471
5594
|
{
|
|
5472
5595
|
ref,
|
|
@@ -5479,7 +5602,7 @@ var ProfileMenuTrigger = forwardRef14(({ className, onClick, store: externalStor
|
|
|
5479
5602
|
const store = useDropdownStore(externalStore);
|
|
5480
5603
|
const open = useStore3(store, (s) => s.open);
|
|
5481
5604
|
const toggleOpen = () => store.setState({ open: !open });
|
|
5482
|
-
return /* @__PURE__ */
|
|
5605
|
+
return /* @__PURE__ */ jsx30(
|
|
5483
5606
|
"button",
|
|
5484
5607
|
{
|
|
5485
5608
|
ref,
|
|
@@ -5494,13 +5617,13 @@ var ProfileMenuTrigger = forwardRef14(({ className, onClick, store: externalStor
|
|
|
5494
5617
|
},
|
|
5495
5618
|
"aria-expanded": open,
|
|
5496
5619
|
...props,
|
|
5497
|
-
children: /* @__PURE__ */
|
|
5620
|
+
children: /* @__PURE__ */ jsx30("span", { className: "size-6 rounded-full bg-primary-100 flex items-center justify-center", children: /* @__PURE__ */ jsx30(User, { className: "text-primary-950", size: 18 }) })
|
|
5498
5621
|
}
|
|
5499
5622
|
);
|
|
5500
5623
|
});
|
|
5501
5624
|
ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
|
|
5502
5625
|
var ProfileMenuHeader = forwardRef14(({ className, name, email, store: _store, ...props }, ref) => {
|
|
5503
|
-
return /* @__PURE__ */
|
|
5626
|
+
return /* @__PURE__ */ jsxs24(
|
|
5504
5627
|
"div",
|
|
5505
5628
|
{
|
|
5506
5629
|
ref,
|
|
@@ -5508,10 +5631,10 @@ var ProfileMenuHeader = forwardRef14(({ className, name, email, store: _store, .
|
|
|
5508
5631
|
className: cn("flex flex-row gap-4 items-center", className),
|
|
5509
5632
|
...props,
|
|
5510
5633
|
children: [
|
|
5511
|
-
/* @__PURE__ */
|
|
5512
|
-
/* @__PURE__ */
|
|
5513
|
-
/* @__PURE__ */
|
|
5514
|
-
/* @__PURE__ */
|
|
5634
|
+
/* @__PURE__ */ jsx30("span", { className: "size-16 bg-primary-100 rounded-full flex items-center justify-center", children: /* @__PURE__ */ jsx30(User, { size: 34, className: "text-primary-950" }) }),
|
|
5635
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex flex-col ", children: [
|
|
5636
|
+
/* @__PURE__ */ jsx30("p", { className: "text-xl font-bold text-text-950", children: name }),
|
|
5637
|
+
/* @__PURE__ */ jsx30("p", { className: "text-md text-text-600", children: email })
|
|
5515
5638
|
] })
|
|
5516
5639
|
]
|
|
5517
5640
|
}
|
|
@@ -5519,7 +5642,7 @@ var ProfileMenuHeader = forwardRef14(({ className, name, email, store: _store, .
|
|
|
5519
5642
|
});
|
|
5520
5643
|
ProfileMenuHeader.displayName = "ProfileMenuHeader";
|
|
5521
5644
|
var ProfileMenuSection = forwardRef14(({ className, children, store: _store, ...props }, ref) => {
|
|
5522
|
-
return /* @__PURE__ */
|
|
5645
|
+
return /* @__PURE__ */ jsx30("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
|
|
5523
5646
|
});
|
|
5524
5647
|
ProfileMenuSection.displayName = "ProfileMenuSection";
|
|
5525
5648
|
var ProfileMenuFooter = ({
|
|
@@ -5531,7 +5654,7 @@ var ProfileMenuFooter = ({
|
|
|
5531
5654
|
}) => {
|
|
5532
5655
|
const store = useDropdownStore(externalStore);
|
|
5533
5656
|
const setOpen = useStore3(store, (s) => s.setOpen);
|
|
5534
|
-
return /* @__PURE__ */
|
|
5657
|
+
return /* @__PURE__ */ jsxs24(
|
|
5535
5658
|
Button_default,
|
|
5536
5659
|
{
|
|
5537
5660
|
variant: "outline",
|
|
@@ -5543,8 +5666,8 @@ var ProfileMenuFooter = ({
|
|
|
5543
5666
|
},
|
|
5544
5667
|
...props,
|
|
5545
5668
|
children: [
|
|
5546
|
-
/* @__PURE__ */
|
|
5547
|
-
/* @__PURE__ */
|
|
5669
|
+
/* @__PURE__ */ jsx30("span", { className: "mr-2 flex items-center", children: /* @__PURE__ */ jsx30(SignOut, {}) }),
|
|
5670
|
+
/* @__PURE__ */ jsx30("span", { children: "Sair" })
|
|
5548
5671
|
]
|
|
5549
5672
|
}
|
|
5550
5673
|
);
|
|
@@ -5564,7 +5687,7 @@ import {
|
|
|
5564
5687
|
useId as useId8
|
|
5565
5688
|
} from "react";
|
|
5566
5689
|
import { CaretDown, Check as Check5, WarningCircle as WarningCircle5 } from "phosphor-react";
|
|
5567
|
-
import { Fragment as Fragment6, jsx as
|
|
5690
|
+
import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5568
5691
|
var VARIANT_CLASSES4 = {
|
|
5569
5692
|
outlined: "border rounded-lg focus:border-primary-950",
|
|
5570
5693
|
underlined: "border-b focus:border-primary-950",
|
|
@@ -5624,7 +5747,7 @@ function getLabelAsNode(children) {
|
|
|
5624
5747
|
}
|
|
5625
5748
|
const flattened = Children4.toArray(children);
|
|
5626
5749
|
if (flattened.length === 1) return flattened[0];
|
|
5627
|
-
return /* @__PURE__ */
|
|
5750
|
+
return /* @__PURE__ */ jsx31(Fragment6, { children: flattened });
|
|
5628
5751
|
}
|
|
5629
5752
|
var injectStore4 = (children, store, size, selectId) => {
|
|
5630
5753
|
return Children4.map(children, (child) => {
|
|
@@ -5734,8 +5857,8 @@ var Select = ({
|
|
|
5734
5857
|
}
|
|
5735
5858
|
}, [propValue]);
|
|
5736
5859
|
const sizeClasses = SIZE_CLASSES12[size];
|
|
5737
|
-
return /* @__PURE__ */
|
|
5738
|
-
label && /* @__PURE__ */
|
|
5860
|
+
return /* @__PURE__ */ jsxs25("div", { className: "w-full", children: [
|
|
5861
|
+
label && /* @__PURE__ */ jsx31(
|
|
5739
5862
|
"label",
|
|
5740
5863
|
{
|
|
5741
5864
|
htmlFor: selectId,
|
|
@@ -5743,11 +5866,11 @@ var Select = ({
|
|
|
5743
5866
|
children: label
|
|
5744
5867
|
}
|
|
5745
5868
|
),
|
|
5746
|
-
/* @__PURE__ */
|
|
5747
|
-
/* @__PURE__ */
|
|
5748
|
-
helperText && /* @__PURE__ */
|
|
5749
|
-
errorMessage && /* @__PURE__ */
|
|
5750
|
-
/* @__PURE__ */
|
|
5869
|
+
/* @__PURE__ */ jsx31("div", { className: cn("relative", sizeClasses), ref: selectRef, children: injectStore4(children, store, size, selectId) }),
|
|
5870
|
+
/* @__PURE__ */ jsxs25("div", { className: "mt-1.5 gap-1.5", children: [
|
|
5871
|
+
helperText && /* @__PURE__ */ jsx31("p", { className: "text-sm text-text-500", children: helperText }),
|
|
5872
|
+
errorMessage && /* @__PURE__ */ jsxs25("p", { className: "flex gap-1 items-center text-sm text-indicator-error", children: [
|
|
5873
|
+
/* @__PURE__ */ jsx31(WarningCircle5, { size: 16 }),
|
|
5751
5874
|
" ",
|
|
5752
5875
|
errorMessage
|
|
5753
5876
|
] })
|
|
@@ -5761,7 +5884,7 @@ var SelectValue = ({
|
|
|
5761
5884
|
const store = useSelectStore(externalStore);
|
|
5762
5885
|
const selectedLabel = useStore4(store, (s) => s.selectedLabel);
|
|
5763
5886
|
const value = useStore4(store, (s) => s.value);
|
|
5764
|
-
return /* @__PURE__ */
|
|
5887
|
+
return /* @__PURE__ */ jsx31("span", { className: "text-inherit", children: selectedLabel || placeholder || value });
|
|
5765
5888
|
};
|
|
5766
5889
|
var SelectTrigger = forwardRef15(
|
|
5767
5890
|
({
|
|
@@ -5780,7 +5903,7 @@ var SelectTrigger = forwardRef15(
|
|
|
5780
5903
|
const variantClasses = VARIANT_CLASSES4[variant];
|
|
5781
5904
|
const heightClasses = HEIGHT_CLASSES[size];
|
|
5782
5905
|
const paddingClasses = PADDING_CLASSES[size];
|
|
5783
|
-
return /* @__PURE__ */
|
|
5906
|
+
return /* @__PURE__ */ jsxs25(
|
|
5784
5907
|
"button",
|
|
5785
5908
|
{
|
|
5786
5909
|
ref,
|
|
@@ -5801,7 +5924,7 @@ var SelectTrigger = forwardRef15(
|
|
|
5801
5924
|
...props,
|
|
5802
5925
|
children: [
|
|
5803
5926
|
props.children,
|
|
5804
|
-
/* @__PURE__ */
|
|
5927
|
+
/* @__PURE__ */ jsx31(
|
|
5805
5928
|
CaretDown,
|
|
5806
5929
|
{
|
|
5807
5930
|
className: cn(
|
|
@@ -5829,7 +5952,7 @@ var SelectContent = forwardRef15(
|
|
|
5829
5952
|
const open = useStore4(store, (s) => s.open);
|
|
5830
5953
|
if (!open) return null;
|
|
5831
5954
|
const getPositionClasses = () => `w-full min-w-full absolute ${SIDE_CLASSES2[side]} ${ALIGN_CLASSES2[align]}`;
|
|
5832
|
-
return /* @__PURE__ */
|
|
5955
|
+
return /* @__PURE__ */ jsx31(
|
|
5833
5956
|
"div",
|
|
5834
5957
|
{
|
|
5835
5958
|
role: "menu",
|
|
@@ -5873,7 +5996,7 @@ var SelectItem = forwardRef15(
|
|
|
5873
5996
|
}
|
|
5874
5997
|
props.onClick?.(e);
|
|
5875
5998
|
};
|
|
5876
|
-
return /* @__PURE__ */
|
|
5999
|
+
return /* @__PURE__ */ jsxs25(
|
|
5877
6000
|
"div",
|
|
5878
6001
|
{
|
|
5879
6002
|
role: "menuitem",
|
|
@@ -5893,7 +6016,7 @@ var SelectItem = forwardRef15(
|
|
|
5893
6016
|
tabIndex: disabled ? -1 : 0,
|
|
5894
6017
|
...props,
|
|
5895
6018
|
children: [
|
|
5896
|
-
/* @__PURE__ */
|
|
6019
|
+
/* @__PURE__ */ jsx31("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: selectedValue === value && /* @__PURE__ */ jsx31(Check5, { className: "" }) }),
|
|
5897
6020
|
children
|
|
5898
6021
|
]
|
|
5899
6022
|
}
|
|
@@ -5915,7 +6038,7 @@ import {
|
|
|
5915
6038
|
useState as useState11
|
|
5916
6039
|
} from "react";
|
|
5917
6040
|
import { CaretLeft, CaretRight as CaretRight3 } from "phosphor-react";
|
|
5918
|
-
import { jsx as
|
|
6041
|
+
import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5919
6042
|
var createMenuStore = (onValueChange) => create6((set) => ({
|
|
5920
6043
|
value: "",
|
|
5921
6044
|
setValue: (value) => {
|
|
@@ -5952,7 +6075,7 @@ var Menu = forwardRef16(
|
|
|
5952
6075
|
}, [defaultValue, propValue, setValue]);
|
|
5953
6076
|
const baseClasses = "w-full py-2 flex flex-row items-center justify-center";
|
|
5954
6077
|
const variantClasses = VARIANT_CLASSES5[variant];
|
|
5955
|
-
return /* @__PURE__ */
|
|
6078
|
+
return /* @__PURE__ */ jsx32(
|
|
5956
6079
|
"div",
|
|
5957
6080
|
{
|
|
5958
6081
|
ref,
|
|
@@ -5972,7 +6095,7 @@ var MenuContent = forwardRef16(
|
|
|
5972
6095
|
({ className, children, variant = "menu", ...props }, ref) => {
|
|
5973
6096
|
const baseClasses = "w-full flex flex-row items-center gap-2";
|
|
5974
6097
|
const variantClasses = variant === "menu2" ? "overflow-x-auto scroll-smooth" : "";
|
|
5975
|
-
return /* @__PURE__ */
|
|
6098
|
+
return /* @__PURE__ */ jsx32(
|
|
5976
6099
|
"ul",
|
|
5977
6100
|
{
|
|
5978
6101
|
ref,
|
|
@@ -6024,7 +6147,7 @@ var MenuItem = forwardRef16(
|
|
|
6024
6147
|
...props
|
|
6025
6148
|
};
|
|
6026
6149
|
const variants = {
|
|
6027
|
-
menu: /* @__PURE__ */
|
|
6150
|
+
menu: /* @__PURE__ */ jsx32(
|
|
6028
6151
|
"li",
|
|
6029
6152
|
{
|
|
6030
6153
|
"data-variant": "menu",
|
|
@@ -6039,7 +6162,7 @@ var MenuItem = forwardRef16(
|
|
|
6039
6162
|
children
|
|
6040
6163
|
}
|
|
6041
6164
|
),
|
|
6042
|
-
menu2: /* @__PURE__ */
|
|
6165
|
+
menu2: /* @__PURE__ */ jsxs26(
|
|
6043
6166
|
"li",
|
|
6044
6167
|
{
|
|
6045
6168
|
"data-variant": "menu2",
|
|
@@ -6050,7 +6173,7 @@ var MenuItem = forwardRef16(
|
|
|
6050
6173
|
`,
|
|
6051
6174
|
...commonProps,
|
|
6052
6175
|
children: [
|
|
6053
|
-
/* @__PURE__ */
|
|
6176
|
+
/* @__PURE__ */ jsx32(
|
|
6054
6177
|
"span",
|
|
6055
6178
|
{
|
|
6056
6179
|
className: cn(
|
|
@@ -6060,11 +6183,11 @@ var MenuItem = forwardRef16(
|
|
|
6060
6183
|
children
|
|
6061
6184
|
}
|
|
6062
6185
|
),
|
|
6063
|
-
selectedValue === value && /* @__PURE__ */
|
|
6186
|
+
selectedValue === value && /* @__PURE__ */ jsx32("div", { className: "h-1 w-full bg-primary-950 rounded-lg" })
|
|
6064
6187
|
]
|
|
6065
6188
|
}
|
|
6066
6189
|
),
|
|
6067
|
-
breadcrumb: /* @__PURE__ */
|
|
6190
|
+
breadcrumb: /* @__PURE__ */ jsxs26(
|
|
6068
6191
|
"li",
|
|
6069
6192
|
{
|
|
6070
6193
|
"data-variant": "breadcrumb",
|
|
@@ -6076,7 +6199,7 @@ var MenuItem = forwardRef16(
|
|
|
6076
6199
|
`,
|
|
6077
6200
|
...commonProps,
|
|
6078
6201
|
children: [
|
|
6079
|
-
/* @__PURE__ */
|
|
6202
|
+
/* @__PURE__ */ jsx32(
|
|
6080
6203
|
"span",
|
|
6081
6204
|
{
|
|
6082
6205
|
className: cn(
|
|
@@ -6086,7 +6209,7 @@ var MenuItem = forwardRef16(
|
|
|
6086
6209
|
children
|
|
6087
6210
|
}
|
|
6088
6211
|
),
|
|
6089
|
-
separator && /* @__PURE__ */
|
|
6212
|
+
separator && /* @__PURE__ */ jsx32(
|
|
6090
6213
|
CaretRight3,
|
|
6091
6214
|
{
|
|
6092
6215
|
size: 16,
|
|
@@ -6141,25 +6264,25 @@ var MenuOverflow = ({
|
|
|
6141
6264
|
window.removeEventListener("resize", checkScroll);
|
|
6142
6265
|
};
|
|
6143
6266
|
}, []);
|
|
6144
|
-
return /* @__PURE__ */
|
|
6267
|
+
return /* @__PURE__ */ jsxs26(
|
|
6145
6268
|
"div",
|
|
6146
6269
|
{
|
|
6147
6270
|
"data-testid": "menu-overflow-wrapper",
|
|
6148
6271
|
className: cn("relative w-full overflow-hidden", className),
|
|
6149
6272
|
children: [
|
|
6150
|
-
showLeftArrow && /* @__PURE__ */
|
|
6273
|
+
showLeftArrow && /* @__PURE__ */ jsxs26(
|
|
6151
6274
|
"button",
|
|
6152
6275
|
{
|
|
6153
6276
|
onClick: () => internalScroll(containerRef.current, "left"),
|
|
6154
6277
|
className: "absolute left-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
6155
6278
|
"data-testid": "scroll-left-button",
|
|
6156
6279
|
children: [
|
|
6157
|
-
/* @__PURE__ */
|
|
6158
|
-
/* @__PURE__ */
|
|
6280
|
+
/* @__PURE__ */ jsx32(CaretLeft, { size: 16 }),
|
|
6281
|
+
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Scroll left" })
|
|
6159
6282
|
]
|
|
6160
6283
|
}
|
|
6161
6284
|
),
|
|
6162
|
-
/* @__PURE__ */
|
|
6285
|
+
/* @__PURE__ */ jsx32(
|
|
6163
6286
|
Menu,
|
|
6164
6287
|
{
|
|
6165
6288
|
defaultValue,
|
|
@@ -6167,18 +6290,18 @@ var MenuOverflow = ({
|
|
|
6167
6290
|
value,
|
|
6168
6291
|
variant: "menu2",
|
|
6169
6292
|
...props,
|
|
6170
|
-
children: /* @__PURE__ */
|
|
6293
|
+
children: /* @__PURE__ */ jsx32(MenuContent, { ref: containerRef, variant: "menu2", children })
|
|
6171
6294
|
}
|
|
6172
6295
|
),
|
|
6173
|
-
showRightArrow && /* @__PURE__ */
|
|
6296
|
+
showRightArrow && /* @__PURE__ */ jsxs26(
|
|
6174
6297
|
"button",
|
|
6175
6298
|
{
|
|
6176
6299
|
onClick: () => internalScroll(containerRef.current, "right"),
|
|
6177
6300
|
className: "absolute right-0 top-1/2 -translate-y-1/2 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md cursor-pointer",
|
|
6178
6301
|
"data-testid": "scroll-right-button",
|
|
6179
6302
|
children: [
|
|
6180
|
-
/* @__PURE__ */
|
|
6181
|
-
/* @__PURE__ */
|
|
6303
|
+
/* @__PURE__ */ jsx32(CaretRight3, { size: 16 }),
|
|
6304
|
+
/* @__PURE__ */ jsx32("span", { className: "sr-only", children: "Scroll right" })
|
|
6182
6305
|
]
|
|
6183
6306
|
}
|
|
6184
6307
|
)
|
|
@@ -6199,7 +6322,7 @@ var Menu_default = Menu;
|
|
|
6199
6322
|
|
|
6200
6323
|
// src/components/Skeleton/Skeleton.tsx
|
|
6201
6324
|
import { forwardRef as forwardRef17 } from "react";
|
|
6202
|
-
import { jsx as
|
|
6325
|
+
import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
6203
6326
|
var SKELETON_ANIMATION_CLASSES = {
|
|
6204
6327
|
pulse: "animate-pulse",
|
|
6205
6328
|
none: ""
|
|
@@ -6236,13 +6359,13 @@ var Skeleton = forwardRef17(
|
|
|
6236
6359
|
height: typeof height === "number" ? `${height}px` : height
|
|
6237
6360
|
};
|
|
6238
6361
|
if (variant === "text" && lines > 1) {
|
|
6239
|
-
return /* @__PURE__ */
|
|
6362
|
+
return /* @__PURE__ */ jsx33(
|
|
6240
6363
|
"div",
|
|
6241
6364
|
{
|
|
6242
6365
|
ref,
|
|
6243
6366
|
className: cn("flex flex-col", spacingClass, className),
|
|
6244
6367
|
...props,
|
|
6245
|
-
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */
|
|
6368
|
+
children: Array.from({ length: lines }, (_, index) => /* @__PURE__ */ jsx33(
|
|
6246
6369
|
"div",
|
|
6247
6370
|
{
|
|
6248
6371
|
className: cn(variantClass, animationClass),
|
|
@@ -6253,7 +6376,7 @@ var Skeleton = forwardRef17(
|
|
|
6253
6376
|
}
|
|
6254
6377
|
);
|
|
6255
6378
|
}
|
|
6256
|
-
return /* @__PURE__ */
|
|
6379
|
+
return /* @__PURE__ */ jsx33(
|
|
6257
6380
|
"div",
|
|
6258
6381
|
{
|
|
6259
6382
|
ref,
|
|
@@ -6266,11 +6389,11 @@ var Skeleton = forwardRef17(
|
|
|
6266
6389
|
}
|
|
6267
6390
|
);
|
|
6268
6391
|
var SkeletonText = forwardRef17(
|
|
6269
|
-
(props, ref) => /* @__PURE__ */
|
|
6392
|
+
(props, ref) => /* @__PURE__ */ jsx33(Skeleton, { ref, variant: "text", ...props })
|
|
6270
6393
|
);
|
|
6271
|
-
var SkeletonCircle = forwardRef17((props, ref) => /* @__PURE__ */
|
|
6272
|
-
var SkeletonRectangle = forwardRef17((props, ref) => /* @__PURE__ */
|
|
6273
|
-
var SkeletonRounded = forwardRef17((props, ref) => /* @__PURE__ */
|
|
6394
|
+
var SkeletonCircle = forwardRef17((props, ref) => /* @__PURE__ */ jsx33(Skeleton, { ref, variant: "circular", ...props }));
|
|
6395
|
+
var SkeletonRectangle = forwardRef17((props, ref) => /* @__PURE__ */ jsx33(Skeleton, { ref, variant: "rectangular", ...props }));
|
|
6396
|
+
var SkeletonRounded = forwardRef17((props, ref) => /* @__PURE__ */ jsx33(Skeleton, { ref, variant: "rounded", ...props }));
|
|
6274
6397
|
var SkeletonCard = forwardRef17(
|
|
6275
6398
|
({
|
|
6276
6399
|
showAvatar = true,
|
|
@@ -6281,7 +6404,7 @@ var SkeletonCard = forwardRef17(
|
|
|
6281
6404
|
className = "",
|
|
6282
6405
|
...props
|
|
6283
6406
|
}, ref) => {
|
|
6284
|
-
return /* @__PURE__ */
|
|
6407
|
+
return /* @__PURE__ */ jsxs27(
|
|
6285
6408
|
"div",
|
|
6286
6409
|
{
|
|
6287
6410
|
ref,
|
|
@@ -6291,16 +6414,16 @@ var SkeletonCard = forwardRef17(
|
|
|
6291
6414
|
),
|
|
6292
6415
|
...props,
|
|
6293
6416
|
children: [
|
|
6294
|
-
/* @__PURE__ */
|
|
6295
|
-
showAvatar && /* @__PURE__ */
|
|
6296
|
-
/* @__PURE__ */
|
|
6297
|
-
showTitle && /* @__PURE__ */
|
|
6298
|
-
showDescription && /* @__PURE__ */
|
|
6417
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex items-start space-x-3", children: [
|
|
6418
|
+
showAvatar && /* @__PURE__ */ jsx33(SkeletonCircle, { width: 40, height: 40 }),
|
|
6419
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex-1 space-y-2", children: [
|
|
6420
|
+
showTitle && /* @__PURE__ */ jsx33(SkeletonText, { width: "60%", height: 20 }),
|
|
6421
|
+
showDescription && /* @__PURE__ */ jsx33(SkeletonText, { lines, spacing: "small" })
|
|
6299
6422
|
] })
|
|
6300
6423
|
] }),
|
|
6301
|
-
showActions && /* @__PURE__ */
|
|
6302
|
-
/* @__PURE__ */
|
|
6303
|
-
/* @__PURE__ */
|
|
6424
|
+
showActions && /* @__PURE__ */ jsxs27("div", { className: "flex justify-end space-x-2 mt-4", children: [
|
|
6425
|
+
/* @__PURE__ */ jsx33(SkeletonRectangle, { width: 80, height: 32 }),
|
|
6426
|
+
/* @__PURE__ */ jsx33(SkeletonRectangle, { width: 80, height: 32 })
|
|
6304
6427
|
] })
|
|
6305
6428
|
]
|
|
6306
6429
|
}
|
|
@@ -6317,19 +6440,19 @@ var SkeletonList = forwardRef17(
|
|
|
6317
6440
|
className = "",
|
|
6318
6441
|
...props
|
|
6319
6442
|
}, ref) => {
|
|
6320
|
-
return /* @__PURE__ */
|
|
6321
|
-
showAvatar && /* @__PURE__ */
|
|
6322
|
-
/* @__PURE__ */
|
|
6323
|
-
showTitle && /* @__PURE__ */
|
|
6324
|
-
showDescription && /* @__PURE__ */
|
|
6443
|
+
return /* @__PURE__ */ jsx33("div", { ref, className: cn("space-y-3", className), ...props, children: Array.from({ length: items }, (_, index) => /* @__PURE__ */ jsxs27("div", { className: "flex items-start space-x-3 p-3", children: [
|
|
6444
|
+
showAvatar && /* @__PURE__ */ jsx33(SkeletonCircle, { width: 32, height: 32 }),
|
|
6445
|
+
/* @__PURE__ */ jsxs27("div", { className: "flex-1 space-y-2", children: [
|
|
6446
|
+
showTitle && /* @__PURE__ */ jsx33(SkeletonText, { width: "40%", height: 16 }),
|
|
6447
|
+
showDescription && /* @__PURE__ */ jsx33(SkeletonText, { lines, spacing: "small" })
|
|
6325
6448
|
] })
|
|
6326
6449
|
] }, index)) });
|
|
6327
6450
|
}
|
|
6328
6451
|
);
|
|
6329
6452
|
var SkeletonTable = forwardRef17(
|
|
6330
6453
|
({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
|
|
6331
|
-
return /* @__PURE__ */
|
|
6332
|
-
showHeader && /* @__PURE__ */
|
|
6454
|
+
return /* @__PURE__ */ jsxs27("div", { ref, className: cn("w-full", className), ...props, children: [
|
|
6455
|
+
showHeader && /* @__PURE__ */ jsx33("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ jsx33(
|
|
6333
6456
|
SkeletonText,
|
|
6334
6457
|
{
|
|
6335
6458
|
width: `${100 / columns}%`,
|
|
@@ -6337,7 +6460,7 @@ var SkeletonTable = forwardRef17(
|
|
|
6337
6460
|
},
|
|
6338
6461
|
index
|
|
6339
6462
|
)) }),
|
|
6340
|
-
/* @__PURE__ */
|
|
6463
|
+
/* @__PURE__ */ jsx33("div", { className: "space-y-2", children: Array.from({ length: rows }, (_, rowIndex) => /* @__PURE__ */ jsx33("div", { className: "flex space-x-2", children: Array.from({ length: columns }, (_2, colIndex) => /* @__PURE__ */ jsx33(
|
|
6341
6464
|
SkeletonText,
|
|
6342
6465
|
{
|
|
6343
6466
|
width: `${100 / columns}%`,
|
|
@@ -6350,7 +6473,7 @@ var SkeletonTable = forwardRef17(
|
|
|
6350
6473
|
);
|
|
6351
6474
|
|
|
6352
6475
|
// src/components/NotFound/NotFound.tsx
|
|
6353
|
-
import { jsx as
|
|
6476
|
+
import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
6354
6477
|
var NotFound = ({
|
|
6355
6478
|
title,
|
|
6356
6479
|
description,
|
|
@@ -6393,22 +6516,22 @@ var NotFound = ({
|
|
|
6393
6516
|
const errorTitle = title || getDefaultTitle();
|
|
6394
6517
|
const errorDescription = description || getDefaultDescription();
|
|
6395
6518
|
const errorCode = getErrorCode();
|
|
6396
|
-
return /* @__PURE__ */
|
|
6519
|
+
return /* @__PURE__ */ jsx34(
|
|
6397
6520
|
"div",
|
|
6398
6521
|
{
|
|
6399
6522
|
className: cn(
|
|
6400
6523
|
"flex flex-col w-full h-screen items-center justify-center bg-background-50 px-4",
|
|
6401
6524
|
className
|
|
6402
6525
|
),
|
|
6403
|
-
children: /* @__PURE__ */
|
|
6526
|
+
children: /* @__PURE__ */ jsx34(
|
|
6404
6527
|
"main",
|
|
6405
6528
|
{
|
|
6406
6529
|
role: "main",
|
|
6407
6530
|
"aria-labelledby": "error-title",
|
|
6408
6531
|
"aria-describedby": "error-description",
|
|
6409
6532
|
className: "flex flex-col items-center text-center max-w-md space-y-6",
|
|
6410
|
-
children: /* @__PURE__ */
|
|
6411
|
-
/* @__PURE__ */
|
|
6533
|
+
children: /* @__PURE__ */ jsxs28("section", { "aria-label": `Erro ${errorCode}`, children: [
|
|
6534
|
+
/* @__PURE__ */ jsx34(
|
|
6412
6535
|
"div",
|
|
6413
6536
|
{
|
|
6414
6537
|
className: "text-8xl font-bold text-primary-300 select-none",
|
|
@@ -6416,8 +6539,8 @@ var NotFound = ({
|
|
|
6416
6539
|
children: errorCode
|
|
6417
6540
|
}
|
|
6418
6541
|
),
|
|
6419
|
-
/* @__PURE__ */
|
|
6420
|
-
/* @__PURE__ */
|
|
6542
|
+
/* @__PURE__ */ jsxs28("header", { className: "space-y-2", children: [
|
|
6543
|
+
/* @__PURE__ */ jsx34(
|
|
6421
6544
|
Text_default,
|
|
6422
6545
|
{
|
|
6423
6546
|
size: "xl",
|
|
@@ -6428,9 +6551,9 @@ var NotFound = ({
|
|
|
6428
6551
|
children: errorTitle
|
|
6429
6552
|
}
|
|
6430
6553
|
),
|
|
6431
|
-
/* @__PURE__ */
|
|
6554
|
+
/* @__PURE__ */ jsx34(Text_default, { size: "md", className: "text-text-600", id: "error-description", children: errorDescription })
|
|
6432
6555
|
] }),
|
|
6433
|
-
onButtonClick && /* @__PURE__ */
|
|
6556
|
+
onButtonClick && /* @__PURE__ */ jsx34("nav", { "aria-label": "Navega\xE7\xE3o de erro", children: /* @__PURE__ */ jsx34(
|
|
6434
6557
|
Button_default,
|
|
6435
6558
|
{
|
|
6436
6559
|
onClick: handleButtonClick,
|
|
@@ -6460,7 +6583,7 @@ import {
|
|
|
6460
6583
|
useMemo as useMemo3
|
|
6461
6584
|
} from "react";
|
|
6462
6585
|
import { useLocation, Navigate } from "react-router-dom";
|
|
6463
|
-
import { Fragment as Fragment7, jsx as
|
|
6586
|
+
import { Fragment as Fragment7, jsx as jsx35 } from "react/jsx-runtime";
|
|
6464
6587
|
var AuthContext = createContext(void 0);
|
|
6465
6588
|
var AuthProvider = ({
|
|
6466
6589
|
children,
|
|
@@ -6530,7 +6653,7 @@ var AuthProvider = ({
|
|
|
6530
6653
|
}),
|
|
6531
6654
|
[authState, checkAuth, signOut]
|
|
6532
6655
|
);
|
|
6533
|
-
return /* @__PURE__ */
|
|
6656
|
+
return /* @__PURE__ */ jsx35(AuthContext.Provider, { value: contextValue, children });
|
|
6534
6657
|
};
|
|
6535
6658
|
var useAuth = () => {
|
|
6536
6659
|
const context = useContext(AuthContext);
|
|
@@ -6546,9 +6669,9 @@ var ProtectedRoute = ({
|
|
|
6546
6669
|
additionalCheck
|
|
6547
6670
|
}) => {
|
|
6548
6671
|
const { isAuthenticated, isLoading, ...authState } = useAuth();
|
|
6549
|
-
const defaultLoadingComponent = /* @__PURE__ */
|
|
6672
|
+
const defaultLoadingComponent = /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx35("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
6550
6673
|
if (isLoading) {
|
|
6551
|
-
return /* @__PURE__ */
|
|
6674
|
+
return /* @__PURE__ */ jsx35(Fragment7, { children: loadingComponent || defaultLoadingComponent });
|
|
6552
6675
|
}
|
|
6553
6676
|
if (!isAuthenticated) {
|
|
6554
6677
|
if (typeof window !== "undefined") {
|
|
@@ -6559,12 +6682,12 @@ var ProtectedRoute = ({
|
|
|
6559
6682
|
return null;
|
|
6560
6683
|
}
|
|
6561
6684
|
}
|
|
6562
|
-
return /* @__PURE__ */
|
|
6685
|
+
return /* @__PURE__ */ jsx35(Navigate, { to: redirectTo, replace: true });
|
|
6563
6686
|
}
|
|
6564
6687
|
if (additionalCheck && !additionalCheck({ isAuthenticated, isLoading, ...authState })) {
|
|
6565
|
-
return /* @__PURE__ */
|
|
6688
|
+
return /* @__PURE__ */ jsx35(Navigate, { to: redirectTo, replace: true });
|
|
6566
6689
|
}
|
|
6567
|
-
return /* @__PURE__ */
|
|
6690
|
+
return /* @__PURE__ */ jsx35(Fragment7, { children });
|
|
6568
6691
|
};
|
|
6569
6692
|
var PublicRoute = ({
|
|
6570
6693
|
children,
|
|
@@ -6574,15 +6697,15 @@ var PublicRoute = ({
|
|
|
6574
6697
|
}) => {
|
|
6575
6698
|
const { isAuthenticated, isLoading } = useAuth();
|
|
6576
6699
|
if (checkAuthBeforeRender && isLoading) {
|
|
6577
|
-
return /* @__PURE__ */
|
|
6700
|
+
return /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-center min-h-screen", children: /* @__PURE__ */ jsx35("div", { className: "text-text-950 text-lg", children: "Carregando..." }) });
|
|
6578
6701
|
}
|
|
6579
6702
|
if (isAuthenticated && redirectIfAuthenticated) {
|
|
6580
|
-
return /* @__PURE__ */
|
|
6703
|
+
return /* @__PURE__ */ jsx35(Navigate, { to: redirectTo, replace: true });
|
|
6581
6704
|
}
|
|
6582
|
-
return /* @__PURE__ */
|
|
6705
|
+
return /* @__PURE__ */ jsx35(Fragment7, { children });
|
|
6583
6706
|
};
|
|
6584
6707
|
var withAuth = (Component, options = {}) => {
|
|
6585
|
-
return (props) => /* @__PURE__ */
|
|
6708
|
+
return (props) => /* @__PURE__ */ jsx35(ProtectedRoute, { ...options, children: /* @__PURE__ */ jsx35(Component, { ...props }) });
|
|
6586
6709
|
};
|
|
6587
6710
|
var useAuthGuard = (options = {}) => {
|
|
6588
6711
|
const authState = useAuth();
|
|
@@ -6597,7 +6720,7 @@ var useAuthGuard = (options = {}) => {
|
|
|
6597
6720
|
var useRouteAuth = (fallbackPath = "/") => {
|
|
6598
6721
|
const { isAuthenticated, isLoading } = useAuth();
|
|
6599
6722
|
const location = useLocation();
|
|
6600
|
-
const redirectToLogin = () => /* @__PURE__ */
|
|
6723
|
+
const redirectToLogin = () => /* @__PURE__ */ jsx35(Navigate, { to: fallbackPath, state: { from: location }, replace: true });
|
|
6601
6724
|
return {
|
|
6602
6725
|
isAuthenticated,
|
|
6603
6726
|
isLoading,
|
|
@@ -7148,9 +7271,9 @@ var useQuizStore = create7()(
|
|
|
7148
7271
|
var simulated_result_default = "./simulated-result-QN5HCUY5.png";
|
|
7149
7272
|
|
|
7150
7273
|
// src/components/Quiz/Quiz.tsx
|
|
7151
|
-
import { Fragment as Fragment8, jsx as
|
|
7274
|
+
import { Fragment as Fragment8, jsx as jsx36, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7152
7275
|
var Quiz = forwardRef18(({ children, className, ...props }, ref) => {
|
|
7153
|
-
return /* @__PURE__ */
|
|
7276
|
+
return /* @__PURE__ */ jsx36(
|
|
7154
7277
|
"div",
|
|
7155
7278
|
{
|
|
7156
7279
|
ref,
|
|
@@ -7194,7 +7317,7 @@ var QuizHeaderResult = forwardRef18(
|
|
|
7194
7317
|
);
|
|
7195
7318
|
}
|
|
7196
7319
|
}, [currentQuestion, getAllCurrentAnswer]);
|
|
7197
|
-
return /* @__PURE__ */
|
|
7320
|
+
return /* @__PURE__ */ jsxs29(
|
|
7198
7321
|
"div",
|
|
7199
7322
|
{
|
|
7200
7323
|
ref,
|
|
@@ -7205,8 +7328,8 @@ var QuizHeaderResult = forwardRef18(
|
|
|
7205
7328
|
),
|
|
7206
7329
|
...props,
|
|
7207
7330
|
children: [
|
|
7208
|
-
/* @__PURE__ */
|
|
7209
|
-
/* @__PURE__ */
|
|
7331
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-950 font-bold text-lg", children: "Resultado" }),
|
|
7332
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-700 text-md", children: isCorrect ? "\u{1F389} Parab\xE9ns!!" : "N\xE3o foi dessa vez..." })
|
|
7210
7333
|
]
|
|
7211
7334
|
}
|
|
7212
7335
|
);
|
|
@@ -7224,7 +7347,7 @@ var QuizTitle = forwardRef18(
|
|
|
7224
7347
|
} = useQuizStore();
|
|
7225
7348
|
const totalQuestions = getTotalQuestions();
|
|
7226
7349
|
const quizTitle = getQuizTitle();
|
|
7227
|
-
return /* @__PURE__ */
|
|
7350
|
+
return /* @__PURE__ */ jsxs29(
|
|
7228
7351
|
"div",
|
|
7229
7352
|
{
|
|
7230
7353
|
ref,
|
|
@@ -7234,11 +7357,11 @@ var QuizTitle = forwardRef18(
|
|
|
7234
7357
|
),
|
|
7235
7358
|
...props,
|
|
7236
7359
|
children: [
|
|
7237
|
-
/* @__PURE__ */
|
|
7238
|
-
/* @__PURE__ */
|
|
7239
|
-
/* @__PURE__ */
|
|
7360
|
+
/* @__PURE__ */ jsxs29("span", { className: "flex flex-col gap-2 text-center", children: [
|
|
7361
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-950 font-bold text-md", children: quizTitle }),
|
|
7362
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-600 text-xs", children: totalQuestions > 0 ? `${currentQuestionIndex + 1} de ${totalQuestions}` : "0 de 0" })
|
|
7240
7363
|
] }),
|
|
7241
|
-
/* @__PURE__ */
|
|
7364
|
+
/* @__PURE__ */ jsx36("span", { className: "absolute right-2", children: /* @__PURE__ */ jsx36(Badge_default, { variant: "outlined", action: "info", iconLeft: /* @__PURE__ */ jsx36(Clock2, {}), children: isStarted ? formatTime(timeElapsed) : "00:00" }) })
|
|
7242
7365
|
]
|
|
7243
7366
|
}
|
|
7244
7367
|
);
|
|
@@ -7247,7 +7370,7 @@ var QuizTitle = forwardRef18(
|
|
|
7247
7370
|
var QuizHeader = () => {
|
|
7248
7371
|
const { getCurrentQuestion } = useQuizStore();
|
|
7249
7372
|
const currentQuestion = getCurrentQuestion();
|
|
7250
|
-
return /* @__PURE__ */
|
|
7373
|
+
return /* @__PURE__ */ jsx36(
|
|
7251
7374
|
HeaderAlternative,
|
|
7252
7375
|
{
|
|
7253
7376
|
title: currentQuestion ? `Quest\xE3o ${currentQuestion.id}` : "Quest\xE3o",
|
|
@@ -7259,9 +7382,9 @@ var QuizHeader = () => {
|
|
|
7259
7382
|
var QuizContent = forwardRef18(({ type = "Alternativas", className, variant, ...props }, ref) => {
|
|
7260
7383
|
const { getCurrentQuestion } = useQuizStore();
|
|
7261
7384
|
const currentQuestion = getCurrentQuestion();
|
|
7262
|
-
return /* @__PURE__ */
|
|
7263
|
-
/* @__PURE__ */
|
|
7264
|
-
/* @__PURE__ */
|
|
7385
|
+
return /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
7386
|
+
/* @__PURE__ */ jsx36("div", { className: "px-4 pb-2 pt-6", children: /* @__PURE__ */ jsx36("p", { className: "font-bold text-lg text-text-950", children: type }) }),
|
|
7387
|
+
/* @__PURE__ */ jsx36(
|
|
7265
7388
|
"div",
|
|
7266
7389
|
{
|
|
7267
7390
|
ref,
|
|
@@ -7270,10 +7393,10 @@ var QuizContent = forwardRef18(({ type = "Alternativas", className, variant, ...
|
|
|
7270
7393
|
className
|
|
7271
7394
|
),
|
|
7272
7395
|
...props,
|
|
7273
|
-
children: currentQuestion && /* @__PURE__ */
|
|
7274
|
-
currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */
|
|
7275
|
-
currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */
|
|
7276
|
-
currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */
|
|
7396
|
+
children: currentQuestion && /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
7397
|
+
currentQuestion.type === "ALTERNATIVA" /* ALTERNATIVA */ && /* @__PURE__ */ jsx36(QuizAlternative, { variant }),
|
|
7398
|
+
currentQuestion.type === "MULTIPLA_CHOICE" /* MULTIPLA_CHOICE */ && /* @__PURE__ */ jsx36(QuizMultipleChoice, { variant }),
|
|
7399
|
+
currentQuestion.type === "DISSERTATIVA" /* DISSERTATIVA */ && /* @__PURE__ */ jsx36("div", { children: "Componente de dissertativa" })
|
|
7277
7400
|
] })
|
|
7278
7401
|
}
|
|
7279
7402
|
)
|
|
@@ -7302,8 +7425,8 @@ var QuizAlternative = ({ variant = "default" }) => {
|
|
|
7302
7425
|
};
|
|
7303
7426
|
});
|
|
7304
7427
|
if (!alternatives)
|
|
7305
|
-
return /* @__PURE__ */
|
|
7306
|
-
return /* @__PURE__ */
|
|
7428
|
+
return /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36("p", { children: "N\xE3o h\xE1 Alternativas" }) });
|
|
7429
|
+
return /* @__PURE__ */ jsx36("div", { className: "space-y-4", children: /* @__PURE__ */ jsx36(
|
|
7307
7430
|
AlternativesList,
|
|
7308
7431
|
{
|
|
7309
7432
|
mode: variant === "default" ? "interactive" : "readonly",
|
|
@@ -7379,8 +7502,8 @@ var QuizMultipleChoice = ({
|
|
|
7379
7502
|
};
|
|
7380
7503
|
});
|
|
7381
7504
|
if (!choices)
|
|
7382
|
-
return /* @__PURE__ */
|
|
7383
|
-
return /* @__PURE__ */
|
|
7505
|
+
return /* @__PURE__ */ jsx36("div", { children: /* @__PURE__ */ jsx36("p", { children: "N\xE3o h\xE1 Escolhas Multiplas" }) });
|
|
7506
|
+
return /* @__PURE__ */ jsx36("div", { className: "space-y-4", children: /* @__PURE__ */ jsx36(
|
|
7384
7507
|
MultipleChoiceList,
|
|
7385
7508
|
{
|
|
7386
7509
|
choices,
|
|
@@ -7443,16 +7566,16 @@ var QuizQuestionList = ({
|
|
|
7443
7566
|
return "Em branco";
|
|
7444
7567
|
}
|
|
7445
7568
|
};
|
|
7446
|
-
return /* @__PURE__ */
|
|
7447
|
-
([subjectId, questions]) => /* @__PURE__ */
|
|
7448
|
-
/* @__PURE__ */
|
|
7449
|
-
/* @__PURE__ */
|
|
7450
|
-
/* @__PURE__ */
|
|
7569
|
+
return /* @__PURE__ */ jsx36("div", { className: "space-y-6 px-4", children: Object.entries(filteredGroupedQuestions).map(
|
|
7570
|
+
([subjectId, questions]) => /* @__PURE__ */ jsxs29("section", { className: "flex flex-col gap-2", children: [
|
|
7571
|
+
/* @__PURE__ */ jsxs29("span", { className: "pt-6 pb-4 flex flex-row gap-2", children: [
|
|
7572
|
+
/* @__PURE__ */ jsx36("div", { className: "bg-primary-500 p-1 rounded-sm flex items-center justify-center", children: /* @__PURE__ */ jsx36(BookOpen, { size: 17, className: "text-white" }) }),
|
|
7573
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-800 font-bold text-lg", children: subjectId })
|
|
7451
7574
|
] }),
|
|
7452
|
-
/* @__PURE__ */
|
|
7575
|
+
/* @__PURE__ */ jsx36("ul", { className: "flex flex-col gap-2", children: questions.map((question) => {
|
|
7453
7576
|
const status = getQuestionStatus(question.id);
|
|
7454
7577
|
const questionNumber = getQuestionIndex(question.id);
|
|
7455
|
-
return /* @__PURE__ */
|
|
7578
|
+
return /* @__PURE__ */ jsx36(
|
|
7456
7579
|
CardStatus,
|
|
7457
7580
|
{
|
|
7458
7581
|
header: `Quest\xE3o ${questionNumber.toString().padStart(2, "0")}`,
|
|
@@ -7502,8 +7625,8 @@ var QuizFooter = forwardRef18(
|
|
|
7502
7625
|
const unansweredQuestions = getUnansweredQuestionsFromUserAnswers();
|
|
7503
7626
|
const userAnswers = getUserAnswers();
|
|
7504
7627
|
const allQuestions = getTotalQuestions();
|
|
7505
|
-
return /* @__PURE__ */
|
|
7506
|
-
/* @__PURE__ */
|
|
7628
|
+
return /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
7629
|
+
/* @__PURE__ */ jsx36(
|
|
7507
7630
|
"footer",
|
|
7508
7631
|
{
|
|
7509
7632
|
ref,
|
|
@@ -7512,17 +7635,17 @@ var QuizFooter = forwardRef18(
|
|
|
7512
7635
|
className
|
|
7513
7636
|
),
|
|
7514
7637
|
...props,
|
|
7515
|
-
children: variant === "default" ? /* @__PURE__ */
|
|
7516
|
-
/* @__PURE__ */
|
|
7517
|
-
/* @__PURE__ */
|
|
7638
|
+
children: variant === "default" ? /* @__PURE__ */ jsxs29(Fragment8, { children: [
|
|
7639
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-row items-center gap-1", children: [
|
|
7640
|
+
/* @__PURE__ */ jsx36(
|
|
7518
7641
|
IconButton_default,
|
|
7519
7642
|
{
|
|
7520
|
-
icon: /* @__PURE__ */
|
|
7643
|
+
icon: /* @__PURE__ */ jsx36(SquaresFour, { size: 24, className: "text-text-950" }),
|
|
7521
7644
|
size: "md",
|
|
7522
7645
|
onClick: () => setModalNavigateOpen(true)
|
|
7523
7646
|
}
|
|
7524
7647
|
),
|
|
7525
|
-
isFirstQuestion ? /* @__PURE__ */
|
|
7648
|
+
isFirstQuestion ? /* @__PURE__ */ jsx36(
|
|
7526
7649
|
Button_default,
|
|
7527
7650
|
{
|
|
7528
7651
|
variant: "outline",
|
|
@@ -7533,13 +7656,13 @@ var QuizFooter = forwardRef18(
|
|
|
7533
7656
|
},
|
|
7534
7657
|
children: "Pular"
|
|
7535
7658
|
}
|
|
7536
|
-
) : /* @__PURE__ */
|
|
7659
|
+
) : /* @__PURE__ */ jsx36(
|
|
7537
7660
|
Button_default,
|
|
7538
7661
|
{
|
|
7539
7662
|
size: "medium",
|
|
7540
7663
|
variant: "link",
|
|
7541
7664
|
action: "primary",
|
|
7542
|
-
iconLeft: /* @__PURE__ */
|
|
7665
|
+
iconLeft: /* @__PURE__ */ jsx36(CaretLeft2, { size: 18 }),
|
|
7543
7666
|
onClick: () => {
|
|
7544
7667
|
goToPreviousQuestion();
|
|
7545
7668
|
},
|
|
@@ -7547,7 +7670,7 @@ var QuizFooter = forwardRef18(
|
|
|
7547
7670
|
}
|
|
7548
7671
|
)
|
|
7549
7672
|
] }),
|
|
7550
|
-
!isFirstQuestion && /* @__PURE__ */
|
|
7673
|
+
!isFirstQuestion && /* @__PURE__ */ jsx36(
|
|
7551
7674
|
Button_default,
|
|
7552
7675
|
{
|
|
7553
7676
|
size: "small",
|
|
@@ -7560,7 +7683,7 @@ var QuizFooter = forwardRef18(
|
|
|
7560
7683
|
children: "Pular"
|
|
7561
7684
|
}
|
|
7562
7685
|
),
|
|
7563
|
-
isLastQuestion ? /* @__PURE__ */
|
|
7686
|
+
isLastQuestion ? /* @__PURE__ */ jsx36(
|
|
7564
7687
|
Button_default,
|
|
7565
7688
|
{
|
|
7566
7689
|
size: "medium",
|
|
@@ -7576,13 +7699,13 @@ var QuizFooter = forwardRef18(
|
|
|
7576
7699
|
},
|
|
7577
7700
|
children: "Finalizar"
|
|
7578
7701
|
}
|
|
7579
|
-
) : /* @__PURE__ */
|
|
7702
|
+
) : /* @__PURE__ */ jsx36(
|
|
7580
7703
|
Button_default,
|
|
7581
7704
|
{
|
|
7582
7705
|
size: "medium",
|
|
7583
7706
|
variant: "link",
|
|
7584
7707
|
action: "primary",
|
|
7585
|
-
iconRight: /* @__PURE__ */
|
|
7708
|
+
iconRight: /* @__PURE__ */ jsx36(CaretRight4, { size: 18 }),
|
|
7586
7709
|
disabled: !currentAnswer && !isCurrentQuestionSkipped,
|
|
7587
7710
|
onClick: () => {
|
|
7588
7711
|
goToNextQuestion();
|
|
@@ -7590,10 +7713,10 @@ var QuizFooter = forwardRef18(
|
|
|
7590
7713
|
children: "Avan\xE7ar"
|
|
7591
7714
|
}
|
|
7592
7715
|
)
|
|
7593
|
-
] }) : /* @__PURE__ */
|
|
7716
|
+
] }) : /* @__PURE__ */ jsx36("div", { className: "flex flex-row items-center justify-end w-full", children: /* @__PURE__ */ jsx36(Button_default, { variant: "solid", action: "primary", size: "medium", children: "Ver Resolu\xE7\xE3o" }) })
|
|
7594
7717
|
}
|
|
7595
7718
|
),
|
|
7596
|
-
/* @__PURE__ */
|
|
7719
|
+
/* @__PURE__ */ jsx36(
|
|
7597
7720
|
AlertDialog,
|
|
7598
7721
|
{
|
|
7599
7722
|
isOpen: alertDialogOpen,
|
|
@@ -7607,7 +7730,7 @@ var QuizFooter = forwardRef18(
|
|
|
7607
7730
|
}
|
|
7608
7731
|
}
|
|
7609
7732
|
),
|
|
7610
|
-
/* @__PURE__ */
|
|
7733
|
+
/* @__PURE__ */ jsx36(
|
|
7611
7734
|
Modal_default,
|
|
7612
7735
|
{
|
|
7613
7736
|
isOpen: modalResultOpen,
|
|
@@ -7617,8 +7740,8 @@ var QuizFooter = forwardRef18(
|
|
|
7617
7740
|
closeOnEscape: false,
|
|
7618
7741
|
hideCloseButton: true,
|
|
7619
7742
|
size: "md",
|
|
7620
|
-
children: /* @__PURE__ */
|
|
7621
|
-
/* @__PURE__ */
|
|
7743
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col w-full h-full items-center justify-center gap-4", children: [
|
|
7744
|
+
/* @__PURE__ */ jsx36(
|
|
7622
7745
|
"img",
|
|
7623
7746
|
{
|
|
7624
7747
|
src: simulated_result_default,
|
|
@@ -7626,9 +7749,9 @@ var QuizFooter = forwardRef18(
|
|
|
7626
7749
|
className: "w-[282px] h-auto object-cover"
|
|
7627
7750
|
}
|
|
7628
7751
|
),
|
|
7629
|
-
/* @__PURE__ */
|
|
7630
|
-
/* @__PURE__ */
|
|
7631
|
-
/* @__PURE__ */
|
|
7752
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-2 text-center", children: [
|
|
7753
|
+
/* @__PURE__ */ jsx36("h2", { className: "text-text-950 font-bold text-lg", children: "Voc\xEA concluiu o simulado!" }),
|
|
7754
|
+
/* @__PURE__ */ jsxs29("p", { className: "text-text-500 font-sm", children: [
|
|
7632
7755
|
"Voc\xEA acertou",
|
|
7633
7756
|
" ",
|
|
7634
7757
|
(() => {
|
|
@@ -7650,8 +7773,8 @@ var QuizFooter = forwardRef18(
|
|
|
7650
7773
|
" quest\xF5es."
|
|
7651
7774
|
] })
|
|
7652
7775
|
] }),
|
|
7653
|
-
/* @__PURE__ */
|
|
7654
|
-
/* @__PURE__ */
|
|
7776
|
+
/* @__PURE__ */ jsxs29("div", { className: "px-6 flex flex-row items-center gap-2 w-full", children: [
|
|
7777
|
+
/* @__PURE__ */ jsx36(
|
|
7655
7778
|
Button_default,
|
|
7656
7779
|
{
|
|
7657
7780
|
variant: "outline",
|
|
@@ -7661,31 +7784,31 @@ var QuizFooter = forwardRef18(
|
|
|
7661
7784
|
children: "Ir para simulados"
|
|
7662
7785
|
}
|
|
7663
7786
|
),
|
|
7664
|
-
/* @__PURE__ */
|
|
7787
|
+
/* @__PURE__ */ jsx36(Button_default, { className: "w-full", onClick: onDetailResult, children: "Detalhar resultado" })
|
|
7665
7788
|
] })
|
|
7666
7789
|
] })
|
|
7667
7790
|
}
|
|
7668
7791
|
),
|
|
7669
|
-
/* @__PURE__ */
|
|
7792
|
+
/* @__PURE__ */ jsx36(
|
|
7670
7793
|
Modal_default,
|
|
7671
7794
|
{
|
|
7672
7795
|
isOpen: modalNavigateOpen,
|
|
7673
7796
|
onClose: () => setModalNavigateOpen(false),
|
|
7674
7797
|
title: "Quest\xF5es",
|
|
7675
7798
|
size: "lg",
|
|
7676
|
-
children: /* @__PURE__ */
|
|
7677
|
-
/* @__PURE__ */
|
|
7678
|
-
/* @__PURE__ */
|
|
7679
|
-
/* @__PURE__ */
|
|
7680
|
-
/* @__PURE__ */
|
|
7681
|
-
/* @__PURE__ */
|
|
7682
|
-
/* @__PURE__ */
|
|
7683
|
-
/* @__PURE__ */
|
|
7684
|
-
/* @__PURE__ */
|
|
7799
|
+
children: /* @__PURE__ */ jsxs29("div", { className: "flex flex-col w-full h-full", children: [
|
|
7800
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-row justify-between items-center py-6 pt-6 pb-4 border-b border-border-200", children: [
|
|
7801
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-950 font-bold text-lg", children: "Filtrar por" }),
|
|
7802
|
+
/* @__PURE__ */ jsx36("span", { className: "max-w-[266px]", children: /* @__PURE__ */ jsxs29(Select_default, { value: filterType, onValueChange: setFilterType, children: [
|
|
7803
|
+
/* @__PURE__ */ jsx36(SelectTrigger, { variant: "rounded", className: "max-w-[266px]", children: /* @__PURE__ */ jsx36(SelectValue, { placeholder: "Selecione uma op\xE7\xE3o" }) }),
|
|
7804
|
+
/* @__PURE__ */ jsxs29(SelectContent, { children: [
|
|
7805
|
+
/* @__PURE__ */ jsx36(SelectItem, { value: "all", children: "Todas" }),
|
|
7806
|
+
/* @__PURE__ */ jsx36(SelectItem, { value: "unanswered", children: "Em branco" }),
|
|
7807
|
+
/* @__PURE__ */ jsx36(SelectItem, { value: "answered", children: "Respondidas" })
|
|
7685
7808
|
] })
|
|
7686
7809
|
] }) })
|
|
7687
7810
|
] }),
|
|
7688
|
-
/* @__PURE__ */
|
|
7811
|
+
/* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-2 not-lg:h-[calc(100vh-200px)] lg:max-h-[687px] overflow-y-auto", children: /* @__PURE__ */ jsx36(
|
|
7689
7812
|
QuizQuestionList,
|
|
7690
7813
|
{
|
|
7691
7814
|
filterType,
|
|
@@ -7700,15 +7823,15 @@ var QuizFooter = forwardRef18(
|
|
|
7700
7823
|
);
|
|
7701
7824
|
var QuizResultHeaderTitle = forwardRef18(({ className, ...props }, ref) => {
|
|
7702
7825
|
const { bySimulated } = useQuizStore();
|
|
7703
|
-
return /* @__PURE__ */
|
|
7826
|
+
return /* @__PURE__ */ jsxs29(
|
|
7704
7827
|
"div",
|
|
7705
7828
|
{
|
|
7706
7829
|
ref,
|
|
7707
7830
|
className: cn("flex flex-row pt-4 justify-between", className),
|
|
7708
7831
|
...props,
|
|
7709
7832
|
children: [
|
|
7710
|
-
/* @__PURE__ */
|
|
7711
|
-
bySimulated && /* @__PURE__ */
|
|
7833
|
+
/* @__PURE__ */ jsx36("p", { className: "text-text-950 font-bold text-2xl", children: "Resultado" }),
|
|
7834
|
+
bySimulated && /* @__PURE__ */ jsx36(Badge_default, { variant: "solid", action: "info", children: bySimulated.category })
|
|
7712
7835
|
]
|
|
7713
7836
|
}
|
|
7714
7837
|
);
|
|
@@ -7716,7 +7839,7 @@ var QuizResultHeaderTitle = forwardRef18(({ className, ...props }, ref) => {
|
|
|
7716
7839
|
var QuizResultTitle = forwardRef18(({ className, ...props }, ref) => {
|
|
7717
7840
|
const { getQuizTitle } = useQuizStore();
|
|
7718
7841
|
const quizTitle = getQuizTitle();
|
|
7719
|
-
return /* @__PURE__ */
|
|
7842
|
+
return /* @__PURE__ */ jsx36(
|
|
7720
7843
|
"p",
|
|
7721
7844
|
{
|
|
7722
7845
|
className: cn("pt-6 pb-4 text-text-950 font-bold text-lg", className),
|
|
@@ -7774,15 +7897,15 @@ var QuizResultPerformance = forwardRef18(
|
|
|
7774
7897
|
});
|
|
7775
7898
|
}
|
|
7776
7899
|
const percentage = totalQuestions > 0 ? Math.round(correctAnswers / totalQuestions * 100) : 0;
|
|
7777
|
-
return /* @__PURE__ */
|
|
7900
|
+
return /* @__PURE__ */ jsxs29(
|
|
7778
7901
|
"div",
|
|
7779
7902
|
{
|
|
7780
7903
|
className: "flex flex-row gap-6 p-6 rounded-xl bg-background justify-between",
|
|
7781
7904
|
ref,
|
|
7782
7905
|
...props,
|
|
7783
7906
|
children: [
|
|
7784
|
-
/* @__PURE__ */
|
|
7785
|
-
/* @__PURE__ */
|
|
7907
|
+
/* @__PURE__ */ jsxs29("div", { className: "relative", children: [
|
|
7908
|
+
/* @__PURE__ */ jsx36(
|
|
7786
7909
|
ProgressCircle_default,
|
|
7787
7910
|
{
|
|
7788
7911
|
size: "medium",
|
|
@@ -7792,21 +7915,21 @@ var QuizResultPerformance = forwardRef18(
|
|
|
7792
7915
|
label: ""
|
|
7793
7916
|
}
|
|
7794
7917
|
),
|
|
7795
|
-
/* @__PURE__ */
|
|
7796
|
-
/* @__PURE__ */
|
|
7797
|
-
/* @__PURE__ */
|
|
7798
|
-
/* @__PURE__ */
|
|
7918
|
+
/* @__PURE__ */ jsxs29("div", { className: "absolute inset-0 flex flex-col items-center justify-center", children: [
|
|
7919
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex items-center gap-1 mb-1", children: [
|
|
7920
|
+
/* @__PURE__ */ jsx36(Clock2, { size: 12, weight: "regular", className: "text-text-800" }),
|
|
7921
|
+
/* @__PURE__ */ jsx36("span", { className: "text-2xs font-medium text-text-800", children: formatTime(timeElapsed) })
|
|
7799
7922
|
] }),
|
|
7800
|
-
/* @__PURE__ */
|
|
7923
|
+
/* @__PURE__ */ jsxs29("div", { className: "text-2xl font-medium text-text-800 leading-7", children: [
|
|
7801
7924
|
correctAnswers,
|
|
7802
7925
|
" de ",
|
|
7803
7926
|
totalQuestions
|
|
7804
7927
|
] }),
|
|
7805
|
-
/* @__PURE__ */
|
|
7928
|
+
/* @__PURE__ */ jsx36("div", { className: "text-2xs font-medium text-text-600 mt-1", children: "Corretas" })
|
|
7806
7929
|
] })
|
|
7807
7930
|
] }),
|
|
7808
|
-
/* @__PURE__ */
|
|
7809
|
-
/* @__PURE__ */
|
|
7931
|
+
/* @__PURE__ */ jsxs29("div", { className: "flex flex-col gap-4 w-full", children: [
|
|
7932
|
+
/* @__PURE__ */ jsx36(
|
|
7810
7933
|
ProgressBar_default,
|
|
7811
7934
|
{
|
|
7812
7935
|
className: "w-full",
|
|
@@ -7820,7 +7943,7 @@ var QuizResultPerformance = forwardRef18(
|
|
|
7820
7943
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
7821
7944
|
}
|
|
7822
7945
|
),
|
|
7823
|
-
/* @__PURE__ */
|
|
7946
|
+
/* @__PURE__ */ jsx36(
|
|
7824
7947
|
ProgressBar_default,
|
|
7825
7948
|
{
|
|
7826
7949
|
className: "w-full",
|
|
@@ -7834,7 +7957,7 @@ var QuizResultPerformance = forwardRef18(
|
|
|
7834
7957
|
percentageClassName: "text-xs font-medium leading-[14px] text-right"
|
|
7835
7958
|
}
|
|
7836
7959
|
),
|
|
7837
|
-
/* @__PURE__ */
|
|
7960
|
+
/* @__PURE__ */ jsx36(
|
|
7838
7961
|
ProgressBar_default,
|
|
7839
7962
|
{
|
|
7840
7963
|
className: "w-full",
|
|
@@ -7885,9 +8008,9 @@ var QuizListResult = forwardRef18(({ className, onSubjectClick, ...props }, ref)
|
|
|
7885
8008
|
};
|
|
7886
8009
|
}
|
|
7887
8010
|
);
|
|
7888
|
-
return /* @__PURE__ */
|
|
7889
|
-
/* @__PURE__ */
|
|
7890
|
-
/* @__PURE__ */
|
|
8011
|
+
return /* @__PURE__ */ jsxs29("section", { ref, className, ...props, children: [
|
|
8012
|
+
/* @__PURE__ */ jsx36("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Mat\xE9rias" }),
|
|
8013
|
+
/* @__PURE__ */ jsx36("ul", { className: "flex flex-col gap-2", children: subjectsStats.map((subject) => /* @__PURE__ */ jsx36("li", { children: /* @__PURE__ */ jsx36(
|
|
7891
8014
|
CardResults,
|
|
7892
8015
|
{
|
|
7893
8016
|
onClick: () => onSubjectClick?.(subject.subject),
|
|
@@ -7895,7 +8018,7 @@ var QuizListResult = forwardRef18(({ className, onSubjectClick, ...props }, ref)
|
|
|
7895
8018
|
header: subject.subject,
|
|
7896
8019
|
correct_answers: subject.correct,
|
|
7897
8020
|
incorrect_answers: subject.incorrect,
|
|
7898
|
-
icon: /* @__PURE__ */
|
|
8021
|
+
icon: /* @__PURE__ */ jsx36(Book, { size: 20 }),
|
|
7899
8022
|
direction: "row"
|
|
7900
8023
|
}
|
|
7901
8024
|
) }, subject.subject)) })
|
|
@@ -7908,11 +8031,11 @@ var QuizListResultByMateria = ({
|
|
|
7908
8031
|
const { getQuestionsGroupedBySubject, getUserAnswerByQuestionId } = useQuizStore();
|
|
7909
8032
|
const groupedQuestions = getQuestionsGroupedBySubject();
|
|
7910
8033
|
const answeredQuestions = groupedQuestions[subject] || [];
|
|
7911
|
-
return /* @__PURE__ */
|
|
7912
|
-
/* @__PURE__ */
|
|
7913
|
-
/* @__PURE__ */
|
|
7914
|
-
/* @__PURE__ */
|
|
7915
|
-
/* @__PURE__ */
|
|
8034
|
+
return /* @__PURE__ */ jsxs29("div", { className: "w-full max-w-[1000px] flex flex-col mx-auto h-full relative not-lg:px-6", children: [
|
|
8035
|
+
/* @__PURE__ */ jsx36("div", { className: "flex flex-row pt-4 justify-between", children: /* @__PURE__ */ jsx36("p", { className: "text-text-950 font-bold text-2xl", children: subject }) }),
|
|
8036
|
+
/* @__PURE__ */ jsxs29("section", { className: "flex flex-col ", children: [
|
|
8037
|
+
/* @__PURE__ */ jsx36("p", { className: "pt-6 pb-4 text-text-950 font-bold text-lg", children: "Resultado das quest\xF5es" }),
|
|
8038
|
+
/* @__PURE__ */ jsx36("ul", { className: "flex flex-col gap-2 pt-4", children: answeredQuestions.map((question) => /* @__PURE__ */ jsx36("li", { children: /* @__PURE__ */ jsx36(
|
|
7916
8039
|
CardStatus,
|
|
7917
8040
|
{
|
|
7918
8041
|
className: "max-w-full",
|
|
@@ -7960,6 +8083,7 @@ export {
|
|
|
7960
8083
|
DropdownMenuSeparator,
|
|
7961
8084
|
DropdownMenuTrigger,
|
|
7962
8085
|
IconButton_default as IconButton,
|
|
8086
|
+
IconRender_default as IconRender,
|
|
7963
8087
|
IconRoundedButton_default as IconRoundedButton,
|
|
7964
8088
|
Input_default as Input,
|
|
7965
8089
|
Menu_default as Menu,
|