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.mjs
CHANGED
|
@@ -2899,40 +2899,33 @@ var Modal = ({
|
|
|
2899
2899
|
if (!isOpen) return null;
|
|
2900
2900
|
const sizeClasses = SIZE_CLASSES10[size];
|
|
2901
2901
|
const baseClasses = "bg-background rounded-3xl shadow-hard-shadow-2 border border-border-100 w-full mx-4";
|
|
2902
|
-
const
|
|
2902
|
+
const dialogResetClasses = "p-0 m-0 border-none outline-none max-h-none static";
|
|
2903
|
+
const modalClasses = `${baseClasses} ${sizeClasses} ${dialogResetClasses} ${className}`;
|
|
2903
2904
|
return /* @__PURE__ */ jsx22(
|
|
2904
2905
|
"div",
|
|
2905
2906
|
{
|
|
2906
2907
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-xs",
|
|
2907
2908
|
onClick: handleBackdropClick,
|
|
2908
2909
|
onKeyDown: handleBackdropKeyDown,
|
|
2909
|
-
role: "
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
{
|
|
2914
|
-
className:
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
}
|
|
2929
|
-
)
|
|
2930
|
-
] }),
|
|
2931
|
-
/* @__PURE__ */ jsx22("div", { className: "px-6 pb-6", children: /* @__PURE__ */ jsx22("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2932
|
-
footer && /* @__PURE__ */ jsx22("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2933
|
-
]
|
|
2934
|
-
}
|
|
2935
|
-
)
|
|
2910
|
+
role: "button",
|
|
2911
|
+
tabIndex: closeOnBackdropClick ? 0 : -1,
|
|
2912
|
+
"aria-label": "Fechar modal clicando no fundo",
|
|
2913
|
+
children: /* @__PURE__ */ jsxs17("dialog", { className: modalClasses, "aria-labelledby": "modal-title", open: true, children: [
|
|
2914
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-center justify-between px-6 py-6", children: [
|
|
2915
|
+
/* @__PURE__ */ jsx22("h2", { id: "modal-title", className: "text-lg font-semibold text-text-950", children: title }),
|
|
2916
|
+
!hideCloseButton && /* @__PURE__ */ jsx22(
|
|
2917
|
+
"button",
|
|
2918
|
+
{
|
|
2919
|
+
onClick: onClose,
|
|
2920
|
+
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",
|
|
2921
|
+
"aria-label": "Fechar modal",
|
|
2922
|
+
children: /* @__PURE__ */ jsx22(X2, { size: 18 })
|
|
2923
|
+
}
|
|
2924
|
+
)
|
|
2925
|
+
] }),
|
|
2926
|
+
/* @__PURE__ */ jsx22("div", { className: "px-6 pb-6", children: /* @__PURE__ */ jsx22("div", { className: "text-text-500 font-normal text-sm leading-6", children }) }),
|
|
2927
|
+
footer && /* @__PURE__ */ jsx22("div", { className: "flex justify-end gap-3 px-6 pb-6", children: footer })
|
|
2928
|
+
] })
|
|
2936
2929
|
}
|
|
2937
2930
|
);
|
|
2938
2931
|
};
|
|
@@ -3332,9 +3325,9 @@ import {
|
|
|
3332
3325
|
import { CaretDown, Check as Check4 } from "phosphor-react";
|
|
3333
3326
|
import { Fragment as Fragment3, jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3334
3327
|
var VARIANT_CLASSES4 = {
|
|
3335
|
-
outlined: "border
|
|
3336
|
-
underlined: "border-b
|
|
3337
|
-
rounded: "border
|
|
3328
|
+
outlined: "border rounded-sm focus:border-primary-950",
|
|
3329
|
+
underlined: "border-b focus:border-primary-950",
|
|
3330
|
+
rounded: "border rounded-4xl focus:border-primary-950"
|
|
3338
3331
|
};
|
|
3339
3332
|
var SIZE_CLASSES11 = {
|
|
3340
3333
|
small: "text-sm",
|
|
@@ -3508,7 +3501,7 @@ var SelectTrigger = forwardRef10(
|
|
|
3508
3501
|
ref,
|
|
3509
3502
|
className: `
|
|
3510
3503
|
flex h-9 min-w-[220px] w-full items-center justify-between border-border-300 px-3 py-2
|
|
3511
|
-
${invalid && "border-indicator-error text-text-600
|
|
3504
|
+
${invalid && `${variant == "underlined" ? "border-b-2" : "border-2"} border-indicator-error text-text-600`}
|
|
3512
3505
|
${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"}
|
|
3513
3506
|
${!invalid && !disabled ? "text-text-700" : ""}
|
|
3514
3507
|
${variantClasses}
|
|
@@ -3704,6 +3697,9 @@ var MenuItem = forwardRef11(
|
|
|
3704
3697
|
if (["Enter", " "].includes(e.key)) handleClick(e);
|
|
3705
3698
|
},
|
|
3706
3699
|
tabIndex: disabled ? -1 : 0,
|
|
3700
|
+
onMouseDown: (e) => {
|
|
3701
|
+
e.preventDefault();
|
|
3702
|
+
},
|
|
3707
3703
|
...props
|
|
3708
3704
|
};
|
|
3709
3705
|
const variants = {
|
|
@@ -3788,7 +3784,12 @@ var Menu_default = Menu;
|
|
|
3788
3784
|
|
|
3789
3785
|
// src/components/Card/Card.tsx
|
|
3790
3786
|
import { forwardRef as forwardRef12, Fragment as Fragment4 } from "react";
|
|
3791
|
-
import {
|
|
3787
|
+
import {
|
|
3788
|
+
CaretRight as CaretRight2,
|
|
3789
|
+
ChatCircleText,
|
|
3790
|
+
CheckCircle as CheckCircle3,
|
|
3791
|
+
XCircle as XCircle2
|
|
3792
|
+
} from "phosphor-react";
|
|
3792
3793
|
import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3793
3794
|
var ACTION_CARD_CLASSES = {
|
|
3794
3795
|
warning: "bg-warning-background",
|
|
@@ -3912,7 +3913,14 @@ var CardQuestions = forwardRef12(
|
|
|
3912
3913
|
] })
|
|
3913
3914
|
] })
|
|
3914
3915
|
] }),
|
|
3915
|
-
/* @__PURE__ */ jsx26(
|
|
3916
|
+
/* @__PURE__ */ jsx26("span", { children: /* @__PURE__ */ jsx26(
|
|
3917
|
+
Button_default,
|
|
3918
|
+
{
|
|
3919
|
+
size: "extra-small",
|
|
3920
|
+
onClick: () => onClickButton?.(valueButton),
|
|
3921
|
+
children: buttonLabel
|
|
3922
|
+
}
|
|
3923
|
+
) })
|
|
3916
3924
|
]
|
|
3917
3925
|
}
|
|
3918
3926
|
);
|
|
@@ -4040,7 +4048,7 @@ var CardPerformance = forwardRef12(
|
|
|
4040
4048
|
"div",
|
|
4041
4049
|
{
|
|
4042
4050
|
ref,
|
|
4043
|
-
className: `w-full h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
|
|
4051
|
+
className: `w-full min-h-20.5 flex flex-row justify-between p-4 gap-2 bg-background border border-border-50 ${className}`,
|
|
4044
4052
|
...props,
|
|
4045
4053
|
children: [
|
|
4046
4054
|
/* @__PURE__ */ jsxs21("div", { className: "w-full flex flex-col justify-between gap-2", children: [
|
|
@@ -4061,7 +4069,7 @@ var CardPerformance = forwardRef12(
|
|
|
4061
4069
|
!hasProgress && /* @__PURE__ */ jsx26(
|
|
4062
4070
|
CaretRight2,
|
|
4063
4071
|
{
|
|
4064
|
-
className: "size-4.5",
|
|
4072
|
+
className: "size-4.5 text-text-800",
|
|
4065
4073
|
"data-testid": "caret-icon",
|
|
4066
4074
|
onClick: () => onClickButton?.(valueButton)
|
|
4067
4075
|
}
|
|
@@ -4145,7 +4153,7 @@ var CardResults = forwardRef12(
|
|
|
4145
4153
|
]
|
|
4146
4154
|
}
|
|
4147
4155
|
),
|
|
4148
|
-
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6" })
|
|
4156
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4149
4157
|
]
|
|
4150
4158
|
}
|
|
4151
4159
|
);
|
|
@@ -4187,7 +4195,114 @@ var CardStatus = forwardRef12(
|
|
|
4187
4195
|
]
|
|
4188
4196
|
}
|
|
4189
4197
|
),
|
|
4190
|
-
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6" })
|
|
4198
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "min-w-6 min-h-6 text-text-800" })
|
|
4199
|
+
]
|
|
4200
|
+
}
|
|
4201
|
+
);
|
|
4202
|
+
}
|
|
4203
|
+
);
|
|
4204
|
+
var CardSettings = forwardRef12(
|
|
4205
|
+
({ header, className, icon, ...props }, ref) => {
|
|
4206
|
+
return /* @__PURE__ */ jsxs21(
|
|
4207
|
+
"div",
|
|
4208
|
+
{
|
|
4209
|
+
ref,
|
|
4210
|
+
className: `w-full p-2 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
|
|
4211
|
+
...props,
|
|
4212
|
+
children: [
|
|
4213
|
+
/* @__PURE__ */ jsx26("span", { className: "[&>svg]:size-6", children: icon }),
|
|
4214
|
+
/* @__PURE__ */ jsx26("p", { className: "w-full text-md", children: header }),
|
|
4215
|
+
/* @__PURE__ */ jsx26(CaretRight2, { size: 24 })
|
|
4216
|
+
]
|
|
4217
|
+
}
|
|
4218
|
+
);
|
|
4219
|
+
}
|
|
4220
|
+
);
|
|
4221
|
+
var CardSupport = forwardRef12(
|
|
4222
|
+
({ header, className, direction = "col", children, ...props }, ref) => {
|
|
4223
|
+
return /* @__PURE__ */ jsxs21(
|
|
4224
|
+
"div",
|
|
4225
|
+
{
|
|
4226
|
+
ref,
|
|
4227
|
+
className: `w-full p-4 flex flex-row items-center gap-2 text-text-700 bg-background rounded-xl ${className}`,
|
|
4228
|
+
...props,
|
|
4229
|
+
children: [
|
|
4230
|
+
/* @__PURE__ */ jsxs21(
|
|
4231
|
+
"div",
|
|
4232
|
+
{
|
|
4233
|
+
className: `
|
|
4234
|
+
w-full flex ${direction == "col" ? "flex-col" : "flex-row items-center"} gap-2
|
|
4235
|
+
`,
|
|
4236
|
+
children: [
|
|
4237
|
+
/* @__PURE__ */ jsx26("span", { className: "w-full", children: /* @__PURE__ */ jsx26("p", { className: "text-xs text-text-950 font-bold", children: header }) }),
|
|
4238
|
+
/* @__PURE__ */ jsx26("span", { className: "flex flex-row gap-1", children })
|
|
4239
|
+
]
|
|
4240
|
+
}
|
|
4241
|
+
),
|
|
4242
|
+
/* @__PURE__ */ jsx26(CaretRight2, { className: "text-text-800", size: 24 })
|
|
4243
|
+
]
|
|
4244
|
+
}
|
|
4245
|
+
);
|
|
4246
|
+
}
|
|
4247
|
+
);
|
|
4248
|
+
var CardForum = forwardRef12(
|
|
4249
|
+
({
|
|
4250
|
+
title,
|
|
4251
|
+
content,
|
|
4252
|
+
comments,
|
|
4253
|
+
onClickComments,
|
|
4254
|
+
valueComments,
|
|
4255
|
+
onClickProfile,
|
|
4256
|
+
valueProfile,
|
|
4257
|
+
className = "",
|
|
4258
|
+
date,
|
|
4259
|
+
hour,
|
|
4260
|
+
...props
|
|
4261
|
+
}, ref) => {
|
|
4262
|
+
return /* @__PURE__ */ jsxs21(
|
|
4263
|
+
"div",
|
|
4264
|
+
{
|
|
4265
|
+
ref,
|
|
4266
|
+
className: `w-auto h-auto p-4 rounded-lg flex flex-row gap-3 border border-border-100 bg-background ${className}`,
|
|
4267
|
+
...props,
|
|
4268
|
+
children: [
|
|
4269
|
+
/* @__PURE__ */ jsx26(
|
|
4270
|
+
"button",
|
|
4271
|
+
{
|
|
4272
|
+
type: "button",
|
|
4273
|
+
"aria-label": "Ver perfil",
|
|
4274
|
+
onClick: () => onClickProfile?.(valueProfile),
|
|
4275
|
+
className: "min-w-8 h-8 rounded-full bg-background-950"
|
|
4276
|
+
}
|
|
4277
|
+
),
|
|
4278
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-col gap-2 flex-1", children: [
|
|
4279
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex flex-row gap-1 items-center flex-wrap", children: [
|
|
4280
|
+
/* @__PURE__ */ jsx26("p", { className: "text-xs font-semibold text-primary-700 truncate", children: title }),
|
|
4281
|
+
/* @__PURE__ */ jsxs21("p", { className: "text-xs text-text-600", children: [
|
|
4282
|
+
"\u2022 ",
|
|
4283
|
+
date,
|
|
4284
|
+
" \u2022 ",
|
|
4285
|
+
hour
|
|
4286
|
+
] })
|
|
4287
|
+
] }),
|
|
4288
|
+
/* @__PURE__ */ jsx26("p", { className: "text-text-950 text-sm line-clamp-2", children: content }),
|
|
4289
|
+
/* @__PURE__ */ jsxs21(
|
|
4290
|
+
"button",
|
|
4291
|
+
{
|
|
4292
|
+
type: "button",
|
|
4293
|
+
"aria-label": "Ver coment\xE1rios",
|
|
4294
|
+
onClick: () => onClickComments?.(valueComments),
|
|
4295
|
+
className: "text-text-600 flex flex-row gap-2 items-center",
|
|
4296
|
+
children: [
|
|
4297
|
+
/* @__PURE__ */ jsx26(ChatCircleText, { "aria-hidden": "true", size: 16 }),
|
|
4298
|
+
/* @__PURE__ */ jsxs21("p", { className: "text-xs", children: [
|
|
4299
|
+
comments,
|
|
4300
|
+
" respostas"
|
|
4301
|
+
] })
|
|
4302
|
+
]
|
|
4303
|
+
}
|
|
4304
|
+
)
|
|
4305
|
+
] })
|
|
4191
4306
|
]
|
|
4192
4307
|
}
|
|
4193
4308
|
);
|