analytica-frontend-lib 1.0.46 → 1.0.47
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 +24 -1
- package/dist/Card/index.d.ts +24 -1
- package/dist/Card/index.js +125 -5
- package/dist/Card/index.js.map +1 -1
- package/dist/Card/index.mjs +128 -6
- package/dist/Card/index.mjs.map +1 -1
- package/dist/Menu/index.js +3 -0
- package/dist/Menu/index.js.map +1 -1
- package/dist/Menu/index.mjs +3 -0
- package/dist/Menu/index.mjs.map +1 -1
- package/dist/Select/index.js +4 -4
- package/dist/Select/index.js.map +1 -1
- package/dist/Select/index.mjs +4 -4
- package/dist/Select/index.mjs.map +1 -1
- package/dist/index.css +27 -3
- package/dist/index.css.map +1 -1
- package/dist/index.js +147 -37
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +153 -38
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +27 -3
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2950,40 +2950,33 @@ var Modal = ({
|
|
|
2950
2950
|
if (!isOpen) return null;
|
|
2951
2951
|
const sizeClasses = SIZE_CLASSES10[size];
|
|
2952
2952
|
const baseClasses = "bg-background rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
2953
|
-
const
|
|
2953
|
+
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
2954
|
+
const modalClasses = `${baseClasses} ${sizeClasses} ${dialogResetClasses} ${className}`;
|
|
2954
2955
|
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2955
2956
|
"div",
|
|
2956
2957
|
{
|
|
2957
2958
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
|
|
2958
2959
|
onClick: handleBackdropClick,
|
|
2959
2960
|
onKeyDown: handleBackdropKeyDown,
|
|
2960
|
-
role: "
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
{
|
|
2965
|
-
className:
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
}
|
|
2980
|
-
)
|
|
2981
|
-
] }),
|
|
2982
|
-
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2983
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2984
|
-
]
|
|
2985
|
-
}
|
|
2986
|
-
)
|
|
2961
|
+
role: "button",
|
|
2962
|
+
tabIndex: closeOnBackdropClick ? 0 : -1,
|
|
2963
|
+
"aria-label": "Fechar modal clicando no fundo",
|
|
2964
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("dialog", { className: modalClasses, "aria-labelledby": "modal-title", open: true, children: [
|
|
2965
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
2966
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
|
|
2967
|
+
!hideCloseButton && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
2968
|
+
"button",
|
|
2969
|
+
{
|
|
2970
|
+
onClick: onClose,
|
|
2971
|
+
className: "p-1 text-text-500 hover:text-text-700 hover:bg-background-50 rounded-md transition-colors focus:outline-none focus:ring-2 focus:ring-indicator-info focus:ring-offset-2",
|
|
2972
|
+
"aria-label": "Fechar modal",
|
|
2973
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_phosphor_react8.X, { size: 18 })
|
|
2974
|
+
}
|
|
2975
|
+
)
|
|
2976
|
+
] }),
|
|
2977
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-6 pb-6", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2978
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2979
|
+
] })
|
|
2987
2980
|
}
|
|
2988
2981
|
);
|
|
2989
2982
|
};
|
|
@@ -3368,9 +3361,9 @@ var import_react12 = require("react");
|
|
|
3368
3361
|
var import_phosphor_react10 = require("phosphor-react");
|
|
3369
3362
|
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
3370
3363
|
var VARIANT_CLASSES4 = {
|
|
3371
|
-
outlined: "border
|
|
3372
|
-
underlined: "border-b
|
|
3373
|
-
rounded: "border
|
|
3364
|
+
outlined: "border rounded-sm focus:border-primary-950",
|
|
3365
|
+
underlined: "border-b focus:border-primary-950",
|
|
3366
|
+
rounded: "border rounded-4xl focus:border-primary-950"
|
|
3374
3367
|
};
|
|
3375
3368
|
var SIZE_CLASSES11 = {
|
|
3376
3369
|
small: "text-sm",
|
|
@@ -3544,7 +3537,7 @@ var SelectTrigger = (0, import_react12.forwardRef)(
|
|
|
3544
3537
|
ref,
|
|
3545
3538
|
className: `
|
|
3546
3539
|
flex h-9 min-w-[220px] w-full items-center justify-between border-border-300 px-3 py-2
|
|
3547
|
-
${invalid && "border-indicator-error text-text-600
|
|
3540
|
+
${invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`}
|
|
3548
3541
|
${disabled ? "cursor-not-allowed text-text-400 pointer-events-none opacity-50" : "cursor-pointer hover:bg-background-50 focus:bg-accent focus:text-accent-foreground hover:bg-accent hover:text-accent-foreground"}
|
|
3549
3542
|
${!invalid && !disabled ? "text-text-700" : ""}
|
|
3550
3543
|
${variantClasses}
|
|
@@ -3732,6 +3725,9 @@ var MenuItem = (0, import_react13.forwardRef)(
|
|
|
3732
3725
|
if (["Enter", " "].includes(e.key)) handleClick(e);
|
|
3733
3726
|
},
|
|
3734
3727
|
tabIndex: disabled ? -1 : 0,
|
|
3728
|
+
onMouseDown: (e) => {
|
|
3729
|
+
e.preventDefault();
|
|
3730
|
+
},
|
|
3735
3731
|
...props
|
|
3736
3732
|
};
|
|
3737
3733
|
const variants = {
|
|
@@ -3940,7 +3936,14 @@ var CardQuestions = (0, import_react14.forwardRef)(
|
|
|
3940
3936
|
] })
|
|
3941
3937
|
] })
|
|
3942
3938
|
] }),
|
|
3943
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3939
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
3940
|
+
Button_default,
|
|
3941
|
+
{
|
|
3942
|
+
size: "extra-small",
|
|
3943
|
+
onClick: () => onClickButton?.(valueButton),
|
|
3944
|
+
children: buttonLabel
|
|
3945
|
+
}
|
|
3946
|
+
) })
|
|
3944
3947
|
]
|
|
3945
3948
|
}
|
|
3946
3949
|
);
|
|
@@ -4068,7 +4071,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4068
4071
|
"div",
|
|
4069
4072
|
{
|
|
4070
4073
|
ref,
|
|
4071
|
-
className: `w-full h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
|
|
4074
|
+
className: `w-full min-h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
|
|
4072
4075
|
...props,
|
|
4073
4076
|
children: [
|
|
4074
4077
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
@@ -4089,7 +4092,7 @@ var CardPerformance = (0, import_react14.forwardRef)(
|
|
|
4089
4092
|
!hasProgress && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4090
4093
|
import_phosphor_react12.CaretRight,
|
|
4091
4094
|
{
|
|
4092
|
-
className: "size-4.5",
|
|
4095
|
+
className: "size-4.5 text-text-800",
|
|
4093
4096
|
"data-testid": "caret-icon",
|
|
4094
4097
|
onClick: () => onClickButton?.(valueButton)
|
|
4095
4098
|
}
|
|
@@ -4173,7 +4176,7 @@ var CardResults = (0, import_react14.forwardRef)(
|
|
|
4173
4176
|
]
|
|
4174
4177
|
}
|
|
4175
4178
|
),
|
|
4176
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6" })
|
|
4179
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4177
4180
|
]
|
|
4178
4181
|
}
|
|
4179
4182
|
);
|
|
@@ -4215,7 +4218,114 @@ var CardStatus = (0, import_react14.forwardRef)(
|
|
|
4215
4218
|
]
|
|
4216
4219
|
}
|
|
4217
4220
|
),
|
|
4218
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6" })
|
|
4221
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4222
|
+
]
|
|
4223
|
+
}
|
|
4224
|
+
);
|
|
4225
|
+
}
|
|
4226
|
+
);
|
|
4227
|
+
var CardSettings = (0, import_react14.forwardRef)(
|
|
4228
|
+
({ header, className, icon, ...props }, ref) => {
|
|
4229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4230
|
+
"div",
|
|
4231
|
+
{
|
|
4232
|
+
ref,
|
|
4233
|
+
className: `w-full p-2 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
|
|
4234
|
+
...props,
|
|
4235
|
+
children: [
|
|
4236
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4237
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "w-full text-md", children: header }),
|
|
4238
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { size: 24 })
|
|
4239
|
+
]
|
|
4240
|
+
}
|
|
4241
|
+
);
|
|
4242
|
+
}
|
|
4243
|
+
);
|
|
4244
|
+
var CardSupport = (0, import_react14.forwardRef)(
|
|
4245
|
+
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4246
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4247
|
+
"div",
|
|
4248
|
+
{
|
|
4249
|
+
ref,
|
|
4250
|
+
className: `w-full p-4 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
|
|
4251
|
+
...props,
|
|
4252
|
+
children: [
|
|
4253
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4254
|
+
"div",
|
|
4255
|
+
{
|
|
4256
|
+
className: `
|
|
4257
|
+
w-full flex ${direction == "col" ? "flex-col" : "flex-row items-center"} gap-2
|
|
4258
|
+
`,
|
|
4259
|
+
children: [
|
|
4260
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs text-text-950 font-bold", children: header }) }),
|
|
4261
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex flex-row gap-1", children })
|
|
4262
|
+
]
|
|
4263
|
+
}
|
|
4264
|
+
),
|
|
4265
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.CaretRight, { className: "text-text-800", size: 24 })
|
|
4266
|
+
]
|
|
4267
|
+
}
|
|
4268
|
+
);
|
|
4269
|
+
}
|
|
4270
|
+
);
|
|
4271
|
+
var CardForum = (0, import_react14.forwardRef)(
|
|
4272
|
+
({
|
|
4273
|
+
title,
|
|
4274
|
+
content,
|
|
4275
|
+
comments,
|
|
4276
|
+
onClickComments,
|
|
4277
|
+
valueComments,
|
|
4278
|
+
onClickProfile,
|
|
4279
|
+
valueProfile,
|
|
4280
|
+
className = "",
|
|
4281
|
+
date,
|
|
4282
|
+
hour,
|
|
4283
|
+
...props
|
|
4284
|
+
}, ref) => {
|
|
4285
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4286
|
+
"div",
|
|
4287
|
+
{
|
|
4288
|
+
ref,
|
|
4289
|
+
className: `w-auto h-auto p-4 rounded-lg flex flex-row gap-3 border border-border-100 bg-background ${className}`,
|
|
4290
|
+
...props,
|
|
4291
|
+
children: [
|
|
4292
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4293
|
+
"button",
|
|
4294
|
+
{
|
|
4295
|
+
type: "button",
|
|
4296
|
+
"aria-label": "Ver perfil",
|
|
4297
|
+
onClick: () => onClickProfile?.(valueProfile),
|
|
4298
|
+
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4299
|
+
}
|
|
4300
|
+
),
|
|
4301
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
4302
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4303
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4304
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "text-xs text-text-600", children: [
|
|
4305
|
+
"\u2022 ",
|
|
4306
|
+
date,
|
|
4307
|
+
" \u2022 ",
|
|
4308
|
+
hour
|
|
4309
|
+
] })
|
|
4310
|
+
] }),
|
|
4311
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("p", { className: "text-text-950 text-sm line-clamp-2", children: content }),
|
|
4312
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
4313
|
+
"button",
|
|
4314
|
+
{
|
|
4315
|
+
type: "button",
|
|
4316
|
+
"aria-label": "Ver coment\xE1rios",
|
|
4317
|
+
onClick: () => onClickComments?.(valueComments),
|
|
4318
|
+
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4319
|
+
children: [
|
|
4320
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_phosphor_react12.ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4321
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("p", { className: "text-xs", children: [
|
|
4322
|
+
comments,
|
|
4323
|
+
" respostas"
|
|
4324
|
+
] })
|
|
4325
|
+
]
|
|
4326
|
+
}
|
|
4327
|
+
)
|
|
4328
|
+
] })
|
|
4219
4329
|
]
|
|
4220
4330
|
}
|
|
4221
4331
|
);
|